# Algorithm for implementing an IIR digital filter, Chebyshev type I low pass

I am trying to implement a Chebyshev type I low-pass IIR digital filter in C. I have got the SOS Matrix and scale values from Matlab.

What is the direct equation or algorithm to implement such a filter?

okay, this is, or can be, stuff straight outa a textbook. by "SOS", you mean "2nd-order sections"? i usually call those "biquads". maybe that's not the best term for it in the s-plane. i dunno.

anyway, defending on your passband ripple, you should have the resonant frequency and Q for each LPF biquad. you can use those two parameters and get digital biquads directly out of that using the Audio EQ Cookbook. google will find it fast for you.

otherwise convert your Tchebyshev from s-plane to z-plane however you want. the Cookbook uses the bilinear transform, which means every bump or feature in the analog frequency response will have a corresponding bump or feature in the digital frequency response. if you're more interested in matching the impulse response, you would transform H(s) -> H(z) using the Impulse Invariant method.

someone will probably vote me down for not answering the question completely (they've done it in the past). big deel.

• i am really sorry for the delay to thank you. it was nice that u made a reply. i can understand such things cannot be answered fully if the other person does not know the basics. i think i need to go through some text books. the reference u provided hopefully will help me. and i dont have enuf reputation to vote up. :) Dec 25, 2013 at 14:48

I've been using some pretty nice web-based filter design software that solves the whole problem in one go: http://www.micromodeler.com/dsp

It does the filter design, SOS factoring, solves the integer coefficients and spits out the code in C or for several other platforms. It's pretty intuitive and the demo version should give you the C code that you need.

Even if you don't use the generated code directly in your assignment, you can see how it's done it and you can also use their one to check your results.

• it was really helpful. as i am just starting to work on dsp, it should help me quite a lot Dec 20, 2013 at 5:58