Sie sind auf Seite 1von 116

10: Digital Filter Structures

10: Digital Filter Structures


Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 1 / 17
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct forms use coefcients a[k] and b[k] directly
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct forms use coefcients a[k] and b[k] directly
Direct Form 1:
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct forms use coefcients a[k] and b[k] directly
Direct Form 1:
Direct implementation of difference equation
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct forms use coefcients a[k] and b[k] directly
Direct Form 1:
Direct implementation of difference equation
Can view as B(z) followed by A(z)
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct forms use coefcients a[k] and b[k] directly
Direct Form 1:
Direct implementation of difference equation
Can view as B(z) followed by A(z)
Direct Form II:
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct forms use coefcients a[k] and b[k] directly
Direct Form 1:
Direct implementation of difference equation
Can view as B(z) followed by A(z)
Direct Form II:
Implements A(z) followed by B(z)
Direct Forms
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 2 / 17
Filter: H(z) =
B(z)
A(z)
with input x[n] and output y[n]
y[n] =

M
k=0
b[k]x[n k]

N
k=1
a[k]y[n k]
Direct forms use coefcients a[k] and b[k] directly
Direct Form 1:
Direct implementation of difference equation
Can view as B(z) followed by A(z)
Direct Form II:
Implements A(z) followed by B(z)
Saves on delays (=storage)
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Reverse direction of each multiplier
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Reverse direction of each multiplier
Change junctions to adders and vice-versa
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Reverse direction of each multiplier
Change junctions to adders and vice-versa
Interchange the input and output signals
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Reverse direction of each multiplier
Change junctions to adders and vice-versa
Interchange the input and output signals
Example:
Direct form II Direct Form II
t
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Reverse direction of each multiplier
Change junctions to adders and vice-versa
Interchange the input and output signals
Example:
Direct form II Direct Form II
t
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Reverse direction of each multiplier
Change junctions to adders and vice-versa
Interchange the input and output signals
Example:
Direct form II Direct Form II
t
Would normally be drawn with input on the left
Transposition
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 3 / 17
Can convert any block diagram into an equivalent transposed form:
Reverse direction of each interconnection
Reverse direction of each multiplier
Change junctions to adders and vice-versa
Interchange the input and output signals
Example:
Direct form II Direct Form II
t
Would normally be drawn with input on the left
Note: A valid block diagram must never have any feedback loops that dont
go through a delay (z
1
block).
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
q =
_
b[1] b[0]a[1]
b[2] b[0]a[2]
_
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
q =
_
b[1] b[0]a[1]
b[2] b[0]a[2]
_
r
T
=
_
1 0
_
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
q =
_
b[1] b[0]a[1]
b[2] b[0]a[2]
_
r
T
=
_
1 0
_
s = b[0]
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
_
P, q, r
T
, s
_
is the state-space
representation of the lter structure.
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
q =
_
b[1] b[0]a[1]
b[2] b[0]a[2]
_
r
T
=
_
1 0
_
s = b[0]
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
_
P, q, r
T
, s
_
is the state-space
representation of the lter structure.
The transfer function is given by:
H(z) =
B(z)
A(z)
=
det
(
zIP+qr
T
)
det(zIP)
+s 1
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
q =
_
b[1] b[0]a[1]
b[2] b[0]a[2]
_
r
T
=
_
1 0
_
s = b[0]
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
_
P, q, r
T
, s
_
is the state-space
representation of the lter structure.
The transfer function is given by:
H(z) =
B(z)
A(z)
=
det
(
zIP+qr
T
)
det(zIP)
+s 1
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
q =
_
b[1] b[0]a[1]
b[2] b[0]a[2]
_
r
T
=
_
1 0
_
s = b[0]
From which H(z) =
b[0]z
2
+b[1]z+b[2]
z
2
+a[1]z+a[2]
State Space
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 4 / 17
v[n] is a vector of delay element outputs
Can write: v[n + 1] = Pv[n] +qx[n]
y[n] = r
T
v[n] +sx[n]
_
P, q, r
T
, s
_
is the state-space
representation of the lter structure.
The transfer function is given by:
H(z) =
B(z)
A(z)
=
det
(
zIP+qr
T
)
det(zIP)
+s 1
The transposed form has P P
T
and q r same H(z)
Example: Direct Form II
t
P =
_
a[1] 1
a[2] 0
_
q =
_
b[1] b[0]a[1]
b[2] b[0]a[2]
_
r
T
=
_
1 0
_
s = b[0]
From which H(z) =
b[0]z
2
+b[1]z+b[2]
z
2
+a[1]z+a[2]
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used.
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefcient precision
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefcient precision
Coefcients are stored to nite precision and so are not exact.
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefcient precision
Coefcients are stored to nite precision and so are not exact.
The lter actually implemented is therefore incorrect.
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefcient precision
Coefcients are stored to nite precision and so are not exact.
The lter actually implemented is therefore incorrect.
Arithmetic precision
Arithmetic calculations are not exact.
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefcient precision
Coefcients are stored to nite precision and so are not exact.
The lter actually implemented is therefore incorrect.
Arithmetic precision
Arithmetic calculations are not exact.
Worst case for arithmetic errors is when calculating the
difference between two similar values:
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefcient precision
Coefcients are stored to nite precision and so are not exact.
The lter actually implemented is therefore incorrect.
Arithmetic precision
Arithmetic calculations are not exact.
Worst case for arithmetic errors is when calculating the
difference between two similar values:
1.23456789 1.23455678 = 0.00001111: 9 s.f. 4 s.f.
Precision Issues
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 5 / 17
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefcient precision
Coefcients are stored to nite precision and so are not exact.
The lter actually implemented is therefore incorrect.
Arithmetic precision
Arithmetic calculations are not exact.
Worst case for arithmetic errors is when calculating the
difference between two similar values:
1.23456789 1.23455678 = 0.00001111: 9 s.f. 4 s.f.
Arithmetic errors introduce noise that is then ltered by the transfer
function between the point of noise creation and the output.
Coefcient Sensitivity
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 6 / 17
The roots of high order polynomials can be very sensitive to small changes
in coefcient values.
Coefcient Sensitivity
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 6 / 17
The roots of high order polynomials can be very sensitive to small changes
in coefcient values.
Wilkinsons polynomial: (famous example)
f(x) =

20
n=1
(x n) = x
20
210x
19
+ 20615x
18
. . .
has roots well separated on the real axis.
Coefcient Sensitivity
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 6 / 17
The roots of high order polynomials can be very sensitive to small changes
in coefcient values.
Wilkinsons polynomial: (famous example)
f(x) =

20
n=1
(x n) = x
20
210x
19
+ 20615x
18
. . .
has roots well separated on the real axis.
0 5 10 15 20 25
-5
0
5
Coefcient Sensitivity
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 6 / 17
The roots of high order polynomials can be very sensitive to small changes
in coefcient values.
Wilkinsons polynomial: (famous example)
f(x) =

20
n=1
(x n) = x
20
210x
19
+ 20615x
18
. . .
has roots well separated on the real axis.
Multiplying the coefcient of x
19
by 1.000001 moves the roots a lot.
0 5 10 15 20 25
-5
0
5
Coefcient Sensitivity
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 6 / 17
The roots of high order polynomials can be very sensitive to small changes
in coefcient values.
Wilkinsons polynomial: (famous example)
f(x) =

20
n=1
(x n) = x
20
210x
19
+ 20615x
18
. . .
has roots well separated on the real axis.
Multiplying the coefcient of x
19
by 1.000001 moves the roots a lot.
0 5 10 15 20 25
-5
0
5
0 5 10 15 20 25
-5
0
5
Coefcient Sensitivity
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 6 / 17
The roots of high order polynomials can be very sensitive to small changes
in coefcient values.
Wilkinsons polynomial: (famous example)
f(x) =

