DSP: Unit V — FIR Filters
Unit V: FIR Filters
                                FIR Filter Realization
                                         Rajini M
                            Dept. of Elect. & Comm. Engineering,
                                      PES University;
                                   UE18EC253: DSP
DSP: Unit V — FIR Filters
Overview
      1 Introduction
      2 Structures for Realization of Discrete-Time Systems
              Basic Building Blocks
      3 Filter Structures
      4 IIR Filter Structures
      5 FIR Filter Structures
              Direct-form structure
              Cascade-form structure
              Lattice structure
      6 Lattice structure (IIR)
      7 Summary
DSP: Unit V — FIR Filters
  Introduction
Digital Filters
             A Linear time-invariant discrete-time systems are
             characterised by the the general linear constant coefficient
             difference equation
                                        N−1
                                        X                      M−1
                                                               X
                            y (n) = −         ak y (n − k) +         bk x(n − k)
                                        k=1                    k=0
             By means of z -transform, linear time-invariant discrete-time
             systems are characterised by ration transfer function
                                                   PM−1      −k
                                                    k=0 bk z
                                    H(z) =
                                                 1 + N−1       −k
                                                    P
                                                      k=1 ak z
DSP: Unit V — FIR Filters
  Introduction
Digital Filters
             Depending on the structure of H(z), we have two types of
             digital filter:
DSP: Unit V — FIR Filters
  Introduction
Digital Filters
             Depending on the structure of H(z), we have two types of
             digital filter:
                 1   FIR filters: All zero systems (also called as moving average
                     system).
                                                   M
                                                   X
                                           y (n) =     bk x(n − k)
                                                 k=1
                                                       N
                                                       X
                                         H(z) = 1 +          ak z −k
                                                       k=1
DSP: Unit V — FIR Filters
  Introduction
Digital Filters
             Depending on the structure of H(z), we have two types of
             digital filter:
                 1   FIR filters: All zero systems (also called as moving average
                     system).
                                                   M
                                                   X
                                           y (n) =     bk x(n − k)
                                                    k=1
                                                          N
                                                          X
                                          H(z) = 1 +            ak z −k
                                                          k=1
                 2   IIR filters: All pole systems (also called as autoregressive
                     system).
                                                N
                                                X
                                      y (n) = −    ak y (n − k) + b0 x(n)
                                              k=1
                                                            1
                                        H(z) =            PN
                                                 1+                   −k
                                                           k=1 ak z
DSP: Unit V — FIR Filters
  Structures for Realization of Discrete-Time Systems
Factors influence the choice of structure
             The block diagram representation of a system is referred to as
             realization.
             The factor that plays an role in deciding the structures:
                       1. Computational complexity
                       2. Memory requirements
                       3. Finite word length effects
DSP: Unit V — FIR Filters
  Structures for Realization of Discrete-Time Systems
     Basic Building Blocks
DSP: Unit V — FIR Filters
  Filter Structures
Filter Structures
      The broad category of filter structures:
                      1. Direct-form structure
                      2. Cascade form structure
                      3. Lattice structure
                      4. Parallel structure
              FIR filters: 1, 2 and 3.
              IIR filters: 1, 2, 3 and 4.
DSP: Unit V — FIR Filters
  IIR Filter Structures
IIR Filters
      The transfer function of IIR filter (pole-zero systems)
                            Y (z)   b0 + b1 z −1 + · · · + bM−1 z −(M−1)
                H(z) =            =
                            X (z)    1 + a1 z −1 + · · · + aN−1 z −(N−1)
      The corresponding difference equation of an IIR filter is given by
      difference equation
                                      N−1
                                      X                      M−1
                                                             X
                          y (n) = −         ak y (n − k) +         bk x(n − k)
                                      k=1                    k=0
DSP: Unit V — FIR Filters
  IIR Filter Structures
IIR Filter Structures: Direct-form I
              Direct-form I
DSP: Unit V — FIR Filters
  IIR Filter Structures
IIR Filter Structure: Direct-form II
              Direct-form II
DSP: Unit V — FIR Filters
  IIR Filter Structures
IIR Filter Structure: Direct-form II
DSP: Unit V — FIR Filters
  IIR Filter Structures
IIR Filter Structure: Cascade form
              Cascade form
DSP: Unit V — FIR Filters
  IIR Filter Structures
IIR Filter Structure: Parallel form
              Parallel form
DSP: Unit V — FIR Filters
  FIR Filter Structures
                            FIR Filters
DSP: Unit V — FIR Filters
  FIR Filter Structures
      A finite duration impulse response filter has a system function
                          M−1
                          X
            H(z) =              bk z −k = b0 + b1 z −1 + · · · + bM−1 z −(M−1)
                          k=0
DSP: Unit V — FIR Filters
  FIR Filter Structures
      A finite duration impulse response filter has a system function
                          M−1
                          X
            H(z) =              bk z −k = b0 + b1 z −1 + · · · + bM−1 z −(M−1)
                          k=0
      The impulse response h(n) is
                                                             bn , 0 ≤ n ≤ M − 1;
                      h(n) =
                                0, otherwise
DSP: Unit V — FIR Filters
  FIR Filter Structures
      A finite duration impulse response filter has a system function
                          M−1
                          X
            H(z) =              bk z −k = b0 + b1 z −1 + · · · + bM−1 z −(M−1)   (1)
                          k=0
      The impulse response h(n) is
                                                             bn , 0 ≤ n ≤ M − 1;
                      h(n) =
                                0, otherwise
      The difference equation is
                   y (n) = b0 + b1 x(n − 1) + · · · + bM−1 x(n − M + 1)          (2)
              Length of the filter (number of taps/ coefficients) = M
              Order the filter = M − 1
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Direct-form structure
Direct-form structure
      The direct form structure of FIR filter with difference equation
      given by eq.(2) is
              This structure requires M − 1 memory locations (to store
              M − 1 previous inputs).
              Complexity: M multiplications and M − 1 additions per
              output point.
              This realization is often called as traversal of tapped-delay line
              filter.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Direct-form structure
