FIR filter o/p width

Hai,

Is there any formula or general rule to set output width of FIR filter given its input ,coefficients width and number of taps.??

I red in some data sheet of FIR filter deisgn as: output width = input width+coefficient width+logN(base 2)

In some other data sheet of FIR filter deisgn as: output width = 2*input width+logN(base 2)

which of the above is correct??pls give some link for refernce doc explaining the general rule to set o/p width..

regards, faz

Reply to
fazulu deen
Loading thread data ...

Go do the sums...

That looks right. Each product (input*coeff) gives a width of (input bits) + (coeff bits). Assuming all your coefficients have that same width, your maximum output value cannot exceed N*(max_input*max_coeff), so giving a bit growth of ceiling(log2(N)) over the output width of each multiplier. Early stages in the pipeline obviously can use narrower words.

In the systolic form (input fed to all multipliers simultaneously) and assuming coefficient widths are the same for all taps, the sum's bit growth at each tap is:

tap# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17... bits 0 1 2 2 3 3 3 3 4 4 4 4 4 4 4 4 5...

Looks like someone's assuming the coefficients and input are the same width, doesn't it?

FIR filters are really rather easy to reason about. At each step you can easily pre-calculate the largest possible numeric value that can be seen. You may be able to use knowledge of the input stream to set even tighter bounds on bit width, but the benefit is rarely worth the hassle.

IIR filters, of course, are much harder.

Try comp.dsp where there is some very heavy-duty filter expertise. (There's plenty of filter expertise here too, mind you!)

--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
 Click to see the full signature
Reply to
Jonathan Bromley

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.