20
n=1
(x n) = x
20
210x
19
+ 20615x
18
. . .
has roots well separated on the real axis.
Multiplying the coefcient of x
19
by 1.000001 moves the roots a lot.
Speaking for myself I regard it as the most traumatic experience in
my career as a numerical analyst, James Wilkinson 1984
0 5 10 15 20 25
-5
0
5
0 5 10 15 20 25
-5
0
5
Coefcient Sensitivity
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 6 / 17
The roots of high order polynomials can be very sensitive to small changes
in coefcient values.
Wilkinsons polynomial: (famous example)
f(x) =

20
n=1
(x n) = x
20
210x
19
+ 20615x
18
. . .
has roots well separated on the real axis.
Multiplying the coefcient of x
19
by 1.000001 moves the roots a lot.
Speaking for myself I regard it as the most traumatic experience in
my career as a numerical analyst, James Wilkinson 1984
0 5 10 15 20 25
-5
0
5
0 5 10 15 20 25
-5
0
5
Moral: Avoid using direct form for lters orders over about 10.
Cascaded Biquads
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 7 / 17
Avoid high order polynomials by factorizing into quadratic terms:
B(z)
A(z)
= g

(
1+b
k,1
z
1
+b
k,2
z
2
)

(1+a
k,1
z
1
+a
k,2
z
2
)
Cascaded Biquads
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 7 / 17
Avoid high order polynomials by factorizing into quadratic terms:
B(z)
A(z)
= g

(
1+b
k,1
z
1
+b
k,2
z
2
)

(1+a
k,1
z
1
+a
k,2
z
2
)
= g

K
k=1
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
Cascaded Biquads
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 7 / 17
Avoid high order polynomials by factorizing into quadratic terms:
B(z)
A(z)
= g

(
1+b
k,1
z
1
+b
k,2
z
2
)

(1+a
k,1
z
1
+a
k,2
z
2
)
= g

K
k=1
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
where K = max
__
M
2
_
,
_
N
2
__
.
Cascaded Biquads
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 7 / 17
Avoid high order polynomials by factorizing into quadratic terms:
B(z)
A(z)
= g

(
1+b
k,1
z
1
+b
k,2
z
2
)

(1+a
k,1
z
1
+a
k,2
z
2
)
= g

K
k=1
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
where K = max
__
M
2
_
,
_
N
2
__
.
The term
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
is a biquad (bi-quadratic section).
Cascaded Biquads
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 7 / 17
Avoid high order polynomials by factorizing into quadratic terms:
B(z)
A(z)
= g

(
1+b
k,1
z
1
+b
k,2
z
2
)

(1+a
k,1
z
1
+a
k,2
z
2
)
= g

K
k=1
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
where K = max
__
M
2
_
,
_
N
2
__
.
The term
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
is a biquad (bi-quadratic section).
Cascaded Biquads
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 7 / 17
Avoid high order polynomials by factorizing into quadratic terms:
B(z)
A(z)
= g

(
1+b
k,1
z
1
+b
k,2
z
2
)

(1+a
k,1
z
1
+a
k,2
z
2
)
= g

K
k=1
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
where K = max
__
M
2
_
,
_
N
2
__
.
The term
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
is a biquad (bi-quadratic section).
We need to choose:
(a) which poles to pair with which zeros in each biquad
Cascaded Biquads
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 7 / 17
Avoid high order polynomials by factorizing into quadratic terms:
B(z)
A(z)
= g

(
1+b
k,1
z
1
+b
k,2
z
2
)

(1+a
k,1
z
1
+a
k,2
z
2
)
= g

