0% found this document useful (0 votes)
7 views203 pages

Digital Control

The document provides an extensive overview of digital control systems, including their advantages over analog systems and the fundamental concepts of feedback and signal processing. It covers various topics such as z-transforms, transfer functions, state-space representation, stability analysis, and compensation methods, along with practical applications using simulation tools like MATLAB and Simulink. The text emphasizes the importance of converting continuous signals to discrete ones for digital processing and the role of controllers in achieving desired system performance.

Uploaded by

smsm17780
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views203 pages

Digital Control

The document provides an extensive overview of digital control systems, including their advantages over analog systems and the fundamental concepts of feedback and signal processing. It covers various topics such as z-transforms, transfer functions, state-space representation, stability analysis, and compensation methods, along with practical applications using simulation tools like MATLAB and Simulink. The text emphasizes the importance of converting continuous signals to discrete ones for digital processing and the role of controllers in achieving desired system performance.

Uploaded by

smsm17780
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 203

Contents

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

4. Transfer Function Discretization............................................................... 89


4.1 Introduction.......................................................................................... 89
4.2 Discretization Methods.......................................................................90
4.2.1 Impulse-Invariance Method or z-Transform Method........ 91
4.2.2 Step-Invariance Method or z-Transform Method
with Sample and Hold........................................................... 92
4.2.3 Backward Difference Method............................................... 94
4.2.4 Forward Difference Method................................................. 96
4.2.5 Bilinear or Tustin Method..................................................... 96
4.2.6 Frequency Prewarping Method............................................ 98
4.2.7 Matched Pole–Zero Method.................................................. 99
4.3 Comparison of Discretization Methods......................................... 101
4.4 Formulas.............................................................................................. 102
4.5 Solved Exercises................................................................................. 104

5. State-Space Representation....................................................................... 159


5.1 Introduction........................................................................................ 159
5.2 Discrete-Time State-Space Equations.............................................. 160
5.2.1 Eigenvalues and Eigenvectors............................................. 161
5.3 Solution of State Equations............................................................... 161
5.4 State-Space Representation............................................................... 162
5.4.1 Direct Form............................................................................ 162
5.4.2 Canonical Form..................................................................... 164
5.4.3 Controllable Canonical Form.............................................. 165
5.4.4 Observable Canonical Form................................................ 167
5.4.5 Jordan Canonical Form........................................................ 168
5.5 Controllability and Observability................................................... 169
5.6 State-Space Discretization................................................................ 171
5.6.1 Discretization of Continuous-Time Systems in the
State Space with Numerical Integration Methods........... 171
5.6.2 Discretization of Continuous Time Systems in
State-Space with Numerical Differentiation Methods..... 173
5.6.3 Discretization with the Zero-Order Hold Method.......... 174
5.6.4 Discretization with the First-Order Hold Method........... 174
5.7 Formula Tables................................................................................... 175
5.8 Solved Exercises................................................................................. 175

6. Stability of Digital Control Systems....................................................... 217


6.1 Stability................................................................................................ 217
6.2 Unit-Circle Criterion.......................................................................... 219
6.3 Routh Criterion Using the Bilinear Mobius Transformation....... 219
6.4 Jury Criterion (Eliahu I. Jury 1955).................................................. 221
6.5 Root Locus Method............................................................................ 221
6.5.1 Rules for Approximate Establishment of Root Locus.....222
6.6 Nyquist Stability Criterion................................................................ 224
Contents ix

6.7 Bode Stability Criterion (H.W. Bode—1930)................................... 226


6.8 Formula Table..................................................................................... 227
6.9 Solved Exercises................................................................................. 229

7. Time and Harmonic Response Analysis Steady-State Errors............ 275


7.1 Time Response.................................................................................... 275
7.1.1 Impulse Time Response of First-Order Systems.............. 276
7.1.2 Impulse Time Response of Second-Order Systems......... 277
7.1.3 Step Response of First-Order System................................. 278
7.1.4 General Form for the Step Response of Discrete
Time System........................................................................... 278
7.1.5 Correlation between Analog and Discrete Time
Response................................................................................ 281
7.2 Steady-State Errors............................................................................. 283
7.3 Harmonic Response of Discrete Systems....................................... 287
7.4 Formula Tables................................................................................... 288
7.5 Solved Exercises................................................................................. 290

8. Compensation of Digital Control Systems............................................ 325


8.1 Introduction........................................................................................ 325
8.2 Indirect Design Methods.................................................................. 326
8.2.1 Selection of Sampling Rate.................................................. 328
8.3 Direct Design Methods..................................................................... 330
8.3.1 Design via Analytical Methods.......................................... 330
8.3.2 Design Using the Root Locus Method
of the Characteristic Equation............................................. 331
8.3.3 Design in the Frequency Domain...................................... 332
8.4 PID Digital Controller....................................................................... 333
8.4.1 Digital PID Controller Tuning............................................ 336
8.5 Deadbeat Digital Controller............................................................. 338
8.6 Phase Lead/Lag Digital Compensators.......................................... 338
8.7 Formula Table..................................................................................... 339
8.8 Solved Exercises.................................................................................340

9. Simulation Tools: MATLAB, Simulink, LabVIEW,


Comprehensive Control............................................................................. 399
9.1 Introduction........................................................................................ 399
9.2 Control Systems Simulation Using MATLAB................................ 399
9.2.1 Analysis and System Modeling..........................................400
9.2.2 Control Systems Design.......................................................400
9.2.3 Simulation of Digital Control Systems
Using MATLAB.....................................................................400
9.3 Simulink.............................................................................................. 406
9.3.1 Introduction........................................................................... 406
9.3.2 Model Creation...................................................................... 407
9.4 LabVIEW............................................................................................. 411
1
Introduction

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

The continuous-time control systems, also called continuous data-flow


systems or analog systems, include elements that only produce or pro-
cess signals in continuous time. The discrete-time control systems, also
called ­discrete data-flow control systems or sample-data systems or digital sys-
tems, include ­components which produce or process discrete signals to one
or more parts of the system. Systems which process or produce discrete
­signals in some parts and continuous signals to the others are called mixed
or hybrid.
By definition, computers are digital systems. Hence, all input data streams
are in a digital form, that is, digital signals. Yet, various signals in the natu-
ral world are continuous time (e.g., position and temperature). Thus, they
must be transformed to digital signals prior to being processed by computer
­systems. To convert an analog signal to a discrete one, the fundamental
­sampling mode-of-operation is required.

1.2 Description of Analog and Digital Control Systems


When speaking of automatic control we basically refer to closed-loop sys-
tems. The latter systems include steps, such as the physical system we wish
to control; feedback and gain levels; and of course the controller itself, which
is selected depending on the form of the underlying physical system. In an
era where almost everything works under the guidance and supervision of
the computer, the realization of the automatic control problem with discrete
(or digital) manner is quite important.
It is known that the analog automatic control is very crucial, not only
because it is used in many scientific fields, but also because many digital
controllers implement analog control algorithms.
The basic form of the operating diagram (block diagram) of an analog
closed-loop control system with a single input and a single output is shown in
Figures 1.1 and 1.2 (where the PID controller’s structure is presented in detail).
The process (or procedure or controlled system—plant) is the system or
subsystem, which is controlled by the closed-loop system.
The reference input is an external signal applied to the closed-loop system,
whereas it stands as a trigger for a specific behavior of the controlled system.
Usually, it represents the ideal or desired output of the system.
The controller (or regulator) is the element which generates the control sig-
nal, which is input signal to the controlled system. The implementation of
the analog regulator requires a system which usually consists of several
components and devices.
The feedback signal is a related function of the controlled output.
It is ­algebraically added to the reference signal in order to provide the error
signal, which activates the control system.
Introduction 3

Comparator

r(t) + e(t) u(t) y(t)


Controller Controlled
Desired Controlled deviation system
– Controlled output
reference input

Counter

Feedback process

FIGURE 1.1
Analog automatic control system.

Analog controllers and, generally, continuous-time systems are described


by the Laplace transform or by differential equations and are correspond-
ingly processed to produce continuous-time signals. Digital controllers
and, in general, discrete-time systems are described by the Z-transform or
by ­ differential equations. The problem of developing digital controllers is
­substantially related to the construction of a PC program.
In the case we wish to use a computer for the automatic control of a
­process, then the analog controller should be replaced with a digital one and
the ­calculation of the error signal and the dynamic response of the analog
can be implemented via the digital one, as shown in Figures 1.3 and 1.4.
The resulting system is a mixed sampled-data system, which includes both
continuous- and discrete-time signals.
As shown in Figure 1.3, the control system is a hybrid system that exhibits
both continuous and discrete dynamic behavior, where its main digital part
is the controller, part of which is the computer.

ep(t)
fp

w(t) e(t) ei(t) u(t) y(t)


κ Σ ∫ fi Σ Process

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

To ensure communication compatibility between the controlled contin-


uous-time system and discrete controller it is necessary to connect them
through elements, which achieve the conversion of digital signals to ana-
log and vice versa. These elements are the interface between the system and
the computer and are called, respectively, digital to analog converter (DAC)
and analog to digital converter (ADC). The A/D converter essentially oper-
ates as a sampler. The D/A converter is able to transform a signal from the
­discrete-time to the continuous-time domain and is implemented with the
aid of a restraint system.
The sampling process and the process of converting analog signals into
discrete ones, and vice versa, plays quite an important role for the control-
ler’s performance.
Sampling process: Sampling a continuous-time signal replaces the origi-
nal continuous signal from a sequence of values to discrete-time points.
The sampling is used when a control system includes a digital controller,
since sampling and quantization is necessary to input data in such a con-
troller. Moreover, a sampling procedure appears whenever necessary control
measurements are generated in an intermittent manner. For instance, in a
radar tracking system, where the radar antenna scans a certain area around
­azimuth and elevation, corresponding information is taken once for each
rotation/cycle of the antenna. Thus, the radar scan mode produces sampled
data. In another example, a sampling procedure is necessary every time a
controller or large-scale computer is shared at several time points in order to
save cost. Then, a control signal is sent to each module only periodically and
the signal is therefore converted to a sampled-data signal.
The sampling or discretization procedure is usually followed by a
­quantization process. During the quantization process, the sampled analog
­amplitude is replaced by a corresponding digital amplitude (i.e., binary
number). Afterward, the digital signal is processed by the computer.
The ­computer’s output is sampled and fed to a hold circuit. The hold circuit
­output is a continuous-time signal and is fed to the actuator.

1.3 Advantages of Digital Control Systems and Applications


Computer-assisted control produces significant advantages as compared
to conventional typical analog regulators. Some of these advantages are

• Great flexibility in modifying the controller’s features. Indeed, these


features can easily be altered by modifying the program. In contrast,
in analog control systems, changing the controller characteristics is
usually a nontrivial task and quite expensive because a substitution
of elements and devices is required.
6 Digital Control Systems

• Data processing is easy. Complex calculations can be performed


­easily and quickly. Analog controllers do not have this capability.
• They present better technical behavior in comparison to the analog
control systems in terms of reliability and sensitivity to disturbances.
• They have an improved stability, a lower physical weight and, in
many cases, a lower implementation cost.

Nevertheless, computer-assisted control presents some disadvantages


­compared to analog control systems such as

• The errors introduced during both the sampling process of continu-


ous systems and the quantization of discrete-time signals.
• The difficulty in the digital control system design, particularly if the
process is complicated. In the digital control of a complex process,
the designer must have a good knowledge of the process to be con-
trolled and should be able to obtain its corresponding mathemati-
cal model. This mathematical model can be obtained in the form
of differential equations or difference equations or in some other
form. The designer must be familiar with the measurement technol-
ogy related to the process output and other variables involved in the
process. Also, the designer must have a relatively good knowledge
of computer systems and modern control theory. In this regard, a
good knowledge of simulation techniques is useful.

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.

2.2 From Laplace Transform to z-Transform


The z-transform greatly facilitates the study and design of nonlinear time-
varying discrete-time systems, because it transforms the difference equation
that describes the system into an algebraic equation.
In Figure 2.1, the procedure followed by using z-transform, where there are
three steps to resolve the differential equation (D.E.) and the direct solution
of the given D.E. via higher mathematics, which is much more laborious, are
given.
To show that z- and Laplace transforms are two parallel techniques, the
Laplace transform, which is already known, will be used, and capitalizing
on it, the mathematical expression of z-transform will be developed.

7
8 Digital Control Systems

Difference equation Algebraic equation


z
(n-domain) (z-domain)

Solution of difference Solution of algebraic


equation z–1 equation
(n-domain) (z-domain)

FIGURE 2.1
Solution of D.E. using z-transform.

The Laplace transform is an integral-based transform that connects the


temporal representation of the signal—that is x(t)—with its representation in
the s domain, namely, X(s).
The Laplace transform is defined as X(s) = ∫ +∞ t =−∞ x(t ) ⋅ e
−st
dt, where s is a
complex number.
By substituting s = σ + jω one is able to reach an alternative form of X(s)
function, which is X(σ , ω ) = ∫ +∞t =−∞ x(t ) ⋅ e
−σt
⋅ e− jωt dt. Inserting in the latter
expression e −jωt = cos(ωt) − j sin(ωt) we have that

+∞

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)

Step 3: The substitution z = r · ejω is performed, therefore the standard form


of z-transform arises.

X( z) = ∑ x[n] ⋅ z
−∞
−n
(2.6)

The z-transform (Equation 2.6) is a valuable tool for analyzing discrete


­linear time-invariant (LTI) systems. It provides capabilities for

• Efficient calculation for the response of a LTI system (the convolution


in the discrete-time domain) y(n) = x(n)h(n) is computed as a prod-
uct in the z-transform domain: Y(z) = X(z)H(z), so y(n) = ΙΖΤ(Y(z)).
• Stability analysis of a LTI system (via calculation of the region of
convergence).
• Description of LTI with regard to its behavior in the frequency
domain (low pass filter, band pass filter, etc.).

2.2.1 Comparison of s- and z-Planes in the Region of Convergence


The main differences between s- and z-planes are presented in Figure 2.2.
The points of s-plane are described by two parameters: σ parameter cor-
responds to the real axis that determines the exponential rate of reduction,

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

while ω parameter corresponds to the imaginary axis, which determines the


oscillation frequency. Both parameters are arranged in a rectangular array
on the s-plane.
The resulting geometry arises from the fact that for each s number, its posi-
tion is determined by the relation:

s = σ + jω.

z-plane is polar-based. Each complex number (z) is determined by its dis-


tance (r) from the origin, corresponding to the exponential rate of reduction
(recall the expression X(r, ω)), and ω parameter corresponds to the angle of r,
across the positive horizontal semi-axis. The polar arrangement of z arises
from the relation z = r · ejω or z = rejω = r(cos ω + j sin ω).
As a consequence of the above differences, vertical lines in s-plane become
circles in z-plane. This is due to the fact that σ = ln r, which has previously
been implemented. For instance, the imaginary axis of s-plane, that is, the
line formed by setting σ = 0, will reflect to a circle of radius r = 1 into the
z-plane. Indeed, the relation σ = 0 corresponds to 0 = ln r in z-plane and,
hence, r = 1.
Lines parallel to the imaginary axis located in the left half-plane (σ < 0)
correspond to concentric circles which are located within the unit circle
in the z-plane. A similar behavior is realized in lines located in the right
s-half-plane.
For example, a causal continuous-time system is stable if its poles are in the
left s-half-plane. Correspondingly, a causal discrete-time system is stable if
its poles are located inside the unit circle.

2.3 z-Transform Properties


The properties of the z-transform have a very similar meaning to the prop-
erties of the Laplace transform. The most important properties of the z-­
transform, commonly used for problem solving, are presented below.

2.3.1 Time Shift


If X(z) denotes the z-transform of x[n] function, then the corresponding
transform of x[n−N] is given by z−NX(z). The time shift operation adds or
subtracts the axes’ origin or infinity from the region of convergence of X(z).

If… Then…

x[n] ↔ X( z) x[n − N ] ↔ z−N X( z)


12 Digital Control Systems

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)

2.3.3 Time Reverse


If the z-transform of the x[n] function is X(z), with region of convergence Π,
then the transform of x[−n] is X(1/z) with region of convergence 1/Π.

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…

x[n] ↔ X(z) x1[n] * x2[n] ↔ X1(z)X2(z)

2.3.5 Differentiation in z-Domain


Let X(z) be the transform of x[n] function with region of convergence Π.
Then, nx[n] ↔ −z(dX(z)/dz) with the same region of convergence.

If… Then…

x[n] ↔ X(z) nx[n] ↔ −z(dX(z)/dz)

2.3.6 Initial and Final Value Theorem


If x[n] = 0 and n < 0, then x[0] = lim X( z) (I.V.T.)
z →∞
For causal stable systems, it holds that:

x[∞] = lim x[n] = lim ( z − 1) X( z) (F.V.T.)


n→∞ z→1
z-Transform 13

If… Then…

x[n]↔X(z) x[0] = lim X( z)


z→∞
x[n] ↔ X( z) x[∞] = lim x[n] = lim ( z − 1)X( z)
n→∞ z→1

2.4 Inverse z-Transform


The implementation of z-transform results in the transportation from the
discrete-time domain to z-domain. The opposite procedure is implemented
with the aid of the inverse z-transform.
The inverse z-transform is defined by

1
x[n] = Z−1 [ X( z)] =
2π j ∫ X(z)z
c
n−1
dz (2.7)

where c is a closed contour within the region of convergence of F(z) which


includes the intersection of real and imaginary axes of z-complex plane.
Due to the fact that the calculation of the involved integral is quite cumber-
some, usually the calculation is made in the form of tables, which provide the
timing functions of basic complex functions. In general, these tables cover
only some cases, thus some other methods can be used for calculating the
inverse z-transform.
There are three methods for calculating the inverse transform of a
function X(z)

