IIR 椭圆型模拟低通滤波器设计原理
2020-07-21 本文已影响0人
JeffreyLau
椭圆型模拟低通滤波器的模方函数
椭圆型模拟低通滤波器频域特性
filter_design_ellipord_001.png椭圆型滤波器设计步骤
步骤一:由通带截频确定
步骤二:由阻带衰减As确定 :
$\varepsilon = \sqrt{10^{0.1Ap - 1}}$
步骤三:由通带和阻带指标确定k :
步骤四:由阻带衰减确定k1:
步骤五:确定阶段N:
filter_design_ellipord_002.png步骤五:最后确定系统函数
使用matlab求椭圆型滤波器的系统函数以及频率响应
- 设计一个满足下列指标椭圆型模拟低通滤波器fp=1KHz , fs=2KHz,Ap ≤1dB, As ≥40dB,求出其系统函数,并画出其频率响应特性图
Wp=2*pi*1000;%将数字频率转换成模拟频率
Ws=2*pi*2000;%将数字频率转换成模拟频率
Ap=1;%最大通带衰耗
As=40; % %最小阻带衰耗
%求阶数和Wc
[N,Wc]=ellipord(Wp,Ws,Ap,As,'s'); %Computer analog filter order
fprintf('Order of the filter=%.0f\n',N)
%求分之和分母系数
[num,den] = ellip(N,Ap,As,Wc,'s'); %Compute AF coefficients
disp('Numerator polynomial');
fprintf('%.4e\n',num);
disp('Denominator polynomial');
fprintf('%.4e\n',den);
% 求Wp和Ws两点对应的频率响应
omega=[Wp Ws];
h = freqs(num,den,omega); %Compute Ap and As of the 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',-20*log10(abs(h(1))));
fprintf('As= %.4f\n',-20*log10(abs(h(2))));
%求0~6000pi之间的频率响应
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),'LineWidth',3);%画出频率响应曲线
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,'LineWidth',3);
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_ellipord_003.png
- 其系数如下:
Order of the filter=4
Numerator polynomial
1.0000e-02
0.0000e+00
5.9290e+06
0.0000e+00
5.0179e+14
Denominator polynomial
1.0000e+00
5.9008e+03
5.9759e+07
1.9936e+11
5.6301e+14
Ap= 1.0000
As= 40.0007
- 使用matlab分析其零极点分布情况
num=[1.0000e-02 0.0000e+00 5.9290e+06 0.0000e+00 5.0179e+14];
den=[1.0000e+00 5.9008e+03 5.9759e+07 1.9936e+11 5.6301e+14];
subplot(211);
sys=tf(num,den);%求出系统的零极点
pzmap(sys,'r');%画出系统零极点
grid on
subplot(212);
omega = [0: 200: 3000*2*pi];
H=freqs(num,den,omega);%得到频率响应
plot(omega/(2*pi),abs(H),'LineWidth',3);%画出频率响应
xlabel('Frequency Hz');
title('Magnitude Respone');
- 画其图如下:
- 由图可知极点的分布都在S平面的左半平面,说明是系统稳定
- N=4为偶数,一共有4个极点,和上面理论分析互相匹配