Matlab help on Chebychev Type 1

Thread Starter

tquiva

Joined Oct 19, 2010
176
Hi could someone please assist me with creating a chebychev type 1 filter at different specifications?
I'm asked to plot the poles and zeroes of a Chebychev type 1 filter to meet the following specifications:

- at most 1 dB down below 2 kHz
- at least 40 dB above 4 kHz

I know that the pseudocode is:

[num,den]=cheby1(order, ripple, ripple band frequency,'filter')
pzmap(num,den)

However, I'm unsure of what numerical values to choose for the order and ripple, nor what filter type. I know it's asking 1 dB down below 2 kHz.
So 2-1 = 1 = ripple band frequency?

If I'm mistaken with that assumption, could someone please help me with this problem? Any help is greatly appreciated.
 

t_n_k

Joined Mar 6, 2009
5,455
Since below 2KHz [cut-off frequency = 12,566 rads/sec] the transfer attenuation from input to output is no more than 1dB [pass-band ripple = 1dB] and for frequencies higher than 2KHz the attenuation may increase this must be a lowpass filter [filter or 'ftype' = 'low']. The minimum attenuation at 4KHz must be 40dB so this sets a requirement on the filter order [n = probably at least 4]. You tinker with the order to get the required attenuation at 4KHz. Check the design by plotting the response and re-adjust the values accordingly.

If you tighten the pass-band ripple constraint then you'll need a higher order filter to achieve the stop-band rejection criteria. But higher order filters are more expensive to make so the idea is to meet the spec and that's it.

The more you play with the ideas in Matlab the better will be your understanding of what factors impact on the overall result.
 

Thread Starter

tquiva

Joined Oct 19, 2010
176
I tried it out, and here's what I got. Could you please correct my mistakes?

Rich (BB code):
% 1dB down below 2kHz 
[n1,d1]=cheby1(2,1,12566,'low','s')
figure(1),freqs(n1,d1)
figure(2),pzmap(n1,d1)

% 2dB down below 2.5 kHz - higher than 2kHz->increase attenuation->LPF
% cutoff freq=2.5kHz=15708 rad/s
[n2,d2]=cheby1(2,2,15708,'low','s')
figure(3),freqs(n2,d2)
figure(4),pzmap(n2,d2)

% 40dB above 4kHz 
% cutoff freq=4kHz=25133 rad/s
[n3,d3]=cheby1(4,40,25133,'low','s')
figure(5),freqs(n3,d3)
figure(6),pzmap(n3,d3)
 
Top