Hello everyone, I would like to confirm that even with a large number of coefficients it is not possible to make a Halfband filter with narrow transition bandwidth? Ex.: Fpass=7MHz(-1dB tolerated), Fstop=8.125MHz with Astop=80dB using Fsampling = 32.5 MHz I tried a few software tools and I couldn't calculate this filter. It seems to me that I have to make it using a polyphase FIR. My goal was to use Halfband in order to minimize FPGA ressources! Best regards, JF This message was sent using the Comp.DSP web interface on www.DSPRelated.com

# Halfband filter True or false?

Started by ●March 8, 2005

Reply by ●March 8, 20052005-03-08

in article Kr6dnfRfTtopZbDfRVn-sw@giganews.com, jfgagne at jfgagne@amphitech.com wrote on 03/08/2005 14:10:> I would like to confirm that even with a large number of coefficients it > is not possible to make a Halfband filter with narrow transition > bandwidth?as far as i understand, there is no reason for this to be true. the only thing that must be true for Halfband filters is the symmetry: H(e^(pi-w)) = H0 - H(e^jw) for some constant H0, which has the consequence that H(e^j(pi/2)) = H0/2> Ex.: Fpass=7MHz(-1dB tolerated), Fstop=8.125MHz with Astop=80dB > using Fsampling = 32.5 MHzif i get a few minutes i'll try this with MATLAB, but that Astop means that the ripple in the passband will be ultrasmall. gonna be a lot of terms, even if half of them are zero. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."

Reply by ●March 8, 20052005-03-08

jfgagne wrote:> Hello everyone, > > I would like to confirm that even with a large number of coefficients it > is not possible to make a Halfband filter with narrow transition > bandwidth?Narrow? Yes. Zero? No.> Ex.: Fpass=7MHz(-1dB tolerated), Fstop=8.125MHz with Astop=80dB > using Fsampling = 32.5 MHz

Reply by ●March 8, 20052005-03-08

in article BE5373D9.5131%rbj@audioimagination.com, robert bristow-johnson at rbj@audioimagination.com wrote on 03/08/2005 15:23:> in article Kr6dnfRfTtopZbDfRVn-sw@giganews.com, jfgagne at > jfgagne@amphitech.com wrote on 03/08/2005 14:10: > >> I would like to confirm that even with a large number of coefficients it >> is not possible to make a Halfband filter with narrow transition >> bandwidth? > > as far as i understand, there is no reason for this to be true. the only > thing that must be true for Halfband filters is the symmetry: > > H(e^(pi-w)) = H0 - H(e^jw)i meant to type: H(e^j(pi-w)) = H0 - H(e^jw)> > for some constant H0, which has the consequence that > > H(e^j(pi/2)) = H0/2 > >> Ex.: Fpass=7MHz(-1dB tolerated), Fstop=8.125MHz with Astop=80dB >> using Fsampling = 32.5 MHzokay, when i looked at this, i saw that you imposed a restriction that is incompatible with halfband filters: the Fstop is always Fsampling/2 - Fpass. at 8.125 Mhz, you can only have an attenuation of 6.02 dB. you have no other choice for a halfband. when i changed Fstop = 16.25 - 7 = 9.25 Mhz, then i came up with a very nice halfband of 67 taps of which 33 taps were zero as should be the case for a halfband. if you have MATLAB, i'll send you (or anyone else who asks) the script. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."

Reply by ●March 8, 20052005-03-08