1. Method of power series expansion


2. Method of partial fraction expansion
3. Method of complex integration (via the residue theorem)

2.4.1 Division Method


Using this method, certain samples of the inverse z-transform are calculated;
a corresponding analytical expression is not provided.
Dividing the numerator by the denominator of the X(z) function, X(z) takes
a series formation in terms of z.

2.4.2 Method of Partial Fraction Expansion


Partial fractions expansion is particularly useful method for the analysis and
design of systems, because the impact of any characteristic root or e­ igenvalue
becomes straightforward.
14 Digital Control Systems

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.

• Case of distinct real poles: In this case, X(z)/z is expanded in a


­fractional sum series as follows:

X( z) B( z) c1 cn (2.8)
= = ++
z ( z − p1 )( z − pn ) ( z − p1 ) ( z − pn )

• The ci coefficients are computed using the Heaviside formula


(Heaviside formula—Oct. 1931) for distinct poles, hence,

 B( z) 
ci = lim ( z − pi )  (2.9)
z → pi  ( z − p1 )( z − p2 )...( z − pn ) 


• Case of nondistinct real poles (poles with multiplication factor n—multiple


real poles): In this case, X(z)/z is expanded in a fractional sum series
as follows:
X( z) B( z) c11 c12
= = + +
z ( z − p1 )n ( z − pn ) ( z − p1 ) ( z − p1 )2
c1n c2 cn (2.10)
+ +
( z − p1 )n ( z − p2 ) ( z − pn )

• The ci coefficients are computed using the Heaviside formula for


multiple poles, hence,

1  d( n− j ) n X( z) 

cij = lim  ( n− j ) ( z − pi )  (2.11)
(n − j)! z→ pi  dz z 

• The remaining coefficients are computed via Equation 2.9.


• Case of complex roots: In this case, the coefficient of the numerator
for one of the complex roots is computed via Equation 2.9 or 2.11.
Therefore, the coefficient in the numerator of the term which has
the conjugate root of the former at the denominator becomes its cor-
responding conjugate.

2.4.3 Method of Complex Integration


This method is quite general and is used when one or more partial fractions
of the expanded F(z) are not included into the lookup tables of z-transform.
z-Transform 15

This method relies on the definition formula of the inverse z-transform.


The utilization of Equation 2.7 requires the use of the residue theorem,
which is given by

∫ 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

f [n] = ∑ residues[F(z)z n−1


] (2.13)

• If there is a simple first-order pole of F(z) · zn−1 (i.e., z = α), then its
residual is given by

F( z)z n−1( z − α ) (2.14)


z =α

• If there is an m-order pole of F(z)zn−1, 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 =α

2.5 Formula Tables


Tables 2.1 and 2.2.

2.6 Solved Exercises

EXERCISE 2.1

1 when n≥0


Compute the z-transform of unit-step function u[n] =  .
0 when n<0

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

9 (n+1)anu[n]  z 2 |z| > |a|


 
 z − a 

10 (cos Ωn)u[n] z 2 (cos Ω)z


|z| > 1
z 2 − (2 cos Ω)z + 1

11 (sin Ωn)u[n] (sin Ω)z


|z| > 1
z 2 − (2 cos Ω)z + 1

12 (rn cos Ωn)u[n] z 2 − (r cos Ω)z |z| > r


z − (2r cos Ω)z + r 2
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)

Unit-step function affects the limits of summation.


The sequence ∑ +∞ −1 n
n= 0 ( z ) is the infinite sum series of a decreasing geo-
metric progression with first term 1 and ratio z−1.
Consequently, it must hold that |z| < 1 or |z| > 1
The condition |z| > 1 defines the region of convergence of the transform,
that is, the set of values of the complex z-plane for which the sum of
z-transform converges.
z-Transform 17

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 

4 Multiplication with e jΩn e jΩn x[n] X(e− jΩ z) R′ = R

 1 1
5 Time reverse x[−n] X   R ’=
 z  R

6 Multiplication with n nx[n] dX( z)


−z R ’= R
dz
n
1
7 Sum
∑ x[n]
k=−∞
1 − z −1
X( z) R ’ ⊃ R ∩ { z > 1}

8 Convolution x1 [n] * x2 [n] X1 ( z ) ⋅ X 2 ( z ) R ’⊃ R1 ∩ R2

9 Initial value If x[n] = 0 when n < 0, then x[0] = lim X( z)


z→∞

10 Final value For stable systems lim x[n] = lim ( z − 1)X( z)


n→∞ z→1

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 above transform applies only when

|a| · |z−1| < 1 or |a| < |z| or |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

x[n] =   u[n] y[n] =  


 6   6 

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

z The region of convergence of X(z) is


X( z) = z6
5 |z| > 5/6 and includes infinity. The region Y( z) =
z− 5
5 z−
6 of convergence of Y(z) is z > and does 6
not include infinity. 6
5
Pole: z = . 5
6 Poles: z = and z = ∞ .
6
Causal, right defined.
Noncausal, right defined.
19
20 Digital Control Systems

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)

The sum ∑ nn==−∞


2
(5/4 z−1 )n is written as ∑ nn==−∞
2
( 5 / 4 z −1 ) n

5 −k 5 −2  5 −1  5 0  5 1  5 2


= … +  z−1  + … z−1  +  z−1  +  z−1  +  z−1  +  z−1 
 4   4   4   4   4   4 
(2.5.3)

An elegant way to build in the relation given by the sum of infinite


terms of a decreasing geometric progression is to set (5/4z−1) = Λ.
n n−3
z-Transform

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 .

Re-expressing the sum series in an ascending order with respect to the


exponent n, it holds that ∑ nn=∞ n
=−2 Λ = Λ
−2
+ Λ−1 + Λ0 + Λ1 + Λ 2 +…+ Λ k +…,
which is the infinite sum series of a geometric progression with first
term Λ−2 = ((5/4)z−1)−2 and ratio Λ = (4/5)z.
In order to become a decreasing geometric progression, it should hold
that |Λ| < 1 or |(4/5)z| < 1 or |z| < 5/4.
Substituting into a1/(1 − Λ), which provides the infinite sum series of a
decreasing geometric progression, it stems that

 5 −1 2  5 −1 2  5 −1 2


 z   z   z 
a1  4   4  5  4   5 3 z−2
= =− =− = −  (2.5.4)
1− Λ 4
1− z
4
z −1 4 z− 5  4  z − 5
5 5 4 4 

Substituting in Equation 2.5.2, Y(z) is computed as

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

Based on transform (6), we have −2nu[−n − 1] ↔ z/(z−2).


From the property of linearity, if y[n] ↔ Y(z) then ay[n] ↔ aY(z) hence
x2[n] = 2nu[−n − 1] ↔ −z/(z − 2) with region of convergence |z| < 2.
Consequently,

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

Based on the property n · x[n] → −z(dX(z)/dz), it holds that

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

Capitalizing on the differentiation property

 1 n−2 d  1 z−1  z −z−2 ( z − 21 ) − z−1


n   u[n − 2] ↔ −z  1
=−
 2  dz  4 z − 2  4 ( z − 12 )2

or

 1 n−2 z −z−1 + 12 z−2 − z−1


n   u[n − 2] ↔ − ⋅
 2  4 ( z − 12 )2

where after some manipulations:

 1 n−2 z−2 1 − 14 z−1


n   u[n − 2] ↔ ⋅
 2  2 (1 − 14 z−1 )2

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 − β)

From the final value theorem

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

  By the polynomial division of numerator and denominator of


X1(z), it holds that

4z 2z 2 − 2z + 1

− 4 z + 4 − 2 z −1 2z−1 + 2z−2 + z−3 +

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

x1[n] = {0, 2, 2, 1,...} (2.11.2)


b. For X2(z), we provide another method for a polynomial division

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)

The residue of the simple pole z = β is

z 2 z n−1 z n +1 β n +1
= = (2.12.2)
( z − α )2 z= β
( z − α )2 z= β
( β − α )2

The residue of the double pole z = α is

d  z 2 n−1  [n + 1]z n ( z − β) − z n+1 n + 1](α − β) − α


[n
 z  = = αn
dz  z − β  ( z − β)2 z =α
(α − β)2
z =α

(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

  So, f(k) becomes

f (k ) = Z−1[F( z)] = (5δ (k ) − 19(−0.4)k + 15(−0.5)k )u(k ) (2.13.5)

b. Computation of f(k) using the method of complex integration.

f (k ) = Z−1  F ( z) = ∑ residuesF (z) z k −1


( z 2 + z + 1)z k −1
f (k ) = ∑ residues (z + 0.4)(z + 0.5) (2.13.6)
z-Transform 29

  For k = 0, we have the poles: z = 0, z = −0.4, z = −0.5

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:

f (k ) = (5δ(k ) + 19(−0.4)k + 15(−0.5)k )u(k ) (2.13.10)

EXERCISE 2.14
A discrete-time system has a transfer function:

4z2
H ( z) = 2
z − 41

a. Calculate the output y(n), if the input is the unit-function


x(n) = n.
b. Verify the above result, by deriving the first four output values
with the aid of the infinite division method.

Solution
a. Calculation of y(n).

y(n) = z−1 {Y( z)} = z−1 {H( z)X( z)} ⇒


 


−1   4z2 z 
y ( n) = z  ⋅  (2.14.1)
 2 1 ( z − 1)2 

 z − 

 4 

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

By using the inverse z-transform, the output y(n) of the system is


computed.

  1 n 4  1 n 32 16 

y(n) =  4   − −  − + n u(n) (2.14.5)
  4  9  2  9 3 

b. Verification with the infinite division method

4z3 4z3 (2.14.6)


Y( z) = =
 2 1  3 1 1
 z −  ⋅ ( z − 1)2 z 4 − 2z 3 + z 2 + z −
 4 
 4 2 4

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 ⇓

13z-8 - 3z-1 + 2z - 2 y(0) = 0, y(1) = 4


39 −1 13 −2 13 −3 y(2) = 8, y(3) = 13
−13z + 26 − z − z + z
4 2 4

From the expression (2.14.5), for n = 0, 1, 2, 3, exactly the same values


can be obtained.
(2.14.5)⇒ n=0→ y(0)=0
n=1→ y(1)=4
n=2→ y(2)=8
n=3→ y(3)=13
z-Transform 31

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 )

b. A-solution method: Partial fraction expansion

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 )

   B-solution method: Complex integration

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)

   Using the complex integration method, we get

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 
 

 2(k + 2)z k +1 + kz k −1 ( z − 1) − (2z k + 2 + z k ) 


( ) 
lim  =
z→ 2  ( z − 1)2 
 

(2(k + 2)2k +1 + k 2k−1 ) − (2 ⋅ 2k +2 + 2k ) =


1

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
− 1e − e 
3 3
  

−0.5 + j0.866 + 0.5 + j0.866 + 2 2 + j1.732


π
= π
=
π j3 j
(0.5 + j0.866 − 1) 2 j sin e (−0.5 + j0.866) 2 j0.866e 3
3
∠ 40.9°
2.645
∠ 60° ∠120° ∠ 90°
= 1.53∠−229.1°
1 1 1 1.732

k 3 = k 4 = 1.53∠ 229.1° (2.15.16)

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

  Subsequently, another calculation method for A, B, and C is


provided.

( z + 1) 2
A= = = 3.56 (2.15.20)
( z − 0.25)2 z =1
(0.75)2

  To derive B, we proceed to a multiplication with (z−0.25)2

( z + 1) A
= ( z − 0.25)2 + B + C( z − 0.25)
( z − 1) z − 1

  Therefore, at z = 0.25, we have

( 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,

( z + 1) 3.56 z −1.67 z −3.56 z


F( z) = = + + (2.15.23)
( z − 1)( z − 0.25)2 z − 1 ( z − 0.25)2 ( z − 0.25)

  The second term can be written as

z −1.67 0.25z 0.25z


−1.67 2
= = −6.68
(z − 0.25) 0.25 ( z − 0.25)2 (z − 0.25)
2

  Thus,

f (k ) =  3.56 − 6.68 ⋅ k (0.25) − 3.56 (0.25)  u(k )


k k
(2.15.24)
 
z-Transform 35

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

The ki coefficients are calculated by using Heaviside’s formula.

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 ku(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

A( z) = z 3 − z 2 − z − 2 = ( z − 2)( z + 0.5 + j0.866)( z + 0.5 − j0.866) (2.17.1)

So, X(z)/z is analyzed into a partial fraction expansion, such that

X( z) c0 c1 c1 c
= + + + 3 (2.17.2)
z z z + 0.5 + j0.866 z + 0.5 − j0.866 z − 2

The ci coefficients are calculated by using Heaviside’s formula.

 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



Replacing the corresponding values of Equation 2.17.3 , X(z) is calcu-


lated and by using the inverse z-transform, x[n] is obtained.

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

x[n] = c0δ[n] + c1 (−0.5 − j0.866)n u[n] + c1 (−0.5 + j0.866)n u[n] + c3 2n u[n]


(2.17.5)

Based on Equation 2.17.6 and substituting in Equation 2.17.5, we arrive


at x[n].

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

x[n] = c0δ[n] + c1 (−0.5 − j0.866)n u[n] + c1 (−0.5 + j0.866)n u[n] + c3 2n u[n]


= c0δ[n] + 2 c1 p1 cos(∠p1n + ∠c1 ) + c3 (2)n u[n]
 4π 
= −0.5δ[n] + 0.874 cos  n + 0.19 + 0.643(2)n u[n] (2.17.7)
 3 

The above result can be also be verified with the aid of MATLAB®, by
implementing the following code:
num = [1 0 0 1];
den = [1 −1 −1 −2 0];
[r, p] = residue(num, den)
r = p =
0.6429 2.0000
0.4286 – 0.825i −0.5000 + 0.8660i
0.4286 + 0.825i −0.5000 – 0.8660i
−0.5000 0

The first 20 output samples are calculated by:


num = [1 0 0 1];
den = [1 −1 −1 −2 0];
x = filter(num, den, [1 zeros(1,19)]);

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

2z−2 + 8z−3 + 22z−4 + 52z−5 + 114z−6 +⋯


Z - 4z2 + 5z−2|2z
3

2z−8 + 10z−1 - 4z−2


8 - 10z−1 + 04z−2
8 - 32z−1 + 40z−2 - 16z−3
22z−1 - 36z−2 + 016z−3
22z−1 - 88z−2 + 110z−3 - 44z−4
52z−2 - 094z−3 + 044z−4
52z−2 - 208z−3 + 260z−4 - 104z−5
114z−3 - 216z−4 + 104z−5
  Hence,

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

  The first 7 samples of f(n) are

n 0 1 2 3 4 5 6 …
f(n) 0 0 2 8 22 52 114 …

b. Using the partial fraction expansion

2z kz kz k3 z (2.18.2)
F( z ) = = 1 + 2 +
( z − 2)( z − 1)2 z − 2 z − 1 ( z − 1)2

Another way to calculate k1 is obtained by multiplying both


parts of the equation with (z−2), dividing with z, and setting
z→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

a. H(z) = (z − 1)(z + 0.8)/(z + 0.5)(z + 0.2),


b. H(z) = (z2 − 1)(z + 0.8)/(z − 0.5)2(z + 0.2)

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.

y[k + 2] − 0.3 y[k + 1] + 0.02 y[k ] = (0.01)(0.3)k u[k ]


40 Digital Control Systems

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,

y[k ] = (0.5(0.1)k − (0.2)k + 0.5(0.3)k )u[k ] (2.20.5)

We further elaborate on the solution. From the given difference


­equation, the first nonzero terms are

k = 0: y[2] − 0.3y[1] + 0.02y[0] = (0.01) and y[2] = 0.001


k = 1 y[3] − 0.3(0.01) = (0.01)(0.3) and y[3] = 0.006

From the analytical solution of expression (2.20.5), we have that

y[0] = (0.5 − 1 + 0.5) = 0


y[1] = (0.5(0.1) − (0.2) + 0.5(0.3)) = (0.05 − 2 + 0.15) = 0
y[2] = (0.5(0.01) − (0.04) − 0.5(0.09))
= 0.005 − 0.04 + 0.045 = 0.001
y[3] = (0.5(0.1)3 − (0.2)3 + 0.5(0.3)3 )
= 0.0005 − 0.008 + 0.0135 = 0.006
z-Transform 41

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

Z[ y(k + 2) − 5 y(k + 1) + 6 y(k )] = 0 ⇒


z 2Y( z) − z 2 y(0) − zy(1) − 5( z ⋅ Y( z) − z ⋅ y(0)) + 6Y( z) = 0 ⇒
z 2Y( z) − 2z − 5zY( z) + 6Y( z) = 0 ⇒
2z
Y( z)( z 2 − 5z + 6) = 2z ⇒ Y( z) = (2.21.1)
z 2 − 5z + 6

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

y(k ) = IZT [Y( z)] = (−2(2)k + 2(3)k ) u(k ) (2.21.5)

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

Y( z) (12z + 1)( z − 1) + 5 K1 K K (2.22.1)


= = + 2 + 3
z ( z + 2)( z + 3)( z − 1) z + 2 z + 3 z − 1

We calculate the corresponding numerators as

(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

Substituting the values of Kι into Y(z)/z, we multiply with z, hence,

64/3 z 135/4 z 5/12z


Y( z) = + + (2.22.3)
z+2 z+3 z −1

By using the inverse z-transform, we get

 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

−( a1 y[−1] + a2 y[−2])z 2 − a2 y[−1]z b z 2 + b1z


Y( z) = 2
+ 20 X( z)
z + a1z + a2 z + a1z + a2
−((1.5)(2) + (0.5)(1))z 2 − (0.5)(2)z z2 − z  z 
= +  
z 2 + 1.5z + 0.5 z 2 + 1.5z + 0.5  z − 1 
−3.5z 2 − z z2
= 2
+ 2 (2.23.1)
 z + 1.5z + 0.5 z + 1.5z + 0.5

Equation (2.23.1) can be further simplified to

−2.5z 2 − z 0.5z 3z
Y( z) = 2
= − (2.23.2)
z + 1.5z + 0.5 z + 0.5 z + 1

The inverse z-transform gives

y[n] = 0.5(−0.5)n − 3(−1)n , n = 0, 1, 2,… (2.23.3)

The corresponding MATLAB code, which calculates and depicts the


system’s response is

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)

To verify the above result, we calculate the inverse z-transform of 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.

Discrete-Time Domain z-Domain Commands Result


x(n) X( z) syms n z a w
δ(n) 1 f=dirac(n); ans =
ztrans(f,z) dirac(0)
% δ(0) = 1
u(n) z f=heaviside(n) ans =
( z −1) ztrans(f,z) z/(z-1)
n ⋅ u(n) z ztrans(n,z) ans =
( z −1)2 z/(z-1)^2
a n u(n) z F=z/(z-a); f=
z−a f=iztrans(F,n) a^n
n a n u(n) az f=n*a^n; ans =
( z − a )2 ztrans(f,z) z*a/(-z+a)^2
cos(ω0 n)u(n) z 2 − z cos(ω0 ) f=cos(w*n) ans =
2
z − 2z cos(ω0 ) + 1 ztrans(f,z) (-z+cos(w))*z/
(-z^2+2*z*cos(w)-1)
sin(ω0 n)u(n) z sin(ω0 ) f=sin(a*n); ans =
z 2 − 2z cos(ω0 ) + 1 ztrans(f,z) z*sin(a)/
(z^2-2*z*cos(a)+1)
a n cos(ω0 n)u(n) z 2 − a z cos(ω0 ) f=(a^n)*cos(a*n) ans =
z − 2a z cos(ω0 ) + a 2
2 ztrans(f,z) -(-z+cos(a)*a)*z/
simplify(ans) (z^2-2*z*
cos(a)*a+a^2)
a n sin(ω0 n)u(n) az sin(ω0 ) f=(a^n)*sin(a*n); ans =
z 2 − 2az cos(ω0 ) + a 2 ztrans(f,z) z*sin(a)*a/(z^2-2*z*
simplify(ans) cos(a)*a+a^2)

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

% Calculation of denominator’s roots


>> A=[1 0 -3 2];
>> riz=roots(A)
riz = -2.0000 1.0000 1.0000

Observe the existence of a double root at point 1.0000


X(z) can be expressed as

c1 c2 cr c cn
X( z) = + ++ + r +1 +  + .
z − λ1 ( z − λ1 )2 ( z − λ1 )r z − λr +i z − λn

The coefficients c1…cn can be calculated as

1 d r−1 ((s − λi )r X( z))


ci = lim , i = 1,..., r
z→λi(r − i)! dz r−1 .
ci = lim( z − λι )Χ( z), i = r + 1,..., n
z→λi

% 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

% Calculation 1/(r − i)!


fact=1/factorial(r-1);
% Calculation c2
c2=limit(fact*par,z,1)
% Calculation c3 (i=2)
par=diff(f,z,r-2);
fact=1/factorial(r-2);
limit(fact*par,z,1)

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.

% Define the coefficients of numerator and denominator


num=[ 1 3 1];
den=[ 1 0 -3 2]
% Use of residue command
[R,P,K]=residue(num,den)

X( z) can now be expressed as a fractional expansion


−1/9 10/9 5/3
X( z) = + + , which is the same as in the previous result.
z + 2 z − 1 ( z − 1)2

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);

X(z) can be written as

20 3
X( z) = + + 3z − 7
z + 4 z +1

Let us verify the above result using an alternative definition of the


residue command.

R=[ 20 3];
P=[-4 -1];
K=[ 3 -7];
[B,A]=residue(R,P,K);

Then, X(z) = B(z)/A(z) = 3z3 + 8z2 + 4/z2 + 5z−4


48 Digital Control Systems

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

The following procedure is applied:


Taking z-transform at both parts of the given equation

Z{ y(n) + 0.5 y(n − 1) + 2 y(n − 2)} = Z{0.9n }

Due to the linearity, we get

10 z
Z{ y(n)} + 0.5Z{ y(n − 1)} + 2Z{ y(n − 2)} =
10 z − 9

Calculate the z-transforms of the following

z
Y( z) + 0.5z−1Y( z) + 2z−2Y( z) =
z − 0.9

Solve the resultant expression in terms of Y(z):

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

G=Y + 0.5*Y1 + 2*Y2-X; % Mainly, G includes variables Y and z


SOL=solve(G,Y); % Solution of Y using the solve command

Hence, we get

z3
2
( z − 0.9)( z + 0.5z + 2)

y=iztrans(SOL,n); % the inverse z-transform is applied and


the desired result is obtained.

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)

The solution for y(n) is y = 1 + 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

y(n) − y(n − 1) = x(n) + x(n − 1) and


y(n) + 1.5 y(n − 1) + 0.5 y(n − 2) = x(n) + x(n −1)

where x(n) = 0.8n.


b. Plot the results for the range 0 ≤ n ≤ 20.
c. Verify the accuracy of the solution by replacing the result in the
given difference equation.

Solution
1. y(n) − y(n − 1) = x(n) + x(n − 1) , x(n) = 0.8 n

a. The solution of y(n) is


>> syms n z Y y=
>> x=0.8^n; 10-9*(4/5)^n
>> X=ztrans(x,z); Notice the definition of z – transform entitled as
>> X1=z^(-1)*X; Χ1 for x(n −1)
>> Y1=z^(−1)*Y;
>> G=Y-Y1-X-X1;
>> SOL=solve(G,Y);
>> y=iztrans(SOL,n)
b. 10

>> n_s=0:30; 9 LISI

>> 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

2. y(n) + 1.5 y(n − 1) + 0.5 y(n − 2) = x(n) + x(n − 1) , x(n) = 0.8 n

a. The solution of y(n) is


>> syms n z Y y=
>> x=0.8^n; 5/13*(−1/2)^n+8/13*(4/5)^n
>> X=ztrans(x,z);
>> X1=z^(-1)*X;
>> Y1=z^(-1)*Y;
>> Y2=z^(-2)*Y;
>> G=Y+1.5*Y1+0.5*Y2-X-X1;
>> SOL=solve(G,Y);
>> y=iztrans(SOL,n)
b. 1

>> n_s=0:20; 0.9

>> y_s=subs(y,n,n_s); 0.8


LISI y(n)

>> 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

y[n] + a1 * y[n − 1] + a2 * y[n − 2] + an * y[n − N ] =


b0 * x[n] + b1 * x[n − 1] +  + bm * x[n − M]
52 Digital Control Systems

The corresponding MATLAB code is

% a = [a1 a2 … aN], b = [b0 b1 … bM]


a = [0.8 0.1]; b = [0 0 1];
x0 = [0 0]; y0 = [0 0];
k = 0:5;
x = ones(1,6);
y = recur(a,b,k,x,x0,y0)
stem(k,y);xlabel(’k’);ylabel(’y(k)’);title(’Stem plot of
system step response’)

Stem plot of system step response


1
0.9
0.8
0.7
0.6
y(k)

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

The function recur.m can be retrieved from the following web-address:


https://www.mathworks.com/matlabcentral/fileexchange/2148-fun-
damentals-of-signals-and-systems-using-the-web-and-matlab/content/
recur.m
3
Transfer Function

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)

The transfer function represents the z-transform of the impulse response.

3.2 Open-Loop Sampled-Data Control System


Consider the system of Figure 3.2, which corresponds to an open-loop
­sampled-data system.
In this case, the output (Y(z)) of the given system is

Y(z) = Z[G0 (s)Gp (s)]Gc ( z)X( z) = G( z)Gc ( z)X( z) (3.2)

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.

3.3 Closed-Loop Sampled-Data Control System


Consider the system of Figure 3.3, which corresponds to a closed-loop
­sampled-data control system.
In this case, the output (Y(z)) of the given system is

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)

+ e(t) e(kT) L(z) y(t) Y(z)


+ Gc(z) Go(s) Gp(s)
x(t) – T

b(t)
H(s)

FIGURE 3.3
Closed-loop sampled-data system.
Transfer Function 55

Y( z) = G( z)Gc ( z)E( z) (1)


E( z) = X( z) − B( z) (2)
B( z) = Z[H (s)G0 (s)Gp (s)]L( z) (3)
L( z) = Gc ( z)E( z) ( 4)
(3),( 4) ⇒ B( z) = Z[H (s)G0 (s)Gp (s)]Gc ( z)E( z) (5)
(2),(5) ⇒ E( z) = X( z) − Z[H (s)G0 (s)Gp (s)]Gc ( z)E( z) (6)
Thus
X( z)
E( z) = (7 )
1 + Gc ( z)Z[H (s)G0 (s)Gp (s)]
Gc ( z)G( z)
(1),(7 ) ⇒ Y( z) = (8 )
1 + Gc ( z)Z [ H (s)G0 (s)G1(s)]

The transfer function of the closed-loop system is

Y( z) Gc ( z)G( z)
Gcl ( z) = = (3.4)
X( z) 1 + Gc ( z)Z  H (s)G0 (s)Gp (s)

For H(s) = 1 it holds that

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.

3.4 Signal Flow Graphs


Signal flow graphs (S.F.Gs), similar to block diagrams, provide an overview
of the system and represent an alternative representation of the relationship
among the variables of the system. S.F.G theory was developed by S. J. Mason
(July 1953) and is implemented in any system without the need to simplify
the functional diagram, which is a particularly laborious p ­ rocess for com-
plex diagrams. A flow graph consists of nodes, branches, and loops.
56 Digital Control Systems

(a) (b) (c) X3


X2 X1
X1

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.

3.5 Mason’s Formula


Mason’s formula (Mason’s gain formula—1953) provides the relation between
the input and output of a given system via S.F.G., directly, without successive
simplifications and is expressed as

∑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

L1 is the loop gain



ΣL1 is the sum of each loop gain at the signal flow graph

L2 is the gain product of two nontouching loops



ΣL2 is the sum of all the per two nontouching loop gains

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.

3.6 Difference Equations


Difference equations correspond to discrete-time systems, while differen-
tial equations correspond to continuous-time systems. In the difference
equation: y[n] + y[n − 2] = x[n], x[n] denotes the system’s input, which is a
known signal, while y[n] is the corresponding output, which represents the
unknown parameter. The question posed by the above difference ­equation is
as follows: Determine a signal y[n], which gives a known s­ ignal x[n], when is
added to itself, yet shifted by 2 units to the right, namely, y[n − 2].
The general form of an N-degree difference equation is

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):

∞ ∞

y *(t) = x(t) ⋅ δT (t) = x(t) ⋅ ∑


k =0
δ(t − kT ) = ∑ x(kT )δ(t − kT )
k =0
(3.9)
Transfer Function 59

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

Z[X *(s)] = X( z) (3.12)


60 Digital Control Systems

(a) (b) |X*( jω)|


|X(jω)|
Filter ωmax

–ωmax ωmax
ωs
–ωmax
2ωs

FIGURE 3.8
Frequency spectrum of analog and sampled signal.

3.7 Formula Tables


Tables 3.1 throguh 3.3.

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)

r c RG1 ( z)G2 ( z)G3 ( z)


G1(s) G2(s) G3(s)
– 1 + G2 ( z)G3 ( z)G1 ( z)H ( z)

H(s)

r c RG1 ( z)G2 ( z)G3 ( z)


G1(s) G2(s) G3(s)
– – 1 + G2 ( z)G3 H1 ( z) + G2 ( z)G1G3 H 2 ( z)

H1(s)
H2(s)

3.8 Solved Exercises


EXERCISE 3.1
Find the difference equation for the system of the following scheme.
Let: K = 10, T = 0.5 s and r(t) = u(t).
62 Digital Control Systems

T c(mT)
e
r e* K(5s + 1)
c
– T s(2s + 1)

Solution
From the above scheme, we have that

C(s) K (5s + 1) ILT d 2c(t) dc(t) de*(t)


= ⇒ 2 2
+ = 5K + Ke*(t) (3.1.1)
e*(s) s(2s + 1) dt dt dt

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.

d 2c(t) c(k ) − 2c(k − 1) + c(k − 2) dc(t) c(k ) − c(k − 1)


2 ≈2 ; ≈
dt 2 T2 dt T
(3.1.2)
de*(t) e*(k ) − e*(k − 1)
5K ≈ 5K ; Ke*(t) = Ke*(k )
dt T

Thus, the difference equation becomes

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

5KT + KT 2 * 5KT * 4+T 2


c(k ) = e (k ) + e (k − 1) + c(k − 1) − c(k − 2)
2+T 2+T 2+T 2+T
(3.1.3)

For K = 10, T = 0.5 s, we get

(3.1.3) ⇒ c(k ) = 11e*(k ) + 10e*(k − 1) + 1.8c(k − 1) − 0.8c(k − 2) (3.1.4)

It holds that

e*(k ) = r(k ) − c(k ) = 1 − c(k ) (3.1.5)


Transfer Function 63

So

41 4
c(k ) = 1.75 − c(k − 1) − c(k − 2) (3.1.6)
60 60

If c(0) = 0, then substituting in expression (3.1.6) and solving it


­successively, it stems that

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:

a. y(k ) + 0.5 y(k − 1) = 2x(k )


b. y(k ) + 2 y(k − 1) − y(k − 2) = 2x(k ) − x(k − 1) + 2x(k − 2)
c. y(kT ) + 3 y(kT − T ) + 4 y(kT − 2T ) + 5 y(kT − 3T )
= r(kT ) − 3r(kT − T ) + 2r(kT − 2T )

Solution
To derive the corresponding transfer functions, it suffices to apply
transform onto the difference equations, by assuming zero initial
z-­
conditions.

a. y(k ) + 0.5 y(k − 1) = 2x(k ) (3.2.1)


2 2z
Y( z)(1 + 0.5z−1 ) = 2X( z) ⇒ H( z) = =
1 + 0.5z−1 z + 0.5
b. y(k ) + 2 y(k − 1) − y(n − 2) = 2x(n) − x(n − 1) + 2x(k − 2).   (3.2.2)
−1 −2 −1 −2
Y( z)(1 + 2z − z ) = X( z)(2 − z + 2z )
−1 −2 2
2 − z + 2z 2z − z + 2
⇒ H ( z) = = 2
1 + 2 z −1 − z −2 z + 2z − 1
c. Y(z) + 3Y(z)z−1 + 4Y(z)z−2 + 5Y(z)z−3 = R(z)− 3R(z)z−1 + 2R(z)z−2
Y(z) 1− 3 z−1 + 2z−2 z 3 − 3 z 2 + 2z
⇒ G(z) = = −1 −2 −3
= 3
R(z ) 1+ 3 z + 4 z + 5z z + 3z2 + 4z + 5
(3.2.3)
64 Digital Control Systems

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

Y(z)(1 + 4 z−1 + 5z−2 + 3 z−3 + 2z−4 )


= R( z)(1 + 3 z−1 + 2z−2 + z−3 + z−4 ) (3.3.2)


Applying the inverse z-transform in (3.3.2), it yields the


desired result.

y(kT ) + 4 y(kT − T ) + 5 y(kT − 2T ) + 3 y(kT − 3T ) + 2 y(kT − 4T )


= r(kT ) + 3r(kT − T ) + 2r(kT − 2T ) + r(kT − 3T ) + r(kT − 4T ) (3.3.3)

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

It holds that Y( z) = H( z)U( z). Hence

(1 − 1.7 z−1 + 0.72z−2 )Y( z) = z−1U( z) (3.3.5)

We are transferred from the z-domain to the time domain;


thereby, the requested difference equation is presented as

y k = 1.7 y k −1 − 0.72 y k −2 + uk −1 (3.3.6)

EXERCISE 3.4
Derive the transfer function of the following discrete systems and show
that they are different to each other.

x(t) X*(t) 1 u*(t) 1 y(t)


δr s+a u(t) δr s+b

x(t) X*(t) 1 1 y(t)


δr s+b s+b
Transfer Function 65

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

For the second system, the transfer function is given by

 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−az−e −aT   −aT −1
z − e  b − a  (1 − e z )(1 − e z )  −bT −1 

These systems are not equivalent since their corresponding transfer


functions are different.

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

 1 − e−Ts k  k(1 − e−0 , 5T )


GzohG( z) = z  = (3.5.3)
 s 1 + 2s  z − e −0 , 5 T

66 Digital Control Systems

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 ))

For k = 1 and T = 0.314 s, we have that

0.145z
C( z) = (3.5.5)
( z − 1)( z − 0.709)

EXERCISE 3.6
Are the following systems equivalent?

x(t) + e(t) e*(t) y(t)


G(s)
T B(z)

H(s)

x(t) B(z) y(t)


G(s)
T

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

E(s) = Ω(s) − B(s) (3.7.1)

B(s) = F(s)Y *(s) (3.7.2)

(1)
Y(s) = G(s)E(s) = G(s)(Ω(s) − B(s)) (3.7.3)

(3.7.2),(3.7.3) ⇒ Y(s) = G(s)Ω(s) − G(s)F(s)Y *(s)) (3.7.4)

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)

where GΩ( z) = z[G(s)Ω(s)] and GF( z) = z[G(s)F(s)]


