14
DSP: IIR Cascaded Lattice Filters Digital Signal Processing IIR Cascaded Lattice Filters D. Richard Brown III D. Richard Brown III 1/8

Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

  • Upload
    buikiet

  • View
    229

  • Download
    5

Embed Size (px)

Citation preview

Page 1: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

Digital Signal ProcessingIIR Cascaded Lattice Filters

D. Richard Brown III

D. Richard Brown III 1 / 8

Page 2: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole IIR Lattice Structures

k3

−k3

k2

−k2

k1

−k1

A3(z) A2(z) A1(z)

B3(z) B2(z) B1(z)

x[n] y[n]

z−1z−1z−1

Analysis of single section:

Ai(z) = Ai+1(z) + kiz−1Bi(z)

Bi+1(z) = − kiAi(z) + z−1Bi(z)

We can rearrange this to write[Ai+1(z)Bi+1(z)

]=

[1 −kiz−1

−ki z−1

] [Ai(z)Bi(z)

]Note, in this example, X(z) = A4(z) and Y (z) = A1(z) = B1(z).

D. Richard Brown III 2 / 8

Page 3: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole IIR Lattice Structures: Lattice → TF

k3

−k3

k2

−k2

k1

−k1

A3(z) A2(z) A1(z)

B3(z) B2(z) B1(z)

x[n] y[n]

z−1z−1z−1

We can apply the result from the previous slide to write for this example[X(z)B4(z)

]=

[1 −k3z−1

−k3 z−1

] [1 −k2z−1

−k2 z−1

] [1 −k1z−1

−k1 z−1

] [Y (z)Y (z)

].

To determine the relationship between X(z) and Y (z), we can do a little bit of algebrato write

X(z) =(1 + [−k1(1− k2) + k2k3]z

−1 + [−k2 + k1k3(1− k2)]z−2 − k3z

−3)Y (z)

Hence H(z) = Y (z)X(z)

= 11+d1z−1+d2z−2+d3z−3 is an all-pole transfer function.

D. Richard Brown III 3 / 8

Page 4: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole Lattice → TF Procedure

Given the lattice coefficients k1, . . . , kM , we can compute the coefficientsof the M th order all-pole transfer function

H(z) =1

1− α(M)1 z−1 − α(M)

2 z−2 − · · · − α(M)M z−M

with the following procedure

See also Matlab function latc2tf. Note Matlab uses −ki.D. Richard Brown III 4 / 8

Page 5: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole Lattice → TF Example

Suppose k1 = 1, k2 = 2, and k3 = 3.

i = 1: α(1)1 = k1 = 1.

i = 2: α(2)2 = k2 = 2.

j = 1: α(2)1 = α

(1)1 − k2α

(1)1 = −1.

i = 3: α(3)3 = k3 = 3.

j = 1: α(3)1 = α

(2)1 − k3α

(2)2 = −7.

j = 2: α(3)2 = α

(2)2 − k3α

(2)1 = 5.

Hence the transfer function corresponding to this lattice structure is

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

Can confirm this in Matlab with[num,den] = latc2tf(-[1 2 3],’allpole’)

D. Richard Brown III 5 / 8

Page 6: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole Lattice → TF Example

Suppose k1 = 1, k2 = 2, and k3 = 3.

i = 1: α(1)1 = k1 = 1.

i = 2: α(2)2 = k2 = 2.

j = 1: α(2)1 = α

(1)1 − k2α

(1)1 = −1.

i = 3: α(3)3 = k3 = 3.

j = 1: α(3)1 = α

(2)1 − k3α

(2)2 = −7.

j = 2: α(3)2 = α

(2)2 − k3α

(2)1 = 5.

Hence the transfer function corresponding to this lattice structure is

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

Can confirm this in Matlab with[num,den] = latc2tf(-[1 2 3],’allpole’)

D. Richard Brown III 5 / 8

Page 7: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole Lattice → TF Example

Suppose k1 = 1, k2 = 2, and k3 = 3.

i = 1: α(1)1 = k1 = 1.

i = 2: α(2)2 = k2 = 2.

j = 1: α(2)1 = α

(1)1 − k2α

(1)1 = −1.

i = 3: α(3)3 = k3 = 3.

j = 1: α(3)1 = α

(2)1 − k3α

(2)2 = −7.

j = 2: α(3)2 = α

(2)2 − k3α

(2)1 = 5.

Hence the transfer function corresponding to this lattice structure is

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

Can confirm this in Matlab with[num,den] = latc2tf(-[1 2 3],’allpole’)

D. Richard Brown III 5 / 8

Page 8: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole Lattice → TF Example

Suppose k1 = 1, k2 = 2, and k3 = 3.

i = 1: α(1)1 = k1 = 1.

i = 2: α(2)2 = k2 = 2.

j = 1: α(2)1 = α

(1)1 − k2α

(1)1 = −1.

i = 3: α(3)3 = k3 = 3.

j = 1: α(3)1 = α

(2)1 − k3α

(2)2 = −7.

j = 2: α(3)2 = α

(2)2 − k3α

(2)1 = 5.

Hence the transfer function corresponding to this lattice structure is

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

Can confirm this in Matlab with[num,den] = latc2tf(-[1 2 3],’allpole’)

D. Richard Brown III 5 / 8

Page 9: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole TF → Lattice Procedure

