Digital Control
Digital Control
Preface.......................................................................................................................xi
Authors.................................................................................................................. xiii
1. Introduction......................................................................................................1
1.1 Introduction............................................................................................1
1.2 Description of Analog and Digital Control Systems........................2
1.3 Advantages of Digital Control Systems and Applications............... 5
2. z-Transform....................................................................................................... 7
2.1 Introduction............................................................................................7
2.2 From Laplace Transform to z-Transform............................................ 7
2.2.1 Comparison of s- and z-Planes in the Region
of Convergence........................................................................ 10
2.3 z-Transform Properties........................................................................ 11
2.3.1 Time Shift................................................................................. 11
2.3.2 Linearity................................................................................... 12
2.3.3 Time Reverse........................................................................... 12
2.3.4 Convolution............................................................................. 12
2.3.5 Differentiation in z-Domain.................................................. 12
2.3.6 Initial and Final Value Theorem........................................... 12
2.4 Inverse z-Transform............................................................................. 13
2.4.1 Division Method..................................................................... 13
2.4.2 Method of Partial Fraction Expansion................................. 13
2.4.3 Method of Complex Integration........................................... 14
2.5 Formula Tables..................................................................................... 15
2.6 Solved Exercises................................................................................... 15
3. Transfer Function.......................................................................................... 53
3.1 Introduction.......................................................................................... 53
3.2 Open-Loop Sampled-Data Control System...................................... 53
3.3 Closed-Loop Sampled-Data Control System....................................54
3.4 Signal Flow Graphs.............................................................................. 55
3.5 Mason’s Formula.................................................................................. 57
3.6 Difference Equations........................................................................... 58
3.7 Formula Tables..................................................................................... 60
3.8 Solved Exercises................................................................................... 61
vii
viii Contents
1.1 Introduction
One of the most important theoretical and practical aspects of automatic
control is the systems’ interconnection through a feedback process and gener-
ally the concept of feedback such that the system input will always depend
on its corresponding output.
A remarkable technological breakthrough in these systems is their trans-
formation such that they can be connected to computing units (computeriza-
tion). Currently, control systems are based on computers’ power gain, which
enables them to work faster, more efficiently, and with greater reliability.
Nowadays, the control of a system performance is mainly carried out with
the aid of microcontrollers or microprocessors. Several procedures, described
by analog systems, can be controlled using digital systems. For the signal
processing purpose, the utilization of filters is widespread; the latter stands
for certain devices that either allow the components of a desired signal to
pass, by rejecting the unwanted ones (i.e., band-pass filters) or correct the
distorted signal components (i.e., equalizers). Also, satisfactory compensa-
tors are used in order to modify the dynamic response of control systems so
as to maximize the response of the integrated system.
The increasing flexibility of state-of-the-art digital processors drives the
above procedures to rely mainly on digital systems or digital filters. However,
the interconnection of analog and digital systems requires an appropriate
configuration so that both analog and digital signals can be processed. The
switching between analog and digital signals is obtained by the sampling of
signals and the so-called zero-order preservation.
By using the term “system,” we explicitly define a physical part of the nat-
ural world where we assume that it comprises a set of components which
simultaneously operate in a prescribed manner so as to achieve a certain
goal. A system communicates with the environment through signals.
Control systems can be classified, according to the type of signals that are
being processed, in continuous-time or analog, in discrete-time or digital,
and mixed or hybrid.
1
2 Digital Control Systems
Comparator
Counter
Feedback process
FIGURE 1.1
Analog automatic control system.
ep(t)
fp
ed(t)
D fd
PID controller
FIGURE 1.2
Analog automatic control system with a PID controller.
4 Digital Control Systems
r(t) + c(t)
A/D Controlled
Computer D/A
– e(k) m(k) process
e(t)
Feedback
FIGURE 1.3
Digital control system.
The controller computes the error signal (or the difference) and generates
an appropriate input signal to the controlled process in order to provide the
desired output signal. Using the controller, a transfer function is implemented,
the design of which can be made via a suitable algorithm that is programmed
into the PC or by using special equipment. The computer may be a digital filter
or a microprocessor, depending on the complexity and size of the system.
By appropriately adjusting the controller’s parameters, we are able to
intervene in the dynamics of the closed-loop system such that the system
meets its requirements and specifications.
In summary, there are two fundamental differences between the analog and
digital control systems.
• First, the digital system computes output samples and not the con-
tinuous signal.
• Second, the digital controller is described by difference equations; so
the differential equations which represent the analog controller must
be converted to difference equations. Thereby, the signals received by
a digital controller are given in a discrete form, while the signals which
enter the controlled system are continuous. Therefore, the continuous
signals of the controlled output and the reference input should be sam-
pled so as to provide the appropriate input of a discrete controller and
then the signal, generated by the controller, must be converted to being
continuous, to produce an input for the controlled system.
x A/D e D/A y
adapter adapter Actuator Process
Controller
A/D
Measure
adapter
FIGURE 1.4
Computer controlled system (CCS).
Introduction 5
The most challenging part in the design of control systems is the accu-
rate modeling of the physical unit or process. When designing a digital con-
troller, it is necessary to recognize the fact that the mathematical model of
a unit or process, in many cases, represents only an approximation of the
relevant physics. Exceptions are the cases when modeling electromechanical
and hydromechanical systems, since they can be accurately and efficiently
modeled. For example, the modeling of a robotic-arm system can be achieved
with quite high accuracy.
The computer-assisted control technique has been applied in a variety of
systems and processes such as industrial control, telecommunication sys-
tems, wireless/wired networks, nuclear and chemical reactors, terrestrial—
maritime and air transport systems, weapons systems, far-distant system
control, robotics, space applications, biotechnology, medicine, biology, etc.
2
z-Transform
2.1 Introduction
Analog systems are designed and analyzed with the use of Laplace trans-
forms. On the other hand, discrete-time systems are analyzed using a similar
technique called z-transform.
The basic lines of reasoning are the same for both scenarios: After deter-
mining the impulse response of the system, the response of any other input
signal can be extracted by simple arithmetic operations. The behavior and
the stability of the system can be predicted from the zeros and poles of the
transfer function.
As Laplace transform converts the differential equations into algebraic
terms with respect to s, z-transform converts the difference equations into alge-
braic terms with respect to z. Both transformations are matching a complex
quantity to the points of a region of the complex plane.
It should be noted that the z-plane (i.e., the domain of z-transform) is orga-
nized in a polar form, while the s-plane (i.e., the domain of Laplace transform)
is in a Cartesian form.
7
8 Digital Control Systems
FIGURE 2.1
Solution of D.E. using z-transform.
+∞
X(σ , ω ) =
∫
t =−∞
x(t) ⋅ e−σt ⋅ [cos(ωt) − j sin(ωt)]dt ⇒
+∞ +∞
(2.1)
X(σ , ω ) =
∫
t =−∞
x(t) ⋅ e −σt
cos(ωt)dt − j
∫
t =−∞
x(t) ⋅e −σt
sin(ωt)dt
Based on Equation 2.1, x(t) signal is analyzed in sine and cosine waves,
whose width exponentially varies in the time domain according to the rela-
tion e−σt. Each point of the complex s-plane is determined by the real and
imaginary part, that is, the parameters σ and ω. At every point of s-plane, one
can calculate the complex quantity X(σ, ω).
The real part of X(σ, ω) arises by multiplying the x(t) signal with a cosine
waveform having a frequency ω whose amplitude decreases exponentially
with a rate σ and is then integrated for all time instances.
z-Transform 9
Thus,
+∞
ℜe{X(σ , ω )} ~
∫
t =−∞
x(t) ⋅ e−σt ⋅ cos(ωt)dt (2.2)
The imaginary part is obtained by using a similar manner, that is, by mul-
tiplying the x(t) signal with a sine waveform of frequency ω whose amplitude
decreases exponentially with a rate σ. Hence,
+∞
ℑm{X(σ , ω )} ~
∫
t =−∞
x(t) ⋅ e−σt ⋅ sin(ωt)dt (2.3)
Based on the above representation of the Laplace transform, one can for-
mulate the z-transform, that is, the corresponding transformation relation
for discrete signals in three steps.
Step 1: The first step is the most obvious: Change the signal from con-
tinuous to discrete, that is, x(t) → x[n] and of course the integral should be
+∞
replaced with a sum. Thereby: ∫ +∞ t =−∞ → ∑ n=−∞ so
+∞
X(σ , ω ) = ∑ x[n] ⋅ e
n=−∞
−σ n
⋅ e− jωn (2.4)
Despite the fact that x[n] signal is a discrete one, X(σ, ω) is continuous since
σ and ω variables can take continuous values.
In the case of the Laplace transform, one could go through any point (σ, ω)
(not quite any point; the integral will not converge for points not belonging
in the region of convergence) of the complex plane and define the real and
imaginary part of X(σ, ω) by integrating over time, as previously explained.
If the case of z-transform, one may again go through up to any point of the
complex plane, but replace integration with summation.
Step 2: In the second step, polar coordinates are introduced to represent the
exponential e−σn.
The exponential signal y[n] = e−σn can be written as: y[n] = r−n, where,
apparently, the substitution eσ = r has taken place, holding that σ = ln r.
It is noteworthy that:
In the form y[n] = e−σn, y[n] increases with time when σ < 0.
In the form y[n] = r−n, y[n] increases with time when r < 1.
In the form y[n] = e−σn, y[n] decreases with time when σ > 0.
In the form y[n] = r−n, y[n] decreases with time when r > 1.
In the form y[n] = e−σn, y[n] remains unchanged when σ = 0.
In the form y[n] = r−n, y[n] remains unchanged when r = 1.
10 Digital Control Systems
Hence,
∞
X(r , ω ) = ∑ x[n]r
−∞
−n
⋅ e− jωn (2.5)
X( z) = ∑ x[n] ⋅ z
−∞
−n
(2.6)
Im Im
1
z = σ + jω
jω z = re jω
r
Re 0 ω Re
σ –1 0
–1
FIGURE 2.2
s-plane is orthogonal, while z-plane is polar.
z-Transform 11
s = σ + jω.
If… Then…
2.3.2 Linearity
Let x[n] be a function, which arises from the linear combination of two func-
tions x1[n] and x2[n] with regions of convergence Π1 and Π2, respectively. The
region of convergence of x[n] includes the intersection of Π1 ∩ Π 2 .
If… Then…
ZT
x[n] ↔ X(z) ax1 [n] + β x2 [n] ↔ aX1 ( z) + β X 2 ( z)
If… Then…
ZT 1
x[n] ↔ X(z) x[−n] ↔ X
z
2.3.4 Convolution
Let two functions x1[n] and x2[n] with corresponding z-transforms and
regions of convergence x1[n] ↔ X1(z) where z ∈ Π1 and x2[n] ↔ X2(z) where
z ∈ Π 2 . The transform for the signals’ convolution x1[n] and x2[n] is
x1[n] * x2 [n] ↔ X1( z)X 2 ( z) = X( z), where the region of convergence of X(z) is
identical or includes the intersection of regions of convergence of X1(z) and X2(z).
If… Then…
If… Then…
If… Then…
1
x[n] = Z−1 [ X( z)] =
2π j ∫ X(z)z
c
n−1
dz (2.7)
The facilitation of partial fraction expansion occurs for X(z)/z, and not
for X(z).
We distinguish three cases of partial fraction expansion for X(z)/z, accord-
ing to the form of its poles.
X( z) B( z) c1 cn (2.8)
= = ++
z ( z − p1 )( z − pn ) ( z − p1 ) ( z − pn )
B( z)
ci = lim ( z − pi ) (2.9)
z → pi ( z − p1 )( z − p2 )...( z − pn )
1 d( n− j ) n X( z)
cij = lim ( n− j ) ( z − pi ) (2.11)
(n − j)! z→ pi dz z
∫ F(z)z n−1
dz = 2π j ∑ residues[F(z)z n−1
] (2.12)
In the latter expression, also known as Cauchy’s formula, Σ stands for the
sum of residues for the poles of F(z), which includes the c curve.
Combining the above expressions, we have that
• If there is a simple first-order pole of F(z) · zn−1 (i.e., z = α), then its
residual is given by
1 d( m−1)
F( z)z n−1( z − α )m (2.15)
(m − 1)! dz( m−1) z =α
EXERCISE 2.1
Solution
Based on the definition of z-transform, we have that
16 Digital Control Systems
TABLE 2.1
z-Transform for Elementary Functions
x[n] X(z) Π.Σ.
1 δ[n] 1 All z
2 u[n] z
|z| > 1
z −1
3 −u[−n−1] z |z| < 1
z −1
4 δ[n−m] z−m All z except 0 (m > 0) or ∞ (m < 0)
5 n z |z| > |a|
a u[n]
z−a
6 z
−anu[−n−1] |z| < |a|
z−a
az
7 nanu[n] |z| > |a|
( z − a )2
8 az
−nanu[−n−1] |z| < |a|
( z − a )2
13 (r sin Ω)z
(rn sin Ωn)u[n] |z| < r
z 2 − (2r cos Ω)z + r 2
+∞ +∞ +∞
1 z
X( z) = ∑ u[n] ⋅ z
−∞
−n
= ∑1⋅ z
n= 0
−n
= ∑ (z
n= 0
−1 n
) =
1 − z −1
=
z−1
(2.1.1)
TABLE 2.2
z-Transform Properties
Property Function Transform R.C.
x[n] X(z) R
x1[n] X1(z) R1
x2[n] X2(z) R2
1 Linearity ax1[n] + βx2[n] aX1 ( z) + β X 2 ( z) R ’⊃ R1 ∩ R2
2 Time shift x[n−N] z X(z)
−N R ’⊃ R
3 z
Multiplication with z0n z0n x[n] X R ’= z0 R
z0
1 1
5 Time reverse x[−n] X R ’=
z R
EXERCISE 2.2
Compute the z-transform of the function x[n] = an · u[n].
Solution
Based on the definition of z-transform, we have that
X( z) = ∑ ∞ n
n=−∞ a u[n] ⋅ z
−n
= ∑∞ −1 n
n= 0 ( a ⋅ z ) , unit-step function restricts the
sum bounds from n = 0 to infinity.
The term (a · z−1)n is the general expression of a geometric progression
with a1 = 1 and ω = α · z−1.
In order for ∑ ∞ −1 n
n= 0 ( az ) to converge, the geometric progression should
be decreasing, that is, |a · z−1|< 1.
With this constraint at hand
∞
1 1 z
∑ (a ⋅ z
n=−∞
−1 − n
) = =
1 − az−1 1 − a
=
z−a
(2.2.1)
z
18 Digital Control Systems
Hence,
z
x[n] = a n ⋅ u[n] ↔ X( z) = (2.2.2)
z−a
The condition |z| > |a| defines the region of convergence of the trans-
form, that is, the set of values of the complex z-plane for which the
z-transform converges.
EXERCISE 2.3
Compute the z-transform of the functions x1[n] = δ[n−2] and
x2[n] = δ[n + 2].
Solution
The functions x1[n] and x2[n] are two time-shifted impulse functions.
The function x1[n] = δ[n−2] is equal to zero except the case when n = 2.
The z-transform is X1 ( z) = ∑ nn=+∞ =−∞ x1 [n]z
−n
= z−2 and produces a dou-
ble pole at z = 0. The region of convergence is the entire complex plane
except the point (0,0), yet it includes infinity.
Correspondingly, for the function x2[n], it will be expressed as
X 2 ( z) = ∑ nn=+∞
=−∞ x 2 [n]z
−n
= z 2 with a pole reaching infinity. The region of
convergence is the entire complex plane including (0,0), yet excepting
infinity.
EXERCISE 2.4
Compute the z-transform and the region of convergence for the func-
tions x[n] = (5/6)nu[n] and y[n] = (5/6)n+5u[n + 5].
Solution
The function x[n] takes nonzero values only when n ≥ 0, hence, it is a
causal function.
The function y[n] arises by shifting x[n] for 5 time units to the left
y[n] = x[n + 5], therefore, there are some negative values of the n vari-
able for which y[n] ≠ 0. Thereby, y[n] is a noncausal function.
From the transform of (5), given in the transformation table, it holds
that X(z ) = (z/(z−5/6)) with a region of convergence |z| < (5/6).
The transform of y[n] can be easily computed with the aid of the time
shift property (property 2—Table 2.2). The function is given as Y(z) =
z−5(z/z−5/6) = (z−4/z−5/6).
The poles and regions of convergence for X(z) and Y(z) functions are
presented in the following table.
n n+5
5 5
u[n + 5]
z-Transform
0.9 0.9
1
0.8 0.8
Im
0.7 0.7
0.6 0.6
0.5 0.5
y(n)
x(n)
0.4 0.4
Re
0.3
0 0.3
–1 1
0.2 0 0.2
0.1 0.1
0 0
−5 0 5 10 15 20 −5 0 5 10 15 20
n n
–1
EXERCISE 2.5
Compute the z-transform and the region of convergence for the func-
tions x[n] = −(5/4)nu[−n−1] and y[n] = −(5/4)n−3u[−n+2].
Solution
The function y[n] arises from the time shift of x[n] for 3 time units to
the right, y[n] = x[n−3], hence, as shown in the figure, there are some
positive values of the variable n for which y[n] ≠ 0. The function y[n] is
noncausal.
From the transform of (5), given in the transform lookup table, it holds
that X(z) = (z/(z−5/4)) with region of convergence |z| < 5/4.
The transform of y[n] can be easily computed with the aid of the time
shift property (property 2—Table 2.2). The function is given as
z−2 1
Y( z) = = (2.5.1)
z − (5/4) z 2 ( z − 5/4)
The poles and the regions of convergence of X(z) and Y(z) are presented
in the table (page 21).
Computation of z-transform of the function y[n] = −(5/4)n−3u[−n + 2]
without using the time shift property.
Based on the definition of the z-transform, we get
n=+∞ n=+∞ n= 2
5 n−3 5 n−3 −n
Y( z) = ∑
n=−∞
y[n]z−n = − ∑
n=−∞
u[−n + 2]z−n = −
4 ∑
n=−∞
z
4
n= 2 n= 2
5 −3 5 n 5 −3 5 n
= −
4 ∑ 4 z
n=−∞
−n
= −
4 ∑ 4 z
n=−∞
−1
or
n=+∞ n= 2
5 −3 5 n
Y( z) = ∑ y[n]z
n=−∞
−n
= −
4 ∑ 4 z
n=−∞
−1
(2.5.2)
5 5
x[n] = − u[−n − 1] y[n] = − u[−n + 2]
4 4
0 0
Im
−0.1 −0.1
1
−0.2 −0.2
−0.3 −0.3
x(n)
y(n)
−0.4 −0.4
Re
−0.5 −0.5
0
–1 1
−0.6 0 −0.6
−0.7 −0.7
−20 −15 −10 −5 0 5 −20 −15 −10 −5 0 5
n n
–1
z 5 1
X( z) = The region of convergence of X(z) is z < Y( z) =
z − ( 5 / 4) and does not include zero. The region of 4 z 2 ( z − 5/4)
5
5 convergence of Y(z) is z < but it includes 5
Pole: z = . 4 Poles: z = and z = 0.
4 zero. 4
Anti-causal, left defined. Noncausal, left defined.
21
22 Digital Control Systems
Then,
n=2
5 −1 n
∑
n=−∞
z = … + Λ k + … Λ 2 + Λ1 + Λ0 + Λ−1 + Λ−2
4
or
n=∞
∑Λ
n=−2
n
= … + Λ k + … Λ 2 + Λ1 + Λ0 + Λ−1 + Λ−2 .
n=+∞ n= 2
5 −3 5 −1 n −2
1
z = z
Y( z) = ∑
n=−∞
y[n]z−n = −
4 ∑
n=−∞
4
z−
5
=
5
z 2 z −
(2.5.5)
4 4
EXERCISE 2.6
Compute the z-transform and the region of convergence for the function
x[n] = (1/3)nu[n] + 2nu[−n−1].
Solution
The given function can be considered as the sum of x1[n] and x2[n] where
x1[n] = (1/3)nu[n] and x2[n] = 2nu[−n−1].
The transform of x1[n] directly results from the transform (5) of
Table 2.1 which is x1[n] = (1/3)nu[n] ↔ z/((z−(1/3))) = X1(z) with region of
convergence |z| > 1/3.
z-Transform 23
1
n 1
x[n] = u[n] + 2n u[−n − 1] Region of convergence < z <2
3 3
0.5 Im
2
0.45
0.4
1
0.35
2nu[−n−1] (1/3)nu[n]
0.3 Re
0
x(n)
0.25 –2 –1 0 1 2
0.2
0.15 –1
0.1
0.05 –2
0
−10 −8 −6 −4 −2 0 2 4 6 8 10
n
z z
X( z) = +
1 z−2
z−
3
1 5
z 2 − 2z − z 2 + z − z
3 = 3 z
= = −5 2
1 1 3 z − 7z + 2
z − ( z − 2) z − ( z − 2)
3 3
The poles of X(z) are z1 = 2. and z2 = 1/3. Since x[n] is bilateral, the
region of convergence will be the ring between the two poles, that is,
it will be defined by the relation 1/3 < |z| < 2, which is reflected at the
intersection of the regions of convergence of X1(z) and X2(z).
EXERCISE 2.7
Compute the z-transform for the function x[n] = n · anu[n].
Solution
According to the transform (5), x[n] = anu[n] ↔ (z/(z − a)) = X(z). The
derivative of X(z), with respect to z, is expressed as
d z ( z)′( z − a) − ( z − a)′ ⋅ z 1 ⋅ ( z − a) − 1 ⋅ z −a
= = = (2.7.1)
dz z − a ( z − a) 2 ( z − a)2 ( z − a) 2
24 Digital Control Systems
az
Z{n ⋅ a nu[n]} = (2.7.2)
( z − a)2
EXERCISE 2.8
Compute the z-transform of the function: x[n] = (1/3)nu[−n].
Solution
Based on the transform (6), we have −(1/3)nu[−n − 1] ↔ (z/(z − (1/3))), when
1
|z|< (2.8.1)
3
The function is time shifted by one unit, that is, n is replaced with
n − 1 so
1 n−1 z
− u[−(n − 1) − 1] ↔ z−1 or
3 z − 31
−1 n n (2.8.2)
1 1 1
− u[−n] ↔ 1 η u[−n] ↔ −
1 1
3 3 z − 31 3 3 z − 31
EXERCISE 2.9
Compute the z-transform of the function:
1 n
x[n] = n u[n − 2]
2
Solution
According to the transform (5), we have (1/2)nu[n] ↔ (z/z−1/2),
when|z| < 1/3.
Based on the time shift property we have
1 n−2
u[n − 2] ↔ z−2 z ⇒
2 1
z−
2
2 n− 2
1 1 2 −1 1 n −1
u[n − 2] ↔ 1 z ⇒ u[n − 2] ↔ 1 z
2 2 2 z − 1 2 4 z − 1
2 2
z-Transform 25
or
EXERCISE 2.10
Define the initial and final value of the system’s impulse when
2z 2
Y( z ) = , |α|,|β |< 1
( z − 1)( z − α)( z − β )
Solution
From the initial value theorem
2z 2
y[0] = lim Y( z) = lim =0 (2.10.1)
z →∞ z →∞ ( z − 1)( z − α )( z − β)
2z 2 2
y[∞] = lim( z − 1) Y( z) = lim = (2.10.2)
z →1 z →1 ( z − α )( z − β) (1 − α )(1 − β)
EXERCISE 2.11
Find the first four coefficients of the function x[n] when:
4 z −1
X1 ( z ) = −2
z − 2 z −1 + 2 ,
26 Digital Control Systems
Solution
a. For X1(z):
4 z −1 ⋅ z 2 4z
X1 ( z ) = −2 −1 2
= 2 (2.11.1)
( z − 2z + 2) ⋅ z 2z − 2z + 1
4z 2z 2 − 2z + 1
4 − 2 z −1
− 4 + 4 z −1 − 2 z −2
2 z −1 + 2 z −2
− 2 z −1 − 2 z −2 − 2 z −3
− 2 z −3
X 1 ( z ) = 2 z −1 + 2 z −2 + z −3 +
Therefore, we get
z −1 + 0 z −2 − 3 z −3 − 4 z −4
3
z + 2z + 4 z − 1 ) 2
z 2 + 2 + 4 z −1
− 3 − 4 z −1
−3 − 6 z−2 − 12z−3
− 4 z−1 + 6 z−2 + 12z−3
− 4 z −1 − 8 z−3 − 16 z−4
6 z−2 + 20 z−3 + 16 z−4
z-Transform 27
Therefore, we get
X 2 ( z ) = z −1 + 0 z −2 − 3 z −3 − 4 z −4 +
⇒ x2 [n] = 0δ[n] + 1δ[n − 1] + 0δ[n − 2] − 3δ[n − 3] + (2.11.3)
EXERCISE 2.12
Compute the inverse z-transform of the function
z −1 z2
F( z) = −1 2 −1
=
(1 − α z ) (1 − βz ) ( z − α )2 ( z − β)
Solution
It holds that
z2
f [n] = ∑ residues
( z − α )2 ( z − β)
z n−1
(2.12.1)
z 2 z n−1 z n +1 β n +1
= = (2.12.2)
( z − α )2 z= β
( z − α )2 z= β
( β − α )2
(2.12.3)
Hence,
α n [n(α − β ) − β ] + β n+1
f [n] = (2.12.4)
(α − β )2
EXERCISE 2.13
Compute the inverse z -transform of the function: F(z) = z−2 + z−1 +
1/0.2z−2 + 0.9z−1 + 1 using (a) the partial fraction expansion and
(b) complex integration.
28 Digital Control Systems
Solution
a. Computation of f(k) using the method of partial fraction
expansion.
z −2 + z −1 + 1 z2 + z + 1
F( z) = −2 −1
= (2.13.1)
0.2z + 0.9z + 1 ( z + 0.4)( z + 0.5)
F( z) z2 + z + 1 k k2 k3
= = 1+ + (2.13.2)
z z( z + 0.4)( z + 0.5) z z + 0.4 z + 0.5
Calculation of ki
F( z) 1
k1 = lim z= =5
z→ 0 z 0.2
F( z)
k 2 = lim ( z + 0.4) = −19 (2.13.3)
z →−0.4 z
F( z)
k 3 = lim ( z + 0.5) = 15
z →−0.5 z
Hence,
19z 15z
F( z) = 5 − + (2.13.4)
z + 0.4 z + 0.5
( z 2 + z + 1)z k −1
f (k ) = ∑ residues (z + 0.4)(z + 0.5) (2.13.6)
z-Transform 29
z2 + z + 1 1
residue z = 0 → = = 5, k = 0 (2.13.7)
( z + 0.4)( z + 0.5) z=0 0.2
( z 2 + z + 1)z k−1
residue z = −0.4 → = 7.6(0.4)k−1 = −19(0.4)k (2.13.8)
z + 0.5 z=0.4
( z 2 + z + 1)z k −1
residue z = −0.5 → = −7.5(−0.5)k −1 = 15(−0.5)k
z + 0.4 z =−0.5
(2.13.9)
Thereby:
EXERCISE 2.14
A discrete-time system has a transfer function:
4z2
H ( z) = 2
z − 41
Solution
a. Calculation of y(n).
Y( z ) 4z2
=
z ( z − 2 ) ⋅ ( z + 12 ) ⋅ ( z − 1)2
1
k1 k2 k k 32 (2.14.2)
= + + 31 +
( z − 21 ) ( z + 21 ) ( z − 1) ( z − 1)2
30 Digital Control Systems
Calculation of ki
Y( z) 1
k1 = lim z − = 4
z
z→ 1 2 2
Y( z) 1 4
k 2 = lim
z →− 1 2 z
z + = −
2 9
(2.14.3)
d Y( z) 32
k 31 = lim ( z − 1)2 = −
z →1 dz z 9
Y( z) 16
k 32 = lim ( z − 1)2 =
z →1 z 3
Thus,
z 4 z 32 z 16 z
Y( z) = 4 − − + (2.14.4)
1 9 z+ 1 9 z −1 3 ( z − 1)2
z−
2 2
1 n 4 1 n 32 16
y(n) = 4 − − − + n u(n) (2.14.5)
4 9 2 9 3
4z3 3 2 1 1
z 4 − 2z 3 + z + z−
4 2 4
-4z3 + 8z2 - 3z-2 + z-1 4z-1 + 8z-2 + 13z-3 + ⋯
8z - 3z + z
2 -2 -1
-8z2 + 16z-6 + 4z-1 + 2z-2 ⇓
EXERCISE 2.15
Compute the inverse z-transform of
10 z 2z 3 + z
F1 ( z) = , F2 ( z) =
( z − 1)( z − 0.5) ( z − 2)2 ( z − 1)
z2 + z + 2 z( z + 1)
F3 ( z) = , F4 ( z) =
( z − 1)( z 2 − z + 1) ( z − 1)( z − .25)2
Solution
a.
F1 ( z) k k2 20 20
= 1 + = + (2.15.1)
z z − 1 z − 0.5 z − 1 z − 0.5
Thus,
z z
F1 ( z) = 20 − 20 ⇒
z −1 z − 0.5
(2.15.2)
f1 (k ) = IZT[F1 ( z)] = 20(1 − 0.5k )u(k )
F2 ( z) 2z 2 + 1 k k k 22
= = 1 + 21 + (2.15.3)
z ( z − 2)2 ( z − 1) z − 1 z − 2 ( z − 2)2
2z 2 + 1 3 (2.15.4)
k1 = 2
( z − 1) = =3
( z − 2) ( z − 1) z =1
1
2z 2 + 1 9
k 22 = lim = =9 (2.15.5)
z→ 2 z − 1
1
2z 2 + 1 ′ 2
k 21 = lim = lim 4 z( z − 1) − (2z + 1) = 8 − (9) = −1 (2.15.6)
z→ 2 z − 1 z→ 2 ( z − 1) 2 1
Hence,
F2 ( z) 3 1 9
= − + (2.15.7)
z z − 1 z − 2 ( z − 2)2
32 Digital Control Systems
or
z z z IZT
F2 ( z) = 3 − +9 2
⇒
z −1 z − 2 ( z − 2)
(2.15.8)
f 2 (k ) = Z−1[F2 ( z)] = (3 − 2k + 9k 2k −1 )u(k )
2z 3 + z z(2z 2 + 1)
F2 ( z) = = ⇒
( z − 2) ( z − 1) ( z − 2)2 ( z − 1)
2
z k (2z 2 + 1) (2.15.9)
F2 ( z)z k −1 =
( z − 2)2 ( z − 1)
z k (2z 2 + 1) 3
residue ⇒ lim = =3 (2.15.10)
z =1 z →1 ( z − 2)2 1
d z k (2z 2 + 1) ′
= lim 2z + z =
k +2 k
residue ⇒ lim
z=2
z − 1 z → 2 z − 1
z → 2 dz
2k 2k +1 + 22 2k +1 + k 2k −1 − 2 ⋅ 2k + 2 − 2k =
k k k 9k k
4k 2k + 8 ⋅ 2k + 2 − 8 ⋅ 2k − 2k = 4k + 2k − 2k = 2 − 2k
2
2 2
residue = 9k ⋅ 2k −1 − 2k (2.15.11)
z=2
so
f 2 (k ) = (3 + 9k 2k −1 − 2k )u(k ) (2.15.12)
z-Transform 33
c.
F3 ( z) z2 + z + 2 k k k3 k4 = k3
= = 1+ 2 + π +
(2.15.13)
-j π
z z( z − 1)( z 2 − z + 1) z z − 1 z − ej 3 z−e 3
F ( z) 2
k1 = lim 3 z = = −2 (2.15.14)
z→0 z (−1)1
F ( z) 1+1+ 2
k 2 = lim 3 ( z − 1) = =4 (2.15.15)
z →1
z (1 − 1 + 1)1
2π π
j j
F ( z) π
e 3+e 3 +2
k 3 = limπ 3 ( z − e 3 ) =
j
=
j
z j j
π π j π −j
π
e 3 e 3
z→ e 3
− 1e − e
3 3
Thus,
z z z
F3 ( z) = −2 + 4 + 1.53e− j 229.1 j π3
+ 1.53e j 229.1 −j π
(2.15.17)
z −1 z−e z−e 3
jπ − j π3 k
f 3 (k ) = −2δ(k ) + 4u(k ) + 1.53e− j 229.1 (e 3 )k + 1.53e j 229.1 (e ) ⇒
kπ kπ
− j 229.1 j 3 j 229.1 − j 3
f 3 (k ) = −2δ(k ) + 4u(k ) + 1.53(e e +e e )=
j( k π3 − 229.1) − j( k π3 − 229.1)
−2δ(k ) + 4u(k ) + 1.53(e +e )
kπ
f 3 (k ) = −2δ(k ) + 4u(k ) + 3.06 cos − 229.1 u(k ) (2.15.18)
3
d.
F( z) ( z + 1) A B C
= = + + (2.15.19)
z ( z − 1)( z − 0.25)2 z − 1 ( z − 0.25)2 ( z − 0.25)
34 Digital Control Systems
( z + 1) 2
A= = = 3.56 (2.15.20)
( z − 0.25)2 z =1
(0.75)2
( z + 1) A
= ( z − 0.25)2 + B + C( z − 0.25)
( z − 1) z − 1
( z + 1) 1.25 54 5
B= = =− = − = −1.67 (2.15.21)
( z − 1) z =0.25 −0.75 43 3
Calculation of C
d ( z + 1) d A
= ( z − 0.25)2 + C ,
dz ( z − 1) dz z − 1
d ( z + 1) 1( z − 1) − 1( z + 1)
C= = ⇒
dz ( z − 1) z =.25 ( z − 1)2
−2 −2
C= = = −3.56 (2.15.22)
( z − 1)2 z=.25
(−0.75)2
Thus,
Thus,
EXERCISE 2.16
Compute the inverse z-transform of X(z) = (z2 + 6z)/(z2 − 2z + 2)(z − 1)
Solution
X( z) k k2 k3 (2.16.1)
= 1 + +
z z −1 z −1 + j z −1− j
z2 + 6z
k1 = lim 2
( z − 1) = 7 (2.16.2)
z =1 ( z − 2z + 2)( z − 1)
z2 + 6z 1+ j + 6
k 3 = lim 2
( z − 1 − j) =
z =1+ j ( z − 2z + 2)( z − 1) (1 + j − 1)(1 + j − 1 + j)
7+j 7+j 7+j 7 j (2.16.3)
= = =− =− −
j ⋅ 2j 2 j2 2 2 2
7 j __
k2 = − + = k3 (2.16.4)
2 2
Hence,
z 7 1 z 7 1 z
X( z) = 7 + − + j + − − j (2.16.5)
z − 1 2 2 z − 1 + j 2 2 z − 1−−j
IZT 7 1 7 1
( ) ( )
k −j π k k jπk
(2.16.5) ⇒ x(k ) = 7 + − + j 2 e 4 + − − j 2 e 4 ⇒
2 2
2 2
7 7
( ) ( )
k −j π k k jπk
x(k ) = 7 − 2 e 4 − 2 e 4 +
2 2
1 1
( ) ( )
k −j π k k jπk
+j 2 e 4 −j 2 e 4 ⇒
2 2
7 k jπk −j π k 1 k jπk −j π k
x(k ) = 7 −
2
( )
2 e + e 4 − j
4
2
( )
2 e 4 − e 4 ⇒
7 π 1 π
( ) ( )
k k
x(k ) = 7 − 2 2 cos k − j 2 2 j sin n k⇒
2 4 2 4
( 2 ) cos π4 k + ( 2 ) sin π4 ku(k)
k k
x(k ) = 7 − 7 (2.16.6)
36 Digital Control Systems
EXERCISE 2.17
Compute the inverse z-transform of X(z) = (z3 + 1)/(z3 − z2 − z− 2)
Solution
The denominator of the given function is expressed as
X( z) c0 c1 c1 c
= + + + 3 (2.17.2)
z z z + 0.5 + j0.866 z + 0.5 − j0.866 z − 2
X( z) 1
c0 = ( z) = = −0.5
z z=0 −2
X( z)
c1 = ( z + 0.5 + j0.866) = 0.429 + j0.0825 (2.17.3)
z z=−0.5− j 0.866
X( z)
c3 =
z
( z − 2) = 0.6643
z=2
c1z c1z cz
X( z) = c0 + + + 3
z + 0.5 + j0.866 z + 0.5 − j0.866 z − 2
c1 c1 c3 (2.17.4)
= c0 + + +
1 + 0.5 + j0.866 z−1 1 + 0.5 − j0.866 z−1 1 − 2z−1
p1 = (0.5)2 + (0.866)2 = 1
0.866 4π
∠p1 = π + tan−1 = rad
0.5 3
(2.17.6)
c1 = (0.429)2 + (0.0825)2 = 0.437
0 . 0825
∠c1 = tan−1 = 0.19 rad (10.89°)
0.429
z-Transform 37
EXERCISE 2.18
2z
Compute the inverse z-transform of F( z) =
( z − 2)( z − 1)2
Solution
a. Using the division method
2z
F( z) =
z 3 − 4 z 2 + 5z − 2
F( z) = ∑f z n
−n
= 2z−2 + 8z−3 + 22z−4 + 52z−5 + 114z−6 + (2.18.1)
n=0
38 Digital Control Systems
n 0 1 2 3 4 5 6 …
f(n) 0 0 2 8 22 52 114 …
2z kz kz k3 z (2.18.2)
F( z ) = = 1 + 2 +
( z − 2)( z − 1)2 z − 2 z − 1 ( z − 1)2
2z k z( z − 2) k 3 z( z − 2)
2
= k1 z + 2 + (2.18.3)
( z − 1) z −1 ( z − 1)2
2 k ( z − 2) k 3 ( z − 2)
= k1 + 2 + (2.18.4)
( z − 1)2 z −1 ( z − 1)2
2 k 2 ( z − 2) k ( z − 2) (2.18.5)
= k1 + + 3
( z − 1)2 z=2
z − 1 z=2 ( z − 1)2 z = 2
Hence, k1 = 2.
Similarly, in order to obtain k3, we multiply both parts of the
equation with (z−1)2, divide with z and set z →1.
2 k ( z − 1)2
= 1 + k 2 ( z − 1) + k 3 z (2.18.6)
( z − 2) z−2
Thus, k3 = −2
In order to calculate k2, both parts of expression (2.18.6) are
differentiated and we set z→1.
2 k ( z − 1)2
= 1 + k 2 ( z − 1) + k 3 z (2.18.7)
( z − 2) z−2
2 2( z − 1) 2( z − 1)2
− = k1 − + k2 (2.18.8)
( z − 2) 2 z−2 ( z − 2)2
z-Transform 39
Hence, k2 = −2
Thus, F(z) becomes:
2z 2z 2z (2.18.9)
F( z) = − −
z − 2 z − 1 ( z − 1)2
EXERCISE 2.19
Compute the inverse z-transform of
Solution
( z − 1)( z + 0.8)
a. H( z) = ,
( z + 0.5)( z + 0.2)
X( z) C1 C2 C3
= + +
z z z − 0.5 z + 0.2
X( z) X( z)
C1 = z z=0 = 8, C2 = ( z − 0.5) z =0.5 = −1.857 ,
z z
X( z)
C3 = ( z + 0.2) z =−0.2 = −5.143,
z
1.857 z 5.143 z
X( z) = 8 − −
z − 0.5 z + 0.2
x[n] = 8δ[n] − 1.857(0.5)n u[n] − 5.143(−0.2)n u[n]
( z 2 −1)( z + 0.8)
b. H( z) =
( z − 0.5)2 ( z + 0.2)
X( z) C1 C2 C3 C4
= + + +
z z z + 0.2 z − 0.5 ( z − 0.5)2
X( z) X( z)
C1 = z z=0 =−16, C2 = ( z + 0.2) z=−0.2 = 5.88,
z z
X( z)
C4 = ( z − 0.5) z=0.5 =−2.79,
z
d ( z 2 −1)( z + 0.8)
C3 = = 11.12
dz z( z + 0.2)
z=0.5
5.88 z 11.12z 2.79z
X( z) =−16 − − −
z + 0.2 z − 0.5 ( z − 0.5)2
x[n] =−16δ[n] + 5.88(−0.2)n u[n] + 11.12(0.5)n u[n]− 2.79n(0.5)n u[n].
EXERCISE 2.20
Solve the following difference equation, where the initial values are zero.
Solution
We apply the z-transform in the given equation
z
z 2Y( z) − 0.3 zY( z) + 0.02Y( z) = 0.01 (2.20.1)
z − 0.3
z
(2.20.1) ⇒ Y( z)( z 2 − 0.3 z + 0.02) = 0.01 ⇒
z − 0.3
0.01z
Y ( z) = (2.20.2)
( z − 0.1)( z − 0.2)( z − 0.3)
Y( z ) A B C
= + + (2.20.3)
z ( z − 0.1) ( z − 0.2) ( z − 0.3)
0.01 0.01
A= = = 0.5
( z − 0.2)( z − 0.3) z=0.1 (−0.1)(−0.2)
0.01 0.01
B= = = −1 (2.20.4)
( z − 0.1)( z − 0.3) z=0.2 (0.1)(−0.1)
0.01 0.01
C= = = 0.5
( z − 0.1)( z − 0.2) z=0.3 (0.2)(0.1)
Thus,
The derived values match the previously derived solution; so, the
result is valid.
EXERCISE 2.21
Solve the second-order difference equation y[k + 2] + 5y[k + 1] + 6y[k]
= 5x[k + 2] with initial conditions y(0) = 0, y(1) = 2.
Solution
We apply z-transform in the given equation, such that
Then,
Υ( z) 2 2 k k
= 2 = = 1 + 2 (2.21.2)
z z − 5z + 6 ( z − 2)( z − 3) z − 2 z − 3
Y( z )
k1 = lim ( z − 2) = −2 (2.21.3)
z→ 2 z
Y( z )
k 2 = lim ( z − 3) = 2 (2.21.4)
z→ 3 z
Thus,
Y( z) 2z 2z
Y( z) = z =− + ⇒
z z−2 z−3
EXERCISE 2.22
Solve the second-order difference equation y(k + 2) − 5y(k + 1) + 6y(k) = 0
with the initial conditions y(0) = −12, y(1) = 59.
42 Digital Control Systems
Solution
We apply z-transform in the given equation and we obtain (Y(z)/z), such
that
z
z 2Y( z) − z 2 y(0) − zy(1) + 5[zY( z) − zy(0)] + 6Y( z) = 5 ×
z −1
z
z 2Y( z) − z 2 × (−12) − z × (59) + 5zY( z) − 5z × (−12) + 6Y( z) = 5 ×
z −1
z
( z 2 + 5z + 6)Y( z) = 12z 2 + z + 5 ×
z −1
12z 2 + z 1 5z
Y( z ) = + ×
z + 5z + 6 z 2 + 5z + 6 z − 1
2
(12z + 1)( z − 1) + 5 64
K1 = × ( z + 2) =
( z + 2)( z + 3)( z − 1) z =−2
3
(12z + 1)( z − 1) + 5 −135
K2 = × ( z + 3) = (2.22.2)
( z + 2)( z + 3)( z − 1) z =−3
4
(12z + 1)( z − 1) + 5 5
K3 = × ( z − 1) =
( z + 2)( z + 3)( z − 1) z =1
12
64 135 5
y(k ) = (−2)k − (−3)k + u(k ) (2.22.4)
3 4 12
EXERCISE 2.23
Calculate the unit-step response of a system with the difference equation
y[n] + 1.5 y[n − 1] + 0.5 y[n − 2] = x[n] − x[n − 1], y[−1] = 2, y[−2] = 1
Solution
We apply z-transform in the given equation taking into consideration the
initial conditions.
z-Transform 43
−2.5z 2 − z 0.5z 3z
Y( z) = 2
= − (2.23.2)
z + 1.5z + 0.5 z + 0.5 z + 1
num = [1 -1 0];
den = [1 1.5.5];
n = 0:20;
x = ones(1, length(n));
zi = [−1.5*2–0.5*1, −0.5*2];
y = filter(num, den, x, zi);
stem(y,’Linewidth’,3)
−1
−2
−3
0 5 10 15 20 25
44 Digital Control Systems
EXERCISE 2.24
Compute the z-transform of function x(n) = [3 5 4 3], 0 ≤ n ≤ 3 using
MATLAB.
Solution
A—solution method
syms z
x0=3; x1=5; x2=4; x3=3;
Xz=x0*(z^0)+x1*(z^-1) +x2*(z^-2)+x3*(z^-3)
pretty(X)
5 4 3
X( z) = 3 + + +
z z2 z3
B—solution method
syms z
x=[3 5 4 3];
n=[0 1 2 3];
X=sum(x.*(z.^-n))
pretty(X)
5 4 3
X( z) = 3 + + 2+ 3
z z z
EXERCISE 2.25
Compute the z-transform of f(n) = 2n using MATLAB.
Solution
syms n z
f = 2^n;
ztrans(f)
simplify(ans)
F( z) = z/( z − 2)
syms n z
F = z/(z - 2);
iztrans(F)
ans = 2^n
EXERCISE 2.26
Compute the z-transform of: δ(n), u(n), n · u(n), anu(n), nanu(n), cos(ω0 n)u(n),
sin(ω0n)u(n), ancos(ω0n)u(n), ansin(ω0n)u(n) using MATLAB.
z-Transform 45
Solution
In the following table, the main transform relations are provided, and
their accuracy is verified with the aid of ztrans and iztrans functions.
It is noteworthy that the ztrans function calculates the single-sided
transform Ztrans (n ≥ 0)¨ so the unit-step function can be omitted.
EXERCISE 2.27
Rewrite the following function in a partial fraction expansion
formulation.
z2 + 3z + 1
X( z) =
z + 5z 2 + 2z − 8
3
Solution
% Calculation of denominator’s roots
A=[1 5 2 -8];
riz=roots(A);
% Calculation of numerators of the partial fractions
46 Digital Control Systems
syms z
X=(z^2+3*z+1)/(z^3+5*z^2+2*z-8);
c1=limit((z-riz(1))*X,z,riz(1))
c2=limit((z-riz(2))*X,z,riz(2))
c3=limit((z-riz(3))*X,z,riz(3))
Hence, we get
z2 + 3z + 1 1/ 2 1/ 6 1/ 3
X( z) = = + +
z + 5z 2 + 2z − 8 z + 4 z + 2 z − 1
3
EXERCISE 2.28
Rewrite the following function in a partial fraction expansion
formulation.
z2 + 3z + 1
X( z) =
z3 − 3z + 2
Solution
A—solution method
c1 c2 cr c cn
X( z) = + ++ + r +1 + + .
z − λ1 ( z − λ1 )2 ( z − λ1 )r z − λr +i z − λn
% Calculation of c1
syms z
X=(z^2+3*z+1)/(z^3-3*z+2);
c1=limit((z-riz(1))*X,z,riz(1))
% Calculation of c2 (i=1) - 2 common roots (r=2)
r=2
% definition of (z-λi)r X(z)
f=((z-1)^r)*X;
% Definition d r −1((z − λi)r X(z))/dzr −1
par=diff(f,z,r-1);
z-Transform 47
Therefore,
z 2 + 3 z + 1 −1 / 9 10 / 9 5/3
X( z) = 3
= + +
z − 3z + 2 z+2 z − 1 ( z − 1)2
B—solution method
X(z) can be converted to partial fraction expansion via the residue
command.
EXERCISE 2.29
Expand the following function into partial fractions X(z) = 3z3 + 8z2 +
4/z2 + 5z + 4.
Solution
n= [ 3 8 0 4]
d=[ 1 5 4];
[R,P,K]=residue(n,d);
20 3
X( z) = + + 3z − 7
z + 4 z +1
R=[ 20 3];
P=[-4 -1];
K=[ 3 -7];
[B,A]=residue(R,P,K);
EXERCISE 2.30
Solve the following difference equation y(n) + 0.5y(n−1) + 2y(n−2) = 0.9n
Solution
The general definition of a difference equation is provided by
q p
y(n) = ∑
k =0
bk x(n − k ) + ∑ a y(n − k),
k =1
k ai , i = 1,..., n constants
10 z
Z{ y(n)} + 0.5Z{ y(n − 1)} + 2Z{ y(n − 2)} =
10 z − 9
z
Y( z) + 0.5z−1Y( z) + 2z−2Y( z) =
z − 0.9
z z3
Y(s) = −1 −2
= 2
( z − 0.9)(1 + 0.5z + 2z ) ( z − 0.9)( z + 0.5z + 2)
Calculate the inverse z-transform of Y(z), i.e., calculate y(n), which is the
desired solution.
The corresponding MATLAB code is given as follows:
syms t s Y
X=ztrans(0.9^n,z) % z – transform for the 2nd part of the
difference equation
Y1=z^(-1)*Y; % Define Z{y(n − 1)} as Y1
Y2=z^(-2)*Y; % Define Z{y(n − 2)} as Y2
Next, we take Χ into the left part of the difference equation and
we define a variable G, which is equal to the entire left part (a polyno-
mial of Y).
z-Transform 49
Hence, we get
z3
2
( z − 0.9)( z + 0.5z + 2)
EXERCISE 2.31
a. Solve the following difference equation, using the z-transform:
y(n) − y(n − 1) = u(n).
b. Plot the results for the range 0 ≤ n ≤ 50.
Solution
a. syms n z Y
x=heaviside(n);
X=ztrans(x,z);
Y1=z^(-1)*Y;
G=Y-Y1-X;
SOL=solve(G,Y);
y=iztrans(SOL,n)
b. n1=0:50;
yn=subs(y,n,n1);
stem(n1,yn);
legend(’LISI y(n)’);
60
50
40 LISI y(n)
30
20
10
0
0 5 10 15 20 25 30 35 40 45 50
50 Digital Control Systems
EXERCISE 2.32
a. Solve the following difference equations using the z-transform
Solution
1. y(n) − y(n − 1) = x(n) + x(n − 1) , x(n) = 0.8 n
>> y_s=subs(y,n,n_s); 8
>> stem(n_s,y_s);
7
>> legend(’LISI’)
6
0
0 5 10 15 20 25 30
c. test =
>> xn=0.8^(n); -10*(4/5)^n+8*(4/5)^(n-1)
>> xn_1=.8^(n-1); One should expect test=0. Is something wrong
>> yn=10-9*(4/5)^n; here?
>> yn_1=10-9*(4/5)^(n-1);
>> test=yn-yn_1-xn-xn1
>> simplify(test) ans =
0
The answer is correct, yet a further simplification
is necessary.
z-Transform 51
>> stem(n_s,y_s);
0.7
>> legend(’LISI y(n)’)
0.6
0.5
0.4
0.3
0.2
0.1
0
0 2 4 6 8 10 12 14 16 18 20
c. ans =
>> xn=x; 0
>> xn_1=0.8^(n-1); Therefore, the solution is correct.
>> yn=y;
>> yn_1=subs(y,n,n-1);
>> yn_2=subs(y,n,n-2);
>> test=yn+1.5*yn_1+0.5*y
n_2-xn-xn_1
>> simplify(test)
EXERCISE 2.33
Solve the following difference equation: y(k + 2) + 0.8y(k + 1) + 0.1y(k)
= u(k) using MATLAB.
Solution
We will use the function recur.m (function y = recur(a,b,n,x,x0,y0);),
where the solution of a difference equation of the following form is
provided
0.5
0.4
0.3
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
k
3.1 Introduction
The transfer function is defined as the ratio of the z-transform of the out-
put for a linear invariant system to the z-transform of its input, when the
initial conditions are zero and corresponds to a relation which describes
the dynamics of the system under consideration.
Consider the system of Figure 3.1. Its transfer function is given by
Y( z)
G( z) = =0 (3.1)
X( z)
where
Gp(s) is the transfer function of the system under control,
Gc(z) is the transfer function of the digital controller,
G(z) is the transfer function of the analog system in discrete time, and
G0(s) is the transfer function of the system with which Gp(s) is discretized.
53
54 Digital Control Systems
X(s) H(z)
T T Y(z)
FIGURE 3.1
Sampled data system.
G(z)
Y(z)
x(t) Y(t)
Gc(z) Go(s) Gp(s)
X(s) T T y(kT)
FIGURE 3.2
Open-loop sampled-data system.
Gc ( z)G( z)
Y( z) = (3.3)
1 + Gc ( z)Z[H (s)G0 (s)Gp (s)]
The expression (3.3) deduced from the above block diagram and will
subsequently be explained.
According to Figure 3.3 we have that
G(z)
b(t)
H(s)
FIGURE 3.3
Closed-loop sampled-data system.
Transfer Function 55
Y( z) Gc ( z)G( z)
Gcl ( z) = = (3.4)
X( z) 1 + Gc ( z)Z H (s)G0 (s)Gp (s)
Gc ( z)G( z)
Gcl ( z) = (3.5)
1 + Gc ( z)G( z)
It should be noted that the expression (3.3), which provides the system’s
output in z-domain, can be dynamically changed according to the form of
the sampled data system, correspondingly.
In the Formula Tables of this chapter, several block diagrams for digital
control systems are presented, including their corresponding transfer
function in terms of z.
Xi
X1 X3 X2
Xi
Xm
X2
Xn Xm
FIGURE 3.4
Nodes of S.F.G.
Each node denotes a certain variable (signal) and corresponds to one of the
following categories:
a. Source or input node: The node from which one or more branches start
and in which no branch ends (Figure 3.4a).
b. Sink node: The node which receives one or more branches and from
which no branch starts (Figure 3.4b).
c. Mixed node: The node which has incoming and outcoming branches
(Figure 3.4c).
In addition, each branch connects two nodes and can be described by two
features, namely, the direction and gain. The direction stands for the signal’s
direction from one node to another (Figure 3.5), while its gain is the a factor
or the transfer function, which connects the variables x1 and x2. The direction
and gain are related to each other as x2 = ax1.
Path is a branch sequence of the same direction (e.g., x1, x2, x3, x4 in Figure 3.6).
Forward path is the end-to-end path between the input and output node
(e.g., x1, x2, x3, x4 in Figure 3.6).
Loop represents the closed path which starts and ends at the same node
(e.g., x2, x3, x2 in Figure 3.6). Two loops, within S.F.G., are called nontouch-
ing loops in the case when they do not contain any common node to each
other.
X1 a X2
FIGURE 3.5
Branch of S.F.G.
Transfer Function 57
X1 a X2 b X3 c X4
Loop
d
FIGURE 3.6
Loop of S.F.G.
∑T ∆ n n
G(s) = n=1
(3.6)
∆
where
Tn = the gain of the n-th direct path which connects the input and output.
Δ = The determinant of the graph, which is given by
∆ = 1− ∑ L + ∑ L − ∑ L +
1 2 3 (3.7)
with
and so on.
Δn = The subdeterminant of Tn, which is obtained from (3.7), with-
out taking into account the branches that are adjacent to the nth forward
path.
58 Digital Control Systems
In the case when we deal with a complex block diagram and we need
to calculate the control ratio O/I (output/input), then we convert the block
diagram to S.F.G. and apply the general output–input gain equation.
The exact procedure followed using Mason’s formula in digital control
systems is
1. Design S.F.G. directly from the block diagram of the sampled data
system.
2. Observing the flow graph, one can notice certain discontinuities
due to the involvement of the samplers; thus, we are able to redesign
S.F.G. removing the latter discontinuities, with the aid of the math-
ematical model. Apparently, the newly derived S.F.G. is equivalent to
the previous one.
3. Calculate the transfer function by using Mason’s formula at the
modified S.F.G.
N M
∑ b y[n − k] = ∑ α x[n − m]
k =0
k
m= 0
m (3.8)
and to solve it, (N + M) initial conditions of y[−1], y[−2], …, y[−N] and x[−1],
x[−2], …, x[−M] should be known.
NO T E : In the solved exercises presented below, the concept of sampled
s ignal will be used. The sample signal extracted from the sampling of its
analog counterpart is mathematically expressed as (Figure 3.7):
∞ ∞
T
x(t) x*(t)
x*(t)
x(t) δT(t)
=
×
t t t
0 0 0
FIGURE 3.7
Sampled signal.
∞ +∞ +∞
1
Since: δT (t) = ∑k =0
δ(t − kT ) = ∑
k =−∞
Cn e jkωst =
T ∑e
k =−∞
jk ωs t
← ωs = 2π/T
T /2 0+ 0+
1 1 1 1
∫δT (t)e jkωst dt =
∫ δ (t)e ∫
jk ωs t
Cn = T dt = δT (t)dt =
T T T T
−T /2 0− 0−
We have
+∞ Laplace +∞
1 1
x*(t) = x(t) ⋅
T ∑
k =−∞
e
jkωst
→
transformation
X *(s) =
T ∑ X(s + jkω )
k =−∞
s (3.10)
∞
where: X(s) = L[x(t)] =
∫ x(t)e dt
−st
0
(3.11)
+∞
1
The frequency spectrum of x*(t): X *( jω ) = ∑
T k=−∞
X[ j(ω + kωs )]
The frequency spectrum of x(t) and x*(t) are presented in Figure 3.8a and b,
respectively.
It holds that
–ωmax ωmax
ωs
–ωmax
2ωs
FIGURE 3.8
Frequency spectrum of analog and sampled signal.
TABLE 3.1
Transfer Function of Closed-Loop Sampled-Data Systems
System Transfer Function C(z)
r c R( z)G( z)
G(s) C( z ) =
1 + GH ( z)
–
GH ( z) = Z [G(s)H (s)]
H(s)
r c RG( z)
G(s) C( z ) =
1 + GH ( z)
–
RG( z) = Z [ R(s)G(s)]
H(s)
r c R( z)G( z)
G(s) C( z ) =
1 + G( z)H ( z)
–
H(s)
Transfer Function 61
TABLE 3.2
Transfer Function of Closed-Loop Sampled-Data Systems
System Transfer Function C(z)
r c R( z)G1 ( z)G2 ( z)
G1(s) G2(s)
– 1+ G1 ( z)G2 H ( z)
H(s)
r c R( z)G1 ( z)G2 ( z)
G1(s) G2(s)
1+ G1 ( z)G2 H ( z)
–
H(s)
r c R( z)G1 ( z)G2 ( z)
G1(s) G2(s) 1+ G2 H1 ( z) + G1 ( z)G2 H 2 ( z)
– –
H1(s)
H2(s)
TABLE 3.3
Transfer Function of Closed-Loop Sampled-Data Systems
System Transfer Function C(z)
H(s)
H1(s)
H2(s)
T c(mT)
e
r e* K(5s + 1)
c
– T s(2s + 1)
Solution
From the above scheme, we have that
The expression (3.1.1) takes the form of expression (3.1.3), after discreti-
zation, which is the difference equation of the entire system.
2+T 4+T 2 5K + KT 5K
c(k ) − c(k − 1) + 2 c(k − 2) = e*(k ) + e*(k − 1) ⇒
T2 T2 T T T
4+T 2 5KT + KT 2 5KT
c(k ) − c(k − 1) + c(k − 2) = e*(k ) + e*(k − 1) ⇒
2+T 2+T 2+T 2+T
It holds that
So
41 4
c(k ) = 1.75 − c(k − 1) − c(k − 2) (3.1.6)
60 60
41 4
c(1) = 1.75 − c(0) − c(−1) = 1.75
60 60
41 4
c(2) = 1.75 − c(1) − c(0) ≈ 0.554
60 60
41 4
c(3) = 1.75 − c(2) − c(1) ≈ 1.255
60 60
41 4
c(m) = 1.75 − c(m − 1) − c(m − 2) (3.1.7)
60 60
EXERCISE 3.2
Find the transfer function of the following discrete systems:
Solution
To derive the corresponding transfer functions, it suffices to apply
transform onto the difference equations, by assuming zero initial
z-
conditions.
EXERCISE 3.3
Derive the difference equations of the systems with transfer functions
given as
z 4 + 3 z 3 + 2z 2 + z + 1 z
G(z) = and H( z) =
z 4 + 4 z 3 + 5z 2 + 3 z + 2 z 2 − 1.7 z + 0.72
Solution
a.
Y(z) 1 + 3 z −1 + 2 z −2 + z −3 + z −4
G(z) = = (3.3.1)
R(z) 1 + 4 z−1 + 5z−2 + 3 z−3 + 2z−4
So, we have
b.
z 1
H ( z) = = z −1 (3.3.4)
z 2 − 1.7 z + 0.72 1 − 1.7 z−1 + 0.72z−2
EXERCISE 3.4
Derive the transfer function of the following discrete systems and show
that they are different to each other.
Solution
For the first system, observe that the transfer function is given by
Y( z) z z
= G( z)H( z) = ⋅ (3.4.1)
X( z) z − e−aT z − e−bT
1
Y( z)
= ZT = ZT 1 1 − 1
X( z) (s + a)(s + b) b − a s + a s + b
1 z z 1 (e−aT − e−bT )z−1
= − −bT
= (3.4.2)
b−az−e −aT −aT −1
z − e b − a (1 − e z )(1 − e z ) −bT −1
EXERCISE 3.5
Derive the output function of the following scheme, into the z-domain,
when the input function is z(t) = µ(t).
G(s)
z(t) + 1
1 + 2s T
–
ZOH
T
Solution
The expression of the output function in z-domain is
z[R(s)G(s)]
C( z) = (3.5.1)
1 + z[Gzoh (s)G(s)]
where
−0 , 5 T
z[R(s)G(s)] = RG( z) = z
k = k(1 − e )z
(3.5.2)
s(1 + 2s) ( z − 1)( z − e−0 , 5T )
and
Substituting, we get
k(1 − e−0 , 5T )z
G( z) = (3.5.4)
( z − 1)( z − e−0 , 5T + k(1 − e−0 , 5T ))
0.145z
C( z) = (3.5.5)
( z − 1)( z − 0.709)
EXERCISE 3.6
Are the following systems equivalent?
H(s)
H(s)
Solution
The most usual case is to use a sampler in the error channel e(t), as the first
scheme shows. Since the system is linear, the sampler can be moved from
the error signal to the system’s input and to the output of feedback unit.
We have:
Y( z) = G( z)E( z) (3.6.1)
where
Ε( z) = X( z) − z[G(s)H(s)]E( z) (3.6.2)
Hence
X( z)
E ( z) = (3.6.3)
1 + z[G(s)H(s)]
(3.6.1),(3.6.3):
Transfer Function 67
Y( z ) G( z)
⇒ = (3.6.4)
X( z) 1 + z[G(s)H(s)]
EXERCISE 3.7
Find the expression that provides the output Y(z) as a function of the input
and the included system parameters, as shown in the following scheme.
Ω(s) + E(s) Y(s) Y(z)
G(s)
– T
B(s) Y*
F(s)
T
Solution
We compute Y(z) from the system’s model equations. Note that the out-
put of each sampler is marked with a superscript (*), for example, Y* cor-
responds to the postsampled Y(s) used for the feedback channel.
From the above block diagram, we have that
(1)
Y(s) = G(s)E(s) = G(s)(Ω(s) − B(s)) (3.7.3)
By observing the expression (3.7.4), it is clear that both Y(s) and Y*(s)
are present; thus, to derive Y*(s) as a common factor, we apply a starred
Laplace transform as follows.
*
(3.7.4) ⇒(Y(s))* = [G(s)Ω(s) − G(s)F(s)Y *(s))]* ⇒
Y *(s) = [G(s)Ω(s)]* − [G(s)F(s)Y *(s))]* = GΩ*(s) − Y *(s)[G(s)F(s)]*
= GΩ*(s) − Y *(s)GF *(s) ⇒
Y *(s) + Y *(s)GF *(s) = GΩ*(s) ⇒ Y *(s)(1 + GF *(s)) = GΩ*(s) ⇒
GΩ*(s)
Y *(s) = (3.7.5)
1 + GF *(s)
Using z-transform in (3.7.5), we get
GΩ( z)
Y( z ) = (3.7.6)
1 + GF( z)
EXERCISE 3.8
Find the expression that provides the output Y(z) as a function of the
input and the included system parameters, as shown in the following
scheme:
B(s)
H(s)
Solution
We compute Y(z) from the system’s model equations.
From the above block diagram, we have that
By observing the expression (3.8.5), it is clear that both E(s) and E*(s)
are present; thus, to derive E*(s) as a common factor, we apply a starred
Laplace transform as follows:
*
(3.8.5) ⇒ E*(s) = R*(s) − HG*(s)E*(s) ⇒
E*(s) + HG*(s)E*(s) = R*(s) ⇒
E*(s)[1 + HG*(s)] = R*(s) ⇒
R* (s)
E* (s) = (3.8.6)
1 + HG* (s)
* C * (s)
(3.8.3),(3.8.5) ⇒ C(s) = G(s)E* (s)⇒C * (s) = G* (s)E* (s) ⇒ E* (s) = (3.8.7)
G* (s)
R( z)
C( z) = G( z) (3.8.9)
1 + HG( z)
EXERCISE 3.9
Find the expression that provides the output Y(z) as a function of the
input and the included system parameters, as shown in the following
scheme:
B(s)
F(s)
Solution
We compute Y(z) from the system’s model equations.
From the above block diagram, we have that
By observing the expression (3.9.4), it is clear that both L(s) and L*(s)
are present; thus, to derive L*(s) as a common factor, we apply a starred
Laplace transform as follows:
*
(3.9.4) ⇒ L*(s) = [G1 (s)X(s) − G1 (s)F(s)G2 (s)L*(s)]* =
= [G1 (s)X(s)]* − [G1 (s)F(s)G2 (s)L*(s)]* ⇒
= G1X *(s) − G1FG2 *(s)L*(s) ⇒
However,
*
Y(s) = G2 L*(s) ⇒ Y *(s) = [G2 L*(s)]* = G2 *(s)L*(s) (3.9.6)
G1X * (s)
(3.9.5),(3.9.6) ⇒ Y * (s) = G2 * (s) (3.9.7)
1 + G1FG2 * (s)
G1X( z)
⇒ Y( z) = G2 ( z) (3.9.8)
1 + G1FG2 ( z)
EXERCISE 3.10
Find the expression that provides the output Y(z) as a function of the
input and the included system parameters, as shown in the following
scheme:
R(s) + C(s)
E(s) E*(s) M(s) M*(s)
G1(s) G2(s)
R(z) T T
– C(z)
B(s)
H(s)
Solution
We compute Y(z) from the system’s model equations.
From the above block diagram, we have that
*
(3.10.2) ⇒ M *(s) = G1 *(s)E*(s) ⇒ M *(s) = G1 *(s)[ R*(s) − HG2 *(s)M *(s)]
⇒ M *(s) = G1 *(s)R*(s) − G1 *(s)HG2 *(s)M *(s) (3.10.8)
*
(3.10.6) ⇒ E*(s) = R*(s) − HG2 *(s)M *(s) (3.10.9)
G2 ( z)G1 ( z)R( z)
C( z) = (3.10.11)
1 + G1 ( z)HG2 ( z)
EXERCISE 3.11
For the system of the following scheme, find the closed-loop transfer
function C(z)/R(z)
M*(s) M(s)
H2(s) H1(s)
δT
Solution
From the above block diagram, we have that
R*(s)
E*(s) = (3.11.7)
1 + H 2 *(s) [G(s)H1 (s)]*
C(z) G(z)
= (3.11.8)
R(z) 1 + H(z) GH1 (z)
EXERCISE 3.12
For the system of the following scheme, find the closed-loop transfer
function C(z)/R(z), using Mason’s formula.
H(s)
Solution
Design the S.F.G., which corresponds to the block diagram of the above
scheme.
Observing that S.F.G. presents a discontinuity between E(s) and E*(s),
we redesign S.F.G. without discontinuities using the system model.
S.F.G.
Output Input Output
Input
–H(s)
It holds that
*
E(s) = R(s) − H(s)G(s)E*(s) ⇒ E*(s) = R*(s) − GH *(s)E*(s) (3.12.1)
Transfer Function 73
*
C(s) = G(s)E*(s) ⇒ C *(s) = G*(s)E*(s) (3.12.2)
–GH*(s)
C *(s) T1Δ1
= (3.12.3)
R*(s) Δ
where
T1 = G*(s)
C *(s) G*(s)
(3.12.3) ⇒ = (3.12.4)
R*(s) 1 + GH *(s)
C( z) G( z)
= (3.12.5)
R( z) 1 + GH( z)
The complex S.F.G. is formed by combining the initial and the equiva-
lent diagram, which is presented at the following scheme:
1 E*(s) G*(s)
R*(s) C*(s)
1
–GH*(s)
1 E(s) G(s) 1
R(s) C(s)
E*(s)
–H(s)
74 Digital Control Systems
EXERCISE 3.13
For the system of the following scheme, find the closed-loop transfer
function C(z)/R(z), using Mason’s formula.
H(s)
Solution
Design S.F.G., which corresponds to the block diagram of the above scheme.
1 E(s) E*(s) G1*(s) L(s) L*(s) G2*(s) C(s) C(s)
–H(s)
*
E(s) = R(s) − H(s)G2 (s)L*(s) ⇒ (3.13.1)
E*(s) = R*(s) − HG2 *(s)L*(s)
*
C(s) = G2 (s)L*(s) ⇒ C *(s) = G2 *(s)L*(s) (3.13.2)
*
L(s) = G1 (s)E*(s) ⇒ L*(s) = G1 *(s)E*(s) (3.13.3)
From Equations 3.13.1, 3.13.2, and 3.13.3, design the equivalent S.F.G.
R(s) 1 E*(s) G1*(s) L*(s) G2*(s) C*(s) 1 C*(s)
–HG2*(s)
C *(s) T1Δ1
= (3.13.4)
R*(s) Δ
Transfer Function 75
where
T1 = G1 *(s)G2 *(s)
C( z) G1 ( z)G2 ( z)
= (3.13.6)
R(z) 1 + G1 ( z)G2 H( z)
EXERCISE 3.14
For the system of the following scheme, find the closed-loop transfer
function C(z)/R(z), using Mason’s formula.
H(s)
Solution
Design the S.F.G. which corresponds to the block diagram of the above
scheme.
R(s) 1 E1(s) E1*(s) G1*(s) E2(s) E2*(s) G2(s) C(s) 1 C(s)
–H(s)
–1
From Equations 3.14.1, 3.14.2, and 3.14.3, design the equivalent S.F.G.
–G2H*(s)
–1
C * (s) T1Δ1
= (3.14.4)
R* (s) Δ
where
C( z) G1 ( z)G2 ( z)
= (3.14.6)
R( z) 1 + G1 ( z)G2 ( z) + Z [G2 H(s)]
Transfer Function 77
EXERCISE 3.15
For the system of the following scheme, find the closed-loop transfer
function C(z)/R(z), using Mason’s formula.
H(s)
Solution
1
–1
–1
From Equations 3.15.5 and 3.15.6, design the equivalent S.F.G. and
observe that two inputs and one output appear.
G1G2(s) *
1 E1*(s) 2 + G2(s) C*(s) 1 C*(s)
R(s)(1 + G2(s)) *
2 + G2(s)
R(s) *
G1G2(s) * 2 + G2(s)
2 + G2(s)
G1G2 (s) *
2 + G2 (s) R(s)(1 + G2 (s)) *
C *(s) = C1 *(s) + C2 *(s) ⇒ C *(s) =
G1G2 (s) * 2 + G2 (s)
1 +
2 + G2 (s)
R(s) *
+ (3.15.7)
2 + G2 (s)
G G (s)
Z 1 2
2 + G2 (s)
C( z) = Z R(s)(1 + G2 (s)) + Z R(s) (3.15.8)
G G (s) 2 + G2 (s) 2 + G2 (s)
1+ Z 1 2
2 + G2 (s)
G G (s)
Z 1 2
2 + G2 (s)
C( z)
= Z R(s)(1 + G2 (s)) 1 + Z R(s) 1 (3.15.9)
R( z) G G (s) 2 + G2 (s) R( z)
2 + G2 (s) R( z)
1+ Z 1 2
2 + G2 (s)
Transfer Function 79
EXERCISE 3.16
For the system of the following scheme, find the closed-loop transfer
function C(z)/R(z), using Mason’s formula.
H(s)
T
Solution
Design S.F.G. which corresponds to the block diagram of the above
scheme.
C*(s)
–H(s)
–1
1 G1 G2*(s) C*(s) 1
R*(s) C*(s)
E*(s)
–G2H*(s)
1 –H(s)
–1
In z-domain, we get
E( z) 1 + G 2 H ( z)
= (3.16.8)
R( z) 1 + G1G2 ( z) + G2 H( z)
C( z ) G1G2 ( z)
= (3.16.9)
R( z) 1 + G1G2 ( z) + G2 H( z)
Transfer Function 81
EXERCISE 3.17
Provide the expression for the output Y(z) for the following systems.
U*(s) Y1(s)
G1(s)
U*(s) Y2(s)
G2(s)
U*(s) Y1(s)
G1(s)
Y2(s)
G2(s)
Solution
From the block diagram of the first scheme, the desired result is obtained
as
ZT
Y *(s) = G1* (s)U *(s) + G2* (s)U *(s) ⇒
(3.17.1)
Y( z) = G1 ( z)U( z) + G2 ( z)U( z)
Y( z) = G1 ( z) + G2 ( z)
ZT (3.17.2)
Y *(s) = G1* (s)U *(s) + (G2 (s)U(s))* ⇒
Y( z) = G1 ( z)U( z) + G2U( z)
82 Digital Control Systems
EXERCISE 3.18
For the system of the following scheme, find the transfer function of
Y(z)/R(z).
X*(s)
V(s)
G3(s) G4(s)
T
–
+ E*(s) U(s) Y*(s)
R(s) G1(s) G2(s)
T + T
–
B*(s)
H(s)
T
Solution
From the above block diagram, it holds that
(3.18.1) ⇒ E( z) = R( z) − B( z) (3.18.5)
Y( z) G1G2 ( z) − G3 ( z)G4 ( z)
= (3.18.9)
R( z) (1 + G1G2 ( z)H( z)
Transfer Function 83
EXERCISE 3.19
Find the open-loop step response of the system of the following scheme.
y*(t)
H(s)
Let
9
T = 1s, G(s) = Gh (s)G1 (s)Gp (s)H(s) =
s(s2 + 9)
Solution
From the given block diagram, we have that
where
z
X(z) = Z[1(t)] = (3.19.3)
z −1
9
G( z) = Z[G(s)] = Z 2 = Z 1 − 2 s (3.19.4)
s(s + 9) s s +
9
z z( z + 1)(1 − cos 3T )
(3.19.1),(3.19.5) ⇒ Y(z) = X[z]G[z] =
z − 1 ( z − 1)( z 2 − 2z cos 3T + 1)
z 2 ( z + 1)(1 − cos 3T )
=
( z − 1)2 ( z 2 − 2z cos 3T + 1)
(3.19.6)
84 Digital Control Systems
1 1 1 1 z +1
Y( z ) = z + −
( z − 1)2 2 z − 1 2 z 2 − 2z cos 3T + 1
z 1 z 1 z 2 − z cos 3T 1 1 + cos 3T z sin 3T
= + − −
( z − 1)2 2 z − 1 2 z 2 − 2z cos 3T + 1 2 sin 3T z 2 − 2z cos 3T + 1
t 1 1 1 1 + cos 3T
Hence, y *(t) = + − cos 3t − sin 3t
T 2 2 2 sin 3T
(3.19.7)
EXERCISE 3.20
Find the closed-loop pulse transfer function for the system of the follow-
ing scheme.
Let
1 − e−Ts K
G1 (s) = , G2 (s) =
s s+1
Solution
The pulse transfer function G(z) arises as
1 − e−Ts K
G( z) = Z[G(s)] = Z = (1 − z−1 )Z K
s s + 1 s(s + 1)
K K K K
= (1 − z−1 )Z − = (1 − z−1 ) − ⇒
s s + 1 1 − z−1 1 − e−T z−1
K (1 − e−T )z−1
G( z) = (3.20.1)
1 − e−T z−1
C( z) G( z) K (1 − e−T )z−1
Gcl ( z) = = = (3.20.2)
R( z) 1 + G( z) 1 + [K − (K + 1)e−T ]z−1
Transfer Function 85
EXERCISE 3.21
For the system of the scheme depicted in Exercise 3.20, let
G1 (s) = (1 − e−Ts )/s , G2 (s) = 10/(s + 10), H(s) = 0.1, e−10T = 0.5 and
T = 0.07 s. Find the step response of the system.
Solution
The closed-loop system output is
G1G2 ( z)R( z)
C( z) = (3.21.1)
1 + G1G2 ( z)H( z)
where
z
R( z) = (3.21.2)
z −1
1 − e−Ts 10 −10 T
G1G2 ( z) = Z = (1 − z−1 )Z 10 = 1 − e
s
s + 10 −10 T
s(s + 10) z − e
(3.21.3)
1 − e−Ts 10 1
G1G2 ( z)H( z) = Z 0.1 = (1 − z−1 )Z ⇒
s
s + 10 s(s + 10)
(3.21.4)
1 − e−10T
G1G2 ( z)H( z) = 0.1
z − e−10T
0.5z
C( z) = (3.21.5)
( z − 0.45)( z − 1)
n
0.5z k
c(kT ) = ∑ Re s[C(z)z
i=1
k −1
]z=zi = ( z − 0.45)
( z − 0.45)( z − 1) z=0.45
0.5z k z=1
+ ( z − 1) ⇒
( z − 0.45)( z − 1)
10
c(kT ) = (1 − 0.45k ) (3.21.6)
11
EXERCISE 3.22
For the system of the scheme depicted in Exercise 3.20, let G1(s) = (1 − e−Ts)/s,
G2(s) = 1/(s(s+1)), T = 1 s. Find the step response of the system.
Solution
From the given block diagram, it holds that
C(s) = G(s)E*(s), E(s) = R(s) − C(s)
E*(s) = R*(s) − C *(s) = R*(s) − G*(s)E*(s)
R*(s) (3.22.1)
E*(s) =
1 + G*(s)
R*(s)
C(s) = G(s) (3.22.2)
1 + G*(s)
where
G(s) = G1 (s)G2 (s) (3.22.3)
1
where R( z) = Z[1(t)] = (3.22.6)
1 − z −1
1 − e−Ts 1 1 1
⇒ G( z) = Z[G(s)] = Z = (1 − z−1 )Z
s
s(s + 1) s s(s + 1)
0.368 z−1 + 0.264 z−2
= (3.22.7)
(1 − 0.368 z−1 )(1 − z−1 )
(3.22.6),(3.22.7 ) ⇒ X(z)
1/(1 − z−1 )
= (1 − z−1 ) −1
1 + (0.368 z + 0.264 z−2 )/(1 − 0.368 z−1 )(1 − z−1 )
1 − 1.368 z−1 + 0.368 z−2
=
1 − z−1 + 0.632z−2
Transfer Function 87
T = 1, z = e Ts = e s ,
hence
1 − 1.368e−s + 0.368e−2 s
X *(s) = (3.22.8)
1 − e−s + 0.632e−2 s
1
c(t) = L−1 2 X * (s) =
s (s + 1)
1 1 − 1 . 368e−s + 0.368e−2 s
= L−1 2
s (s + 1) 1 − e−s + 0.632e−2 s
1
= L−1 2 (1 − 0.368e−s − 0.632e−2 s − 0.400e−3 s + 0e−4 s + 0.253e−5 s
s (s + 1)
+ 0.253e−6 s )]
However,
1
L−1 2 = L−1 12 − 1 + 1 = t − 1 + e−t
s (s + 1) s s s + 1
thus c(t) = t − 1 + e − 0.368[(t − 1) − 1 + e−(t−1) ]1(t − 1)
−t
EXERCISE 3.23
For the system of the scheme, find the transfer function B(z)/M(z) using
MATLAB for T = 0.01 s.
B(z) T
B(s) 1
s+5
Solution
The desired transfer function is expressed as
B( z) 1 1 1
= Z 10 ⋅ ⋅ ⋅ Gzoh (s) (3.23.1)
M( z )
s + 12 s s + 5
G1 = tf(10,[1 12]);
G2 = tf(1,[1 0]);
H = tf(1,[1 5]);
G = G1*G2*H;
Gd = c2d(G,0.01,’zoh’)
Transfer function
4.1 Introduction
There are two basic techniques for designing a digital filter for the automatic
control of a system, which we will deal extensively in Chapter 8.
The first technique is called discrete design or direct digital design and is
accomplished in two stages:
In this chapter, we will describe how we can transform the transfer func-
tion G(s) of an analog system in the s-domain to an equivalent transfer func-
tion G(z) of a discrete system in the z-domain.
The G(s) to G(z) transform can be performed by three different methods.
The first method relies on the use of numerical methods for solving differ-
ential equations describing the given system and for converting them to dif-
ference equations. Thus, we convert the transfer function into an equivalent
differential equation and we use numerical differential methods to solve the
differential equation.
If we use numerical integration methods then the discretization process is as
follows: Given the transfer function, we find the equivalent transfer func-
tion. Then, we integrate both parts of the differential equation and approach
89
90 Digital Control Systems
• Ease of use
• Stability maintenance
Transfer Function Discretization 91
Thus,
−1
= kT
G(s) L→ g(t) t → g(kT ) ZT
→ G( z) (4.1)
or
Since the z-transform always projects a stable pole in the s-domain to a sta-
ble pole in the z-domain, we conclude that the discrete system will be stable
if the original analog system is stable. Using this method, both the frequency
and step responses are not preserved (frequency warping is observed due to
overlap).
FIGURE 4.1
Analog and discrete system.
92 Digital Control Systems
Ts
G( z) = Z[Gh (s) ⋅ G(s)] = Z 1 − e ⋅ G(s) t (4.3)
s
or
G(s)
G( z) = (1 − z−1 )Z (4.4)
s
If the original analog system G(s) is stable then the equivalent discrete G(z)
obtained by the method of the invariance of the step response is stable. Using
this method, neither the frequency (harmonic) nor the impulse responses are
preserved.
At this point, the zero-order hold (ZOH) circuit (filter) is used with the
transfer function Gh(s). A D/A converter is actually a restraint network
whose output is a partially continuous function. Figure 4.3 summarizes
the ZOH operation, which is the preservation of the last sampled value of
signal f(t).
Consider the system h0(t) with an impulse response as given in Figure 4.4.
The reconstructed signal is captured by the convolution of h0(t) with the
postsampled signal, say g*(t), hence, g(t) = g*(t)*h0(t) and is sketched in Figure
4.5. Also, Figure 4.6 summarizes the first-order hold (FOH) operation.
Because the result of the convolution is stable for the duration between the
value of the previous and next sample, this gives a reason for the name of
this type of recovery filter, such as zero-order filter.
x(kT )
x(t) ZOH G(s) Y(z)
T y(t) T
G(z)
FIGURE 4.2
Sampled data system using ZOH.
Transfer Function Discretization 93
t t t
FIGURE 4.3
Zero-order hold operation.
ho(t)
t
Ts
FIGURE 4.4
Impulse response h0(t).
g(t)
Ts
FIGURE 4.5
The reconstructed signal with ZOH.
6
Stability of Digital Control Systems
6.1 Stability
The stability is a structural systemic property directly related to the type of
system response. The response may be bounded or asymptotically tend to
zero. Otherwise, the system response would take emphatically high values,
which would remove the system by its modeling limits or cause damage to
the system itself.
A system is stable if, for finite input, the output is also finite. This funda-
mental principle is known as bounded input–bounded output (BIBO) stability
criterion.
The output of a stable system is within acceptable limits while the corre-
sponding output of an unstable system theoretically tends to infinity.
The stability of a discrete control system is directly connected with
the positions of roots of the characteristic equation (poles) of the transfer
function.
• When the poles are inside the unit circle (|z| = 1), then the response
of the various disturbance signals appear decreasing.
• When there are poles on the circumference of the unit circle or
outside it, then the response with respect to a disturbance input
appears stable or increasing.
A linear time invariant discrete system is stable if the poles of the closed-
loop system are inside the unit circle (i.e., they have real parts between −1
and 1), while it is unstable if at least one pole is located outside the unit
circle.
If the system characteristic equation has roots in the circumference of the
unit cycle with all other roots being located inside, then the steady-state
output will operate unabated oscillations of finite amplitude when its input
is a finite function. Such behavior makes the system marginally stable. All the
above are illustrated in Figures 6.1 and 6.2.
217
218 Digital Control Systems
Im s Im z
Stable Stable
Re z
Re s
1
Re{s} < 0 |z| < 1
z = eT s
FIGURE 6.1
Stability of analog and discrete system.
• Unit-circle criterion
• Routh criterion using the bilinear mobius transformation
• Jury criterion
• Root locus method
• Nyquist stability criterion
• Bode stability criterion
Im
Re
FIGURE 6.2
Time responses as a function of the poles location on the unit circle.
Stability of Digital Control Systems 219
z = e σT × e j( ωT ± j2kπ ) (6.1)
z +1 w +1
w= ⇒z= (6.2)
z −1 w −1
jω Im {Z}
1
σ Re {Z}
–1 1
z = e sT
–1
FIGURE 6.3
Relation between the left s half-plane with the interior of unit circle in z-plane.
220 Digital Control Systems
w = α + jβ, z = x + jy ⇒
z + 1 x + jy + 1 x − 1 − jy
w = α + jβ = = ⋅
z − 1 x + jy − 1 x − 1 − jy
x2 + y2 − 1 2y
= −j
( x − 1)2 + y 2 ( x − 1)2 + y 2
α ≤ 0 ⇒ x2 + y2 − 1 ≤ 0 ⇒ x2 + y2 ≤ 1 (6.3)
From the expression (6.3), we conclude that the left w half-plane is illus-
trated within the unit circle of z-plane.
Consider the characteristic equation
With the aid of the bilinear transform, the characteristic equation becomes
1 + w n 1 + w n−1 1 + w
a0 + a + + an−1 + an = 0 (6.5)
1 − w 1 − w
1
1 − w
or
Hence, we transform P(z) = 0 into Q(w) = 0 and study the stability of the
discrete control system using the Routh criterion similar to the continuous-
time control systems. The Möbious transform is illustrated in Figure 6.4.
Im z Im w
Region of Region of
stability Re z stability
Re w
1
1+w
z=
1–w
FIGURE 6.4
z- and w-domains via the Möbious bilinear transform.
Stability of Digital Control Systems 221
a0 a1 a2 an−1 an an
Bn =
an an−1 a1 a0 a0
where
αkk
αik−1 = αik − βkαkk−i and Bk = (6.8)
α0k
The third row of the above table is obtained by multiplying the second row
with Bn = (αn/α0) and subtracting the result from the first row. Thus, the last
element of the third row becomes zero.
The latter process is being repeated until the 2n + 1 row is reached, which
includes a single term.
Jury stability criterion: If α0 > 0 then the polynomial α(z) has all its roots
inside the unit circle when all α0k k = 0,1,..., n − 1 are positive.
NO T E :If all α0k , k = 1, 2 …, are positive, it can be shown that the condition
α0 > 0 is equivalent to the following two conditions:
a(1) > 0
(6.9)
(−1)n a(−1) > 0
RULE 1: The poles of the loop transfer function (let them be in a form of
G(z)H(z)) are the points of departure of root locus.
RULE 2: The zeros of loop transfer function and the infinity when
m < n are the points of arrival of root locus.
RULE 3: The number of independent branches of the locus equals to
max(n, m) where m and n are the number of zeros and poles of the
loop transfer function, respectively.
RULE 4: The root locus presents symmetry with respect to the real axis
(horizontal axis).
Stability of Digital Control Systems 223
∑ ∑
n m
( pi ) − (z j )
i=1 j=1
σα = (6.12)
n−m
where
∑ in=1( pi ) = the algebraic sum of the values of poles of the transfer
function.
m
∑ j=1( z j ) = the algebraic sum of the values of zeros of the loop trans-
fer function.
RULE 6: For high z-values, the root locus asymptotically approaches the
straight lines forming angles with the horizontal axis
RULE 7: A part of the real axis can be a part of root locus if, for K ≥ 0,
the number of poles and zeros that are located to the right of this
part is odd.
RULE 8: The separation and arrival points of the branches from and to
the horizontal axis are called break away points of root locus and are
expressed as
Q( z)
(6.11) ⇒ K = − (6.14)
P( z)
n m
ϕd = (2ρ + 1)π −
∑i =1
ϕ pi − ∑j =1
ϕz j
(6.15)
224 Digital Control Systems
where
∑ in=1 ϕ pi = the algebraic sum of the angles of poles with respect to the
reference complex pole (or zero).
m
∑ j=1 ϕz j = the algebraic sum of the angles of zeros with respect to the
reference complex pole (or zero).
Y( z) H ( z)
Gcl ( z) = = (6.16)
U c ( z) 1 + H ( z)
1+ H ( z) (6.17)
It holds that:
N = Z−P (6.18)
uc + e y
Σ H(z)
–
FIGURE 6.5
Closed discrete system.
Stability of Digital Control Systems 225
where
Z = the roots of the characteristic equation 1 + H(z) = 0, except the unit
circle.
N = the number of encirclements of the point −1 + j0 clockwise to H(z).
P = the number of poles of H(z) outside the unit circle.
N=Z (6.19)
1
kg = (6.20)
H (e jωC T )
Im
Γc
I
1
Re
R→∞
FIGURE 6.6
Nyquist path.
226 Digital Control Systems
1 + (T/2)w
z= (6.24)
1 − (T/2)w
b0 w m + b1w m−1 + bm
(6.23),(6.24) ⇒ G(w) = (6.25)
w n + a1w n−1 + + an
T
v
2
6
0 ωs ωs ω
4 2
FIGURE 6.7
Relation between the analog and digital frequency.
regarding the stability of the closed-loop system can be extracted. Figure 6.7
illustrates the relation between w and (T/2)v.
a0 an−k
bk = , k = 0, 1, 2,…, n − 1
an ak
b0 bn−1−k
ck = , k = 0, 1, 2,…, n − 2
bn−1 bk
c0 cn−2−k
dk = , k = 0, 1, 2,…, n − 3
cn−2 ck
p0 p3 p0 p1
q0 = , q2 =
p3 p0 p3 p2
228 Digital Control Systems
TABLE 6.1
Algebraic Stability Criteria
z +1 w +1
1. Routh/Möbius w = ⇒z=
z −1 w −1
2. Jury Table
Row z
0
z
1
z
2
z
3 … z
n−1
z
n−1
z
n
1 a0 a1 a2 a3 … an−2 an−1 an
2 an an−1 an−2 a2 … a1 a0
3 b0 b1 b2 b3 … bn−2 bn−1 bn
4 bn bn−1 bn−2 bn−3 … b2 b1 b0
2n − 5 p0 p1 p2 p3 …
2n − 4 p3 p2 p1 p0 …
2n − 3 q0 q1 q2
TABLE 6.2
Steps of Root Locus Approximate Establishment for the Characteristic Equation
of a Discrete System
α/α Formulas Comments
1 G(z)H(z) Open-loop transfer function
Measure condition of the
∏
m
|z + z i | root locus points
2 |K | i=1
=1
∏
n
|z + p j |
j=1
−∞ < K < ∞
TABLE 6.3
Nyquist Criterion
Closed-Loop Transfer
H (z)
Open-Loop Transfer Function H(z) Function
1 + H ( z)
• It should hold: N = −P (Nyquist stability criterion)
where
N = the number of surroundings for the point −1 + j0 clockwise to
G(jω)H(jω).
P = the number of poles of G(s)H(s) outside the unit circle.
• Gain margin
1
kg =
H (e jωCT )
F(1) > 0
(−1)n F(−1) > 0
|a0|<|an|
|b0|>|bn−1|
|c0|>|cn−2|
|r0|>|r2|
Solution
For the system S1, transform the difference equation in z-domain and
calculate its transfer function.
3 2
Yet : z 2 − Kz + K 2 = z 2 − Kz + (K/2)2 + K
4
z − K 2 3 2
⇒ z 2 − Kz + K 2 = + K =0
2 4
z − K 2 3 K K
⇒ = − K2 ⇒ z = ± j 3
2 4 2 2
(6.1.3)
K 2 K
2
|z|= + 3 = K 2 (6.1.4)
2 2
To obtain stability, |z| < 1 should hold. Thus, solving the latter
inequality we have that the region of values for the parameter K, to pre-
serve stability, is −1 < K < 1.
For the system S2, transform the difference equation in z-domain and
calculate its transfer function.
1
H ( z) = −1
(6.1.5)
1 − 2Kz + K 2 z −2
1 − 2Kz−1 + K 2 z−2 = 0 ⇒ ( z − K )2 = 0 ⇒ z = K
Stability of Digital Control Systems 231
|z|= K 2 (6.1.6)
To obtain stability, |z| < 1 should hold. Thus, solving the latter
inequality we have that the region of values for the parameter K, to pre-
serve stability, is −1 < K < 1.
EXERCISE 6.2
The characteristic polynomial of a system is α(z) = z2 + 0.7z + 0.1.
Evaluate the system stability. Repeat the procedure if the characteristic
polynomial is z3 − 1.2z2 − 1.375z − 0.25 = 0.
Solution
a. Set z = (w + 1)/(w − 1) into α(z) so as to transfer from z-domain
to w-domain, having that
W2 1.8 0.4
W1 1.8 0
W0 0.4
The coefficients of the first column have the same sign, hence
the system is stable.
Analyzing α(z) in product terms, we get
Its two roots are p1 = −0.5 and p2 = −0.2, which are placed
inside the unit circle and, therefore, the system is stable by
using the unit circle criterion.
b. Set z = (w + 1)/(w − 1) into α(z) so as to transfer from z-domain
to w-domain. The characteristic equation becomes:
W3 −1.875 4.875
W2 3.875 1.125
W1 5.419 0
W0 1125
From the above table we see that there is a sign change in the
first column, so given the three roots of the characteristic equa-
tion, one is on the right complex plane thus the closed system is
unstable.
EXERCISE 6.3
The characteristic polynomial of a system is α(z) = z3 − 1.3z2 − 0.8z + 1.
Evaluate the system stability using the Jury stability criterion.
Solution
It holds that α(1) = −0.1. Since α(1) < 0, the necessary condition is not
satisfied, hence the system is unstable.
Indeed, the roots of the characteristic equation α(z) = 0 are
p1 = −0.8841
p2 = 1.3402
p1 = 0.8440
EXERCISE 6.4
The characteristic polynomial of a system is α(z) = z2 + α1z + α2. Evaluate
the system stability using the Jury stability criterion.
Solution
We formulate the Jury table
1 a1 a2 B2 = a2
a2 a1 1
1 − a2 2 a1(1 − a2)
a1
a1(1 − a2) 1 − a2 2 B1 =
1 + a2
a12 (1 − a2 )
1 − a2 2 −
(1 + a2 )
All roots of the characteristic polynomial are located inside the unit
circle if
Stability of Digital Control Systems 233
1 − α22 > 0
1 − α2 (6.4.1)
1 + α2
((1 + α2 )2 − α12 ) > 0
–1 <α2 <1
α2 > –1 + α1 –1 1 α1
α2 > –1 –α1
–1
Stability
area
EXERCISE 6.5
The characteristic polynomial of a system is F(z) = z5 + 2.6z4 − 0.56z3 −
2.05z2 + 0.0775z + 0.35 = 0. Evaluate the system stability using the Jury
stability criterion.
Solution
We formulate the Jury Table
Row z0 z1 z2 z3 z4 z5
1 0.35 0.0775 −2.05 −0.56 2.6 1
2 1 2.6 −0.56 −2.05 0.0775 0.35
3 b0 b1 b2 b3 b4
4 b4 b3 b2 b1 b0
5 c0 c1 c2 c3
6 c3 c2 c1 c0
7 d0 d1 d2
a0 a5 0.35 1
b0 = = = −0.8775
a5 a0 1 0.35
a0 a4 0.35 2.6
b1 = = = −2.5728
a5 a1 1 0.0775
a0 a3 0.35 −0.56
b2 = = = −0.1575
a5 a2 1 −2.05
234 Digital Control Systems
a0 a2 0.35 −2.05
b3 = = = 1.854
a5 a3 1 −0.56
a0 a1 0.35 0.0775
b4 = = = 0.8352
a5 a4 1 2.6
Similarly, calculate all the other terms of the table, which yields
Row z0 z1 z2 z3 z4 z5
1 0.35 0.0775 −2.05 −0.56 2.6 1
2 1 2.6 −0.56 −2.05 0.0775 0.35
3 −0.8775 −2.5728 −0.1575 1.854 0.8352
4 0.8352 1.854 −0.1575 −2.5728 −0.8775
5 0.077 0.7143 0.2693 0.5151
6 0.5151 0.2693 0.7143 0.077
7 −0.2593 −0.0837 −0.3472
F(1) > 0
(−1)5F(−1) > 0
|a0| < a5
|b0| > |b4|
|c0| > |c3|
|d0| > |d2|
J = [coeff;flipdim(coeff,2)];
typ = class(coeff);
n = length(coeff)-1;
if strcmp(typ,’sym’)
for i=3:2:(2*n+1)
try
alph = J(i-1,1)/J(i-2,1);
catch
disp(’Your polynomial seems to be critical’)
rethrow(lasterror);
break;
end
newrow_1 = J(i-2,:)-alph*J(i-1,:);
newrow = simplify(newrow_1);
J = [J ; newrow ;
[flipdim(newrow(1:end-(i-1)/2),2),
zeros(1,(i-1)/2)]
];
end
else
for i=3:2:(2*n+1)
try
alph = J(i-1,1)/J(i-2,1);
catch
disp(’Your polynomial seems to be critical’)
rethrow(lasterror);
break;
end
newrow = J(i-2,:)-alph*J(i-1,:);
J = [J ; newrow ;
[flipdim(newrow(1:end-(i-1)/2),2),
zeros(1,(i-1)/2)]
];
end
end
J = J(1:end-1,:)
C = J(1:2:end,1)
From the coefficients of the first column, it is clear that they do not
have the same sign, therefore the system is unstable.
Indeed, there is a pole at −2.4708, which is outside the unit circle, caus-
ing the instability of the closed system.
EXERCISE 6.6
Derive the region of values for K, such that the closed system shown in
the following scheme is stable (a) using the Routh criterion and (b) using
the Jury criterion.
G(s)
+ e(t) K
u(t) y(t)
Ts s(s + 1)
–
Solution
The transfer function of the given system is
K 1 1
G(s) = = K − (6.6.1)
s(s + 1) s s + 1
ILT t=kT
(6.6.1) ⇒ g(t) = K (1 − e−t ) ⇒ g(kT ) = K (1 − e−kT ) (6.6.2)
z(1 − e−T )
(6.6.2) ⇒ G( z) = z[ g(kT )] = K (6.6.3)
z − (1 + e−T )z + e−T
2
K (1 − e−T ) > 0
2(1 − e−T ) > 0 (6.6.6)
−T −T
2(1 + e ) − K (1 − e )> 0
From
From
K 1 + e−T T
2(1 + e−T ) − K (1 − e−T ) > 0 ⇒ < = cot
2 1− e −T 2
Consequently, we get
1 + e−T T
0<K<2 = 2 cot (6.6.7)
1 − e−T 2
1 −e−T(1 + K) − 1 + K e−T
e−T −e (1 + K) − 1 + K
−T 1
1 − e−2T (e−T − 1)[e−T(1 + K) + 1 − K]
(e −T − 1)[e (1 + K) + 1 − K]
−T 1 − e−2T
(e−T − 1)2 −T
1 − e −2 T − (e (1 + K ) + 1− K )2
1 − e −2 T
238 Digital Control Systems
1 + e−T T
0<K <2 = 2 cot (6.6.8)
1− e −T 2
EXERCISE 6.7
Evaluate the system stability of the following transfer functions.
( z − 0.5)
a. H( z) =
( z + 0.75)
( z 2 + 1)
b. H( z) =
( z 2 − 0.25)
z( z − 1)
c. H( z) =
( z 2 + 0.5z − 0.5)
( z − 0.5)( z + 0.5)
d. H( z) =
( z 2 + z + 0.75)
Solution
( z − 0.5)
a. H( z) =
( z + 0.75)
The system is stable because the system pole p = −0.75 is inside
the unit circle.
( z 2 + 1)
b. H( z) =
( z 2 − 0.25)
The system is stable because the system poles p1 = −0.5 and
p2 = 0.5 are inside the unit circle.
Stability of Digital Control Systems 239
Im Im –j
(b)
(a) –j
Re Re
–1 –.75 .5 1 –1 –.5 .5 1
j j
z( z − 1) z( z − 1)
c. H( z) = =
( z 2 + 0.5z − 0.5) ( z − 1)( z − 0.5)
The system is marginally stable because one of the system poles
(p = −1) is on the circumference of the unit circle.
( z − 0.5)( z + 0.5) ( z − 0.5)( z + 0.5)
d. H( z) = =
( z 2 + z + 0.75) ( z + 0.5 + 07 j)( z + 0.5 − 07 j)
Im Im –j
(c) –j (d) 0.86
x
Re Re
–1 –.5 1 –1 .5 1
j
j
EXERCISE 6.8
The following transfer functions are given:
y1 ( z ) 0.2 y 2 ( z) 1.8 y 3 ( z) 2
= ; = ; = ;
u( z) z − 0.8 u( z) z + 0.8 u( z) z +1
y 4 ( z) 2 y 5 ( z) 1.25
= ; =
u( z) z −1 u( z) ( z − j0.5)( z + j0.5)
For a step input, derive the first ten output values of each system.
Evaluate the stability of these systems.
Solution
The difference equations of the given systems are
The first ten output values of each system, for a step input function, are
provided in the following table.
From the values of this table, the following outcomes emerged:
• The pole of the pulse transfer function for the first system is
real positive number and is inside the unit circle (p = 0.8). The
response exponentially reaches the final value, that is, unity.
The system is stable.
• The pole of the third system is p = −1. The response oscillates
with fixed amplitude. The system is marginally stable.
• The pole of the fourth system is p = +1, the system acts (oper-
ates) as an integrator.
• The poles of pulse transfer function of the fifth system are imagi-
nary conjugates and are located inside the unit circle. The response
tends to unity with small oscillations. The system is stable.
n y1 y2 y3 y4 y5
0 0 0 0 0 0
1 0.2 1.8 2 2 0
2 0.36 0.36 0 4 1.25
3 0.488 0.512 2 6 1.25
4 0.5904 1.3904 0 8 0.9375
5 0.6723 0.6877 2 10 0.9375
Continued
Stability of Digital Control Systems 241
EXERCISE 6.9
A system with the closed-loop transfer function P( z) = K ((1 − e−Ts /2 ) /
( z − e−Ts /2 )) is given. Derive the sampling period if the parameter K = 4
for critical stability.
Solution
Since Kcr = 4, the transfer unction becomes:
1 − e−Ts /2
P( z) = 4 (6.9.1)
z − e−Ts /2
1 − e−Ts /2
1 + P( z) = 1 + 4 ⋅ =0 (6.9.2)
z − e−Ts /2
z = −4 + 5e−Ts /2 (6.9.4)
For marginal stability, z = −1, hence from the expression (6.9.4) we get
−Ts
5e−Ts /2 = 3 ⇒ e−Ts /2 = 3/5 ⇒ = ln 0.6 = −0.5108 ⇒ Ts = 1.0217 s (6.9.5)
2
EXERCISE 6.10
For a closed-loop discrete system, the transfer function of the process
is P(z) = (1/z), while for the serial controller is C(z) = Kz/(z − 1). Derive
the maximum value of parameter K such that the closed-loop system
is stable. For K = Kmax/2 calculate the system output for k = 0, 1, and 2.
Assume a unit-step input.
Solution
The discrete open-loop transfer function is
Kz 1 K
L( z) = C( z)P( z) = ⋅ = (6.10.1)
z −1 z z −1
242 Digital Control Systems
1 + L( z) = 0 ⇒ z − 1 + K = 0 (6.10.2)
K 1
L( z) = = (6.10.3)
z −1 z −1
Y( z) L( z) 1/( z − 1) 1
= = = = z −1 (6.10.4)
R( z) 1 + L( z) 1 + (1/( z − 1)) z
EXERCISE 6.11
The loop transfer function of a discrete system is given as G(z) = (0.632Kz)/
(z2 − 1.368z + 0.368). Ν Derive the region of values for K to obtain stabil-
ity of the closed system.
Solution
The system characteristic equation is
0.632Kz
1 + G( z) = 1 + =0 (6.11.1)
z 2 − 1.368 z + 0.368
0.632Kz
1+ =0
z 2 − 1.368 z + 0.368 (6.11.2)
⇒ 0.632Kw + 1.264w + (2.736 − 0.632K ) = 0
EXERCISE 6.12
The system of the following scheme is given.
r + e c
ZOH G(s)
– T
Solution
We use MATLAB to design the requested diagrams.
Nyquist diagram
20
15
10
5
Imaginary axis
−5
−10
−15
−20
−1.5 −1 −0.5 0
Real axis
102
101
100
10−1
10−2
10−1 100 101 102 103
EXERCISE 6.13
Design the root locus of a system with the open-loop transfer function:
K ( z + 0.995)
D( z)G( z) =
( z − 1)( z − 0.905)
Solution
The loop transfer function is
K ( z + 0.995)
D( z)G( z) = (6.13.1)
( z − 1)( z − 0.905)
K ( z + 0.995)
1 + D( z)G( z) = 0 ⇒ 1 + =0 (6.13.2)
( z − 1)( z − 0.905)
dK z 2 + 1.99z − 2.76 = 0
=0⇒ (6.13.4)
dz z1 = 0.954, z2 = −2.934
Stability of Digital Control Systems 245
Calculate the intersections point of root locus with the unit circle
It should hold
For
z 2 − 1.81z + 1 = 0
K cr = 0.095 ⇒
z1 = 0.905 ± j0.425
Root locus
2
1.5
0.5
Imaginary axis
−0.5
−1
−1.5
−2
−2.5
−4 −3 −2 −1 0 1
Real axis
246 Digital Control Systems
EXERCISE 6.14
Design the root locus for the system of the following scheme.
R(s) C(s)
+ 1 – e–Ts k
T = 0.1 sec s s(s + 1)
–
Solution
The open-loop transfer function is G(z)
1 − e−Ts k k
G( z) = z = (1 − z−1 )z 2
s s( s + 1) s (s + 1)
z −1 k k k z − 1 kTz kz kz (6.14.1)
⇒ G( z) = z 2 − + = − +
z
s s s + 1
z ( z − 1) 2
z − 1 z − e−T
z(T − 1 + e−T ) + 1 − e−T − Te−T
⇒ G( z) = k
( z − 1)( z − e−T )
For
0.00484( z + 0.9672)
T = 0.1 s ⇒ G( z) = k (6.14.2)
( z − 1)( z − 0.9048)
dk
=0 (6.14.3)
dz
Both roots of (dk/dz) = 0 are breaking points since there are posi-
tive values for the amplification parameter of the system. The critical
value of Κ, Κcr, for which the system becomes stable, can be found by
using the Jury criterion or the Routh criterion with the aid of bilinear
Möbius transform, yielding that Kcr = 165. The design of root locus of the
Stability of Digital Control Systems 247
2.5
0.88 0.8 0.68 0.5 0.25
0.94
2
1.5
0.975
1
0.994
0.5
5 2 1
06 4 3
−0.5
0.994
−1
0.975
−1.5
−2
0.94
0.88 0.8 0.68 0.5 0.25
−2.5
−6 −5 −4 −3 –2 –1 0 1 2
EXERCISE 6.15
Approximately design the root locus of the systems with open-loop
transfer functions, as given below. Evaluate the stability of the closed-
loop systems.
z z z
G1 ( z) = , G2 ( z) = , G3 ( z) = ,
z − 0.5 ( z − 0.5)2 ( z − 0.1)( z − 0.8)
z + 0.6 z z( z − 0.6)
G4 ( z) = G5 ( z) = 2 , G6 ( z) = 2
( z − 0.1)( z − 0.8) z − 0.4 z + 0.6 z − 0.4 z + 0.6
Solution
z
G1 ( z) =
z − 0.5
For the first system, the transfer function has a zero at 0 and a pole at 0.5.
In the following scheme, the root locus of the system characteristic equa-
tion is presented. Since the locus branch is located inside the unit circle,
the system is stable.
248 Digital Control Systems
1
0.86 0.76 0.58 0.35
0.8 0.92
0.6 0.96
0.4
0.984
0.2 0.996
−0.2 0.996
−0.4 0.984
−0.6 0.96
−0.8 0.92
0.86 0.76 0.58 0.35
−1
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
z
G2 ( z) =
( z − 0.5)2
For the second system, the transfer function has a zero at 0 and a
double pole at 0.5. In the following scheme, the root locus of the system
characteristic equation is presented. Since the two locus branches are
located inside the unit circle, the closed-loop system is stable.
Root locus
1
0.8
0.6
0.4
Imaginary axis (s−1)
0.2
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real axis (s−1)
Stability of Digital Control Systems 249
z
G3 ( z) =
( z − 0.1)( z − 0.8)
For the third system, the transfer function has a zero at 0 and two
real poles at 0.1 and 0.8. In the following scheme, the root locus of
the system characteristic equation is presented. Since the two locus
branches are located inside the unit circle, the closed-loop system is
stable.
Root locus
1
0.8
0.6
0.4
Imaginary axis (s−1)
0.2
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real axis (s−1)
z + 0.6
G4 ( z ) =
( z − 0.1)( z − 0.8)
For the fourth system, the transfer function has a zero at −0.6 and two
real poles at 0.1 and 0.8. In the following scheme, the root locus of the
system characteristic equation is presented. Since the two locus branches
are not located inside the unit circle, the closed-loop system is condition-
ally stable.
250 Digital Control Systems
Root locus
1
0.5
Imaginary axis (s−1)
−0.5
−1
−1.5
−2.5 −2 −1.5 −1 −0.5 0 0.5 1
Real axis (s−1)
z
G5 ( z) =
z 2 − 0.4 z + 0.6
For the fifth system, the transfer function has a zero at 0 and two
c omplex conjugate poles at 0.2000 + 2.4413i and 0.2000 − 2.4413i. In the
following scheme, the root locus of the system characteristic equation
is presented. Since the two locus branches are located inside the unit
circle, the closed-loop system is stable.
The breaking point is computed as
Kz
1 + G5 ( z) = 0 ⇒ 1 + =0
z 2 − 0.4 z + 0.6
z 2 − 0.4 z + 0.6
⇒ K =−
z
dK
= 0 ⇒ z 2 = 0.6
dz
z = ±0.7746
z1 = 0.7746 ⇒ K = −1.1492
z2 = −0.7746 ⇒ K = 1.9492
Breaking point is the root z2 = −0.7746 where it holds that K = 1.9492 > 0.
The angle of departure from the complex pole is 0.2000 + 2.4413i is
Root locus
1
0.8
0.6
0.4
Imaginary axis (s−1)
0.2
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real axis (s−1)
z( z − 0.6)
G6 ( z) = 2
z − 0.4 z + 0.6
For the sixth system, the transfer function has two zeros at 0 and 0.6,
and two complex conjugate poles at 0.2000 + 2.4413i and 0.2000 − 2.4413i.
In the following scheme, the root locus of the system characteristic
equation is presented. Since the two locus branches are located inside
the unit circle, the closed-loop system is stable.
Root locus
1
0.8
0.6
0.4
Imaginary axis (s−1)
0.2
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real axis (s−1)
252 Digital Control Systems
EXERCISE 6.16
Design the root locus of the characteristic equation for the system of the
following scheme and provide some relevant outcomes regarding its
stability. Assume that
1 K Kz
Gp (s) = and GD ( z) = =
s +1 1 − z −1 z − 1
Solution
Calculate the transfer function of the given system using ZOH.
1 − e−τ s 1
Z[Gh (s)Gp (s)] = Z = (1 − z−1 )Z 1
s s + 1 s(s + 1)
1 1 (6.16.1)
= (1 − z−1 )Z −
s s + 1
z − 1 z z 1 − e−T
= − =
z z − 1 z − e−T z − e−T
Kz 1 − e−T
G( z) = GD ( z)Z[Gh (s)Gp (s)] = (6.16.2)
z − 1 z − e−T
Kz(1 − e−T )
1+ =0 (6.16.3)
( z − 1)( z − e−T )
0.3935Kz
(6.16.2) ⇒ G( z) = (6.16.4)
( z − 1)( z − 0.6065)
( z − 1)( z − 0.6065)
(6.16.3),(6.16.4) ⇒ K = − (6.16.5)
0.3935z
Stability of Digital Control Systems 253
dK z 2 − 0.6065
=− = 0 ⇒ z 2 = 0.6065 (6.16.6)
dz 0.3935z 2
0.6 0.96
0.4
0.984
0.2 0.996
−0.2 0.996
0.984
−0.4
−0.6 0.96
−0.8 0.92
0.86 0.76 0.58 0.35
−1
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
0.3935Kz
A( z) = 1 + =0
( z − 1)( z − 0.6065) (6.16.7)
⇒ A( z) = z 2 − 1.6065z + 0.6065 + 0.3935Kz = 0
It should hold
0.6321Kz
G( z) = (6.16.9)
( z − 1)( z − 0.3679)
Root locus
1
0.86 0.76 0.58 0.35
0.8 0.92
0.6 0.96
0.4
0.984
Imaginary axis (s−1)
0.2 0.996
−0.2 0.996
0.984
−0.4
0.96
−0.6
−0.8 0.92
0.86 0.76 0.58 0.35
−1
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real axis (s−1)
Stability of Digital Control Systems 255
0.8647 Kz
G( z) = (6.16.10)
( z − 1)( z − 0.1353)
Root locus
1
0.86 0.76 0.58 0.35
0.8 0.92
0.6 0.96
0.4
0.984
Imaginary axis (s−1)
0.2 0.996
−0.2 0.996
0.984
−0.4
0.96
−0.6
−0.8 0.92
0.86 0.76 0.58 0.35
−1
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real axis (s−1)
EXERCISE 6.17
Calculate the region of values for the parameter K (K > 0) for stability of
the closed system using the Nyquist and Jury criteria for the open-loop
transfer function: G(z) = K/((z − 0.2)(z − 0.4)) for T = 1 s.
Repeat the procedure if: G(z) = K/(z(z − 0.2)(z − 0.4)).
256 Digital Control Systems
Solution
1.
K
G( z) =
( z − 0.2)( z − 0.4)
Evaluation of stability using the Nyquist criterion: The frequency
response of the open-loop system is provided by setting
T =1
z = e jωT = e jω into
K
G( z) = . (6.17.1)
( z − 0.2)( z − 0.4)
K
G(e jω ) =
(e jω − 0.2)(e jω − 0.4)
K
= (6.17.2)
(cos ω + j sin ω − 0.2)(cos ω + j sin ω − 0.4)
K
G(e jω ) = 2 2
(cos ω − sin ω − 0.6 cos ω + 0.08) + j(2 sin ω cos ω − 0.6 sin ω)
K
=
(cos 2 ω − (1 − cos 2 ω) − 0.6 cos ω + 0.08) + j(2 sin ω cos ω − 0.6 sin ω)
K
= 2
(2 cos ω − 0.6 cos ω − 0.92) + j(2 sin ω cos ω − 0.6 sin ω)
(6.17.3)
K K
G(e jω ) = G(e j arccos( 0.3 ) ) = 2 = (6.17.5)
2(0.3) − 0.6 ⋅ 0.3 − 0.92 −0.92
K
> −1 ⇒ K < 0.92 (6.17.6)
−0.92
K
G( z) ( z − 0.2)( z − 0.4) K
Gcl ( z) = = = 2
1 + G( z) 1 + K z − 0.6 z + 0.08 + K
( z − 0.2)( z − 0.4) (6.17.7)
K
⇒ Gcl ( z) = 2
z − 0.6 z + a
where
a = 0.08 + K (6.17.8)
1 −0.6 a a2 = a
a −0.6 1
1 − a2 −0.6 + 0.6a
−0.6 + 0.6 a
a1 =
1 − a2
−0.6 + 0.6a 1 − a2
[−0.6(1 − a)]2
1 − a2 −
1 − a2
1> 0
1 − a2 > 0 (6.17.9)
0.36(1 − a)2
1 − a2 − >0
1 − a2
0.36(1 − a)2
Examine the condition: 1 − a 2 − > 0.
1 − a2
0.36(1 − a)2 0.36(1 − a)2
1 − a2 − 2
> 0 ⇒ 1 − a2 > ⇒ (1 − a 2 )2 > 0.36(1 − a)2
1− a 1 − a2
⇒ −(1 − a 2 ) < 0.6(1 − a) < 1 − a 2
(6.17.11)
258 Digital Control Systems
Root locus
1
0.8
0.6
0.4
Imaginary axis (s−1)
0.2
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real axis (s−1)
Stability of Digital Control Systems 259
2.
K
G( z) =
z( z − 0.2)( z − 0.4)
K
G( z) ( z( z − 0.2)( z − 0.4)) K
Gcl ( z) = = = 3 (6.17.14)
1 + G( z) 1 + K z − 0.6 z 2 + 0.08 z + K
( z( z − 0.2)( z − 0.4))
1 −0.6 0.08 K K
a3 = =K
K 0.08 −0.6 1 1
4
K − 2.36K 2 0.08K 3 + 0.6064K 2 + 0.016K − 0.24
− 0.096K + 0.9936 1− K 2
1− K 2
K = 1;
H = zpk([],[0 0.2 0.4],K,1);
nyquist(H)
260 Digital Control Systems
Nyquist diagram
2
1.5
1
Imaginary axis (s−1)
0.5
−0.5
−1
−1.5
−2
−1.5 −1 −0.5 0 0.5 1 1.5 2 2.5
Real axis (s−1)
0.5
Imaginary axis (s−1)
−0.5
−1
−1.5
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real axis (s−1)
Stability of Digital Control Systems 261
EXERCISE 6.18
A continuous-time system is given with the transfer function G(s) = 2/
((s + 1)(s + 2)).
Solution
1. Calculate the transfer function Gd(z) of the discrete-time system
that arises from the sampling of the continuous-time system
with period Τ = 1 s and ZOH circuit.
2
Gd ( z) = (1 − z−1 )Z L−1
s(s + 1)(s + 2)
−1 1 − 2 1
= (1 − z )Z L +
−1
+ = (1 − z−1 )Z {(11 − 2e−t + e−2t )u(t)}
s s + 1 s + 2
z −2 z z
⇒ Gd ( z) = (1 − z−1 ) + +
z − 1 z − e z − e−2T
−T
(6.18.1)
z −2 z z
(6.18.1) ⇒ Gd ( z) = (1 − z−1 ) + +
z − 1 z − 0.368 z − 0.135
(6.18.2)
0.4 z + 0.148
⇒ Gd ( z) =
( z − 0.368)( z − 0.135)
for K=1:200
t(K)=0.1*(1.03)^K;
z(K)=exp(t(K)*i);
g(K)=(0.4*z(K)+0.148)/(z(K)-0.368)/(z(K)-0.135);
gr(K)=real(g(K));
gi(K)=imag(g(K));
bodem(K)=20*log(sqrt(gr(K)^2+gi(K)^2));
end
semilogx(t,bodem);axis equal
262 Digital Control Systems
20
10
−10
−20
−30
−40
−50
2. It holds that
1 + (T/2)w 2 + w
z= = (6.18.3)
1 − (T/2)w 2 − w
^ 0.4 z + 0.148
G(w) = Gd ( z)| 2+ w = | 2+ w
z= ( z − 0.368)( z − 0.135) z = 2−w
2− w
(6.18.4)
^ (2 − w)(0.252w + 1.096)
⇒ G(w) =
(1.368w + 1.264)(1.135w + 1.73)
for K=1:200
t(K)=0.1*(1.03)^K;
omega(K)=i*t(K);
z(K)=exp(t(K)*i);
g(K)=2/(omega(K)+1)/(omega(K)+2);
gr(K)=real(g(K));
gi(K)=imag(g(K));
bodem(K)=20*log(sqrt(gr(K)^2+gi(K)^2));
gh(K)=(2-omega(K))*(0.252*omega(K)+1.096)/
(1.368*omega(K)+1.264)/(1.135*omega(K)+1.73);
ghr(K)=real(gh(K));
ghi(K)=imag(gh(K));
Stability of Digital Control Systems 263
bodemh(K)=20*log(sqrt(ghr(K)^2+ghi(K)^2));
end
semilogx(t,bodem,t,bodemh,’b’);axis equal
300
200
−100
−300
−400
Root locus
1
0.5
0
Imaginary axis (s−1)
−0.5
−1
−1.5
−2
−2 −1.5 −1 −0.5 0 0.5 1
Real axis (s−1)
EXERCISE 6.19
For the sampled data system of the following scheme, it is required to
R(s) K Y(s)
+ 1 – e–Ts
T = 1s s s(s + 1)
–
Solution
1. The open-loop transfer function is
1 − e−Ts K K
G(s) = = (1 − e−Ts ) (6.19.1)
s s(s + 1) s2 (s + 1)
K
G( z) = z 2 * (1 − z1 ) = K 0.368 z + 0.264 (6.19.2)
s (s + 1) ( z − 1)( z − 0.368)
1 + (T/2)w
z= (6.19.3)
1 − (T/2)w
1 + (T/2)w 1 + 0.5w
G(w) = G( z)|z = =
1 − (T/2)w 1 − 0.5w
(6.19.4)
−0.0381K (w − 2)(w + 12.14)
=
w(w + 0.924)
F(w) = 1 + G(w) = 0
(1 − 0.0381K )w 2 + (0.924 − 0.386K )w + 0.924K
⇒ =0 (6.19.5)
w(w + 0.924)
⇒ (1 − 0.0381K )w 2 + (0.924 − 0.386K )w + 0.924K = 0
w2 1 − 0.0381K 0.924K
w1 0.0924 − 0.386K 0
w0 0.924K
0.368 z + 0.264
1 + G( z) = 0 ⇒ 1 + K =0
( z − 1)( z − 0.368) (6.19.8)
2
⇒ F( z) = z + (0.368K − 1.368)z + (0.368 + 0.264K ) = 0
266 Digital Control Systems
(−1)2 F(−1) = 1 − 0.368K + 1.368 + 0.368 + 0.264K > 0 ⇒ K < 26.3 (6.19.10)
z0 z1 z2
0.368 + 0.264K 0.368K − 1.368 1
1 + 0.368 − 0.717
σ= = 2.085 (6.19.13)
2 −1
0.368 z + 0.264
1 + G( z) = 0 ⇒ 1 + K =0
( z − 1)( z − 0.368) (6.19.14)
( z − 1)( z − 0.368)
⇒ K =−
0.368 z + 0.264
dK d ( z − 1)( z − 0.368)
= 0 ⇒ = 0
dz dz 0.368 z + 0.264
(6.19.15)
⇒ z 2 + 1.434 z − 1.3489 = 0
z1 = −2.08, z2 = 0.648
1.5
System: sys
Gain: 2.39
Pole: 0.244 + 0.968i
Damping: –0.245
Overshoot (%): 221
1 Frquency (rad/s): 0.998
0.5
−0.5
−1
−1.5
−5 −4 −3 −2 −1 0 1 2
1 + 0.5w
z= (6.19.16)
1 − 0.5w
ωw ω
|| w |
|
|G( jωw )|= 2 12 .14 = 0.0381
ωw
lim ωw →∞
|ωw || |
0.924
20 log(0.0381) = −28.4 dB
268 Digital Control Systems
20
Magnitude (dB)
10
−10
−20
−30
270
225
Phase (deg)
180
135
10−1 100 101 102
Frequency (rad/s)
EXERCISE 6.20
For the system of the following scheme, calculate the region of values
of K for stability. Design the response of the closed system for K = Kcr
and extract some relevant conclusions. The evaluation should be done
for T = 0.1 s and T = 1 s
+ 1 – e–Ts K
T s s(s + 1)
–
Solution
1. Derive the loop transfer function G(z) using MATLAB for
T = 0.1 s
K=20.34;
Hcl_z=K*G_z/(1+K*G_z);
pole(Hcl_z)
ans =
0.9032 + 0.4292i
0.9032 - 0.4292i
1.0000
0.9048
step(Hcl_z)
Step response
2.5
1.5
Amplitude
0.5
−0.5
0 50 100 150 200 250
Time (s)
270 Digital Control Systems
Observe that the system, for step input, oscillates with fixed
amplitude that does not fade out.
2. Derive the loop transfer function G(z) using MATLAB for
Τ=1s
0.36788 (z + 0.7183)
G( z) = (6.20.4)
( z − 1)( z − 0.3679)
1 + KG(w) = 0 ⇒ (1 − 0.03788K )w 2
(6.20.5)
+ (0.9242 − 0.3864K )w + 0.9242K = 0
w2 1–0.03788K
w1 0.9242–0.3864K
w0 0.9242K
EXERCISE 6.21
The system of the following scheme is given. Using LabVIEW, derive its
total transfer function and design the poles-zeros diagram. Is the system
stable?
H1(z)
u 2 y
– 2z + 1
H2(z)
1
z3 + z2
Stability of Digital Control Systems 271
Solution
In the following schemes, the front panel and block diagram of the
designed vi are presented.
272 Digital Control Systems
H1 ( z) 2z 3 + 2z 2
H 3 ( z) = = 4 (6.21.1)
1 + H 1 ( z )H 2 ( z ) 2 z + 3 z 3 + z 2 + 2
In the following schemes, the front panel and block diagram of the
poles-zeros diagram is presented. It appears that complex conjugate
poles exist outside the unit circle, so the system is unstable.
Indeed, the poles of the closed-loop system are
−1.0708 + 0.8247i
−1.0708 − 0.8247i
0.3208 + 0.6667i
0.3208 − 0.6667i
Stability of Digital Control Systems 273
EXERCISE 6.22
Let the following loop transfer function: G(s) = 2Ks/((s+1)2(s+2)).
Discretize it using the sample equivalence method (or sampled inverse
Laplace transform) and design the root locus diagram of the system. Is
the given closed-loop system stable for K = 1?
Solution
Insert the transfer function to the program Comprehensive Control—CC
with the command
CC>G=enter(1,1,2,0, 2,1,1,2,2,1,2,1)
Using the command Convert, the transfer function G(s) is being dis-
cretized. Select the sample equivalence method for sampling period
T = 1 s. Writting the command
CC>gd=convert(G,7,1)
0.1944 z( z − 1.248)
gd( z) = (6.22.1)
( z − 0.3679)2 ( z − 0.1353)
CC>rootlocus(gd)
From the root locus diagram, the marginal value of the parameter K
arises, which is approximately 7.2. Hence, for K = 1, the closed system is
stable.
Theoretical proof
The open-loop transfer function, which is provided in the expression
(6.22.1), has three poles (a double one and a simple one) and two zeros
p1 = p2 = 0.368, p3 = −0135
(6.22.2)
z1 = 1.24
Thus, the root locus will have three branches. In the real axis, a locus is
placed between z1 and p1 and between p2 and p3, while z1 → −∞.
Asymptotes are
(2 * µ + 1) * 180 °
Φα = = (2 * µ + 1) * 180° µ
=0
→ Φα = 180° (6.22.3)
n p − nz
274 Digital Control Systems
Σp − Σz
σα = = 0.871 − 1.248 ⇒ σα = −0.377 (6.22.4)
n p − nz
2 1 1 −0.150
+ = ⇒ σb = (6.22.5)
|σb |−0.368 |σb |−0.135 |σb |−1.248 +0.198
The latter two values are accepted as break away points of the branches
from the real axis since there is an odd number of poles and zeros to the
right-most side of each of them. Also, for both σb values, the system gain
is positive (for σb = −0.15, there is almost a gain of 1.88 and for σb = 0.198,
there is almost a gain of 0.0447).
The system characteristic equation with unit feedback H(z) = 1 (closed
system) is given by (assuming that Κ = 1)
z0 z1 z2 z3
a0 an−k
bk = , n = 3 ⇒ b0 = −0.999, b1 = 0.677 , b2 = 0.020
an ak
Obviously: a0 = −0.018, a1 = −0.008, a2 = −0.677 , a3 = 1
All the above equations hold true, thereby the closed-loop system of
unit feedback is stable for Κ = 1.
7
Time and Harmonic Response
Analysis Steady-State Errors
It holds that
y(k ) = yt (k ) + y ss (k ) (7.1)
The design specifications for a control system include, among others, various
parameters of the corresponding time response with respect to a given input
275
276 Digital Control Systems
function along with the required precision that should be preserved during
the steady state. The specifications, determined in accordance to the required
operation measures, represent an indicator of the system quality. The sys-
tem time response denotes a feature of the most interest. In the case when a
system is stable, its time response, given a particular input signal, provides
valuable information regarding the general system performance.
Generally, certain typical input signals are selected so as to correlate the sys-
tem response to a given signal and its operational behavior under canonical
conditions.
The most common input signals are
In principle, the above factors contradict to each other and therefore some
relative compromises must be performed. In practical control systems, the
transient response manifests damped oscillations before reaching the steady
state.
Pulse response
δ(k)
1 z
G(z) = = y(k) = ak
1 – az–1 z – a
FIGURE 7.1
First-order system.
a = 0.5 a = −0.5
1 1
0.9
0.8
0.8
0.6
0.7
0.4
0.6
0.5 0.2
0.4
0
0.3
−0.2
0.2
−0.4
0.1
0 −0.6
0 2 4 6 8 10 0 2 4 6 8 10
k k
FIGURE 7.2
Time responses for the step response y(k) = ak when |a| < 1.
Nz−1
G( z) = (7.3)
(1 − re jθ z−1 )(1 − re− jθ z−1 )
2π 360
N= |rad = |deg (7.5)
θ θ
278 Digital Control Systems
a = 1.5 a = −1.5
60 60
50
50
40
30
40
20
30 10
0
20
−10
−20
10
−30
0 −40
0 2 4 6 8 10 0 2 4 6 8 10
k k
FIGURE 7.3
Time responses for the step response y(k) = ak when |a| > 1.
b
G( z) = (7.6)
z−p
b
y( k ) = (1 − p k ) (7.7)
1− p
From the expression (7.7), it can be seen that for p = 1 the system acts as an
integrator, for 0 < p < 1 the output exponentially follows the input, for p = 0
the system acts as a delay component, for p = −1 the step response results to
oscillations of fixed amplitude (which do not fade out), and for −1 < p < 0
the step response oscillates tending to a fixed value.
7.1.4 General Form for the Step Response of Discrete Time System
Consider a system with the transfer function (where n > m)
p( z) bm z m + b m−1zm−1 + + b1z + b0
GCL ( z) = = (7.8)
q( z) a n z n + an−1z n−1 + + a1z + a0
Time and Harmonic Response Analysis Steady-State Errors 279
bm ( z − z1 )( z − z2 )( z − z j )( z − zm )
= ×
an ( z − p1 )( z − p2 )( z − pi )( z − pn )
∏
m
(z − z j )
bm j =1 (7.9)
= ×
∏
n
an ( z − pi )
i =1
n
p( z) z Az Bi z
Y( z) = =
q( z) z − 1 z − 1
+ ∑ z−p
i=1
i
(7.10)
p( z) p( z)( z − pi )
where A = Bi = (7.11)
q( z) z=1 q( z)( z − 1) z= p
i
n n
Bi z k 1
Y( z) = ∑
i=1
z − pi
⇒ y(kT ) = ∑B pi=1
i i
k Z[a ] =
1 − az−1
(7.12)
Let α = (1\T) ln pi. Then, the transient part of the system response is
BieαkT. For |pi| < 1 ⇒ a < 0. The transient response is a exponentilly
decreasing curve. The smaller the value of |pi| and higher the value
of |a|, the faster the transient response gets.
2. pi is a real negative pole
The transient response, in this case, is given by
n n
Bi z
Y( z) = ∑
i=1
z − pi
⇒ y(kT ) = ∑B p
i=1
i i
k
(7.13)
Bi pi k k is even
where Bi pi = k
(7.14)
−B p k k is odd
i i
3. pi equals to zero
The transient response is presented as
n
Bi z
Y( z) = ∑ z − p ⇒ y (kT ) = B δ(k)
i=1
i
i i (7.15)
p( z) 1
Y( z) = ×
q( z) 1 − z−1
p(1) za1Φ1( z) za Φ ( z)
= + m
+ 2 2 m−1 + ⇒
q(1) ( z − p) ( z − p)
ai k m−i
For |p| < 1, p ≠ 0 it holds: lim = 0, i = 1, 2, 3,..., for 0 < p < 1
k →∞ (1 / p)k −1
ai , ai+1 = ai e ± jφi
pi =| pi |e jθi , pi+1 =| pi |e− jθi
where
p( z)( z − pi ) p( z)( z − pi )
ai = φi = arg (7.17)
q( z)( z − 1) z= p q( z)( z − 1) z= p
i i
Y(s) ωn2
G(s) = = 2 (7.19)
X(s) s + 2 Jω n s + ω n 2
The constant J is called damping ratio of the system, the constant ωn is called
undamped natural frequency and the constant ω d = ω n 1 − J 2 is called damped
natural frequency.
In control system applications, only the case 0 < J < 1 is of practical inter-
est since it corresponds to stable systems. In such a case, the characteristic
equation has two complex conjugate poles
In Figure 7.5, the two complex planes, s and z, and their joint correlation are
illustrated according to the relation z = eTs.
2π J ωd
⇒ z = exp −
1 − J 2 ωs
(7.22)
ωd
∠z = 2π
ωs
FIGURE 7.4
Continuous-time second-order system.
282 Digital Control Systems
jω s-plane Im(z)
z-plane
ωs
j
3 2 2
3 1
1 2 1
σ 5 6 Re(z)
6
4
4 5
ωs
–j
2
FIGURE 7.5
Joint correlation of planes s and z, according to the relation z = eTs.
• Percentage of overshoot
ymax − y ss
POT = 100% (7.23)
y ss
where ymax and yss, denote the maximum value and the steady-state
value, respectively, of the system response y(k).
• Settling time
t s = k sT (7.24)
ε y ss
y(k ) − y ss ≤ , ∀k ≥ k s ⇔
100
(7.25)
1 − ε y ss ≤ y(k ) ≤ 1 + ε y ss , ∀k ≥ k s
100 100
3
ts = (7.26)
Jω n
• Dominant poles, that is, the poles that are closer to the circumference
of the unit circle.
Time and Harmonic Response Analysis Steady-State Errors 283
1
0.5π/T
0.6π/T 0.4π/T
1π/T
0
1π/T
−0.2
0.9π/T 0.1π/T
−0.4
0.8π/T 0.2π/T
−0.6
FIGURE 7.6
Illustration of the fixed damping coefficient lines (in logarithmic spiral) and the natural
oscillation frequency lines (in radial curves) from s- to z-plane.
z1, 2 = re jϕ ⇒
− ln r (7.27)
J=
2 2
(ln r ) + ϕ
1
ωn = (ln r )2 + ϕ 2 (7.28)
T
In Figure 7.6, the fixed damping coefficient lines (in logarithmic spiral) and
the natural oscillation frequency lines (in radial curves) are illustrated from s- to
z-plane. This scheme has been developed via the MATLAB® command zgrid.
The steady state is quite important since the design of an automatic con-
trol system is designed, among others, to maintain a predetermined steady
state for the output yss(kT), which is usually the input function u(kT). In other
words, the system is designed so as to hold yss(kT) = uss(kT), when the system
is stimulated by u(kT). Otherwise, we have a static error or steady-state error.
Note that the steady-state error of closed-loop stable system is usually
much smaller than its open-loop counterpart.
From the theory of analog control systems, it is known that the steady-state
error depends on the input function and the system features.
The system features are studied with the aid of three error factors, namely,
position, velocity, and acceleration (Kp, Kv, and Κα). It will be shown, subse-
quently, that these factors can be utilized in digital control systems as well.
To study the steady-state error, the block diagram of Figure 7.7 is be used,
assuming that the system is stable. Otherwise, the error would increase
without any bound, reflecting a system self-destruction.
It holds that
To make the analysis feasible, the signal e*(t) is used, thus the steady-state
error, during sampling, is
R( z)
E( z) = (7.32)
1 + z[GH (s)]
G(s)
c*(t)
T
r(t) + e(t) e*(t) 1 – e–Ts Gp(s) c(t)
R(s) – E(s) T E*(t) s
B(s)
H(s)
FIGURE 7.7
Sampled data system.
Time and Harmonic Response Analysis Steady-State Errors 285
( 7.31),( 7.32 )
R( z)
⇒ ess* = lim e * (t) = lim( z − 1) (7.33)
t →∞ z →1 1 + z[G(s)H (s)]
m
k Π( z − zi )
GH ( z) = P , z j ≠ 1, zi ≠ 1 (7.34)
( z − 1)N Π( z − z j )
N plays a crucial role since it influences the system features and defines the
system as a zero-, first- or second-order, when N = 0, 1, and 2.
Define Kdc as
m
k Π( z − zi )
K dc = P (7.35)
Π( z − z j ) z =1
where Kdc is the gain of the open system for zero frequency, when the pole at
z = 1 has been removed.
Next, we study the impact of input function for three different signal types.
The most common ones are the step, ramp and parabolic input functions.
1. Step input
The z-transform for a step input of range A is
Az
R( z) = (7.36)
z −1
From:
We can easily show, from the expressions (7.34), (7.35), and (7.39),
that kp = kdc for N = 0 and kp = ∞ for N ≥ 1.
286 Digital Control Systems
GpH (s)
GH ( z) = z[GH (s)] = (1 − z−1 )z (7.39)
s
A A
ess* = = (7.40)
1 + k p 1 + k dc
ATz
R( z) = (7.41)
( z −1)2
A A (7.42)
⇒ ess* = =
lim(( z − 1)/T )GH ( z) kv
z →1
z − 1
kv = lim GH ( z) (7.43)
T
z →1
A AT
ess* = = (7.44)
kv kdc
3. Parabolic input
The z-transform for a parabolic input of range A is
AT 2 z( z + 1)
R( z) = (7.45)
2( z − 1)3
Time and Harmonic Response Analysis Steady-State Errors 287
TABLE 7.1
Steady-State Errors
Steady-State Errors
* R(z)
Error Type ess = lim e* (t ) = lim(z − 1)
(Number of Error
t →∞ z→1 1 + z[G(s)H (s)]
Integrators of G(z)) Constants Position Velocity Acceleration
0 Position: kp A A ∞ ∞
=
Velocity: 0 1 + k p 1 + k dc
Acceleration: 0
1 Position: ∞ 0 A AT ∞
=
Velocity: kv kv kvcd
Acceleration: 0
2 Position: ∞ 0 0 A AT 2
Velocity: ∞ =
ka k dc
Acceleration: ka
( z − 1)2
k a = lim GH ( z) (7.47)
z →1
T
k dc A AT 2
ka = 2
⇒ ess* = = (7.48)
T ka k dc
Overall, the steady-state errors and the corresponding error factors are pre-
sented in Table 7.1, corresponding to the appropriate discrete system type.
signal of fixed amplitude and variable frequency. For a sinusoidal input sig-
nal, the time response of a linear system is also a sinusoidal signal, whose
frequency is identical to the input signal, while their c orresponding ampli-
tudes and phases are different.
The frequency response of a discrete system arises from its transfer func-
tion, by replacing the complex variable z with the imaginary variable ejΩ,
where Ω is the digital frequency in the range (0, π).
The resulting function H(ejω) = H(ejωTs) is a complex function of a real vari-
able having certain magnitude and phase. The magnitude and phase diagrams
versus the frequency provide valuable information during the analysis and
design process of a control system.
In the case when the input of a linear and discrete-time invariant system
with impulse response h(n) is a sinusoidal signal, that is, being of the form of
x(n) = Aejωn, the system response is presented as
∞ ∞
∞
(7.49)
= e jω n ∑ h(k0e)
k =−∞
− jωk
⇒ y(n) = e jωn H (e jω ) = e jωn H (e jω ) ∠H (e jω ) ⇒
y(n) = Ae jωn H (e jω )
It is noteworthy that the above conditions apply only when the function
H(ejΩ) does not tend to infinity, that is, the region of convergence of the dis-
crete-time system includes the unit circle.
TABLE 7.2
Time Response of Discrete System
Impulse time response of first-order system y(k) = ak
z
G( z) =
z−a
Step time response of first-order system b
b y( k ) = (1 − p k )
G( z) = 1− p
z−p
TABLE 7.3
Correlation of Time Response between Analog and Discrete Control System
Relation between z and J, ωn, ωd 2π J ωd
z = exp −
2 ω
1− J s
ωd
∠z = 2π
ωs
y max − y ss
Percentage of overshoot POT = 100%
y ss
ts=ksT
Settling time
1 − ε y ss ≤ y(k ) ≤ 1 + ε y ss
100 100
∀k ≥ k s
TABLE 7.4
Steady-State Errors
Steady-State Error
Error Type R(z)
*
(Number of ess = lim e* (t ) = lim(z − 1)
t →∞ z→1 1 + z[G(s)H (s)]
Integrators Error
of G(z)) Constants Position Velocity Acceleration
0 Position: kp A A ∞ ∞
=
Velocity: 0 1 + k p 1 + k dc
Acceleration: 0
1 Position: ∞ 0 A AT ∞
=
Velocity: kv kv kvcd
Acceleration: 0
2 Position: ∞ 0 0 A AT 2
Velocity: ∞ =
ka k dc
Acceleration: ka
TABLE 7.5
Error Constants for Various Forms of Closed-Loop Digital Control Systems
+ G(s)
–
Kp = lim GH(z)
z→1
(1 – z–1)GH(z) H(s)
Kv = lim
z→1 T
(1 – z–1)2GH(z)
Ka = lim
z→1 T2
+ G(s)
–
H(s)
Kp = lim G(z)H(z)
(1 – z–1)G(z)H(z)
Kv = lim
z→1 T
(1 – z–1)2G(z)H(z)
Ka = lim
z→1 T2
TABLE 7.6
Error Constants for Various Forms of Closed-Loop Digital Control Systems
+ G1(s) G2(s)
–
+ G1(s) G2(s)
–
Solution
a. To solve the problem, z-transform is applied to the given differ-
ence equation so as to derive its transfer function.
Y( z) 0.7 0.7 z
H ( z) = = = (7.1.2)
X( z) 1 − 0.3 z−1 z − 0.3
0.7 e jΩ
H(e jΩ ) = H( z) z = e jΩ = (7.1.3)
e jΩ − 0.3
292 Digital Control Systems
0.7 e jΩ
H(e jΩ ) = (7.1.4)
cos Ω − 0.3 + j sin Ω
0.7 e jω 0.7
H(e jΩ ) = = (7.1.5)
cos ω − 0.3 + j sin ω (cos ω − 0.3)2 + sin 2 ω
0.7 e jΩ sin Ω
ϕ(Ω) = Arg = Ω − tan−1 (7.1.6)
cos Ω − 0.3 + j sin Ω cos Ω − 0.3
or
EXERCISE 7.2
For the discrete systems, described by the following transfer functions,
derive and design the discrete frequency responses.
z +1 1 + z + z2
H1 ( z) = , H 2 ( z) = ,
z 3 z1
z2 − z + 1 z
H 3 ( z) = , H 4 ( z) =
z2 z−a
5(1 + 0.25z) 1
H 5 ( z) = , H 6 ( z) =
(1 − 0.5z)(1 − 0.1z) z+3
Time and Harmonic Response Analysis Steady-State Errors 293
Solution
1.
z +1
H1 ( z) =
z
Ω
H(Ω) = [H( z)]z = e jΩ = 1 + e− jΩ = e− jΩ/2 (e jΩ/2 + e− jΩ/2 ) = 2e− jΩ/2 ⋅ cos
2
(7.2.1)
Amplitude:
Ω
H(Ω) = 2e(− jΩ/2) ⋅ cos , Ω ≤π
2
Ω
H(Ω) = 2 ⋅ cos , Ω ≤ π (7.2.2)
2
Phase:
− jΩ
Ω Ω
θ(Ω) = ∠Η(Ω) = ∠2e 2 ⋅ cos = − , Ω ≤ π , (7.2.3)
2 2
2.
1 + z + z2
H 2 ( z) =
3 z1
1.8
1.5
1.6
1
1.4
0.5
1.2
Phase
Gain
1 0
0.8
−0.5
0.6
−1
0.4
−1.5
0.2
0 −2
−4 −3 −2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4
Ω (rad/s) Ω (rad/s)
294 Digital Control Systems
1 − jΩ 1
H(Ω) = [H( z)]z = e jΩ = (e + 1 + e jΩ ) = (1 + 2 cos Ω) (7.2.4)
3 3
Amplitude:
H(Ω) = 1 + 2 cos(Ω) , Ω ≤ π (7.2.5)
2.5
2
Gain
1.5
0.5
0
−4 −3 −2 −1 0 1 2 3 4
Ω (rad/s)
3.
z2 − z + 1
H 3 ( z) =
z2
Amplitude:
H(Ω) = 2 cos(Ω) − 1 , Ω ≤π (7.2.6)
Phase:
∠H(Ω) = −Ω (7.2.7)
3 4
3
2.5
2
2
1
Phase
Gain
1.5 0
−1
1
−2
0.5
−3
0 −4
−4 −2 0 2 4 −4 −2 0 2 4
Ω (rad/s) Ω (rad/s)
Time and Harmonic Response Analysis Steady-State Errors 295
4.
z
H 4 ( z) =
z−a
1
H(Ω) = [H( z)]z = e jΩ = (7.2.8)
1 − ae− jΩ
Amplitude:
1 (1 − a cos Ω) − ja sin Ω
H(Ω) = =
1 − a cos Ω + ja sin Ω (1 − a cos Ω)2 + (α sin Ω)2
(1 − a cos Ω)2 + (α sin Ω)2 1
= = H(Ω)
(1 − a cos Ω)2 + (α sin Ω)2 (1 − a cos Ω)2 + (α sin Ω)2
1
=
1 − 2a cos Ω + a 2
(7.2.9)
Phase:
−a sin Ω a sin Ω
∠H(Ω) = tan−1 = −tan−1 (7.2.10)
1 − a cos Ω
1 − a cos Ω
1.6 0
1.4
−0.2
1.2
−0.4
1
0.8 −0.6
−0.8
−4 −2 0 2 4 −4 −2 0 2 4
Ω (rad/s) Ω (rad/s)
5.
5(1 + 0.25z)
H 5 ( z) =
(1 − 0.5z)(1 − 0.1z)
296 Digital Control Systems
z+5 20 z + 100
H 5 ( z) = = (7.2.11)
(1 − 0, 5z)(1 − 0, 2z) ( z − 2)( z − 10)
Set: z = e jω ⇒
5 + e jΩ
H 5 (e jΩ ) = 20 = H 5 (e jΩ ) ∠φ(Ω) (7.2.12)
(e jΩ − 2)(e jΩ − 10)
5 + e jΩ
H 5 (e jΩ ) = 20
e jΩ − 2 e jΩ − 10
(7.2.13)
(5 + cos Ω)2 + sin 2 Ω
= 20
(cos Ω − 2)2 + sin 2 Ω (cos Ω − 10)2 + sin 2 Ω
6.
1
H 6 ( z) = (7.2.15)
z+3
Set: z = e jω ⇒
1
H 6 (e jΩ ) = 20 = H 6 (e jΩ ) ∠φ(Ω) (7.2.16)
e jΩ + 3
1 1 1
H 6 (e jΩ ) = = = (7.2.17)
e jΩ + 3 cos Ω + j sin Ω + 3 (cos Ω + 3)2 + sin 2 Ω
sin Ω (7.2.18)
ϕ(Ω) = −tan−1
cos Ω + 3
Time and Harmonic Response Analysis Steady-State Errors 297
0.5
0.4
Magnitude
0.3
0.2
0.1
0
−30 −20 −10 0 10 20 30
Ω (rad/s)
EXERCISE 7.3
Derive and design the frequency response of a ZOH circuit. In addition,
calculate the amplitude and phase of the frequency response of a FOH
circuit.
Solution
The transfer function of ZOH is given by
1 − e−Ts
Gh0 (s) = L[1(t) − 1(t − T )] = (7.3.1)
s
1 − e−Tjω
Gh 0 ( jω ) =
jω
2e−(1/2)Tjω (e(1/2)Tjω − e−(1/2)Tjω ) sin(ωT/2) −(1/2)Tjω (7.3.2)
= =T e
2 jω ωT/2
sin(ωT/2)
G( jω ) = T (7.3.3)
ωT/2
298 Digital Control Systems
sin(ωT/2) −(1/2)Tjω
∠Gh 0 ( jω) = ∠T e
ωT/2
ωT
= ∠ sin + ∠e−(1/2)Tjω (7.3.4)
2
ωT ωT
= ∠ sin −
2 2
2
4π 2 ω 2 sin(π ω/ωs )
|G foh ( jω)|= T 1 + (7.3.7)
ωs2 π ω/ωs
2π ω 2π ω
= Arg(G foh ( jω)) = tan−1 − (7.3.8)
ωs ωs
In the following schemes, the amplitude and phase of ZOH are illus-
trated. Observe that there is a low-pass filter with features depending on
the sampling period.
|Gh0|
0.637T
0.212T
0.127T
0 ωs ωs 2ωs 3ωs ω
2
Time and Harmonic Response Analysis Steady-State Errors 299
ωs 2ωs 3ωs
0°
–180°
–360°
–540°
–720°
–900°
∠Gh0
EXERCISE 7.4
Consider a discrete control system with the closed-loop transfer
function H(z) = (Y(z)/U(z)) = (0.813/(z − 0.8187)).
Derive and design its step response.
Solution
The difference equation resulting from the given transfer function is
Y( z) 0.813
H ( z) = = ⇒ Y( z)( z − 0.8187 ) = 0.813U( z)
U( z) z − 0.8187
⇒ zY( z) − 0.8187Y( z) = 0.813U( z) (7.4.1)
⇒ Y( z) − 0.8187 z−1Y( z) = 0.813 z−1U( z)
⇒ y(k)) = 0.8187 y(k − 1) + 0.813u(k )
From the above difference equation, assuming the unit step function
as an input signal, the following table arises.
k u(k) y(k)
0 1 0
1 1 0.1813
2 1 0.3297
3 1 0.4513
4 1 0.5507
5 1 0.6322
6 1 0.6989
7 1 0.7535
. . .
. . .
. . .
∞ 1 1.0000
300 Digital Control Systems
Based on this table, observe that the step response reaches to the 63%
of the final value for k = 5 or t = 0.5 s.
These values are verified by calculating the step response via the
Laplace transform:
Y( z) 0.813 0.813
H ( z) = = ⇒ Y( z) = U ( z)
U( z) z − 0.8187 z − 0.8187
(7.4.2)
0..813 z
⇒ Yu ( z) =
z − 0.8187 z − 1
0.813 z 1 0.8187
(7.4.2) ⇒ Yu ( z) = = −
( z − 1)( z − 0.8187 ) z − 1 z − 0.8187
z z (7.4.3)
⇒ Yu ( z) = z−1 − 0.8187 z−1
z −1 z − 0.8187
⇒ y u (k ) = u(k − 1) − 0.8187 k
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8 9 10
Time and Harmonic Response Analysis Steady-State Errors 301
EXERCISE 7.5
Consider a discrete control system with the closed-loop transfer function
GCL(z) = (C(z)/(X(z) = (2z − 1)/(z2). Derive and design the step response
and ramp response.
Solution
Step response:
z
X( z) = Z(u(k )) =
z −1
2z − 1 z 2z − 1
C( z) = GCL ( z)R( z) = ⋅ = (7.5.1)
z2 z − 1 z2 − z
c*(t)
0 T 2T 3T 4T
Ramp response:
Tz
X( z) = Z(r(k )) =
( z −1)
2z − 1 Tz
C( z) = GCL ( z)R( z) = ⋅ (7.5.3)
z2 ( z − 1)2
T (2z − 1)
⇒ C( z ) = = 2Tz−2 + 3Tz−3 + 4Tz−4 + (7.5.4)
z 3 − 2z 2 + z
302 Digital Control Systems
0 T 2T 3T 4T
EXERCISE 7.6
Consider a discrete control system with the transfer function:
G(z) = (z + 0.5)/(z2 − 0.6z + 0.3). Calculate the steady-state error for step
and impulse input function.
Solution
The poles of transfer function G(z) are complex conjugate, such that
Since both the poles are located inside the unit circle, the final value
theorem is invoked.
The system step response is
z + 0.5 z
Yu ( z) = (7.6.2)
z 2 − 0.6 z + 0.3 z − 1
Applying the final value theorem, the final value of the step response
is derived as
y ss , u = lim( z − 1)
z →1
z + 0.5 z (7.6.3)
Yu ( z) = lim( z − 1) 2
⋅ = 2.14
z →1 z − 0.6 z + 0.3 z − 1
Thus, the final value of the step response in steady state for the given
system is 2.14. This reflects that the steady-state error is in the order of
114%.
The above theoretical results are verified using MATLAB as
numDz=[1 0.5];
denDz=[1 -0.6 0.3];
T = 05;
sys = tf(numDz,denDz,T);
[x,t]=step(sys,5);
stairs(t,x)
Time and Harmonic Response Analysis Steady-State Errors 303
2.5
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
z + 0.5
Yδ ( z) = ⋅1 (7.6.4)
z 2 − 0.6 z + 0.3
Applying the final value theorem, the final value of the impulse
response is derived as
y ss ,δ = lim( z − 1)
z →1
z + 0.5 (7.6.5)
Yδ ( z) = lim( z − 1) ⋅1 = 0
z →1 z 2 − 0.6 z + 0.3
Thus, the final value of the impulse response in steady state for the
given system is zero. This reflects that the steady-state error is in the
order of 0%.
EXERCISE 7.7
For the system of the following scheme, derive the position and velocity
errors.
K ( z + a)
GZAS ( z) =
( z − 1)( z − b)
K c ( z − b)
C( z) =
z−c
Solution
The error transfer function of the given system is
E( z) 1
= (7.7.1)
R( z) 1 + GZAS ( z)G( z)
1
e(∞) = (7.7.2)
1 + Kp
K ( z + a)K c ( z − b)
K p = lim GZAS ( z)G( z) = lim (7.7.3)
z →1 z →1 ( z − 1)( z − b)( z − c)
Hence
K (1 + a)K c (1 − b)
Kp = =∞ (7.7.4)
(1 − 1)(1 − b)(1 − c)
1
e(∞) = =0 (7.7.5)
1 + Kp
1
e(∞) = (7.7.6)
Kv
1 1 K ( z + a)K c ( z − b)
Kv = lim( z − 1)GZAS ( z)G( z) = lim( z − 1)
τ z →1 τ z →1 ( z − 1)( z − b)( z − c)
Time and Harmonic Response Analysis Steady-State Errors 305
Hence
1 K (1 + a)K c (1 − b) K K c (1 + a)
Kv = = (7.7.7)
τ (1 − b)(1 − c) τ (1 − c)
τ (1 − c)
e(∞) = (7.7.8)
K K c (1 + a)
EXERCISE 7.8
Consider a discrete control system with the transfer function
G(s) = 10/(s(s + 1)), T = 1 s. Derive the steady-state error for different
kinds of input.
R(s) Y(s)
+ ZOH G(s)
– T
Solution
Calculate the open-loop transfer function G(s) with the aid of ZOH
10e−Ts 1 1 1
G(s) = = 10e−Ts 2 − + (7.8.1)
2
s (s + 1)
s s s + 1
Tz z z
G( z) = 10(1 − z−1 ) − +
( z − 1)
2
z − 1 z − e−T
(7.8.2)
T z − 1
= 10 −1+
z − 1 z − e−T
1
K p = lim G( z) = ∞, ess , p = =0 (7.8.3)
z →1 1 + Kp
1 1
Kv = lim( z − 1)G( z) = 10, ess , v = = 0.1 (7.8.4)
T z →1 Kv
306 Digital Control Systems
1 1
Ka = lim( z − 1)2 G( z) = 0, ess , a =
2 z →1
=∞ (7.8.5)
T Ka
EXERCISE 7.9
Consider a discrete control system with the transfer function G(s) = K/
(s(s + 5)), T = 1 s.
Derive the steady-state error for r(t) = 1 + t.
R(s) Y(s)
+ ZOH G(s)
– T
Solution
Calculate the open-loop transfer function G(s) with the aid of ZOH
1 − e−Ts K K
G( z) = Z ⋅ = (1 − e−Ts )Z 2
s s(s + 5) s (s + 5)
−Ts K/5 −K/5 K/25
= (1 − e )Z 2 + +
s s s + 5
(7.9.1)
KTz/5 Kz/5 Kz/25
= (1 − z−1 ) − +
( z − 1)
2
z − 1 z − e−5T T =1
K z 2 − 2.2067 z + 0.2135
⇒ G( z) ≈ − ⋅
5 ( z − 1)( z − 0.0067 )
Since the system input is r(t) = 1 + t, the steady-state error is the sum
of the position error and velocity error, that is
1 T
ess = + (7.9.2)
1 + K p* K v*
where
K z 2 − 2.2067 z + 0.2135
K p = lim G( z) = lim ⋅ =∞ (7.9.3)
z →1 z →1 5 ( z − 1)( z − 0.0067 )
K z 2 − 2.2067 z + 0.2135
K v* = lim( z − 1)G( z) = lim− ⋅ ≈ 0.2K (7.9.4)
z →1 z →1 5 ( z − 0.0067 )
1 T T 5
ess = + =0+ = (7.9.5)
1 + K p* K v* 0.2K T =1 K
Time and Harmonic Response Analysis Steady-State Errors 307
EXERCISE 7.10
Consider a discrete control system with the transfer function: G(s) = 1/
(s + 1) .
a. Derive the difference equation.
b. Simulate the given system.
c. Derive the step response for T = 1 s
R(s) Y(s)
+ ZOH G(s)
– T
Solution
a. The system transfer function with ZOH is
(1 − e−T )z−1
G( z) = (7.10.1)
1 − e−T z−1
k 0 1 2 3 4 5
x(k) 1 1 1 1 1 1
y(k) 0 0.6321 1 1 1 1
EXERCISE 7.11
For a sampled data closed-loop system, the z-transform of the error sig-
nal is given as E(z) = z−1 + 0.6 z−2 + 0.2z−3. Derive the system output y(k)
for k = 0, 1, 2, 3, 4, 5 when the input is a ramp function.
Solution
We know that the error is defined as
Therefore,
EXERCISE 7.12
Consider the transfer function of an analog system, given as
G(s) = K/(s + b).
Solution
a. Applying the inverse Laplace transform at the given transfer
function, it yields
K
g(t) = ILT [G(s)] = ILT = Ke−bt (7.12.1)
s + b
z a0
G( z) = K = (7.12.2)
z − e−bT0 1 + b1z−1
z − 1 G(s) z − 1 K
Gzoh ( z) = Z = Z
z s z s(s + b)
K z −1 1 1
= Z −
b z s s + b
(7.12.4)
K z −1 z z
= −
b z z − 1 z − e−bT0
K 1 − e−bT0 a z −1
= −bT0
= 1 −1
b z−e 1 + b1z
where
z −1
y(∞) = lim
z →1 z
(7.12.6)
z −1 z z K
Y( z) = lim K =
z →1 z z − e−bT0 z − 1 1 − e−bT0
z −1 z −1
y(∞) = lim Y( z) = lim G( z)U( z)
z →1 z z →1 z
(7.12.7)
z − 1 K 1 − e−bT0 z K
= lim =
z →1 z b z − e−bT0 z − 1 b
The fixed value of the step response for the analog system is
K 1 K
y(∞) = lim sY (s) = lim s = (7.12.8)
s→ 0 z →1 s+b s b
Typically, using the above vi, any analog transfer function dis-
cretized with ZOH can be given, along with the desired sam-
pling period, while the corresponding discretized open- and
closed-loop transfer function can be calculated, and the system
step response can be designed.
EXERCISE 7.13
Consider a discrete control system with the transfer function G(s) = 2e−s/
(s + 1). Derive the transfer function G(z) when fs = 5 Hz and calculate the
first seven samples of the system step response.
R(s) Y(s)
+ ZOH G(s)
– T
Solution
Calculate with ZOH the transfer function 1/(s + 1).
The first seven samples of the step response are y(0:5) = 0, y(6) = 0.36,
y(7) = 0.82(0.36) + 0.36 = 0.655.
312 Digital Control Systems
EXERCISE 7.14
Consider a discrete control system with the transfer function G(s) =
10/(s + 2)(s + 3).
R(s) Y(s)
+ ZOH G(s)
– T = 0.1
Solution
1. The closed-loop transfer function is presented as
G( z)
Gcl ( z) = (7.14.1)
1 + G( z)
where
G(s) 10
G( z) = (1 − z−1 )Z = (1 − z−1 )Z =
s s( s + 2)( s + 3 )
z( Az + B)
= 10(1 − z−1 ) (7.14.2)
( z − 1)( z − e−0.2 )( z − e−0.3 )
0.042z + 0.036
⇒ G( z) =
( z − 0.819)( z − 0.741)
0.042z + 0.036
Y( z) = Gcl ( z)R( z) = R( z)
z 2 − 1.518 z + 0.643
0.042z−1 + 0.036 z−2
= R( z) ⇒
1 − 1.518 z−1 + 0.643 z−2
Y( z)(1 − 1.518 z−1 + 0.643 z−2 ) = (0.042z−1 + 0.036 z−2 )R( z) (7.14.4)
3. Steady-state response
Percentage of overshoot is
ts = k sT (7.14.9)
k s ≥ 14 (7.14.10)
Steady-state error
It holds that
− ln r − ln 0.8019
J= = = 0.5579 (7.14.15)
(ln r )2 + ϕ 2 (ln 0.8019)2 + 0.32852
1 1
ωn = (ln r )2 + ϕ 2 = (ln 0.8019)2 + 0.32852 = 0.3958 (7.14.16)
T 0.1
Thus
J π
POT = exp− 100%
1 − J 2
(7.14.17)
0.5579 ⋅ 3.14
= exp− 100% = 12.11%
1 − 0.55792
3 3
ts = = = 1.36 sec (7.14.18)
Jω n 0.5579 ⋅ 0.3958
EXERCISE 7.15
Consider the discrete system with pulse transfer function:
H(z) = (0.9 z − 0.8)/(z2 − 1.3z + 0.4). Design the system response for
input u(t) = sin (πt) using MATLAB for T = 0.2 s and verify theoretically
the results.
Solution
The MATLAB code is
T = 0.2; % Sampling period
w = pi; % Frequency of Sinusoidal signal in rad/s
t = 0:T:6; % Create vector from time samples
u = sin(w*t); % Define input
num = [0 0 1]; % Numerator of transfer function
den = [1 -0.5 0.5]; % Denominator of transfer function
G = tf(num,den,T); % Define the discrete LTI system
y = lsim(G,u,t); % Calculate the time response
Time and Harmonic Response Analysis Steady-State Errors 315
0.5
−0.5
−1
Input
Output
−1.5
0 1 2 3 4 5 6
From the input and output waveforms, we conclude that the out-
put is a sinusoidal signal with circular frequency equal to the circular
frequency of the input, yet with different amplitude and phase.
The input signal amplitude is obviously 1; the corresponding
output signal amplitude is approximately 1.3. the phase difference is
ϕ = ωtϕ −0.3π = −0.94 rad .
The above values can be verified in two ways.
0.9 z − 0.8
H ( z) = (7.15.1)
z 2 − 1.3 z + 0.4
Arg( H(e jωΤ )) = Arg(0.9 e jωΤ − 0.8) − Arg(e 2 jωΤ − 1.3e jωΤ + 0.4)
sin ωΤ sin 2ωΤ − 1.3 sin ωΤ
= tan−1 − tan−1
0.9 cos ωΤ − 0.8 cos 2ωΤ − 1.3 cos ωΤ + 0.4
(7.15.4) ⇒ Arg( H(e j 0.2π )) −0.94
(7.15.4)
EXERCISE 7.16
Consider the discrete system with pulse transfer function: H(z) = (0.9
z − 0.8)/(z2 − 1.3z + 0.4) Design the ramp response using MATLAB.
Solution
We calculate the ramp response in three different ways.
0.9 z − 0.8 z
H( z)R( z) = ⋅ (7.16.2)
z 2 − 1.3 z + 0.4 ( z − 1)2
% Define H(z)
H = tf([0.9 -0.8],conv([1 -0.8],[1 -0.5]),1);
% Define input function
k = [0:20];
u = k;
% Calculate ramp response with three different ways
y1 = u + 2 - (6+(2/3))*(0.8).^k + (4+(2/3))*(0.5).^k ;
y2 = lsim(H,u,k);
Y = tf([0.9 -0.8 0],conv(conv([1 -0.8],[1 -0.5]),
[1 -2 1]),1);
Time and Harmonic Response Analysis Steady-State Errors 317
y3 = impulse(Y,k);
% Plot the results
plot(k,y1,’-’,k,y1,’x’,k,y2,’-’,k,y2,’+’,k,y3,’-’,k,y3,’s’)
xlabel(’time k’)
ylabel(’y(k)’)
grid
legend({’’,’formula’,’’,’lsim’,’’,’impulse’},’Location’,
’SouthEast’)
25
20
15
Formula
y(k)
10
Lsim
Impulse
5
−5
0 2 4 6 8 10 12 14 16 18 20
Time k
Observe that there is a sharp matching of the response over the three
ways.
EXERCISE 7.17
Consider the system with transfer function: G(s) = 1/(s2) which is con-
trolled by a controller with the transfer function: GD(s) = (70 s + 140)/
(s + 10).
Discretize the system with the ZOH method for sampling period
T = 0.05 s and T = 0.025 s. Compare the step response of the closed-loop
analog and discretized system.
Solution
The MATLAB code is
num=conv(numG,numD);
den=conv(denG,denD);
[numcl,dencl]=feedback(num,den,1,1);
% Define the step response
tf=1;
t=0:.01:tf;
yc=step(numcl,dencl,t);
subplot(2,1,1)
plot(t,yc,’-’),grid
axis([0 1 0 1.5])
hold on
% Discretize the system for T=0.05 s.
Ws= 20; % Hz
T=1/Ws; T=0.05
[numGd,denGd]=c2dm(numG,denG,T,’zoh’);
% Define the digital controller
numDd=Ko*[1 -(1-a*T)];
denDd=[1 -(1-b*T)];
>> printsys(numDd,denDd,’z’)
% Define the closed-loop transfer function
numd=conv(numGd,numDd);
dend=conv(denGd,denDd);
[numcld,dencld]=feedback(numd,dend,1,1);
% Define the step response
N=tf*Ws;
yd=dstep(numcld,dencld,N);
td=0:T:(N-1)*T;
plot(td,yd,’*’)
plot(td,yd,’-’)
ylabel(’output y’)
title(’Continuous and digital response using zoh method’)
text(.25,.1,’*-----*-----* digital control’)
text(.25,.3,’------------- analog control’)
text(.35,.6,’ (a) 20 Hz’)
hold off
% Repeat the process for T=0.025 s.
Ws= 40; % Hz
T=1/Ws; %T=0.025
[numGd,denGd]=c2dm(numG,denG,T,’zoh’);
numDd=Ko*[1 -(1-a*T)];
denDd=[1 -(1-b*T)];
numd=conv(numGd,numDd);
dend=conv(denGd,denDd);
[numcld,dencld]=feedback(numd,dend,1,1);
N=tf*Ws;
subplot(2,1,2)
plot(t,yc,’-’),grid
hold on
yd=dstep(numcld,dencld,N);
td=0:T:(N-1)*T;
plot(td,yd,’*’)
plot(td,yd,’-’)
xlabel(’time (sec)’)
ylabel(’output y’)
text(.25,.1,’*-----*-----* digital control’)
text(.25,.3,’------------- analog control’)
Time and Harmonic Response Analysis Steady-State Errors 319
1
Output y
(a) 20 Hz
0.5
Analog control
Digital control
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1.5
1
Output y
(a) 40 Hz
0.5
Analog control
Digital control
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (s)
Observe that the step responses of the analog and discretized with
ZOH system more closely match each other as the sampling time
decreases.
EXERCISE 7.18
Illustrate the poles and zeros and design the step response of a system
with transfer function: G(z) = (1/(z2 − 0.3z + 0.5) using the software
platforms MATLAB and LabVIEW.
Solution
Illustration of poles and zeros
numDz = 1;
denDz = [1 -0.3 0.5];
sys = tf(numDz,denDz,1/20)
pzmap(sys)
axis([-1 1 -1 1])
zgrid on
while they are placed inside the unit circle, thus the system is
stable. The sampling period is T = 0.05 s.
1
0.5π/T
0.6π/T 0.4π/T
0 π/T
π/T
−0.2
0.9π/T 0.1π/T
−0.4
0.8π/T 0.2π/T
−0.6
0.6π/T 0.4π/T
−1 0.5π/T
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Pole–zero map
1.0
0.5 π/T
0.6 π/T 0.4 π/T
0.8
0.7 π/T 0.3 π/T
0.6
0.8 π/T 0.2 π/T
0.4
0.9 π/T 0.1 π/T
0.2
Imaginay axis
1.0 π/T
0.0 1.0
0.8
–0.2
0.6
–0.4 0.4
0.3
–0.6 0.2
–0.8 0.1
0.0
–1.0
–1.0 –0.8 –0.6 –0.4 –0.2 0.0 0.2 0.4 0.6 0.8 1.0
Real axis
Step response:
a. Using MATLAB, we have the following program that illys-
trates the step response
numDz = 1;
denDz = [1 -0.3 0.5];
sys = tf(numDz,denDz,1/20);
step(sys,2.5);
Step response
1.4
1.2
0.8
Amplitude
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5
Time (s)
322 Digital Control Systems
EXERCISE 7.19
Evaluate a second-order system with pulse transfer function
H(z) = (z2 − 0.3 z − 0.1)/(z2 − 0.55z + 0.595) and a system with two stages
connected in series with first-order transfer functions: H1(z) = (z + 0.2)/
(z − 0.7), H2(z) = (z − 0.5)/(z − 0.85) for a rectangular input signal of fre-
quency 0.2 Hz.
Solution
Using the LabVIEW Simulation Module, we analyze the system model by
presenting its block diagram as follows:
Time and Harmonic Response Analysis Steady-State Errors 323