HI EVEYONE.I am trying to implement iir filter on c6713.MY Signal has a
bandwidth of 150hz.The minimum sampling rate of c6713 is 8khz.I need to sample
at 1khz.This means i have to downsample it.
My code is interrupt based.What i want to ask is whether i will downsample
before or after filtering.Any sample code regarding downsampling would be of
great help.
Any response in this regard would be of great help.
Thanks .
wajahat.
downsampling in c6713
Started by ●December 26, 2006
Reply by ●December 27, 20062006-12-27
Wajahat-
> HI EVEYONE.I am trying to implement iir filter on c6713.MY Signal has a bandwidth of 150hz.The minimum sampling rate
> of c6713 is 8khz.I need to sample at 1khz.This means i have to downsample it.
> My code is interrupt based.What i want to ask is whether i will downsample before or after filtering.Any sample code
> regarding downsampling would be of great help.
First apply FIR lowpass filter (maybe something like 450 Hz cutoff frequency), then decimate (take every 8th sample).
One of the tradeoffs is that the closer you want the cutoff to be ideal 500 Hz, the sharper the FIR filter rolloff and
more the number of FIR filter taps. More filter taps means less real-time processing for other algorithms and more
signal delay.
-Jeff
> HI EVEYONE.I am trying to implement iir filter on c6713.MY Signal has a bandwidth of 150hz.The minimum sampling rate
> of c6713 is 8khz.I need to sample at 1khz.This means i have to downsample it.
> My code is interrupt based.What i want to ask is whether i will downsample before or after filtering.Any sample code
> regarding downsampling would be of great help.
First apply FIR lowpass filter (maybe something like 450 Hz cutoff frequency), then decimate (take every 8th sample).
One of the tradeoffs is that the closer you want the cutoff to be ideal 500 Hz, the sharper the FIR filter rolloff and
more the number of FIR filter taps. More filter taps means less real-time processing for other algorithms and more
signal delay.
-Jeff
Reply by ●January 15, 20072007-01-15
You need do do the filtering prior to downsampling to avoid aliasing. Be sure to
have a good filtering in the stopband region (or above the Nyquist rate fc/2).
If you want to reduce computation you can use multirate techniques but they are
easily applicable only to fir filters. They make it possible to invert the
operations of filtering and downsampling (via poliphase decomposition) so the
filter operates at the low sampling rate. If speed is not a problem use an iir
lowpass filter followed by a decimator if phase distortion is allowed, otherwise
use a linear phase fir(higher cost).