FPGARelated.com
Forums

IIR filter bus width

Started by if.raso May 19, 2015
Hello!
I'm having trouble with 4th order butterworth filter. I'm using two
cascade biquads in direct form I because it should be more reliable on
fixed point designs, as mine is.
My input signal is 16-bit wide and so the output should be.
My question is: how wide should the coefficients be in terms of bit?
Also I'm not very confident with the bus width between adders and
multipliers.
Should I consider only the most significant bits?

- Fabio


---------------------------------------
Posted through http://www.FPGARelated.com
On Tue, 19 May 2015 10:40:24 -0500, if.raso wrote:

> Hello! > I'm having trouble with 4th order butterworth filter. I'm using two > cascade biquads in direct form I because it should be more reliable on > fixed point designs, as mine is.
If you mean numerically stable, splitting your IIR filter into 2nd- and 1st-order sections is something you should just do, always, except when you want to demonstrate to someone why not splitting an IIR is a _bad_ idea.
> My input signal is 16-bit wide and so the output should be. > My question is: how wide should the coefficients be in terms of bit?
It depends on how close the poles and zeros are to z = 1 (strictly, how close they are to the unit circle, i.e. |z| = 1). The closer they get, the more your filter response will vary with varying coefficient values. The best way to do this is to just check directly: calculate your theoretical coefficient values, then truncate the coefficients, then recalculate either the response of the filter or it's pole and zero locations. If what you end up with given your truncated coefficients is suitable -- run with it.
> Also I'm not very confident with the bus width between adders and > multipliers. > Should I consider only the most significant bits?
I'm not sure what you mean about considering only the most significant bits. You can calculate the sensitivity of the filter to quantization noise at each point where truncation (or rounding) happens, and use that as a guide. An easier rule of thumb is, for both the poles and zeros for each filter, find the distance |1 - a|, and pick the smaller of the two (it'll always be the pole, unless you've got a really odd filter). You need, roughly, enough bits to accurately represent that distance squared, plus your input data width. So if |1 - a| = 1/256 and you've got 16 bits coming in, you need 32 bit data paths. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com