digital signal processing, fall 2006 - aalborg universitetkom.aau.dk/~zt/courses/dsp/mm6/digital...
TRANSCRIPT
1
Digital Signal Processing, VI, Zheng-Hua Tan, 20061
Digital Signal Processing, Fall 2006
Zheng-Hua Tan
Department of Electronic Systems Aalborg University, Denmark
Lecture 6: System structures for implementation
Digital Signal Processing, VI, Zheng-Hua Tan, 20062
Course at a glance
Discrete-time signals and systems
Fourier-domain representation
DFT/FFT
Systemanalysis
Filter design
z-transform
MM1
MM2
MM9, MM10MM3
MM6
MM4
MM7, MM8
Sampling andreconstruction MM5
Systemstructure
System
2
Digital Signal Processing, VI, Zheng-Hua Tan, 20063
System implementation
LTI systems with rational system function e.g.
Impulse response
Linear constant-coefficient difference equation
Three equivalent representations!How to implement, i.e. convert to an algorithm or
structure?
|||| ,1
)( 1
110 az
azzbbzH >
−+
= −
−
]1[][][ 110 −+= − nuabnuabnh nn
]1[][]1[][ 10 −+=−− nxbnxbnayny
Digital Signal Processing, VI, Zheng-Hua Tan, 20064
System implementation
The input-output transformation x[n] y[n] can be computed in different ways – each way is called an implementation
An implementation is a specific description of its internal computational structureThe choice of an implementation concerns with
computational requirementsmemory requirements,effects of finite-precision,and so on
3
Digital Signal Processing, VI, Zheng-Hua Tan, 20065
Part I: Block diagram representation
Block diagram representation of computational structuresSignal flow graph descriptionBasic structures for IIR systems Transposed formsBasic structures for FIR systems
Digital Signal Processing, VI, Zheng-Hua Tan, 20066
System implementation
Impulse response
is infinite-duration, impossible to implement in this way.
However, linear constant-coefficient difference equation provides a means for recursive computation of the output
][*][][]1[][][ 1
10
nhnxnynuabnuabnh nn
=−+= −
]1[][]1[][]1[][]1[][
10
10
−++−=−+=−−
nxbnxbnaynynxbnxbnayny
4
Digital Signal Processing, VI, Zheng-Hua Tan, 20067
Basic elements
Implementation based on the recurrence formula derived from difference equation requires
addersmultipliersmemory for storing delayed sequence values
Fig. 6.1
]1[][]1[][ 10 −++−= nxbnxbnayny
Digital Signal Processing, VI, Zheng-Hua Tan, 20068
Example of block diagram representation
A second-order difference equation
22
11
0
1)( −− −−=
zazabzH
][]2[]1[][ 021 nxbnyanyany +−+−=
Demonstrates thecomplexity, the steps, the amount of resourcesrequired.
5
Digital Signal Processing, VI, Zheng-Hua Tan, 20069
General Nth-order difference equation
∑
∑
=
−
=
−
−= N
k
kk
M
k
kk
za
zbzH
1
0
1)(
∑∑==
−+−=M
kk
N
kk knxbknyany
01
][][][
][nv
A cascade of two systems!X[n] v[n], v[n] y[n]
Digital Signal Processing, VI, Zheng-Hua Tan, 200610
Rearrangement of block diagram
A block diagram can be rearranged in many wayswithout changing overal function, e.g. by reversingthe order of the two cascaded systems.
6
Digital Signal Processing, VI, Zheng-Hua Tan, 200611
System function decomposition
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
−⎟⎠
⎞⎜⎝
⎛==
⎟⎠
⎞⎜⎝
⎛
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
−==
−=
∑∑
∑∑∑
∑
=
−=
−
=
−
=
−
=
−
=
−
N
k
kk
M
k
kk
M
k
kkN
k
kk
N
k
kk
M
k
kk
zazbzHzH
zbza
zHzH za
zbzH
1
021
0
1
12
1
0
1
1)()(
1
1)()(1
)(
][nv
][nw
Digital Signal Processing, VI, Zheng-Hua Tan, 200612
In the time domain
⎪⎪⎩
⎪⎪⎨
⎧
+−=
−=
−+−=
∑
∑
∑∑
=
=
==
][][][
][][
][][][
1
0
01
nvknyany
knxbnv
knxbknyany
N
kk
M
kk
M
kk
N
kk
⎪⎪⎩
⎪⎪⎨
⎧
−=
+−=
∑
∑
=
=
][][
][][][
0
1M
kk
N
kk
knwbny
nxknwanw
7
Digital Signal Processing, VI, Zheng-Hua Tan, 200613
Minimum delay implementation
One big difference btw the two implementationsconcerns the number of delay elements
),max( MNMN +
Digital Signal Processing, VI, Zheng-Hua Tan, 200614
Direct form I and II
Direct form I as shown in Fig. 6.3A direct realization of the difference equation
Direct form II or canonic direct form as shown in Fig. 6.5
There is a direct link between the system function (difference equation) and the block diagram
8
Digital Signal Processing, VI, Zheng-Hua Tan, 200615
An example
Direct form I and direct form II implementation
21
1
9.05.1121)( −−
−
+−+
=zz
zzH
Digital Signal Processing, VI, Zheng-Hua Tan, 200616
Part II: Signal flow graph description
Block diagram representation of computational structuresSignal flow graph descriptionBasic structures for IIR systems Transposed formsBasic structures for FIR systems
9
Digital Signal Processing, VI, Zheng-Hua Tan, 200617
Signal flow graph (SFG)
As an alternative to block diagrams with a few notational differences.A network of directed branches connecting nodes.
variable
Digital Signal Processing, VI, Zheng-Hua Tan, 200618
Signal flow graph Nodes in SFG representboth branching points and adders (dependingon the number ofincoming branches), while in the diagram a special symbol is usedfor adders and a node has only one incomingbranch.
SGF is simpler to draw.
10
Digital Signal Processing, VI, Zheng-Hua Tan, 200619
From flow graph to system function
Fig. 6.12
Not a direct form, cannot obtain H(z) by inspection.But can write an equation for each node
involve feedback, difficult to solveBy z-transform linear equations
][][][]1[][
][][][][][
][][][
42
34
23
12
41
nwnwnynwnw
nxnwnwnwnw
nxnwnw
+=−=+=
=−=
α
]1[][ 34 −= nwnw
Digital Signal Processing, VI, Zheng-Hua Tan, 200620
From flow graph to system function
⎪⎪⎪
⎩
⎪⎪⎪
⎨
⎧
+==
+==
−=
−
)()()()()(
)()()()()(
)()()(
42
31
4
23
12
41
zWzWzYzWzzW
zXzWzWzWzW
zXzWzWα
⎪⎪⎩
⎪⎪⎨
⎧
+=+=
−=
−
)()()())()(()(
))()(()(
42
21
4
42
zWzWzYzXzWzzW
zXzWzW α
][]1[][1
)(
)(1
)(
11
1
1
1
1
nununhz
zzH
zXz
zzY
nn +−
−
−
−
−
−−=−−
=
⎟⎟⎠
⎞⎜⎜⎝
⎛
−−
=
αααα
αα
? is system thereal, is If α All-pass
Causal!
11
Digital Signal Processing, VI, Zheng-Hua Tan, 200621
From flow graph to system function
Fig. 6.13
Fig. 6.12
Different implementations, different amounts of computational resources
Digital Signal Processing, VI, Zheng-Hua Tan, 200622
Part III: Basic structures for IIR systems
Block diagram representation of computational structuresSignal flow graph descriptionBasic structures for IIR systemsTransposed formsBasic structures for FIR systems
12
Digital Signal Processing, VI, Zheng-Hua Tan, 200623
Direct form I
∑
∑
=
−
=
−
−= N
k
kk
M
k
kk
za
zbzH
1
0
1)(
∑∑==
−+−=M
kk
N
kk knxbknyany
01
][][][
Digital Signal Processing, VI, Zheng-Hua Tan, 200624
Direct form II
∑
∑
=
−
=
−
−= N
k
kk
M
k
kk
za
zbzH
1
0
1)(
∑∑==
−+−=M
kk
N
kk knxbknyany
01
][][][
13
Digital Signal Processing, VI, Zheng-Hua Tan, 200625
Example
21
21
125.0752.0121)( −−
−−
+−++
=zz
zzzH
Digital Signal Processing, VI, Zheng-Hua Tan, 200626
Cascade form
Factor the numerator and denominator polynomials
∏∏
∏∏
∑
∑
=
−−
=
−
=
−−
=
−
=
−
=
−
−−−
−−−=
−=
21
21
1
1*1
1
1
1
1*1
1
1
1
0
)1)(1()1(
)1)(1()1(
1)( N
kkk
N
kk
M
kkk
M
kk
N
k
kk
M
k
kk
zdzdzc
zgzgzfA
za
zbzH
∏=
−−
−−
−−++
=sN
k kk
kkk
zazazbzbb
zH1
22
11
22
110
1)(
14
Digital Signal Processing, VI, Zheng-Hua Tan, 200627
An example: from 2nd-order to 1st-order cascade
)25.01( )5.01( )1( )1(
125.0752.0121)( 11
11
21
21
−−
−−
−−
−−
−⋅−+⋅+
=+−++
=zz
zzzz
zzzH
Digital Signal Processing, VI, Zheng-Hua Tan, 200628
Parallel form by partial fraction expansion
∑
∑∑
=−−
−
=−
=
−
−−
−+
−+=
2
1
11*1
1
11
0
)1)(1()1(
1)(
N
k k
k
N
k k
kN
k
kk
zdzdzeB
zcA
zCzH
k
k
p
15
Digital Signal Processing, VI, Zheng-Hua Tan, 200629
Feedback in IIR systems
Feedback loop: a closed pathNecessary but not sufficient condition for IIR system (Feedback introduced polescould be cancelled by zeros)
All loops must contain at leastone unit delay element
11
22
11
1)( −−
−
+=−−
= azaz
zazH
][nuan
)1/(][][][][][
anxnynxnayny
−=+=
Digital Signal Processing, VI, Zheng-Hua Tan, 200630
Part IV: Transposed forms
Block diagram representation of computational structuresSignal flow graph descriptionBasic structures for IIR systems Transposed formsBasic structures for FIR systems
16
Digital Signal Processing, VI, Zheng-Hua Tan, 200631
Transposed form for a first-order system
Flow graph reversal or transposition also provides alternatives: reversing the directions of all branches and reversing the input and output
Resulting in same H(z)
111)( −−
=az
zH
Digital Signal Processing, VI, Zheng-Hua Tan, 200632
Transposed direct form II and direct form II
The transposed direct form II implements the zeros first and then the poles, being important effect for finite-precision existing
17
Digital Signal Processing, VI, Zheng-Hua Tan, 200633
Part V: Basic structures for FIR systems
Block diagram representation of computational structuresSignal flow graph descriptionBasic structures for IIR systems Transposed formsBasic structures for FIR systems
Digital Signal Processing, VI, Zheng-Hua Tan, 200634
Direct form
So far, system function has both poles and zeros. FIR systems as a special case.Causal FIR system function has only zeros (exceptfor poles as z=0)
Form I and form II are the same.⎩⎨⎧ =
=otherwise ,0
,...,1,0 ,][
Mnbnh n∑
=
−=M
kk knxbny
0
][][
18
Digital Signal Processing, VI, Zheng-Hua Tan, 200635
Cascade form
Factoring the polynomial system function
∏∑=
−−
=
− ++==sM
kkkk
M
n
n zbzbbznhzH1
22
110
0
)(][)(
Digital Signal Processing, VI, Zheng-Hua Tan, 200636
Linear-phase FIR systems
Generalized linear-phase system
Causal FIR systems have generalized linear-phaseif h[n] satisfies the symmetry condition
MnnhnMh
MnnhnMh
,...,1,0 ],[][ or
,...,1,0 ],[][
=−=−
==−
∑=
−=M
kk knxbny
0
][][
constants real are and , offunction real a is )(
)()(
βαωω
βωαωω
j
jjjj
eA
eeAeH +−=
19
Digital Signal Processing, VI, Zheng-Hua Tan, 200637
Linear-phase FIR systems
]2/[]/[])[][]([][
][][ if
][][]2/[]/[][][
][][]2/[]/[][][
][][][
integereven an is if
12/
0
12/
0
12/
0
12/
12/
0
0
MnxMkhkMnxknxkhny
nhnMh
kMnxkMhMnxMkhknxkh
knxkhMnxMkhknxkh
knxkhny
M
M
k
M
k
M
k
M
Mk
M
k
M
k
−++−+−=
=−
+−−+−+−=
−+−+−=
−=
∑
∑∑
∑∑
∑
−
=
−
=
−
=
+=
−
=
=
Digital Signal Processing, VI, Zheng-Hua Tan, 200638
Linear phase FIR systems
M is an even integer and h[M-n]=h[n]
]2/[]/[])[][]([][12/
0MnxMkhkMnxknxkhny
M
k−++−+−= ∑
−
=
20
Digital Signal Processing, VI, Zheng-Hua Tan, 200639
Discussions
Implementation of FIR and IIR systemsUse signal block diagram flow graph representation to show the computational structuresAlthough two structures may have equivalent input-output charateristics for infinite-precision represenations of coefficients and variables, they may have dramatically different behaviour when the numerical precision is limited.
Digital Signal Processing, VI, Zheng-Hua Tan, 200640
Summary
Block diagram representation of computational structuresSignal flow graph descriptionBasic structures for IIR systems Transposed formsBasic structures for FIR systems
21
Digital Signal Processing, VI, Zheng-Hua Tan, 200641
Course at a glance
Discrete-time signals and systems
Fourier-domain representation
DFT/FFT
Systemanalysis
Filter design
z-transform
MM1
MM2
MM9, MM10MM3
MM6
MM4
MM7, MM8
Sampling andreconstruction MM5
Systemstructure
System