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?
filter bank question
Started by ●August 14, 2011
Reply by ●August 14, 20112011-08-14
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
Reply by ●August 14, 20112011-08-14
On Aug 14, 2:19�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".
Reply by ●August 15, 20112011-08-15
On Aug 14, 2:19�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.
Reply by ●August 15, 20112011-08-15
>"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?
Reply by ●August 15, 20112011-08-15
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.
Reply by ●August 15, 20112011-08-15
>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?
Reply by ●August 15, 20112011-08-15
> > >>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.
Reply by ●August 15, 20112011-08-15
On Aug 15, 7:05�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 � � � � �= 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?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.
Reply by ●August 15, 20112011-08-15