"jfgagne" <jfgagne@amphitech.com> wrote in message news:Kr6dnfRfTtopZbDfRVn-sw@giganews.com...> Hello everyone, > > I would like to confirm that even with a large number of coefficients it > is not possible to make a Halfband filter with narrow transition > bandwidth? > Ex.: Fpass=7MHz(-1dB tolerated), Fstop=8.125MHz with Astop=80dB > using Fsampling = 32.5 MHzWell, given your specifications, fs/4 = 8.125. One of the design criteria for a half band filter is symmetry around fs/4. In your case, you want Fstop = fs/4 which will prevent you from achieving this symmetry. So no - you cannot get a halfband filter out of this. I haven't really played around with your design criteria using Matlab, but I'm pretty sure I'm right. That said, I see no reason why you need to abandon a halfband filter given your final specs. Go ahead and use a halfband filter (it won't quite meet your specs). Use another FIR filter to give you the final transition BW and stop band specs that you need. This is of course useless if you have no decimation as part of your design (since you'll end up running your second FIR at the input sample rate and you might as well design everything into one filter if that's the case). Cheers Bhaskar> I tried a few software tools and I couldn't calculate this filter. It > seems to me that I have to make it using a polyphase FIR. > > My goal was to use Halfband in order to minimize FPGA ressources! > > Best regards, > > JF > > > > This message was sent using the Comp.DSP web interface on > www.DSPRelated.com

Reply by ●March 8, 20052005-03-08

jfgagne wrote: ...> Ex.: Fpass=7MHz(-1dB tolerated), Fstop=8.125MHz with Astop=80dB > using Fsampling = 32.5 MHzThat's almost but not quite a half-band filter. The response of a half-band filter is symmetrical about 1/4 of the sampling frequency. The number of taps should be 4k-1, and the more taps, the sharper the cut-off. Except for the center tap, alternate taps are zero. You need either an optimizing routine that adheres to that constraint, or a windowed sinc design. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Reply by ●March 8, 20052005-03-08

Reply by ●March 9, 20052005-03-09

Hello, for generating halfband filter of order n , I use the "firls" optimisaton routine from Matlab : b = firls( n, [0 0.5 0.5 1], [1 1 0 0]) Jerry, i am curious about the other method that you called : "windowed sinc design. " could you please explain it to us ? Julien

Reply by ●March 9, 20052005-03-09

The inverse DFT of a brick wall filter is a sinc function. Unfortunately this exists for all time so it's tricky to make a filter from it. You can window the sinc function to limit it to a certain time period, depending on how many taps you want. This gives you an approximation to a brick wall filter. I wouldn't use this method, I like that Parks McCellan thingy. Cheers, Syms. "Julien" <jeyries@hotmail.fr> wrote in message news:1110355461.341878.273560@g14g2000cwa.googlegroups.com...> Hello, > > for generating halfband filter of order n , I use the "firls" > optimisaton routine from Matlab : > > b = firls( n, [0 0.5 0.5 1], [1 1 0 0]) > > Jerry, i am curious about the other method that you called : "windowed > sinc design. " > could you please explain it to us ? > > > Julien >

Reply by ●March 9, 20052005-03-09

in article 1110355461.341878.273560@g14g2000cwa.googlegroups.com, Julien at jeyries@hotmail.fr wrote on 03/09/2005 03:04:> for generating halfband filter of order n , I use the "firls" > optimisaton routine from Matlab : > > h = firls(N-1, [0 0.5 0.5 1], [1 1 0 0])N = number of taps. for halfband N = 4*ceil(N/4) - 1 shouldn't there be a weighting vector of half the length of the frequency and magnitude vectors? as in h = firls(N-1, [0 0.5 0.5 1], [1 1 0 0], [1 1]); also there should be a little space in the transition band. epsilon = 1e-2; h = firls(N-1, [0 0.5-epsilon 0.5+epsilon 1], [1 1 0 0], [1 1]); and for Parks-McClellan h = remez(N-1, [0 0.5-epsilon 0.5+epsilon 1], [1 1 0 0], [1 1]);> Jerry, i am curious about the other method that you called : "windowed > sinc design. " > could you please explain it to us ?fir a halfband LPF: SBA = 80; (stop band attenuation in dB) t = linspace(-(N-1)/4, (N-1)/4, N); h = (0.5*sinc(t)) .* kaiser(N, 0.1102*(SBA-8.7))'; % kaiser windowed sinc() clear t; try that. i'll let Jerry explain the principles. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."