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

title('Group Delay of a Butterworth Bandstop Filter');

Q7.6修改程序P7.1来设计符合习题Q7.1所给指标的切比雪夫1型低通滤波器。写出所产生的传输函数的准确表达式。你的设计符合指标吗?使用MATLAB,计算并绘制滤波器的未畸变的相位响应及群延迟响应。

修改P7.1程序:

[N, Wn] = cheb1ord(0.2,0.4,0.5,40);Rp=0.5;

[num,den] = cheby1(N,Rp,Wn);[g, w] = Gain(num,den); % Plot the gain response figure(1);

plot(w/pi,g);grid; axis([0 1 -60 5]);

xlabel('\\omega /\\pi'); ylabel('Gain in dB');

title('Gain Response of a Type 1 Chebyshev Lowpass Filter'); figure(2);

w2 = 0:pi/511:pi;

Hz = freqz(num,den,w2); Phase = unwrap(angle(Hz)); plot(w2/pi,Phase);grid;

xlabel('\\omega /\\pi'); ylabel('Unwrapped Phase (rad)'); title('Unwrapped Phase Response of a Type 1 Chebyshev Lowpass Filter'); % Find and plot the group delay figure(3);

GR = grpdelay(num,den,w2); plot(w2/pi,GR);grid;

xlabel('\\omega /\\pi'); ylabel('Group Delay (sec)');

title('Group Delay of a Type 1 Chebyshev Lowpass Filter');

Gain Response of a Type 1 Chebyshev Lowpass Filter0-10-20Gain in dB-30-40-50-6000.10.20.30.40.5? /?0.60.70.80.91