68 Digital Control Systems

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:

R(s) + E(s) E*(s) C(s) C(z)


G(s)
T T

B(s)
H(s)

Solution
We compute Y(z) from the system’s model equations.
From the above block diagram, we have that

E(s) = R(s) − B(s) (3.8.1)

B(s) = H(s)C(s) (3.8.2)

C(s) = G(s)E*(s) (3.8.3)

(3.8.2) ⇒ B(s) = H(s)G(s)E*(s) (3.8.4)

(3.8.1),(3.8.4) ⇒ E(s) = R(s) − H(s)G(s)E*(s) (3.8.5)

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)

C *(s) R*(s) R*(s)


(3.8.6),(3.8.7 ) ⇒ = ⇒ C *(s) = G*(s) (3.8.8)
G*(s) 1 + HG*(s) 1 + HG*(s)
Transfer Function 69

Using z-transform in (3.8.8), we get

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:

X(s) + L(s) L*(s) Y(s) Y(z)


G1(s) G2(s)
T T

B(s)
F(s)

Solution
We compute Y(z) from the system’s model equations.
From the above block diagram, we have that

E(s) = X(s) − B(s) (3.9.1)

B(s) = F(s)G2 (s)L*(s) (3.9.2)

L(s) = G1 (s)E(s) (3.9.3)

(3.9.1),(3.9.3) ⇒ L(s) = G1 (s)E(s) = G1 (s)(X(s) − B(s))


( 2)
= G1 (s)(X((s) − F(s)G2 (s)L* (s)) ⇒

L(s) = G1 (s)X(s) − G1 (s)F(s)G2 (s)L*(s) (3.9.4)

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) ⇒

L*(s)(1 + G1FG2 *(s)) = G1X *(s) (3.9.5)


70 Digital Control Systems

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)

Using z-transform in (3.9.7), we get

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

C(s) = G2 (s)M *(s) (3.10.1)

M(s) = G1 (s)E*(s) (3.10.2)

E(s) = R(s) − B(s) (3.10.3)

B(s) = H(s)C(s) (3.10.4)

E(s) = R(s) − H(s)C(s) (3.10.5)

E(s) = R(s) − H(s)G2 (s)M *(s) (3.10.6)

Discretize Equation (3.10.6) as

C *(s) = G2 *(s)M *(s) (3.10.7)


Transfer Function 71

*
(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)

C*(s) G1 *(s)G2 *(s)


(3.10.7 ),(3.10.8) ⇒ = (3.10.10)
R*(s) 1 + G1 *(s)G2 H *(s)

Using z-transform in (3.10.10), we get

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)

R(s) E(s) E*(s) C(s)


G(s)
δT

M*(s) M(s)
H2(s) H1(s)
δT

Solution
From the above block diagram, we have that

C(s) = G(s)E*(s) (3.11.1)

E(s) = R(s) − H 2 (s) M *(s) (3.11.2)

M(s) = H1 (s)G(s)E*(s) (3.11.3)

Applying the starred Laplace transform at the above equations, it


holds that

C *(s) = G*(s)E*(s) (3.11.4)

E*(s) = R*(s) − H 2* (s)M *(s) (3.11.5)

M *(s) = [G(s)H1 (s)]*E*(s) (3.11.6)


72 Digital Control Systems

(3.11.5),(3.11.6) ⇒ E * (s) = R * (s) − H 2 * (s) [G(s)H1 (s)] * E * (s) ⇒

R*(s)
E*(s) = (3.11.7)
1 + H 2 *(s) [G(s)H1 (s)]*

G*(s) R*(s) G*(s) R*(s)


(3.11.4),(3.11.7 ) ⇒ C *(s) = =
1 + H 2 *(s) [G(s)H1 (s)]* 1 + H *(s) [GH1 (s)]*

Hence, the resultant transfer function is given by

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.

R(s) + E(s) E*(s) C(s)


G(s)
T

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

R(s) 1 E(s) E*(s) G(s) C(s) 1 C(s)

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)

From Equations 3.12.1 and 3.12.2, design the equivalent S.F.G. as


R*(s) 1 E*(s) G*(s) C*(s)

–GH*(s)

Applying Mason’s formula, we have that

C *(s) T1Δ1
= (3.12.3)
R*(s) Δ

where

T1 = G*(s)

Δ = 1 − (−GH *(s)) and Δ1 = 1 − (0) = 1

C *(s) G*(s)
(3.12.3) ⇒ = (3.12.4)
R*(s) 1 + GH *(s)

Thus, the desired transfer function is given by

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.

R(s) + E(s) E*(s) L(s) L*(s) C(s)


G1(s) G2(s)
T

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)

Observing that the S.F.G. presents a discontinuity between E(s) and


E*(s), and between L(s) and L*(s), we redesign the S.F.G. without disconti-
nuities using the system model.

*
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)

Applying Mason’s formula, we get

C *(s) T1Δ1
= (3.13.4)
R*(s) Δ
Transfer Function 75

where

T1 = G1 *(s)G2 *(s)

Δ = 1 − (−G*1 (s)HG2 *(s)) and Δ1 = 1 − (0) = 1

Hence, substituting into the expression (3.13.4), it stems that

C*(s) G1 *(s)G2 *(s)


= (3.13.5)
R*(s) 1 + G1 *(s)G2 H *(s)

The desired transfer function is presented as

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.

1 + E1(s) E1*(s) + E2(s) E2*(s) C(s)


R(s) G1(s) G2(s)
– T – T

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

Observing that the S.F.G. presents a discontinuity between E1(s) and


E1 *(s), and between E2(s) and E2 *(s), we redesign the S.F.G. without
­discontinuities using the system model.
It holds that

E1 (s) = R(s) − C(s) ⇒ E*1 (s) = R*(s) − C *(s) (3.14.1)

C(s) = G2 (s)E2 *(s) ⇒ C *(s) = G2 *(s)E2 (s) (3.14.2)


76 Digital Control Systems

E2 (s) = G1 (s)E1* (s) − H(s)C(s) ⇒


E2 (s) = G1 (s)E1* (s) − H(s)G2 (s)E2 (s)) ⇒ (3.14.3)
E2 * (s) = G1* (s)E1* (s) − G2 H * (s)E2 * (s)

From Equations 3.14.1, 3.14.2, and 3.14.3, design the equivalent S.F.G.

R*(s) 1 E1*(s) G1*(s) E2*(s) G2*(s) C*(s) 1 C*(s)

–G2H*(s)

–1

Applying Mason’s formula, we have

C * (s) T1Δ1
= (3.14.4)
R* (s) Δ

where

T1 = G*1 (s)G* 2 (s)

Δ = 1 − (−G*1 (s)G2 *(s) − G2 H *(s)) and Δ1 = 1 − (0) = 1

Hence, substituting into the expression (3.14.4), it yields

C *(s) G1 *(s)G2 *(s)


= (3.14.5)
R*(s) 1 + G2 H *(s) + G1 *(s)G2 *(s)

The desired transfer function is presented as

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.

R(s) + E1(s) E1*(s) + + + C(s)


G1(s) G2(s)
– T –

H(s)

Solution
1

R(s) 1 E1(s) E1* (s) G1*(s) G2(s) 1 C(s)

–1

–1

Design S.F.G. which corresponds to the block diagram of the above


scheme.
Observing that the S.F.G. presents a discontinuity between E1(s) and
E1 *(s), we redesign the S.F.G. without discontinuities using the system
model.
It holds that

E1 (s) = R(s) − C(s) (3.15.1)

C(s) = E1 (s) + G2 (s)(G1 (s)E1 *(s) − C(s))


(3.15.2)
= E1 (s) + G1 (s)G2 (s)E1 *(s) − G2 (s)C(s)

(3.15.1),(3.15.2) ⇒ C(s) = R(s) − C(s) + G1 (s)G2 (s)E1 *(s) − G2 (s)C(s)


⇒ 2C(s) + G2 (s)C(s) = R(s) + G1G2 (s)E1 *(s)
(3.15.3)
R(s) G G (s)E1 *(s)
⇒ C(s) = + 1 2
2 + G2 (s) 2 + G2 (s)

R(s) G G (s)E1 *(s)


E1 (s) = R(s) − C(s) = R(s) − − 1 2
2 + G2 (s) 2 + G2 (s)
(3.15.4)
R(s)(1 + G2 (s)) G1G2 (s)E1 *(s)
⇒ E1 (s) = −
2 + G2 (s) 2 + G2 (s)
78 Digital Control Systems

*  R(s)  *  G1G2 (s)  *


(3.15.3) ⇒ C *(s) =   +   E *(s) (3.15.5)
 2 + G2 (s)   2 + G2 (s)  1

*  R(s)(1 + G2 (s))  *  G1G2 (s)  *


(3.15.4) ⇒ E1 *(s) =   +   E *(s) (3.15.6)
 2 + G2 (s)   2 + G2 (s) 
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)

To compute the total output, we apply the superposition theorem,


which states that

 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) 


From the expression (3.15.7), the following expression is derived, which


­represents the z-transform of the system’s output.

 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) 
 

The desired transfer function is presented as

 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.

R(s) E(s) E*(s) C(s)


+ G1(s) + G2(s)
– –
T

H(s)
T

Solution
Design S.F.G. which corresponds to the block diagram of the above
scheme.

R(s) 1 E(s) E*(s) G1(s) G2(s) 1 C(s)

C*(s)

–H(s)

–1

Observing that the S.F.G. presents a discontinuity between E1(s) and


E*(s), and between C(s) and C*(s), we redesign the complex S.F.G. without
­discontinuities using the system model.
It holds that

E(s) = R(s) − C(s) (3.16.1)

C(s) = (G1 (s)E * (s) − H(s)C * (s))G2 (s)


(3.16.2)
= G1 (s)G2 (s)E * (s) − G2 (s)H(s)C * (s)

To design the complex S.F.G., we use the pulse transform of Equations


3.16.1 and 3.16.2:

(3.16.2) ⇒ C * (s) = G1G2 * (s)E * (s) − G2 H * (s)C * (s) (3.16.3)

(3.16.1) ⇒ E * (s) = R * (s) − C * (s)


= R * (s) − G1G2 * (s)E * (s) + G2 H * (s)C * (s)  (3.16.4)
80 Digital Control Systems

The complex S.F.G. is given by

–G1G2* (s) G2H*(s)

1 G1 G2*(s) C*(s) 1
R*(s) C*(s)
E*(s)

–G2H*(s)
1 –H(s)

1 E(s) G1(s) G2(s) 1


C(s)
E*(s)

–1

The transfer functions C*(s)/R*(s), E*(s)/R*(s), C(s)/R*(s) can be calculated


with the aid of Mason’s formula.

C *(s) G1G2 *(s)


= (3.16.5)
R*(s) 1 + G1G2 *(s) + G2 H *(s)

E*(s) 1 × (1 − ( − G2 H *(s)) 1 + G2 H *(s)


= = (3.16.6)
R*(s) 1 + G1G2 *(s) + G2 H *(s) 1 + G1G2 *(s) + G2 H *(s)

C(s) G (s)G2 (s)[1 + G2 H *(s)] − G2 (s)H(s)G1G2 *(s)


= 1 (3.16.7)
R*(s) 1 + G1G2 *(s) + G2 H *(s)

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) Y(s) Y*(s)


+

U*(s) Y2(s)
G2(s)

U*(s) Y1(s)
G1(s)

U(s) Y(s) Y*(s)


+

Y2(s)
G2(s)

Solution
From the block diagram of the first scheme, the desired result is obtained
as

Y1 (s) = G1 (s)U *(s) Y2 (s) = G2 (s)U *(s)

Y(s) = Y1 (s) + Y2 (s) = G1 (s)U *(s) + G2 (s)U *(s)

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)

Similarly, we have for the second scheme

Y(s) = G1 (s)U *(s) + G2 (s)U(s)

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

E*(s) = R * (s) − B*(s) (3.18.1)

X *(s) = (G3 (s)R*(s))* = G3 *(s)R*(s) (3.18.2)

B*(s) = ( H(s)Y *(s))* = H *(s)Y *(s) (3.18.3)

Y *(s) = (G1 (s)G2 (s)E*(s))* − (G4 (s)X *(s))* ⇒


(3.18.4)
Y *(s) = (G1 (s)G2 (s))*E*(s) − G4 *(s)X *(s)

(3.18.1) ⇒ E( z) = R( z) − B( z) (3.18.5)

(3.18.2) ⇒ X(s) = G3 ( z)R( z) (3.18.6)

(3.18.3) ⇒ B( z) = H( z)Y( z) (3.18.7)

(3.18.4) ⇒ Y( z) = z (G1 (s)G2 (s))E( z) − G4 ( z)X( z) (3.18.8)

Combining Equations 3.18.5, 3.18.6, 3.18.7, and 3.18.8, we get

Y( z)(1 + G1G2 ( z)H( z)) = (G1G2 ( z) − G3 ( z)G4 ( z))R( z)* ⇒

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.

Gh(s) G1(s) Gp(s)


x(t) x*(t)

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

Y( z) = G( z)X( z) and y(kT ) = Z−1[Y(z)] (3.19.1)

where

G( z) = Z [G(s)] = Z Gh (s)G1 (s)Gp (s)H(s) (3.19.2)

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 1 − z−1 cos 3T z z 2 − z cos 3T


(3.19.4) ⇒ G( z) = − −1 −2
= − 2
z − 1 1 − 2z cos 3T + z z − 1 z − 2z cos 3T + 1

z 2 + z − z 2 cos 3T − z cos 3T z( z + 1)(1 − cos 3T )


= =
( z − 1)( z 2 − 2z cos 3T + 1) ( z − 1)( z 2 − 2z cos 3T + 1)
(3.19.5)

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

Applying the partial fraction expansion of

 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)

For T = 1s, the desired expression is presented as

y * (t) = (t + 0.5 − 0.5 cos 3t − 0.0354 sin 3t) (3.19.8)

EXERCISE 3.20
Find the closed-loop pulse transfer function for the system of the follow-
ing scheme.

R(s) E(s) E*(s) U(s)


G1(s) G2(s)
– C(s)

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

The closed-loop pulse transfer function Gcl(z) is presented as

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

Since e−10T = 0.5, it yields that

0.5z
C( z) = (3.21.5)
( z − 0.45)( z − 1)

The closed-loop step response is derived as

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

c*(t) = 0δ(t) + 0.5δ(t − T ) + 0.725δ(t − 2T ) + 0.826δ(t − 3T )


+ 0.827δ(t − 4T ) + 0.894δ(t − 5T ) + 0.902δ(t − 6T ) + … (3.21.7)
86 Digital Control Systems

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)

From Equation 3.22.2, taking the inverse Laplace transform, we


have that
 R*(s) 
c(t) = L−1[C(s)] = L−1 G(s)
 1 + G*(s) 

 1− e −Ts
1 R*(s)  T =1 −1  1 − e−s 1 R*(s) 
= L−1  =L
 s s( s + 1) 1 + G *( s)   s s(s + 1) 1 + G*(s) 
   
(3.22.4)
R*(s) ΖΤ
Let X *(s) = (1 − e−s ) ⇒
1 + G*(s)
(3.22.5)
R( z)
X( z) = (1 − z−1 )
1 + G(z)

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

− 0.0632[(t − 2) − 1 + e−(t−2) ]1(t − 2)


− 0.400[(t − 3) − 1 + e−(t−3 ) ]1(t − 3)
− 0.000[(t − 4) − 1 + e−(t−4 ) ]1(t − 4)
+ 0.253[(t − 5) − 1 + e−(t−5) ]1(t − 5)
+ 0.253[(t − 6) − 1 + e−(t−6 ) ]1(t − 5) + …

Thereby, the step response of the system is

t − 1 + e−t 0 ≤t <1



t − 1 + e−t − 0.368[(t − 1) − 1 + e−(t−1) ]1(t − 1) 1≤ t < 2

c(t) = t − 1 + e−t − 0.368[(t − 1) − 1 + e−(t−1) ]1(t − 1) −

0.0632[(t − 2) − 1 + e−(t−2) ]1(t − 2) 2≤t<3


c(0) = 0 − 1 + 1 = 0
c(0.5) = 0.5 − 1 + 0.607 = 0.107
c(1.0) = 0.368 − 0.368 * 0 = 0.368
c(1.5) = 0.723 − 0.368 * 0.107 = 0.684

88 Digital Control Systems

EXERCISE 3.23
For the system of the scheme, find the transfer function B(z)/M(z) using
MATLAB for T = 0.01 s.

M(z) M(s) U(s) 1 Ω(s) 1 Θ(s)


ZOH 10
s + 12 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  


The corresponding MATLAB code is given by

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

1598e-006z^2 + 6126e-006z + 1468e-006


z^3- 2.838 z^2+ 2.682 z – 0.8437
Hence

B( z) 1.598e − 006 z 2 + 6.126e − 006 z + 1.468e − 006


= (3.23.2)
M( z ) z 3 − 2.838 z 2 + 2.682z − 0.8437
4
Transfer Function Discretization

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:

1. Discretization of the system that we want to control.


2. Construction of suitable digital controller using analytical methods
of discrete-time systems.

The second technique is called simulation and is accomplished in the fol-


lowing steps:

1. Construction of the analog controller using continuous-time analyti-


cal methods.
2. Discretization of the analog controller.
3. Verification of the correct operation of the digital controller using
discrete-time analytical methods.

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

the integration regions numerically. We divide the integration region into