Example 1: Direct-form structure
      Consider the causal linear time invariant system with system
      function H(z)
                                    1      1             2
                          H(z) = 1 − z −1 + z −2 + z −3 + z −4
                                    3      6             5
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Direct-form structure
Example 1: Direct-form structure
      Consider the causal linear time invariant system with system
      function H(z)
                             1      1            2
                  H(z) = 1 − z −1 + z −2 + z −3 + z −4
                             3      6            5
                         Y (z)      1 −1 1 −2          2
                  H(z) =       = 1 − z + z + z −3 + z −4
                         X (z)      3       6          5
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Direct-form structure
Example 1: Direct-form structure
      Consider the causal linear time invariant system with system
      function H(z)
                  1      1           2
      H(z) = 1 − z −1 + z −2 + z −3 + z −4
                  3      6           5
              Y (z)      1 −1 1 −2          2
      H(z) =        = 1 − z + z + z −3 + z −4
              X (z)      3      6           5
                     1 −1       1 −2                  2
      Y (z) = X (z) − z X (z) + z X (z) + z −3 X (z) + z −4 X (z)
                     3          6                     5
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Direct-form structure
Example 1: Direct-form structure
      Consider the causal linear time invariant system with system
      function H(z)
              Y (z)       1        1              2
      H(z) =        = 1 − z −1 + z −2 + z −3 + z −4
              X (z)       3        6              5
                     1             1                        2
      Y (z) = X (z) − z −1 X (z) + z −2 X (z) + z −3 X (z) + z −4 X (z)
                     3             6                        5
                     1            1                          2
      y (n) = x(n) − x(n − 1) + x(n − 2) + x(n − 3) + + x(n − 4)
                     3            6                          5
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Direct-form structure
Example 1: Direct-form structure
      The direct form structure of the FIR filter
      with b0 = 1, b1 = − 13 , b2 = 16 , b3 = 1, b4 =   2
                                                        5
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Direct-form structure
Example 1: Direct-form structure
      The equivalent structure is
      with b0 = 1, b1 = − 13 , b2 = 16 , b3 = 1, b4 =   2
                                                        5
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Cascade-form structure
              The cascade realization follows from eq.(1).
              Factor the system function H(z) into second order FIR system
              so that
                                            b1 −1        bM−1 −(M−1)
                     H(z) = b0 (1 +            z + ··· +     z       )
                                            b1            b0
                                     K
                                     Y
                              = b0         Hk (z)
                                     k=1
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Cascade-form structure
              The cascade realization follows from eq.(1).
              Factor the system function H(z) into second order FIR system
              so that
                                            b1 −1        bM−1 −(M−1)
                     H(z) = b0 (1 +            z + ··· +     z       )
                                            b1            b0
                                     K
                                     Y
                              = b0         Hk (z)
                                     k=1
                                                          
                          (M−1)/2
                             Y
                                  (1 + B1k z −1 + B2k z −2 )
                    
                      b0                                                 M odd
                    
                    
                    
                    
                    
                    
                            k=1
      H(z) =                                                             
                                         (M−2)/2
                    
                    
                                          Y
                                                (1 + B1k z −1 + B2k z −2 ) M even
                    
                      b (1 + b10 z −1 )
                    
                     0
                    
                    
                    
                                               k=1
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Cascade-form structure
Cascade-form structure
      Figure: (a) M even (Order = M − 1 odd)   (b) M odd (Order = M − 1
      even)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Cascade-form structure
