Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Example Ripple Calculations in Matlab

Let's first consider the passband ripple spec, $ \pm 0.1$ dB. Converting that to linear ripple amplitude gives, in Matlab,

    format long;
    dp=10^(0.1/20)-1
    dp =
       0.01157945425990
Let's check it:
    >> 20*log10(1+dp)
    ans =
       0.10000000000000
    >> 20*log10(1-dp)
    ans =
      -0.10116471483635

Ok, close enough. Now let's set the stopband ripple to 1/10 times the passband ripple and see where we are:

    >> ds=dp/10;
    >> 20*log10(ds)
    ans =
     -58.72623816882052

So, that's about 60 dB stop-band rejection, which is not too bad.

Setting the stopband ripple to 1/100 times the passband ripple adds another 20 dB of rejection:

    >> ds=dp/100;
    >> 20*log10(ds)
    ans =
     -78.72623816882052
which is close to the ``high fidelity'' zone of 80dB SBA


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[Comment on this page via email]

``The Window Method for FIR Digital Filter Design}'', by Julius O. Smith III, (From Lecture Overheads, Music 421).
Copyright © 2020-06-27 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]