Cascaded Biquad Iir Filter - Analog Devices adsp-2100 Manual

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

14 Software Examples
14.4
A second-order biquad IIR filter section is represented by the transfer
function (in the z-domain):
H(z) = Y(z)/X(z) = ( B
where A
impulse response of the system H(z). The corresponding difference
equation for a biquad section is:
Y(n) = B
Higher-order filters can be obtained by cascading several biquad sections
with appropriate coefficients. The biquad sections can be scaled separately
and then cascaded in order to minimize the coefficient quantization and
the recursive accumulation errors.
A subroutine that implements a high-order filter is shown in Listing 14.2.
A circular buffer in program memory contains the scaled biquad
coefficients. These coefficients are stored in the order: B
for each biquad. The individual biquad coefficient groups must be stored
in the order that the biquads are cascaded.
.MODULE
{
Nth order cascaded biquad filter subroutine
Calling Parameters:
14 – 6

CASCADED BIQUAD IIR FILTER

+ B
0
1
, A
, B
, B
and B
1
2
0
1
2
X(n) + B
X(n–1) + B
0
1
biquad_sub;
SR1=input X(n)
I0 —> delay line buffer for X(n-2), X(n-1),
Y(n-2), Y(n-1)
L0 = 0
I1 —> scaling factors for each biquad section
L1 = 0
(in the case of a single biquad)
L1 = number of biquad sections
(for multiple biquads)
I4 —> scaled biquad coefficients
L4 = 5 x [number of biquads]
M0, M4 = 1
M1 = -3
M2 = 1 (in the case of multiple biquads)
M2 = 0 (in the case of a single biquad)
–1
–2
z
+ B
z
)/( 1 + A
2
are coefficients that determine the desired
X(n–2) – A
Y(n–1) – A
2
1
–1
–2
z
+ A
z
)
1
2
Y(n–2)
2
, B
, B
, A
2
1
0
2
and A
1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents