Discussion:
[music-dsp] Upsampling Interpolation IIR Filter ??
Simon Hill
2001-09-17 15:10:17 UTC
Permalink
Hello,

Using a motorola 56364 I have been upsampling a signal by x4 and low pass
filtering to remove unwanted aliasing. Now if I use a 2nd order IIR based
design when I downsample the output still has the aliasing present, but
using an FIR filter it is removed? Does anyone know why?

Cheers,

Simon

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
Jon Watte
2001-09-17 18:14:56 UTC
Permalink
What's the order of the FIR?

Basically, I think this all comes down to how steep your filter is in
rejecting out-of-band signals. A second-order IIR is only 12 dB/octave
(asymptotically).

In general, if you can use a FIR, you want to, because they're much easier
to get good (==linear) phase response out of.

Cheers,

/ h+
-----Original Message-----
Sent: Monday, September 17, 2001 8:10 AM
Subject: [music-dsp] Upsampling Interpolation IIR Filter ??
Hello,
Using a motorola 56364 I have been upsampling a signal by x4 and low pass
filtering to remove unwanted aliasing. Now if I use a 2nd order IIR based
design when I downsample the output still has the aliasing present, but
using an FIR filter it is removed? Does anyone know why?
Cheers,
Simon
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
Nigel Redmon
2001-09-17 18:41:51 UTC
Permalink
I'm not 100% sure of where you're focusing the quesion, but I'll give you some
general tips:

The filter you're using is not very steep--don't know what the requirements are
and other details, but you'd have to have this filter pretty far below the final
sample rate * 0.5 to avoid aliasing.

Nothing inherently wrong with IIRs for this application, but FIRs are usually
used for phase linearity. Normally an FIR lowpass might be costly versus a
similar IIR, but note that FIRs have better specs (or fewer coefficients for a
given spec) as the frequency increases, so they are pretty good near half the
sample rate (that's one of the big reasons why people do multirate
conversion--cheaper to cut the sample rate in half twice than in fourth once;
yes, the first halfing filter can cheat too, since the second will clean it up
anyway). Also, though an IIR seems pretty efficient, remember that it is running
at the 4x rate (you must filter each sample even though you will throw 3/4 of
them away! The reason of course is the IIR feedback). Lastly, whereas typically
you'd have to add more IIR stages to improve things, FIR design generally
require simpler tweaks (if the spec changes or you want to improve it, just
modify/lengthen the coefficients).

Hope this helps,

Nigel
Post by Simon Hill
Hello,
Using a motorola 56364 I have been upsampling a signal by x4 and low pass
filtering to remove unwanted aliasing. Now if I use a 2nd order IIR based
design when I downsample the output still has the aliasing present, but
using an FIR filter it is removed? Does anyone know why?
Cheers,
Simon
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
Simon Hill
2001-09-18 07:19:50 UTC
Permalink
Hello,

Cheers for your help. Nigel you said,

"that's one of the big reasons why people do multirate
conversion--cheaper to cut the sample rate in half twice than in fourth
once;yes,
Post by Simon Hill
Post by Nigel Redmon
the first halfing filter can cheat too, since the second will clean it up
anyway). "
How can the first filter cheat? Do you mean I can have a very loose repsonse
for the first filter (so it just interpolates) aslong as its above the
required freq as the second will low pass it anyway?

Cheers,

Simon
Subject: Re: [music-dsp] Upsampling Interpolation IIR Filter ??
Date: Mon, 17 Sep 2001 11:41:51 -0700
I'm not 100% sure of where you're focusing the quesion, but I'll give you
some
The filter you're using is not very steep--don't know what the requirements
are
and other details, but you'd have to have this filter pretty far below the
final
sample rate * 0.5 to avoid aliasing.
Nothing inherently wrong with IIRs for this application, but FIRs are
usually
used for phase linearity. Normally an FIR lowpass might be costly versus a
similar IIR, but note that FIRs have better specs (or fewer coefficients
for a
given spec) as the frequency increases, so they are pretty good near half
the
sample rate (that's one of the big reasons why people do multirate
conversion--cheaper to cut the sample rate in half twice than in fourth
once;
yes, the first halfing filter can cheat too, since the second will clean it
up
anyway). Also, though an IIR seems pretty efficient, remember that it is
running
at the 4x rate (you must filter each sample even though you will throw 3/4
of
them away! The reason of course is the IIR feedback). Lastly, whereas
typically
you'd have to add more IIR stages to improve things, FIR design generally
require simpler tweaks (if the spec changes or you want to improve it, just
modify/lengthen the coefficients).
Hope this helps,
Nigel
Post by Simon Hill
Hello,
Using a motorola 56364 I have been upsampling a signal by x4 and low
pass
Post by Simon Hill
filtering to remove unwanted aliasing. Now if I use a 2nd order IIR
based
Post by Simon Hill
design when I downsample the output still has the aliasing present, but
using an FIR filter it is removed? Does anyone know why?
Cheers,
Simon
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
Laurent de Soras
2001-09-18 08:10:57 UTC
Permalink
Post by Simon Hill
Post by Nigel Redmon
the first halfing filter can cheat too, since the second will clean it up
anyway). "
How can the first filter cheat? Do you mean I can have a very loose repsonse
for the first filter (so it just interpolates) aslong as its above the
required freq as the second will low pass it anyway?
Suppose you have to downsample at 1:4. So the useful passband
is [0 ; Fs/8].

First halfband filter just needs to be flat in this passband
and to clean the [3*Fs/7 ; Fs/2] band, because it's the only
part of the spectrum wich would alias in the final passband
after decimation. So its frequency response would looks like :

^
|___
| `-.
| `-.
| `-.____
0---1---2---3---4-> Fs/8

(you need a typewritter-like font to see this ascii-art correctly)

After decimation, mirror effect of aliasing :

^
|___
| `-.
| `.
| .-''
0---1---2-> Fs/8

The second filter needs to be "perfect".

-- Laurent

==================================+========================
Laurent de Soras | Ohm Force
DSP developer & Software designer | Digital Audio Software
mailto:***@ohmforce.com | http://www.ohmforce.com
==================================+========================

dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/

Loading...