Example 2: Cascade-form structure
      Obtain the cascade-form structure realization of the given FIR
      filter system function
                                    6      7      26     1
                          H(z) = 1 + z −1 + z −2 + z −3 + z −4
                                    5      5      25     5
      FIR filter length M = 5 (Order = 4). With factorization we get                                                          
                              1 −1    −2         −1    1 −2
                 H(z) = 1 + z + z           1+z + z
                              5                        5
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Cascade-form structure
Example 2: Cascade-form structure
      The cascade-form realization of H(z)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Lattice structures for FIR filter
      Lattice structures offers many advantages over other filter
      structures, making them popular structure for digital speech
      processing and adaptive filters.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Lattice structures for FIR filter
      Lattice structures offers many advantages over other filter
      structures, making them popular structure for digital speech
      processing and adaptive filters.
              Modular in nature: If filter order is changed then we need to
              extra stages to the old stages.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Lattice structures for FIR filter
      Lattice structures offers many advantages over other filter
      structures, making them popular structure for digital speech
      processing and adaptive filters.
              Modular in nature: If filter order is changed then we need to
              extra stages to the old stages.
              Robust: less sensitive to coefficient quantization effects.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Lattice structures for FIR filter
      Lattice structures offers many advantages over other filter
      structures, making them popular structure for digital speech
      processing and adaptive filters.
              Modular in nature: If filter order is changed then we need to
              extra stages to the old stages.
              Robust: less sensitive to coefficient quantization effects.
              Computationally efficient filter structure.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Lattice structures for FIR filter
      Lattice structures offers many advantages over other filter
      structures, making them popular structure for digital speech
      processing and adaptive filters.
              Modular in nature: If filter order is changed then we need to
              extra stages to the old stages.
              Robust: less sensitive to coefficient quantization effects.
              Computationally efficient filter structure.
      We begin the development of lattice structure by considering
      sequence of FIR filters. We then extend this to IIR filters (All pole
      systems only).
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Consider the FIR filter system functions (all zero system)
                            m
                            X
             Hm (z) =             hm (k)z −k = Am (z),   m = 0, 1, 2, · · · , M − 1
                            k=0
              Hm (z) is an mth degree polynomial.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Consider the FIR filter system functions (all zero system)
                            m
                            X
             Hm (z) =             hm (k)z −k = Am (z),       m = 0, 1, 2, · · · , M − 1
                            k=0
              Hm (z) is an mth degree polynomial.
              By definition Am (z) is a polynomial
                                                 m
                                                 X
                                  Am (z) = 1 +         αm (k)z −k ,   m≥1
                                                 k=1
              and A0 (z) = 1.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Consider the FIR filter system functions (all zero system)
                            m
                            X
             Hm (z) =             hm (k)z −k = Am (z),       m = 0, 1, 2, · · · , M − 1
                            k=0
              Hm (z) is an mth degree polynomial.
              By definition Am (z) is a polynomial
                                                 m
                                                 X
                                  Am (z) = 1 +         αm (k)z −k ,   m≥1
                                                 k=1
              and A0 (z) = 1.
              By comparing the coefficients of Hm (z) and Am (z), we have
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Consider the FIR filter system functions (all zero system)
                             m
                             X
             Hm (z) =              hm (k)z −k = Am (z),       m = 0, 1, 2, · · · , M − 1
                             k=0
              Hm (z) is an mth degree polynomial.
              By definition Am (z) is a polynomial
                                                  m
                                                  X
                                   Am (z) = 1 +         αm (k)z −k ,   m≥1
                                                  k=1
              and A0 (z) = 1.
              By comparing the coefficients of Hm (z) and Am (z), we have
                         hm (0) = 1 = αm (0).
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Consider the FIR filter system functions (all zero system)
                             m
                             X
             Hm (z) =              hm (k)z −k = Am (z),       m = 0, 1, 2, · · · , M − 1
                             k=0
              Hm (z) is an mth degree polynomial.
              By definition Am (z) is a polynomial
                                                  m
                                                  X
                                   Am (z) = 1 +         αm (k)z −k ,   m≥1
                                                  k=1
              and A0 (z) = 1.
              By comparing the coefficients of Hm (z) and Am (z), we have
                         hm (0) = 1 = αm (0).
                         hm (k) = αm (k), k = 1, 2, · · · , m.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Lattice structure (FIR) cont.
              If {x(n)} is the input sequence to the filter Am (z) and {y (n)}
              is the output sequence, we have
                                             m
                                             X
                            y (n) = x(n) +         αm (k)x(n − k)
                                             k=1
              where, αm (k) are the direct-form structure coefficients.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Lattice structure (FIR) cont.
              If {x(n)} is the input sequence to the filter Am (z) and {y (n)}
              is the output sequence, we have
                                             m
                                             X
                            y (n) = x(n) +         αm (k)x(n − k)
                                             k=1
              where, αm (k) are the direct-form structure coefficients.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              Now suppose that we have a first-order filter (m = 1). The
              output of such a filter is
                              y (n) = x(n) + α1 (1)x(n − 1)            (4)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              Now suppose that we have a first-order filter (m = 1). The
              output of such a filter is
                              y (n) = x(n) + α1 (1)x(n − 1)            (4)
              This output can also be obtained form a first-order or
              single-stage lattice filter as
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              Now suppose that we have a first-order filter (m = 1). The
              output of such a filter is
                              y (n) = x(n) + α1 (1)x(n − 1)            (4)
              This output can also be obtained form a first-order or
              single-stage lattice filter as
              f1 (n) = x(n) + K1 x(n − 1)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              Now suppose that we have a first-order filter (m = 1). The
              output of such a filter is
                              y (n) = x(n) + α1 (1)x(n − 1)            (4)
              This output can also be obtained form a first-order or
              single-stage lattice filter as
              f1 (n) = x(n) + K1 x(n − 1)
              g1 (n) = K1 x(n) + x(n − 1)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              Now suppose that we have a first-order filter (m = 1). The
              output of such a filter is
                              y (n) = x(n) + α1 (1)x(n − 1)              (4)
              This output can also be obtained form a first-order or
              single-stage lattice filter as
              f1 (n) = x(n) + K1 x(n − 1)
              g1 (n) = K1 x(n) + x(n − 1)
              The output from the top branch is exactly eq.(4), if we select
              K1 = α1 (1), K1 is called reflection coefficient.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              Next consider an FIR filter with m = 2. The output from
              direct-form filter structure is
                            y (n) = x(n) + α2 (1)x(n − 1) + α2 (2)x(n − 2)   (5)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              Next consider an FIR filter with m = 2. The output from
              direct-form filter structure is
                            y (n) = x(n) + α2 (1)x(n − 1) + α2 (2)x(n − 2)   (5)
              By cascading two lattice structures, we can obtain eq.(5)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              The output of the first stage is
                              f1 (n) = x(n) + K1 x(n − 1)   (6)
                             g1 (n) = K1 x(n) + x(n − 1)    (7)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              The output of the first stage is
                              f1 (n) = x(n) + K1 x(n − 1)      (6)
                             g1 (n) = K1 x(n) + x(n − 1)       (7)
              The output from second stage is
                             f2 (n) = f1 (n) + K2 g1 (n − 1)   (8)
                             g2 (n) = K2 f1 (n) + g1 (n − 1)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              The output of the first stage is
                                   f1 (n) = x(n) + K1 x(n − 1)              (6)
                                  g1 (n) = K1 x(n) + x(n − 1)               (7)
              The output from second stage is
                                  f2 (n) = f1 (n) + K2 g1 (n − 1)           (8)
                                  g2 (n) = K2 f1 (n) + g1 (n − 1)
              Substitute f1 (n) and g1 (n − 1) from eq.(6) and (7) in f2 (n),
              we obtain
                f2 (n) = x(n) + K1 x(n − 1) + K2 (K1 x(n − 1) + x(n − 2))
                            = x(n) + K1 (1 + K2 )x(n − 1) + K2 x(n − 2)     (9)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              The output of the first stage is
                                   f1 (n) = x(n) + K1 x(n − 1)              (6)
                                  g1 (n) = K1 x(n) + x(n − 1)               (7)
              The output from second stage is
                                  f2 (n) = f1 (n) + K2 g1 (n − 1)           (8)
                                  g2 (n) = K2 f1 (n) + g1 (n − 1)
              Substitute f1 (n) and g1 (n − 1) from eq.(6) and (7) in f2 (n),
              we obtain
                f2 (n) = x(n) + K1 x(n − 1) + K2 (K1 x(n − 1) + x(n − 2))
                            = x(n) + K1 (1 + K2 )x(n − 1) + K2 x(n − 2)     (9)
              Now comparing eq.(5) with (9), we get
                                α2 (2) = K2 ,    α2 (1) = K1 (1 + K2 )
                                                              α2 (1)
              or equivalently, K2 = α2 (2),          K1 =   (1+α2 (2))
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      By continuing this process for an M − 1 stages,
                                f0 (n) = g0 (n) = 1
           fm (n) = fm−1 (n) + Km gm−1 (n − 1),   m = 0, 1, 2, · · · , M − 1
          gm (n) = Km fm−1 (n) + gm−1 (n − 1),    m = 0, 1, 2, · · · , M − 1
      Then the output of (M −     1)th -stage
                                            filter corresponds to the
      output of (M − 1) order FIR filter, y (n) = fM−1 (n).
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              The top branch gives the filter output, which is the output of
              an FIR filter of order m, that is
                                             m
                                             X
                          y (n) = fm (n) =         αm (k)x(n − k),   αm (0) = 1
                                             k=0
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              The top branch gives the filter output, which is the output of
              an FIR filter of order m, that is
                                              m
                                              X
                          y (n) = fm (n) =          αm (k)x(n − k),   αm (0) = 1
                                              k=0
              The z-transform relationship is
                                        m
                                        X
                             Fm (z) =         αm (k)z −k X (z) = Am (z)X (z)
                                        k=0
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              The top branch gives the filter output, which is the output of
              an FIR filter of order m, that is
                                              m
                                              X
                          y (n) = fm (n) =          αm (k)x(n − k),    αm (0) = 1
                                              k=0
              The z-transform relationship is
                                        m
                                        X
                             Fm (z) =         αm (k)z −k X (z) = Am (z)X (z)
                                        k=0
              Equivalently,
                                                     Fm (z)   Fm (z)
                                      Am (z) =              =
                                                     X (z)    F0 (z)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Now, consider the lower branch of the lattice structure
                            g2 (n) = K2 f1 (n) + g1 (n − 1)
      Substituting,
                              f1 (n) = x(n) + K1 x(n − 1)
      and
                              g1 (n) = K1 x(n) + x(n − 1)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Now, consider the lower branch of the lattice structure
            g2 (n) = g2 (n) = K2 f1 (n) + g1 (n − 1)
                          = K2 (x(n) + K1 x(n − 1)) + K1 x(n − 1) + x(n − 2)
                          = K2 x(n) + K1 (1 + K2 )x(n − 1) + x(n − 2)
                          = α2 (2)x(n) + α2 (1)x(n) + x(n − 2)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Now, consider the lower branch of the lattice structure
                  g2 (n) = K2 x(n) + K1 (1 + K2 )x(n − 1) + x(n − 2)
                            = α2 (2)x(n) + α2 (1)x(n) + x(n − 2)
      Consequently, the filter coefficients are {α2 (2), α2 (1), 1}, whereas
      the coefficients for the filter that produces output
                     f2 (n) = x(n) + K1 (1 + K2 )x(n − 1) + K2 x(n − 2)
      are {1, α2 (1), α2 (2)}. Hence the two sets of filter coefficients are
      in reverse order.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Now, consider the lower branch of the lattice structure
                  g2 (n) = K2 x(n) + K1 (1 + K2 )x(n − 1) + x(n − 2)            (10)
                            = α2 (2)x(n) + α2 (1)x(n) + x(n − 2)
      Consequently, the filter coefficients are {α2 (2), α2 (1), 1}, whereas
      the coefficients for the filter that produces output
      f2 (n) = x(n) + K1 (1 + K2 )x(n − 1) + K2 x(n − 2) are
      {1, α2 (1), α2 (2)}. Hence the two sets of filter coefficients are in
      reverse order.
      Define,
                            m
                            X                            m
                                                         X
                gm (n) =          αm (m − k)x(n − k) =         βm (k)x(n − k)
                            k=0                          k=0
      where, βm (k) = αm (m − k).
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              In the z-transform domain,
                                       m
                                       X
                            Gm (z) =         βm (k)z −k X (z) = Bm (z)X (z)
                                       k=0
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              In the z-transform domain,
                                       m
                                       X
                            Gm (z) =         βm (k)z −k X (z) = Bm (z)X (z)
                                       k=0
                                                 Gm (z)   Gm (z)
                                   Bm (z) =             =
                                                 X (z)    G0 (z)
              where, Bm (z) represents the system function of the FIR filter
              with coefficients {βm },
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
              In the z-transform domain,
                                       m
                                       X
                            Gm (z) =         βm (k)z −k X (z) = Bm (z)X (z)
                                       k=0
                                                 Gm (z)   Gm (z)
                                   Bm (z) =             =
                                                 X (z)    G0 (z)
              where, Bm (z) represents the system function of the FIR filter
              with coefficients {βm },
                                                   m
                                                   X
                                       Bm (z) =          βm (k)z −k
                                                   k=0
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Since βm (k) = αm (m − k),
                                       m
                                       X
                            Bm (z) =         αm (m − k)z −k
                                       k=0
                                       m
                                       X
                                  =          αm (l)z l−m
                                       l=0
                                             m
                                             X
                                        −m
                                  = z               αm (l)z l
                                              l=0
                                        −m
                                  = z        Am (z −1 )
      Hence, Bm (z) is called the reciprocal or reverse polynomial of
      Am (z).
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      So far, we have established the following relationships
                                       Fm (z)   Fm (z)
                            Am (z) =          =
                                       X (z)    F0 (z)
                                       Gm (z)   Gm (z)
                            Bm (z) =          =
                                       X (z)    G0 (z)
                             Bm (z) = z −m Am (z −1 )
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Taking z-transform on the following equations
                                f0 (n) = g0 (n) = 1
           fm (n) = fm−1 (n) + Km gm−1 (n − 1),   m = 0, 1, 2, · · · , M − 1
          gm (n) = Km fm−1 (n) + gm−1 (n − 1),    m = 0, 1, 2, · · · , M − 1
      We get,
                                F0 (z) = G0 (z) = 1
          Fm (z) = Fm−1 (z) + Km z −1 Gm−1 (z),   m = 0, 1, 2, · · · , M − 1
          Gm (n) = Km Fm−1 (z) + z −1 Gm−1 (z),   m = 0, 1, 2, · · · , M − 1
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      If we divide each equation by X (z), we obtain
                              A0 (z) = B0 (z) = 1
         Am (z) = Am−1 (z) + Km z −1 Bm−1 (z),       m = 0, 1, 2, · · · , M − 1
                                    −1
         Bm (n) = Km Am−1 (z) + z        Bm−1 (z),   m = 0, 1, 2, · · · , M − 1
      Thus the lattice stage is described in the z-domain by the matrix
      equation                                         
                      Am (z)       1 Km          Am−1 (z)
                               =
                      Bm (z)      Km 1         z −1 Bm−1 (z)
      Remember:
      Am (z) = m            −k and K = α (m)
              P
                k=0 αm (k)z         m   m
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
         Conversion from lattice coefficients to direct-form
                            coefficients
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Conversion from lattice coefficients to direct-form coefficients
      The direct-form FIR filter coefficients {αm (k)} can be obtained
      from the lattice coefficients {Ki } by using the following relations:
                                 A0 (z) = B0 (z) = 1
         Am (z) = Am−1 (z) + Km z −1 Bm−1 (z),      m = 0, 1, 2, · · · , M − 1
                               Bm (z) = z −m Am (z −1 )
              The solution is obtained recursively beginning with m = 1.
              We obtain a sequence of (M − 1) FIR filters, one for each
              value of m.
      Lets take an example.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 3: Lattice structure (FIR)
      Given a three stage lattice filter with the coefficients
      K1 = 1/4, K2 = 1/4, K3 = 1/3, determine the FIR filter
      coefficients for the direct-form structure.
           Solution: Begin with m = 1 and wkt A0 (z) = B0 (z) = 1, we
           have
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 3: Lattice structure (FIR)
      Given a three stage lattice filter with the coefficients
      K1 = 1/4, K2 = 1/4, K3 = 1/3, determine the FIR filter
      coefficients for the direct-form structure.
           Solution: Begin with m = 1 and wkt A0 (z) = B0 (z) = 1, we
           have
                            A1 (z) = A0 (z) + K1 z −1 B0 (z)
                                   = 1 + 1/4z −1
                                   = α1 (0) + α1 (1)z −1
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 3: Lattice structure (FIR)
      Given a three stage lattice filter with the coefficients
      K1 = 1/4, K2 = 1/4, K3 = 1/3, determine the FIR filter
      coefficients for the direct-form structure.
           Solution: Begin with m = 1 and wkt A0 (z) = B0 (z) = 1, we
           have
                             A1 (z) = A0 (z) + K1 z −1 B0 (z)
                                     = 1 + 1/4z −1
                                     = α1 (0) + α1 (1)z −1
              Thus the first-order FIR filter coefficients are α1 (0) = 1 and
              α1 (1) = 1/4.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 3: Lattice structure (FIR)
      Given a three stage lattice filter with the coefficients
      K1 = 1/4, K2 = 1/4, K3 = 1/3, determine the FIR filter
      coefficients for the direct-form structure.
           Solution: Begin with m = 1 and wkt A0 (z) = B0 (z) = 1, we
           have
                             A1 (z) = A0 (z) + K1 z −1 B0 (z)
                                     = 1 + 1/4z −1
                                     = α1 (0) + α1 (1)z −1
              Thus the first-order FIR filter coefficients are α1 (0) = 1 and
              α1 (1) = 1/4.
              Since B1 (z) is the reversal of A1 (z),
                                    B1 (z) = 1/4 + z −1
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      Now, m = 2
                            A2 (z) = A1 (z) + K2 z −1 B1 (z)
                                   = 1 + 3/8z −1 + 1/2z −2
                                   = α2 (0) + α2 (1)z −1 + α2 (2)z −2
      Also,
                                  B2 (z) = 1/2 + 3/8z −1 + z −2
      Finally, the addition of third stage
                 A3 (z) = A2 (z) + K3 z −1 B2 (z)
                             = 1 + 13/24z −1 + 5/8z −2 + 1/3z −3
                             = α3 (0) + α3 (1)z −1 + α3 (2)z −2 + α3 (3)z −3
      The desired direct-form FIR filter is characterized by the
      coefficients,
                  α3 (0) = 1, α3 (1) = 13/24, α3 (2) = 5/8, α3 (3) = 1/3
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
         Conversion form direct-form coefficients to lattice
                            coefficients
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Conversion form direct-form coefficients to lattice coefficients
              Suppose that we are given the FIR coefficients for the
              direct-form structure or equivalently Am (z), then wkt
              Km = αm (m).
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Conversion form direct-form coefficients to lattice coefficients
              Suppose that we are given the FIR coefficients for the
              direct-form structure or equivalently Am (z), then wkt
              Km = αm (m).
              Similarly, to obtain Km−1 we need polynomial Am−1 (z).
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Conversion form direct-form coefficients to lattice coefficients
              Suppose that we are given the FIR coefficients for the
              direct-form structure or equivalently Am (z), then wkt
              Km = αm (m).
              Similarly, to obtain Km−1 we need polynomial Am−1 (z).
              Consequently, we need to find polynomials Am (z) starting
              from m = M − 1 and stepping down successively to m = 1.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Conversion form direct-form coefficients to lattice coefficients
              Suppose that we are given the FIR coefficients for the
              direct-form structure or equivalently Am (z), then wkt
              Km = αm (m).
              Similarly, to obtain Km−1 we need polynomial Am−1 (z).
              Consequently, we need to find polynomials Am (z) starting
              from m = M − 1 and stepping down successively to m = 1.
              The desired recursive relation for the polynomial is
                          Am (z) = Am−1 (z) + Km z −1 Bm−1 (z)
                                 = Am−1 (z) + Km (Bm (z) − Km Am−1 (z))
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Conversion form direct-form coefficients to lattice coefficients
              Suppose that we are given the FIR coefficients for the
              direct-form structure or equivalently Am (z), then wkt
              Km = αm (m).
              Similarly, to obtain Km−1 we need polynomial Am−1 (z).
              Consequently, we need to find polynomials Am (z) starting
              from m = M − 1 and stepping down successively to m = 1.
              The desired recursive relation for the polynomial is
                          Am (z) = Am−1 (z) + Km z −1 Bm−1 (z)
                                 = Am−1 (z) + Km (Bm (z) − Km Am−1 (z))
              Solving for Am−1 (z), we obtain
                                Am (z) − Km Bm (z)
               Am−1 (z) =                          ,   m = M − 1, M − 2, · · · , 1
                                     1 − Km2
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Conversion form direct-form coefficients to lattice coefficients
              Suppose that we are given the FIR coefficients for the
              direct-form structure or equivalently Am (z), then wkt
              Km = αm (m).
              Similarly, to obtain Km−1 we need polynomial Am−1 (z).
              Consequently, we need to find polynomials Am (z) starting
              from m = M − 1 and stepping down successively to m = 1.
              The desired recursive relation for the polynomial is
                          Am (z) = Am−1 (z) + Km z −1 Bm−1 (z)
                                 = Am−1 (z) + Km (Bm (z) − Km Am−1 (z))
              Solving for Am−1 (z), we obtain
                                Am (z) − Km Bm (z)
               Am−1 (z) =                          ,   m = M − 1, M − 2, · · · , 1
                                     1 − Km2
              Observe that this procedure works as long as |Km | =
                                                                 6 1.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 4: Lattice structure (FIR)
      Determine the lattice coefficients corresponding to the FIR filter
      with system function
      H(z) = A3 (z) = 1 + 13/24z −1 + +5/8z −2 + 1/3z −3
           First we note that K3 = 1/3.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 4: Lattice structure (FIR)
      Determine the lattice coefficients corresponding to the FIR filter
      with system function
      H(z) = A3 (z) = 1 + 13/24z −1 + +5/8z −2 + 1/3z −3
           First we note that K3 = 1/3.
           Furthermore, B3 (z) = 1/3 + 5/8z −1 + +13/24z −2 + z −3
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 4: Lattice structure (FIR)
      Determine the lattice coefficients corresponding to the FIR filter
      with system function
      H(z) = A3 (z) = 1 + 13/24z −1 + +5/8z −2 + 1/3z −3
           First we note that K3 = 1/3.
           Furthermore, B3 (z) = 1/3 + 5/8z −1 + +13/24z −2 + z −3
           The step down relationship with m = 3 yields
                                     A3 (z) − K3 B3 (z)
                          A2 (z) =              2
                                                        = 1 + 3/8z −1 + 1/2z −2
                                          1 − K3
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 4: Lattice structure (FIR)
      Determine the lattice coefficients corresponding to the FIR filter
      with system function
      H(z) = A3 (z) = 1 + 13/24z −1 + +5/8z −2 + 1/3z −3
           First we note that K3 = 1/3.
           Furthermore, B3 (z) = 1/3 + 5/8z −1 + +13/24z −2 + z −3
           The step down relationship with m = 3 yields
                                     A3 (z) − K3 B3 (z)
                          A2 (z) =              2
                                                        = 1 + 3/8z −1 + 1/2z −2
                                          1 − K3
              Hence, K2 = 1/2.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 4: Lattice structure (FIR)
      Determine the lattice coefficients corresponding to the FIR filter
      with system function
      H(z) = A3 (z) = 1 + 13/24z −1 + +5/8z −2 + 1/3z −3
           First we note that K3 = 1/3.
           Furthermore, B3 (z) = 1/3 + 5/8z −1 + +13/24z −2 + z −3
           The step down relationship with m = 3 yields
                                     A3 (z) − K3 B3 (z)
                          A2 (z) =              2
                                                        = 1 + 3/8z −1 + 1/2z −2
                                          1 − K3
              Hence, K2 = 1/2.
              and B2 (z) = 1/2 + 3/8z −1 + z −2 .
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 4: Lattice structure (FIR)
      Determine the lattice coefficients corresponding to the FIR filter
      with system function
      H(z) = A3 (z) = 1 + 13/24z −1 + +5/8z −2 + 1/3z −3
           First we note that K3 = 1/3.
           Furthermore, B3 (z) = 1/3 + 5/8z −1 + +13/24z −2 + z −3
           The step down relationship with m = 3 yields
                                     A3 (z) − K3 B3 (z)
                          A2 (z) =              2
                                                        = 1 + 3/8z −1 + 1/2z −2
                                          1 − K3
              Hence, K2 = 1/2.
              and B2 (z) = 1/2 + 3/8z −1 + z −2 .
                                          A2 (z) − K2 B2 (z)
                              A1 (z) =                       = 1 + 1/4z −1
                                               1 − K22
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 4: Lattice structure (FIR)
      Determine the lattice coefficients corresponding to the FIR filter
      with system function
      H(z) = A3 (z) = 1 + 13/24z −1 + +5/8z −2 + 1/3z −3
           First we note that K3 = 1/3.
           Furthermore, B3 (z) = 1/3 + 5/8z −1 + +13/24z −2 + z −3
           The step down relationship with m = 3 yields
                                     A3 (z) − K3 B3 (z)
                          A2 (z) =              2
                                                        = 1 + 3/8z −1 + 1/2z −2
                                          1 − K3
              Hence, K2 = 1/2.
              and B2 (z) = 1/2 + 3/8z −1 + z −2 .
                                          A2 (z) − K2 B2 (z)
                              A1 (z) =                       = 1 + 1/4z −1
                                               1 − K22
              Hence, K1 = 1/4.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 5: FIR filter
      Realize the following FIR system H(z) = 1 + 3z −1 + 2z −2 in the
      following forms (a) cascade form (b) lattice form.
              (a) Cascade-form: H(z) = (1 + z −1 )(1 + 2−2 ) = H1 (z)H2 (z)
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 5: FIR filter
      Realize the following FIR system H(z) = 1 + 3z −1 + 2z −2 in the
      following forms (a) cascade form (b) lattice form.
              (a) Cascade-form: H(z) = (1 + z −1 )(1 + 2−2 ) = H1 (z)H2 (z)
              (b) Lattice form:
              H(z) = A2 (z) = 1 + 3z −1 + 2z −2 = 1 + α2 (1)z −1 + α2 (2)z −2
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 5: FIR filter
      Realize the following FIR system H(z) = 1 + 3z −1 + 2z −2 in the
      following forms (a) cascade form (b) lattice form.
              (a) Cascade-form: H(z) = (1 + z −1 )(1 + 2−2 ) = H1 (z)H2 (z)
              (b) Lattice form:
              H(z) = A2 (z) = 1 + 3z −1 + 2z −2 = 1 + α2 (1)z −1 + α2 (2)z −2
              Hence, K2 = α2 (2) = 2.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 5: FIR filter
      Realize the following FIR system H(z) = 1 + 3z −1 + 2z −2 in the
      following forms (a) cascade form (b) lattice form.
              (a) Cascade-form: H(z) = (1 + z −1 )(1 + 2−2 ) = H1 (z)H2 (z)
              (b) Lattice form:
              H(z) = A2 (z) = 1 + 3z −1 + 2z −2 = 1 + α2 (1)z −1 + α2 (2)z −2
              Hence, K2 = α2 (2) = 2.
              And B2 (z) = 2 + 3z −1 + z −2
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 5: FIR filter
      Realize the following FIR system H(z) = 1 + 3z −1 + 2z −2 in the
      following forms (a) cascade form (b) lattice form.
              (a) Cascade-form: H(z) = (1 + z −1 )(1 + 2−2 ) = H1 (z)H2 (z)
              (b) Lattice form:
              H(z) = A2 (z) = 1 + 3z −1 + 2z −2 = 1 + α2 (1)z −1 + α2 (2)z −2
              Hence, K2 = α2 (2) = 2.
              And B2 (z) = 2 + 3z −1 + z −2
              For m = 1,
                            A2 (z) − K2 B2 (z)
                 A1 (z) =                      = 1 + z −1 = α1 (1) + α1 (1)z −1
                                 1 − K22
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 5: FIR filter
      Realize the following FIR system H(z) = 1 + 3z −1 + 2z −2 in the
      following forms (a) cascade form (b) lattice form.
              (a) Cascade-form: H(z) = (1 + z −1 )(1 + 2−2 ) = H1 (z)H2 (z)
              (b) Lattice form:
              H(z) = A2 (z) = 1 + 3z −1 + 2z −2 = 1 + α2 (1)z −1 + α2 (2)z −2
              Hence, K2 = α2 (2) = 2.
              And B2 (z) = 2 + 3z −1 + z −2
              For m = 1,
                            A2 (z) − K2 B2 (z)
                 A1 (z) =                      = 1 + z −1 = α1 (1) + α1 (1)z −1
                                 1 − K22
              Hence, K1 = α1 (1) = 1.
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 6: FIR filter
      Realize the following FIR system
                              H(z) = 1 − 1.3343z −1 + 0.9025z −2
      in the following forms (a) direct form (b) lattice form.
      Solution:
                                                                     Y (z)
      (a)Direct-form: H(z) = 1 − 1.3343z −1 + 0.9025z −2 =           X (z)
                         y (n) = x(n) − 1.3343x(n − 1) + 0.9025x(n − 2)
      (b)Lattice form:
      H(z) = A2 (z) = 1−1.3343z −1 +0.9025z −2 = 1+α2 (1)z −1 +α2 (2)z −2
      Hence, K2 = α2 (2) = 0.9025. And Bm (z) = z −m Am (z −1 )
                               B2 (z) = 0.9025 − 1.3343z −1 + z −2
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
      For m = 2,
                          A2 (z) − K2 B2 (z)
        A1 (z) =                     2
                                             = 1 − 0.7013z −1 = α1 (1) + α1 (1)z −1
                               1 − K2
      Hence, K1 = α1 (1) = −0.7013
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
Example 7: FIR filter
      An FIR filter is described by the difference equation
           y (n) = 2x(n) + 13/12x(n − 1) + 5/4x(n − 2) + 2/3x(n − 3)
      Determine its lattice form.
      Solution:
          Y (z) = 2X (z) + 13/12z −1 X (z) + 5/4z −2 X (z) + 2/3z −3 X (z)
                    Y (z)
                          = H(z) = 2 + 13/12z −1 + 5/4z −2 + 2/3z −3
                    X (z)
              H(z) = K0 A3 (z) = 2(1 + 13/24z −1 + 5/8z −2 + 1/3z −3 )
                          A3 (z) = 1 + 13/24z −1 + 5/8z −2 + 1/3z −3
      Hence,
                                      K3 = α3 (3) = 1/3
