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.

Chebyshev filter design Problem

Status
Not open for further replies.

Tahmod

Newbie level 1
Newbie level 1
Joined
Dec 3, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
15
-I have design a chebyshev filter.With The following specification.
pass band 0-2khz
pass band ripple=0.5dB
sampling frequency 60khz
and the transfer function given which is :
H(s)=1.5161/(s^2+1.4526s+1.5161)

-When I have done the design by hand I done I got (bi-linear )
H(z)=(0.0143+0.029z^-1+0.0143z^-2)/(1-1.682z^-1+0.8695z^-2)

-The problem is when I put it in Matlab to check, I cant get the it working.
-What is the problem with the code?
-Do I have to use another function instead of cheb1ord to allow only the bandpass frequency and not the other one?
-The error says:
error using cheb1ord (line 62)
The cutoff frequencies must be non-negative for analog filters.

Error in chebyshevIIR (line 93)
[N,Wn]=cheb1ord(wpp,wss,ap,as,'s') %Until here it is write


-Code
Fp=2000;
Fs=0;
ap=0.5;
as=0;
Ft=60000; % Sampling frequency
wp=2*pi*Fp/Ft
ws=2*pi*Fs/Ft

wpp=tan(wp/2)
wss=tan(ws/2)
[N,Wn]=cheb1ord(wpp,wss,ap,as,'s')

[B,A]=cheby1(N,1,Wn,'s');
[BT,AT]=lp2hp(B,A,wpp);
[num,den]=bilinear(BT,AT,1/Ft);
tfHlp=tf(B,A) %Transfer function Glp(s) of the prototype analog lowpass filter
tfHhp=tf(BT,AT) %Transfer function Hhp(s) of the analog highpass filter
tfGhp=tf(num,den) %The transfer funcition Ghp(z) of the desired digital IIR highpass filter
 

You've got Fs=0, that would imply a High-pass filter. Maybe 0 is not allowed? Also, you've got passband ripple as .5dB (I assume that's what ap is), and a stopband gain of 0dB. I'm not a matlab expert, but those values don't look right, if I'm interpreting stuff correctly.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top