Chapter 7: Structures for LTI systems

advertisement
Chapter 7: Structures for LTI systems
Spring 2009/010
Lecture: Tim Woo
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 1
Where we are
Continuous-time
Hardware
Implementation
Discrete-time
Closed-loop
Systems
Open-loop
Systems
State-space
model
Mapping
Differential
equations
System
Characteristics
System
Responses
Open-loop
Systems
State-space
model
Difference
equations
CTFT
DTFT
Laplace
Transform
z-Transform
Will be covered if available Done in 211 To be covered
ELEC 215: Tim Woo
Hardware
Implementation
Closed-loop
Systems
Spring 2009/10
In progress
System
Characteristics
System
Responses
Done
Chapter 7 - 2
Expected Outcome
• In this chapter, you will be able to
– Implement a system function with linear constant-coefficient
differential or difference equation by structures with basic
elements
• Adders
• Multipliers
• Integrators / Delays
– Construct the same system function with different structures for
realization of causal continuous-time (or discrete-time) LTI
system.
– Compare the computational complexity of different structures
– Compare the robustness design in different structures
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 3
Outline
• Textbook
– Section 9.8.2 Block Diagram Representations for Causal LTI
systems Described by Differential Equations and Rational
System Functions
– Section 10.8.2 Block Diagram Representations for Causal LTI
systems Described by Difference Equations and Rational
System Functions
• Reference book
– A. V. Oppenheim, et. al., Discrete-time Signal Processing, 2nd
edition, Prentice-Hall, 1999
– Section 6.1 Block Diagram representation of linear constantcoefficient difference equations
– Section 6.3 Basic Structures for IIR systems
– Section 6.7 The effects of coefficient quantization
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 4
Introduction
•
As discussed in Chapter 4, a LTI system with a rational system
function has the property that the input and output sequence satisfy
a linear constant-coefficient differential (or difference) equation.
•
When such systems are implemented with analog (or digital)
hardware, the differential (or difference) equation must be converted
to an algorithm or structure that can be realized in the desired
technology.
•
In this chapter, we will construct the system function by structures
consisting of an interconnection of the basic operations of addition,
multiplication by a scalar, and integrator (or delay).
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 5
Introduction
•
Consider the differential equation,
•
Consider the difference equation,
d k y(t ) M d k x(t )
y(t ) = ∑ ak
+ ∑bk
k
dt
dt k
k =1
k =0
N
M
k =1
k =0
y[n] = ∑ ak y[n − k ] + ∑bk x[n − k ]
the output signal y(t) at time instant
t requires dy(t)/dt, …., dNy(t)/dtN and
x(t), dx(t)/dt, …., dMy(t)/dtM.
•
N
the output signal y[n] at time instant
n requires y[n-1], …., y[n - N] and
x[n], x[n-1], …., x[n - M].
That is, we need
–
Multipliers for scaling
• It usually has the high computation cost.
–
Adders for summation
• In general, an adder can have any number of inputs. However, in most practical
implementations, adders have only two inputs.
–
Delay elements for storage
• It can implemented by providing a storage register for each unit delay. Delays of M
samples can be implemented with a system with M consecutive storage registers.
–
Integrator
• In general, integers are commonly used instead of differentiators.
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 6
Introduction
•
The realization of these components can be indicated either by
– Block diagram representations
– Signal flow graph representations
x2 (t)
x1(t) + x2 (t)
x1(t)
Block diagram
x(t)
x2 (t )
ax(t)
1s
x(t)
t
∫
−∞
x1 (t ) + x2 (t )
x1 (t )
x2[n]
x(τ )dτ
a
a
x(t)
ax(t)
Signal flow graph
x[n]
ELEC 215: Tim Woo
ax[n]
z −1
1s
x(t)
x1[n] + x2[n]
x1[n]
t
∫
−∞
x(τ )dτ
x[n]
Spring 2009/10
x[n −1]
Chapter 7 - 7
Introduction
– Example 9.28: Consider
1
H (s) =
s+3
From the previous section, we know this
system can also be described by difference
equation:
dy (t )
dt
+ 3 y (t ) = x(t )
t
y (t ) =
∫ [− 3 y(τ ) + x(τ )]dτ
−∞
Using 1/s to represent integrator or
, we have
H (s) =
ELEC 215: Tim Woo
1
1/ s
=
s + 3 1+ 3/ s
Spring 2009/10
Chapter 7 - 8
Introduction
• Draw a block diagram and signal flow graph
representations of an LTI system whose difference
equation is:
y[n] = a1 y[n −1] + a2 y[n − 2] + b0 x[n]
b0
x[n]
z −1
a1
y[n − 1]
z
−1
a2
Block diagram
ELEC 215: Tim Woo
y[n]
y[n − 2]
Signal flow graph
Spring 2009/10
Chapter 7 - 9
Introduction
• Computations can be arranged in different ways to give
the same differential (or difference) equation, which
leads to different structures for realization of discretetime causal LTI system.
• Typically, there are many basic forms of realization, but
we focus on four of them.
–
–
–
–
Direct form I
Canonic Direct form (or Direct form II)
Cascade form
Parallel form
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 10
9.8.2 Block Diagram Representation
•
Consider a linear constant coefficient differential equation of an LTI
system
d N y(t ) M ~ d M −k x(t ) N ~ d N −k y(t )
~
a0
= ∑bk
+ ∑ ak
M −k
dt N
dt
dt N −k
k =0
k =1
•
For simplicity, we assume
– N = M. If N ≠ M, some of the coefficients will be zero.
~
~
~
– All the coefficients are normalized such that a = a0 = 1, a = ak , b = bk
0
k
k
a~
a~
a~
0
•
0
0
By taking the Laplace transform on both sides, we have
N
Y ( s)
=
H (s) =
X (s)
∑b s
k =0
k
N
s − ∑ ak s
N
k =1
ELEC 215: Tim Woo
N
N −k
=
N −k
∑b s
k =0
N
−k
k
1 − ∑ ak s − k
k =1
Spring 2009/10
k
⎛1⎞
bk ⎜ ⎟
∑
s
= k =0 ⎝ ⎠ k
N
⎛1⎞
1 − ∑ ak ⎜ ⎟
⎝s⎠
k =1
N
Chapter 7 - 11
9.8.2 Block Diagram Representation
•
Direct form I
– Decompose the system function such that H(s) = H1(s) H2(s)
k
⎛1⎞
bk ⎜ ⎟
k
∑
N
Y (s)
V
s
(
)
1
s
⎛
⎞
H ( s) =
= ∑ bk ⎜ ⎟
= k =0 ⎝ ⎠ k ⇔ H1 ( s) =
N
X (s)
X
s
(
)
⎝s⎠
k =0
⎛1⎞
1 − ∑ ak ⎜ ⎟
⎝s⎠
k =1
N
H 2 ( s) =
and
Y ( s)
=
V ( s)
1
⎛1⎞
1 − ∑ ak ⎜ ⎟
⎝s⎠
k =1
N
k
v(t)
x(t)
y(t)
1s
H1 ( s)
1s
t
t
∫ x(τ )dτ
N
X ( s)
V ( s ) = ∑ bk k
s
k =0
∫ y(τ )dτ
−∞
−∞
1s
1s
N
Y ( s ) = V ( s ) + ∑ ak
k =1
t
∫∫
t
x(τ )dτ
∫∫
bN−1
−∞
t
Y (s)
sk
y(τ )dτ
−∞
1s
1s
bN
t
∫∫∫∫ x(τ )dτ
∫∫∫∫ y(τ )dτ
−∞
ELEC 215: Tim Woo
H 2 (s)
−∞
Spring 2009/10
Chapter 7 - 12
9.8.2 Block Diagram Representation
•
Canonic form (Direct form II)
– Decompose the system
function such that H(s) = H1(s) H2(s)
k
⎛1⎞
N
Y (s)
H (s) =
=
X ( s)
∑ b ⎜⎝ s ⎟⎠
k
1
W ( s)
⇔ H1 ( s) =
=
k
k
N
N
X ( s)
⎛1⎞
⎛1⎞
1 − ∑ ak ⎜ ⎟
1 − ∑ ak ⎜ ⎟
s
⎠
⎝s⎠
⎝
k =1
k =1
k =0
and
w(t)
y(t)
1s
W ( s)
W ( s ) = X ( s ) + ∑ ak k
s
k =1
∫ w(τ )dτ
−∞
1s
t
∫∫ w(τ )dτ
−∞
1s
1s
y(t)
x(t)
H1 ( s)
N
t
1s
k
w(t)
x(t)
1s
Y (s) N ⎛ 1 ⎞
= ∑ bk ⎜ ⎟
H 2 ( s) =
W ( s ) k =0 ⎝ s ⎠
1s
1s
H 2 (s)
N
V ( s ) = ∑ bk
k =0
X ( s)
sk
1s
t
∫∫∫∫ w(τ )dτ
−∞
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 13
9.8.2 Block Diagram Representation
•
Example 9.31 Use block diagram
to draw the direct form I and direct
form II for an LTI system with
system function
2s 2 + 4s − 6
H ( s) = 2
s + 3s + 2
•
Direct form I
Rewrite system function as
4 6
− 2
s s
H ( s) =
3 2
1+ + 2
s s
2+
•
This gives
b0 = 2, b1 = 4, b2 = −6, a1 = −3, a2 = −2
ELEC 215: Tim Woo
Spring 2009/10
Direct form II
Chapter 7 - 14
9.8.2 Block Diagram Representation
•
Cascade form
– Without loss of generality, the system function be factorized into a
cascade of Ns second order sub-systems as follows,
1 + b1k s −1 + b2 k s −2
H ( s) = G∏
−1
− a2 k s − 2
k =1 1 − a1k s
Ns
•
Parallel form
– Without loss of generality, the system function can be expressed as a
partial fraction expansion in the form,
Np
H ( s ) = ∑ Bk s
k =0
•
−k
e0 k + e1k s −1
+∑
−1
− a2 k s − 2
k =1 1 − a1k s
Ns
Each sub-system in cascade and parallel forms can be realized in
either direct form I and the direct II.
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 15
9.8.2 Block Diagram Representation
Example 9.28 : A system
function H ( s) =
Direct form I
1
1
⎛ 1 ⎞⎛ 1 ⎞ 1
=
−
=
⎟
⎜
⎟
⎜
s 2 + 3s + 2 ⎝ s + 1 ⎠⎝ s + 2 ⎠ s + 1 s + 2
s −2
=
1 + 3s −1 + 2 s − 2
Direct form II
⎛ s −1 ⎞⎛ s −1 ⎞
s −1
s −1
⎟⎜
⎟=
= ⎜⎜
−
−1 ⎟⎜
−1 ⎟
−1
1 + 2 s −1
⎝ 1 + s ⎠⎝ 1 + 2 s ⎠ 1 + s
Parallel form
Cascade form
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 16
Reference book: 6.1 Block Diagram Representation
•
Consider a linear constant coefficient difference equation of an LTI
system
N
M
k =1
k =0
y[n] = ∑ ak y[n − k ] + ∑bk x[n − k ]
•
For simplicity, we assume
– N = M. If N ≠ M, some of the coefficients will be zero.
•
By taking the z-transform on both sides, we have
M
H ( z) =
Y ( z)
=
X ( z)
∑b z
k =0
N
−k
k
1 − ∑ ak z − k
k =1
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 17
Reference book: 6.1 Block Diagram Representation
•
Direct form I
– Decompose the system function such that H(z) = H1(z) H2(z)
Difference equation
N
M
k =1
k =0
y[n] = ∑ ak y[n − k ] + ∑bk x[n − k ]
System function
z-transform
M
M
v[n] = ∑bk x[n − k ]
H ( z) =
k =0
N
Y ( z)
=
X ( z)
∑b z
k =0
N
−k
k
1 − ∑ ak z − k
k =1
y[n] = ∑ ak y[n − k ] + v[n]
k =1
z-transform
⎛M
⎞
V ( z ) = ⎜ ∑ bk z − k ⎟ X ( z ) = H1 ( z ) X ( z )
⎝ k =0
⎠
1
Y ( z) =
V ( z ) = H 2 ( z )V ( z )
N
−k
1 − ∑ ak z
k =1
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 18
Reference book: 6.1 Block Diagram Representation
•
Direct form II
M
Y ( z)
H ( z) =
=
X ( z)
∑b z
k =0
N
z-transform
−k
k
1 − ∑ ak z
−k
W ( z) =
N
1 − ∑ ak z
−k
X ( z) = H 2 ( z) X ( z)
k =1
k =0
N
z-transform
w[n] = ∑ ak w[n − k ] + x[n]
k =1
M
k =1
y[n] = ∑bk w[n − k ]
⎛M
⎞
Y ( z ) = ⎜ ∑ bk z − k ⎟W ( z ) = H1 ( z )W ( z )
⎝ k =0
⎠
ELEC 215: Tim Woo
M
y[n] = ∑ ak y[n − k ] + ∑bk x[n − k ]
k =1
1
N
k =0
Spring 2009/10
Chapter 7 - 19
Reference book: 6.1 Block Diagram Representation
•
Example: Use block diagram to draw the direct form I and direct form II for
an LTI system with system function
1 + 2 z −1
H ( z) =
1 − 1.5 z −1 + 0.9 z − 2
Direct form I
ELEC 215: Tim Woo
Direct form II
Spring 2009/10
Chapter 7 - 20
Reference book: 6.3 Basic Structures for Infinite Impulse
Response (IIR) systems
•
Cascade form
– Without loss of generality, the system function be factorized into a
cascade of Ns second order sub-systems as follows,
1 + b1k z −1 + b2 k z −2
H ( z ) = G∏
−1
− a2 k z − 2
k =1 1 − a1k z
Ns
•
Parallel form
– Without loss of generality, the system function can be expressed as a
partial fraction expansion in the form,
Np
H ( z ) = ∑ Ck z
k =0
•
−k
e0 k + e1k z −1
+∑
−1
− a2 k z − 2
k =1 1 − a1k z
Ns
Each sub-system in cascade and parallel forms can be realized in
either direct form I and the direct II.
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 21
Reference book: 6.3 Basic Structures for IIR systems
Example: A system function
H (s) =
1
1 + 14 z −1 − 18 z − 2
1
2
⎛ 1 ⎞⎛ 1 ⎞
3
3
= ⎜⎜ 1 −1 ⎟⎟ ⎜⎜ 1 −1 ⎟⎟ =
+
−
1
1
1 − 14 z −1
⎝1+ 2 z ⎠ ⎝1− 4 z ⎠ 1+ 2 z
Parallel form
Direct form I and II
Cascade form
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 22
Criteria of the choice of realization
•
The criteria of our choice of a specific realization are
– Computational complexity : Number of multipliers and adders
– Memory requirements : Number of delay (storage) unit
– Finite-word-length effects : Zero-pole diagram in signal quantization.
•
Another advantage of the cascade and parallel realizations in system
function (IIR filters) is that the system stability can be easily monitored
by investigating the pole locations in each second order subsystem. If
at least one of the poles have magnitudes larger than one, the system
will become unstable.
•
In all real applications, the system should be causal.
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 23
Criteria of the choice of realization
•
Computational complexity of IIR system function realizations:
Structure (N = M)
Direct form I
Canonic form
Cascade form
Parallel form
ELEC 215: Tim Woo
Number of multipliers
Number of 2-input adders
2N +1
2N +1
2N
2N
4⎣(N + 1) / 2⎦ + 1
4⎣( N + 1) / 2⎦
4⎣( N + 1) / 2⎦ + 1
Spring 2009/10
3⎣( N + 1) / 2⎦ + 1
Chapter 7 - 24
Reference book: 6.7 The effects of Quantization effect
•
Under filter coefficient quantization, the cascade or parallel realizations are
more robust than the direct forms, i.e.
– Their frequency responses are more closer to the desired responses.
•
Consider a system function
M
H ( z) =
∑b z
−k
k
k =0
N
1 − ∑ ak z − k
Ns
p
1 + b1k z −1 + b2 k z − 2
e0 k + e1k z −1
−k
= ∑ Ck z + ∑
= G∏
−1
−1
−2
1
− a2 k z − 2
−
a
z
−
a
z
k =1 1 − a1k z
k =0
k =1
1k
2k
N
Ns
k =1
•
In the presence of coefficient quantization, we have
M
H ( z) =
∑ (b
k =0
N
k
+ Δbk )z − k
1 − ∑ (ak + Δak )z − k
Small error in any one coefficient can cause large
shifts of the poles (zeros).
k =1
1 + (b1k + Δb1k )z −1 + (b2 k + Δb2 k )z − 2
= G∏
−1
− (a2 k + Δa2 k )z − 2
k =1 1 − (a1k + Δa1k )z
Ns
Np
= ∑ (Ck + Δck )z
k =0
ELEC 215: Tim Woo
−k
Small error in one coefficient affects a
complex conjugate poles (zeros).
(
e0 k + Δe0 k ) + (e1k + Δe1k )z −1
+∑
−1
− (a2 k + Δa2 k )z − 2
k =1 1 − (a1k + Δa1k )z
Ns
Spring 2009/10
Chapter 7 - 25
Reference book: 6.7 The effects of Quantization effect
Unquantized system function
M
H ( z) =
Y ( z)
=
X ( z)
∑b z
k =0
N
Quantized system function
x a q(x )
−k
k
1 − ∑ ak z − k
k =1
−1
−2
Np
H ( z ) = ∑ Ck z − k
x a q(x )
x a q(x )
k =0
k =0
N
−k
k
1 − ∑ q(ak )z − k
Ns
1 + q(b1k )z −1 + q(b2 k )z −2
ˆ
H ( z ) = q (G )∏
−1
− q(a2 k )z − 2
k =1 1 − q (a1k )z
Np
Hˆ ( z ) = ∑ q (Ck )z − k
k =0
q (e0 k ) + q (e1k )z −1
+∑
−1
− q(a2 k )z − 2
k =1 1 − q (a1k )z
Ns
e0 k + e1k z −1
+∑
−1
− a2 k z − 2
k =1 1 − a1k z
Ns
ELEC 215: Tim Woo
Hˆ ( z ) =
∑ q(b )z
k =1
1 + b1k z + b2 k z
H ( z ) = G∏
−1
− a2 k z − 2
k =1 1 − a1k z
Ns
M
Spring 2009/10
Chapter 7 - 26
Reference book: 6.7 The effects of Quantization effect
•
For a 12th order elliptic bandpass
filter
–
–
–
•
Passband of elliptic
filter for cascade
structure with 16-bit
coefficients
•
Passband of elliptic
filter for parallel
structure with 16-bit
coefficients
•
Passband of elliptic
filter for direct
structure with 16-bit
coefficients
Rational system function
Cascade form
32-bit floating accuracy in coefficients
Bandpass filter
Passband
•
Bandpass filter for cascade
structure with 32-bit coefficients
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 27
Reference book: 6.7 The effects of Quantization effect
• A simulation of the quantization effect is done.
Frequency response of system for direct sturcture with 10-bit coefficients
100
Frequency response of the unqunatized system
Magnitude (dB)
Magnitude (dB)
0
-50
-100
0
-100
-200
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
Normalized Frequency (×π rad/sample)
0.9
Phase (degrees)
Phase (degrees)
50
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
Normalized Frequency (×π rad/sample)
0.9
Pole-zeo map of unqunatized system
1
0.8
0.6
Imaginary Axis
0.4
1
Total squared magnitude error (dB)
0
0
0
0.3
0.4
0.5
0.6
0.7
0.8
Normalized Frequency (×π rad/sample)
0.9
1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
Normalized Frequency (×π rad/sample)
0.9
1
0
-50
Pole-zeo map of system for direct sturcture w ith 10-bit coefficients
1.5
-100
1
Direct Form
Cascade Form
Parallel Form
-150
0.5
0
-200
-0.4
0.2
500
-500
0.2
-0.2
0.1
1000
Quantization effects on coefficients of different system realization
500
-500
0
1
0
5
10
15
20
25
Number of quantization bits
30
35
Imaginary Axis
-150
0
-0.5
-0.6
-0.8
-1
-1
-1
-0.5
0
0.5
1
Real Axis
-1.5
-1.5
-1
-0.5
0
0.5
1
1.5
Real Axis
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 28
Structures for LTI systems
•
Readings
– Section 9.8.2 Block Diagram Representations for Causal LTI systems
Described by Differential Equations and Rational System Functions
– Section 10.8.2 Block Diagram Representations for Causal LTI systems
Described by Difference Equations and Rational System Functions
•
Readings from reference book
– A. V. Oppenheim, et. al., Discrete-time Signal Processing, 2nd edition,
Prentice-Hall, 1999
– Section 6.0 Introduction
– Section 6.1 Block Diagram representation of linear constant-coefficient
difference equations
– Section 6.3 Basic Structures for IIR systems
– Section 6.7 The effects of coefficient quantization
ELEC 215: Tim Woo
Spring 2009/10
Chapter 7 - 29
Where we are
Continuous-time
Hardware
Implementation
Discrete-time
Closed-loop
Systems
Open-loop
Systems
State-space
model
Mapping
Differential
equations
System
Characteristics
System
Responses
Open-loop
Systems
State-space
model
Difference
equations
CTFT
DTFT
Laplace
Transform
z-Transform
Will be covered if available Done in 211 To be covered
ELEC 215: Tim Woo
Hardware
Implementation
Closed-loop
Systems
Spring 2009/10
In progress
System
Characteristics
System
Responses
Done
Chapter 7 - 30
Download