Chapter 1- Linear Discrete Dynamic Systems Analysis
Chapter 1- Linear Discrete Dynamic Systems Analysis
Systems
Nigusu Teshome,
Lecturer/Electrical and Computer Engineering Department,
Institute of Technology,
University of Gondar, Ethiopia.
eMail : [email protected]
Chapter 1
(1 − 𝑟 𝑛+1 )
⇒ 𝑆𝑛 = 𝑐
1−𝑟
Cont’d…
(1 − 𝑟 𝑛+1 )
⇒ lim 𝑆𝑛 = lim 𝑐
𝑛→∞ 𝑛→∞ 1−𝑟
𝑐
= lim {1 − 𝑟 𝑛+1 }
1 − 𝑟 𝑛→∞
𝑐
= 1 − lim 𝑟 𝑛+1
1−𝑟 𝑛→∞
𝒄
= , 𝑓𝑜𝑟 𝒓 < 𝟏
𝟏−𝒓
Cont’d…
If a signal has discrete values 𝑒0 , 𝑒1 , … , 𝑒𝑘 , we define the 𝓏-
transform of the signal as the function:
𝑬 𝒛 = 𝓩{𝒆(𝒌)}
𝒵{𝑒(𝑘)} = 𝑒(𝑘)𝑧 −𝑘
𝑘=−∞
= 𝑧 −𝑘
𝑘=0
= 𝑧 −𝑘 | k=0
= 𝑧0
=1
Cont’d…
2) Unit Step Function
1, 𝑘≥0
𝑒 𝑘 =
0, 𝑒𝑙𝑠𝑒 𝑤ℎ𝑒𝑟𝑒
• Therefore
∞
𝒵{𝑒(𝑘)} = 𝑒(𝑘)𝑧 −𝑘
𝑘=−∞
∞
= 𝑧 −𝑘
𝑘=0
1
= 𝑓𝑜𝑟 𝑧 −1 < 1
1−𝑧 −1
𝑧
= 𝑓𝑜𝑟 𝑧 >1
𝑧−1
Cont’d…
3) Sinusoidal Function
𝑒 𝑘 = 𝑟 𝑘 sin 𝑘𝜃 1 𝑘 , 𝑟>0
Solution:
𝑟 𝑘 𝑗𝑘𝜃
𝑒 𝑘 = 𝑒 − 𝑒 −𝑗𝑘𝜃 1 𝑘 , 𝑟>0
2𝑗
• Therefore
∞
𝒵{𝑒(𝑘)} = 𝑒(𝑘)𝑧 −𝑘
𝑘=−∞
∞
𝑟 𝑘 𝑗𝑘𝜃
= 𝑒 − 𝑒 −𝑗𝑘𝜃 1 𝑘 𝑧 −𝑘
2𝑗
𝑘=−∞
∞
𝑟 𝑘 𝑗𝑘𝜃
= 𝑒 − 𝑒 −𝑗𝑘𝜃 𝑧 −𝑘
2𝑗
𝑘=0
Cont’d… ∞ ∞
1
= 𝑟 𝑘 𝑒 𝑗𝑘𝜃 𝑧 −𝑘 − 𝑟 𝑘 𝑒 −𝑗𝑘𝜃 𝑧 −𝑘
2𝑗
𝑘=0 𝑘=0
∞ ∞
1 𝑗𝜃 −1 𝑘 −𝑗𝜃 −1 𝑘
= 𝑟𝑒 𝑧 − 𝑟𝑒 𝑧
2𝑗
𝑘=0 𝑘=0
• Let us do term by term:
∞
𝑗𝜃 −1 𝑘 1
𝑟𝑒 𝑧 = 𝑓𝑜𝑟 𝑟𝑒 𝑗𝜃 𝑧 −1 < 1
1 − 𝑟𝑒 𝑗𝜃 𝑧 −1
𝑘=0
𝑧
= 𝑓𝑜𝑟 𝑟𝑒 𝑗𝜃 < 𝑧
𝑧−𝑟𝑒 𝑗𝜃
𝑠𝑖𝑛𝑐𝑒 − 1 ≤ 𝑒 𝑗𝜃 ≤ 1, 𝑟 > 0
⇛ 𝑧 >𝑟
Cont’d…
• And:
∞
−𝑗𝜃 −1 𝑘 1
𝑟𝑒 𝑧 = 𝑓𝑜𝑟 𝑟𝑒 −𝑗𝜃 𝑧 −1 < 1
1 − 𝑟𝑒 −𝑗𝜃 𝑧 −1
𝑘=0
𝑧
= 𝑓𝑜𝑟 𝑟𝑒 −𝑗𝜃 < 𝑧 , 𝑠𝑖𝑛𝑐𝑒 − 1 ≤ 𝑒 −𝑗𝜃 ≤ 1, 𝑟 > 0
𝑧−𝑟𝑒 −𝑗𝜃
⇛ 𝑧 >𝑟
• So
∞ ∞
1 𝑗𝜃 −1 𝑘 −𝑗𝜃 −1 𝑘
𝒵{𝑒(𝑘)} = 𝑟𝑒 𝑧 − 𝑟𝑒 𝑧
2𝑗
𝑘=0 𝑘=0
1 𝑧 𝑧
= 𝑗𝜃
− , 𝑧 >𝑟
2𝑗 𝑧 − 𝑟𝑒 𝑧 − 𝑟𝑒 −𝑗𝜃
Cont’d…
𝑧 1 1
𝒵{𝑒(𝑘)} = 𝑗𝜃
− , 𝑧 >𝑟
2𝑗 𝑧 − 𝑟𝑒 𝑧 − 𝑟𝑒 −𝑗𝜃
𝑧 𝑧 − 𝑟𝑒 −𝑗𝜃 − 𝑧 + 𝑟𝑒 𝑗𝜃
= , 𝑧 >𝑟
2𝑗 (𝑧 − 𝑟𝑒 𝑗𝜃 )(𝑧 − 𝑟𝑒 −𝑗𝜃 )
𝑧 −𝑟𝑒 −𝑗𝜃 + 𝑟𝑒 𝑗𝜃
= , 𝑧 >𝑟
2𝑗 𝑧 2 − 𝑟𝑧𝑒 −𝑗𝜃 − 𝑟𝑧𝑒 𝑗𝜃 + 𝑟 2
𝑟𝑧 sin 𝜃
= 2 , 𝑧 >𝑟
𝑧 + 𝑟 2 − 2𝑟𝑧 cos 𝜃
Cont’d…
1.1.2. Properties of 𝓩-Transform
(i) Linearity
• A continuous function 𝑓(𝑥) is linear if and only if:
𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝛼𝑓 𝑥1 + 𝛽𝑓 𝑥2
• For discrete function
∞
=𝛼 𝑓1 (𝑘) 𝑧 −𝑘 + 𝛽 𝑓2 (𝑘)𝑧 −𝑘
𝑘=−∞ 𝑘=−∞
= 𝜶𝑭𝟏 𝒛 + 𝜷𝑭𝟐 𝒛
Cont’d…
(ii) Convolution of Time Sequences
∞ ∞ ∞
𝒵 𝑓1 𝑙 𝑓2 𝑘 − 𝑙 = 𝑓1 𝑙 𝑓2 𝑘 − 𝑙 𝑧 −𝑘
𝑙=−∞ 𝑘=−∞ 𝑙=−∞
∞ ∞
= 𝑓1 𝑙 𝑓2 𝑘 − 𝑙 𝑧 −𝑘
𝑙=−∞ 𝑘=−∞
𝑙𝑒𝑡 𝑘−𝑙 =𝑏 ⟹𝑘 =𝑏+𝑙
∞ ∞
= 𝑓1 𝑙 𝑓2 𝑏 𝑧 −(𝑏+𝑙)
𝑙=−∞ 𝑏=−∞
∞ ∞
= 𝑓1 𝑙 𝑓2 𝑏 𝑧 −𝑏 𝑧 −𝑙
𝑙=−∞ 𝑏=−∞
∞ ∞
= 𝑓1 𝑙 𝑧 −𝑙 𝑓2 𝑏 𝑧 −𝑏
𝑙=−∞ 𝑏=−∞
= 𝑭𝟏 𝒛 𝑭𝟐 𝒛
Cont’d…
(iii) Time Shift
𝒵 𝑓 𝑘 + 𝑛 = 𝒛𝒏 𝑭 𝒛
𝒵 𝑓 𝑘 − 𝑛 = 𝒛−𝒏 𝑭 𝒛
Proof: ∞
𝒵 𝑓 𝑘+𝑛 = 𝑓 𝑘 + 𝑛 𝑧 −𝑘
𝑘=−∞
∞
𝑙𝑒𝑡 𝑘 + 𝑛 = 𝑙 ⟹ 𝑘 = 𝑙 − 𝑛
= 𝑓 𝑙 𝑧 −(𝑙−𝑛)
𝑙=−∞
∞
= 𝑓 𝑙 𝑧 −𝑙 𝑧 𝑛
𝑙=−∞
∞
= 𝑧𝑛 𝑓 𝑙 𝑧 −𝑙
𝑙=−∞
= 𝒛𝒏 𝑭 𝒛
Cont’d…
(iv) Scaling in the z-plane
𝒵 𝑟 −𝑘 𝑓 𝑘 = 𝑭 𝒓𝒛
Proof: ∞
𝒵 𝑟 −𝑘 𝑓 𝑘 = 𝑟 −𝑘 𝑓 𝑘 𝑧 −𝑘
𝑘=−∞
= 𝑓 𝑘 (𝑟𝑧)−𝑘
𝑘=−∞
= 𝑭 𝒓𝒛
Cont’d…
(v) Final Value Theorem
If 𝐹 𝑧 converges for 𝑧 > 1 and all poles of (𝑧 − 1)𝐹 𝑧 are inside the
unit circle, then
𝐥𝐢𝐦 𝒇(𝒌) = 𝐥𝐢𝐦(𝒛 − 𝟏)𝑭 𝒛
𝒌→∞ 𝒛→𝟏
Example: Find the final value of
(𝑧 + 1 2)(𝑧 + 2)
𝐹 𝑧 = , 𝑧 >1
(𝑧 − 1 4)(𝑧 − 1)
Solution: 𝐹 𝑧 satisfies the condition for evaluating the final value of 𝑓 𝑘 :
(𝑧 + 1 2)(𝑧 + 2) 3 2 ∗ 3
lim 𝑓(𝑘) = lim (𝑧 − 1) = =6
𝑘→∞ 𝑧→1 (𝑧 − 1 4)(𝑧 − 1) 3
4
1.2. Basic Digital Control System
𝑢𝑘 = 𝑓{𝑒0 , 𝑒1 , 𝑒2 , …, 𝑒𝑘 ; 𝑢0 , 𝑢1 , 𝑢2 , …, 𝑢𝑘−1 }
Assuming that 𝑓 is a linear and depends on only a finite number of past e’s and
u’s. Thus we can write
𝑢𝑘 = −𝑎1 𝑢𝑘−1 − 𝑎2 𝑢𝑘−2 − ⋯ − 𝑎𝑛 𝑢𝑘−𝑛 + 𝑏0 𝑒𝑘 + 𝑏1 𝑒𝑘−1 + ⋯ + 𝑏𝑚 𝑒𝑘−𝑚 .
Discrete Approximation to Integration
• Suppose we have a continuous signal 𝑒(𝑡) of which a segment is sketched in
below and we wish to compute an approximation to the integral
Fig: Plot of 𝑒(𝑡) and alternative approximations to the area under the curve.
Cont’d…
• We assume that we have an approximation for the integral from zero to the time
𝑡𝑘−1 and we call it 𝑢𝑘−1 .
• The problem is to obtain 𝑢𝑘 from this information. Taking the view of the
integral as the area under the curve 𝑒(𝑡), we see that this problem reduces to
finding an approximation to the area under the curve between 𝑡𝑘−1 and 𝑡𝑘 .
• From fig (a), the area of the trapezoid is
1
𝐴 = (𝑡𝑘 − 𝑡𝑘−1 )𝑒𝑘−1 + (𝑡𝑘 − 𝑡𝑘−1 )(𝑒𝑘 − 𝑒𝑘−1 )
2
𝑡𝑘 −𝑡𝑘−1
= (2𝑒𝑘−1 + 𝑒𝑘 − 𝑒𝑘−1 )
2
𝑡𝑘 −𝑡𝑘−1
= (𝑒𝑘 + 𝑒𝑘−1 )
2
Cont’d…
If we assume the sampling period 𝑡𝑘 − 𝑡𝑘−1 is a constant 𝑇, we are led to a
simple formula for discrete integration called the trapezoid rule
𝑇
𝐴= 𝑒𝑘 + 𝑒𝑘−1 𝑏𝑢𝑡 𝐴 = 𝑢𝑘 − 𝑢𝑘−1
2
• Then
𝑇
𝑢𝑘 − 𝑢𝑘−1 = 𝑒𝑘 + 𝑒𝑘−1
2
𝑇
𝑢𝑘 = 𝑢𝑘−1 + 𝑒𝑘 + 𝑒𝑘−1 … 𝑇𝑟𝑎𝑝𝑒𝑧𝑜𝑖𝑑 𝑅𝑢𝑙𝑒
2
Transfer function for trapezoid-rule integration:
multiplying the trapezoid rule by 𝑧 −𝑘 and summing over k, we can get,
Cont’d…
∞ ∞ ∞
−𝑘 −𝑘
𝑇
𝑢𝑘 𝑧 = 𝑢𝑘−1 𝑧 + (𝑒𝑘 + 𝑒𝑘−1 )𝑧 −𝑘
2
𝑘=−∞ 𝑘=−∞ 𝑘=−∞
∞ ∞ ∞ ∞
−𝑘 −𝑘
𝑇 −𝑘
𝑇
𝑢𝑘 𝑧 = 𝑢𝑘−1 𝑧 + 𝑒𝑘 𝑧 + 𝑒𝑘−1 𝑧 −𝑘
2 2
𝑘=−∞ 𝑘=−∞ 𝑘=−∞ 𝑘=−∞
𝑇 𝑇 −1
⟹𝑈 𝑧 = 𝑧 −1 𝑈 𝑧 + 𝐸(𝑧) + 𝑧 𝐸(𝑧)
2 2
𝑇
⟹ (1 − 𝑧 −1 )𝑈 𝑧 = (1 + 𝑧 −1 )𝐸(𝑧)
2
𝑇 −1 )
𝑈 𝑧 (1+𝑧 𝑇 𝑧+1
2
⟹ = =
𝐸 𝑧 1−𝑧 −1 2 𝑧−1
𝑇 𝑧+1
𝐻 𝑧 =
2 𝑧−1
Cont’d…
In general, the transfer function can be written as
𝑏0 + 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 + ⋯ + 𝑏𝑚 𝑧 −𝑚
𝑯 𝑧 =
1 + 𝑎1 𝑧 −1 + 𝑎2 𝑧 −2 + ⋯ + 𝑎𝑛 𝑧 −𝑛
• and if 𝑛 ≥ 𝑚, we can write this as a ratio of polynomials in 𝑧 as
𝑏0 𝑧 𝑛 + 𝑏1 𝑧 𝑛−1 + 𝑏2 𝑧 𝑛−2 + ⋯ + 𝑏𝑚 𝑧 𝑛−𝑚
𝑯 𝑧 =
𝑧 𝑛 + 𝑎1 𝑧 𝑛−1 + 𝑎2 𝑧 𝑛−2 + ⋯ + 𝑎𝑛
𝑏(𝑧)
=
𝑎(𝑧)
The place in 𝑧 where 𝑏 𝑧 = 0 are zeros of the transfer function and
the place in 𝑧 where 𝑎 𝑧 = 0 are the poles of 𝐻 𝑧 .
Cont’d…
When completely factored, the transfer function would be
𝑚
𝑖=1(𝑧 − 𝑧𝑖 )
𝑯 𝑧 =K 𝑛
𝑖=1(𝑧 − 𝑝𝑖 )
The general input-output relation between transforms with linear,
constant, difference equations is:
𝑼(𝑧)
𝑯 𝑧 =
𝑬(𝑧)
• Or
𝑼 𝑧 = 𝑯 𝑧 𝑬(𝑧)
1.4. Block Diagrams and State Variable Descriptions
Rules for Block Diagram Realization:
1. The transfer function of paths in parallel is the sum of the single path transfer
functions.
𝑏0 𝑧 4 + 𝑏1 𝑧 3 + 𝑏2 𝑧 2 + 𝑏3 𝑧 + 𝑏4 ℰ 𝑧 = 𝑈 𝑧 (𝑖𝑖)
(a). From Equation (i), we can develop the state equation as follows:
⇛ 𝑧 4 ℰ 𝑧 + 𝑎1 𝑧 3 ℰ 𝑧 + 𝑎2 𝑧 2 ℰ 𝑧 + 𝑎3 𝑧ℰ 𝑧 + 𝑎4 ℰ 𝑧 = 𝐸 𝑧
⇛ 𝑧 4 ℰ 𝑧 = −𝑎1 𝑧 3 ℰ 𝑧 − 𝑎2 𝑧 2 ℰ 𝑧 − 𝑎3 𝑧ℰ 𝑧 − 𝑎4 ℰ 𝑧 + 𝐸(𝑧)
• Then, by applying inverse 𝒵-transform, the time domain of this state equation becomes:
⇛ 𝜀 𝑘 + 4 = −𝑎1 𝜀 𝑘 + 3 − 𝑎2 𝜀 𝑘 + 2 − 𝑎3 𝜀 𝑘 + 1 − 𝑎4 𝜀 𝑘 + 𝑒(𝑘)
Cont’d…
• To represent this system in terms of state variables, let us define
𝑥1 𝑘 = 𝜀 𝑘 + 3 ⟹ 𝑥1 𝑘 + 1 = 𝜀 𝑘 + 4
⟹ 𝑥1 𝑘 − 1 = 𝜀 𝑘 + 2
𝑥2 𝑘 = 𝑥1 𝑘 − 1 ⟹ 𝑥2 𝑘 + 1 = 𝑥1 𝑘
⟹ 𝑥2 𝑘 − 1 = 𝜀 𝑘 + 1
𝑥3 𝑘 = 𝑥2 𝑘 − 1 ⟹ 𝑥3 𝑘 + 1 = 𝑥2 𝑘
⟹ 𝑥3 𝑘 − 1 = 𝜀 𝑘
𝑥4 𝑘 = 𝑥3 𝑘 − 1 ⟹ 𝑥4 𝑘 + 1 = 𝑥3 𝑘
Cont’d…
• From the above four (4) Equations, the state equation becomes:
𝑥1 𝑘 + 1 = −𝑎1 𝑥1 𝑘 − 𝑎2 𝑥2 𝑘 − 𝑎3 𝑥3 𝑘 − 𝑎4 𝑥4 𝑘 + 𝑒(𝑘)
𝑥2 𝑘 + 1 = 𝑥1 𝑘
𝑥3 𝑘 + 1 = 𝑥2 𝑘
𝑥4 𝑘 + 1 = 𝑥3 𝑘
(b). From Equation (ii), we can develop the output equation as follows:
⇛ 𝑏0 𝑧 4 + 𝑏1 𝑧 3 + 𝑏2 𝑧 2 + 𝑏3 𝑧 + 𝑏4 ℰ 𝑧 = 𝑈 𝑧
⇛ 𝑏0 𝑧 4 ℰ 𝑧 + 𝑏1 𝑧 3 ℰ 𝑧 + 𝑏2 𝑧 2 ℰ 𝑧 + 𝑏3 𝑧ℰ 𝑧 + 𝑏4 ℰ 𝑧 = 𝑈 𝑧
Cont’d…
• Then, by applying inverse 𝒵 -transform, the time domain of this output equation
becomes:
⇛ 𝑏0 𝜀 𝑘 + 4 + 𝑏1 𝜀 𝑘 + 3 + 𝑏2 𝜀 𝑘 + 2 + 𝑏3 𝜀 𝑘 + 1 + 𝑏4 𝜀 𝑘 = 𝑢(𝑘)
⇛ 𝑢 𝑘 = 𝑏0 𝑥1 𝑘 + 1 + 𝑏1 𝑥1 𝑘 + 𝑏2 𝑥2 𝑘 + 𝑏3 𝑥3 𝑘 + 𝑏4 𝑥4 𝑘
= 𝑏0 −𝑎1 𝑥1 𝑘 − 𝑎2 𝑥2 𝑘 − 𝑎3 𝑥3 𝑘 − 𝑎4 𝑥4 𝑘 + 𝑒 𝑘 +
𝑏1 𝑥1 𝑘 + 𝑏2 𝑥2 𝑘 + 𝑏3 𝑥3 𝑘 + 𝑏4 𝑥4 𝑘
𝑪𝒄 = 𝑏1 − 𝑎1 𝑏0 𝑏2 − 𝑎2 𝑏0 𝑏3 − 𝑎3 𝑏0 𝑏4 − 𝑎4 𝑏0
𝑫𝒄 = 𝑏0
Cont’d…
Block Diagram Development for Control Canonical Form
• From the State Equation,
𝑥1 𝑘 + 1 = −𝑎1 𝑥1 𝑘 − 𝑎2 𝑥2 𝑘 − 𝑎3 𝑥3 𝑘 − 𝑎4 𝑥4 𝑘 + 𝑒(𝑘)
⇒ 𝑧𝑋1 𝑧 = −𝑎1 𝑋1 𝑧 − 𝑎2 𝑋2 𝑧 − 𝑎3 𝑋3 𝑧 − 𝑎4 𝑋4 𝑧 + 𝐸(𝑧)
⇒ 𝑋1 𝑧 = 𝑧 −1 {−𝑎1 𝑋1 𝑧 − 𝑎2 𝑋2 𝑧 − 𝑎3 𝑋3 𝑧 − 𝑎4 𝑋4 𝑧 + 𝐸 𝑧 }
And also
𝑥2 𝑘 + 1 = 𝑥1 𝑘 ⇒ 𝑋2 𝑧 = 𝑧 −1 𝑋1 𝑧
𝑥3 𝑘 + 1 = 𝑥2 𝑘 ⇒ 𝑋3 𝑧 = 𝑧 −1 𝑋2 𝑧
𝑥4 𝑘 + 1 = 𝑥3 𝑘 ⇒ 𝑋4 𝑧 = 𝑧 −1 𝑋3 𝑧
• from the output equation, we have
𝑢 𝑘 = 𝑏0 𝑥1 𝑘 + 1 + 𝑏1 𝑥1 𝑘 + 𝑏2 𝑥2 𝑘 + 𝑏3 𝑥3 𝑘 + 𝑏4 𝑥4 𝑘
Cont’d…
⇛ 𝑏4 𝐸 𝑧 − 𝑎4 𝑈(𝑧) = 𝑧{𝑧 3 𝑈 𝑧 + 𝑎1 𝑧 2 𝑈 𝑧 + 𝑎2 𝑧𝑈 𝑧 + 𝑎3 𝑈 𝑧 − 𝑏0 𝑧 3 𝐸 𝑧 − 𝑏1 𝑧 2 𝐸 𝑧 − 𝑏2 𝑧𝐸 𝑧 − 𝑏3 𝐸 𝑧 }
⇛ 𝑧 −1 {𝑏4 𝐸 𝑧 − 𝑎4 𝑈 𝑧 } = 𝑧 3 𝑈 𝑧 + 𝑎1 𝑧 2 𝑈 𝑧 + 𝑎2 𝑧𝑈 𝑧 + 𝑎3 𝑈 𝑧 − 𝑏0 𝑧 3 𝐸 𝑧 − 𝑏1 𝑧 2 𝐸 𝑧 − 𝑏2 𝑧𝐸 𝑧 − 𝑏3 𝐸 𝑧
Let
𝑥4 (𝑘 + 1) = 𝑏4 𝑒 𝑘 − 𝑎4 𝑢 𝑘
⇒ 𝑧𝑋4 𝑧 = 𝑏4 𝐸 𝑧 − 𝑎4 𝑈 𝑧
⇒ 𝑋4 𝑧 = 𝑧 −1 {𝑏4 𝐸 𝑧 − 𝑎4 𝑈 𝑧 }
⇛ 𝑋4 𝑧 = 𝑧 3 𝑈 𝑧 + 𝑎1 𝑧 2 𝑈 𝑧 + 𝑎2 𝑧𝑈 𝑧 + 𝑎3 𝑈 𝑧 − 𝑏0 𝑧 3 𝐸 𝑧 − 𝑏1 𝑧 2 𝐸 𝑧 − 𝑏2 𝑧𝐸 𝑧 − 𝑏3 𝐸 𝑧
(b) Now in this internal result there appear 𝑎3 𝑈(𝑧) and −𝑏3 𝐸(𝑧), which can be canceled by
adding proper multiples of 𝑈(𝑧) and 𝐸(𝑧), and once they have been removed, the remainder can
again be operated on by 𝑧 −1 .
𝑋4 𝑧 + 𝑏3 𝐸 𝑧 − 𝑎3 𝑈 𝑧 = 𝑧 3 𝑈 𝑧 + 𝑎1 𝑧 2 𝑈 𝑧 + 𝑎2 𝑧𝑈 𝑧 − 𝑏0 𝑧 3 𝐸 𝑧 − 𝑏1 𝑧 2 𝐸 𝑧 − 𝑏2 𝑧𝐸 𝑧
Cont’d…
⇛ 𝑋4 𝑧 + 𝑏3 𝐸 𝑧 − 𝑎3 𝑈 𝑧 = 𝑧{𝑧 2 𝑈 𝑧 + 𝑎1 𝑧𝑈 𝑧 + 𝑎2 𝑈 𝑧 − 𝑏0 𝑧 2 𝐸 𝑧 − 𝑏1 𝑧𝐸 𝑧 − 𝑏2 𝐸 𝑧 }
⇛ 𝑧 −1 {𝑋4 𝑧 + 𝑏3 𝐸 𝑧 − 𝑎3 𝑈 𝑧 } = 𝑧 2 𝑈 𝑧 + 𝑎1 𝑧𝑈 𝑧 + 𝑎2 𝑈 𝑧 − 𝑏0 𝑧 2 𝐸 𝑧 − 𝑏1 𝑧𝐸 𝑧 − 𝑏2 𝐸 𝑧
• Let
𝑥3 𝑘 + 1 = 𝑥4 𝑘 + 𝑏3 𝑒 𝑘 − 𝑎3 𝑢 𝑘
⇒ 𝑧𝑋3 𝑧 = 𝑋4 𝑧 + 𝑏3 𝐸 𝑧 − 𝑎3 𝑈 𝑧
⇒ 𝑋3 𝑧 = 𝑧 −1 {𝑋4 𝑧 + 𝑏3 𝐸 𝑧 − 𝑎3 𝑈 𝑧 }
• Then
⇛ 𝑋3 𝑧 = 𝑧 2 𝑈 𝑧 + 𝑎1 𝑧𝑈 𝑧 + 𝑎2 𝑈 𝑧 − 𝑏0 𝑧 2 𝐸 𝑧 − 𝑏1 𝑧𝐸 𝑧 − 𝑏2 𝐸 𝑧
If we continue this process of subtracting out the terms at 𝑘 and operating on the
rest by 𝑧 −1 , we finally arrive at the place where all that is left is 𝑈(𝑧) alone!
Cont’d…
c 𝑋3 𝑧 = 𝑧 2 𝑈 𝑧 + 𝑎1 𝑧𝑈 𝑧 + 𝑎2 𝑈 𝑧 − 𝑏0 𝑧 2 𝐸 𝑧 − 𝑏1 𝑧𝐸 𝑧 − 𝑏2 𝐸 𝑧
⇛ 𝑋3 𝑧 + 𝑏2 𝐸 𝑧 − 𝑎2 𝑈 𝑧 = 𝑧 2 𝑈 𝑧 + 𝑎1 𝑧𝑈 𝑧 − 𝑏0 𝑧 2 𝐸 𝑧 − 𝑏1 𝑧𝐸 𝑧
⇛ 𝑋3 𝑧 + 𝑏2 𝐸 𝑧 − 𝑎2 𝑈 𝑧 = 𝑧{𝑧𝑈 𝑧 + 𝑎1 𝑈 𝑧 − 𝑏0 𝑧𝐸 𝑧 − 𝑏1 𝐸 𝑧 }
⇛ 𝑧 −1 {𝑋3 𝑧 + 𝑏2 𝐸 𝑧 − 𝑎2 𝑈 𝑧 } = 𝑧𝑈 𝑧 + 𝑎1 𝑈 𝑧 − 𝑏0 𝑧𝐸 𝑧 − 𝑏1 𝐸 𝑧
• Let
𝑥2 𝑘 + 1 = 𝑥3 𝑘 + 𝑏2 𝑒 𝑘 − 𝑎2 𝑢 𝑘
⇒ 𝑧𝑋2 𝑧 = 𝑋3 𝑧 + 𝑏2 𝐸 𝑧 − 𝑎2 𝑈 𝑧
⇒ 𝑋2 𝑧 = 𝑧 −1 {𝑋3 𝑧 + 𝑏2 𝐸 𝑧 − 𝑎2 𝑈 𝑧 }
• Then
⇛ 𝑋2 𝑧 = 𝑧𝑈 𝑧 + 𝑎1 𝑈 𝑧 − 𝑏0 𝑧𝐸 𝑧 − 𝑏1 𝐸 𝑧
Cont’d…
d 𝑋2 𝑧 = 𝑧𝑈 𝑧 + 𝑎1 𝑈 𝑧 − 𝑏0 𝑧𝐸 𝑧 − 𝑏1 𝐸 𝑧
⇛ 𝑋2 𝑧 + 𝑏1 𝐸 𝑧 − 𝑎1 𝑈 𝑧 = 𝑧𝑈 𝑧 − 𝑏0 𝑧𝐸 𝑧
⇛ 𝑋2 𝑧 + 𝑏1 𝐸 𝑧 − 𝑎1 𝑈 𝑧 = 𝑧{𝑈 𝑧 − 𝑏0 𝐸 𝑧 }
⇛ 𝑧 −1 {𝑋2 𝑧 + 𝑏1 𝐸 𝑧 − 𝑎1 𝑈 𝑧 } = 𝑈 𝑧 − 𝑏0 𝐸 𝑧
• Let
𝑥1 𝑘 + 1 = 𝑥2 𝑘 + 𝑏1 𝑒 𝑘 − 𝑎1 𝑢 𝑘
⇒ 𝑧𝑋1 𝑧 = 𝑋2 𝑧 + 𝑏1 𝐸 𝑧 − 𝑎1 𝑈 𝑧
⇒ 𝑋1 𝑧 = 𝑧 −1 {𝑋2 𝑧 + 𝑏1 𝐸 𝑧 − 𝑎1 𝑈 𝑧 }
• Then
⇛ 𝑋1 𝑧 = 𝑈 𝑧 − 𝑏0 𝐸 𝑧
Cont’d…
e 𝑋1 𝑧 = 𝑈 𝑧 − 𝑏0 𝐸 𝑧
⇛ 𝑈 𝑧 = 𝑋1 𝑧 + 𝑏0 𝐸 𝑧
⇛ 𝑢 𝑘 = 𝑥1 𝑘 + 𝑏0 𝑒 𝑘
𝑢 𝑘 = 𝑥1 𝑘 + 𝑏0 𝑒 𝑘
𝑥1 𝑘 + 1 = 𝑥2 𝑘 + 𝑏1 𝑒 𝑘 − 𝑎1 𝑢 𝑘
= 𝑥2 𝑘 + 𝑏1 𝑒 𝑘 − 𝑎1 {𝑥1 𝑘 + 𝑏0 𝑒 𝑘 }
= −𝑎1 𝑥1 𝑘 + 𝑥2 𝑘 + (𝑏1 − 𝑎1 𝑏0 )𝑒 𝑘
Cont’d…
𝑥2 𝑘 + 1 = 𝑥3 𝑘 + 𝑏2 𝑒 𝑘 − 𝑎2 𝑢 𝑘
= 𝑥3 𝑘 + 𝑏2 𝑒 𝑘 − 𝑎2 {𝑥1 𝑘 + 𝑏0 𝑒 𝑘 }
= −𝑎2 𝑥1 𝑘 + 𝑥3 𝑘 + (𝑏2 − 𝑎2 𝑏0 )𝑒 𝑘
𝑥3 𝑘 + 1 = 𝑥4 𝑘 + 𝑏3 𝑒 𝑘 − 𝑎3 𝑢 𝑘
= 𝑥4 𝑘 + 𝑏3 𝑒 𝑘 − 𝑎3 {𝑥1 𝑘 + 𝑏0 𝑒 𝑘 }
= −𝑎3 𝑥1 𝑘 + 𝑥4 𝑘 + (𝑏3 − 𝑎3 𝑏0 )𝑒 𝑘
𝑥4 𝑘 + 1 = 𝑏4 𝑒 𝑘 − 𝑎4 𝑢 𝑘
= 𝑏4 𝑒 𝑘 − 𝑎4 {𝑥1 𝑘 + 𝑏0 𝑒 𝑘 }
= −𝑎4 𝑥1 𝑘 + (𝑏4 − 𝑎4 𝑏0 )𝑒 𝑘
Cont’d…
The observable canonical form can be written in matrix form as the following:
𝒙 𝒌 + 𝟏 = 𝑨𝒐 𝒙 𝒌 + 𝑩𝒐 𝒆(𝒌)
𝒖(𝒌) = 𝑪𝒐 𝒙(𝒌) + 𝑫𝒐 𝒆(𝒌)
where
−𝑎1 1 0 0 𝑏1 − 𝑎1 𝑏0
−𝑎 0 1 0 𝑏2 − 𝑎2 𝑏0
𝑨𝒐 = −𝑎2 , 𝑩𝒐 =
3 0 0 1 𝑏3 − 𝑎3 𝑏0
−𝑎4 0 0 0 𝑏4 − 𝑎4 𝑏0
𝑪𝒐 = 1 0 0 0
𝑫𝒐 = 𝑏0
Cont’d…
Block Diagram Development for Observable Canonical Form
1 15 1 15
∴ 𝑧1 = + =1 and 𝑧2 = + =1
16 16 16 16
⇛ Since the roots are on the unit circle, the system is asymptotically stable.
1.6. Sample and Hold
• Sampling: it can be a modulation process in which a pulse train 𝑝(𝑡) with
magnitude 1 𝜎 and period 𝑇, multiplies a continuous function 𝑓(𝑡) and produce a
∗
sampled function 𝑓𝑝 𝑡 .
Cont’d…
Digital to Analog, DAC (or D/A) Converter:
It serves as a device that converts the sampled signal to a continuous
signal.
Zero Order Hold (ZOH):
It takes the value of D/A converter at 𝑡 = 𝑘𝑇 and holds it constant
for 𝑘𝑇 ≤ 𝑡 < 𝑘 + 1 𝑇.
• Example: Let us consider a Sampler and ZOH for the following
signal.
Cont’d…
1.7. Digitization
Continuous controllers are built using analog electronics such
as resistors, capacitors and operational amplifiers.
𝑈(𝑠) 5𝑠+10
⇒𝐻 𝑠 = =
𝐸(𝑠) 𝑠+10
⇒ 𝑠 + 10 𝑈 𝑠 = 5𝑠 + 10 𝐸 𝑠
⇒ 𝑢 𝑘 + 1 − 𝑢 𝑘 + 10𝑇𝑢 𝑘 = 5𝑒 𝑘 + 1 − 5𝑒 𝑘 + 10𝑇𝑒(𝑘)
⇒ 𝑢 𝑘 + 1 − 𝑢 𝑘 + 𝑢 𝑘 = 5𝑒 𝑘 + 1 − 5𝑒 𝑘 + 𝑒(𝑘)
⇒ 𝑢 𝑘 + 1 = 5𝑒 𝑘 + 1 − 4𝑒 𝑘
1.8. Discrete Transfer Function of a Continuous System
Preceded by a ZOH
We wish to find the discrete transfer function from the input samples 𝑢(𝑘𝑇) (which
probably come from a computer of some kind) to the output samples 𝑦(𝑘𝑇) picked up
by the A/D converter.
• Let us assume that this discrete transfer function is 𝐺(𝑧).
• To find 𝐺(𝑧) we need only observe that the 𝑦 𝑘𝑇 are samples of the plant output
when the input is from the D/A converter. As for D/A converter, we assume that this
device, commonly called a ZOH accepts a sample 𝑢(𝑘𝑇) at 𝑡 = 𝑘𝑇 and holds its
output constant at this value until the next sample is sent at 𝑡 = 𝑘𝑇 + 𝑇. The piecewise
constant output of the D/A is the signal, 𝑢(𝑡), that is applied to the plant.
• Consider that the input samples are unit impulse
Cont’d… 1, for k = 0
𝑢 𝑘𝑇 =
0 , elsewhere
• The output of the D/A converter preceded by a ZOH is a pulse of width 𝑇 seconds and
a height of 1.
𝑢 𝑡 =1 𝑡 −1 𝑡−𝑇
𝑈 𝑧 = 𝒵{𝑢(𝑘𝑇)}
= 𝒵 1 |𝑘 = 0
=1
• Then
⇛𝑌 𝑧 =𝐺 𝑧
⇛ 𝐺 𝑧 = 𝒵 𝑦(𝑘𝑇)
= 𝒵 ℒ −1 𝑌(𝑠) |𝑡 = 𝑘𝑇
Cont’d…
−1 −𝑇𝑠 𝐺 𝑠
⇛𝐺 𝑧 =𝒵 ℒ (1 − 𝑒 ) |𝑡 = 𝑘𝑇
𝑠
−1 𝐺 𝑠 𝐺 𝑠
=𝒵 ℒ − ℒ −1 𝑒 −𝑇𝑠
𝑠 𝑠
−1 𝐺 𝑠 −1 −𝑇𝑠 𝐺 𝑠
=𝒵 ℒ −𝒵 ℒ 𝑒
𝑠 𝑠
−1 𝐺 𝑠 𝐺 𝑠
=𝒵 ℒ − 𝑧 −1 𝒵 ℒ −1
𝑠 𝑠
𝐺 𝑠
= 1− 𝑧 −1 𝒵 ℒ −1 |𝑡 = 𝑘𝑇
𝑠
Cont’d…
Example: What is the discrete transfer function of
6
𝐺 𝑠 =
(𝑠 + 3)(𝑠 + 2)
preceded by a ZOH?
Solution:
𝐺 𝑠 6 1 2 3
⇛ = = + −
𝑠 𝑠(𝑠 + 3)(𝑠 + 2) 𝑠 𝑠 + 3 𝑠 + 2
−1 𝐺 𝑠
⇛ ℒ = 1 𝑡 + 2𝑒 −3𝑡 − 3𝑒 −2𝑡
𝑠
−1 𝐺 𝑠
⇛𝒵 ℒ |𝑡 = 𝑘𝑇
= 𝒵 1 𝑘𝑇 + 2𝑒 −3𝑘𝑇 − 3𝑒 −2𝑘𝑇
𝑠
Cont’d…
𝐺 𝑠 1 1 1
⇛𝒵 ℒ −1 |𝑡 = 𝑘𝑇
= −1
+2 −3𝑇 −1
−3
𝑠 1−𝑧 1−𝑒 𝑧 1 − 𝑒 −2𝑇 𝑧 −1
𝑧 𝑧 𝑧
= + 2 −3
𝑧−1 𝑧−𝑒 −3𝑇 𝑧−𝑒 −2𝑇
𝑧−1 𝑧 𝑧 𝑧
= + 2 − 3
𝑧 𝑧−1 𝑧−𝑒 −3𝑇 𝑧−𝑒 −2𝑇
𝑧−1 𝑧−1
=1+ 2 − 3
𝑧−𝑒 −3𝑇 𝑧−𝑒 −2𝑇
1.9. Analysis of Sample and Hold
• To get samples of a physical signal such as a position or a velocity into a digital
form, we have a sensor device that produces a voltage proportional to the
physical variable and an A/D converter or ADC that transforms the voltage into
a digital number.
• In order to give the computer an accurate representation of the signal exactly at the
sampling instants kT, the A/D converter is typically preceded by a sample-and-hold
circuit (SHC).
𝑣𝑜 1
⟹ = −
𝑣𝑖 𝑅𝐶𝑠+1
Cont’d…
2. When a sample is to be taken at 𝑡 = 𝑘𝑇, the switch 𝑆 is set to position 2 and
the capacitor C holds the output of the op-amp frozen from that time at
𝑣𝑜𝑢𝑡 𝑘𝑇 = 𝑣𝑖𝑛 𝑘𝑇 .
The A/D converter is now signaled to begin conversion of the constant input from the SHC into a
digital number which will be a true representation of the input voltage at the sample instant.
When the conversion is completed, the digital number is presented to the computer at which time
the calculations based on this sample value can begin.
The SHC switch is now moved to position 1 and the circuit is again tracking, waiting for the next
command to freeze a sample. The SHC needs only to hold the voltage for a short time on the
order of microseconds in order for the conversion to be completed before it starts tracking again.
So, the combination of the electronic SHC plus the ADC operate as a sample
and hold for the sampling period, T.
Cont’d…
1.10. Sampling Operation by using Impulse Modulation
𝑟∗ 𝑡 = 𝑟 𝑡 𝛿 𝑡 − 𝑘𝑇 = 𝑟(𝑘𝑇)
𝑘=−∞
• Impulse:- the limit of a pulse of unit area that has growing amplitude and
shrinking duration.
Cont’d…
The Laplace transform of the sampler is:
∞
⇛ ℒ 𝑟∗ 𝑡 = 𝑟 ∗ 𝜏 𝑒 −𝑠𝜏 𝑑𝜏
−∞
∞ ∞
⇛ 𝑅∗ 𝑠 = 𝑟 𝜏 𝛿 𝜏 − 𝑘𝑇 𝑒 −𝑠𝜏 𝑑𝜏
−∞ 𝑘=−∞
∞ ∞
= 𝑟 𝜏 𝛿 𝜏 − 𝑘𝑇 𝑒 −𝑠𝜏 𝑑𝜏
𝑘=−∞ −∞
∞ ∞
= 𝑟 𝜏 𝑒 −𝑠𝜏 𝛿 𝜏 − 𝑘𝑇 𝑑𝜏
𝑘=−∞ −∞
Cont’d…
• But from impulse shifting property:
∞
𝑓 𝑡 𝛿 𝑡 − 𝑎 𝑑𝑡 = 𝑓(𝑎)
−∞
∞
⇛ 𝑅∗ 𝑠 = 𝑟 𝑘𝑇 𝑒 −𝑠𝑘𝑇
𝑘=−∞
The Laplace transform of the sample of a unit step function by using impulse
modulation is:
𝑟 𝑡 =1 𝑡 𝑓𝑜𝑟 𝑡≥0
∞
𝑟∗ 𝑡 = 𝑟 𝑡 𝛿 𝑡 − 𝑘𝑇
𝑘=−∞
Cont’d…
∞
𝑟∗ 𝑡 = 1 ∗ 𝛿 𝑡 − 𝑘𝑇
𝑘=0
= 𝛿 𝑡 − 𝑘𝑇
𝑘=0
𝑅∗ 𝑠 = 𝑟 𝑘𝑇 𝑒 −𝑠𝑘𝑇
𝑘=−∞
= 1 𝑘𝑇 𝑒 −𝑠𝑘𝑇
𝑘=0
Cont’d… ∞
𝑅∗ 𝑠 = 𝑒 −𝑠𝑘𝑇
𝑘=0
1
=
1 − 𝑒 −𝑠𝑇
• The hold is defined as the means whereby these impulses are extrapolated to the
piecewise constant signal 𝑟ℎ 𝑡 , defined as:
𝑟ℎ 𝑡 = 𝑟 𝑘𝑇 , 𝑘𝑇 ≤ 𝑡 < 𝑘𝑇 + 𝑇
• A general technique of data extrapolation from samples is to use a polynomial fit to
the past samples.
• If the extrapolation is done by a constant, which is a zero-order polynomial, then the
extrapolator is called a zero-order hold, and its transfer function is designated as
𝑍𝑂𝐻 𝑠 .
Cont’d…
𝑍𝑂𝐻 𝑠 can be computed from the transform of its impulse
response.
If 𝑟 ∗ (𝑡) = 𝛿(𝑡), then 𝑟ℎ 𝑡 , which is now the impulse response of
the 𝑍𝑂𝐻, is a pulse of height 1 and duration T seconds.
= ℒ 1 𝑡 − 1(𝑡 − 𝑇)
1 − 𝑒 −𝑠𝑇
=
𝑠
Assignment #1
1. a) List at least 3 commercially available ADC and DAC and compare their
performances.
b) Why we use ADC and DAC?
1. Describe the fundamental differences between “sampled data systems” and
“discrete time systems” in detail.
2. Let r be any number and 𝑐 ≠ 0. If
∞
𝑐𝑟 𝑛
𝑛=0
converges, then proof that:
∞
𝑚
𝑐𝑟
𝑐𝑟 𝑛 =
1−𝑟
𝑛=𝑚