DSP实验报告B13011025讲解 下载本文

Zeros of Type 1 FIR Filter are 2.9744 2.0888 0.9790 + 1.4110i 0.9790 - 1.4110i 0.3319 + 0.4784i 0.3319 - 0.4784i 0.4787 0.3362

Zeros of Type 2 FIR Filter are 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

Zeros of Type 3 FIR Filter are 4.7627 1.6279 + 3.0565i

1.6279 - 3.0565i -1.0000 1.0000 0.1357 + 0.2549i 0.1357 - 0.2549i 0.2100

Zeros of Type 4 FIR Filter are 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 (3) pause

w = -4*pi:8*pi/511:4*pi; h1=freqz(num1,1,w); h2=freqz(num2,1,w); h3=freqz(num3,1,w); h4=freqz(num4,1,w); subplot(2,2,1);

plot(w/pi,angle(h1));grid title('Phase Spectrum') xlabel('\\omega /\\pi');

ylabel('Phase in radians'); grid; title('Type 1 FIR Filter'); subplot(2,2,2);

plot(w/pi,angle(h2));grid title('Phase Spectrum') xlabel('\\omega /\\pi');

ylabel('Phase in radians'); grid; title('Type 2 FIR Filter'); subplot(2,2,3);

plot(w/pi,angle(h3));grid title('Phase Spectrum') xlabel('\\omega /\\pi');

ylabel('Phase in radians'); grid; title('Type 3 FIR Filter'); subplot(2,2,4);

plot(w/pi,angle(h4));grid

title('Phase Spectrum') xlabel('\\omega /\\pi');

ylabel('Phase in radians'); grid; title('Type 4 FIR Filter');

(4) pause

subplot(2,2,1); grpdelay(h1);

title('Type 1 FIR Filter'); subplot(2,2,2); grpdelay(h1);

title('Type 2 FIR Filter'); subplot(2,2,3); grpdelay(h1);

title('Type 3 FIR Filter'); subplot(2,2,4); grpdelay(h1);

title('Type 4 FIR Filter');

Q6.1使用程序P6.1,生成如下有限冲激响应传输函数的一个级联实现:

H1(z)?2?10z?1?23z?2?34z?3?31z?4?16z?5?4z?6

画出级联实现的框图。H1(z)是一个线性相位传输函数吗?

num = input('Numerator coefficient vector = '); den = input('Denominator coefficient vector = '); [z,p,k] = tf2zp(num,den); sos = zp2sos(z,p,k)

Numerator coefficient vector = [2 10 23 34 31 16 4] Denominator coefficient vector = [1 1 1 1 1 1 1] sos =

2.0000 6.0000 4.0000 1.0000 -1.2470 1.0000 1.0000 1.0000 0.5000 1.0000 1.8019 1.0000

1.0000 1.0000 2.0000 1.0000 0.4450 1.0000

Q6.3使用程序P6.1,生成如下因果无限冲激响应传输函数的级联实现: