Texas Instruments TMS320C67 DSP Series Programmer's Reference Manual page 70

Library
Hide thumbs Also See for TMS320C67 DSP Series:
Table of Contents

Advertisement

Description
Algorithm
Special Requirements
a
Pointer to Dr coefs a1, a2.
delay
Pointer to filter delays.
r
Pointer to output samples.
nx
Number of input/output samples.
This routine implements a DF 2 transposed structure of the biquad filter. The
transfer function of a biquad can be written as:
b(0) ) b(1)z (* 1) ) b(2)z (* 2)
H(Z) +
1 ) a(1)z (* 1) ) a(2)z (* 2)
void DSPF_sp_biquad(float *x, float *b, float *a, float
*delay, int nx)
{
int i;
float a1, a2, b0, b1, b2, d0, d1, x_i;
a1 = a[0];
a2 = a[1];
b0 = b[0];
b1 = b[1];
b2 = b[2];
d0 = delay[0];
d1 = delay[1];
for (i = 0; i < nx; i++)
{
x_i = x[i];
r[i] = b0 * x_i + d0;
d0 = b1 * x_i - a1 * r[i] + d1;
d1 = b2 * x_i - a2 * r[i];
}
delay[0] = d0;
delay[1] = d1;
}
-
The coefficient pointers are double-word aligned.
The value of nx is ≥ 4.
-
DSPF_sp_biquad
DSPLIB Reference
4-45

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?

Questions and answers

Table of Contents