wxm27811 发表于 2011-8-6 10:35:30

求达人帮我分析下FIR滤波器的设计

题目是这个样子的:
设计FIR滤波器(低通,四种窗函数, fs=1200Hz, 截止频率300Hz,
阶数自选, 画频率特性并分析比较)。

最好的话,能够帮我解决一下,实在是隔行如隔山~一点不通啊。。。
多谢~~

wxm27811 发表于 2011-8-6 21:12:58

谁知道阻带频率和题目中的关系?

wxm27811 发表于 2011-8-14 10:09:50

这个是我用工具箱做的。希望对后来人有帮助。clear;
Fs = 1200;% Sampling Frequency

N    = 19;       % Order
Fc   = 300;      % Cutoff Frequency
flag = 'scale';% Sampling Flag
Beta = 0.5;      % Window Parameter
%% 凯撒窗%%
% Create the window vector for the design algorithm.
win = kaiser(N+1, Beta);

% Calculate the coefficients using the FIR1 function.
b= fir1(N, Fc/(Fs/2), 'low', win, flag)
= freqz(b,1,2048,1200);
figure;
plot(f,20*log10((abs(h))))
title('凯撒窗')

%% 矩形窗%%
% Create the window vector for the design algorithm.
win = rectwin(N+1);

% Calculate the coefficients using the FIR1 function.
b= fir1(N, Fc/(Fs/2), 'low', win, flag)
= freqz(b,1,2048,1200);
figure;
plot(f,20*log10((abs(h))))
title('矩形窗')

%% 海明窗%%
% Create the window vector for the design algorithm.
win = hamming(N+1);

% Calculate the coefficients using the FIR1 function.
b= fir1(N, Fc/(Fs/2), 'low', win, flag)
= freqz(b,1,2048,1200);
figure;
plot(f,20*log10((abs(h))))
title('海明窗')

%% 汉宁窗%%
% Create the window vector for the design algorithm.
win = hann(N+1);

% Calculate the coefficients using the FIR1 function.
b= fir1(N, Fc/(Fs/2), 'low', win, flag)
= freqz(b,1,2048,1200);
figure;
plot(f,20*log10((abs(h))))
title('汉宁窗')

%% 布莱克曼窗%%
% Create the window vector for the design algorithm.
win = blackman(N+1);

% Calculate the coefficients using the FIR1 function.
b= fir1(N, Fc/(Fs/2), 'low', win, flag)
= freqz(b,1,2048,1200);
figure;
plot(f,20*log10((abs(h))))
title('布莱克曼窗')
页: [1]
查看完整版本: 求达人帮我分析下FIR滤波器的设计