IIR Butterworth型模拟低通滤波器设计原理

2020-07-19  本文已影响0人  JeffreyLau

Butterworth技术指标及要求

filter_design_001.png filter_design_002.png

Butterworth模拟低通滤波器的频域特性

|H(j\omega)|^2 =\frac{1}{1+(\omega/\omega c)^{2N}}

filter_design_003.png

Butterworth模拟低通滤波器设计基本步骤

步骤一:确定模拟滤波器的阶数N

已知给定的条件(\omega_p,Ap)(\omega_s,As),根据 A(w) = -10lg|H(\omega_c)|^2 ,再由|H(j\omega)|^2 =\frac{1}{1+(\omega/\omega c)^{2N}} 可得到A(w) = -10lg\frac{1}{1+(\omega/\omega_c)^{2N}},推出:
N \geq \frac{\lg[(10^{0.1As}-1)/10^{0.1Ap}-1)]}{2\lg[\omega_s/ \omega_p]}

步骤二:确定模拟滤波器的3dB截频\omega_c

\frac{\omega_p}{(10^{0.1Ap - 1})^{1/2N}} \leq \omega_c \leq \frac{\omega_s}{(10^{0.1As - 1})^{1/2N}}

filter_design_004.png

步骤3:确定模拟滤波器的系统函数极点

利用实系数模拟系统频率响应的共轭对称性有
|H(j\omega)|^2 = H(j\omega)H^*(j\omega)=H(j\omega)H(-j\omega)=H(s)H(-s)|_{s=j\omega}
求出系统函数的极点(位于s左半平面)如下:
S_k = \omega_c * e^{j\pi(\frac{1}{2}+\frac{2k-1}{2N})}; k=1,2,3 \ldots

步骤4:确定模拟低通滤波器的系统函数H_L(s)

H_L(s) = \prod_{k=1}^N\frac{-S_k}{S-S_k}

filter_design_005.png

使用matlab求模拟低通滤波器的系统函数

H(s) = \frac{Y_{ZS}}{X(s)} = \frac{b_mS^{m} + b_{m-1}S^{m-1}+\ldots+b_1S+b_0}{a_nS^{n} + a_{n-1}S^{n-1}+\ldots+a_1S+a_0}

Wp=2*pi*1000;%通带截止频率,将数字频率化成模拟频率
Ws=2*pi*2000;%阻带截止频率,将数字频率化成模拟频率
Ap=1;%通带最大衰耗
As=40; %阻带最小衰耗
% 求得阶数和3db截频wc
[N,Wc]=buttord(Wp,Ws,Ap,As,'s'); %Computer the order of analog filter,s表示模拟
fprintf('Order of the filter=%.0f\n',N)
%num 表示系统函数分子系数,den表示系统函数分母系数
[num,den] = butter(N,Wc,'s'); %Compute AF coefficients
disp('Numerator polynomial'); fprintf('%.4e\n',num);
disp('Denominator polynomial'); fprintf('%.4e\n',den);

omega=[Wp Ws]; % 求出通带频率点和截止频率点对应的频率响应值
h = freqs(num,den,omega); %Compute Ap and As of AF

ap = -20*log10(abs(h(1)));% 将通带频率响应转换成衰耗值,
as = -20*log10(abs(h(2)));% 将阻带频率响应转换成衰耗值,

hp = abs(h(1));
hs = abs(h(2));

gain_p = 20*log10(abs(h(1))); 
gain_s = 20*log10(abs(h(2))); 

fprintf('Ap= %.4f\n',ap);%打印ap
fprintf('As= %.4f\n',as);%打印as

% 看0~6000pi之间,步进为200 的频率响应值
omega = [0: 200: 3000*2*pi];
h = freqs(num,den,omega); %Compute the frequency response of the AF
subplot(211);
plot(omega/(2*pi),abs(h));
hold on;%在画完函数虚线之后保持曲线图
plot([0 Wp/(2*pi)],[hp hp],'r--'); %画两个虚线
plot([Wp/(2*pi) Wp/(2*pi)],[0 hp],'r--');

plot([0 Ws/(2*pi)],[hs hs],'r--'); %画两个虚线
plot([Ws/(2*pi) Ws/(2*pi)],[0 hs],'r--');

hold off;
xlabel('Frequency in Hz'); 
ylabel('H(jw)');

gain=20*log10(abs(h)); 
subplot(212);
plot(omega/(2*pi),gain);
hold on;%在画完函数虚线之后保持曲线图
plot([0 Wp/(2*pi)],[gain_p gain_p],'r--'); %画两个虚线
plot([Wp/(2*pi) Wp/(2*pi)],[0 gain_p],'r--');

plot([0 Ws/(2*pi)],[gain_s gain_s],'r--'); %画两个虚线
plot([Ws/(2*pi) Ws/(2*pi)],[0 gain_s],'r--');

hold off;

xlabel('Frequency in Hz'); 
ylabel('Gain in dB');
filter_design_006.png
Order of the filter=8 %8阶滤波器
Numerator polynomial % 分之系数
0.0000e+00
0.0000e+00
0.0000e+00
0.0000e+00
0.0000e+00
0.0000e+00
0.0000e+00
0.0000e+00
6.2187e+30
Denominator polynomial %分母系数
1.0000e+00
3.6222e+04
6.5603e+08
7.7093e+12
6.4060e+16
3.8498e+20
1.6360e+24
4.5108e+27
6.2187e+30
Ap= 0.6167
As= 40.0000

H(s) = \frac{6.2187*10^{30}S^{8}}{1+3.6222*10^{4}S^{1}+6.5603*10^{8}S^{2}+7.7093*10^{12}S^{3}+6.4060*10^{16}S^{4}+3.8498*10^{20}S^{5}+1.6360*10^{24}S^{6}+4.5108*10^{27}S^{7}+6.2187*10^{30}S^{8}}

num=[6.2187e+30];
den=[1.0000e+00 3.6222e+04 6.5603e+08 7.7093e+12 6.4060e+16 3.8498e+20 1.6360e+24 4.5108e+27 6.2187e+30];
subplot(211);
sys=tf(num,den);%求出系统的零极点
pzmap(sys);%画出系统零极点
subplot(212);
omega = [0: 200: 3000*2*pi];
H=freqs(num,den,omega);%得到频率响应
plot(omega/(2*pi),abs(H));%画出频率响应
xlabel('Frequency Hz');
title('Magnitude Respone');
filter_design_007.png
上一篇下一篇

猜你喜欢

热点阅读