DSP: Unit V — FIR Filters
  FIR Filter Structures
     Lattice structure
                            B3 (z) = 1/3 + 5/8z −1 + 13/24z −2 + z −3
      For m = 2,
                                 A2 (z) = 1 − 3/8z −1 + 1/2z −2
                                  B2 (z) = 1/2 − 3/8z −1 + z −2
      Hence, K2 = 1/2 For m = 1,
                                      A1 (z) = 1 + 1/4z −1
      Hence, K1 = 1/4.
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
                            Lattice structure (IIR)
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
IIR Filter (All pole systems)
      Let an N th order all-pole system function H(z) is given by
                                       1                1
                    H(z) =        PN              =
                             1 + k=1 aN (k)z   −k    A N (z)
      The difference equation and direct-form realization of this system
      are
                                N
                                X
                      y (n) = −   aN (k)y (n − k) + x(n)              (11)
                               k=1
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      If we interchange the roles of input and output , we obtain
                                       N
                                       X
                            x(n) = −         aN (k)x(n − k) + y (n)
                                       k=1
      or, equivalently
                                               N
                                               X
                            y (n) = x(n) +           aN (k)x(n − k)   (12)
                                               k=1
      We observe that
          Eq.(12) describes an FIR system having the system function
          H(z) = AN (z).
          Eq.(11) represents an IIR system with the system function
          H(z) = AN1(z) .
          One system can be obtained from the other by interchanging
          the roles of input and output.
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
                            FIR                    IIR
                            x(n) = f0 (n) = g0 (n) x(n) = f1 (n)
                            y (n) = f1 (n)         y (n) = f0 (n) = g0 (n)
      Therefore, in IIR filter given the input fN (n) = x(n), we must
      successively find fN−1 (n), fN−1 (n), · · · , f0 (n). Rearranging FIR
      filter fm (n) equation, we get,
                                fm−1 (n) = fm (n) − Km gm−1 (n − 1)
      The equation for gm (n) remains unchanged.
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      The resulting set of equations
                                  fN (n) = x(n)
           fm−1 (n) = fm (n) − Km gm−1 (m − 1),    m = N, N − 1, · · · , 1
           gm (n) = Km fm−1 (n) + gm−1 (n − 1),    m = N, N − 1, · · · , 1
                              y (n) = f0 (n) = g0 (n)
      The corresponding structure is
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      Consider single stage lattice structure for IIR filter
                            x(n) = f1 (n)
                            f0 (n) = f1 (n) − K1 g0 (n − 1)
                            g1 (n) = K1 f0 (n) + g0 (n − 1)
                            y (n) = f0 (n) = x(n) − K1 y (n − 1)
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      Similarly for two stage lattice structure for IIR filter
                                    x(n) = f2 (n)
                 First stage outputs            Second stage outputs
            f1 (n) = f2 (n) − K2 g1 (n − 1) f0 (n) = f1 (n) − K1 g0 (n − 1)
            g2 (n) = K1 f1 (n) + g1 (n − 1) g1 (n) = K1 f0 (n) + g0 (n − 1)
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      y (n) = f0 (n) = g0 (n) = −K1 (1 + K2 )y (n − 1) − K2 y (n − 2) + x(n)
                    g2 (n) = K2 y (n) + K1 (1 + K2 )y (n − 1) + y (n − 2)
      Clearly, the above difference equation represents a two pole IIR
      system.
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      Taking z-transform,
                Y (z)            1                   1
                      = H(z) =        =
                X (z)          A2 (z)   1 + K1 (1 + K2 )z −1 − K2 z −2
                        Gm (z)
                               = B2 (z) = K2 + K1 (1 + K2 )z −1 + z −2
                        Y (z)
      It must be noted that coefficients of A2 (z) and B2 (z) are in
      reverse order and B2 (z) = z −2 A2 (z −1 )
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      Therefore, in general the system function for all-pole IIR system is
                                    Y (z)   F0 (z)     1
                                          =        =
                                    X (z)   FN (z)   AN (z)
      Similarly,
                            GN (z)   GN (z)
                                   =        = BN (z) = z −N AN (z −1 )
                            Y (z)    G0 (z)
              Hence, we have the lattice parameters or reflection
              coefficients Km , for both the all-pole and all-zero lattice
              structure are the same.
              The two lattice structures differ only in the interconnections
              of their signal flow graphs.
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
Stability of All-pole System (Schur-Cohn Stability
test)
              An all-pole system is stable if all the roots of the denominator
              polynomial AN (z)are inside the unit circle.
                                    N
                                    X
                     AN (z) = 1 +         = 1 + αN (1)z −1 + · · · + αN (N)z −N
                                    k=1
              The Schur-Cohn Stability test states that the polynomial
              AN (z) has all its roots inside the unit circle iff
                                |Km | < 1         m = 1, 2, · · · , N
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
Example 8: IIR filter lattice structure
      Consider an all-pole IIR filter given by
                                                        1
                            H(z) =
                                     1+   13/24z −1   + 5/8z −2 + 1/3z −3
      Determine the lattice structure. Comment on its stability.
      Solution:
      We have m = N = 3 and
                                 1                   1
                  H(z) =              =
                               A3 (z)   1 + 13/24z + 5/8z −2 + 1/3z −3
                                                  −1
                            A3 (z) = 1 + 13/24z −1 + 5/8z −2 + 1/3z −3
      Hence, K3 = 1/3.
                            B3 (z) = 1/3 + 5/8z −1 + 13/24z −2 + z −3
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      With m = 2,
                               A3 (z) − K3 B3 (z)
                   A2 (z) =                       = 1 + 3/8z −1 + 1/2z −2
                                    1 − K32
      Hence, K2 = 1/2
                                 B2 (z) = 1/2 + 3/8z −1 + z −2
      With m = 1,
                                       A2 (z) − K2 B2 (z)
                            A1 (z) =                      = 1 + 1/4z −1
                                            1 − K22
      Hence, K1 = 1/4. Since all the reflection coefficients satisfy
      |Km | < 1, the given system is stable.
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
Example 9: IIR filter
      Determine the system function H(z) of an IIR filter with reflection
      coefficients K1 = 0.6, K2 = 0.3, K3 = 0.5, K4 = 0.9.
      Solution:
      The system transfer H(z) = A41(z) . We find the polynomial A4 (z)
      recursively.
      Recall:
              A0 (z) = B0 (z) = 1.
              Am (z) = Am−1 (z) + Km z −1 Bm−1 (z).
              Bm (z) = z −m A(z −1 )
                            A1 (z) = A0 (z) + K1 z −1 B0 (z) = 1 + 0.6z −1
                                         B1 (z) = 0.6 + z −1
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      Similarly,
                A2 (z) = A1 (z) + K2 z −1 B1 (z) = 1 + 0.78z −1 + 0.3z −2
                                 B2 (z) = 0.3 + 0.78z −1 + z −2
      and
       A3 (z) = A2 (z) + K3 z −1 B2 (z) = 1 + 0.93z −1 + 0.69z −2 + 0.5z −3
                            B3 (z) = 0.5 + 0.69z −1 + 0.93z −2 + z −3
      Finally,
      A4 (z) = A3 (z)+K4 z −1 B3 (z) = 1+1.38z −1 +1.311z −2 +1.337z −3 +0.9z −4
      Thus the system function H(z) is
                         1                            1
        H(z) =                =
                       A4 (z)   1 + 1.38z −1 + 1.311z −2 + 1.337z −3 + 0.9z −4
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
Example 10: IIR filter
      Find the lattice structure for the resonator
                                             1
                        H(z) =
                                 1 − 2r cos ω0 z −1 + r 2 z −2
      What happens if r = 1?
      Solution:
      (a) K2 = r 2 , K1 = − 2r1+r
                               cos ω0
                                  2 .
      (b) When r = 1, the system becomes an oscillator
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
Example 11: FIR filter
      Determine the impulse response of an FIR filter with reflection
      coefficients K1 = 0.6, K2 = 0.3, K3 = 0.5, K4 = 0.9.
      Solution:
      To find the impulse response h(n), we need the the system
      function H(z). But H(z) = A4 (z). We find the polynomial A4 (z)
      recursively.
      Recall:
              A0 (z) = B0 (z) = 1.
              Am (z) = Am−1 (z) + Km z −1 Bm−1 (z).
              Bm (z) = z −m A(z −1 )
                            A1 (z) = A0 (z) + K1 z −1 B0 (z) = 1 + 0.6z −1
                                         B1 (z) = 0.6 + z −1
