DSPRelated.com
Forums

filter bank question

Started by Peter August 14, 2011
I am trying to implement a filterbank where I can adjust the gain at a set 
of pre-defined center frequencies.

When I pass a sine signal through each filter and sum all the outputs I see 
a lot of spikes in the FFT plot of the final output.

How do I avoid that?



Peter wrote:
> I am trying to implement a filterbank where I can adjust the gain at a > set of pre-defined center frequencies. > > When I pass a sine signal through each filter and sum all the outputs I > see a lot of spikes in the FFT plot of the final output. > > How do I avoid that? >
First question - do all "banks" have identical latency/delay ? Then - what happens at intersections of pass &/or stop bands? P.S. I've been declared "STUPIDENT" by a juvenile of the forum
On Aug 14, 2:19&#4294967295;pm, "Peter" <pe...@xyzinvalid.com> wrote:
> I am trying to implement a filterbank where I can adjust the gain at a set > of pre-defined center frequencies. > > When I pass a sine signal through each filter and sum all the outputs I see > a lot of spikes in the FFT plot of the final output. > > How do I avoid that?
Discontinuities on the output suggest that you are not handling circular convolution effects properly. Read up on "overlap save" and "overlap add".
On Aug 14, 2:19&#4294967295;pm, "Peter" <pe...@xyzinvalid.com> wrote:
> I am trying to implement a filterbank where I can adjust the gain at a set > of pre-defined center frequencies. > > When I pass a sine signal through each filter and sum all the outputs I see > a lot of spikes in the FFT plot of the final output. > > How do I avoid that?
"I an trying to cook eggs, but the yolks break. What am I doing wrong?" Yeah, right! Tell us the details of _how_ you build your filter bank and maybe you can get some real help. Jerry -- Engineering is the art of making what you want from things you can get.
>"I an trying to cook eggs, but the yolks break. What am I doing >wrong?" Yeah, right! Tell us the details of _how_ you build your >filter bank and maybe you can get some real help.
Define filter j where j = 1,2,3,....,N as Wo = peakFrequency*pi/(samplingFrequency/2); BW = (peakBandWidth/samplingFrequency)*pi/(1/2); Ab = 3.01029995663981; % 3-dB width Gb = 10^(-Ab/20); beta = (Gb/sqrt(1-Gb.^2))*tan(BW/2); gain = 1/(1+beta); NumCoeff = (10^(peakdBGain/20)).*(1-gain)*[1 0 -1]; DenCoeff = [1 -2*gain*cos(Wo) (2*gain-1)]; where NumCoeff is the numerator coefficients and DenCoeff is the denominator coefficients of the filter. Define an input signal x as: x = sin(2.*pi.*fc.*t) where t is (0:1/samplingFrequency:1) Send x through each of the N filters Sum up the outputs to produce y. Calculate the power spectrum P of y. I see a lot of spikes in P Why?
I assume you wonder why you don't get a flat magnitude response. If you
don't downsample or apply a gain to the output of the filters then your
filters should be designed such that they obey the an allpass property.

I suggest you try to start with 2 filters H1(z) and H2(z) (it seems your
filters are biquads). Then in matlab or doing it on paper you can calculate
|H1(z)+H2(z)| and see if you get unity. 

>I assume you wonder why you don't get a flat magnitude response. If you > don't downsample or apply a gain to the output of the filters then your > filters should be designed such that they obey the an allpass property. >
Could you tell me what the purpose of downsampling is?
> > >>I assume you wonder why you don't get a flat magnitude response. If you >> don't downsample or apply a gain to the output of the filters then your >> filters should be designed such that they obey the an allpass property. >> > >Could you tell me what the purpose of downsampling is? > >
Reduce MIPS. Normally, you don't want to have fullrate subbands.
On Aug 15, 7:05&#4294967295;am, "Peter" <pe...@xyzinvalid.com> wrote:
> >"I an trying to cook eggs, but the yolks break. What am I doing > >wrong?" Yeah, right! Tell us the details of _how_ you build your > >filter bank and maybe you can get some real help. > > Define filter j where j = 1,2,3,....,N as > > Wo &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;= peakFrequency*pi/(samplingFrequency/2); > BW &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;= (peakBandWidth/samplingFrequency)*pi/(1/2); > Ab &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;= 3.01029995663981; % 3-dB width > Gb &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;= 10^(-Ab/20); > beta &#4294967295; &#4294967295; &#4294967295; &#4294967295;= (Gb/sqrt(1-Gb.^2))*tan(BW/2); > gain &#4294967295; &#4294967295; &#4294967295; &#4294967295;= 1/(1+beta); > NumCoeff &#4294967295; &#4294967295;= (10^(peakdBGain/20)).*(1-gain)*[1 0 -1]; > DenCoeff &#4294967295; &#4294967295;= [1 -2*gain*cos(Wo) (2*gain-1)]; > > where NumCoeff is the numerator coefficients and DenCoeff is the denominator > coefficients of the filter. > > Define an input signal x as: > > x = sin(2.*pi.*fc.*t) > > where t is (0:1/samplingFrequency:1) > > Send x through each of the N filters > > Sum up the outputs to produce y. > > Calculate the power spectrum P of y. > > I see a lot of spikes in P > > Why?
The sum of two signals of the same frequency depends not only on their amplitudes, but also on their phases. The defect you see are are caused by phase shifts that you have been ignoring. Jerry -- Engineering is the art of making what you want from things you can get.

>The sum of two signals of the same frequency depends not only on their >amplitudes, but also on their phases. The defect you see are are >caused by phase shifts that you have been ignoring.
Thanks Jerry, How should I take care of this so it's not ignored?