I've been struggling to get my coefficients correct using IIRCAS5/dsplib on the C5535. As with everyone else, I'm dealing with the issue of an a1 coefficient in the range +/-2 rather than a range of +/-1.
Here's an example:
ans =
0.0875 0.1514 0.0875 1.0000 -1.0871 0.4190
0.6841 0.2179 0.6841 1.0000 -0.3044 0.9220
0.3761 0.2815 0.3761 1.0000 -0.5902 0.7092
This is the floating point representation of a 6th order LPF in second order sections. The matlab representation of the LPF looks like this:
Nice and clean.
Now, a number of documents I have read simply suggest converting to Q2.14, which is achieved (I think, maybe I'm crazy here) with a simple multiplication of my coefficients by 2^14 and rounding.
This produces a new SOS representation of:
ans =
1434 2481 1434 16384 -17812 6864
11209 3569 11209 16384 -4987 15106
6163 4613 6163 16384 -9669 11619
Which, when evaluated, produces the same transfer function.Unfortunately, iircas5 chooses a value of 1, not 0.5 for a0, which means that my poles are different than this. To test, one can multiply column 4 by 2, to get:
ans =
1434 2481 1434 32768 -17812 6864
11209 3569 11209 32768 -4987 15106
6163 4613 6163 32768 -9669 11619
This, when evaluated produces a transfer function like this:
Which perfectly matches what I see on my DSP, when I order my coefficients for the iircas5 and run it on a network analyzer.
So can anyone explain to me what the heck I'm missing here? It seems like half the people who start these threads wander off and never explain what clarified their confusion. I've looked at a number of other threads and discussions (including the one with the German PDF which didn't really clarify too much for me, unfortunately).
Thanks a ton, any kind soul who takes a moment to answer this!