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.

Need help with using iircas5 from dsplib

Other Parts Discussed in Thread: TEST2

Hi

I am a DSP-noob experimenting with a C5505 eZdsp. For the moment I am trying to do some filtering with help of dsplib (http://processors.wiki.ti.com/index.php/DSPLIB), especially with iircas5. I can't get it to work though.

Firstly, what is the format of the coefficients to use when calling?

C55x DSP Library Programmer’s Reference Manual  says: h = a11 b11 a21 b21 b01

The attached examples says: h = a1 a2 b2 b0 b1

Below is a delcaration of a filter with coefficients according to the second model (allthough Im not sure if it's good coefficients in the first place)

/* TEST FILTER */
ushort test_NX = 1; // Number of elements of input and output vectors
ushort test_NBIQ = 1; // Number of biquads
DATA test_h[5] = {13, 7, 15499, 16384, -31857}; // Filter coefficients 300 Hz LP
DATA test_dbuffer[4]; //delay line d format:
DATA *test_dp = test_dbuffer;

In main, the function is called by: iircas5(&right_input, test2_h, &left_output, test2_dp, test2_NBIQ, test2_NX);

Secondly, I have a problem finding coefficients for low cutoffs. If I scale them so that the largest (a1) fits the 16-bit int used by DSP-lib, the lowest values (b0, b2) are lower than 1.

What I want to have is a 30 Hz lowpass filter to extract the envelope of an audio signal in realtime. Is IIR what I should be looking for at all?