Section 4. Frequency response of system The frequency response of a system H(o)
ID: 2291216 • Letter: S
Question
Section 4. Frequency response of system The frequency response of a system H(o) can be obtained from H(z) as z-ei .e., the z transform of the system function is evaluated at the circumference of the unit circle, turning it to become a Fourier transform 0.96 0.9028 21.56 +0.8109 Taking H(E)- as an example, the following codes evaluate the frequency response of the system, H(o) % Fill in the blanks marked by ???? 1 . pnum-[1-0.96 0.9208] % the polynomial of the numerator of H(s) 2. pden = [ 22221 3. f [0:0.01:]; % the polynomial of the denominator of H(s) % frequency relative to the sampling frequency % z is evaluated % evaluating the polynomials 5, o-polyval(pnum, z)./polyval(pden, z); 6. olmag- abs(ol); 7. olpha- 180/pi*angle(o); 8. subplot(2,1,1); plot(f, olmag); 9. xlabel( frequency/sampling frequency) 10. ylabel('magnitude ); grid 11. subplot(2,1,2); plot(f, olpha); 12. xlabel(frequency/sampling frequency') 13. ylabel(phase (degrees)); grid Practice a. Fill in the missing part (????) of line 2, and run the program. b. What is the relation between the first half of the spectrum for frequency ranging from 0 to 0.5 and the second half, from 0.5 to 1? Why is it like that? c. If the sampling frequency is 1 kHz, re-label the x-axes of the plots in c above to show readings in Hz.Explanation / Answer
a. Matlab code below in bold:
pnum=[0 -0.96 0.9208]
pden=[1 -1.56 0.8109]
f=[0:0.01:1];
z=exp(2*i*pi*f);
ol=polyval(pnum,z)./polyval(pden,z);
olmag=abs(ol);
olpha=(180/pi)*angle(ol);
subplot(2,1,1);plot(f,olmag);
xlabel('frequency/sampling frequency')
ylabel('magnitude');grid
subplot(2,1,2);plot(f,olpha);
xlabel('frequency/sampling frequency')
ylabel('phase(degrees)');grid
b. low frequency and high frequency regions
c.
pnum=[0 -0.96 0.9208]
pden=[1 -1.56 0.8109]
f=[0:0.001:1];
z=exp(2*i*pi*f);
ol=polyval(pnum,z)./polyval(pden,z);
olmag=abs(ol);
olpha=(180/pi)*angle(ol);
subplot(2,1,1);plot(f,olmag);
xlabel('frequency/sampling frequency')
ylabel('magnitude');grid
subplot(2,1,2);plot(f,olpha);
xlabel('frequency/sampling frequency')
ylabel('phase(degrees)');grid
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.