DSP: Unit V — FIR Filters
  Lattice structure (IIR)
      Similarly,
                A2 (z) = A1 (z) + K2 z −1 B1 (z) = 1 + 0.78z −1 + 0.3z −2
                                 B2 (z) = 0.3 + 0.78z −1 + z −2
      and
       A3 (z) = A2 (z) + K3 z −1 B2 (z) = 1 + 0.93z −1 + 0.69z −2 + 0.5z −3
                            B3 (z) = 0.5 + 0.69z −1 + 0.93z −2 + z −3
      Finally,
      H(z) = A4 (z) = A3 (z)+K4 z −1 B3 (z) = 1+1.38z −1 +1.311z −2 +1.337z −3 +
      Thus the impulse response is
                               h(n) = {1, 0.38, 1.311, 1.337, 0.9}
DSP: Unit V — FIR Filters
  Summary
             To find reflection coefficients Km from system function H(z)
                     Extract Am (z) from system function H(z).
                     Am−1 (z) = Am (z)−K m Bm (z)
                                      1−Km2
                     Km = αm (m).
             To find system function H(z) from reflection coefficients Km
                     A0 (z) = B0 (z) = 1.
                     Am (z) = Am−1 (z) + Km z −1 Bm−1 (z).
                     Bm (z) = z −m A(z −1 )
                     H(z) = Am (z)
DSP: Unit V — FIR Filters
                            Thank you