1
$\begingroup$

I have a second order IIR filter with DC-notch-like characteristics:

$H(z) = \frac{1-2z^{-1} + z^{-2}}{1+a_1z^{-1}+a_2z^{-2}}$

where $a_1= -1.99396970948671$ and $a_2=0.994002716421032$.

The filter is to be implemented in Transposed Direct Form II using single precision floating point math. While the poles of the filter (under single precision floating point quantization of the coefficients) are still within the unit circle, more generally, how do I determine the stability of this filter implementation? I can simulate the filter with typical inputs to see if there's a problem, but, beyond that, I'm wondering if there is any kind of formal procedure for identifying stability issues.

$\endgroup$

1 Answer 1

2
$\begingroup$

With single precision float and Transposed Direct From II this will be stable. As long as you are using cascaded second order section, TDFII and check the quantized pole location, you will rarely have stability issues. However you may still have noise problems. As the pole approaches the unit circle you will see decreased SNR long before you see stability problems.

I can simulate the filter with typical inputs to see if there's a problem

That's typically the way to do it. You can easily check stability with using a unit impulse as an input. To determine the noise floor, you can use a few sine waves (below cross over, around cross over, above cross over). In order to properly calculate the TDH (Total harmonic distortion and noise), you need to remove the initial transient and make sure that the remaining signal has an integer number of periods inside the analysis window.

if there is any kind of formal procedure for identifying stability issues

There are both for stability and noise but they are complicated and somewhat tedious, so running the simulation is typically the better way to go.

$\endgroup$
4
  • $\begingroup$ I assume that the integer number of periods is to restrict the desired tone to a single FFT bin? $\endgroup$
    – rhz
    Commented Aug 6 at 14:47
  • $\begingroup$ @rhz that's correct. This makes the THD calculation very easy. Otherwise you have to deal with spectral leakage which has to distinguish from noise or distortion. $\endgroup$
    – Hilmar
    Commented Aug 6 at 18:36
  • $\begingroup$ I'll take the approach you've suggested. I am curious though: can you provide some references to the complicated and tedious formal procedures? $\endgroup$
    – rhz
    Commented Aug 6 at 19:00
  • $\begingroup$ I don't think I have a good reference for that. Basically you need to draw out the entire filter as a block diagram in full detail. Then you inject quantization noise at every state variable and propagate it to the output and then you can sum all the individual noise spectra . For fixed point it's even mode complicated since you also need to calculate the the transfer functions from the input to the each state variable to determine the gains scaling and the amount of quantization noise that's injected (which is constant for floating point) $\endgroup$
    – Hilmar
    Commented Aug 7 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.