several subspaces of length T, where T is the sampling period.
If we use numerical differentiation methods, then the discretization pro-
cess is as follows: We calculate the equivalent differential equation of the
transfer function and then approach the derivative of the output function
numerically.
The second method is based on the response of an analog filter with a pole
at the point s = s0, when sampled over a time period T, is represented by the
response of a discrete filter with a pole at the point z = e s0 T . Such a matching
is used to equate the poles and zeros of G(s) in s-domain with poles and zeros
of G(z) in z-domain.
The third method is based on the identification of response of continuous-
time systems to specific inputs (step, impulse, and ramp functions), to those
of discrete-time systems for the same inputs.
The equivalent discrete-time system must have approximately the same
dynamic characteristics as the original continuous-time system.
This means that the discrete system is desired to have transmission and
frequency response characteristics as close as possible to those of the origi-
nal analog system.
In reality this cannot be achieved.
Using a specific discretization method is likely to have identical or nearly
identical characteristics of the impulse response, while simultaneously hav-
ing significant differences in the frequency response characteristics or vice
versa.
The goal is to keep these important characteristics by selecting the appro-
priate discretization method.
Regarding the characteristics of the frequency response, it is important
to note that an undesirable phenomenon appears during the discretization
of the analog system displays, namely, the frequency aliasing, which occurs
when the sampling frequency is too low to satisfy the sampling theorem.
The selection of low sampling frequency results in a poor approximation
of the analog system. Consequently, the satisfactory performance of the
discrete system depends on the selection of the appropriate discretization
method and sampling frequency.

4.2 Discretization Methods


The most important comparison points of the discretization methods to be
mentioned are

• Ease of use
• Stability maintenance
Transfer Function Discretization 91

• Impulse response maintenance


• Harmonic response maintenance

4.2.1 Impulse-Invariance Method or z-Transform Method


The equivalent discrete-time filter of the impulse response is the filter whose
impulse response is identified with the impulse response of the continuous
time filter G(s), at time instances kΤ, k=0,1,2,3…, T where T denotes the sam-
pling period.
The impulse response in the z-domain is the inverse z-transform of the
transfer function G(z). While in the s-domain the impulse response is the
inverse Laplace transform of the transfer function G(s).
Consider the systems of Figure 4.1.
The digital transfer function G(z) arises from the corresponding analog
G(s), by implementing the following steps:

• From G(s), we extract g(t) in the time domain using inverse


z-transform.
• From g(t), via discretization, we extract the function g(kT), where T
is the sampling period.
• From g(kT), using z-transform, we derive G(z) in z-domain.

Thus,

−1
= kT
G(s) L→ g(t) t → g(kT ) ZT
→ G( z) (4.1)

or

G( z) = Z[ g(kT )], where g(kT ) = [L−1G(s)]t=kT (4.2)

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).

X(s) G(s) Y(s) X(z) G(z) Y(z)


T T

FIGURE 4.1
Analog and discrete system.
92 Digital Control Systems

4.2.2 Step-Invariance Method or z-Transform


Method with Sample and Hold
The aim of this method is to construct a discrete system G(z) whose step
response will consist of step response samples of the continuous system G(s)
at time instances kΤ, k=0,1,2,3…, where T represents the sampling period.
Consider the system of Figure 4.2.
The digital transfer function G(z) arises from the analog G(s), using the
expression (4.3) or (4.4).

 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

f (t) f *(t) fh(t)


Hold

f (t) f *(t) fh(t)

f (kT )δ(t – kT)

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.

The most prevalent techniques for determining the stability of a discrete-


time system are

• Unit-circle criterion
• Routh criterion using the bilinear mobius transformation
• Jury criterion
• Root locus method
• Nyquist stability criterion
• Bode stability criterion

The stability analysis of digital control systems is similar to the stability


analysis of analog systems and all the known methods can be applied to
digital control systems with some modifications.

Im

Re

FIGURE 6.2
Time responses as a function of the poles location on the unit circle.
Stability of Digital Control Systems 219

6.2 Unit-Circle Criterion


The key relation between analog and digital domain is z = esT
or z = e(σ+jω)T = eσT ⋅ ejωT = eσT ⋅ ejωT ⋅ e±j2kπ ⇒

z = e σT × e j( ωT ± j2kπ ) (6.1)

Hence, the variable z is a vector of length eσT and phase ωT ± j2kπ. As we


know from the analog control system theory, a system is stable when its
poles are located on the left half complex plane s, that is, when Re{s} = σ < 0
with marginal stability σ = 0. By moving into the z-domain, observe that for
σ = 0 ⇒|z| = |e0T| = 1 and σ → −∞, |z| = |e−∞T| → 0.
Thereby, the key relation between stability and poles location is trans-
ferred from the left half-plane s into the unit circle with center being the
intersection of complex z-plane axes (Figure 6.3).

6.3 Routh Criterion Using the Bilinear Mobius Transformation


Routh stability criterion (Routh criterion—1875) is a method of determining
whether any polynomial has all its roots in the left complex half-plane.
Möbius transform (Möbius transformation—in honor of August
Ferdinand Möbius):

z +1 w +1
w= ⇒z= (6.2)
z −1 w −1

illustrates the unit circle of the z-plane in the left-half w-plane.

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

Proof: Assume that

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

P( z) = a0 z n + a1z n−1 +  + an−1z + an = 0 (6.4)

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

Q(w) = b0 w n + b 1 w n−1 +  bn−1z + bn = 0 (6.6)

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

6.4 Jury Criterion (Eliahu I. Jury 1955)


Let the characteristic equation of a sampled data system be

α( z) = α0 z n + α1z n−1 +  + αn−1z + αn = 0 (6.7)

We form the Jury table

a0 a1 a2     an−1 an an
Bn =
an an−1      a1 a0 a0

a0n−1 a1n−1  ann−−11 ann−−11


Bn−1 =
ann−−11 ann−−21   a0n−1 a0n−1
– ann−−11
Bn−1 =
a0n−1

a00

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

The latter conditions represent necessary stability conditions; therefore


they can be used prior to the formation of the Jury table.

6.5 Root Locus Method


The root locus method (root locus analysis—Evans 1948) is a graphical method
that serves as a means of formulating the locus in the complex plane,
222 Digital Control Systems

whereupon the roots of the system characteristic equation are driven as


changing the parameter of a certain value.
Since the transfer function of a digital control system is the ratio of two
polynomials of z, the same rules can be applied as for the formulation of the
root locus in s-domain.
When formulating the root locus, we can find the absolute and relative
stability of the system. The absolute stability requires that all the roots of the
denominator of the transfer function (poles) are within the unit circle.
The relative stability is determined by the location of roots within the
­circle relative to locus of fixed attenuation, fixed frequency, and fixed J.
Consider the loop transfer function
P( z)
G( z)H ( z) = K (6.10)
Q( z)

where P(z) and Q(z) are polynomials of the complex variable z.


The roots of the characteristic equation are the poles of the closed system
and are obtained by
Q( z) + KP( z) = 0 (6.11)

where K denotes the system variable.


The position of poles of the transfer function in complex z-plane affects
the transient response of the system and determines its stability. From the
expression (6.11), observe that any change in the value of constant K results
to a location shift for the poles in complex plane.
The root locus diagram is a graphical illustration of the location of poles of
the closed system in z-plane, as one its parameters changes, say K. In the
root locus diagram, we receive satisfactory information for the stability and
overall behavior of a system.

6.5.1 Rules for Approximate Establishment of Root Locus


Some rules that apply on the approximate establishment of the root locus for
the characteristic equation of a discrete control system.

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

RULE 5: The intersection of asymptotic lines with the horizontal axis


is given by

∑ ∑
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

(2ρ + 1)π ρ = 0, 1, … ,|n − m|−1


ϕα = , (6.13)
n−m K ≥0

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)

Each root of the equation (dK/dz) = 0 is an accepted break away point


if it satisfies the condition 1 + G(z)H(z) = 0 or |G( z)H ( z)|= 1 for some
real value of K.
RULE 9: The intersection points of the root locus and the circumfer-
ence of the unit circle (where |z| = 1) are the points where the system
goes from stable to instable and are calculated from the algebraic
Jury stability criterion or from the algebraic Ruth stability criterion
using the Möbius transform.
RULE 10: The departure angles of root locus for a complex pole or the
arrival angles for a complex zero are calculated as

 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).

6.6 Nyquist Stability Criterion


The Nyquist stability criterion (Nyquist stability criterion—1932) is based
on the graphical representation of the open-loop transfer function for a
particular closed path in the complex frequency domain and provides
­
­information not only on the stability of the closed systems but for their rela-
tive stability as well. The special closed road is called Nyquist path or Nyquist
plot and includes the right complex half plane. In Figure 5.7, Nyquist path ΓC
is presented.
The Nyquist stability criterion studies the stability of the closed-loop
system, when the open-loop transfer function is considered as known. To
apply the Nyquist stability criterion in discrete-time systems, it suffices to set
z = ejωT in the open-loop transfer function and to design the polar diagram
with the circular frequency ω as a parameter.
Consider the discrete system of Figure 6.5.
Its transfer function is presented as

Y( z) H ( z)
Gcl ( z) = = (6.16)
U c ( z) 1 + H ( z)

The characteristic polynomial is given by

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.

Based on Nyquist criterion, to preserve the stability of the closed system,


then P = 0 should hold, thus

N=Z (6.19)

Figure 6.6 illustrates a typical Nyquist path.


Nyquist stability criterion: If the open-loop system is stable, then the stability
of the closed-loop system is determined by the case when the point −1 + j0 is
surrounded by the Nyquist diagram of H(ejωT) for ωT, from 0 to π.
The gain margin kg is defined as the quantity arising from the expression
(6.20) and it is the inverse value of gain |H(ejωT)| into the frequency for which
the phase angle tends to −180°:

1
kg = (6.20)
H (e jωC T )

where ωC = the critical frequency where the Nyquist diagram of H(ejωT)


i­ ntersects the axis Re{GH}, that is

arg(H (e jωC T ) = −π (6.21)

A closed system is stable if kg > 0.

Im

Γc
I
1
Re
R→∞

FIGURE 6.6
Nyquist path.
226 Digital Control Systems

The gain margin is the amount of gain increase or decrease required to


make the loop gain unity at the frequency where the phase angle is –180°.
The phase margin ϕm arg is the quantity arising from the expression (6.22)
and it is the angle at which the diagram of H(ejωT) should be rotated so as the
point of |H(ejωT)| = 1 pass through the point −1 + j0 of the coordinates plane
of H(ejωT):

ϕm arg = π + arg(H (e jωC T )) (6.22)

where ωC is the frequency where the amplitude |H(ejωCT)| equals to unity.


This stability measure is practically equal to the added phase delay, which
is required before the system is turned to unstable.
A closed system is stable if ϕm arg > 0.

6.7 Bode Stability Criterion (H.W. Bode—1930)


Using the bilinear transform z = (1 + (T/2)w)/(1 − (T/2)w) the internal of the
unit circle of the complex z-plane is depicted to the left w half-plane. In this
way, we study the stability of a digital control system in w-domain, by utiliz-
ing the same methods applied to analog systems. Consider a control system
with the loop transfer function:

b0 z m + b1z m−1 + bm


G( z) = , m≤n (6.23)
z n + a1z n−1 +  + an

Let the transform:

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

Based on G(w) and setting w = jv (where v is the system angular frequency),


the Bode diagram can be designed for G(jv), while some useful outcomes
Stability of Digital Control Systems 227

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.

6.8 Formula Table


The formula Tables 6.1 through 6.3 are discussed here.
where

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 < ∞

(2ρ + 1)π , K>0 Phase condition of the root


∑ ∑
m n
( z + zi ) − ( z + p j ) =  locus points
3 i=1 j=1  2ρπ , K <0
ρ = ±1, ±2, …
4 l = max(m, n) Number of branches of root
locus
Angles between the
(2ρ + 1)π ρ = 0, 1, … ,|n − m|−1
5 ϕα = ,  asymptotic lines with the
n−m  K ≥0 real axis for K ≥ 0

∑ ∑ Intersection point of the


n m
pi − zj
6 σα =
i=1 j=1 asymptotic lines and the
n−m real axis
 dK Finding the breaking points
 = 0 ⇒ zbi zb (1st way)
7. α  dz

1 + G( zb )H ( zb ) = 0 and K ∈ R
  Departure angles of root
∑ ∑
n m
8 ϕd = (2ρ + 1)π −  ϕpi − ϕz j  locus from complex poles
 i=1 j=1 
or arrival angles in
complex zeros
Stability of Digital Control Systems 229

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 )

ωC = the critical frequency where the Nyquist diagram of H(ejωT) intersects


the axis Re{GH}, that is arg(H (e jωCT ) = −π
• Phase margin

ϕm arg = π + arg(H (e jωCT )

ΩC = the frequency where the amplitude |H (e jωCT )| equals to unity.



k g > 0
It should hold: 
to preserve stability
ϕm arg > 0


Jury Stability Conditions

F(1) > 0
(−1)n F(−1) > 0
|a0|<|an|
|b0|>|bn−1|

|c0|>|cn−2|


|r0|>|r2|

6.9 Solved Exercises


EXERCISE 6.1
Define the region of values for the parameter K so as the following sys-
tems are stable:
230 Digital Control Systems

S1: y(nT) − Ky(nT − T) + K2y(nT − 2T) = x(nT)


S2: y(nT) − 2Ky(nT − T) + K2y(nT − 2T) = x(nT)

Solution
For the system S1, transform the difference equation in z-domain and
calculate its transfer function.

Z( y(nT ) − Ky(nT − T ) + K 2 y(nT − 2T )) = Z( x(nT ))


⇒ Y( z) − Kz−1Y( z) + K 2 z−2Y( z) = X( z)
Y( z ) 1
H ( z) = = (6.1.1)
X( z) 1 − Kz−1 + K 2 z−2

Finding the poles of H(z)

1 − Kz−1 + K 2 z−2 = 0 ⇒ z 2 − Kz + K 2 = 0 (6.1.2)

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)

The modulus of z is given by

 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.

Z( y(nT ) − 2Ky(nT − T ) + K 2 y(nT − 2T )) = Z( x(nT ))


Y( z) − 2Kz−1Y( z) + K 2 z−2Y( z) = X( z)

1
H ( z) = −1
(6.1.5)
1 − 2Kz + K 2 z −2

Finding the poles of H(z)

1 − 2Kz−1 + K 2 z−2 = 0 ⇒ ( z − K )2 = 0 ⇒ z = K
Stability of Digital Control Systems 231

The modulus of z is given by

|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

 w + 1 2 w +1 (w + 1)2 + 0.7(w 2 − 1) + 0.1(w − 1)2


α(w) =  
 + 0.7 + 0.1 =
 w − 1  w −1 (w − 1)2
1.8w 2 + 1.8w + 0.4
⇒ α(w) = (6.2.1)
(w − 1)2


The numerator of α(w) is the characteristic polynomial


where we apply the Routh criterion.
Routh table is presented as

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

α( z) = ( z + 0.5)( z + 0.2) (6.2.2)

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:

−1.875w 3 + 3.875w 2 + 4.875w + 1.125 = 0 (6.2.3)


232 Digital Control Systems

The Routh table is presented as

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

Due to p2 = 1.3402, which is outside the unit circle, the closed-loop


­system is unstable.

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

Thereby, it suffices to show that


α2

–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

The third row of the above table is calculated as

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

The stability conditions for a fifth-order system are

F(1) > 0
(−1)5F(−1) > 0
|a0| < a5
|b0| > |b4|
|c0| > |c3|
|d0| > |d2|

F(1) = 1 + 2.6 − 0.56 − 2.05 + 0.0775 + 0.3514175

Thus, the condition is satisfied.

F(−1) = −1 + 2.6 + 0.56 − 2.05 − 0.0775 + 0.35 = 0.3825

The condition (−1)5F(−1) > 0 is not satisfied.


The condition |a0| < a5 is satisfied.
The condition |b0| > |b4| is satisfied.
The condition |c0| > |c3| is not satisfied.
The condition |d0| > |d2| is satisfied.
The closed-loop system is unstable.

Verification using MATLAB: The function Jury.m (https://www.math-


works.com/matlabcentral/fileexchange/13904-jury/content/jury.m)
estimates the Jury Table and will be used in the following exercise.
Stability of Digital Control Systems 235

function [J,C] = jury(coeff)

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)

% Provide the vector of coefficients for the characteristic


polynomial
coeff=[1 2.6 -0.5 -2.05 0.0775 0.35];
% With the command jury, formulate the Jury Table
jury(coeff)
ans =
1.0000 2.6000 -0.5000 -2.0500 0.0775 0.3500
0.3500 0.0775 -2.0500 -0.5000 2.6000 1.0000
0.8775 2.5729 0.2175 -1.8750 -0.8325 0
-0.8325 -1.8750 0.2175 2.5729 0.8775 0
0.0877 0.7940 0.4238 0.5659 0 0
236 Digital Control Systems

0.5659 0.4238 0.7940 0.0877 0 0


-3.5646 -1.9413 -4.7005 0 0 0
-4.7005 -1.9413 -3.5646 0 0 0
2.6337 0.6186 0 0 0 0
0.6186 2.6337 0 0 0 0
2.4884 0 0 0 0 0

From the coefficients of the first column, it is clear that they do not
have the same sign, therefore the system is unstable.

% Find the roots of the characteristic polynomial


>> roots(coeff)
ans =
-2.4708
0.6812
0.5106
-0.8306
-0.4904

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

The poles of the closed system can be found by solving 1 + G(z) = 0,


that is, they are the roots of

P( z) = z 2 −  e−T (1 + K ) + 1 − K  z + e−T = 0 (6.6.4)


 
Stability of Digital Control Systems 237

a. Find the stability using the Routh criterion


In the expression (6.6.4), set z = (w + 1)/(w − 1), thus