K
k=1
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
where K = max
__
M
2
_
,
_
N
2
__
.
The term
1+b
k,1
z
1
+b
k,2
z
2
1+a
k,1
z
1
+a
k,2
z
2
is a biquad (bi-quadratic section).
We need to choose:
(a) which poles to pair with which zeros in each biquad
(b) how to order the biquads
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
-1 0 1
-1
-0.5
0
0.5
1
z
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
-1 0 1
-1
-0.5
0
0.5
1
z
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
need 2 biquads
-1 0 1
-1
-0.5
0
0.5
1
z
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
need 2 biquads
Noise introduced in one biquad is amplied
by all the subsequent ones:
-1 0 1
-1
-0.5
0
0.5
1
z
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
need 2 biquads
Noise introduced in one biquad is amplied
by all the subsequent ones:
-1 0 1
-1
-0.5
0
0.5
1
z
Make the peak gain of each biquad as small as possible
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
need 2 biquads
Noise introduced in one biquad is amplied
by all the subsequent ones:
-1 0 1
-1
-0.5
0
0.5
1
z
Make the peak gain of each biquad as small as possible
Pair poles with nearest zeros to get lowest peak gain
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20
Nearest

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
need 2 biquads
Noise introduced in one biquad is amplied
by all the subsequent ones:
-1 0 1
-1
-0.5
0
0.5
1
z
Make the peak gain of each biquad as small as possible
Pair poles with nearest zeros to get lowest peak gain
begin with the pole nearest the unit circle
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20
Nearest

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
need 2 biquads
Noise introduced in one biquad is amplied
by all the subsequent ones:
-1 0 1
-1
-0.5
0
0.5
1
z
Make the peak gain of each biquad as small as possible
Pair poles with nearest zeros to get lowest peak gain
begin with the pole nearest the unit circle
Pairing with farthest zeros gives higher peak biquad gain
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20
Nearest

G
a
i
n

(
d
B
)
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20
Farthest

G
a
i
n

(
d
B
)
Pole-zero Pairing/Ordering
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 8 / 17
Example: Elliptic lowpass lter
2 pole pairs and 2 zero pairs
need 2 biquads
Noise introduced in one biquad is amplied
by all the subsequent ones:
-1 0 1
-1
-0.5
0
0.5
1
z
Make the peak gain of each biquad as small as possible
Pair poles with nearest zeros to get lowest peak gain
begin with the pole nearest the unit circle
Pairing with farthest zeros gives higher peak biquad gain
Poles near the unit circle have the highest peaks and introduce most
noise so place them last in the chain
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20
Nearest

G
a
i
n

(
d
B
)
0 0.5 1 1.5 2 2.5 3
-40
-20
0
20
Farthest

G
a
i
n

(
d
B
)
Linear Phase
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 9 / 17
Implementation can take advantage of any symmetry in the coefcients.
Linear Phase
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 9 / 17
Implementation can take advantage of any symmetry in the coefcients.
Linear phase lters are always FIR and have symmetric (or, more rarely,
antisymmetric) coefcients.
Linear Phase
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 9 / 17
Implementation can take advantage of any symmetry in the coefcients.
Linear phase lters are always FIR and have symmetric (or, more rarely,
antisymmetric) coefcients.
H(z) =

M
m=0
h[m]z
m
h[M m] = h[m]
Linear Phase
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 9 / 17
Implementation can take advantage of any symmetry in the coefcients.
Linear phase lters are always FIR and have symmetric (or, more rarely,
antisymmetric) coefcients.
H(z) =

M
m=0
h[m]z
m
h[M m] = h[m]
= h
_
M
2

M
2
+

M
2
1
m=0
h[m]
_
z
m
+z
mM
_
[m even]
Linear Phase
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 9 / 17
Implementation can take advantage of any symmetry in the coefcients.
Linear phase lters are always FIR and have symmetric (or, more rarely,
antisymmetric) coefcients.
H(z) =

M
m=0
h[m]z
m
h[M m] = h[m]
= h
_
M
2

M
2
+

M
2
1
m=0
h[m]
_
z
m
+z
mM
_
[m even]
We can implement this with
M
2
+ 1 multiplies instead of M + 1
Hardware Implementation
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 10 / 17
Software Implementation:
All that matters is the total number of multiplies and adds
Hardware Implementation
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 10 / 17
Software Implementation:
All that matters is the total number of multiplies and adds
Hardware Implementation:
Delay elements (z
1
) represent storage registers
The maximum clock speech is limited by the number of sequential
operations between registers
Hardware Implementation
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 10 / 17
Software Implementation:
All that matters is the total number of multiplies and adds
Hardware Implementation:
Delay elements (z
1
) represent storage registers
The maximum clock speech is limited by the number of sequential
operations between registers
Example: Symmetric Linear Phase Filter
Direct form: Maximum sequential delay = 4a +m
a and m are the delays of adder and multiplier respectively
Hardware Implementation
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 10 / 17
Software Implementation:
All that matters is the total number of multiplies and adds
Hardware Implementation:
Delay elements (z
1
) represent storage registers
The maximum clock speech is limited by the number of sequential
operations between registers
Example: Symmetric Linear Phase Filter
Direct form: Maximum sequential delay = 4a +m
Transpose form: Maximum sequential delay = a +m
a and m are the delays of adder and multiplier respectively
Allpass Filters
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 11 / 17
Allpass lters have mirror image numerator and denominator coefcients:
b[n] = a[N n]
Allpass Filters
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 11 / 17
Allpass lters have mirror image numerator and denominator coefcients:
b[n] = a[N n] B(z) = z
N
A(z
1
)
Allpass Filters
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 11 / 17
Allpass lters have mirror image numerator and denominator coefcients:
b[n] = a[N n] B(z) = z
N
A(z
1
)

H(e
j
)

1
Allpass Filters
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 11 / 17
Allpass lters have mirror image numerator and denominator coefcients:
b[n] = a[N n] B(z) = z
N
A(z
1
)

H(e
j
)

1
There are several efcient structures, e.g.
Allpass Filters
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 11 / 17
Allpass lters have mirror image numerator and denominator coefcients:
b[n] = a[N n] B(z) = z
N
A(z
1
)

H(e
j
)

1
There are several efcient structures, e.g.
First Order: H(z) =
a[1]+z
1
1+a[1]z
1
Allpass Filters
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 11 / 17
Allpass lters have mirror image numerator and denominator coefcients:
b[n] = a[N n] B(z) = z
N
A(z
1
)

H(e
j
)

1
There are several efcient structures, e.g.
First Order: H(z) =
a[1]+z
1
1+a[1]z
1
Second Order: H(z) =
a[2]+a[1]z
1
+z
2
1+a[1]z
1
+a[2]z
2
Allpass Filters
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 11 / 17
Allpass lters have mirror image numerator and denominator coefcients:
b[n] = a[N n] B(z) = z
N
A(z
1
)

H(e
j
)

1
There are several efcient structures, e.g.
First Order: H(z) =
a[1]+z
1
1+a[1]z
1
Second Order: H(z) =
a[2]+a[1]z
1
+z
2
1+a[1]z
1
+a[2]z
2
Allpass lters have a gain magnitude of 1 even with coefcient errors.
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Y (z) = kV (z) +Gz
1
V (z)
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Y (z) = kV (z) +Gz
1
V (z) =
k+z
1
G
1+kGz
1
X(z)
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Y (z) = kV (z) +Gz
1
V (z) =
k+z
1
G
1+kGz
1
X(z)
If |k| < 1 then
Y (z)
X(z)
is stable since

kG(e
j
)e
j

< 1
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Y (z) = kV (z) +Gz
1
V (z) =
k+z
1
G
1+kGz
1
X(z)
If |k| < 1 then
Y (z)
X(z)
is stable since

kG(e
j
)e
j

< 1
Y (z)
X(z)
=
kA(z)+z
N1
A(z
1
)
A(z)+kz
N1
A(z
1
)
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Y (z) = kV (z) +Gz
1
V (z) =
k+z
1
G
1+kGz
1
X(z)
If |k| < 1 then
Y (z)
X(z)
is stable since

kG(e
j
)e
j

< 1
Y (z)
X(z)
=
kA(z)+z
N1
A(z
1
)
A(z)+kz
N1
A(z
1
)
=
z
(N+1)
B(z
1
)
B(z)
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Y (z) = kV (z) +Gz
1
V (z) =
k+z
1
G
1+kGz
1
X(z)
If |k| < 1 then
Y (z)
X(z)
is stable since

kG(e
j
)e
j

< 1
Y (z)
X(z)
=
kA(z)+z
N1
A(z
1
)
A(z)+kz
N1
A(z
1
)
=
z
(N+1)
B(z
1
)
B(z)
Obtaining {b[n]} from {a[n]}:
b[n] =
_

_
1 n = 0
a[n] +ka[N + 1 n] 1 n N
k n = N + 1
Lattice Stage
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 12 / 17
Suppose G is allpass: G(z) =
z
N
A(z
1
)
A(z)
V (z) = X(z) kGz
1
V (z)
V (z) =
1
1+kGz
1
X(z)
Y (z) = kV (z) +Gz
1
V (z) =
k+z
1
G
1+kGz
1
X(z)
If |k| < 1 then
Y (z)
X(z)
is stable since

kG(e
j
)e
j

< 1
Y (z)
X(z)
=
kA(z)+z
N1
A(z
1
)
A(z)+kz
N1
A(z
1
)
=
z
(N+1)
B(z
1
)
B(z)
Obtaining {b[n]} from {a[n]}:
b[n] =
_

_
1 n = 0
a[n] +ka[N + 1 n] 1 n N
k n = N + 1
Obtaining {a[n]} from {b[n]}:
k = b[N + 1] a[n] =
b[n]kb[N+1n]
1k
2
Allpass Lattice
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 13 / 17
We can implement any allpass lter H(z) =
z
M
A(z
1
)
A(z)
as a lattice lter
with M stages:
Allpass Lattice
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 13 / 17
We can implement any allpass lter H(z) =
z
M
A(z
1
)
A(z)
as a lattice lter
with M stages:
Initialize A
M
(z) = A(z)
Allpass Lattice
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 13 / 17
We can implement any allpass lter H(z) =
z
M
A(z
1
)
A(z)
as a lattice lter
with M stages:
Initialize A
M
(z) = A(z)
Repeat for m = M : 1 : 1
Allpass Lattice
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 13 / 17
We can implement any allpass lter H(z) =
z
M
A(z
1
)
A(z)
as a lattice lter
with M stages:
Initialize A
M
(z) = A(z)
Repeat for m = M : 1 : 1
k[m] = a
m
[m]
Allpass Lattice
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 13 / 17
We can implement any allpass lter H(z) =
z
M
A(z
1
)
A(z)
as a lattice lter
with M stages:
Initialize A
M
(z) = A(z)
Repeat for m = M : 1 : 1
k[m] = a
m
[m]
a
m1
[n] =
a
m
[n]k[m]a
m
[mn]
1k
2
[m]
for 0 n m1
Allpass Lattice
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 13 / 17
We can implement any allpass lter H(z) =
z
M
A(z
1
)
A(z)
as a lattice lter
with M stages:
Initialize A
M
(z) = A(z)
Repeat for m = M : 1 : 1
k[m] = a
m
[m]
a
m1
[n] =
a
m
[n]k[m]a
m
[mn]
1k
2
[m]
for 0 n m1
equivalently A
m1
(z) =
A
m
(z)k[m]z
m
A
m
(z
1
)
1k
2
[m]
Allpass Lattice
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 13 / 17
We can implement any allpass lter H(z) =
z
M
A(z
1
)
A(z)
as a lattice lter
with M stages:
Initialize A
M
(z) = A(z)
Repeat for m = M : 1 : 1
k[m] = a
m
[m]
a
m1
[n] =
a
m
[n]k[m]a
m
[mn]
1k
2
[m]
for 0 n m1
equivalently A
m1
(z) =
A
m
(z)k[m]z
m
A
m
(z
1
)
1k
2
[m]
A(z) is stable iff |k[m]| < 1 for all m (good stability test)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
=
A
m1
(z)
A
m1
(z)+k[m]z
m
A
m1
(z
1
)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
=
A
m1
(z)
A
m1
(z)+k[m]z
m
A
m1
(z
1
)
=
A
m1
(z)
A
m
(z)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
=
A
m1
(z)
A
m1
(z)+k[m]z
m
A
m1
(z
1
)
=
A
m1
(z)
A
m
(z)
Hence:
U
m
(z)
X(z)
=
A
m
(z)
A(z)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
=
A
m1
(z)
A
m1
(z)+k[m]z
m
A
m1
(z
1
)
=
A
m1
(z)
A
m
(z)
Hence:
U
m
(z)
X(z)
=
A
m
(z)
A(z)
and
V
m
(z)
X(z)
=
U
m
(z)
X(z)

