01000_structures.pdf

125
10: Digital Filter Structures 10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage Example A(z) D(z) Allpass Lattice Lattice Filter Lattice Example Lattice Example Numerator Summary MATLAB routines DSP and Digital Filters (2014-5560) Structures: 10 – 1 / 19

Upload: kadamsn

Post on 27-Sep-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 10: Digital Filter Structures

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 1 / 19

  • Direct Forms

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 coefficients a[k] and b[k] directly

  • Direct Forms

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 coefficients a[k] and b[k] directly

    Direct Form 1:

  • Direct Forms

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 coefficients 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 coefficients a[k] and b[k] directly

    Direct Form 1: Direct implementation of difference equation Can view as B(z) followed by 1

    A(z)

  • Direct Forms

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 coefficients a[k] and b[k] directly

    Direct Form 1: Direct implementation of difference equation Can view as B(z) followed by 1

    A(z)

    Direct Form II:

  • Direct Forms

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 coefficients a[k] and b[k] directly

    Direct Form 1: Direct implementation of difference equation Can view as B(z) followed by 1

    A(z)

    Direct Form II: Implements 1

    A(z) followed by B(z)

  • Direct Forms

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 2 / 19

    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 coefficients a[k] and b[k] directly

    Direct Form 1: Direct implementation of difference equation Can view as B(z) followed by 1

    A(z)

    Direct Form II: Implements 1

    A(z) followed by B(z) Saves on delays (= storage)

  • Transposition

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    Can convert any block diagram into an equivalent transposed form:

  • Transposition

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 IIt

  • Transposition

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 IIt

  • Transposition

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 IItWould normally be drawn with input on the left

  • Transposition

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 3 / 19

    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 IItWould normally be drawn with input on the left

    Note: A valid block diagram must never have any feedback loops that dontgo through a delay (z1 block).

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]

    Example: Direct Form IIt

    P =

    (a[1] 1a[2] 0

    )

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]

    Example: Direct Form IIt

    P =

    (a[1] 1a[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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]

    Example: Direct Form IIt

    P =

    (a[1] 1a[2] 0

    )q =

    (b[1] b[0]a[1]b[2] b[0]a[2]

    )

    rT =(1 0

    )

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]

    Example: Direct Form IIt

    P =

    (a[1] 1a[2] 0

    )q =

    (b[1] b[0]a[1]b[2] b[0]a[2]

    )

    rT =(1 0

    )s = b[0]

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]{

    P,q, rT , s}

    is the state-spacerepresentation of the filter structure.

    Example: Direct Form IIt

    P =

    (a[1] 1a[2] 0

    )q =

    (b[1] b[0]a[1]b[2] b[0]a[2]

    )

    rT =(1 0

    )s = b[0]

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]{

    P,q, rT , s}

    is the state-spacerepresentation of the filter structure.

    The transfer function is given by:

    H(z) = B(z)A(z) =

    det(zIP+qrT )det(zIP) + s 1

    Example: Direct Form IIt

    P =

    (a[1] 1a[2] 0

    )q =

    (b[1] b[0]a[1]b[2] b[0]a[2]

    )

    rT =(1 0

    )s = b[0]

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]{

    P,q, rT , s}

    is the state-spacerepresentation of the filter structure.

    The transfer function is given by:

    H(z) = B(z)A(z) =

    det(zIP+qrT )det(zIP) + s 1

    Example: Direct Form IIt

    P =

    (a[1] 1a[2] 0

    )q =

    (b[1] b[0]a[1]b[2] b[0]a[2]

    )

    rT =(1 0

    )s = b[0]

    From which H(z) = b[0]z2+b[1]z+b[2]

    z2+a[1]z+a[2]

  • State Space

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 4 / 19

    v[n] is a vector of delay element outputs

    Can write: v[n+ 1] = Pv[n] + qx[n]y[n] = rTv[n] + sx[n]{

    P,q, rT , s}

    is the state-spacerepresentation of the filter structure.

    The transfer function is given by:

    H(z) = B(z)A(z) =

    det(zIP+qrT )det(zIP) + s 1

    The transposed form has P PT and q r same H(z)

    Example: Direct Form IIt

    P =

    (a[1] 1a[2] 0

    )q =

    (b[1] b[0]a[1]b[2] b[0]a[2]

    )

    rT =(1 0

    )s = b[0]

    From which H(z) = b[0]z2+b[1]z+b[2]

    z2+a[1]z+a[2]

  • Precision Issues

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used.

  • Precision Issues

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used. However ...

    Coefficient precision

  • Precision Issues

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used. However ...

    Coefficient precisionCoefficients are stored to finite precision and so are not exact.

  • Precision Issues

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used. However ...

    Coefficient precisionCoefficients are stored to finite precision and so are not exact.The filter actually implemented is therefore incorrect.

  • Precision Issues

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used. However ...

    Coefficient precisionCoefficients are stored to finite precision and so are not exact.The filter actually implemented is therefore incorrect.

    Arithmetic precisionArithmetic calculations are not exact.

  • Precision Issues

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used. However ...

    Coefficient precisionCoefficients are stored to finite precision and so are not exact.The filter actually implemented is therefore incorrect.

    Arithmetic precisionArithmetic 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used. However ...

    Coefficient precisionCoefficients are stored to finite precision and so are not exact.The filter actually implemented is therefore incorrect.

    Arithmetic precisionArithmetic 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 5 / 19

    If all computations were exact, it would not make any difference which ofthe equivalent structures was used. However ...

    Coefficient precisionCoefficients are stored to finite precision and so are not exact.The filter actually implemented is therefore incorrect.

    Arithmetic precisionArithmetic 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 filtered by the transferfunction between the point of noise creation and the output.

  • Coefficient Sensitivity

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 6 / 19

    The roots of high order polynomials can be very sensitive to small changesin coefficient values.

  • Coefficient Sensitivity

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 6 / 19

    The roots of high order polynomials can be very sensitive to small changesin coefficient values.

    Wilkinsons polynomial: (famous example)f(x) =

    20n=1 (x n) = x

    20 210x19 + 20615x18 . . .

    has roots well separated on the real axis.

  • Coefficient Sensitivity

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 6 / 19

    The roots of high order polynomials can be very sensitive to small changesin coefficient values.

    Wilkinsons polynomial: (famous example)f(x) =

    20n=1 (x n) = x

    20 210x19 + 20615x18 . . .

    has roots well separated on the real axis.

    0 5 10 15 20 25

    -5

    0

    5

  • Coefficient Sensitivity

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 6 / 19

    The roots of high order polynomials can be very sensitive to small changesin coefficient values.

    Wilkinsons polynomial: (famous example)f(x) =

    20n=1 (x n) = x

    20 210x19 + 20615x18 . . .

    has roots well separated on the real axis.

    Multiplying the coefficient of x19 by 1.000001 moves the roots a lot.

    0 5 10 15 20 25

    -5

    0

    5

  • Coefficient Sensitivity

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 6 / 19

    The roots of high order polynomials can be very sensitive to small changesin coefficient values.

    Wilkinsons polynomial: (famous example)f(x) =

    20n=1 (x n) = x

    20 210x19 + 20615x18 . . .

    has roots well separated on the real axis.

    Multiplying the coefficient of x19 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

  • Coefficient Sensitivity

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 6 / 19

    The roots of high order polynomials can be very sensitive to small changesin coefficient values.

    Wilkinsons polynomial: (famous example)f(x) =

    20n=1 (x n) = x

    20 210x19 + 20615x18 . . .

    has roots well separated on the real axis.

    Multiplying the coefficient of x19 by 1.000001 moves the roots a lot.

    Speaking for myself I regard it as the most traumatic experience inmy 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

  • Coefficient Sensitivity

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 6 / 19

    The roots of high order polynomials can be very sensitive to small changesin coefficient values.

    Wilkinsons polynomial: (famous example)f(x) =

    20n=1 (x n) = x

    20 210x19 + 20615x18 . . .

    has roots well separated on the real axis.

    Multiplying the coefficient of x19 by 1.000001 moves the roots a lot.

    Speaking for myself I regard it as the most traumatic experience inmy 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 filters orders over about 10.

  • Cascaded Biquads

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 7 / 19

    Avoid high order polynomials by factorizing into quadratic terms:

    B(z)A(z) = g

    (1+bk,1z1+bk,2z2)(1+ak,1z1+ak,2z2)

  • Cascaded Biquads

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 7 / 19

    Avoid high order polynomials by factorizing into quadratic terms:

    B(z)A(z) = g

    (1+bk,1z1+bk,2z2)(1+ak,1z1+ak,2z2)

    = gK

    k=11+bk,1z

    1+bk,2z2

    1+ak,1z1+ak,2z2

  • Cascaded Biquads

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 7 / 19

    Avoid high order polynomials by factorizing into quadratic terms:

    B(z)A(z) = g

    (1+bk,1z1+bk,2z2)(1+ak,1z1+ak,2z2)

    = gK

    k=11+bk,1z

    1+bk,2z2

    1+ak,1z1+ak,2z2

    where K = max(

    M2

    ,N2

    ).

  • Cascaded Biquads

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 7 / 19

    Avoid high order polynomials by factorizing into quadratic terms:

    B(z)A(z) = g

    (1+bk,1z1+bk,2z2)(1+ak,1z1+ak,2z2)

    = gK

    k=11+bk,1z

    1+bk,2z2

    1+ak,1z1+ak,2z2

    where K = max(

    M2

    ,N2

    ).

    The term 1+bk,1z1+bk,2z

    2

    1+ak,1z1+ak,2z2is a biquad (bi-quadratic section).

  • Cascaded Biquads

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 7 / 19

    Avoid high order polynomials by factorizing into quadratic terms:

    B(z)A(z) = g

    (1+bk,1z1+bk,2z2)(1+ak,1z1+ak,2z2)

    = gK

    k=11+bk,1z

    1+bk,2z2

    1+ak,1z1+ak,2z2

    where K = max(

    M2

    ,N2

    ).

    The term 1+bk,1z1+bk,2z

    2

    1+ak,1z1+ak,2z2is a biquad (bi-quadratic section).

    Direct Form IITransposed

  • Cascaded Biquads

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 7 / 19

    Avoid high order polynomials by factorizing into quadratic terms:

    B(z)A(z) = g

    (1+bk,1z1+bk,2z2)(1+ak,1z1+ak,2z2)

    = gK

    k=11+bk,1z

    1+bk,2z2

    1+ak,1z1+ak,2z2

    where K = max(

    M2

    ,N2

    ).

    The term 1+bk,1z1+bk,2z

    2

    1+ak,1z1+ak,2z2is a biquad (bi-quadratic section).

    We need to choose:(a) which poles to pair with which zeros in each biquad

    Direct Form IITransposed

  • Cascaded Biquads

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 7 / 19

    Avoid high order polynomials by factorizing into quadratic terms:

    B(z)A(z) = g

    (1+bk,1z1+bk,2z2)(1+ak,1z1+ak,2z2)

    = gK

    k=11+bk,1z

    1+bk,2z2

    1+ak,1z1+ak,2z2

    where K = max(

    M2

    ,N2

    ).

    The term 1+bk,1z1+bk,2z

    2

    1+ak,1z1+ak,2z2is 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

    Direct Form IITransposed

  • Pole-zero Pairing/Ordering

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    -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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    2 pole pairs and 2 zero pairsneed 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    2 pole pairs and 2 zero pairsneed 2 biquads

    Noise introduced in one biquad is amplifiedby 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    2 pole pairs and 2 zero pairsneed 2 biquads

    Noise introduced in one biquad is amplifiedby 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    2 pole pairs and 2 zero pairsneed 2 biquads

    Noise introduced in one biquad is amplifiedby 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    2 pole pairs and 2 zero pairsneed 2 biquads

    Noise introduced in one biquad is amplifiedby 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    2 pole pairs and 2 zero pairsneed 2 biquads

    Noise introduced in one biquad is amplifiedby 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 8 / 19

    Example: Elliptic lowpass filter

    2 pole pairs and 2 zero pairsneed 2 biquads

    Noise introduced in one biquad is amplifiedby 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 mostnoise 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 9 / 19

    Implementation can take advantage of any symmetry in the coefficients.

  • Linear Phase

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 9 / 19

    Implementation can take advantage of any symmetry in the coefficients.

    Linear phase filters are always FIR and have symmetric (or, more rarely,antisymmetric) coefficients.

  • Linear Phase

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 9 / 19

    Implementation can take advantage of any symmetry in the coefficients.

    Linear phase filters are always FIR and have symmetric (or, more rarely,antisymmetric) coefficients.

    H(z) =M

    m=0 h[m]zm h[M m] = h[m]

  • Linear Phase

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 9 / 19

    Implementation can take advantage of any symmetry in the coefficients.

    Linear phase filters are always FIR and have symmetric (or, more rarely,antisymmetric) coefficients.

    H(z) =M

    m=0 h[m]zm h[M m] = h[m]

    = h[M2

    ]z

    M2 +

    M2 1m=0 h[m]

    (zm + zmM

    )[m even]

  • Linear Phase

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 9 / 19

    Implementation can take advantage of any symmetry in the coefficients.

    Linear phase filters are always FIR and have symmetric (or, more rarely,antisymmetric) coefficients.

    H(z) =M

    m=0 h[m]zm h[M m] = h[m]

    = h[M2

    ]z

    M2 +

    M2 1m=0 h[m]

    (zm + zmM

    )[m even]

    For M even, we only need M2 + 1 multiplies instead of M + 1.We need M additions in each case.

    M = 6:

  • Linear Phase

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 9 / 19

    Implementation can take advantage of any symmetry in the coefficients.

    Linear phase filters are always FIR and have symmetric (or, more rarely,antisymmetric) coefficients.

    H(z) =M

    m=0 h[m]zm h[M m] = h[m]

    = h[M2

    ]z

    M2 +

    M2 1m=0 h[m]

    (zm + zmM

    )[m even]

    For M even, we only need M2 + 1 multiplies instead of M + 1.We need M additions in each case.

    M = 6:

    For M odd (no central coefficient), we only need M2 + 12 multiplies.

  • Hardware Implementation

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 10 / 19

    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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 10 / 19

    Software Implementation:All that matters is the total number of multiplies and adds

    Hardware Implementation:Delay elements (z1) represent storage registersThe maximum clock speed is limited by the number of sequentialoperations between registers

  • Hardware Implementation

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 10 / 19

    Software Implementation:All that matters is the total number of multiplies and adds

    Hardware Implementation:Delay elements (z1) represent storage registersThe maximum clock speed is limited by the number of sequentialoperations 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 10 / 19

    Software Implementation:All that matters is the total number of multiplies and adds

    Hardware Implementation:Delay elements (z1) represent storage registersThe maximum clock speed is limited by the number of sequentialoperations between registers

    Example: Symmetric Linear Phase Filter

    Direct form: Maximum sequential delay = 4a+mTranspose 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 11 / 19

    Allpass filters have mirror image numerator and denominator coefficients:

    b[n] = a[N n]

  • Allpass Filters

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 11 / 19

    Allpass filters have mirror image numerator and denominator coefficients:

    b[n] = a[N n] B(z) = zNA(z1)

  • Allpass Filters

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 11 / 19

    Allpass filters have mirror image numerator and denominator coefficients:

    b[n] = a[N n] B(z) = zNA(z1)

    H(ej) 1

  • Allpass Filters

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 11 / 19

    Allpass filters have mirror image numerator and denominator coefficients:

    b[n] = a[N n] B(z) = zNA(z1)

    H(ej) 1

    There are several efficient structures, e.g.

  • Allpass Filters

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 11 / 19

    Allpass filters have mirror image numerator and denominator coefficients:

    b[n] = a[N n] B(z) = zNA(z1)

    H(ej) 1

    There are several efficient structures, e.g.

    First Order: H(z) = a[1]+z1

    1+a[1]z1

  • Allpass Filters

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 11 / 19

    Allpass filters have mirror image numerator and denominator coefficients:

    b[n] = a[N n] B(z) = zNA(z1)

    H(ej) 1

    There are several efficient structures, e.g.

    First Order: H(z) = a[1]+z1

    1+a[1]z1

    Second Order: H(z) = a[2]+a[1]z1+z2

    1+a[1]z1+a[2]z2

  • Allpass Filters

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 11 / 19

    Allpass filters have mirror image numerator and denominator coefficients:

    b[n] = a[N n] B(z) = zNA(z1)

    H(ej) 1

    There are several efficient structures, e.g.

    First Order: H(z) = a[1]+z1

    1+a[1]z1

    Second Order: H(z) = a[2]+a[1]z1+z2

    1+a[1]z1+a[2]z2

    Allpass filters have a gain magnitude of 1 even with coefficient errors.

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

    Y (z) = kV (z) +Gz1V (z)

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

    Y (z) = kV (z) +Gz1V (z) = k+z1G

    1+kGz1X(z)

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

    Y (z) = kV (z) +Gz1V (z) = k+z1G

    1+kGz1X(z)

    If |k| < 1 then Y (z)X(z) is stable since

    kG(ej)ej < 1

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

    Y (z) = kV (z) +Gz1V (z) = k+z1G

    1+kGz1X(z)

    If |k| < 1 then Y (z)X(z) is stable since

    kG(ej)ej < 1Y (z)X(z) =

    kA(z)+zN1A(z1)A(z)+kzN1A(z1)

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

    Y (z) = kV (z) +Gz1V (z) = k+z1G

    1+kGz1X(z)

    If |k| < 1 then Y (z)X(z) is stable since

    kG(ej)ej < 1Y (z)X(z) =

    kA(z)+zN1A(z1)A(z)+kzN1A(z1) ,

    z(N+1)D(z1)D(z)

  • Lattice Stage

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

    Y (z) = kV (z) +Gz1V (z) = k+z1G

    1+kGz1X(z)

    If |k| < 1 then Y (z)X(z) is stable since

    kG(ej)ej < 1Y (z)X(z) =

    kA(z)+zN1A(z1)A(z)+kzN1A(z1) ,

    z(N+1)D(z1)D(z)

    Obtaining {d[n]} from {a[n]}:

    d[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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 12 / 19

    Suppose G is allpass: G(z) = zNA(z1)

    A(z)

    V (z) = X(z) kGz1V (z)

    V (z) = 11+kGz1X(z)

    Y (z) = kV (z) +Gz1V (z) = k+z1G

    1+kGz1X(z)

    If |k| < 1 then Y (z)X(z) is stable since

    kG(ej)ej < 1Y (z)X(z) =

    kA(z)+zN1A(z1)A(z)+kzN1A(z1) ,

    z(N+1)D(z1)D(z)

    Obtaining {d[n]} from {a[n]}:

    d[n] =

    1 n = 0

    a[n] + ka[N + 1 n] 1 n N

    k n = N + 1

    Obtaining {a[n]} from {d[n]}:k = d[N + 1] a[n] = d[n]kd[N+1n]1k2

  • Example A(z) D(z)

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 13 / 19

    A(z) = 1 + 4z1 6z2 + 10z3

    k = 0.5, N = 3

  • Example A(z) D(z)

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 13 / 19

    A(z) = 1 + 4z1 6z2 + 10z3

    k = 0.5, N = 3

    A(z) D(z)z0 z1 z2 z3 z4

    A(z) 1 4 6 10z4A(z1) 10 6 4 1

    D(z) = A(z) + kz4A(z1) 1 9 9 12 0.5

  • Example A(z) D(z)

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 13 / 19

    A(z) = 1 + 4z1 6z2 + 10z3

    k = 0.5, N = 3

    A(z) D(z)z0 z1 z2 z3 z4

    A(z) 1 4 6 10z4A(z1) 10 6 4 1

    D(z) = A(z) + kz4A(z1) 1 9 9 12 0.5

    D(z) A(z)z0 z1 z2 z3 z4

    D(z) 1 9 9 12 0.5k = d[N + 1] 0.5z4D(z1) 0.5 12 9 9 1

    D(z) kz4D(z1) 0.75 3 4.5 7.5 0

    A(z) = D(z)kz4D(z1)

    1k2 1 4 6 10 0

  • Allpass Lattice

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 14 / 19

    We can implement any allpass filter H(z) = zMA(z1)

    A(z) as a lattice filterwith M stages:

  • Allpass Lattice

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 14 / 19

    We can implement any allpass filter H(z) = zMA(z1)

    A(z) as a lattice filterwith M stages:

    Initialize AM (z) = A(z)

  • Allpass Lattice

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 14 / 19

    We can implement any allpass filter H(z) = zMA(z1)

    A(z) as a lattice filterwith M stages:

    Initialize AM (z) = A(z) Repeat for m = M : 1 : 1

  • Allpass Lattice

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 14 / 19

    We can implement any allpass filter H(z) = zMA(z1)

    A(z) as a lattice filterwith M stages:

    Initialize AM (z) = A(z) Repeat for m = M : 1 : 1

    k[m] = am[m]

  • Allpass Lattice

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 14 / 19

    We can implement any allpass filter H(z) = zMA(z1)

    A(z) as a lattice filterwith M stages:

    Initialize AM (z) = A(z) Repeat for m = M : 1 : 1

    k[m] = am[m]

    am1[n] =am[n]k[m]am[mn]

    1k2[m] for 0 n m 1

  • Allpass Lattice

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 14 / 19

    We can implement any allpass filter H(z) = zMA(z1)

    A(z) as a lattice filterwith M stages:

    Initialize AM (z) = A(z) Repeat for m = M : 1 : 1

    k[m] = am[m]

    am1[n] =am[n]k[m]am[mn]

    1k2[m] for 0 n m 1

    equivalently Am1(z) = Am(z)k[m]zmAm(z

    1)1k2[m]

  • Allpass Lattice

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 14 / 19

    We can implement any allpass filter H(z) = zMA(z1)

    A(z) as a lattice filterwith M stages:

    Initialize AM (z) = A(z) Repeat for m = M : 1 : 1

    k[m] = am[m]

    am1[n] =am[n]k[m]am[mn]

    1k2[m] for 0 n m 1

    equivalently Am1(z) = Am(z)k[m]zmAm(z

    1)1k2[m]

    A(z) is stable iff |k[m]| < 1 for all m (good stability test)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z) =Am1(z)

    Am1(z)+k[m]zmAm1(z1)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z) =Am1(z)

    Am1(z)+k[m]zmAm1(z1)= Am1(z)

    Am(z)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z) =Am1(z)

    Am1(z)+k[m]zmAm1(z1)= Am1(z)

    Am(z)Hence:

    Um(z)X(z) =

    Am(z)A(z)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z) =Am1(z)

    Am1(z)+k[m]zmAm1(z1)= Am1(z)

    Am(z)Hence:

    Um(z)X(z) =

    Am(z)A(z) and

    Vm(z)X(z) =

    Um(z)X(z)

    Vm(z)Um(z)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z) =Am1(z)

    Am1(z)+k[m]zmAm1(z1)= Am1(z)

    Am(z)Hence:

    Um(z)X(z) =

    Am(z)A(z) and

    Vm(z)X(z) =

    Um(z)X(z)

    Vm(z)Um(z)

    = zmAm(z

    1)A(z)

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z) =Am1(z)

    Am1(z)+k[m]zmAm1(z1)= Am1(z)

    Am(z)Hence:

    Um(z)X(z) =

    Am(z)A(z) and

    Vm(z)X(z) =

    Um(z)X(z)

    Vm(z)Um(z)

    = zmAm(z

    1)A(z)

    The numerator of Vm(z)X(z) is of order m so you can create any numerator of order M by

    summing appropriate multiples of Vm(z):

    w[n] =M

    m=0 cmvm[n]

  • Lattice Filter

    DSP and Digital Filters (2014-5560) Structures: 10 15 / 19

    Label outputs um[n] and vm[n] and define Hm(z) = Vm(z)Um(z) =zmAm(z

    1)Am(z)

    From earlier slide:Um1(z)Um(z)

    = 11+k[m]z1Hm1(z) =Am1(z)

    Am1(z)+k[m]zmAm1(z1)= Am1(z)

    Am(z)Hence:

    Um(z)X(z) =

    Am(z)A(z) and

    Vm(z)X(z) =

    Um(z)X(z)

    Vm(z)Um(z)

    = zmAm(z

    1)A(z)

    The numerator of Vm(z)X(z) is of order m so you can create any numerator of order M by

    summing appropriate multiples of Vm(z):

    w[n] =M

    m=0 cmvm[n] W (z) =M

    m=0 cmzmAm(z

    1)

    A(z)

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

    k[2] = 0.281a1[ ] =[1, 0.256]+0.281[0.281, 0.256]

    10.2812 = [1, 0.357]

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

    k[2] = 0.281a1[ ] =[1, 0.256]+0.281[0.281, 0.256]

    10.2812 = [1, 0.357]

    k[1] = 0.357a0[ ] = 1

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

    k[2] = 0.281a1[ ] =[1, 0.256]+0.281[0.281, 0.256]

    10.2812 = [1, 0.357]

    k[1] = 0.357a0[ ] = 1

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

    k[2] = 0.281a1[ ] =[1, 0.256]+0.281[0.281, 0.256]

    10.2812 = [1, 0.357]

    k[1] = 0.357a0[ ] = 1

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

    V1(z)X(z) =

    0.357+z1

    1+0.2z10.23z2+0.2z3

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

    k[2] = 0.281a1[ ] =[1, 0.256]+0.281[0.281, 0.256]

    10.2812 = [1, 0.357]

    k[1] = 0.357a0[ ] = 1

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

    V1(z)X(z) =

    0.357+z1

    1+0.2z10.23z2+0.2z3

    V2(z)X(z) =

    0.281+0.256z1+z2

    1+0.2z10.23z2+0.2z3

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

    k[2] = 0.281a1[ ] =[1, 0.256]+0.281[0.281, 0.256]

    10.2812 = [1, 0.357]

    k[1] = 0.357a0[ ] = 1

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

    V1(z)X(z) =

    0.357+z1

    1+0.2z10.23z2+0.2z3

    V2(z)X(z) =

    0.281+0.256z1+z2

    1+0.2z10.23z2+0.2z3V3(z)X(z) =

    0.20.23z1+0.2z2+z3

    1+0.2z10.23z2+0.2z3

  • Lattice Example

    DSP and Digital Filters (2014-5560) Structures: 10 16 / 19

    A(z) = A3(z) = 1 + 0.2z1 0.23z2 + 0.2z3

    k[3] = 0.2a2[ ] =[1, 0.2, 0.23]0.2[0.2, 0.23, 0.2]

    10.22 = [1, 0.256, 0.281]

    k[2] = 0.281a1[ ] =[1, 0.256]+0.281[0.281, 0.256]

    10.2812 = [1, 0.357]

    k[1] = 0.357a0[ ] = 1

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

    V1(z)X(z) =

    0.357+z1

    1+0.2z10.23z2+0.2z3

    V2(z)X(z) =

    0.281+0.256z1+z2

    1+0.2z10.23z2+0.2z3V3(z)X(z) =

    0.20.23z1+0.2z2+z3

    1+0.2z10.23z2+0.2z3

    Add together multiples of Vm(z)X(z) to create an arbitrary

    B(z)1+0.2z10.23z2+0.2z3

  • Lattice Example Numerator

    DSP and Digital Filters (2014-5560) Structures: 10 17 / 19

    Form a new output signal as w[n] =M

    m=0 cmvm[n]

  • Lattice Example Numerator

    DSP and Digital Filters (2014-5560) Structures: 10 17 / 19

    Form a new output signal as w[n] =M

    m=0 cmvm[n]

    W (z) =M

    m=0 cmVm(z) =B(z)

    1+0.2z10.23z2+0.2z3X(z)

  • Lattice Example Numerator

    DSP and Digital Filters (2014-5560) Structures: 10 17 / 19

    Form a new output signal as w[n] =M

    m=0 cmvm[n]

    W (z) =M

    m=0 cmVm(z) =B(z)

    1+0.2z10.23z2+0.2z3X(z)

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

    V1(z)X(z) =

    0.357+z1

    1+0.2z10.23z2+0.2z3

    V2(z)X(z) =

    0.281+0.256z1+z2

    1+0.2z10.23z2+0.2z3V3(z)X(z) =

    0.20.23z1+0.2z2+z3

    1+0.2z10.23z2+0.2z3

  • Lattice Example Numerator

    DSP and Digital Filters (2014-5560) Structures: 10 17 / 19

    Form a new output signal as w[n] =M

    m=0 cmvm[n]

    W (z) =M

    m=0 cmVm(z) =B(z)

    1+0.2z10.23z2+0.2z3X(z)

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

    V1(z)X(z) =

    0.357+z1

    1+0.2z10.23z2+0.2z3

    V2(z)X(z) =

    0.281+0.256z1+z2

    1+0.2z10.23z2+0.2z3V3(z)X(z) =

    0.20.23z1+0.2z2+z3

    1+0.2z10.23z2+0.2z3

    We have

    b[0]b[1]b[2]b[3]

    =

    1 0.357 0.281 0.20 1 0.256 0.230 0 1 0.20 0 0 1

    c0c1c2c3

  • Lattice Example Numerator

    DSP and Digital Filters (2014-5560) Structures: 10 17 / 19

    Form a new output signal as w[n] =M

    m=0 cmvm[n]

    W (z) =M

    m=0 cmVm(z) =B(z)

    1+0.2z10.23z2+0.2z3X(z)

    V0(z)X(z) =

    11+0.2z10.23z2+0.2z3

    V1(z)X(z) =

    0.357+z1

    1+0.2z10.23z2+0.2z3

    V2(z)X(z) =

    0.281+0.256z1+z2

    1+0.2z10.23z2+0.2z3V3(z)X(z) =

    0.20.23z1+0.2z2+z3

    1+0.2z10.23z2+0.2z3

    We have

    b[0]b[1]b[2]b[3]

    =

    1 0.357 0.281 0.20 1 0.256 0.230 0 1 0.20 0 0 1

    c0c1c2c3

    Hence choose cm as

    c0c1c2c3

    =

    1 0.357 0.281 0.20 1 0.256 0.230 0 1 0.20 0 0 1

    1

    b[0]b[1]b[2]b[3]

  • Summary

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 18 / 19

    Filter block diagrams Direct forms Transposition State space representation

  • Summary

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 18 / 19

    Filter block diagrams Direct forms Transposition State space representation

    Precision issues: coefficient error, arithmetic error cascaded biquads

  • Summary

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 18 / 19

    Filter block diagrams Direct forms Transposition State space representation

    Precision issues: coefficient error, arithmetic error cascaded biquads

    Allpass filters first and second order sections

  • Summary

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 18 / 19

    Filter block diagrams Direct forms Transposition State space representation

    Precision issues: coefficient error, arithmetic error cascaded biquads

    Allpass filters first and second order sections

    Lattice filters Arbitrary allpass response Arbitrary IIR response by summing intermediate outputs

  • Summary

    10: Digital Filter Structures Direct Forms Transposition State Space Precision Issues Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 18 / 19

    Filter block diagrams Direct forms Transposition State space representation

    Precision issues: coefficient error, arithmetic error cascaded biquads

    Allpass filters first and second order sections

    Lattice filters 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 Coefficient Sensitivity Cascaded Biquads Pole-zero Pairing/Ordering Linear Phase Hardware Implementation Allpass Filters Lattice Stage ExampleA(z) D(z)

    Allpass Lattice Lattice Filter Lattice Example Lattice ExampleNumerator Summary MATLAB routines

    DSP and Digital Filters (2014-5560) Structures: 10 19 / 19

    residuez b(z1)

    a(z1)

    krk

    1pkz1

    tf2sos,sos2tf b(z1)

    a(z1)

    l

    b0,l+b1,lz1+b2,lz

    2

    1+a1,lz1+a2,lz2

    zp2sos,sos2zp {zm, pk, g}

    l

    b0,l+b1,lz1+b2,lz

    2

    1+a1,lz1+a2,lz2

    zp2ss,ss2zp {zm, pk, g}

    {x = Ax+Bu

    y = Cx+Du

    tf2ss,ss2tf b(z1)

    a(z1)

    {x = Ax+Bu

    y = Cx+Du

    poly poly(A) = det (zIA)

    10: Digital Filter StructuresDirect FormsTranspositionState SpacePrecision IssuesCoefficient SensitivityCascaded BiquadsPole-zero Pairing/OrderingLinear PhaseHardware ImplementationAllpass FiltersLattice StageExample A(z)D(z)Allpass LatticeLattice FilterLattice ExampleLattice Example NumeratorSummaryMATLAB routines