Matlab help on Chebychev Type 1

Discussion in 'Homework Help' started by tquiva, May 6, 2011.

  1. tquiva

    Thread Starter Member

    Oct 19, 2010
    176
    1
    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.
     
  2. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    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.
     
  3. tquiva

    Thread Starter Member

    Oct 19, 2010
    176
    1
    How would I go about plotting the response?
    Should I use freqs?
     
    Last edited: May 7, 2011
  4. tquiva

    Thread Starter Member

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

    Code ( (Unknown Language)):
    1. % 1dB down below 2kHz
    2. [n1,d1]=cheby1(2,1,12566,'low','s')
    3. figure(1),freqs(n1,d1)
    4. figure(2),pzmap(n1,d1)
    5.  
    6. % 2dB down below 2.5 kHz - higher than 2kHz->increase attenuation->LPF
    7. % cutoff freq=2.5kHz=15708 rad/s
    8. [n2,d2]=cheby1(2,2,15708,'low','s')
    9. figure(3),freqs(n2,d2)
    10. figure(4),pzmap(n2,d2)
    11.  
    12. % 40dB above 4kHz
    13. % cutoff freq=4kHz=25133 rad/s
    14. [n3,d3]=cheby1(4,40,25133,'low','s')
    15. figure(5),freqs(n3,d3)
    16. figure(6),pzmap(n3,d3)
    17.  
     
Loading...