Hello, I wanted to understand the effects of decimating a low pass fir filter coefficients.>From what I remember about designing a lowpass fir filter:If the filter was design for a cutoff fc of 100 Hz with a 1000 Hz sample rate and the data was fed into the fir filter at a 2000 Hz sample rate the cutoff fc would be 200 Hz. Now if we take the same filter and decimate the coefficients by a factor of 2 and the input data is also decimated by 2 for 500 Hz sample rate, would the filter be the same as a filter designed for 500 Hz sample rate. Would fc change to 50 Hz? What I'm trying to figure out is what effect does decimating the input data and the filter coefficients by the same amount have. Thanks! for any insight.
decimation of filter coefficients
Started by ●October 17, 2005
Reply by ●October 17, 20052005-10-17
dano wrote:> Hello, > I wanted to understand the effects of decimating a low pass fir filter > coefficients. >>From what I remember about designing a lowpass fir filter: > If the filter was design for a cutoff fc of 100 Hz with a 1000 Hz > sample rate > and the data was fed into the fir filter at a 2000 Hz sample rate the > cutoff fc would be 200 Hz. > Now if we take the same filter and decimate the coefficients by a > factor of 2 and the input data is also decimated by 2 for 500 Hz > sample rate, would the filter be the same as a filter designed for 500 > Hz sample rate. Would fc change to 50 Hz? > > What I'm trying to figure out is what effect does decimating the input > data and the filter coefficients by the same amount have.I know how to decimate a signal. What does it mean to decimate coefficients? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 17, 20052005-10-17
Apply the same decimation process to the filter coefficients h(k) as you would to decimate x(n), (sampled data).
Reply by ●October 17, 20052005-10-17
"dano" <dlang@prodigy.net> wrote in message news:1129571522.504850.116250@g43g2000cwa.googlegroups.com...> Hello, > I wanted to understand the effects of decimating a low pass fir filter > coefficients. >>From what I remember about designing a lowpass fir filter: > If the filter was design for a cutoff fc of 100 Hz with a 1000 Hz > sample rate > and the data was fed into the fir filter at a 2000 Hz sample rate the > cutoff fc would be 200 Hz. > Now if we take the same filter and decimate the coefficients by a > factor of 2 and the input data is also decimated by 2 for 500 Hz > sample rate, would the filter be the same as a filter designed for 500 > Hz sample rate. Would fc change to 50 Hz? > > What I'm trying to figure out is what effect does decimating the input > data and the filter coefficients by the same amount have. > > Thanks! for any insight.I like to do things like this with "cartoons" of Fourier Transform pairs.> If the filter was design for a cutoff fc of 100 Hz with a 1000 Hz > sample rateFilter unit sample response <-> Filter frequency response [something like a sinc] <-> [Fs=1000; Fs/2=500; cutoff=100=0.2*Fs/2]>and the data was fed into the fir filter at a 2000 Hz sample rate the > cutoff fc would be 200 Hz.Now ... this takes some interpretation. Either you're saying that you take the original data and the original filter and just assume that the sample rate has changed. In this case, there is no change in what happens because the time base is arbitrary. or... You're saying that you take the original data, assume that it's on a time base with Fs=2000Hz and pump it into a filter with delays=1msec or "sample rate" = 1000Hz. I think that's what you mean, eh? So, you have data that was bandlimited to below 500Hz and sampled at 1000Hz. Then you simply reduce the distance between samples to 0.5msec / increase the sample rate to 2000Hz. **Sampled data at 1000Hz <-> Signal spectrum nonzero below 500Hz and above 1000-500Hz. To increase the sample rate of the data, just change the time base and the frequency base accordingly: **Sampled data at 2000Hz <-> Signal spectrum nonzero below 1000Hz and above 2000-1000Hz. I think this covers your first assertion. Now, decimate the original filter - assuming that the sample rate remains at the original 1000Hz. To do this, multiply the filter with a 500Hz unit sample sequence aligned as you wish: **Filter sinc-like unit sample response at 1000Hz <-> lowpass filter 100Hz multiply by: convolve with: **500Hz sequence of unit samples such that <-> 500Hz Fs at -1000, -500, 0, 500, 1000 the center of the original filter is caught results in: results in: **Filter decimated by 2. Filter response repeated at 500Hz intervals So, no, the filter response doesn't compress from 100Hz to 50Hz. If you apply the decimated filter to data sampled at 1000Hz, using the original time base, then there may be spectral content around 500Hz which may not be what you want. If you want to compress the filter response from 100Hz to 50Hz, then you need to make the filter coefficient "sinc" shape wider by a factor of 2 - plus or minus any adjustments for better response. You *might* thin of doing this by stuffing zeros in the filter response but keeping the resulting time intervals the same as you started with. This stretches the sinc. You might conceptually do this as follows: **Original filter at 1000Hz <-> 100Hz cutoff. To widen the unit sample response of the filter, change the time base and the frequency base accordingly: **Orignal filter at 500Hz zero-stuffed by 2 so delays are at <-> Cutoff at 50Hz 1000Hz. All very nice and handy but it doesn't work because the original filter at 500Hz repeats at 500Hz intervals. So, zero-stuffing it to 1000Hz doesn't get rid of the frequency terms at 500Hz - in fact, it doesn't change the frequency response at all - it just changes the *perceived* time base. Again, with the "cartoons" in words: **Original filter at 1000Hz <-> 100Hz cutoff. Change the time base: **Orignal filter at 500Hz <-> 50Hz cutoff. Stuff in time with zeros: multiply by 1msec unit samples convolve with 1000Hz **New filter at 1000Hz <-> 50Hz lowpass, 450Hz highpass really no change here..... So, you need to lowpass the filter in order to get rid of the highpass band. Probably better to redesign the filter! Or, maybe look at halfband filters. Fred
Reply by ●October 17, 20052005-10-17
dano wrote:> Apply the same decimation process to the filter coefficients h(k) as > you would to decimate x(n), (sampled data). >If I start with a 12-tap filter and decimate by 2, do I get a 6-tap filter? What kind of signal does it work on? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 17, 20052005-10-17
Hi Fred, Sorry for the confusion. My question has multiple parts and I think answered most of the parts. Here's what I want to find out: 1. If I decimate the filter coeff., does fc stay the same but the response repeats at the new decimated sample rate (500 Hz)? Is this the same as designing a new lowpass filter with the same fc but with a 500Hz sample rate? 2. What would the effect be of decimating the input data to the same 500 hz rate that the filter has been decimated to? Would it be the same as designing a lowpass filter with the same fc but with a 500 Hz sample rate and filtering decimated data with a 500 Hz rate? Probably sounds confusing. I was trying to understand what would happen if I took a lowpass filter and decimated it's coefficients and if I decimated it's input data sample rate.I hope this helps. Thanks again!
Reply by ●October 17, 20052005-10-17
"dano" <dlang@prodigy.net> wrote in message news:1129576881.514309.122610@g47g2000cwa.googlegroups.com...> Hi Fred, > Sorry for the confusion. My question has multiple parts and I think > answered most of the parts. Here's what I want to find out: > > 1. If I decimate the filter coeff., does fc stay the same but the > response repeats at the new decimated sample rate (500 Hz)? Is this > the same as designing a new lowpass filter with the same fc but with a > 500Hz sample rate? > > 2. What would the effect be of decimating the input data to the same > 500 hz rate that the filter has been decimated to? Would it be the same > as designing a lowpass filter with the same fc but with a 500 Hz sample > rate and filtering decimated data with a 500 Hz rate? > > Probably sounds confusing. I was trying to understand what would happen > if I took a lowpass filter and decimated it's coefficients and if I > decimated it's input data sample rate.I hope this helps. >To "decimate" means to "remove" and not to simply change the time base. If a filter is decimated, it changes the filter. If a filter is stretched and zero-stuffed, it changes the filter delays relative to the sample rate. By decimating the "input data sample rate", I'm not sure I know if you mean: a) decimate the data by removing samples b) time stretch/time compress the data by changing the time base. The latter does nothing except change *your* frame of reference. I think my last post covered all the pertinent examples. Fred
Reply by ●October 17, 20052005-10-17
Fred Marshall wrote: ...> Now, decimate the original filter - assuming that the sample rate remains at > the original 1000Hz.... What does decimating a filter mean? Suppose I ask you to decimate a symmetric FIR with coefficients of 1/64{1, 6, 15, 20, 15, 6, 1} by 2. What will the result be? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 17, 20052005-10-17
Decimation = throwing away samples. I was curious how decimation effects an individual channel or sub filter of a polyphase channel bank. In a channel bank the input to each sub-filter or channel is decimated and the subfilter is a decimation of the prototype filter which is converted to bandpass by modulation. So my question was what does the decimation do to the subfilter's fc and how is it impacted by the input data also being decimated by the same amount. Thanks again!
Reply by ●October 17, 20052005-10-17
"dano" <dlang@prodigy.net> wrote in message news:1129579035.512243.260270@f14g2000cwb.googlegroups.com...> Decimation = throwing away samples. > I was curious how decimation effects an individual channel or sub > filter of a polyphase channel bank. > In a channel bank the input to each sub-filter or channel is decimated > and the subfilter is a decimation of the prototype filter which is > converted to bandpass by modulation. So my question was what does the > decimation do to the subfilter's fc and how is it impacted by the input > data also being decimated by the same amount. >The way that I like to think of a polyphase filter is shown in Rick Lyon's book (that's where I learned to look at it that way!). There is really one filter but it has a lot of zero coefficients. So, at one instant there are some of the data samples being multiplied and added and at another instant a different set of data samples being multiplied and added, etc. So, if we break the filter up such that each sub-filter applies at only one time then we can look at it like this: For interpolation, all the inputs go to all the filters and the output samples are obtained by commutating between all the sub-filters. The input rate is lower than the commutation / output rate. For decimation, commutate the inputs over the filter inputs (thus the sample rate in each filter is lower) and take the sum of the output of all the filters at the lower sample rate. It's still one filter. "Polyphase" is an implementation detail. Fred






