10

I am implementing an IIR filter in an embedded device based on ARM. It is implemented as a cascaded biquad structure (series of second order filters put back to back). The filter can be considered stable as all the second order sections in the cascaded structure have their poles and zeros inside the unit circle(ROC) in the Z-domain.

Now, given that the filter is asymptotically stable and its output can't grow unboundedly, how to know the maximum output that the filter can grow to, asssuming that the input to the filter can be any noise or any random waveform?

On the device, the filter is implemented with floats, which reduces the chance of any overflow during computation. But after the computation the results have to be stored into fixed points as it is required by the application to do so. Hence,it is very important to know the output limits to avoid any overflow and saturation while storing into fixed points.

I would like to know,if there is any way to estitmate what could be the maximum limits of the output,so as to avoid clipping or unnecessarily use more bits for the fixed point?

And also it would be useful to know which type of input waveforms could produce the worst output possible?

Simactricals
  • 121
  • 7

1 Answers1

12

I would like to know,if there is any way to estitmate what could be the maximum limits of the output

Yes. It's

$$y_{max} = x_{max} \cdot \sum_{n = 0}^{\infty} |h[n]| $$

I.e. the maximum gain is the absolute sum of the impulse response

which type of input waveforms could produce the worst output possible?

$$x_{worst}[n] = x_{max} \cdot \text{sign}(h[-n])$$

It's the signum function of the time-flipped impulse response. In most cases this is an extremely unlikely signal to occur in the real world so it's overly conservative to assume worst case scaling. A different approach would be to do a statistical analysis of "real world" signals plus some sine waves, square waves and noise signals.

Hilmar
  • 44,604
  • 1
  • 32
  • 63
  • Then I misunderstood. I thought it's about float <-> int conversion. – a concerned citizen Mar 10 '22 at 16:45
  • I think you do not necessarily have an a priori knowledge of what $x_{\rm max}$ is. – Gilles Mar 10 '22 at 22:48
  • x_max is actually known already. The input is bound and so is the output of the filter. But the problem is to know the highest output the filter will produce from our input which is basically in the range [4 -4]. Will the output grow more than the input. If so by how much? – Simactricals Mar 11 '22 at 03:44
  • Okay, then my comment doesn’t apply. – Gilles Mar 11 '22 at 06:01