Professional Documents
Culture Documents
Nebiyu Tenaye
Addis Ababa University
Addis Ababa Institute of Technology
School of Electrical & Computer Engineering
Overview
1 Overview
2 Objective
3 Hybrid Control Systems
4 Properties of Sampled Data Systems
5 Discretization Methods
Forward Difference
Backward Difference
Trapezoidal (Tustin) Rule
6 Notes on Discretization Methods
7 Zero Order Hold
8 First Order Hold
9 System Modeling with MATLAB
Lecture Objectives
Y ∗ (s) = [Y ∗ (s)]∗
Y (z) = Z{Y ∗ (s)}
Y (s) = G(s)X(s)
Y ∗ (s) = [G(s)X(s)]∗
Y (z) = Z{G(s)X(s)}
Example (1)
Example (1)
Solution:
(a) Using Property 3:
E ∗ (s) = R∗ (s) − B ∗ (s) ⇒ E(z) = R(Z) − B(z)
From Property 5:
M ∗ (s) = [Gc (s)E ∗ (s)]∗ = G∗c (s)E ∗ (s) ⇒ M (z) = Gc (Z)E(z)
where Gc (z) ≡ Z{G∗c (s)} = Z{Gc (s)}
Similarly, property 7 yields:
B ∗ (s) = [H(s)Gp (s)Gzoh (s)M ∗ (s)]∗
B ∗ (s) = [H(s)Gp (s)Gzoh (s)]∗ M ∗ (s) ⇒ B(z) = G(z)M (z)
where G(z) ≡ Z{H(s)Gp (s)Gzoh (s)}
Example (1)
Combining the previous (boxed) three equations gives:
Thus
B(z) G(z)Gc (z)
=
R(z) 1 + G(z)Gc (z)
where
Example (1)
(b)
Example (1)
Using Property 3:
E ∗ (s) = R∗ (s) − B ∗ (s) ⇒ E(z) = R(z) − B(z)
From Property 5:
M ∗ (s) = [Gc (s)E ∗ (s)]∗ = G∗c (s)E ∗ (s) ⇒ M (z) = Gc (z)E(z)
where Gc (z) ≡ Z{G∗c (s)}
Example (1)
Finally, property 7 gives:
B ∗ (s) = [H(s)Gp (s)Gzoh (s)M ∗ (s)]∗
B ∗ (s) = [H(s)Gp (s)Gzoh (s)]∗ M ∗ (s) ⇒ B(z) = G(z)M (z)
where G(z) ≡ Z{H(s)Gp (s)Gzoh (s)}
B(z) G(z)
= ≡ G2 (z)
Y (z) G1 (z)
Example (1)
Combining the previous equation with boxed equations of E(z),
M (z) and Y (z) gives:
Thus
Y (z)[1 + G1 G2 (z) Gc (z)] = G1 (z)Gc (z)R(z)
| {z }
G(z)
Discretization Methods
1. Forward Difference
Utilizing the definition of derivative, we have
dx ∼ x((k + 1)T ) − x(kT ) x(k + 1) − x(k)
= = (1)
dt (k + 1)T − kT T
In terms of forward time-shift operator q:
dx ∼ q − 1 d ∼ q−1
= x(k) ⇒ = (2)
dt T dt T
Since d/dt corresponds to s variable while q operator is equivalent
to z variable, equation-2 can be rewritten as:
z−1
s∼
= (3)
T
The s-variable in the transfer function is conveniently replaced by
this expression leading to a new transfer function of z:
0 ∼ z−1
G (z) = G s = (4)
T
Nebiyu Tenaye (AAiT/SECE) Lecture-5 May, 2017 18 / 39
Discretization Methods Backward Difference
2. Backward Difference
Utilizing the definition of derivative, we have
dx ∼ x(kT ) − x((k − 1)T ) x(k) − x((k − 1))
= = (5)
dt kT − (k − 1)T T
In terms of Backward time-shift operator q −1 :
dx ∼ 1 − q −1 d ∼ 1 − q −1
= x(k) ⇒ = (6)
dt T dt T
As d/dt corresponds to s variable while q −1 operator is equivalent
to z −1 variable, equation-6 can be rewritten as:
z−1
s∼
= (7)
Tz
The s-variable in the transfer function is to be replaced by this
expression leading to a new transfer function of z:
0 ∼ z−1
G (z) = G s = (8)
Tz
Nebiyu Tenaye (AAiT/SECE) Lecture-5 May, 2017 19 / 39
Discretization Methods Trapezoidal (Tustin) Rule
dx ∼ 2 q − 1 d 2 q−1
u(k) = = · · x(k) ⇒ = ·
dt T q+1 dt T q+1
As d/dt corresponds to s variable 2 q−1
while q operator is equivalent to z s∼
= · (9)
T q+1
variable, we have:
0 ∼ 2 q−1
Therefore, G (z) = G s = · (10)
T q+1
Nebiyu Tenaye (AAiT/SECE) Lecture-5 May, 2017 20 / 39
Notes on Discretization Methods
Example (2)
d2 y dy
+ 3 + 2y = x(t)
dt2 dt
If T = 0.01 s, obtain the discrete-time models for this system using
the following techniques:
(a) Forward difference
(b) Backward difference
(c) Tustin transformation
(d) Z-transform with ZOH
Example (2)
The transfer function of this plant in s-domain becomes:
Y (s) 1
(s2 + 3s + 2)Y (s) = X(s) ⇒ = 2
X(s) s + 3s + 2
Example (2)
(c) Tustin Transformation:
1
1 40601 (z + 1)2
G0 (z) ∼
= 2 =
z 2 − 1.9700z + 0.9704
4 z−1 6 z−1
T 2 z+1
+ T z+1 +2
Example (2)
(d) ZOH:
1 − e−sT 1 − e−sT
1 1 1
G(s) = = −
s2 + 3s + 2 s s+1 s+2 s
n o n o
1−e−sT
G0 (s) = Z 1
s+1 − 1
s+2 s = (1 − z −1 )Z 1
s+1 − 1
s+2 s
1
Example (2)
Hence,
B1 z −1 + B2 z −2
G0 (z) =
1 − z −1 (e−T + e−2T ) + z −2 e−3T
where
1
B1 ≡ (1 − e−T ) − 1 − e−2T
2
1
B2 ≡ e−T 1 − e−2T − e−2T (1 − e−T )
2
Why Z-transforms?
(1 − e−sT )2 1 (1 − z −1 )2 1
GF OH (s) = · = · 2 (12)
T e−sT s2 T z −1 s
Since it requires the future (one-step ahead) value of its input
m(k), it is very difficult to implement it in practice.
Industry-standard “casual”
realization of a FOH interface
employs “extrapolation”
techniques.
When kT < t < (k + 1)T , the
slope of the output waveform
is [m(k) − m(k − 1)]/T .
The corresponding transfer
function of this practical
implementation differs from
the one given previously.
MATLAB Functions
Example (3)
(Q.) If T = 0.01 s, obtain the transfer function B(z)/M (z) for the
given system using MATLAB.
Example (3)