1、M=input(M= );num=ones(1,M)/M;h=freqz(num,1,w);subplot(2,1,1);plot(w/pi,abs(h);grid;title(H(ejomega)幅度谱xlabel(omega/piylabel(振幅subplot(2,1,2);plot(w/pi,angle(h);相位谱 H(ejomega)以弧度为单位的相位 This program was run for the following three different values of M and the plots of the corresponding frequency resp
2、onses are shown below: The types of symmetries exhibited by the magnitude and phase spectra are due to - The type of filter represented by the moving average filter is M=3- M=10;M=20; The results of Question Q2.1 can now be explained as follows - By the graph, you can see that it represents a low-pa
3、ss filter.Q4.2 The plot of the frequency response of the causal LTI discrete-time system of Question Q4.2 obtained using the modified program is given below:pi;num=0.15 0 -0.15;den=1 -0.5 0.7;h=freqz(num,den,w); The type of filter represented by this transfer function is - It says bandpass filter is
4、 obtained by diagrams can be BPFQ4.3 The plot of the frequency response of the causal LTI discrete-time system of Question Q4.3 obtained using the modified program is given below:den=0.7 -0.5 1The type of filter represented by this transfer function is - O causal linear time-invariant discrete time
5、system frequency response, determine the type filter The difference between the two filters of Questions 4.2 and 4.3 is - More on the topic of figure, the amplitude spectrum is the same, the phase spectrum, on the topic that is continuous, and kinds of phase jump line, . I shall choose the filter of
6、 Question Q4.3 for the following reason - the amplitude spectrum is the same, the phase spectrum, on the topic that is continuous, and kinds of phase jump line .Q4.6 The pole-zero plots of the two filters of Questions 4.2 and 4.3 developed using zplane are shown below:h=zplane(num,den);den=0.7 -0.5
7、1; From these plots we make the following observations: Different function, zero zero and pole pole figure with different relative position of the circle4.2 TYPES OF TRANSFER FUNCTIONSProject 4.2 Filters A copy of Program P4_1 is given below:clf;fc=0.25;n=-6.5:1:6.5;y=2*fc*sinc(2*fc*n); k=n+6.5;stem
8、(k,y); title(N=13 axis(0 13 -0.2 0.6);时间序号 n ylabel( gridQ4.7 The plot of the impulse response of the approximation to the ideal lowpass filter obtained using Program P4_1 is shown below: clf; fc=0.25; n=-6.5: y=2*fc*sinc(2*fc*n);k=n+6.5; stem(k,y);axis(0 13 -0.2 0.6); xlabel(gridThe length of the F
9、IR lowpass filter is -14 The statement in Program P4_1 determining the filter length is - n=-6.5:The parameter controlling the cutoff frequency is -Fc parameters control the cutoff frequencyQ4.8 The required modifications to Program P4_1 to compute and plot the impulse response of the FIR lowpass fi
10、lter of Project 4.2 with a length of 20 and a cutoff frequency of c = 0.45 are as indicated below:fc=0.45/(2*pi);n=-9.5:9.5;k=n+9.5;N=20axis(0 20 -0.2 0.6); The plot generated by running the modified program is given below:Q4.9 The required modifications to Program P4_1 to compute and plot the impul
11、se response of the FIR lowpass filter of Project 4.2 with a length of 15 and a cutoff frequency of c = 0.65 are as indicated below:fc=0.65/(2*pi);n=-7.5:k=n+7.5;N=15axis(0 14 -0.2 0.6);Q4.11 A plot of the gain response of a length-2 moving average filter obtained using Program P4_2 is shown below:un
12、ction g,w=gain(num,den) -gain函数pi/255:g=20*log10(abs(h);M=2; -滑动平均低通滤波器的增益响应程序g,w=gain(num,1);plot(w/pi,g);axis(0 1 -50 0.5)单位为db的增益title(,num2str(M) From the plot it can be seen that the 3-dB cutoff frequency is at -3dB。Q4.12 The required modifications to Program P4_2 to compute and plot the gain r
13、esponse of a cascade of K length-2 moving average filters are given below:function g,w=gainlink(num,den) H=h.*h.*h;g=20*log10(abs(H);wc=2*acos(2(-1/(2*3)wc =0.9430wc =0.3*pi The plot of the gain response for a cascade of 3 sections obtained using the modified program is shown below: From the plot it
14、 can be seen that the 3-dB cutoff frequency of the cascade is at - wc=0.3*piQ4.19 A copy of Program P4_3 is given below:b=1 -8.5 30.5 -63;num1=b 81 fliplr(b);num2=b 81 81 fliplr(b);num3=b 0 -fliplr(b);num4=b 81 -81 -fliplr(b);n1=0:length(num1) -1;n2=0:length(num2) -1;subplot(2,2,1); stem(n1,num1); g
15、rid;1 型有限冲激响应滤波器subplot(2,2,2); stem(n2,num2);2 型有限冲激响应滤波器subplot(2,2,3); stem(n1,num3);3 型有限冲激响应滤波器subplot(2,2,4); stem(n2,num4);4 型有限冲激响应滤波器pause zplane(num1,1); zplane(num2,1); zplane(num3,1); zplane(num4,1);disp(1 型有限冲激响应滤波器的零点是disp(roots(num1);2 型有限冲激响应滤波器的零点是disp(roots(num2);3 型有限冲激响应滤波器的零点是di
16、sp(roots(num3);4 型有限冲激响应滤波器的零点是disp(roots(num4); The plots of the impulse responses of the four FIR filters generated by running Program P4_3 are given below: Insert MATLAB figure(s) here. Copy from figure window(s) and paste. From the plots we make the following observations: Filter #1 is of length
17、 _8_ with a _80_ impulse response and is therefore a Type _ linear-phase FIR filter. Filter #2 is of length _10_ with a _80_ impulse response and is therefore a Type _ linear-phase FIR filter. Filter #3 is of length _8_ with a _60_ impulse response and is therefore a Type _ linear-phase FIR filter.
18、Filter #4 is of length _10_ with a _80_ impulse response and is therefore a Type _ linear-phase FIR filter. From the zeros of these filters generated by Program P4_3 we observe that: Filter #1 has zeros at z = 2.9744,2.0888 ,0.9790 + 1.4110i,0.9790 - 1.4110i, 0.3319 + 0.4784i, 0.3319 - 0.4784i,0.478
19、7,0.3362 Filter #2 has zeros at z = 3.7585 + 1.5147i,3.7585 - 1.5147i,0.6733 + 2.6623i,0.6733 - 2.6623i,-1.0000 ,0.0893 + 0.3530i,0.0893 - 0.3530i,0.2289 + 0.0922i,0.2289 - 0.0922i Filter #3 has zeros at z = 4.7627 ,1.6279 + 3.0565i,1.6279 - 3.0565i,-1.0000 ,1.0000 0.1357 + 0.2549i,0.1357 - 0.2549i,
20、0.2100 Filter #4 has zeros at z = 3.4139 ,1.6541 + 1.5813i,1.6541 - 1.5813i,-0.0733 + 0.9973i,-0.0733 - 0.9973i,1.0000 ,0.3159 + 0.3020i,0.3159 - 0.3020i,0.2929 Plots of the phase response of each of these filters obtained using MATLAB are shown below: From these plots we conclude that each of these filters have _linear_ phase. Q4.20 The plots of the impulse responses of the four FIR filters generated by running Program P4_3 are given below: Filter #2 is
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1