Given the all-pole transfer function

H(z) =1

1− α(M)1 z−1 − α(M)

2 z−2 − · · · − α(M)M z−M

we can determine the lattice coefficients k1, . . . , kM with the followingprocedure

See also Matlab function tf2latc. Note Matlab will return −ki.D. Richard Brown III 6 / 8

Page 10: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole TF → Lattice Example

Suppose α(3)1 = −7, α

(3)2 = 5, and α

(3)3 = 3 so that

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

k3 = α(3)3 = 3.

i = 3:

j = 1: α(2)1 =

α(3)1 +k3α

(3)2

1−k23= −7+3·5

1−9= −1

j = 2: α(2)2 =

α(3)2 +k3α

(3)1

1−k23= 5+3·(−7)

1−9= 2

k2 = α(2)2 = 2

i = 2: α(2)2 = k2 = 2.

j = 1: α(1)1 =

α(2)1 +k2α

(2)1

1−k22= −1+2·(−1)

1−4= 1

k1 = α(1)1 = 1

Hence the lattice coefficients are k1 = 1, k2 = 2, and k3 = 3. You can confirm this inMatlab with k = tf2latc(1,[1 7 -5 -3]) where the sign of the Matlab latticecoefficients will be opposite of our convention.

D. Richard Brown III 7 / 8

Page 11: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole TF → Lattice Example

Suppose α(3)1 = −7, α

(3)2 = 5, and α

(3)3 = 3 so that

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

k3 = α(3)3 = 3.

i = 3:

j = 1: α(2)1 =

α(3)1 +k3α

(3)2

1−k23= −7+3·5

1−9= −1

j = 2: α(2)2 =

α(3)2 +k3α

(3)1

1−k23= 5+3·(−7)

1−9= 2

k2 = α(2)2 = 2

i = 2: α(2)2 = k2 = 2.

j = 1: α(1)1 =

α(2)1 +k2α

(2)1

1−k22= −1+2·(−1)

1−4= 1

k1 = α(1)1 = 1

Hence the lattice coefficients are k1 = 1, k2 = 2, and k3 = 3. You can confirm this inMatlab with k = tf2latc(1,[1 7 -5 -3]) where the sign of the Matlab latticecoefficients will be opposite of our convention.

D. Richard Brown III 7 / 8

Page 12: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole TF → Lattice Example

Suppose α(3)1 = −7, α

(3)2 = 5, and α

(3)3 = 3 so that

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

k3 = α(3)3 = 3.

i = 3:

j = 1: α(2)1 =

α(3)1 +k3α

(3)2

1−k23= −7+3·5

1−9= −1

j = 2: α(2)2 =

α(3)2 +k3α

(3)1

1−k23= 5+3·(−7)

1−9= 2

k2 = α(2)2 = 2

i = 2: α(2)2 = k2 = 2.

j = 1: α(1)1 =

α(2)1 +k2α

(2)1

1−k22= −1+2·(−1)

1−4= 1

k1 = α(1)1 = 1

Hence the lattice coefficients are k1 = 1, k2 = 2, and k3 = 3. You can confirm this inMatlab with k = tf2latc(1,[1 7 -5 -3]) where the sign of the Matlab latticecoefficients will be opposite of our convention.

D. Richard Brown III 7 / 8

Page 13: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

All-Pole TF → Lattice Example

Suppose α(3)1 = −7, α

(3)2 = 5, and α

(3)3 = 3 so that

H(z) =1

1 + 7z−1 − 5z−2 − 3z−3

k3 = α(3)3 = 3.

i = 3:

j = 1: α(2)1 =

α(3)1 +k3α

(3)2

1−k23= −7+3·5

1−9= −1

j = 2: α(2)2 =

α(3)2 +k3α

(3)1

1−k23= 5+3·(−7)

1−9= 2

k2 = α(2)2 = 2

i = 2: α(2)2 = k2 = 2.

j = 1: α(1)1 =

α(2)1 +k2α

(2)1

1−k22= −1+2·(−1)

1−4= 1

k1 = α(1)1 = 1

Hence the lattice coefficients are k1 = 1, k2 = 2, and k3 = 3. You can confirm this inMatlab with k = tf2latc(1,[1 7 -5 -3]) where the sign of the Matlab latticecoefficients will be opposite of our convention.

D. Richard Brown III 7 / 8

Page 14: Digital Signal Processing IIR Cascaded Lattice Filtersspinlab.wpi.edu/courses/ece503_2014/8-6iir_lattice.pdf · Digital Signal Processing IIR Cascaded Lattice Filters ... i coe cients

DSP: IIR Cascaded Lattice Filters

General IIR Lattice Structures

k3

−k3

k2

−k2

k1

−k1

v1 v2 v3 v4

A3(z) A2(z) A1(z)

B3(z) B2(z) B1(z)B4(z)

x[n]

y[n]

z−1z−1z−1

Note Y (z) = v1B4(z) + v2B3(z) + v3B2(z) + v4B1(z) in this example.The vi coefficients are called “ladder” coefficients.

Similar analysis as before can be applied to determine the TF from thelattice/ladder coefficients. See Matlab function latc2tf.

To get the lattice/ladder coefficients from the TF, you can use theGray-Markel method. See also Matlab function tf2latc.

D. Richard Brown III 8 / 8