Top Banner
1 DSP Chapter-4 : Filter Realization Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven [email protected] www.esat.kuleuven.be/stadius/ DSP 2016 / Chapter-4: Filter Realization 2 / 40 Filter Design Process Ste p-1 : Define filter specs Pass-band, stop-band, optimization criterion,Ste p-2 : Derive optimal transfer function FIR or IIR design Ste p-3 : Filter realization (block scheme/flow graph) Direct form realizations, lattice realizations,Ste p-4 : Filter implementation (software/hardware) Finite word-length issues, Question: implemented filter = designed filter ? ‘You can’t always get what you want’ -Jagger/Richards (?) Chapter-3 Chapter-4 Chapter-5
20

DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

Aug 02, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

1

DSP

Chapter-4 : Filter Realization

Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

[email protected] www.esat.kuleuven.be/stadius/

DSP 2016 / Chapter-4: Filter Realization 2 / 40

Filter Design Process

•  Step-1 : Define filter specs Pass-band, stop-band, optimization criterion,…

•  Step-2 : Derive optimal transfer function FIR or IIR design

•  Step-3 : Filter realization (block scheme/flow graph) Direct form realizations, lattice realizations,… •  Step-4 : Filter implementation (software/hardware)

Finite word-length issues, …

Question: implemented filter = designed filter ? ‘You can’t always get what you want’ -Jagger/Richards (?)

Chapter-3

Chapter-4

Chapter-5

Page 2: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

2

DSP 2016 / Chapter-4: Filter Realization 3 / 40

Chapter-4 : Filter Realization

•  FIR Filter Realization

•  IIR Filter Realization PS: Will always assume real-valued filter coefficients PS:

A: See Chapter-5 !

Q:Why bother about many different realizations for one and the same filter?

DSP 2016 / Chapter-4: Filter Realization 4 / 40

FIR Filter Realization

FIR Filter Realization =Construct (realize) LTI system (with delay elements,

adders and multipliers), such that I/O behavior is given by.. Several possibilities exist…

1. Direct form 2. Transposed direct form 3. Lattice realization (LPC lattice) 4. Lossless lattice realization

5. Frequency-domain realization: see Part-IV

y[k]= b0.u[k]+ b1.u[k −1]+...+ bL.u[k − L]

Page 3: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

3

DSP 2016 / Chapter-4: Filter Realization 5 / 40

FIR / 1. Direct Form

u[k] Δ Δ Δ Δ

u[k-4] u[k-3] u[k-2] u[k-1]

x bo

+

x b4

x b3

+

x b2

+

x b1

+ y[k]

y[k]= b0.u[k]+ b1.u[k −1]+...+ bL.u[k − L]

DSP 2016 / Chapter-4: Filter Realization 6 / 40

Starting point is direct form : `Retiming’ = select subgraph (shaded) remove one delay element on all inbound arrows add one delay element on all outbound arrows

FIR / 2. Transposed Direct Form

u[k] Δ Δu[k-1]

x bo

+

x b1

+ y[k]

Δ Δu[k-4] u[k-3]

x b4

x b3

+

x b2

+

u[k] Δ

Δ

u[k-1]

x bo

+

x b1

+ y[k]

Δ Δu[k-4] u[k-3]

x b4

x b3

+

x b2

+

Page 4: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

4

DSP 2016 / Chapter-4: Filter Realization 7 / 40

`Retiming’ : repeated application results in... i.e. `transposed direct form’ (=different software/hardware (`pipeline delays’), same i/o-behavior)

u[k]

x bo

+ y[k]

Δ Δ

x b1

+

x b2

+ Δ

x b3

+ Δ

x b4

FIR / 2. Transposed Direct Form

DSP 2016 / Chapter-4: Filter Realization 8 / 40

Derived from combined realization of… …with `flipped’ version of H(z)

Reversed (real-valued) coefficient vector results in... i.e. - same magnitude response - different phase response

!H (z) = z−L.H (z−1) : !y[k]= bL.u[k]+ bL−1.u[k −1]+...+ b0.u[k − L]

212)(...)(~).(~)(~ ωωω jjj ezezezzHzHzHzH

==

====

H (z) : y[k]= b0.u[k]+ b1.u[k −1]+...+ bL.u[k − L]

FIR / 3. Lattice Realization

Page 5: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

5

DSP 2016 / Chapter-4: Filter Realization 9 / 40

Starting point is direct form realization…

b4

u[k] u[k-1] Δ

u[k-2]

x b3

+

x b2

+

x

+

x

+

b1

u[k-3] Δ

x b1

+

b2 x

+

x b4

+

Δ

y[k]

bo x

+

u[k-4] Δ

x bo b3 x

y[k] ~

Now 1 page of maths…

FIR / 3. Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 10 / 40

With this can be rewritten as

Y (z)Y (z)

!

"##

$

%&&=

b4 b3 b2 b1 b0

b0 b1 b2 b3 b4

!

"##

$

%&&. 1 z−1 ... z−4!" $%

T.U(z)

κ0 =b4

b0

if (b0 ≠ 0) and ( κ0 ≠1)

Y (z)Y (z)

!

"##

$

%&&=

1 κ0

κ0 1

!

"##

$

%&&

0 b '3 b '2 b '1 b '0b '0 b '1 b '2 b '3 0

!

"

##

$

%

&&. 1 z−1 ... z−4!" $%

T.U(z)

=1 κ0

κ0 1

!

"##

$

%&&. z−1 0

0 1

!

"##

$

%&&.

b '3 b '2 b '1 b '0b '0 b '1 b '2 b '3

!

"##

$

%&&. 1 z−1 ... z−3!" $%

T.U(z)

b '0 = b0, b '1 =b1 −κ0b3

1−κ02 , b '2 =

b2 −κ0b2

1−κ02 , b '3 =

b3 −κ0b1

1−κ02

order reduction

PS: if |ko|=1, then transformation matrix is rank-deficient PS: find fix for case bo=0 1 κ0κ0 1

!

"##

$

%&&

FIR / 3. Lattice Realization

Page 6: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

6

DSP 2016 / Chapter-4: Filter Realization 11 / 40

This is equivalent to...

…Now repeat procedure for shaded graph (=same structure as the one we started from)

u[k] u[k-3] Δ

u[k-2]

x b’3

+

x b’2

+

x

+

x

+

b’o

u[k-2] Δ

x b’1

+

b’1 x

+

b’o

Δ

x b’2 x b’3

y[k]

+

+

x

x ko

y[k] ~Δ

FIR / 3. Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 12 / 40

Repeated application results in `lattice form’

u[k]

y[k]

+

+

x

x ko

+

+

x

x k1

Δ +

+

x

x k2

+

+

x

x k3

x bo y[k] ~

(= different software/hardware, same i/o-behavior)

explain

ΔΔΔ

FIR / 3. Lattice Realization

Page 7: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

7

DSP 2016 / Chapter-4: Filter Realization 13 / 40

•  Also known as `linear predictive coding (LPC) lattice‘ Ki’s are so-called `reflection coefficients’ Every set of bi’s corresponds to a set of Ki’s, and vice versa

