"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 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!JF, You got some good responses and perhaps some good private correspondence as well. In order to minimize FPGA resources I've built "halfband" filters using sums of powers of two coefficients. So, no multiplies, just shifts and adds. Ours were relatively short filters for video and there may be things in the FPGAs today that make multiplies cheaper... We simply started with halfband filter coefficients and quantized them. The center coefficient was always 0.5 or 1.0 (so no quantization) and we went from there accepting the errors in filter response that quantization caused. Of course, these filters were halfband exactly by definition*. And, one of the advantages is that almost half of the coefficients are zero and they are symmetric. *If you are wondering why that would be the case: Every pair of coefficients equidistant from the center of the filter provides an odd cosine term in the frequency response. All of these are zero at fs/4. Imagine the filter response F' without the center coefficient (which provides a constant term in frequency). Then the filter is antisymmetric around zero and fs/4 (it goes negative at fs/4 and goes positive again at 3fs/4 and looks like a zero-average "square wave" in frequency). The frequency response at f=0 is the sum of the coefficients. So F'(0) is the sum of the coefficients yeilding F'. If the constant coefficient is added that is equal to the sum of the other coefficients then it "raises" the frequency response by F'(0) so that the new response F(0) is 2*F'(0) and the response at fs/4 is F'(0) and the response at fs/2 is -F(fs/2) = [F'(0) + F'(0)] = 0 which is a nice way to define a halfband filter. Note that it isn't necessary that F(fs/2) be exactly zero. In fact, in minimax design it would be normal for the value at f=0 to be not 1.0 (if that is the passband criterion) but equal to one of the peaks of the error. Then, if the filter is antisymmetric as it should be, the value at fs/2 will be away from zero by the same amount. So, the process mentioned above doesn't generate the very best minimax filter - only a pretty good minimax filter because the end points are unecessarily constrained. A better minimax design will result if we allow the response at f=0 to differ from the desired response. Fred