Post Go back to editing

IIR block and "Manual" IIR

Hi everybody. I was working on an IIR filter implementation using blocks avaible in the IDE. I disegned a second order IIR (5 coefficients). I tried to compare performance between IIR filter I designed with IDE blocks (patch pic attached) and the block "Second Order General IIR filter", with "IIR Coefficient" approach, They have frequency responses completely different and I don't know really why.

Did I make some mistakes?

Patch

Manual IIR FR

General IIR (IDE embedded) FR

Thanks very much,

regards.

Patch.zip
Parents
  •      Hi leonxp,

         My tests show there's several issues conspiring to confuse the results:

    • Both filters oscillate when run on the hardware.  I suspect the cause is the greater-than unity gains for feedback coefficients a1 and a2.
    • The General Filter block flips the signs of the a1 and a2 coefficients you type in before sending them to the DSP.  Thus you need to invert their signs yourself compared to the polarity of the feedback gains you place in the wired version of the filter.
    • You need only one feedback block in the feedback hierarchy board for your wired  filter.  The second delay should be a standard one.  I don't know why this matters, since the feedback block does implement a unit delay -- but I have found that things work best when using only enough feedback blocks to avoid "illegal feedback" errors.
    • The "stimulus / probe" blocks are not a true simulation but rather perform a calculated frequency plot of the filter(s) placed between them.  Thus they only work properly with the standard filter blocks and their combinations.  This is really handy, for example, to check the response of a 12-pole filter made of six bi-quads in series.  However the stimulus / probe blocks do not function with hand-assembled filters.  Most often they give no plot at all, but in your case, the stimulus / probe blocks gave a misleading partial result --  ignoring the feedback portion of your wired filter.

       

         To verify these observations yourself, you could reduce a1 and a2 to sub-unity values, and flip their signs in the General Filter's  entries.  In your feedback hierarchy board, replace the second feedback block with a unit delay.  After I did this, the two filters produced similar responses on the hardware.  With the stimulus / probe blocks you'll only see identical results when you set the a1 and a2 (feedback) coefficients of the General filter to zero, because the stimulus / probe cannot follow the feedback portion of the wired filter.

         Best regards,

         Bob

Reply
  •      Hi leonxp,

         My tests show there's several issues conspiring to confuse the results:

    • Both filters oscillate when run on the hardware.  I suspect the cause is the greater-than unity gains for feedback coefficients a1 and a2.
    • The General Filter block flips the signs of the a1 and a2 coefficients you type in before sending them to the DSP.  Thus you need to invert their signs yourself compared to the polarity of the feedback gains you place in the wired version of the filter.
    • You need only one feedback block in the feedback hierarchy board for your wired  filter.  The second delay should be a standard one.  I don't know why this matters, since the feedback block does implement a unit delay -- but I have found that things work best when using only enough feedback blocks to avoid "illegal feedback" errors.
    • The "stimulus / probe" blocks are not a true simulation but rather perform a calculated frequency plot of the filter(s) placed between them.  Thus they only work properly with the standard filter blocks and their combinations.  This is really handy, for example, to check the response of a 12-pole filter made of six bi-quads in series.  However the stimulus / probe blocks do not function with hand-assembled filters.  Most often they give no plot at all, but in your case, the stimulus / probe blocks gave a misleading partial result --  ignoring the feedback portion of your wired filter.

       

         To verify these observations yourself, you could reduce a1 and a2 to sub-unity values, and flip their signs in the General Filter's  entries.  In your feedback hierarchy board, replace the second feedback block with a unit delay.  After I did this, the two filters produced similar responses on the hardware.  With the stimulus / probe blocks you'll only see identical results when you set the a1 and a2 (feedback) coefficients of the General filter to zero, because the stimulus / probe cannot follow the feedback portion of the wired filter.

         Best regards,

         Bob

Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.