•  Procedure for computing Ki’s from bi’s corresponds to the well-known `Schur-Cohn’ stability test (from control theory):

Problem = for a given polynomial B(z), how do we find out if all the zeros of B(z) are ‘stable’ (i.e. lie inside unit circle) ? Solution = from bi’s, compute reflection coefficients Ki’s (=procedure on previous slides). Zeros are (proved to be) stable iff all Ki’s statisfy |Ki|<1 !

•  Procedure (page 10) breaks down if |Ki|=1 is encountered. Then have to select other realization (direct form, lossless lattice, …) for B(z)

•  Lattice form not overly relevant at this point, but sets stage for similar derivations that lead to more relevant realizations (read on…)

FIR / 3. Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 14 / 40

Derived from combined realization of H(z)… …with …which is such that (*) PS : Interpretation ?… (see next slide)

PS : May have to scale H(z) to achieve this (why?) (scaling omitted here)

H (z) : y[k]= b0.u[k]+ b1.u[k −1]+...+ bL.u[k − L]

H (z) : y[k]= b0.u[k]+ b1.u[k −1]+...+ bL.u[k − L]

1)(~~).(

~~)().( 11 =+ −− zHzHzHzH

FIR / 4. Lossless Lattice Realization

Page 8: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

8

DSP 2016 / Chapter-4: Filter Realization 15 / 40

PS : Interpretation ? When evaluated on the unit circle, formula (*) is equivalent to (for filters with real-valued coefficients)

i.e. and are `power complementary’ (= form a 1-input/2-output `lossless’ system, see also below)

1)(~~)(

22

=+=

= ωω

jj

ezez

zHzH

)(~~ zH)(zH

ππ−

2

)(~~ ωjeH

2)( ωjeH

1

FIR / 4. Lossless Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 16 / 40

PS : How is computed ? Note that if zi (and zi*) is a root of R(z), then 1/zi (and 1/zi*) is also a root of R(z). Hence can factorize R(z) as… Note that zi’s can be selected such that all roots of lie inside the unit circle, i.e. is a minimum-phase FIR filter. This is referred to as spectral factorization, =spectral factor.

)(~~ zH

!! "!! #$)(

11 )().(1)(~~).(

~~

zR

zHzHzHzH −− −=

!!H (z). !!H (z−1) =α 2 (z−1 − zi )(z− zi )i∏ !!H (z) =α (z−1 − zi )

i∏

)(~~ zH

)(~~ zH

)(~~ zH

FIR / 4. Lossless Lattice Realization

Page 9: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

9

DSP 2016 / Chapter-4: Filter Realization 17 / 40

Starting point is direct form realization…

u[k] u[k-1] Δ

u[k-2]

x

+

x

+

x

+

x

+

u[k-3] Δ

x

+

x

+

x

+

Δ

y[k]

x

+

u[k-4] Δ

x b1 b2 b3 bo b4 x

4

~~b0

~~b 1

~~b 2

~~b 3

~~b

y[k] ~~

Now 1 page of maths…

FIR / 4. Lossless Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 18 / 40

From (*) (page 14), it follows that (**) Hence there exists a rotation angle θo such that Y (z)Y (z)

!

"

##

$

%

&&=

cosθ0 −sinθ0

sinθ0 cosθ0

!

"##

$

%&&

0 b '0 b '1 b '2 b '3b '0 b '1 b '2 b '3 0

!

"

##

$

%

&&. 1 z−1 ... z−4!" $%

T.U(z)

=cosθ0 −sinθ0

sinθ0 cosθ0

!

"##

$

%&&. z−1 0

0 1

!

"##

$

%&&.b '0 b '1 b '2 b '3b '0 b '1 b '2 b '3

!

"

##

$

%

&&

1 z−1 ... z−3!" $%T.U(z)

b0.b4 + b0. b4 = 0 ⇒ b0 b0

"

#$

%

&' .

b4

b4

"

#

$$

%

&

''= 0 ⇒

b0

b0

"

#

$$

%

&

''⊥b4

b4

"

#

$$

%

&

''

Y (z)Y (z)

!

"

##

$

%

&&=b0b1b2b3b4

b0 b1 b2 b3 b4

!

"

##

$

%

&&. 1 z−1 ... z−4!" $%

T.U(z)

(**) 1= H (z).H (z−1)+ !!H (z). !!H (z−1) = (b0.b4 + !!b0. !!b4 )

0" #$$ %$$ .(z4 + z−4 )+ (..)

0!.(z3 + z−3)+...+ (..)

1!.z0

= orthogonal vectors

order reduction

FIR / 4. Lossless Lattice Realization

Page 10: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

10

DSP 2016 / Chapter-4: Filter Realization 19 / 40

This is equivalent to...

Now shaded graph can again be proved (***) to be power complementary system (Intuition? Hint: p.21).

Hence can repeat procedure…

u[k] u[k-3] Δ

u[k-2]

x

+

x

+

x

+

x

+

u[k-2] Δ

x

+

x

+

b’o b’1 b’2 b’3

Δ

x x

y[k]

0cosθ

+

+

x Δx

x x

0sinθ

0cosθ

y[k] ~~

0sinθ−

(***) 1= H (z−1) H (z−1)"

#$

%

&'.H (z)H (z)

"

#

$$

%

&

''= H⊗ (z−1) H⊗ (z−1)"

#$

%

&'.

z 00 1

"

#$

%

&'.

cosθ0 sinθ0

−sinθ0 cosθ0

"

#$$

%

&''.

cosθ0 −sinθ0

sinθ0 cosθ0

"

#$$

%

&''. z−1 0

0 1

"

#$$

%

&''.H⊗ (z)H⊗ (z)

"

#

$$

%

&

''= H⊗ (z−1) H⊗ (z−1)"

#$

%

&'.H⊗ (z)H⊗ (z)

"

#

$$

%

&

''

FIR / 4. Lossless Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 20 / 40

Repeated application results in `lossless lattice’

explain

2cosθ

+

+

x x

x x

2sinθ

2cosθ

2sinθ−

y[k]

0cosθ

+

+

x x

x x

0sinθ

0cosθ

y[k] ~~

0sinθ−

Δ

u[k]

4sinθ

4cosθ

x

x 1cosθ

+

+

x x

x x

1sinθ

1cosθ

1sinθ−

ΔΔ

3cosθ

+

+

x x

x x

3sinθ

3cosθ

3sinθ−

Δ

FIR / 4. Lossless Lattice Realization

Page 11: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

11

DSP 2016 / Chapter-4: Filter Realization 21 / 40

22

21

22

21

2

1

2

1 )()()()(.cossinsincos

OUTOUTININININ

OUTOUT

+=+⇒⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡ −=⎥

⎤⎢⎣

θθ

θθ

Lossless lattice : •  Also known as `paraunitary lattice‘

•  Each 2-input/2-output section is based on an orthogonal transformation, which preserves norm/energy/power

i.e. forms a 2-input/2-output `lossless’ system (=time-domain view)

Overall system is realized as cascade of lossless sections (+delays), hence is itself also `lossless’ (see p.15, =freq-domain view)

FIR / 4. Lossless Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 22 / 40

PS : Can be generalized to 1-input N-output lossless systems (will be used in Part-IV) (compare to p.20 !)

21,θθ u[k]

explain/derive!

x

x

x

y[k]

Δ

2cosθ

+

+

x x

x x

2sinθ

2cosθ

2sinθ−1cosθ

+

+

x x

x x

1cosθ

1sinθ−

1sinθ

43,θθ 65 ,θθ

Δ

y[k] ~

y[k] ~~

Δ

1)(~~).(

~~)(~).(~)().( 111 =++ −−− zHzHzHzHzHzH

N=3

FIR / 4. Lossless Lattice Realization

Page 12: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

12

DSP 2016 / Chapter-4: Filter Realization 23 / 40

IIR Filter Realization

IIR Filter Realization =Construct (realize) LTI system (with delay elements, adders

and multipliers), such that I/O behavior is given by.. Several possibilities exist… 1. Direct form 2. Transposed direct form PS: Parallel and cascade realization 4. Lattice-ladder realization 5. Lossless lattice realization

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

=b0 + b1z

−1 +...+ bLz−L

1+ a1z−1 +...+ aLz

−L

DSP 2016 / Chapter-4: Filter Realization 24 / 40

PS : If all ai=0 (i.e. H(z) is FIR), then this reduces to a direct form FIR

IIR / 1. Direct Form H (z) = B(z)

A(z)=b0 + b1z

−1 +...+ bLz−L

1+ a1z−1 +...+ aLz

−L

Δ Δ Δ Δ

x bo

x b4

x b3

x b2

x b1

+ + + + y[k]

u[k] + + + +

x -a4

x -a3

x -a2

x -a1

=1A(z)

= B(z)in direct form

Page 13: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

13

DSP 2016 / Chapter-4: Filter Realization 25 / 40

Transposed direct form is similarly easily obtained (after retiming ...)

PS : If all ai=0 (i.e. H(z) is FIR), then this reduces to a transposed direct form FIR

= B(z)in transp.direct form

=1A(z)

Δ Δ Δ Δ

x -a4

x -a3

x -a2

x -a1

y[k]

u[k]

x bo

x b4

x b3

x b2

x b1

+ + + +

IIR / 2. Transposed Direct Form

DSP 2016 / Chapter-4: Filter Realization 26 / 40

•  Parallel realization based on partial fraction decomposition

–  Each term realized in, e.g., direct form –  Transmission zeros are realized iff signals from different sections exactly cancel out (=difficult in finite word-length implementation)

•  Cascade realization based on pole-zero factorization

–  Each section(‘biquad’) realized in, e.g., direct form –  Cascade realization is not unique (details omitted) (=multiple ways of pairing poles and zeros (need for ‘pairing procedures’) and multiple ways of ordering sections in cascade)

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

= c0 +αi

1+βiz−1

i=1

L1

∑ +γ1 +δiz

−1

1+ε1z−1 +ϕNz

−2i=1

L2

∑u[k]

y[k]

+

+

IIR / PS: Parallel & Cascade Realization

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

= b0.1+αi.z

−1 +βi.z−2

1+γ i.z−1 +δi.z

−2i=1

L/2

∏u[k]

y[k]

For s

impl

e po

les

For L

eve

n

Page 14: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

14

DSP 2016 / Chapter-4: Filter Realization 27 / 40

Derived from combined realization of with… - Numerator polynomial is denominator polynomial with reversed coefficient vector (see also p.8)

- Hence is an `all-pass’ (=`SISO lossless’) filter :

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

=b0 + b1z

−1 +...+ bLz−L

1+ a1z−1 +...+ aLz

−L

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

=aL + aL−1z

−1 +...+1.z−L

1+ a1z−1 +...+ aLz

−L

H (z). H (z−1) =1 H (z)z=e jω

2=A(z)

z=e jω

2

A(z)z=e jω2 =1

)(~ zH

IIR / 3. Lattice-Ladder Realization

DSP 2016 / Chapter-4: Filter Realization 28 / 40

Starting point is direct form realization…

u[k]

+ +

x x b1

+

b2 x

+

b0 x b3 x b4 x x a3 x a2 x a1 x 1

Δ ΔΔ Δ

x a1 x a2 x a3 x a4

+ + + +

+ + + +

y[k] y[k] ~

a4

x[k]

-

Now 1 page (full) of maths…

will

use

‘s

tate

vec

tor’

IIR / 3. Lattice-Ladder Realization

Page 15: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

15

DSP 2016 / Chapter-4: Filter Realization 29 / 40

U(z)Y (z)Y (z)

!

"

####

$

%

&&&&

=

1 a1 a2 a3 a4

a4 a3 a2 a1 1b0 b1 b2 b3 b4

!

"

####

$

%

&&&&

. 1 z−1 ... z−4!" $%T.X(z)

1 0 00 1 00 −b4 1

!

"

###

$

%

&&&.U(z)Y (z)Y (z)

!

"

####

$

%

&&&&

=

1 a1 a2 a3 a4

a4 a3 a2 a1 1b '0 b '1 b '2 b '3 0

!

"

####

$

%

&&&&

. 1 z−1 ... z−4!" $%T.X(z)

with b '0 = b0 − b4a4, b '1 = b1 − b4a3, b '2 = b2 − b4a2, b '3 = b3 − b4a1

Now proceed as on page 11 (FIR lattice)

κ0 =a4

a0

=a4

1 (a0 =1≠ 0) if κ0 ≠1 (see also next page) :

1 0 00 1 00 −b4 1

!

"

###

$

%

&&&.U(z)Y (z)Y (z)

!

"

####

$

%

&&&&

=

1 κ0 0κ0 1 00 0 1

!

"

####

$

%

&&&&

.1 a '1 a '2 a '3 00 a '3 a '2 a '1 1b '0 b '1 b '2 b '3 0

!

"

####

$

%

&&&&

. 1 z−1 ... z−4!" $%T.X(z)

1 0 00 1 00 −b4 1

!

"

###

$

%

&&&.U(z)Y (z)Y (z)

!

"

####

$

%

&&&&

=

1 κ0 0κ0 1 00 0 1

!

"

####

$

%

&&&&

.1 0 00 z−1 00 0 1

!

"

###

$

%

&&&.

1 a '1 a '2 a '3a '3 a '2 a '1 1b '0 b '1 b '2 b '3

!

"

####

$

%

&&&&

1 z−1 ... z−3!" $%T.X(z)

a '0 = a0 =1, a '1 =a1 − a4a3

1− a42 , a '2 =

a2 − a4a2

1− a42 , a '3 =

a3 − a4a1

1− a42

order reduction

IIR / 3. Lattice-Ladder Realization

If A(z) = stable polynomial (should be!), Then |Ko|<1 (cfr.Shur-Cohn). Hence define

sinθ0 =κ0, cosθ0 = 1− (κ0 )2 ( ≠ 0)

1 0 00 1 00 −b4 1

"

#

$$$

%

&

'''.U(z)Y (z)Y (z)

"

#

$$$$

%

&

''''

=

1 sinθ0 0sinθ0 1 0

0 0 1

"

#

$$$$

%

&

''''

.1 0 00 z−1 00 0 1

"

#

$$$

%

&

'''.

1 a '1 a '2 a '3a '3 a '2 a '1 1b '0 b '1 b '2 b '3

"

#

$$$$

%

&

''''

1 z−1 ... z−3"# %&T.X(z)

=

1cosθ0

sinθ0

cosθ0

0

sinθ0

cosθ0

1cosθ0

0

0 0 1

"

#

$$$$$$$$

%

&

''''''''

.1 0 00 z−1 00 0 1

"

#

$$$

%

&

'''.

1 a '1 a '2 a '3a '3 a '2 a '1 1b '0

cosθ0

b '2cosθ0

b '2cosθ0

b '3cosθ0

"

#

$$$$$$

%

&

''''''

1 z−1 ... z−3"# %&T.cosθ0.X(z)=Δ

X⊗ (z)

U⊗ (z)Y⊗ (z)Y⊗ (z)

"

#

$$$$

%

&

''''

Rearrange the first 2 rows U(z)Y (z)

!

"##

$

%&&=

1cosθ0

sinθ0

cosθ0

sinθ0

cosθ0

1cosθ0

!

"

#####

$

%

&&&&&

.U⊗ (z)

z−1. Y⊗ (z)

!

"

##

$

%

&& into

U⊗ (z)Y (z)

!

"

##

$

%

&&=

cosθ0 −sinθ0

sinθ0 cosθ0

!

"##

$

%&&.

U(z)z−1. Y⊗ (z)

!

"

##

$

%

&& Skip this slide

DSP 2016 / Chapter-4: Filter Realization 30 / 40

Then this is equivalent to…

+ +

x x

+

x x x x x x

Δ Δ

Δ

Δ

+ + +

u[k]

y[k]

y[k] ~

b4 x

4.411.43

aaaaa

−4.412.42

aaaaa

−4.413.41

aaaaa

− 1

b0− b4.a41− a4.a4

b1− b4.a31− a4.a4

b2− b4.a21− a4.a4

b3− b4.a11− a4.a4

x x x

+ + + -

4.413.41

aaaaa

4.412.42

aaaaa

4.411.43

aaaaa

x

x

x

+

0cosθ

+

x 0sinθ−

0sinθ

0cosθ

+

u⊗[k]

y⊗[k]

y⊗[k]

x⊗[k]

IIR / 3. Lattice-Ladder Realization

Page 16: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

16

DSP 2016 / Chapter-4: Filter Realization 31 / 40

Procedure can be repeated (explain), leads to `lattice-ladder form’

y[k]

b4 x

+

b3’ x

+

b2’’ x

+

b1’’’ x

+

x

‘ladd

er p

art’

u[k]

y[k] ~ Δx

x

x

+

0cosθ

+

x 0sinθ−

0sinθ

0cosθ

Δx

x

x

+

cosθ1

+

x −sinθ1

sinθ1

cosθ1

Δx

x

x

+

cosθ2

+

x −sinθ2

sinθ2

cosθ2

Δx

x

x

+

cosθ3

+

x −sinθ3

sinθ3

cosθ3

‘latti

ce p

art’

IIR / 3. Lattice-Ladder Realization

DSP 2016 / Chapter-4: Filter Realization 32 / 40

PS: Similar derivation leads to 2nd ‘lattice-ladder’ form

y[k]

b0 x

+

b1’ x

+

b2’’ x

+

b3’’’ x

+

x

‘ladd

er p

art’

u[k]

y[k] ~

Δ

x

x

x

+

0cosθ

+

x 0sinθ−

0sinθ

0cosθ

Δ

x

x

x

+

cosθ1

+

x −sinθ1

sinθ1

cosθ1

Δ

x

x

x

+

cosθ2

+

x −sinθ2

sinθ2

cosθ2

Δ

x

x

x

+

cosθ3

+

x −sinθ3

sinθ3

cosθ3

‘latti

ce p

art’

IIR / 3. Lattice-Ladder Realization

Page 17: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

17

DSP 2016 / Chapter-4: Filter Realization 33 / 40

•  Ki’s (=sin(thetai) !) are `reflection coefficients’

•  Procedure for computing Ki’s from ai’s again corresponds to `Schur-Cohn’ stability test

•  Orthogonal transformations correspond to 2-input/2-output `lossless’ sections (=time-domain view).

Cascade of lossless sections (+delays) is also `lossless’, i.e. `all-pass’ (see p.27, =freq-domain view)

22

21

22

21

2

1

2

1 )()()()(.cossinsincos

OUTOUTININININ

OUTOUT

+=+⇒⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

−=⎥

⎤⎢⎣

θθ

θθ

IIR / 3. Lattice-Ladder Realization

DSP 2016 / Chapter-4: Filter Realization 34 / 40

PS : Note that the all-pass part corresponds to A(z) (i.e. L angles θi correspond to L coeffs

ai) while the ladder part corresponds to B(z). If all ai=0 (i.e. H(z) is FIR), then all θi=0, hence the all-pass part reduces to a delay line, and the lattice-ladder form reduces to a direct-form FIR.

PS : `All-pass’ part (SISO u[k]->y[k]) is known as `Gray-Markel’ structure

u[k]

y[k] ~ Δx

x

x

+

0cosθ

+

x 0sinθ−

0sinθ

0cosθ

Δx

x

x

+

cosθ1

+

x −sinθ1

sinθ1

cosθ1

Δx

x

x

+

cosθ2

+

x −sinθ2

sinθ2

cosθ2

Δx

x

x

+

cosθ3

+

x −sinθ3

sinθ3

cosθ3

~

IIR / 3. Lattice-Ladder Realization

Page 18: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

18

DSP 2016 / Chapter-4: Filter Realization 35 / 40

Derived from combined realization of (possibly rescaled, as on p.14)

with...

such that… (**) i.e. and are `power complementary’ (p.15)

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

=b0 + b1z

−1 +...+ bLz−L

1+ a1z−1 +...+ aLz

−L

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

=b0 + b1.z

−1 +...+ bL.z−L

1+ a1z−1 +...+ aLz

−L

)(~~ zH )(zH

H (z).H (z−1)+ H (z). H (z−1) =1

⇒ B(z).B(z−1)+ B(z). B(z−1) = A(z).A(z−1)

IIR / 4. Lossless Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 36 / 40

Starting point is direct form realization…

u[k]

+ +

x x b1

+

b2 x

+

b0 x b3 x b4 x x x x x

Δ ΔΔ Δ

x a1 x a2 x a3 x a4

+ + + +

+ + + +

y[k] y[k] ~

x[k]

-

will

use

‘s

tate

vec

tor’

4

~~b0

~~b 1

~~b 2

~~b 3

~~b

IIR / 4. Lossless Lattice Realization

Now 1 page (full) of maths…

Page 19: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

19

DSP 2016 / Chapter-4: Filter Realization 37 / 40

PS: right-hand side of (o) has modulus <1 (hence |sinθo|≠1, cosθo≠0) which follows from ‘modulus property’ for (**) p.35:

if (**) for H(z) H(z)!

"#

$

%& non-constant (i.e. order ≥1) and for A(z) stable, then:

H (z = 0) 2+ H (z = 0)

2

>1 ⇒ (b4

a4

)2 +(b4

a4

)2 >1 ⇒ a4

( b4 )2 + (b4 )2<1

U(z)Y (z)Y (z)

!

"

####

$

%

&&&&

=

a0 a1 a2 a3 a4

b0b1b2b3b4

b0 b1 b2 b3 b4

!

"

####

$

%

&&&&

. 1 z−1 ... z−4!" $%T.X(z)

=1 0 00 cosψ0 −sinψ0

0 sinψ0 cosψ0

!

"

###

$

%

&&&.

a0 a1 a2 a3 a4

b '0 b '1 b '2 b '3 b '4b '0 b '1 b '2 b '3 0

!

"

####

$

%

&&&&

. 1 z−1 ... z−4!" $%T.X(z)

for sinψ0

cosψ0

=b4

b4

and b '4 = ( b4 )2 + (b4 )2

=1 0 00 cosψ0 −sinψ0

0 sinψ0 cosψ0

!

"

###

$

%

&&&.

1cosθ0

sinθ0

cosθ0

0

sinθ0

cosθ0

1cosθ0

0

0 0 1

!

"

########

$

%

&&&&&&&&

.

a '0 a '1 a '2 a '3 0

b"0b"1

b"2b"3

b"4

b '0 b '1 b '2 b '3 0

!

"

#####

$

%

&&&&&

. 1 z−1 ... z−4!" $%T.X(z)

for sinθ0 =a4

b '4=

a4

( b4 )2 + (b4 )2 (o) and b"4 = ... = ( b4 )2 + (b4 )2 − (a4 )2

IIR / 4. Lossless Lattice Realization

Now it is proved that

From (**) p.35 it follows that b"0 = 0

b0.b4 + b0. b4 = a0.a4 ⇒ a0

b0 b0

"

#$

%

&'

−1 0 00 1 00 0 1

"

#

$$$

%

&

''' .

a4

b4

b4

"

#

$$$$

%

&

''''

= 0

⇒ ... plug in transformations with θ0 and ψ0...

⇒ a '0 b"0 b '0"

#$

%

&'

−1 0 00 1 00 0 1

"

#

$$$

%

&

''' .

0b"4

0

"

#

$$$$

%

&

''''

= 0

⇒ b"0 = 0 (cfr. b"4 ≠ 0)

= ‘o

rthog

onal

’ vec

tors

This leads to

U(z)Y (z)Y (z)

!

"

####

$

%

&&&&

=1 0 00 cosψ0 −sinψ0

0 sinψ0 cosψ0

!

"

###

$

%

&&&.

1cosθ0

sinθ0

cosθ0

0

sinθ0

cosθ0

1cosθ0

0

0 0 1

!

"

########

$

%

&&&&&&&&

.1 0 00 z−1 00 0 1

!

"

###

$

%

&&&.

a '0 a '1 a '2 a '3b"1

b"2b"3

b"4

b '0 b '1 b '2 b '3

!

"

####

$

%

&&&&

. 1 z−1 ... z−3!" $%T.X(z)

order reduction Skip this slide

DSP 2016 / Chapter-4: Filter Realization 38 / 40

Rearranging rows, etc.., and repeating the order-reduction

process, leads to…

Δ Δ Δ

x

u[k]

y[k] y[k] ~

x Nψsin

Nψcos

0cosψ

+

+

x x

x x

0cosψ

0sinψ−

0sinψ

x

x

x

+

x

0cosθ

0cosθ

sinθ0

0sinθ−

+

IIR / 4. Lossless Lattice Realization

Page 20: DSP - KU Leuventvanwate/courses/alari...• Step-2 : Derive optimal transfer function FIR or IIR design • Step-3 : Filter realization (block scheme/flow graph) Direct form realizations,

20

DSP 2016 / Chapter-4: Filter Realization 39 / 40

•  Orthogonal transformations correspond to (3-input 3-output) `lossless sections‘

Overall system is realized as cascade of lossless sections

(+delays), hence is itself also `lossless‘

•  PS : If all ai=0 (i.e. H(z) is FIR), then all θi=0 and then this reduces to FIR lossless lattice

•  PS : If all φi=0, then this reduces to Gray-Markel structure

23

22

21

23

22

21

3

2

1

3

2

1

)()()()()()(

..........

OUTOUTOUTINININ

INININ

OUTOUTOUT

++=++⇒

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

=

⎥⎥⎥

⎢⎢⎢

! !

IIR / 4. Lossless Lattice Realization

DSP 2016 / Chapter-4: Filter Realization 40 / 40

PS : Can be generalized to 1-input N-output lossless systems (=combine p.22 & p.38 !)

x

x

x

y[k]

Δ

2cosθ

+

+

x x

x x

2sinθ

2cosθ

2sinθ−1cosθ

+

+

x x

x x

1cosθ

1sinθ−

1sinθ

Δ

y[k] ~

y[k] ~~

x

x

x

+

x

0cosθ

0cosθ

00 sinθ=k

0sinθ−

+

u[k]

IIR / 4. Lossless Lattice Realization