w 2 (K (1 − e−T )) + w(2(1 − e−T )) + 2(1 + e−T ) − K (1 − e−T )


P(w) = =0 (6.6.5)
(w − 1)2

Formulate the Routh table

w2 K(1 − e−T) 2(1 + e−T) − K(1 − e−T)


w1
2(1 − e )−T

w0 2(1 + e−T) − K(1 − e−T)

To obtain stability, it should hold that

K (1 − e−T ) > 0
2(1 − e−T ) > 0 (6.6.6)
−T −T
2(1 + e ) − K (1 − e )> 0

From

K (1 − e−T ) > 0 ⇒ K > 0

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 

b. Find the stability using the Jury criterion


Formulate the Jury table

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

According to the Jury criterion, the necessary stability con-


ditions are

1 > 0 : True, 1 − e−2T > 0 : True


(e−T − 1)2 −T
1 − e −2 T − (e (1 + K ) + 1 − K )2 ⇒
1 − e −2 T
(1 − e−T )K 2 − 2K (1 − e−2T ) < 0

In order to hold true the last inequality, K should be placed


inside the range of roots of the polynomial at the left-hand side
of the corresponding inequality, which is: 0 and 2((1 + e−t)/
(1 − e−t)) = 2cot (T/2), that is, Κ should satisfy

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)

Write the appropriate MATLAB command to design the step responses


of the above systems.

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

Subsequently, the diagram of poles and zeros is drawn for


the two systems.

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)

The system is stable because the system complex conjugate


poles p1 = 0.86ej1260 and p2 = 0.86e−j1260 are inside the unit
circle.
Subsequently, the diagram of poles and zeros is drawn for
the two systems.

Im Im –j
(c) –j (d) 0.86
x

Re Re
–1 –.5 1 –1 .5 1

j
j

  To design the corresponding step responses, the following


MATLAB commands are used:

step([1, -0.5],[1, 0.75]) % for system (a).


step([1, 0, 1],[1, 0, -0.25]) % for system (b).
step([1, -1, 0],[1, 0.5, -0.5]) % for system (c).
step([1, -0.25],[1, 1, 0.75]) % for system (d).
240 Digital Control Systems

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

y1[nTs ] = 0.2u[(n − 1)Ts ] + 0.8 y1[(n − 1)Ts ] (6.8.1)

y 2 [nTs ] = 1.8u[(n − 1)Ts ] − 0.8 y 2 [(n − 1)Ts ] (6.8.2)

y 3 [nTs ] = 2u[(n − 1)Ts ] − y 3 [(n − 1)Ts ] (6.8.3)

y 4 [nTs ] = 2u[(n − 1)Ts ] + y 4 [(n − 1)Ts ] (6.8.4)

y 5 [nTs ] = 1.25u[(n − 2)Ts ] − 0.25 y 5 [(n − 2)Ts ] (6.8.5)

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

6 0.7378 1.2499 0 12 1.0156


7 0.7902 0.8001 2 14 1.0256
8 0.8322 1.1599 0 16 0.9961
9 0.8658 0.8721 2 18 0.9961
10 0.8926 1.1023 0 20 1.001

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

The characteristic equation of the system is presented as

1 − e−Ts /2
1 + P( z) = 1 + 4 ⋅ =0 (6.9.2)
z − e−Ts /2

⇒ z − e−Ts /2 + 4(1 − e−Ts /2 ) = 0 (6.9.3)

Solving with respect to z, we have

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

The characteristic equation of the closed system is expressed as

1 + L( z) = 0 ⇒ z − 1 + K = 0 (6.10.2)

In order for the closed-loop system to be stable, it suffices to hold


|z| < 1, which leads to the condition Kmax = 2.
For K = Kmax/2 = 1 we have

K 1
L( z) = = (6.10.3)
z −1 z −1

The total transfer function is given by

Y( z) L( z) 1/( z − 1) 1
= = = = z −1 (6.10.4)
R( z) 1 + L( z) 1 + (1/( z − 1)) z

For step input, output is

y[k] = 1[k−1] ⇒ y[0] = 0, y[1] = 1, y[2] = 1.

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

In the expression (6.11.1), set z = (w + 1)/(w − 1).

0.632Kz
1+ =0
z 2 − 1.368 z + 0.368 (6.11.2)
⇒ 0.632Kw + 1.264w + (2.736 − 0.632K ) = 0

Formulate the Routh table.

0.632K 2.736 − 0.632K


1.264
2.736 − 0.632K

For stability, it should hold:

2.736 − 0.632K > 0 ⇒ 0 < K < 4.33 (6.11.3)


Stability of Digital Control Systems 243

EXERCISE 6.12
The system of the following scheme is given.

1. For G(s) = 1/(s(s+1)), design the Nyquist diagram (Τ = 1 s)

r + e c
ZOH G(s)
– T

2. For G(s) = (1/s2), design the Bode diagram (Τ = 1 s).

Solution
We use MATLAB to design the requested diagrams.

% Design the Nyquist diagram


clear
clf
np=[0 0 10];
dp=[1 5 0];
[num den]=c2dm(np,dp,1,’z’);
dnyquist(num,den,1);axis([-1.5 0 -20 20])

Nyquist diagram
20

15

10

5
Imaginary axis

−5

−10

−15

−20
−1.5 −1 −0.5 0
Real axis

% Design the Bode diagram


w=[logspace(-1, .4) 1000];
np=[0 0 1];
dp=[1 0 0];
[a,b,c,d]=tf2ss(np,dp);
sysc=ss(a,b,c,d);
T=1;
sysd=c2d(sysc,T,’zoh’);
[magph]= bode(sysd,w);
loglog(w,magph(1,:)) ; grid
244 Digital Control Systems

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)

The system characteristic equation is given by the expression (6.13.2).


Solve with respect to K and equate the derivative (dK/dz) to zero, to
obtain the breaking points. We have that

K ( z + 0.995)
1 + D( z)G( z) = 0 ⇒ 1 + =0 (6.13.2)
( z − 1)( z − 0.905)

( z − 1)( z − 0.905) z 2 − 1.905z + 0.905


(6.13.2) ⇒ K = − =− (6.13.3)
z + 0.995 z + 0.995

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

Both roots of (dK/dz) = 0 are breaking points since:

K |z =0.954 = 0.001 > 0 K |z =−2.934 = 2.03 > 0 (6.13.5)

Calculate the intersections point of root locus with the unit circle

(6.13.2) ⇒ z 2 + (K − 1.905)z + 0.905 + 0.995K = 0 (6.13.6)

It should hold

A(1) > 0 



A(−1) > 0 ⇒ 0 < K < 0.095 (6.13.7)

|A(0)|< 1 

For

z 2 − 1.81z + 1 = 0
K cr = 0.095 ⇒
z1 = 0.905 ± j0.425

Design the root locus as

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)

The open-loop transfer function has two poles (P1 = 1, P2 = 0.9048)


and a zero (Z1 = −0.9672).
Find the departure point from the horizontal axis

dk
=0 (6.14.3)
dz

where k is calculated from the characteristic equation 1 + G(z) = 0.

dk  ( z − 1)( z − 0.9048) ′


=  =0
dz  0.00484( z − 0.9672) 
z1 = 0.9516
⇒ z 2 + 1.9344 z − 2.7471 = 0 
z 2 = −2.886

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

characteristic equation follows, where we observe that the digitalized


system is unstable for K ≥ 165, regardless of the fact that the original
system is asymptotically stable.

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

02 1.75 1.5 1.25 1 0.75 0.5 0.25

−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

ϕd = 180°− (q1 − f ) = 180°− (90°− 75°) = 165°


Stability of Digital Control Systems 251

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

(T: 0.5, 1, and 2 s)


R(z) C(z)
∑ GD(s) ZOH Gp(s)
+

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

The open-loop transfer function is

Kz 1 − e−T
G( z) = GD ( z)Z[Gh (s)Gp (s)] = (6.16.2)
z − 1 z − e−T

The characteristic equation of the system is given by

Kz(1 − e−T )
1+ =0 (6.16.3)
( z − 1)( z − e−T )

1. For sampling period Τ = 0.5 s, we have

0.3935Kz
(6.16.2) ⇒ G( z) = (6.16.4)
( z − 1)( z − 0.6065)

G(z) has two poles at z = 1 and z = 0.6065, and a zero at z = 0.


The finding process of the breaking points follows:

( 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

(6.16.6) ⇒ z = 0.7788 and z = −0.7788.

For z = 0.7788 ⇒ K = 0.1244 and for z = −0.7788 ⇒ K = 8.041.


Since both values of the amplification parameter are positive,
z = 0.7788 is the point of departure for the branches of the hori-
zontal axis (break away point) and z = −0.7788 is the break-in
point to the horizontal axis. In the following scheme, the root
locus of the characteristic equation for T = 0.5 s is depicted.
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

1.5 1.25 1 0.75 0.5 0.25


02 1.75

−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

The marginal value of K parameter for stability is calculated as

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

|A(0)|< 1 ⇒ 0.6065 < 1 



|A(1)|> 0 ⇒ 0.3935K > 0 ⇒ K > 0  (6.16.8)

|A(−1)|> 0 ⇒ 1.6065 * 2 − 0.3935K > 0 ⇒ K > 8.1652

Consequently: Kcr = 8.1652


254 Digital Control Systems

The poles of the closed-loop system for K = 2 are given by

z1 = 0.4098 + j0.6623 and z2 = 0.4098 − j0.6623

These poles are marked with bullets in the root locus


diagram.

2. For sampling period Τ = 1 s, we have

0.6321Kz
G( z) = (6.16.9)
( z − 1)( z − 0.3679)

In the following scheme, the root locus of the characteristic


equation for Τ = 1 s is presented.
  G(z) has two poles at z = 1 and z = 0.3679, and a zero at z = 0.
Using the process of finding the breaking points, the breakaway
point is at z = 0.6065 and the break-in point at z = −0.6065. The
corresponding gains are K = 0.2449 and K = 4.083, respectively.
The marginal value of the parameter K for stability is 4.328. The
poles of the characteristic equation which correspond to K = 2
are z1 = 0.05185 + j0.6043 and z2 = 0.05185 − j0.6043, which
are presented in bullets at the root locus diagram.

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 1.75 1.5 1.25 1 0.75 0.5 0.25

−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

3. For sampling period Τ = 2 s, we have

0.8647 Kz
G( z) = (6.16.10)
( z − 1)( z − 0.1353)

In the following scheme, the root locus of the characteristic


equation for Τ = 2 s is presented.

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 1.75 1.5 1.25 1 0.75 0.5 0.25

−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)

  G(z) has two poles at z = 1 and at z = 0.1353, and a zero at z = 0.


Using the process of finding the breaking points, the breakaway
point is at z = 0.3678 and the break-in point at z = −0.3678. The
corresponding gains are K = 0.4622 and K = 2.164, respectively.
The marginal value of the parameter K for stability is 2.626. The
poles of the characteristic equation which correspond to K = 2
are z1 = −0.2971 + j0.2169 and z2 = −0.2971 − j0.2169, which
are presented in bullets at the root locus diagram.

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)

The points of interest for stability are the ones where


the ­frequency response intersects the real axis. In this case,
the imaginary part of the frequency response is zero.

2 sin ω cos ω − 0.6 sin ω ⇒ sin ω(2 cos ω − 0.6) = 0


⇒ sin ω = 0 and 2 cos ω − 0.6 = 0 (6.17.4)
⇒ ω = 0 and ω = arccos(0.3)

For positive values of K, the solution of ω = 0 (z = e0 = 1)


is the starting point of frequency response; therefore is more
interesting to examine the behavior of frequency response at
ω = arccos(0.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

For the stability of the closed system, it should hold G(ejω).


Then, the Nyquist diagram lets the point (−1, 0) to the left.
Stability of Digital Control Systems 257

K
> −1 ⇒ K < 0.92 (6.17.6)
−0.92

  Evaluation of stability using the Jury criterion: The closed-loop


transfer function is

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)

  Formulate the Jury Table

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

  The stability conditions are

1> 0
1 − a2 > 0 (6.17.9)
0.36(1 − a)2
1 − a2 − >0
1 − a2

  Examine the condition: 1 − a2 > 0.

1 − a 2 > 0 ⇒ a 2 < 1 ⇒ −1 < a < 1


(6.17.10)
⇒ −1 < 0.08 + K < 1 ⇒ −1.08 < K < 0.92

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

Examine separately the two inequalities

−(1 − a 2 ) < 0.6(1 − a) ⇒ −1 + a 2 < 0.6(1 − a)


⇒ (0.08 + K )2 + 0.6(0.08 + K ) − 1.6 < 0
⇒ K 2 + 0.16K + 0.0064 + 0.048 + 0.6K − 1.6 < 0
⇒ K 2 + 0.76K − 1.5456 < 0 ⇒ −1.68 < K < 0.92
(6.17.12)

0.6(1 − a) < 1 − a 2 ⇒ 0.6 − 0.6 a < 1 − a 2


⇒ (0.08 + K )2 − 0.6(0.08 + K ) − 0.4 < 0 (6.17.13)
⇒ K 2 + 0.16K + 0.0064 − 0.048 − 0.6K − 0.4 < 0
⇒ K 2 − 0.44K − 0.4416 < 0 ⇒ −0.48 < k < 0.92

Finally, the region of values for the amplification parameter


K for stability of the closed-loop system is K < 0.92 .
Using MATLAB, the root locus of the system characteristic
equation is designed. By clicking onto the intersection points
of the locus branches with the unit circle, we see that K ≈ 0,92
(particularly, we write the commands: H = zpk([],[0.2 0.4],1,1);
rlocus(H)).

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)

The closed-loop transfer function is

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))

Formulate the Jury table

1 −0.6 0.08 K K
a3 = =K
K 0.08 −0.6 1 1

1 − K2 −0.6 − 0.08K 0.08 + 0.6K 0.08 + 0.6K


a2 =
0.08 − 0.6K −0.6 − 0.08K 1−K 2 1− K 2

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

0.08K 3 + 0.6064 K 2 K 4 − 2.36K 2 − 0.096K + 0.9936


+ 0.016K − 0.24 1− K 2
1− K 2

0.08K 3 + 0.6064 K 2 + 0.016K − 0.24


a1
K 4 − 2.36K 2 − 0.096K + 0.9936

Due to the complexity of table terms, we will avoid evaluat-


ing the stability using the Jury criterion and we proceed to the
Nyquist criterion.
With the aid of the following MATLAB commands, the
Nyquist diagram is designed.

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)

Observe that the Nyquist diagram surrounds the point (−1, 0)


as ω increases, therefore the closed-loop system for K = 1 is sta-
ble. In addition, the Nyquist curve intersects the horizontal axis
at the point 1.42, thus the system is stable for K < (1/1.42) = 0.70.
Using the root locus diagram of the system characteristic equa-
tion, we take the same value for K.
rlocus(H)

It is clear that the poles z = 0.2 and z = 0.4 are transferred


outside the unit circle when the gain increases. The gain is 0.706.
Root locus
1.5

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)).

1. Design the Bode diagram of the discrete system that arises


from a system sampling with period T = 1 and a ZOH circuit.
2. Using the transform w = (2/T) (z − 1)/(z + 1), design the Bode
diagrams of G(s) and Gˆ (w) = Gd ( z)|z= f ( w ).
3. At the discrete system, a controller is implemented as in the
scheme. Define the values of Κ so as the closed-loop system is
stable, using the Jury criterion.
4. Design the root locus of the characteristic equation for the
­discretized system.

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)

For T = 1 s, the transfer function of the discretized system


becomes

 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 z = ejωT, the Bode diagram appears to the following


scheme and MATLAB code, correspondingly.

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

10−1 100 101 102

2. It holds that

1 + (T/2)w 2 + w
z= = (6.18.3)
1 − (T/2)w 2 − w

Substituting in the expression (6.18.2), it stems that

^ 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)

In the following scheme, the Bode diagrams of G(s) and


Gˆ (w) = Gd ( z)| 2+w are presented, using MATLAB. Observe that
z=
2−w
the Bode diagrams of the analog and discretized system are not
matched (there is a frequency distortion).

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

Bode diagram of discrete system


100

−100

−200 Bode diagram of analog system

−300

−400

10−1 100 101 102 103

3. The characteristic equation of the closed-loop system is

a( z) = ( z − 0.368)( z − 0.135) + K(0.4 z + 0.148) = 0


(6.18.5)
⇒ a( z) = z 2 + (0.4K − 0.5)z + 0.148K + 0.05 = 0

Based on the Jury criterion, to obtain stability for the closed-


loop system, the inequalities of the expressions (6.18.6) through
(6.18.8) should hold.

a(1) = 1 + (0.4K − 0.5) + 0.148K + 0.05 = 0.548K + 0.55 > 0 (6.18.6)

(−1)2 a(−1) = 1 + (−0.4K + 0.5) + 0.148K + 0.05 = −0.252K + 1.55 > 0


 (6.18.7)
|0.148K + 0.05|< 1 (6.18.8)

From the first inequality, we have K > −1.004.


From the second inequality, we have K < 6.15.
From the third inequality, we have −1 < 0.148K + 0.05 < 1 or
equivalently K > −7.09 and K < 6.419.
The inequalities are jointly true for −1.004 < K < 6.15. (6.18.9)
264 Digital Control Systems

4. The root locus of the compensated system is derived in the


same way as in the case of the continuous-time system. It will
be a circle with center at z = −(0.148/0.4) = −0.37 and parts of
the real axis, as in the following scheme:

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

1. Calculate the region of values for the parameter K so as the