V
m
(z)
U
m
(z)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
=
A
m1
(z)
A
m1
(z)+k[m]z
m
A
m1
(z
1
)
=
A
m1
(z)
A
m
(z)
Hence:
U
m
(z)
X(z)
=
A
m
(z)
A(z)
and
V
m
(z)
X(z)
=
U
m
(z)
X(z)

V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A(z)
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
=
A
m1
(z)
A
m1
(z)+k[m]z
m
A
m1
(z
1
)
=
A
m1
(z)
A
m
(z)
Hence:
U
m
(z)
X(z)
=
A
m
(z)
A(z)
and
V
m
(z)
X(z)
=
U
m
(z)
X(z)

V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A(z)
The numerator of
V
m
(z)
X(z)
is of order m so you can create any numerator of order M by
summing appropriate multiples of V
m
(z):
g[n] =

M
m=0
c[m]v
m
[n]
Lattice Filter
DSP and Digital Filters (2011-1024) Structures: 10 14 / 17
Label outputs u
m
[n] and v
m
[n] and dene H
m
(z) =
V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A
m
(z)
From earlier slide:
U
m1
(z)
U
m
(z)
=
1
1+k[m]z
1
H
m1
(z)
=
A
m1
(z)
A
m1
(z)+k[m]z
m
A
m1
(z
1
)
=
A
m1
(z)
A
m
(z)
Hence:
U
m
(z)
X(z)
=
A
m
(z)
A(z)
and
V
m
(z)
X(z)
=
U
m
(z)
X(z)

V
m
(z)
U
m
(z)
=
z
m
A
m
(z
1
)
A(z)
The numerator of
V
m
(z)
X(z)
is of order m so you can create any numerator of order M by
summing appropriate multiples of V
m
(z):
g[n] =

M
m=0
c[m]v
m
[n] G(z) =

