This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSPF_sp_iir and MATLAB

We'd like to implement some IIR filters using the DSPLib floating point libraries.  We created a couple of filters using MATLAB.  The documentation for DSPF_sp_iir says that it's a fourth order auto-regressive moving average (ARMA), so we used the MATLAB fdatool and converted the filter to an ARMA 4th order filter. MATLAB outputs 4 lattice values and 5 ladder values. However, if we use those values as the coefficients to the DSPF_sp_iir function, we're not getting what we expect.

Is there a trick to ordering the coefficients?  We tried both assigning the first lattice coefficients starting with h1[0], and we tried assigning the lattice coefficients starting with h1[1].

Or is there a different filter type we should specify in MATLAB to generate the coefficients?

Or is there a different tool we should use to generate the coefficients?

Thanks.

 

  • Pete,

    Lattice coefficients should not be ued with the DSPF_sp_iir function.  You will need to do one of the following:

    1. Generate standard (or direct form) filter coefficients in MATLAB (i.e. b, a arrays of filter taps)
    2. Use your lattice coefficients with the DSPF_sp_iirlat function (lattice only, not lattice + ladder)

    It's up to you which way you want to go.  Lattice form is often used for higher-order IIR filters because of its superior stability.  However, DSPF_sp_iirlat does not support ladder coefficients.  So, either way, you will probably need to re-design your filter in MATLAB.

    Hope this helps.