# Methods to evaluate the quality of an IIR Filter fixed-point implementation

I'm implementing a scattered look-ahead IIR filter in Matlab/VHDL, basically I convert an order-2 IIR filter into an order-4 IIR in order to take advantage of the pipelining of an FPGA. (reference http://people.ece.umn.edu/users/parhi/SLIDES/chap10.pdf)

Anyway, I'm trying to evaluate how many bits I need in every stage and I was wondering if there is a metric to evaluate the "quality" of the quantization.

For example an error of 0.1% in the transient of a step response doesn't matter much but a a neverending limit cycle of 0.1% after the transient would be a problem.

I was thinking of using a metric like m = error^2 * n

where error is the difference between the reference double implementation and my fixed-point implementation and "n" is the sample number so an error at sample 100 would weigh more than error at sample 1.

I would need to balance quantization errors with FPGA resources and FPGA speed of course.

Are there other metrics? Am I on the right track?

• You could also look at the effects of quantizing the coefficients. If you aren't using some very conservative scaling strategy you could also look at the possibility of overflowing the internal states or output. You could also look at the 'shape' of the quantization noise (its spectrum) so instead of just computing the broadband error then compute a frequency dependent SNR. Sometimes it is also interesting to analyze the behavior of the filter when modulating the coefficients. Aug 22, 2019 at 5:38