# Calculate Coefficients of Chebyshev and Notch-Filters

Hi everybody,

i have a question about the calculation of Chebyshev or Notch cofficients b0, b1, b2, a1 and a2. Where can i find the calculation? I've been looking in the SigmaStudio-Help but i found nothing about this topic.

Kind Regards

Eric

Parents
•     Hello Eric,

As it turns out, the math behind Chebyshev filters is quite imposing.  Fortunately, the one you've shown as an example above is of the second-order ("one biquad", or "N = 2") variety.  This is a special case of Chebyshev filters generally, thus possibly allowing a shortcut around the math.  I'll present such a shortcut, then provide a reference for the (gasp!) real deal.

Below is the SigmaStudio Chebyshev Lowpass filter above a General HP-LP Lowpass Filter.  Both are second-order.  Comparing the red Chebyshev response to the green General response, we observe the mismatch in their curves:

By manually tweaking the General Filter's Gain, Frequency, and Q, we can make the two curves line up nicely.  This works because second-order lowpass filters have only these three parameters, which completely describe the resulting filter:

By now, likely you see where this is going:  For a range of second-order Chebyshev filters of commonly-used ripple choices, we can empirically find corresponding gains, frequency factors, and Qs to plug into a General Second-Order filter.  Here's my results:

You can code these into a lookup table for your uC.  Then have it compute your IIR coefficients using the known general lowpass formulas.

Does this method really work?  As a quick test, I tried applying the lookup table to a 100 Hz, 1 dB ripple Chebyshev highpass filter.  For highpass, you divide by the frequency factor instead of multiplying.  The simulated results appear pretty stinking close!  Somewhere there's a filter expert laughing their tail off at this amateur stuff as we speak -- but if they won't jump in here and help us, the shame is on them!

The real magic with Chebyshev is in the higher-order implementations.  These provide the "brick-wall" responses which communications engineers often demand.  The good news is, the reference below provides a BASIC-like example program to make this very magic happen.  It's straightforward, a walk in the park.  But those formulas do appear large and hungry, like in Jurassic Park.   Choose for yourself whether to venture therein:

http://www.analog.com/media/en/technical-documentation/dsp-book/dsp_book_Ch20.pdf

This is part of an entire DSP book which its author and ADI kindly make available as a download.  If you happen to be a DSP novice like me, by all means devour this book!  It's quite accessible as these things go, and nicely arranged in topical order from easy to harder.  Chebyshev filters are way back in Chapter 20, another hint of what you'll be getting into.  Enjoy the ride -- and if something chases you, run!

Best regards,

Bob