Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help with IIR filter(low-pass filter with impulse invariance and ellipsoid )

Status
Not open for further replies.

owen_tam

Newbie level 1
Joined
May 18, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
here is the problem:
i use impulse invariance transform to design low-pass filter, butterworth,chebyshev1 can perfectly achieve the requirements,but ellipsoid and chebyshev 2 can't achieve the Rs(Stopband attenuation)
and here is my code and figure:
Fs=400
fp=100;fs=120;
Ap=1;As=20
Wp=2*fp*pi;Ws=2*fs*pi;
[n,Wn]=ellipord(Wp,Ws,Ap,As,'s');
[b,a]= ellip(n,Ap,As,Wn,'s');
[B,A]=impinvar(b,a,Fs);
[HK,f]=freqz(B,A,'whole');
plot(f*Fs/2/pi,20*log10(abs(HK)));
axis([0,200,-80,5]);
grid on
1.png

Fs=400
fp=100;fs=120;
Ap=1;As=20
Wp=2*fp*pi;Ws=2*fs*pi;
[n,Wn]=cheb2ord(Wp,Ws,Ap,As,'s');
[b,a]= cheby2(n,As,Wn,'s');

[B,A]=impinvar(b,a,Fs);
[HK,f]=freqz(B,A,'whole');
plot(f*Fs/2/pi,20*log10(abs(HK)));
axis([0,200,-80,5]);
grid on
2.png

Any help will be much appreciated
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top