closed-loop system to be stable using the Routh and Jury
criteria.
2. Design the root locus of the system characteristic equation.
3. Design the Bode diagram.

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)

From the expression (16.19.1), using z-transform, the discrete


open-loop transfer function arises.
Stability of Digital Control Systems 265

 K 
G( z) = z  2  * (1 − z1 ) = K 0.368 z + 0.264 (6.19.2)
 s (s + 1)  ( z − 1)( z − 0.368)
 

Stability Evaluation Using the Routh Criterion


To find the region of values of K for stability of the closed
system, we use the Routh criterion with the bilinear transform:

1 + (T/2)w
z= (6.19.3)
1 − (T/2)w

Hence, we transfer to w-domain. The transfer function G(w) is

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)

The characteristic equation is

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

Formulate the Routh table

w2 1 − 0.0381K 0.924K
w1 0.0924 − 0.386K 0
w0 0.924K

For the stability of the closed system, the following inequali-


ties should be satisfied:

1 − 0.0381K > 0 ⇒ K > 26.2


0.924 − 0.386K > 0 ⇒ K < 2.39 (6.19.6)
K>0

Hence, it should hold:

0 < K < 2.39 (6.19.7)

Stability Evaluation Using the Jury Criterion


The characteristic equation of the system is

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

For the stability of the closed system, the following inequali-


ties should be satisfied:

F(1) = 1 + 0.368K − 1.368 + 0.368 + 0.264 K > 0 ⇒ K > 0 (6.19.9)

(−1)2 F(−1) = 1 − 0.368K + 1.368 + 0.368 + 0.264K > 0 ⇒ K < 26.3 (6.19.10)

|a0|<|a2|⇒|0.368 + 0.264K|< 1 ⇒ K < 2.39 (6.19.11)

z0 z1 z2
0.368 + 0.264K 0.368K − 1.368 1

Hence, it should hold: 0 < K < 2.39 (6.19.12)


2. The loop transfer function is written as

0.368 z + 0.2104 0.368K ( z + 0.717 )


G( z) = K = (6.19.12)
( z − 1)( z − 0.368) ( z − 1)( z − 0..368)

The poles are p1 = 1, p2 = 0.368


The zeros are z1 = −0.717
Asymptotes point:

1 + 0.368 − 0.717
σ= = 2.085 (6.19.13)
2 −1

Finding the breaking points

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

Apparently, both roots of the expression (6.19.15) are accepted


as breaking points because in each one of them the gain Κ is
positive, while they belong in the right-most regions, wherein
the number of poles and zeros is odd.
Stability of Digital Control Systems 267

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

We know from the first part of the exercise that we have


stability for K = 2.39. Indeed, at the intersection point of the
branches of root locus with the unit circle, the value of K is 2.39.
Moreover, 1 + KL( z) | = 0, in z = 1∠ ± 75.8°.
K =2.39
3. The loop transfer function is G(z) = (0.368z + 0.264)/
(z2 − z + 0.632).
Set:

1 + 0.5w
z= (6.19.16)
1 − 0.5w

−0.0381(w − 2)(w + 12.14)


⇒ G(w) = G( z) | = (6.19.17)
z=
1+0.5 w w(w + 0.924)
1−0.5 w

The frequency response arises by setting w = jωw. We have that

(1 − ( jωw /2))(1 + ( jωw /12.14))


G( jωw ) = (6.19.18)
jωw (1 + ( jωw /0.924))

ω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

The diagram of the digital system is subsequently designed,


where the gain and phase margins for stability can be estimated.
Bode diagram
30

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

num_s=[1];den_s=conv([1 0],[1 1]);


G_s=tf(num_s,den_s);
T=0.1;G_z=c2d(G_s,T,’zoh’)

We get the transfer function

0.004837 z + 0.004679 0.004837 z + 0.004679


G( z) = = (6.20.1)
z 2 − 1.905z + 0.9048 ( z − 1)( z − 0.905)
Stability of Digital Control Systems 269

The bilinear transform z = (1 + (T 2)w) /(1 − (T 2)w) reflects


the internal of the unit circle in the left w half plane. It is
z = (1 + 0.05w)/(1 − 0.05w) since T = 0.1, thus the loop transfer
function becomes the corresponding one of G(w).

−0.00016w 2 − 0.1872w + 3.81


G(w) = (6.20.2)
3.81w 2 + 3.8w

The characteristic equation is given by: 1 + KG(w)=0, so

(3.81 − 0.00016K )w 2 + (3.8 − 0.1872K )w + 3.81K = 0 (6.20.3)

The Routh Table will be of a form

w2 3.81 − 0.00016K 3.81K


w 1
3.80 − 0.1872K
w0 3.81K

where the region of values for the parameter K for stability is


0 < K < 20.3. Obviously, for K = Kcr = 20.3, the closed system will
be marginally stable, which is numerically verified as follows:

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

num_s=[1];den_s=conv([1 0],[1 1]);


G_s=tf(num_s,den_s);
T=1;G_z=c2d(G_s,T,’zoh’)

The transfer function arises as

0.36788 (z + 0.7183)
G( z) = (6.20.4)
( z − 1)( z − 0.3679)

Apply the bilinear transform to the given loop transfer func-


tion to obtain G(w). Write the new characteristic equation as

1 + KG(w) = 0 ⇒ (1 − 0.03788K )w 2
(6.20.5)
+ (0.9242 − 0.3864K )w + 0.9242K = 0

The Routh table will be of a form

w2 1–0.03788K
w1 0.9242–0.3864K
w0 0.9242K

where the region of values for the parameter K for stability is


0 < K < 2.39. Apparently, for K = Kcr = 2.29, the closed system
will be marginally stable. Observe that for higher sampling
period, the region of values of the parameter K is drastically
reduced to preserve stability, as expected.

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

The resultant transfer function is

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)

the following transfer function in z-domain arises as

0.1944 z( z − 1.248)
gd( z) = (6.22.1)
( z − 0.3679)2 ( z − 0.1353)

To design the root locus of the characteristic equation, write

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.

s = 1 + 0.002445 j(Mag = 1, Zeta = −1)


gain = 7.189 + 0.1294 j( Mag = 7.19, Phaase = 1.031 deg)

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

Intersection point of asymptotes with the real axis

Σp − Σz
σα = = 0.871 − 1.248 ⇒ σα = −0.377 (6.22.4)
n p − nz

Break away points of the real axis

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)

p( z) = 0 ⇒ 1 + gd( z) = 0 ⇒ z 3 − 0.677 z 2 − 0.008 z − 0.018 = 0 (6.22.6)


   

Apply the Jury test for the latter equation

z0 z1 z2 z3

−0.018 −0.008 −0.677 1


1 −0.677 −0.008 −0.018
−0.999 0.677 0.020

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

The following inequalities should hold

p(1) = 0.29 > 0


(−1)n * p(−1) = 1.68 > 0
(6.22.7)
|a0|<|a3|
|b0|>|b2|

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

7.1 Time Response


The time response of a system denotes the behavior of the system over time
for a given input. The time response of a control system consists of two parts:

1. The transient response and


2. The steady-state response

It holds that

y(k ) = yt (k ) + y ss (k ) (7.1)

where yt(k) = the transient response


and yss(k) = the steady-state response
By transient we mean the response of the system directly after its excitation
and before stabilization of its corresponding output.
The term steady state denotes the remaining part of the response after the
attenuation of the transitional part, holding that

y ss (k ) = lim y(k ) (7.2)


k →∞

The time response of a discrete system can be calculated in two ways

1. If the system is being described by a transfer function, first Y(z) is


calculated and then y(k) is calculated via the inverse z-transform.
2. If the system is being described by state space equations, first the
solution of state vector x(k) is derived and then y(k) is calculated.

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

• Unit step function


• Ramp function
• Dirac function
• Parabola function
• Sinusoid function, etc.

The time response of a closed-loop control system can be described as


a function of the location of poles of the transfer function in the complex
plane. The information obtained from the knowledge of the relative loca-
tion of poles of a system practically corresponds to a graphical method
for determining its behavior. The poles of the closed-loop transfer function
Gcl(z) determine the form of the corresponding response, while the zeros of
Gcl(z) determine the fixed terms of the corresponding functions. Specifically,
­moving a zero closer to a pole, the influence rate of the function correspond-
ing to this pole in the system response is decreased.
The time response of a system can be described as a function of two factors

• The velocity of the response, as expressed by the rise time and


peak time.
• The matching level between the actual and the desired system
response, as it is expressed by the percentage of overshoot and set-
tling time.

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.

7.1.1 Impulse Time Response of First-Order Systems


Consider the first-order system with a single pole at z = a, as presented in
Figure 7.1.
In Figure 7.2, the time responses for |a| < 1 are presented, where the
­system is stable; and for |a| > 1 in Figure 7.3, where the system is unstable.
Time and Harmonic Response Analysis Steady-State Errors 277

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.

7.1.2 Impulse Time Response of Second-Order Systems


Consider the second-order system with a pair of complex conjugate poles at
z = re±jθ

Nz−1
G( z) = (7.3)
(1 − re jθ z−1 )(1 − re− jθ z−1 )

The impulse response of the second-order system is expressed as

y(k ) = 2r k ( a cos(kθ ) − β sin( kθ )) (7.4)

N is the number of samples per oscillation of a sinusoidal signal

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.

7.1.3 Step Response of First-Order System


Consider a first-order system with a single pole at z = p

b
G( z) = (7.6)
z−p

The step response is given by

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

For distinguished real poles, the step response yields as

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

1. pi is a real positive pole


The transient response, in this case, is given by

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

  The negative poles correspond to high-frequency oscillations with


a frequency ωs/2.
280 Digital Control Systems

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)

  When the pole pi equals to zero, the transient response is faster


and is called deadbeat control.
4. Case of multiple poles with multiplication factor m
The transient response is presented as

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)

y(kT ) = a1k m−1 p k −1 + a2k m−2 p k −1 +  (7.16)

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

the response exponentially decreases, for −1 < p < 0 decreases with


high-frequency oscillations at a frequency ωs/2 .
5. Complex conjugate poles

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

  The transient response is presented as


k k
yi (kT ) + yi+1(kT ) = ai pi + a i+1 pi+1
k k
= ai e jφi ⋅ pi e jkθi + ai e− jφi ⋅ pi e− jkθi (7.18)
k
= 2 ai ⋅ pi cos (kθi + φi ) 0 < θi < π
Time and Harmonic Response Analysis Steady-State Errors 281

The transient response performs decreasing oscillations having a peri-


odic form. The higher the value of θi (ωT: 0 → π/2 → π), the more intense the
occurred oscillations (oscillation frequency 0 → ωs/4 → ωs/2).

7.1.5 Correlation between Analog and Discrete Time Response


Consider the block diagram of the second-order system, as shown in Figure 7.4.
The transfer function is of a form

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

s1, 2 = −J ωn ± jωn 1 − J 2 = −J ωn ± jωd (7.20)

In Figure 7.5, the two complex planes, s and z, and their joint correlation are
illustrated according to the relation z = eTs.

• Relation between z and J, ωn, ωd


f
j 2π
(7.21)
z = e Ts = eσT e jωT = eσT e fs

z = e Ts = exp ( − J ωnT + jωdT )


 
 2π J ωd ω 
= exp − + j 2π d  ⇒
 1 − J 2 ωs ωs 

 
 2π J ωd 
⇒ z = exp − 
 1 − J 2 ωs 
 (7.22)

ωd 
∠z = 2π
ωs 

R(s) = 1/s ωn2 Y(s)


H(s) =
r=1 s2 + 2ζωns + ω n2

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)

where ks satisfies the condition

ε 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 

  Typically, it holds that

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

0.8 0.7π/T 0.1 0.3π/T


0.2
0.6 0.3
0.8π/T 0.4 0.2π/T
0.5
0.4 0.6
0.7
0.9π/T 0.1π/T
0.8
0.2 0.9

1π/T
0
1π/T

−0.2
0.9π/T 0.1π/T

−0.4

0.8π/T 0.2π/T
−0.6

−0.8 0.7π/T 0.3π/T

0.6π/T 0.5π/T 0.4π/T


−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

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.

7.2 Steady-State Errors


An important factor related to the operation of control systems corresponds
to the error in the steady state (steady-state error—ess(kT)), which appears to the
system output after the transient response period.
284 Digital Control Systems

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

e(t) = r(t) − b(t) (7.29)

To make the analysis feasible, the signal e*(t) is used, thus the steady-state
error, during sampling, is

ess* = lim e * (t) = lim e(kT ) (7.30)


t →∞ k →∞

Applying the z-transform and the final value theorem, we get

ess* = lim e * (t) = lim( z − 1)E( z) (7.31)


t →∞ z →1

For the system of the scheme, we have that

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)]

From the expression (7.33), it is explicitly indicated that the steady-state


error depends on the input signal r(t) and the system features.
Consider the open-loop transfer function in the general form

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:

( 7.33 ),( 7.36 )


A A
⇒ ess* = lim = (7.37)
z →1 1 + lim GH ( z ) 1 + kp
z →1

where kp is the position error constant:

k p = lim(GH ( z)) (7.38)


z →1

  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 

  Consequently, for N = 0, the position error is

A A
ess* = = (7.40)
1 + k p 1 + k dc

while for N ≥ 1 the position error is zero (ess = 0).


2. Ramp input
The z-transform for a ramp input of range A is

ATz
R( z) = (7.41)
( z −1)2

( 7.33 ),( 7.41)


AT
⇒ ess* = lim
( z − 1)(1 + GH ( z))
z →1

A A (7.42)
⇒ ess* = =
lim(( z − 1)/T )GH ( z) kv
z →1

where kv is the velocity error constant.

 z − 1 
kv = lim   GH ( z) (7.43)
 T 
z →1 

 For N = 0 ⇒ kv = 0 and ess = ∞


 For N ≥ 1 ⇒ kv = ∞ and ess = 0
 For N = 1 ⇒ kv = (kdc/T) so: for N = 1 the velocity error is

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

( 7.33 ),( 7.45 )


AT 2 z +1
⇒ ess* =
lim
2 z→1 ( z − 1)2 (1 + GH ( z))
(7.46)
A A
⇒ ess* = =
lim(( z − 1)2/T 2 )GH ( z) k a
→1
z→

where ka is the acceleration error constant.

 ( z − 1)2 
k a = lim  GH ( z) (7.47)
z →1  
 T

 For N ≤ 1 ⇒ ka = 0 and ess = ∞


 For N = 2

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.

7.3 Harmonic Response of Discrete Systems


The term harmonic response or frequency response refers to the time response of
the steady state for a linear time invariant system, whose input is a sinusoidal
288 Digital Control Systems

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

∞ ∞

y(n) = h(n) * x(n0) = ∑


k =−∞
h(k )x(n − k ) = ∑ h(k)e
k =−∞
jω ( n - k )


(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ω )

The following outcomes are provided:

• The output is a sinusoidal signal with circular frequency equal to


the circular frequency of input function.
• The amplitude of output signal is A|H(ejΩ)|, where |H(ejΩ)| is the
complex magnitude of the z-transform for z = ejΩ.
• The output y(n) equals to the input x(n) = ejΩn multiplied with a
weighted function H(ejΩ).

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.

7.4 Formula Tables


The formula Tables 7.2 through 7.6 are discussed here.
Time and Harmonic Response Analysis Steady-State Errors 289

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

Impulse time response of second-order system y(k ) = 2r k ( a cos(kθ) − β sin( kθ))


Nz−1
G( z) =
(1 − re jθ z−1 )(1 − re− jθ z−1 )
2π 360
N = |rad = |deg
θ θ
n
p( z) z Az Bi z
General form for step response of discrete system
p( z) bm z m + b m−1 zm−1 +  + b1 z + b0
Y( z) = =
q( z) z − 1 z − 1
+ ∑ z−p
i=1 i
GCL ( z) = =
q( z) a n z n + an−1 z n−1 +  + a1 z + a0 p( z) p( z)( z − pi )
m where A = Bi =
q( z) z=1 q( z)( z − 1)
b
∏( z − z )
j=1
j
y(k ) = IZT (Y( z))
= m× n
an
∏( z − p )
i=1
i

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

Dominant poles z1,2 = re jϕ ⇒


− ln r
J=
(ln r )2 + ϕ 2
1
ωn = (ln r )2 + ϕ 2
T
290 Digital Control Systems

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

7.5 Solved Exercises


EXERCISE 7.1
Consider the mathematical model of a discrete system, described by
y[n] = 0.3y[n-1] + 0.7x[n] and n ≥ 0
Time and Harmonic Response Analysis Steady-State Errors 291

TABLE 7.6
Error Constants for Various Forms of Closed-Loop Digital Control Systems

+ G1(s) G2(s)

Kp = lim G1(z)HG2(z) H(s)


z→1
(1 – z–1)G1(z)HG2(z)
Kv = lim
z→1 T
(1 – z–1)2 G1(z)HG2(z)
Ka = lim
z→1 T2

+ G1(s) G2(s)

Kp = lim G1(z)G2(z)H(z) H(s)


z→1
(1 – z–1)G
1(z)G2(z)H(z)
Kv = lim
z→1 T
(1 – z–1)2 G1(z)G2(z)H(z)
Ka = lim
z→1 T2

a. Derive the frequency response H(ejΩ).


b. Derive the response for input function: x[n] = sin (0, 3πn) and n ≥ 0

Solution
a. To solve the problem, z-transform is applied to the given differ-
ence equation so as to derive its transfer function.

y[n] = 0.3 y[n − 1] + 0.7 x[n] ⇒ Y( z) = 0.3 z−1Y( z) + 0.7 X( z) ⇒


(7.1.1)
(1 − 0.3 z−1 )Y( z) = 0.7 X( z)

