Use the numerical methods to compute and plot the velocity and position of the sensor. Discuss your results.

Assignment #5 BME 3420 – Fall 2021 Nov 23, 2021 1. [3 points] The file angles.csv contains the angular position of the hip, knee, and ankle during walking. The file also contains a time vector representing the different stages of the walking cycle (for 0 to 100). Download the file and put it in your local folder. Load the data in python using the the following code import numpy as np data = np.loadtxt(‘angles.csv’, delimiter=’,’, skiprows=1) stage = data[:,0] hip = data[:,1] knee = data[:,2] ankle = data[:,3] a.Compute and plot the first order derivative of the signals using the central difference method discussed in class. Which joint demonstrates the largest angular speed (speed is the absolute value of velocity). b.Compute and plot the first order derivative of the signals by fitting a polynomial to the data. Select an appropriate model order and use least-squares to estimate the model parameters. Then compute the derivative by finding the analytical derivative of the polynomial. Discuss the differences when compared to the results of a. c.Propose an alternative approach to find the derivative of a signal using polynomials that might produce better results than the method used in b.
-Extra [2 points] Implement and evaluate your proposed solution2.[2 points] The file acceleration.csv contains time and acceleration data from a sensor. Download the file and put it in your local folder. Load the data in python using the the following code
Assignment#5
Page 2 of 2
import numpy as np data = np.loadtxt(‘acceleration.csv’, delimiter=’,’, skiprows=1) time = data[:,0] acceleration = data[:,1] use the numerical methods discussed in class to compute and plot the velocity and position of the sensor. Discuss your results.

× How can I help you?