DSP_iir
[Filtering and convolution]

Collaboration diagram for DSP_iir:


Detailed Description

void DSP_iir (short *r1, const short *x, short *r2, const short *h2, const short *h1, int nr)


Function Documentation

void DSP_iir ( short *  r1,
const short *  x,
short *  r2,
const short *  h2,
const short *  h1,
int  nr 
)

This real IIR computes nr real output samples using 4 Autoregressive filter coefficients and 5 Moving-average filter coefficients. It operates on 16-bit data with a 32-bit accumulate. The implementation is done in Direct Form I, for the below difference equation.

r1(n) = h2(0) * x(n)
+ h2(1) * x(n-1) - h1(1) * r1(n-1)
+ h2(2) * x(n-2) - h1(2) * r1(n-2)
+ h2(3) * x(n-3) - h1(3) * r1(n-3)
+ h2(4) * x(n-4) - h1(4) * r1(n-4)

Parameters:
r1 Pointer to real output data used.
x Pointer to real input data.
r2 Pointer to real output data stored.
h2 Pointer to 5 Moving-average real filter coefficients.
h1 Pointer to 4 Autoregressive real filter coefficients.
nr Holds the value of number of real output samples.
Algorithm:
DSP_iir_cn.c is the natural C equivalent of the optimized intrinsic C code without restrictions. Note that the intrinsic C code is optimized and restrictions may apply.
Assumptions:
Arrays x, h1, h2, r1 and r2 do not overlap
x must point to x[nr-4]
h1 points to h1[0], h1[0] is not used, all the coefficients are real
h2 points to h2[0], all the coefficietns are real
r1 must point to r1[nr-4], current response depends on previous 4 responses
r2 must point to r2[0], such that r1[4+i] = r2[nr], for i = 0 to nr;
nr >= 1;
Implementation Notes:
Interruptibility : The code is interruptible. Endian support : supports both Little and Big endian modes.


Copyright 2014, Texas Instruments Incorporated