Prev: Announcing ScopeIIR 5.0
Next: noncausal all-pass
From: AndrewDSPdev on 20 Jul 2010 15:49 I'm currently working on a general digital filtering app, and already have functionality to run a low/high-pass filter. The type of filter that I'm implementing is 2-pole IIR Chebysheb. Essentially, the app uses a borrowed algorithm to calculate the filter coefficients (using the z-transform) and then I use those coefficients to filter it as is standard. I'd like to also add an implementation of a band-pass and band-stop filter. However, I'm newish at DSP and don't want to deal with the z-transform or the Bilinear Transformation. Is there any simple way to tweak my coefficient algorithm, or transform the low-pass/high-pass coefficients into ones for a band-pass/stop filter? Any simple online sources that could help with this? Thanks for any help. Andrew
From: Clay on 20 Jul 2010 16:11 On Jul 20, 3:49 pm, "AndrewDSPdev" <aritchie(a)n_o_s_p_a_m.vernier.com> wrote: > I'm currently working on a general digital filtering app, and already have > functionality to run a low/high-pass filter. The type of filter that I'm > implementing is 2-pole IIR Chebysheb. Essentially, the app uses a borrowed > algorithm to calculate the filter coefficients (using the z-transform) and > then I use those coefficients to filter it as is standard. > I'd like to also add an implementation of a band-pass and band-stop > filter. However, I'm newish at DSP and don't want to deal with the > z-transform or the Bilinear Transformation. Is there any simple way to > tweak my coefficient algorithm, or transform the low-pass/high-pass > coefficients into ones for a band-pass/stop filter? Any simple online > sources that could help with this? > > Thanks for any help. > > Andrew The book "Discrete-Time Signal Processing" by Oppenheim and Schafer has filter transformation formulae for converting lowpass into band pass, band stop and highpass filters. These are in other DSP books as well. IHTH, Clay
From: robert bristow-johnson on 20 Jul 2010 17:13 On Jul 20, 4:11 pm, Clay <c...(a)claysturner.com> wrote: > On Jul 20, 3:49 pm, "AndrewDSPdev" <aritchie(a)n_o_s_p_a_m.vernier.com> > wrote: > > > I'm currently working on a general digital filtering app, and already have > > functionality to run a low/high-pass filter. The type of filter that I'm > > implementing is 2-pole IIR Chebysheb. Essentially, the app uses a borrowed > > algorithm to calculate the filter coefficients (using the z-transform) and > > then I use those coefficients to filter it as is standard. > > I'd like to also add an implementation of a band-pass and band-stop > > filter. However, I'm newish at DSP and don't want to deal with the > > z-transform or the Bilinear Transformation. Is there any simple way to > > tweak my coefficient algorithm, or transform the low-pass/high-pass > > coefficients into ones for a band-pass/stop filter? Any simple online > > sources that could help with this? > since 2nd order is the lowest order you can have for a BPF and BSF, there isn't any more you can put into the spec and design other than the resonant frequency and the Q (or bandwidth). the Audio EQ Cookbook (google it) spells out the coefficients for a 2nd order IIR filter of a variety of types. > The book "Discrete-Time Signal Processing" by Oppenheim and Schafer > has filter transformation formulae for converting lowpass into band > pass, band stop and highpass filters. These are in other DSP books as > well. if the OP doesn't do Z-transforms nor the bilinear transform, i don't think that O&S will be very helpful. i think the cookbook (or a different cookbook from someone else) is what the OP will need to resort to. r b-j
From: Vladimir Vassilevsky on 20 Jul 2010 18:24 AndrewDSPdev wrote: > I'm currently working on a general digital filtering app, and already have > functionality to run a low/high-pass filter. The type of filter that I'm > implementing is 2-pole IIR Chebysheb. Essentially, the app uses a borrowed > algorithm to calculate the filter coefficients (using the z-transform) and > then I use those coefficients to filter it as is standard. > I'd like to also add an implementation of a band-pass and band-stop > filter. > However, I'm newish at DSP and don't want to deal with the > z-transform or the Bilinear Transformation. > Is there any simple way to > tweak my coefficient algorithm, or transform the low-pass/high-pass > coefficients into ones for a band-pass/stop filter? > Any simple online > sources that could help with this? > Thanks for any help. I am sorry but no. There is no shortcuts. First, the prototype lowpass H(s) should be factored into biquads. Then, there is a method of Geffe for converting lowpass biquad function H(s) to bandpass/bandstop function with the 2x increase of order; that is one biquad gets converted into two biquads. Then apply BLT, and don't forget about sin(x)/x bandwidth warping. At the end, normalize the gain at the center frequency. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
From: AndrewDSPdev on 20 Jul 2010 18:42
Thanks for all the help. I have managed to get a 2-pole band-pass filter working. It seems to work fine, but for some of the inputted pass-bands, the frequency response has a gain that is not equal to one at the center frequency. What kind of operation can I perform on my filtering coefficients to normalize this gain? Andrew |