The system transfer function is

Y( z) 0.7 0.7 z
H ( z) = = = (7.1.2)
X( z) 1 − 0.3 z−1 z − 0.3

The frequency response is obtained by setting: z = ejΩ


Hence, we have

0.7 e jΩ
H(e jΩ ) = H( z) z = e jΩ = (7.1.3)
e jΩ − 0.3
292 Digital Control Systems

Yet: e jΩ = cos Ω + j sin Ω


Thus,

0.7 e jΩ
H(e jΩ ) = (7.1.4)
cos Ω − 0.3 + j sin Ω

The magnitude of H(ejΩ) is

0.7 e jω 0.7
H(e jΩ ) = = (7.1.5)
cos ω − 0.3 + j sin ω (cos ω − 0.3)2 + sin 2 ω

The corresponding phase of H(ejΩ) is

0.7 e jΩ sin Ω
ϕ(Ω) = Arg = Ω − tan−1 (7.1.6)
cos Ω − 0.3 + j sin Ω cos Ω − 0.3

b. For input x(n]) = sin(0.3π n) , when n ≥ 0, we have:


Ω = 0.3π = 0.94 rad
The magnitude of frequency response for Ω = 0.3π is

H(e jΩ ) = 0.815 (7.1.7)

The corresponding phase for Ω = 0.3π is

φ(Ω) = 0.3 π − tan−1 (2.81) = −0.29 rad (7.1.8)

Therefore, the system response is

y(n) = e j 0.94 n ⋅ 0.815e− j 0.29 = 0.815 ⋅ e j( 0.94 n−0.29)

or

y(n) = 0.815 sin(0.94n − 0.29) (7.1.9)

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

The frequency response arises by setting: z = e jΩ .


Ω
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 

and since |e(−jΩ/2)| = 1, we get

Ω
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

The frequency response arises by setting: z = ejΩ


2 2

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

H(Ω) = [ H( z)]z = e jΩ = 1 − e− jΩ + e−2 jΩ = e− jΩ (2 cos Ω − 1)


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 Ω 

To design the corresponding diagrams, a has to obtain a certain


value (a = 0.6).
2.6 0.8
2.4
0.6
2.2
0.4
2
1.8 0.2
Phase
Gain

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)

The amplitude of the response equals to

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 Ω

The phase of the response is

sin Ω sin Ω sin Ω


ϕ(Ω) = tan−1 − tan−1 − tan−1 (7.2.14)
cos Ω + 5 cos Ω − 2 cos Ω − 10

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

The amplitude of the response equals to

1 1 1
H 6 (e jΩ ) = = = (7.2.17)
e jΩ + 3 cos Ω + j sin Ω + 3 (cos Ω + 3)2 + sin 2 Ω

The phase of the response is

sin Ω (7.2.18)
ϕ(Ω) = −tan−1
cos Ω + 3
Time and Harmonic Response Analysis Steady-State Errors 297

In the following scheme, the magnitude of the discrete fre-


quency response is illustrated for −10π ≤ Ω ≤ 10π .

Ω −10π −15π/2 −5π −5π/2 0 5π/2 5π 15π/2 10π


H 6 (e jΩ ) 0.5 0.4168 0.316 0.265 0.25 0.265 0.3162 0.4168 0.5

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

The frequency response of ZOH is obtained by setting z = eTjω in the


latter expression, yielding

1 − e−Tjω
Gh 0 ( 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

The amplitude of the frequency response is

sin(ωT/2)
G( jω ) = T (7.3.3)
ωT/2
298 Digital Control Systems

The corresponding phase is

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

The transfer function of FOH is presented as


2
Ts + 1  1 − e−Ts 
G foh (s) = (7.3.5)
s  s 

The frequency response of FOH is obtained by setting z = eTjω in the


latter expression, yielding
2
1 + jωT  1 − e− jωT 
G foh ( jω ) =   (7.3.6)
T  jω 
 

The amplitude and phase of the frequency response are, respectively,


expressed as

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

–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

Design the step response using MATLAB as


u = ones(size(0:10));
num = [0 0.1813];
den = [1 -0.8187];
y = dlsim(num,den,u)
y =
0
0.1813
0.3297
0.4513
0.5507
0.6322
0.6989
0.7535
0.7982
0.8348
0.8647
plot(0:10,y,’o’,0:10,y);

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

The output in z-domain is computed by

2z − 1 z 2z − 1
C( z) = GCL ( z)R( z) = ⋅ = (7.5.1)
z2 z − 1 z2 − z

⇒ C( z) = 2z−1 + z−2 + z−3 + z−4 +  (7.5.2)

Below, the desired system step response is provided

c*(t)

0 T 2T 3T 4T

Ramp response:

Tz
X( z) = Z(r(k )) =
( z −1)

The output in z-domain is computed by

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

Below, the desired system step response is provided


c*(t)

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

p1 = 0.3000 + 0.4583i , p2 = 0.3000 − 0.4583i (7.6.1)

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

The steady-state error is 2.14, as expected.


The system impulse response is

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.

R(z) + E(z) U(z) Y(z)


C(z) GZAS(z)

304 Digital Control Systems

K ( z + a)
GZAS ( z) =
( z − 1)( z − b)

K c ( z − b)
C( z) =
z−c

For 0 < a, b, c < 1

Solution
The error transfer function of the given system is

E( z) 1
= (7.7.1)
R( z) 1 + GZAS ( z)G( z)

For the position error, we have

1
e(∞) = (7.7.2)
1 + Kp

The position error constant is calculated by

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)

Consequently, the position error is

1
e(∞) = =0 (7.7.5)
1 + Kp

For the velocity error, we have

1
e(∞) = (7.7.6)
Kv

The velocity error constant is calculated by

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)

Consequently, the velocity error is

τ (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 

The z-transform of G(s) is

 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 

For step input, the steady-state error equals to

1
K p = lim G( z) = ∞, ess , p = =0 (7.8.3)
z →1 1 + Kp

For ramp input, the steady-state error equals to

1 1
Kv = lim( z − 1)G( z) = 10, ess , v = = 0.1 (7.8.4)
T z →1 Kv
306 Digital Control Systems

For parabolic input, the steady-state error equals to

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 )

Finally, the requested steady-state error is given by

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

 Setting A = 1 − e−T and B = e−T, then the latter function


becomes

(1 − e−T )z−1 Az−1 Y( z)


G( z) = = = (7.10.2)
1 − e−T z−1 1 − Bz−1 X( z)

  The difference equation is derived by

Y( z)(1 − Bz−1 ) = AX( z) ⇒ Y( z) − BY( z)z−1 = AX( z)z−1


⇒ y(k ) − By(k − 1) = Ax(k − 1) (7.10.3)
⇒ y(k ) = Ax(k − 1) + By(k − 1)

b. The system parameters and its input are A = 1 − e−T, B = e−T,


x(k) = 1
The initial conditions are x(k − 1) = 0, y(k) = y(k − 1) = 0,
k=0
Simulation program
While k<100 do
y(k)=Ax(k-1)+By(k-1); Calculation of output
x(k-1)=x(k); y(k-1)=y(k); x(k)=1; k=k+1; Data update
print k, x(k), y(k); Print input and output
End

c. For Τ = 1 s, we have A = 0.6321 and B = 0.3679.


For step input, the response is

y(k ) = 0.6321x(k − 1) + 0.3679y(k − 1) (7.10.4)


308 Digital Control Systems

We proceed by formulating the table of values; output signal fol-


lows its corresponding input.

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

e(k ) = r(k ) − y(k ) (7.11.1)

Using the z-transform, we get

E( z) = z−1 + 0.6 z−2 + 0.2z−3 (7.11.2)

In the discrete-time domain, the error is

e(k ) = Z−1 {E( z)} = 0 ⋅ δ(k ) + 1 ⋅ δ(k − 1) + 0.6 ⋅ δ(k − 2)


(7.11.3)
+ 0.2 ⋅ δ(k − 3) + 0 ⋅ δ(k − 4) + 0 ⋅ δ(k − 5)

In the discrete-time domain, the system input is

r(k ) = k ⋅ 1(k ) = 0 ⋅ δ(k ) + 1 ⋅ δ(k − 1) + 2 ⋅ δ(k − 2)


(7.11.4)
+ 3 ⋅ δ(k − 3) + 4 ⋅ δ(k − 4) + 5 ⋅ δ((k − 5) + 

Hence, the ramp response is presented as

y(k ) = r(k ) − e(k ) = 0 ⋅ δ(k ) + 0 ⋅ δ(k − 1) + 1.4 ⋅ δ(k − 2)


(7.11.5)
+ 2.8 ⋅ δ(k − 3) + 4 ⋅ δ(k − 4) + 5 ⋅ δ(k − 5)

Thus, the ramp output of the system is

y(0) = 0, y(1) = 0, y(2) = 1.4, y(3) = 2.8, y( 4) = 4, y(5) = 5


Time and Harmonic Response Analysis Steady-State Errors 309

Therefore,

y(k ) = k and k ≥ 4 (7.11.6)

EXERCISE 7.12
Consider the transfer function of an analog system, given as
G(s) = K/(s + b).

a. Derive the transfer function in z-domain with or without ZOH.


b. Derive the final value of the step response for both cases.
c. For K = b = 1, design the closed-loop step response using
LabVIEW.

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 

  So, the discretized transfer function is

z a0
G( z) = K = (7.12.2)
z − e−bT0 1 + b1z−1

where a0 = K and b1 = −e−bT0 (7.12.3)

  The corresponding transfer function with ZOH is presented


as

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

a1 = K (1 − e−bT0 ) b and b1 = −e−bT0 (7.12.5)

  The ZOH circuit introduces a delay term along with the


parameter (1 − e−bT0 )/b in the numerator.
310 Digital Control Systems

b. The fixed value of the step response without ZOH is

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

  The fixed value of the step response with ZOH is

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

c. The front panel and block diagram of the vi implemented to


design the requested step function are presented as follows:
It holds that: G(s) = 1/(s + 1) and the resultant pulse transfer
function with ZOH is G(z) = (0.0952)/(z − 0.9048) for T = 0.1 s.
Time and Harmonic Response Analysis Steady-State Errors 311

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).

 1   1 − e−T  T =0.2 0.1813 0.18


OH  =>   → 
 s + 1   z − e−T  z − 0.8187 z − 0.82
(7.13.1)

Similarly, Calculate with ZOH the transfer function 2e−s/(s + 1).

 2e−s  0.36 z−5


G( z) = OH  = (7.13.2)
 s + 1  z − 0.82

The closed-loop transfer function is derived by

Y( z ) (0.36 z−5 /z − 0.82) 0.36 z−5


= =
R( z) 1 + (0.36 z /z − 0.82) z − 0.82 + 0.36 z−5
−5
(7.13.3)
0.36 z−6
=
1 − 0.82z−1 + 0.36 z−6

From the latter expression, the difference equation of the system


arises.

y(k ) = 0.82 y(k − 1) − 0.36 y(k − 6) + 0.36r(k − 6) (7.13.4)

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

1. Derive the closed-loop transfer function of the system.


2. Derive the system step response.
3. Calculate the parameters of the system time response: percent-
age of overshoot, settling time, and steady-state error.

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)/( z − 0.819)( z − 0.741)


(7.14.1),(7.14.2) ⇒ Gcl ( z) =
1 + (0.042z + 0.036)/( z − 0.819)( z − 0.741)
0.042z + 0.036
⇒ Gcl ( z) = 2 (7.14.3)
z − 1.518 z + 0.643

2. Derivation of the system step response.

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)

  From the expression (7.14.4), the difference equation of the


system is derived as
Time and Harmonic Response Analysis Steady-State Errors 313

y(k ) = 1.518 y(k − 1) − 0.643 y(k − 2) + 0.042r(k − 1)


(7.14.5)
= 0.036r(k − 2)

For step input: r(k) = u(k) = 1, ∀k ≥ 0 and initial conditions:


y(−1) = y(−2) = 0, the expression (7.14.5) is iteratively solved as

y(k ) = {0, 0.0420, 0.1418, 0.2662, 0.3909, 0.5003, 0.5860, 0.6459,


0..6817 , 0.6975, 0.6985, 0.6898, 0.6760, 0.6606, 0.6461, 0.6341, 0.6251,...}

3. Steady-state response

y ss = lim(1 − z−1 )Y( z) = lim(1 − z−1 )Gcl ( z)R( z)


z →1 z →1
0.042z + 0.036 1 (7.14.6)
−1
= lim(1 − z ) 2 = 0.624
z →1 z − 1.518 z + 0.643 1 − z−1

  The maximum value of step response is

y max = 0.6985 (7.14.7)

  Percentage of overshoot is

y max − y ss 0.6985 − 0.624


POT = 100% = 100% = 11.94% (7.14.8)
y ss 0.624

  Settling time with a constraint 5%

ts = k sT (7.14.9)

ks should follow the condition of maintaining 5% steady-state


error; thereby

k s ≥ 14 (7.14.10)

(7.14.9),(7.14.10) ⇒ ts = 14 ⋅ 0.1 = 1.4 s (7.14.11)

  Steady-state error

ess = rss − y ss = 1 − 0.624 = 0.376 (7.14.12)

NO T E : POT and ts can be computed by the dominant poles of the


systems.
314 Digital Control Systems

  The closed system poles are the roots of the equation

z 2 − 1.518 z + 0.643 = 0 ⇒ (7.14.13)

z1, 2 = 0.7590 ± j0.2587 = 0.8019e j 0.3285 (7.14.14)

  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

  The values of the expressions (7.14.17) and (7.14.18) are very


close to the ones of the expressions (7.14.8) and (7.14.11).

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

plot(t,u,’k-o’,t,y,’r--*’); % Design the input and output


legend(’Input’,’Output’); % Title of diagram
1.5

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.

1. Setting ωT = πT in the amplitude and phase of the system trans-


fer function:

0.9 z − 0.8
H ( z) = (7.15.1)
z 2 − 1.3 z + 0.4

0.9 e jωT − 0.8


H(e jωT ) = 2 jωT
(7.15.2)
e − 1.3e jωT + 0.4

0.9 e jωT − 0.8


H ( e jωT ) = 2 jωT
e − 1.3e jωT + 0.4
0.9(cos ωT + j sin ωT ) − 0.8
=
cos 2ωT + j sin 2ωT − 1.3(cos ωT + j sin ωT ) + 0.4
0.9 cos ωT − 0.8 + j sin ωT
=
cos 2ωT − 1.3 cos ωT + 0.4 + j(sin 2ωT − 1.3 sin ωT )
(0.9 cos ωT − 0.8)2 + sin 2 ωT
=
(cos 2ωT − 1.3 cos ωT + 0.4)2 + (sin 2ωT − 1.3 sin ωT )2
(7.15.3) ⇒ H(e j 0.2π )  1.3
(7.15.3)
316 Digital Control Systems

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)

2. Setting in the pulse transfer function

z = e jωT = e jπ T = cos(π T ) + j sin(π T ) = 0.809 + j0.5878 (7.15.5)

and then calculate the amplitude and phase as

H(0.809 + j0.5878) = 0.6793 − j1.1036  1.3

Arg( H(0.809 + j0.5878))  −0.94

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.

a. From the corresponding expression for ramp response we have

y(k ) = u + 2 − (6 + (2 / 3)) * (0.8)k + ( 4 + (2 / 3)) * (0.5)k ; (7.16.1)

b. Using the command lsim and


c. Calculating the IZT of the product

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

% Define the given system


numG=1;
denG=[1 0 0];
% Define the controller
Ko=70;
a=2; % D(s) zero
b=10; % D(s) pole
numD=Ko*[1 a];
denD=[1 b];
% Define the closed-loop transfer function
318 Digital Control Systems

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

text(.35,.6,’ (a) 40 Hz’)


hold off

Continuous and digital response using ZOH method


1.5

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

a. Using MATLAB, utilize the following program:

numDz = 1;
denDz = [1 -0.3 0.5];
sys = tf(numDz,denDz,1/20)
pzmap(sys)
axis([-1 1 -1 1])
zgrid on

We used the command pzmap to illustrate the poles and zeros


in the ­complex z-plane. The poles at the denominator are com-
plex conjugate: p1 = 0.1500 + 0.6910i and p2 = 0.1500 − 0.6910i,
320 Digital Control Systems

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.8 0.7π/T 0.1 0.3π/T


0.2
0.6 0.3
0.8π/T 0.4 0.2π/T
0.5
0.4 0.6
0.7
0.9π/T 0.1π/T
0.8
0.2 0.9

0 π/T
π/T

−0.2
0.9π/T 0.1π/T
−0.4

0.8π/T 0.2π/T
−0.6

−0.8 0.7π/T 0.3π/T

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

b. Using LabVIEW and LabVIEW Control Design and


Simulation Module, discrete transfer functions can be d ­ eveloped
and d­ igital control systems can be efficiently simulated.
The poles and zeros of the transfer function can be designed
with the aid of CD Pole–Zero Map VI.
The block diagram and the poles-zeros diagram are respec-
tively presented below.
Time and Harmonic Response Analysis Steady-State Errors 321

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

b. Using LabVIEW and LabVIEW Control Design Module, we add


the CD Step Response VI in the block diagram.
The block diagram and the step response are illustrated
below.

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

In this simulation scenario, the second-order discrete transfer func-


tion H(z) = (z2 − 0.3z − 0.1)/(z2 − 0.55z + 0.595) and its equivalent are
implemented, while it holds that H1(z)H 2(z) = H(z). The simulation goal
is the system evaluation for a rectangular input signal with ­f requency
0.2 Hz. The corresponding front panel for T = 0.01 s is given below.

You might also like