M
m=0
c[m]z
m
A
m
(z
1
)
A(z)
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
k[2] = 0.281 a
1
[ ] =
[1, 0.256]+0.281[0.281, 0.256]
10.281
2
= [1, 0.357]
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
k[2] = 0.281 a
1
[ ] =
[1, 0.256]+0.281[0.281, 0.256]
10.281
2
= [1, 0.357]
k[1] = 0.357 a
0
[ ] = 1
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
k[2] = 0.281 a
1
[ ] =
[1, 0.256]+0.281[0.281, 0.256]
10.281
2
= [1, 0.357]
k[1] = 0.357 a
0
[ ] = 1
V
0
(z)
X(z)
=
1
1+0.2z
1
0.23z
2
+0.2z
3
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
k[2] = 0.281 a
1
[ ] =
[1, 0.256]+0.281[0.281, 0.256]
10.281
2
= [1, 0.357]
k[1] = 0.357 a
0
[ ] = 1
V
0
(z)
X(z)
=
1
1+0.2z
1
0.23z
2
+0.2z
3
V
1
(z)
X(z)
=
0.357+z
1
1+0.2z
1
0.23z
2
+0.2z
3
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
k[2] = 0.281 a
1
[ ] =
[1, 0.256]+0.281[0.281, 0.256]
10.281
2
= [1, 0.357]
k[1] = 0.357 a
0
[ ] = 1
V
0
(z)
X(z)
=
1
1+0.2z
1
0.23z
2
+0.2z
3
V
1
(z)
X(z)
=
0.357+z
1
1+0.2z
1
0.23z
2
+0.2z
3
V
2
(z)
X(z)
=
0.281+0.256z
1
+z
2
1+0.2z
1
0.23z
2
+0.2z
3
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
k[2] = 0.281 a
1
[ ] =
[1, 0.256]+0.281[0.281, 0.256]
10.281
2
= [1, 0.357]
k[1] = 0.357 a
0
[ ] = 1
V
0
(z)
X(z)
=
1
1+0.2z
1
0.23z
2
+0.2z
3
V
1
(z)
X(z)
=
0.357+z
1
1+0.2z
1
0.23z
2
+0.2z
3
V
2
(z)
X(z)
=
0.281+0.256z
1
+z
2
1+0.2z
1
0.23z
2
+0.2z
3
V
3
(z)
X(z)
=
0.20.23z
1
+0.2z
2
+z
3
1+0.2z
1
0.23z
2
+0.2z
3
Lattice Example
DSP and Digital Filters (2011-1024) Structures: 10 15 / 17
A(z) = A
3
(z) = 1 + 0.2z
1
0.23z
2
+ 0.2z
3
k[3] = 0.2 a
2
[ ] =
[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]
10.2
2
= [1, 0.256, 0.281]
k[2] = 0.281 a
1
[ ] =
[1, 0.256]+0.281[0.281, 0.256]
10.281
2
= [1, 0.357]
k[1] = 0.357 a
0
[ ] = 1
V
0
(z)
X(z)
=
1
1+0.2z
1
0.23z
2
+0.2z
3
V
1
(z)
X(z)
=
0.357+z
1
1+0.2z
1
0.23z
2
+0.2z
3
V
2
(z)
X(z)
=
0.281+0.256z
1
+z
2
1+0.2z
1
0.23z
2
+0.2z
3
V
3
(z)
X(z)
=
0.20.23z
1
+0.2z
2
+z
3
1+0.2z
1
0.23z
2
+0.2z
3
Add together multiples of V
i
(z) to create an arbitrary
B(z)
1+0.2z
1
0.23z
2
+0.2z
3
Summary
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 16 / 17
Filter block diagrams
Direct forms
Transposition
State space representation
Summary
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 16 / 17
Filter block diagrams
Direct forms
Transposition
State space representation
Precision issues: coefcient error, arithmetic error
cascaded biquads
Summary
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 16 / 17
Filter block diagrams
Direct forms
Transposition
State space representation
Precision issues: coefcient error, arithmetic error
cascaded biquads
Allpass lters
rst and second order sections
Summary
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 16 / 17
Filter block diagrams
Direct forms
Transposition
State space representation
Precision issues: coefcient error, arithmetic error
cascaded biquads
Allpass lters
rst and second order sections
Lattice lters
Arbitrary allpass response
Arbitrary IIR response by summing intermediate outputs
Summary
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 16 / 17
Filter block diagrams
Direct forms
Transposition
State space representation
Precision issues: coefcient error, arithmetic error
cascaded biquads
Allpass lters
rst and second order sections
Lattice lters
Arbitrary allpass response
Arbitrary IIR response by summing intermediate outputs
For further details see Mitra: 8.
MATLAB routines
10: Digital Filter Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefcient Sensitivity
Cascaded Biquads
Pole-zero Pairing/Ordering
Linear Phase
Hardware Implementation
Allpass Filters
Lattice Stage
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
DSP and Digital Filters (2011-1024) Structures: 10 17 / 17
residuez
b(z
1)
a(z
1
)

k
r
k
1p
k
z
1
tf2sos,sos2tf
b(z
1)
a(z
1
)

l
b
0,l
+b
1,l
z
1
+b
2,l
z
2
1+a
1,l
z
1
+a
2,l
z
2
zp2sos,sos2zp {z
m
, p
k
, g}

l
b
0,l
+b
1,l
z
1
+b
2,l
z
2
1+a
1,l
z
1
+a
2,l
z
2
zp2ss,ss2zp {z
m
, p
k
, g}
_
x

= Ax +Bu
y = Cx +Du
tf2ss,ss2tf
b(z
1)
a(z
1
)

_
x

= Ax +Bu
y = Cx +Du
poly poly(A) = det (zIA)