Question: b) Computation and plotting of frequency response based on response of system to a cosine In this part, we will use to create a Matlab

b) Computation and plotting of frequency response based on response of system to a cosine In this part, we will use to create a Matlab function to measure and plot the frequency response ona log-log scale, as outlined in the background section of this lab You will write a Matlab function function freqcos (b, a) % FREQCOS Freguency response of linear system based on measurement of response to cosine The result of this function should be the same as that we obtained before, but the measurement strategy is different, and corresponds exactly to what you would do in the laboratory if you had a circuit and a function generator. Here's what you want to do i. Create a Matlab array, c, of a cosine of frequency . Also create an array, s, of a sine of the same frequency. Select the sampling interval of each array such that the array has 10 periods of 256 points per period, for a total of 2560 points ii. Measure the response of the differential equation, y(t), to the cosine with the Matlablsim y= Isin(sys, c, t); where the sys is obtained using the Matlab tf function sys = tf (b, a); ii. Calculate z1 and z2 using Equations (L6.21) and (L6.22). We will compute the integral numerically as the mean of the product of y and sine or cos. Then use Eqation (L6.24) to compute|H() and KH(a)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
