Hi All I need to interpolate a signal by 2. I am using a half band filter with 15 taps. What is the best implementation of this filter in order to minimize the number of multiplications and additions. Regards Tom
half band filter
Started by ●November 28, 2006
Reply by ●November 28, 20062006-11-28
> I need to interpolate a signal by 2. I am using a half band filter with 15 > taps. What is the best implementation of this filter in order to minimize > the number of multiplications and additions.Since you're interpolating the signal, your first step will be to upsample by inserting a zero between each sample that you have. When filtering the data, you can then take advantage of the fact that every other sample is zero and prevent doing needless multiplications and additions with the zeros. I can't find a decent link explaining this, but most practical DSP texts would describe this approach. Jason
Reply by ●November 28, 20062006-11-28
I forgot to note in my previous message: this implementation method is called "polyphase" FIR filtering. Jason
Reply by ●November 28, 20062006-11-28
Tom wrote:> Hi All > > I need to interpolate a signal by 2. I am using a half band filter with 15 > taps. What is the best implementation of this filter in order to minimize > the number of multiplications and additions. > > Regards > > Tom > >An efficient way to proceed in the general case for a filter of length N is to split the filtering up into two MAC loops. The first loop multiplies N/2 samples of data with the even taps to get the first output. The second loop multiplies the same N/2 samples of data with the odd taps to get the second output. I suspect that there is a better way for the halfband case. I'm sure somebody will chime in. John
Reply by ●November 28, 20062006-11-28
Is your signal sufficiently bandlimited already so that a halfband filter makes sense to use? Dirk Tom wrote:> Hi All > > I need to interpolate a signal by 2. I am using a half band filter with 15 > taps. What is the best implementation of this filter in order to minimize > the number of multiplications and additions. > > Regards > > Tom
Reply by ●November 28, 20062006-11-28
"dbell" <bellda2005@cox.net> wrote in message news:1164735419.913767.96610@n67g2000cwd.googlegroups.com...> Is your signal sufficiently bandlimited already so that a halfband > filter makes sense to use? > > Dirk >Dirk, Doesn't need to be ... that's really the point of a halfband filter. Of course, this assumes that you have an OK sampled signal in the first place. First you double the sample rate by stuffing zeros. This really has no affect on the spectrum except now you naturally "look at" two periods of it. Then, you filter at that higher rate to get rid of the energy surrounding the old fs aka the new fs/2. Fred
Reply by ●November 28, 20062006-11-28
Fred, Sure it does. Otherwise, if there is signal near the original fs/2, there will be imaged signal near the new fs/4. The transition band may be fairly wide; these filters are good in the passband, good in the stopband, and not very good in the transition band. Definitely not suitable for general bandlimiting. For best results, the input signal bandwidth should be contained in the passband of the halfband filter defined at the new rate, so the image created by the zero padding falls in the stopband. You usually bandlimit before interpolating with a halfband filter or series of them, and bandlimit after decimating with a halfband filter or series of them. Dirk Fred Marshall wrote:> "dbell" <bellda2005@cox.net> wrote in message > news:1164735419.913767.96610@n67g2000cwd.googlegroups.com... > > Is your signal sufficiently bandlimited already so that a halfband > > filter makes sense to use? > > > > Dirk > > > > Dirk, > > Doesn't need to be ... that's really the point of a halfband filter. > Of course, this assumes that you have an OK sampled signal in the first > place. > First you double the sample rate by stuffing zeros. This really has no > affect on the spectrum except now you naturally "look at" two periods of it. > Then, you filter at that higher rate to get rid of the energy surrounding > the old fs aka the new fs/2. > > Fred
Reply by ●November 28, 20062006-11-28
"dbell" <bellda2005@cox.net> wrote in message news:1164747514.516409.64410@80g2000cwy.googlegroups.com...> Fred, > > Sure it does. Otherwise, if there is signal near the original fs/2, > there will be imaged signal near the new fs/4. The transition band may > be fairly wide; these filters are good in the passband, good in the > stopband, and not very good in the transition band. Definitely not > suitable for general bandlimiting. For best results, the input signal > bandwidth should be contained in the passband of the halfband filter > defined at the new rate, so the image created by the zero padding falls > in the stopband. > > You usually bandlimit before interpolating with a halfband filter or > series of them, and bandlimit after decimating with a halfband filter > or series of them. > > DirkDirk, You're correct. I should have known you would be! Fred
Reply by ●November 29, 20062006-11-29
cincydsp@gmail.com wrote:> > I need to interpolate a signal by 2. I am using a half band filter with 15 > > taps. What is the best implementation of this filter in order to minimize > > the number of multiplications and additions.since the OP is using a half-band filter, the OP already has eliminated nearly half of the multiplications. (every other sample of the impulse response of a half-band is zero, except for the one at the center.)> Since you're interpolating the signal, your first step will be to > upsample by inserting a zero between each sample that you have. When > filtering the data, you can then take advantage of the fact that every > other sample is zero and prevent doing needless multiplications and > additions with the zeros.then you also don't need to bother sticking in those extraneous zeros. we do that *conceptually*, but since we actually avoid multiplying by them in the convolution summation, we don't *actually* bother to stick them in.> I can't find a decent link explaining this,maybe http://ccrma-www.stanford.edu/~jos/resample/ r b-j
Reply by ●November 29, 20062006-11-29
cincydsp@gmail.com wrote:> I can't find a decent link explaining this, > but most practical DSP texts would describe this approach.This is a pretty good treatment of the topic. http://www.dspguru.com/info/faqs/mrfaq.htm -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536 Build a man a fire and he is warm for a day. Set a man on fire and he is warm for the rest of his life.






