Reply by Clay July 23, 20102010-07-23
On Jul 23, 5:37=A0am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote:
> On Tue, 20 Jul 2010 13:11:09 -0700 (PDT), Clay <c...@claysturner.com> > wrote: > > > > > > >On Jul 20, 3:49=A0pm, "AndrewDSPdev" <aritchie@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 borr=
owed
> >> algorithm to calculate the filter coefficients (using the z-transform)=
and
> >> then I use those coefficients to filter it as is standard. > >> =A0 =A0 =A0I'd like to also add an implementation of a band-pass and b=
and-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 > > Hi Clay, > =A0 Yep, "filter transformations" are covered starting on > page 430 of O&Ss' 1st Edition (1989). =A0As far as I know > that subject was omitted from their 1999 2nd Edition. > > See Ya', > [-Rick-]- Hide quoted text - > > - Show quoted text -
It's kinda sad when a newer version of a book turns out to not be a superset of the earlier one. The book "Digital Signal Processing" by Peled and Liu covers filter transformations in great detail. They show the steps and provide worked out examples so they come very close to being a "cookbook." But you have to do the algebra. Clay
Reply by Rick Lyons July 23, 20102010-07-23
On Tue, 20 Jul 2010 13:11:09 -0700 (PDT), Clay <clay@claysturner.com>
wrote:

>On Jul 20, 3:49&#4294967295;pm, "AndrewDSPdev" <aritchie@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. >> &#4294967295; &#4294967295; &#4294967295;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
Hi Clay, Yep, "filter transformations" are covered starting on page 430 of O&Ss' 1st Edition (1989). As far as I know that subject was omitted from their 1999 2nd Edition. See Ya', [-Rick-]
Reply by robert bristow-johnson July 20, 20102010-07-20
On Jul 20, 6:42&#4294967295;pm, "AndrewDSPdev" <aritchie@n_o_s_p_a_m.vernier.com>
wrote:
> 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?
divide the numerator coefficients by whatever gain you want to set to one. r b-j
Reply by AndrewDSPdev July 20, 20102010-07-20
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
Reply by Vladimir Vassilevsky July 20, 20102010-07-20

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
Reply by robert bristow-johnson July 20, 20102010-07-20
On Jul 20, 4:11&#4294967295;pm, Clay <c...@claysturner.com> wrote:
> On Jul 20, 3:49&#4294967295;pm, "AndrewDSPdev" <aritchie@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. > > &#4294967295; &#4294967295; &#4294967295;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
Reply by Clay July 20, 20102010-07-20
On Jul 20, 3:49&#4294967295;pm, "AndrewDSPdev" <aritchie@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. > &#4294967295; &#4294967295; &#4294967295;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
Reply by AndrewDSPdev July 20, 20102010-07-20
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