作业帮 > 数学 > 作业

DSP数字信号处理题目求解

来源:学生作业帮 编辑:作业帮 分类:数学作业 时间:2024/05/22 14:37:34
DSP数字信号处理题目求解
Design a digital lowpass Butterworth filter with the following specifications:
[1] 3 dB attenuation at the passband frequency of 1.5 kHz.
[2] 10 dB stopband attenuation at the frequency of 3 kHz.
[3] Sampling frequency of 8,000 Hz
%采样频率
Fs = 8000; 
% 通带和阻带截至频率
fp = 1500; fs = 3000;
% 归一化的通带和阻带频率
wp = fp/(Fs/2); ws = fs/(Fs/2); %
% 通带和阻带衰减
rp = 3; rs = 10;
% 估计Butterworth 滤波器的阶次和频率
[n,wn] = buttord(wp,ws,rp,rs);
[b,a] = butter(n,wn);
[h,f] = freqz(b,a,512,Fs);
subplot(211),plot(f,20*log(abs(h)));grid;
xlabel('Frequency /Hz'); ylabel('Magnitude');title('幅频特性')
subplot(212),plot(f,unwrap(angle(h)));grid;
xlabel('Frequency /Hz'); ylabel('Phase');title('相频特性')