0% found this document useful (0 votes)
26 views62 pages

Notes A2 DiscreteSystems

Uploaded by

Ashok
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)
26 views62 pages

Notes A2 DiscreteSystems

Uploaded by

Ashok
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/ 62

A2 Introduction to Control Theory:

Discrete Time Linear Systems

4 lectures Michaelmas Term 2020 Kostas Margellos


Tutorial sheet 2A2C [email protected]

Syllabus

Discrete time linear systems. The z-transform and its properties. Conversion be-
tween difference equations and z-transform transfer functions. Obtaining the dis-
crete model of a continuous system plus zero order hold from a continuous (Laplace)
transfer function. Mapping from s-plane to z-plane. Significance of pole positions
and implications to stability. Discrete time system specifications. Discrete time
state space systems. Discrete time solutions. Euler discretization.

Lecture notes

These lecture notes are provided as handouts. These notes as well as the lecture
slides that follow the same structure are also available on the web (Canvas).

The first four chapters of the notes follow in part lecture material that was produced
and was previously taught by Prof. Mark Cannon. His input and his permission to
use material from his lecture notes is gratefully acknowledged.

Any comments or corrections shall be sent to [email protected]


2

Recommended text

• G F Franklin, J D Powell & M Workman Digital Control of Dynamic Systems


3rd edition, Addison Wesley, 1998.

Other reading

• R C Dorf & R H Bishop Modern Control Systems Pearson Prentice Hall, 2008
• K J Astrom & R M Murray Feedback Systems: An Introduction for Scientists
and Engineers Princeton University Press, 2008

The course follows the first book above which will be referred to as [Franklin et
al, 1998]; reference to particular book chapters and sections is provided throughout
the notes. Consulting the book for detailed elaboration on several concepts as well
as for additional examples and exercises is highly recommended.
3 CONTENTS

Contents

1 Introduction 5

1.1 Digitization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.2 Motivating examples . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3 Organization of the notes . . . . . . . . . . . . . . . . . . . . . . 8

2 Discrete time linear systems and transfer functions 9

2.1 Sampling and discrete time systems . . . . . . . . . . . . . . . . . 9

2.2 The z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.3 Properties of the z-transform . . . . . . . . . . . . . . . . . . . . 14

2.4 The discrete transfer function . . . . . . . . . . . . . . . . . . . . 16

2.5 Pulse response and convolution . . . . . . . . . . . . . . . . . . . 18

2.6 Computing the inverse z-transform . . . . . . . . . . . . . . . . . 22

2.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3 Discrete models of sampled data systems 24

3.1 Pulse transfer function models . . . . . . . . . . . . . . . . . . . . 24

3.2 ZOH transfer function . . . . . . . . . . . . . . . . . . . . . . . . 28

3.3 Signal analysis and dynamic response . . . . . . . . . . . . . . . . 30

3.4 Laplace and z-transform of commonly encountered signals . . . . . 30

3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4 Step response and pole locations 34

4.1 Poles in the z-plane . . . . . . . . . . . . . . . . . . . . . . . . . 34

4.2 The mapping between s-plane and z-plane . . . . . . . . . . . . . 38


CONTENTS 4

4.3 Damping ratio and natural frequency . . . . . . . . . . . . . . . . 40

4.4 System specifications . . . . . . . . . . . . . . . . . . . . . . . . 40

4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5 Discrete time linear systems in state space form 47

5.1 State space representation . . . . . . . . . . . . . . . . . . . . . . 47

5.2 Solutions to discrete time linear systems . . . . . . . . . . . . . . 50

5.3 Stability of discrete time linear systems . . . . . . . . . . . . . . . 54

5.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

6 Appendix: The inverse z-transform 60


5 Introduction

1 Introduction

1.1 Digitization?

Discrete time systems are dynamic systems whose inputs and outputs are defined
at discrete time instants. Within a control context, digitization is the process of
converting a continuous controller (Figure 1) into a set of difference equations that
can be implemented by a computer within a digital control system (Figure 2). The
digital controller operates on samples of the sensed output, resulting upon analogue
to digital (ADC) conversion, rather than the continuous signal y(t). The generated
discrete time command is then applied to the plant upon digital to analogue (DAC)
conversion. This provides practical advantages in terms of accuracy and noise
rejection, and simplifies monitoring and simultaneous control of large numbers of
feedback loops. However the ability of a digital control system to achieve specified
design criteria depends on the choice of digitization method and sample rate.

Figure 1: Continuous controller.

Figure 2: Digital Controller. The dashed box contains sampled signals.

? [Franklin et al, 1998] §3.1


1.2 Motivating examples 6

1.2 Motivating examples

One motivating example involves an autonomous racing platform for miniaturized


cars. For more details regarding this testbed the reader is referred to the set-up
developed at ETH Zurich (see upper panel of Figure 3), that motivated the recent
racing car platform that is now built at University of Oxford (see lower panel of
Figure 3). The platform consists of a race track, an infrared camera based tracking
system and miniature dnano RC cars. It allows for high-speed, real-time control
algorithm testing.

Figure 3: Upper panel: RC racing car platform at ETH Zurich (figure taken from
http://control.ee.ethz.ch/∼ racing///); Lower panel: RC racing car platform at University of
Oxford.

The general architecture underpinning the operation of each car is shown in Figure
4. It is based in the following sequence of steps:

1. The camera based vision system captures the cars on the track, each of them
characterised by a unique marker pattern.
7 Introduction

actuation
reference command sensor output

Control State
control action algorithm estimation

Figure 4: Block diagram of control architecture for each racing car.

Figure 5: Embedded board of each car (figure taken from http://control.ee.ethz.ch/∼ racing///).

Figure 6: Left panel: Crazyflie arena; Right panel: On board controller.

2. The position and velocity of each car is estimated by means of some state
estimation algorithm, and is broadcasted to the computer used for control
calculation.

3. The control inputs (e.g., speed commands) are sent via Bluetooth to the
1.3 Organization of the notes 8

embedded board microcontroller of each car (see Figure 5), which then drives
around the track.

An additional example involves the CrazyFlies arena, recently developed at the


University of Oxford (see Figure 6). The underlying structure and interplay between
the continuous dynamics and discrete logic of the on board controller follows the
same rationale with the racing car platform.

The overall configuration in both cases is naturally a discrete system, e.g., see on
board microcontroller. The controller could either be designed in continuous time
(using e.g., methods from the first 8 lectures of A2 Introduction to Control The-
ory course) using a continuous time model of car, sampled and then implemented
approximately in discrete time, or it could be designed directly as a discrete system
using a discrete time model of the car. In the sequel we will derive methods that
allow us to analyse both alternatives.

1.3 Organization of the notes

In these notes we will study the entire feedback interconnection of Figure 2: Chapter
2 will introduce discrete time linear systems and the notion of sampling continuous-
time signals. It will focus on the controller block of Figure 2, and provide the
machinery to represent it in discrete-time, introducing the z-transform and the
discrete-time transfer function (similarly to the continuous-time one). Chapter
3 will concentrate on obtaining a discrete-time model (transfer function) of the
DAC-Plant-Sensor-ADC interconnection, while Chapter 4 will focus on the closed-
loop system, and in particular on how we can investigate its stability properties,
analyse its response, and verify whether certain performance criteria are met by
the designed controller. Chapter 5 will introduce the the state space formalism for
discrete time systems, and analyze the structure of their solution in the time-domain,
thus complementing the transfer function developments. It will also discuss the
effects of Euler discretization on approximating differential with difference equations.
Finally, the Appendix provides a more rigorous treatment and proof of the inverse
z-transform.
9 Discrete time linear systems and transfer functions

2 Discrete time linear systems and transfer functions

2.1 Sampling and discrete time systems

Discrete time signals typically emanate from continuous time ones by a procedure
called sampling. If a digital computer is used for this purpose, then we typically
sample the continuous time signal at a constant rate:
T = sample period (or sampling interval);
1/T = sample rate (or sampling frequency) in Hz;
[2π/T = sample rate in rad s−1 ].
By tk = kT for k = {. . . −2, −1, 0, 1, 2, 3, . . . } we denote the sampling instants
or sample times, at which we obtain a “snapshot” of the continuous time signal.
Sampling a continuous signal produces a sampled signal:
sample
y(t) −−−→ y(kT ),

where we refer to y(kT ) as a discrete signal and we will be interchangeably writing


it in one of the following ways:

y(kT ) = y(k) = yk .

Such a signal is the outcome of the analogue to digital conversion (ADC) taking
place at the sensor of our system (see Figure 2). With reference to the same figure,
at the other end of the process the output of the digital controller u(kT ) must
be converted back to a continuous time signal. This is usually done by means of
a digital to analogue converter (DAC) and a hold circuit which holds the output
signal constant during the sampling interval. This is known as a zero-order hold
(ZOH); see also Figure 7.

Figure 7: The piecewise constant signal produced by the ZOH.


2.1 Sampling and discrete time systems 10

Discrete time systems are systems whose inputs and outputs are discrete time
signals. Due to this interplay of continuous and discrete components, we can
observe two discrete time systems in Figure 2, i.e., systems whose input and output
are both discrete time signals. The obvious one refers to the controller block, whose
input is the error signal ek and its output is the actuation command uk . A second
less obvious discrete time system is the one that admits uk as the input and yk as
its output. It has the DAC and ADC converters as well as the plant dynamics that
are in continuous time intervened, but still it is a discrete time system. We refer
to the latter as a sampled data system. Taking the controller block as an example,
to derive the corresponding discrete time system suppose we have a access to the
transfer function of the controller, namely,
U (s) K(s + a)
D(s) = = .
E(s) (s + b)
We first unravel this as

(s + b)U (s) = K(s + a)E(s),

and determine the corresponding differential equation with s replaced by d/dt, i.e.,
du 
de 
+ bu = K + ae .
dt dt

Definition 1 (Euler’s forward and backward approximation). We define Euler’s


forward approximation to the first order derivative by
du uk+1 − uk de ek+1 − ek
≈ and ≈ .
dt T dt T
Similarly, we define Euler’s backward approximation to the first order derivative
by
du uk − uk−1 de ek − ek−1
≈ and ≈ .
dt T dt T

Here we use Euler’s forward approximation in out differential equation to obtain the
difference equation
uk+1 − uk 
ek+1 − ek 
+ b uk = K + a ek .
T T
Finally, to implement the controller we need the new control value, uk+1 ,

uk+1 = (1 − bT )uk + Kek+1 + K(aT − 1)ek .


11 Discrete time linear systems and transfer functions

Normally T , K, a and b are fixed, so what the computer has to calculate every
cycle can be encoded by a standard form recursion

uk+1 = −a1 uk + b0 ek+1 + b1 ek .

It should be noted that the coefficients of the difference equation change with T ,
hence the sample rate is usually kept fixed; the smaller T the more the discrete
system approximates the continuous one (depending on the Euler approximation
used we could formally quantify conditions so that the discrete approximation is at
least not divergent). The obtained recursion provides an input-output representation
of the discrete time system. In particular, the output of the system uk+1 depends
on the past output uk , as well as on the current and past inputs ek+1 and ek ,
respectively. Since this dependency is linear, we refer to such systems as discrete
linear systems.

2.2 The z-Transform

In continuous (linear) systems the Laplace transform was used to transform differ-
ential equations to algebraic ones, since the latter were easier to use in view of
obtaining input-output relationships, and eventually transfer functions. Similarly,
for discrete systems, we will define a new transform, the so called z-transform,
that will allow us to transform difference or recurrence equations to algebraic ones
and construct discrete transfer functions that will allow us to analyze discrete time
systems from an input-output point of view.

Definition 2 (z-Transform). The z-transform E(z) of a discrete signal e(kT )


(i.e., {e0 , e1 , . . .}) is defined by
n o n o
E(z) = Z e(kT ) = Z ek
∞ ∞
−k
ek z −k .
X X
= e(kT ) z =
k=0 k=0

Note: There are two differences with the z-transform definition of [Franklin et al,
1998], that we will be, however, adopting for this course:

1. In [Franklin et al, 1998] the “two-sided” z-transform is used, with the index k
2.2 The z-Transform 12

starting at −∞ whereas these notes (along with HLT) use the “single-sided”
z-transform to correspond to the single sided Laplace transform that you are
already familiar with. In this course, all signal values are defined to be zero for
k < 0 so the two definitions yield the same results.

2. In [Franklin et al, 1998] the z-transform definition was based on the assumption
that upper and lower bounds, respectively, on the magnitude |z| exist, thus
ensuring convergence of the series in the z-transform definition. Here, we
assume throughout that this is the case, and we will impose such bounds on
a case by case basis by exploiting convergence conditions for geometric series
as these are involved in the z-transform definition (see example below).

Example 1. Sample a decaying exponential signal: x(t) = Ce−at U(t), where


U(t) is the unit step function, to give xk = Ce−akT , for k ≥ 0.
Then

xk z −k
X
X(z) =
k=0
∞ ∞
e−akT z −k = C (e−aT z −1 )k .
X X
=C
k=0 k=0

This is a geometric series and has a closed form solution if |e−aT z −1 | < 1, or
equivalently if |z| > e−aT :
C Cz
X(z) = = .
1 − e−aT z −1 z − e−aT

Example 2. Suppose we have a sequence ek such that:

e0 , e1 , e2 , e3 , e4 , . . . = 1.5, 1.6, 1.7, 0, 0, . . .

then delaying e by a period T will create a new sequence (let’s call it fk ) with

f0 , f1 , f2 , f3 , f4 , . . . = 0, 1.5, 1.6, 1.7, 0, . . .


13 Discrete time linear systems and transfer functions

Using the above definition of the z-transform gives:



ek z −k
X
E(z) =
k=0

= 1.5 + 1.6z −1 + 1.7z −2 ,



fk z −k
X
and F (z) =
k=0

= 1.5z −1 + 1.6z −2 + 1.7z −3


= z −1 (1.5 + 1.6z −1 + 1.7z −2 ) = z −1 E(z)

This is an example of a z-transform property that holds true more generally, i.e., if
a signal is delayed by a period T , its z-transform gets multiplied by z −1 .

Example 3. Consider the exponential signal

x(t) = Ce−at U(t),

where U(t) is the unit step function, delayed by T giving rise to

y(t) = Ce−a(t−T ) U(t − T ) ,

then yk = Ce−a(k−1)T for k ≥ 1. Therefore, the z-transform of yk is


∞ ∞
−k
Ce−a(k−1)T z −k
X X
Y (z) = yk z =
k=0 k=1

−1 X
= Cz (e−aT z −1 )k−1
k=1

−1 X
= Cz (e−aT z −1 )j = z −1 X(z)
j=0

C
which gives Y (z) = .
z − e−aT

Z-transform overview

To summarise: X(z) provides an easy way to convert between sequences, recurrence


equations and their closed-form solutions.
2.3 Properties of the z-transform 14

z-Transform
X(z)
Sequence Solution
{x0 , x1 , . . .} xk = x(k)

Recurrence equation
xk = a1 xk−1 + · · · + an xk−n

2.3 Properties of the z-transform?


∞ ∞
fk z −k and G(z) = Z g(kT ) = gk z −k be the
n o X n o X
Let F (z) = Z f (kT ) =
k=0 k=0
z-transform of f and g, respectively. We then have the following properties:

1. Time delay: Z f (kT − nT ) = z −n F (z), for n > 0.


n o

Proof: We have that


∞ ∞
−k
fk−n z −k
n o X X
Z f (kT − nT ) = fk−n z =
k=0 k=n
∞ ∞
fk z −(k+n) = z −n fk z −k = z −n F (z),
X X
=
k=0 k=0

where the first equality follows from the fact that for all k < n, fk−n is assumed
to be zero, and the second inequality follows by a change of the summation index.
Note that in [Franklin et al, 1998] no constraint on n is imposed, since the two-sided
z-transform is employed.
n o
2. Linearity: Z αf (kT ) + βg(kT ) = αF (z) + βG(z).

Proof: We have that



(αfk + βgk )z −k
n o X
Z α f (kT ) + βg(kT ) =
k=0
∞ ∞
fk z −k + β gk z −k = αF (z) + βG(z).
X X

k=0 k=0
? [Franklin et al, 1998] §4.6
15 Discrete time linear systems and transfer functions

n o d n o
3. Differentiation: Z k f (kT ) = −z Z f (kT ) .
dz

Proof: We have that


d n d X ∞
fk z −k
o
−z Z f (kT ) = −z
dz dz k=0
∞ ∞
(−k)fk z −k−1 = kfk z −k = Z k f (kT ) .
X X n o
= −z
k=0 k=0

 
X∞ 
4. Convolution: Z  f (iT ) g(kT − iT ) = F (z) G(z).
i=0

Proof: We have that


 
∞ ∞ X
∞ ∞
∞ X
fi gk−i z −k = fi gp z −(p+i)
X  X X
Z f (iT ) g(kT − iT ) =
i=0 k=0 i=0 p=0 i=0
∞ ∞
−i X
gp z −p
X
= fi z = F (z)G(z),
i=0 p=0

where the second equality follows from changing k − i to p, and noticing that
the summation limits remain unchanged since all terms corresponding to negative
indices are assumed to be zero. For the last equality notice that i and p are arbitrary
variables so each summation corresponds to the z-transform of f and g, respectively.
n o
5. Final value theorem: lim f (kT ) = lim (z − 1)F (z) , if the poles of
k→∞ z→1
(z − 1)F (z) are inside the unit circle and F (z) converges for all |z| > 1.

Proof: We have that



fk z −k
X
(z − 1)F (z) = (z − 1)
k=0
∞ ∞
fk z −(k−1) − fk z −k
X X
=
k=0 k=0
∞ ∞
fk z −(k−1) − fk z −k
X X
= f0 z +
k=1 k=0
∞ ∞
fk+1 z −k − fk z −k
X X
= f0 z +
k=0 k=0
K
(fk+1 − fk )z −k ,
X
= f0 z + lim
K→∞ k=0
2.4 The discrete transfer function 16

where the fourth equality follows from the third one by changing the summation
index of the first summation, and the last one constitutes an equivalent way of
representing a summation limit that tends to infinity.

Take now in both sides the limit as z tends to one. We then have that
 K 
(fk+1 − fk )z −k ,
X
lim(z − 1)F (z) = lim f0 z + lim
z→1 z→1 K→∞ k=0
K
X
= f0 + lim (fk+1 − fk )
K→∞ k=0

= f0 + lim fK+1 − f0 = lim f (kT ),


K→∞ k→∞

where the second equality follows from the first one by exchanging the order of
limits and taking the limit as z → 1. The third equality is due to the fact that
PK
k=0 (fk+1 −fk ) is a so called telescopic series, with all intermediate terms cancelling
each other.

It should be noted that the fact that F (z) converges for all |z| > 1 justifies our
assumption that the summation of terms corresponding to negative indices is zero
and ensures that limk→∞ fk exists, while the fact the poles of the poles of (z −
1)F (z) are inside the unit circle ensures that taking the limit with respect to z is
well defined, and the exchange of limits in the previous derivation is justified. Such
a condition will be discussed in more detail in Chapter 5. Note that in [Franklin et
al, 1998], §4.6.1, an alternative proof is provided.

2.4 The discrete transfer function?

We have already seen that in a typical controller the new control output is calculated
as a function of the new error, plus previous values of error and control output. In
general we have a linear recurrence equation (also often called a linear difference
equation),

uk = −a1 uk−1 − a2 uk−2 − · · · − ak−n uk−n + b0 ek + b1 ek−1 + · · · + bm ek−m


n
X m
X
=− ai uk−i + bj ek−j .
i=1 j=0

? [[Franklin et al, 1998] et al, 1998] §4.2


17 Discrete time linear systems and transfer functions

Let U (z) and E(z) denote the z-transforms of uk and ek , respectively. Using the
linearity and time delay properties of the z-transform we have that

U (z) = −a1 z −1 U (z) − a2 z −2 U (z) − · · · + b0 E(z) + b1 z −1 E(z) + · · ·

Rearranging terms, we obtain the z-transform transfer function:


U (z) b0 + b1 z −1 + b2 z −2 + · · ·
D(z) = = .
E(z) 1 + a1 z −1 + a2 z −2 + · · ·

We can turn the transfer function into a rational function of z by multiplying


numerator and denominator by z n (so that the last coefficient in the denominator
is an ):
b0 z n + b1 z n−1 + b2 z n−2 + · · · + bm z n−m
D(z) = .
z n + a1 z n−1 + a2 z n−2 + · · · + an

Definition 3 (Discrete transfer function). The z-transform transfer function


is given in a factorized form by
Πm (z − zj ) n−m
D(z) = b0 j=1 z ,
Πni=1 (z − pi )
assuming b0 6= 0. Similarly to the continuous case, zj , j = 1, . . . , m, are said
to be the zeros and the pi , i = 1, . . . , n, are the poles of D(z), and occur
either as real numbers or in complex conjugate pairs.

Clearly when n > m, there are (n − m) zeros at the origin and when n < m, there
are (m − n) poles at the origin. Like continuous systems we must have at least as
many poles as zeros? . If b0 6= 0, we have an equal number of each and if b0 = 0,
we have one fewer zero. Likewise if b0 = b1 = 0 we have two fewer zeros, etc.

By defining z-domain transfer functions in this way, we can extend to discrete sys-
tems all the techniques that were developed for continuous systems in the s-domain.
In particular, series or feedback interconnections among transfer functions as often
encountered in block-diagrams are addressed identically with the continuous-time
case. However, when it comes to stability and performance analysis certain differ-
ences are encountered; these are discussed in Chapter 4.
?A
greater number of zeros than poles in D(z) would indicate that the system is non-causal since uk
would then depend on ek+i , for i > 0.
2.5 Pulse response and convolution 18

2.5 Pulse response and convolution

2.5.1 Pulse response

In continuous systems there is a fundamental connection between the transfer func-


tion in the frequency domain and the impulse response in the time domain – they
constitute a Laplace transform pair. We will investigate the analogous property for
discrete systems.

E(z) U (z) = D(z) E(z)


D(z)

e(kT ) ? u(kT ) = ?

Take the case where e(kT ) is the discrete version of the unit pulse, i.e.,

1 for k = 0,


ek = 
0

for k > 0

this can be written as ek = δk , where δk is the δ-function.

In this case

ek z −k = 1 ⇒ U (z) = D(z) E(z) = D(z).
X
E(z) =
k=0

As we have applied a unit pulse to this system, the output, u(kT ) will be its pulse
response and U (z) will be the z-transform of the pulse response. This implies that,
similarly to the continuous time case,

Fact 1 (Pulse response = transfer function). The transfer function D(z) is


the z-transform of the pulse response.

Example 4. Suppose a controller is defined by the recurrence equation:


T
uk = uk−1 + (ek + ek−1 ).
2
After some algebraic manipulation we deduce that the transfer function from
19 Discrete time linear systems and transfer functions

E(z) to U (z) is given by


 
U (z) T  z + 1 
D(z) = = .
E(z) 2 z−1
To verify this, apply a unit pulse, ek = δk and look at the pulse response
(assume as always that uk = 0 for k < 0):
k uk−1 ek ek−1 uk
0 0 1 0 T /2
1 T /2 0 1 T
2 T 0 0 T
3 T 0 0 T
.. ..
. .
The z-transform of uk is:

U (z) = T /2 + T z −1 + T z −2 + T z −3 + . . .

T z −k − T /2
X
=
k=0
 
T T T z + 1
= − = , [for |z| > 1],
1 − z −1 2 2 z−1
which is equal to D(z) as expected.

2.5.2 Convolution

Consider the following interconnection:

E(z) U (z) = D(z) E(z)


D(z)

e(kT ) d(kT ) u(kT ) = e(kT ) ∗ d(kT )

Because the system is linear and because e(kT ) is just a sequence of values, for
example, e0 , e1 , e2 , e3 , e4 , . . . = 1.0, 1.2, 1.3, 0, 0, . . ., we can decompose e(kT ) into
a series of pulses: e(kT ) = 1.0δk + 1.2δk−1 + 1.3δk−2 .
2.5 Pulse response and convolution 20

We can now determine the response of u(kT ) for each of the individual pulses and
simply sum them to get the response when the input is e(kT ). Suppose the pulse
response of the system is:

d0 , d1 , d2 , d3 , d4 , d5 , . . . = 1, 0.5, 0.3, 0.2, 0.1, 0, . . .

Then we obtain:
k 0 1 2 3 4 5 6 7
e(kT ) 1 1.2 1.3 0 0 0 0 0
e(0) d(kT ) 1 0.5 0.3 0.2 0.1 0 0 0
e(1) d(kT − T ) 0 1.2 0.6 0.36 0.24 0.12 0 0
e(2) d(kT − 2T ) 0 0 1.3 0.65 0.39 0.26 0.13 0
u(kT ) 1 1.7 2.2 1.21 0.73 0.38 0.13 0
From the table it can be observed that

u0 = e0 d0 ,
u1 = e0 d1 + e1 d0 ,
u2 = e0 d2 + e1 d1 + e2 d0 ,
u3 = e0 d3 + e1 d2 + e2 d1 + e3 d0 ,
..
.
k
X
uk = ei dk−i ,
i=0

which is the convolution of the input and the pulse response (sometimes written
as uk = ek ∗ dk ). A graphical calculation of convolution can be shown in Figure 8.
From the last row of the table, it can be shown that the z-transform of u(kT ) is
given by

u(kT )z −k = 1 + 1.7z −1 + 2.2z −2 + . . .
X
U (z) =
k=0

On the other hand, we can easily calculate the z-transforms of e(kT ) and d(kT )
which are given by

e(kT )z −k = 1 + 1.2z −1 + 1.3z −2 + . . .
X
E(z) =
k=0

d(kT )z −k = 1 + 0.5z −1 + 0.3z −2 + . . .
X
D(z) =
k=0
21 Discrete time linear systems and transfer functions

It can be directly verified, that U (z) = D(z)E(z), as expected due to the convo-
lution property of the z-transform. In general, the following fact holds.

Fact 2 (Prodcust in the z-domain = Convolution in the time domain). Mul-


tiplying the input by the transfer function in the z-domain is equivalent to
convolving the input with the pulse response in the time domain.

u0 = e0 d0 u1 = e0 d1 + e1 d0

u2 = e0 d2 + e1 d1 u3 = e0 d3 + e1 d2
+ e2 d0 + e2 d1 + e3 d0

Figure 8: Graphical illustration of the setps required to compute the convolution of two sequences, i.e.,
ek and dk .

It should be noted that for continuous systems, it is usually more convenient to


multiply in the frequency domain than to convolve in the time domain (which
involves integrating). However for discrete systems the convolution involves only
multiplying and adding, so is very easy to perform using a computer.
2.6 Computing the inverse z-transform 22

2.6 Computing the inverse z-transform

We have determined already a few methods to compute the z-transform Y (z) given
a sequence yk :

P∞ −k
1. Evaluate the sum Y (z) = k=0 yk z directly.
This method was used earlier to compute the z-transform of a sequence with
only a finite number of non-zero terms. It was also the method used to compute
the z-transform of exponential signals using the formula for a geometric series.

2. Use standard results in tables (e.g. HLT p. 17).

What has not been discussed yet is how to obtain a discrete time signal if its z-
transform is available, or in other words, we have not discussed about the inverse
z-transform Some methods of determining the inverse z-transform yk of a function
Y (z) are provided below:

1. Determine the coefficients y0 , y1 , y2 , . . . of 1, z −1 , z −2 , . . . by computing the


Maclaurin series expansion of Y (z). For example,
1 − z −1 z −1
Y (z) = =1−2 = 1 − 2z −1 (1 − z −1 + z −2 − . . .)
1 + z −1 1 + z −1
= 1 − 2z −1 + 2z −2 − . . . = Z{1, −2, 2, −2, . . .},
so {y0 , y1 , y2 , y3 , . . .} = {1, −2, 2, −2, . . .} or yk = 2(−1)k − δk .

2. Use standard results in tables (e.g. HLT p. 17). For example,


z sin aT
Y (z) = = Z{0, sin(aT ), sin(2aT ), . . .},
z 2 − 2z cos aT + 1

hence yk = sin(akT ) for k = 0, 1, . . ..

3. Treat Y (z) as a transfer function and determine its pulse response yk . For
example,

1 + 2z −1
Y (z) = =⇒ yk − 2yk−1 = δk + 2δk−1 Z with yk = 0 for k < 0,
1 − 2z −1
hence {y0 , y1 , y2 , . . .} = {1, 4, 8, 16, . . .} or yk = 2k+1 − δk , for k = 0, 1, . . ..
23 Discrete time linear systems and transfer functions

4. The inverse z-transform is defined by


−1 1 I
z k−1 F (z) dz
n o
f (kT ) = Z F (z) =
2πj
(where the contour encircles the poles of F (z)).
Calculating such an integral can be significantly more difficult compared to the
(forward) z-transform (see Appendix for a detailed elaboration). This is also
the case with the inverse Laplace transform, where the standard calculation
practice is to consider the partial fraction expansion of the transfer function
and determine the factors by means of transform tables.

2.7 Summary

This main learning outcomes of the chapter can be summarized as follows:

• Discrete time systems are represented by means of recurrence equations.


P∞
• The z-transform of a sequence uk is defined U (z) = k=0 uk z −k .

• The z-transform exhibits certain interesting properties: Time delay; Linearity;


Differentiation; Convolution; Final value theorem.

• Discrete transfer functions can be determined directly from linear recurrence


equations using the z-tranform.

• Discrete transfer functions map the z-transform of the input sequence to the
z-transform of the output sequence, e.g., U (z) = D(z)E(z).

• The discrete transfer function of a linear system is the z-transform of the


system’s pulse response.

• Multiplication in the z-domain is equivalent to convolution in the time-domain,


P∞
e.g., uk = i=0 ei dk−i .

• Given the z-transform Y (z), different methods were discussed to obtain its
inverse yk .
24

3 Discrete models of sampled data systems

3.1 Pulse transfer function models?

The z-domain provides a means of handling the discrete part of the system. It
remains to deal with the rest of the system, namely the plant, actuators, sensors
etc, which operate in continuous time, or in other words computing the transfer
function of the so called sampled data system between uk and yk with reference to
Figure 2. For convenience, this part is shown in Figure 9. To this end, given the
continuous part of the system, G(s), driven by a zero-order hold, the problem is to
calculate a transfer function† G(z).

Figure 9: Sampled data system.

To achieve this, first consider the ZOH. For each sample time k it admits uk as
input and has the continuous time signal u(t) (rectangular pulse of height uk and
width T ) as output (see Figure 10).

Figure 10: Zero-order hold impulse response

For each sample uk , the output of the ZOH is therefore a step of height uk at time
tk = kT plus a step of height −uk at time tk+1 = (k + 1)T , so the continuous
? Franklin
§4.3
† Wedenote the continuous and discrete transfer functions of a sampled data system G as G(s) and
G(z) respectively. These functions of s and of z will not generally be the same – whether we’re talking
about the continuous or discrete model is indicated by whether the argument is s or z.
25 Discrete models of sampled data systems

signal at the output of the ZOH has the Laplace transform:


    uk uk
= e−kT s
− e−(k+1)T s

L uk . U(t − kT ) − L uk . U t − (k + 1)T
s s
−T s
(1 − e ) −kT s
= uk e ,
s
where U(t) is the unit step function at t = 0. By means of superposition, considering
samples for k = 0, 1, . . ., the Laplace transform of the output of ZOH is given by

X (1 − e−T s ) −kT s
U (s) = uk e .
k=0 s

However, in Section 2.5, it was shown that the pulse response of a system coincides
with its discrete time transfer function, i.e., Y (z) = G(z) when uk = δk . Therefore,
to calculate G(z) it suffices to set uk = δk and compute Y (z).

To this end, we can follow a five-step process to compute G(z):

1. Compute Y (s) for uk = δk . Consider the Laplace transfer function of the


(1 − e−T s )G(s) −kT s
output, which is given by G(s)U (s) = ∞ u e . Setting
P
k=0 k
s
uk = δk , all terms in the summation become zero except from the term
corresponding to k = 0. Hence,
G(s)
Y (s) = (1 − e−T s ) .
s
2. Compute the continuous time output y(t). Taking the inverse Laplace
transform of Y (s),
−T s
−1 (1 − e )G(s) 

y(t) = L .
s
3. Compute the discrete time output yk by sampling y(t).
(1 − e−T s )G(s) 
 

yk = L−1
 
.
s t=kT 

4. Compute the z-Transform G(z). Compute the z-Transform Y (z) of yk ,


and recall that for the pulse response we have that G(z) = Y (z). Hence,
(1 − e−T s )G(s) 
 

G(z) = Z L−1
 
.
s t=kT 

5. Simplify G(z). Recall that e−T s represents a delay of T , which is equivalent


to z −1 in the z-transform domain. Therefore, the expression for G(z) can be
simplified as summarized below.
3.1 Pulse transfer function models 26

The sampled data system transfer function is given by


 

G(s) 
G(z) = (1 − z −1 )Z L−1
 
.
s t=kT 
 
 G(s) 
For simplicity, this operation can be written as (1 − z −1 )Z  .
s 

a
Example 5. Suppose that G(s) = . Then, using the formula above,
s+a
G(z) is obtained from
 
a 
G(z) = (1 − z −1 )Z L−1

s(s + a) 
 

1 1 
= (1 − z −1 )Z L−1 −

s (s + a) 
n 
−1 −at
o
= (1 − z )Z U(t) − e U(t) t=kT

= (1 − z −1 )Z U(kT ) − e−akT U(kT ) .


n o

But the z-transform of the unit step function is


∞ z
z −k =
n o X
Z U(kT ) = , for |z| > 1,
k=0 z−1
and similarly the exponentially decaying term has z-transform
∞ z
Z e−akT U(kT ) = e−akT z −k = for |z| > e−aT .
n o X
,
k=0 z − e−aT
Hence,

z z 
1 − e−aT
G(z) = (1 − z −1 ) − = .
z − 1 z − e−aT z − e−aT

Example 6. Now suppose that the ADC and DAC in the previous example
are not synchronized, and that there is a fixed delay of τ seconds between
sampling the plant output at the ADC and updating the DAC, 0 ≤ τ ≤ T .
This situation arises for example if there is a non-negligible processing delay
(known as latency) in the controller. The delay has exactly the same effect
as a delay of τ in the continuous system, which is represented as a factor
27 Discrete models of sampled data systems

e−sτ multiplying G(s). Thus we can determine a new pulse transfer function,
Gτ (z), which represents the same plant as G(z) but now includes the delay
of τ :
e−sτ a 
 

−1 −1

Gτ (z) = (1 − z )Z L
s(s + a) 
= (1 − z −1 )Z U(kT − τ ) − e−a(kT −τ ) U(kT − τ ) .
n o

Substituting for
∞ 1
z −k =
n X
Z U(kT − τ )} = ,
k=1 z−1
∞ e−a(T −τ )
Z e−a(kT −τ ) U(kT − τ ) = e−a(kT −τ ) z −k =
n o X
,
k=1 z − e−aT
(recall that τ < T so the impulse response is delayed by at most one sample),
and rearranging gives

−1 (1 − e−a(T −τ ) )z + (e−a(T −τ ) − e−aT )


Gτ (z) = z .
z − e−aT
Notice that if τ = T , then Gτ (z) = z −1 G(z), as expected.

Pulse transfer functions of systems with several outputs

A discrete transfer function can only describe the map from one discrete signal
to another. This is important to remember when calculating the pulse transfer
functions of systems with more than one output variable.

Consider for example the system in Figure 11, which has two output variables: y
and z. The pulse transfer function between uk and yk is
Y (z) −1

G1 (s) 
= (1 − z )Z ,
U (z) s
whereas that from uk to zk is clearly
Z(z) −1

G1 (s)G2 (s) 
= (1 − z )Z .
U (z) s
Even though z is related to y via Z(s) = G2 (s)Y (s), this cannot be used directly
to simplify computation of the the pulse transfer function from uk to zk because z
3.2 ZOH transfer function 28

and y are related by a purely continuous system, and in particular


−1 G1 (s)G2 (s) 

−1

G1 (s)   
(1 − z )Z 6= (1 − z )Z Z G2 (s) .
s s

Figure 11: Sampled data system with two outputs.

3.2 The ZOH transfer function

In the previous section DAC and ZOH were considered together. We now focus on
their individual effects on the signals involved, as shown in Figure 12. To this end,
recall that the Laplace transform of the signal at the output of the ZOH is given
by U (s) = ∞ k=0 uk e
−kT s
(1 − e−T s )/s. However, u∗ (t) is a train of Dirac functions,
P

hence U ∗ (s) = ∞ k=0 uk e


−kT s
.
P

As U (s) = ZOH(s)U ∗ (s), by a direct comparison between the expressions of U (s)


and U ∗ (s), we obtain
1 − e−T s
ZOH(s) = .
s
This suggests that the DAC conversion process can be represented mathematically
by two operations: construction of U ∗ from the discrete input signal uk ; and, then
filtering by ZOH(s) = (1 − e−sT )/s.

Using the inverse Laplace transform we have that


 ∞  ∞
∗ −1 ∗ −1 X −kT s
n o X
u (t) = L U (s) = L uk e = uk δ(t − kT ) ,
k=0 k=0
i.e., a train of δ-functions. The time-domain signal u(t) after the ZOH is the filtered
version of u∗ shown in Figure 12. The signals in the output are derived based on a
similar reasoning.
29 Discrete models of sampled data systems

uk u*(t) u(t) y(t) y*(t)


DAC ZOH G(s) sample ADC yk

G(z)
uk u*(t) u(t) y(t) y*(t) yk
k t t t t k
Figure 12: Impulse modulation model of sampled signals in a sampled data system.

1
| ZOH ( j ! ) | / T

0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
!T/2"

Figure 13: The gain of the ZOH frequency response, ZOH(jω) .

We can compute the ZOH frequency response, which leads to


(1 − e−jωT ) −jωT /2 (e
jωT /2
− e−jωT /2 )
ZOH(jω) = = Te
jω jωT
sin(ωT /2)
= T e−jωT /2 ,
ωT /2
n o
which has phase arg ZOH(jω) = −ωT /2, and gain
sin(ωT /2)
ZOH(jω) = T = T |sinc(ωT /2)|.
ωT /2
Therefore, the ZOH introduces a phase lag of −ωT /2, and its magnitude follows a
sinc function (Figure 13). It can be observed that the magnitude remains approx-
π
imately constant for ω ≤ 30T (dashed line in Figure 13), while for that value the
π
phase lag becomes negligible, i.e., 30 ≈ 6◦ . This observation suggests that for the
effect of the ZOH to be negligible as far as reproducing a signal close to the original
continuous one is concerned, the sampling rate 1/T should be quite high (at least
30 times the bandwith for bandlimited signals). Note that this should not be con-
fused with the Nyquist’s sampling theorem, which requires sampling with frequency
3.3 Signal analysis and dynamic response 30

at least two times the bandwidth (for bandlimited signals) to avoid aliasing.

3.3 Signal analysis and dynamic response?

The z-transform can be used to compute the response of a discrete system analo-
gously to the way that Laplace transforms are used for continuous systems:

U (z) Y (z) = G(z) U (z)

G(z)
u(kT ) y(kT )

1. Compute the transfer function G(z) of the system.

2. Compute the transform U (z) of the input signal u(kT ) (or look it up in tables).

3. Multiply the transform of the input by the transfer function to find the trans-
form of the output Y (z).

4. Invert this transform to obtain the output y(kT ) (or look it up in tables).

3.4 Laplace and z-transform of commonly encountered signals

The following two tables provide the z-transforms for several useful signals. It should
be noted that:

1. All of these z-transforms (and Laplace transforms) apply to signals f where


F (z) = Z{f (kT )} (and F(s) = L{f (t)}).

2. In all cases, the functions of t are zero for t < 0.

3. The closed form solutions for F (z) are valid for |z| > |pi |, where pi are their
pole positions.
? [Franklin et al, 1998] §4.4
31 Discrete models of sampled data systems

4. The inverse z-transform can be calculated by means of such tables. Explicit


calculation is significantly more difficult, since it involves computation of a
contour integral (see Appendix).

5. If the main objective is to determine the system output yk for a specific input
uk , it may well be easier to perform the convolution of the input with the
impulse response of the system, or to iterate the difference equation. The
main purpose of z-transforms in this context is to predict the system response
using the poles and zeros of the pulse transfer function, as it will be discussed
in Chapter 4.

F(s) f (kT ) F (z)


— 1, k = 0; 0, k 6= 0 1
— 1, k = m; 0, k 6= m z −m
1 z
1(kT )
s z−1
1 Tz
kT
s2 (z − 1)2
1 1 T 2 z(z + 1)
(kT )2
s3 2! 2 (z − 1)3
1 1 T 3 z(z 2 + 4z + 1)
(kT )3
s4 3! 6 (z − 1)4
1 (−1)m−1 ∂ m−1 −akT (−1)m−1 ∂ m−1 z
lim e lim
sm a→0 (m − 1)! ∂am−1 a→0 (m − 1)! ∂am−1 z − e−aT

1 z
e−akT
s+a z − e−aT
1 T ze−aT
kT e−akT
(s + a)2 (z − e−aT )2
1 1 2 −akT T 2 −aT z(z + e−aT )
(s + a)3 2 (kT ) e 2
e
(z − e−aT )3
1 (−1)m−1 ∂ m−1 −akT (−1)m−1 ∂ m−1 z
e
(s + a)m (m − 1)! ∂am−1 (m − 1)! ∂am−1 z − e−aT
a −akT z(1 − e−aT )
1−e
s(s + a) (z − 1)(z − e−aT )
3.4 Laplace and z-transform of commonly encountered signals 32

F(s) f (kT ) F (z)


z (aT −1+e−aT )z +(1−e−aT −aT e−aT )
h i
a 1
(akT −1+e−akT )
s2 (s + a) a a(z − 1)2 (z − e−aT )
b−1 (e−aT − e−bT )z
e−akT − e−bkT
(s + a)(s + b) (z − e−aT )(z − e−bT )
−aT
h i
s z z − e (1 + aT )
(1 − akT )e−akT
(s + a)2 (z − e−aT )2
−aT −aT −2aT −aT −aT
h i
a2 z z(1−e −aT e )+e −e +aT e
1 − e−akT (1+akT )
s(s + a) 2 (z − 1)(z − e−aT )2
−aT −bT
h i
(b − a)s z z(b − a) − (be − ae )
be−bkT − ae−akT
(s + a)(s + b) (z − e−aT )(z − e−bT )
a z sin aT
sin akT
s 2 + a2 z 2 − (2 cos aT )z + 1
s z(z − cos aT )
cos akT
s 2 + a2 z 2 − (2 cos aT )z + 1
s+a −akT z(z − e−aT cos bT )
e cos bkT
(s + a)2 + b2 z 2 − 2e−aT (cos bT )z + e−2aT
b −akT ze−aT sin bT
e sin bkT
(s + a)2 + b2 z 2 − 2e−aT (cos bT )z + e−2aT
a2 + b 2 z(Az + B)
h i 1−e−akT (cos bkT  
2
s (s+a) +b 2
a (z − 1) z 2 − 2e−aT (cos bT )z + e−2aT
+ sin bkT )
b
a
A = 1 − e−aT cos bT − e−aT sin bT
b
a
B = e−2aT + e−aT sin bT − e−aT cos bT
b
33 Discrete models of sampled data systems

3.5 Summary

The main learning outcomes of this chapter can be summarized as follows:

• The pulse transfer function:


 

G(s) 
G(z) = (1 − z −1 )Z L−1
 
,
s t=kT 
gives the sampled output response of a continuous system G(s), when the
input is supplied by a ZOH.

• The ideal ZOH transfer function ZOH(s) has


n o
gain: ZOH(jω) = T sinc(ωT ) , phase: arg ZOH(jω) = −ωT /2.

• The exact response yk of a sampled data system to a discrete input signal uk


can be determined from G(z) by:

– computing Y (z) = G(z)U (z) and yk = Z −1 {Y (z)};


– or by iterating the discrete time recurrence equation implied by G(z);
– or by convolution: yk = gk ∗ uk .
34

4 Step response and pole locations

As for continuous systems, the poles, zeros and the d.c. gain of a discrete trans-
fer function provide all the information needed to estimate the response. When
designing a controller, an understanding of how the poles affect the approximate
response is often more insightful than the ability to compute the exact response.
This chapter provides a characterization of the system response in terms of the
locations of the poles of the discrete transfer function.

4.1 Poles in the z-plane

We will start with the z-transform of a cosine which grows or decays exponentially.
This will provide insight on the location of poles in the z-plane and their effect on
the response of the system.

Let y(t) = e−at cos(bt) U(t) (where U(t) is the unit step function). We then have
that
y(kT ) = rk cos(kθ) U(kT ), with r = e−aT , θ = bT,
= rk 21 (ejkθ + e−jkθ ) U(kT ).
Its z-transform is given by
∞ ∞
1 X k jkθ −k 1 X k −jkθ −k
Y (z) = 2 r e z + 2 r e z
k=0 k=0
1 1 1 1
= −1
+ [for |z| > r]

2 1 − re z 2 1 − re−jθ z −1
1 z 1 z
= +
2 z − rejθ 2 z − re−jθ
z(z − r cos θ) z(z − r cos θ)
= . [= ]
(z − rejθ )(z − re−jθ ) z 2 − 2r(cos θ)z + r2
Suppose that this signal is generated by applying a unit pulse to the system with
transfer function:
z(z − r cos θ)
G(z) = .
(z − rejθ )(z − re−jθ )
Figure 14 shows the poles of this transfer function at z = re±jθ and the zeros at
z = 0 and z = r cos θ. Figures 15 and 16 give the responses (when the input is a
unit pulse) as r and θ vary.
35 Step response and pole locations

Figure 14: Pole and zero locations, x = pole, o = zero.

As r is varied (Figure 15):


. r < 1 gives an exponentially decaying envelope;
. r = 1 gives a sinusoidal response with 2π/θ samples per period;
. r > 1 gives an exponentially increasing envelope.

As θ is varied (Figure 16):


. small values of θ give a frequency much less than the sample rate and lots of
samples in a period (less oscillatory response);
. larger θ values give a frequency nearer to the sample rate and fewer samples
in a period (more oscillatory response).

Some interesting choices of r and θ are shown below.

. For θ = 0, Y (z) simplifies to:


z
Y (z) = ,
z−r
with one zero at the origin and one pole at z = r. This corresponds to an
exponentially decaying response (see Example 1).

. For θ = 0 and r = 1:
z
Y (z) = ,
z−1
which is a unit step (see z-transform tables).
4.1 Poles in the z-plane 36

r = 0.7
0.5
yk θ = π/4
0

−0.5
0 2 4 6 8 10
sample k
1

0.5
yk

0
r = 1.0
−0.5
θ = π/4
−1
0 2 4 6 8 10
sample k
10

5
yk

0 r = 1.3
θ = π/4
−5
0 2 4 6 8 10
sample k

Figure 15: Responses for varying r.

. For r = 0:
Y (z) = 1,
which is a unit pulse (see z-transform tables).

. For θ = 0 and −1 < r < 0: We get samples of alternating signs.

For a complete view, Figure 17 summarizes the different responses according to the
locations of the poles in the z-plane.
37 Step response and pole locations
1

r = 0.7
yk
θ=0
0.5

0
0 2 4 6 8 10
sample k
1

r = 0.7
0.5
θ = π/2
yk

−0.5
0 2 4 6 8 10
sample k
1

0.5
yk

0
r = 0.7
−0.5
θ=π
−1
0 2 4 6 8 10
sample k
Figure 16: Responses for varying θ.

Implications of pole locations to the response of the system:

. Poles inside the unit circle (|z| < 1) → stable and convergent response.
. Poles outside the unit circle (|z| > 1) →unstable response.
. Poles on the unit circle (|z| = 1) → constant response or a sustained
oscillation.
. Real poles at 0 < z < 1 → exponential pulse response.
. Real poles near |z| = 1 are slow.
. Real poles near z = 0 are fast.
. Complex poles give faster responses as their angle to the real axis in-
creases.
4.2 The mapping between s-plane and z-plane 38

Figure 17: Pulse response for various pole locations (from [Franklin et al, 1998] p.126).

. Complex poles give a more resonant response as they get nearer the unit
circle.

These observations are in direct comparison with poles in the s-plane. Moreover,
notice that stability here is defined informally; we discuss about stability more
formally in the next chapter.

4.2 The mapping between s-plane and z-plane

It turns out that the pole structure in the example of the previous section holds
true more generally. To this end, consider the z-transforms in pages 31 and 32. It
can be noticed, that if a continuous-time signal F (s) has a pole at s = a, then the
39 Step response and pole locations

z-transform F (z) always has a pole at z = eaT . This is to be expected since e−sT
and z −1 encode a delay in the continuous and discrete setting, respectively, but we
formalize it below.

Fact 3. If s is a pole of a continuous time transfer function F (s), then

z = esT ,

is a pole of the discrete time transfer function F (z). Note that this relationship
does not hold for the zeros of F (s) and F (z).

Therefore, the pole locations of a continuous signal in the s-plane map to the pole
locations of the sampled signal in the z-plane under the transformation z = esT .
Writing s = σ + jω, we obtain

(σ+jω)T σT jωT

 |z| = eσT ,
z=e =e e =⇒
arg(z)

= ωT.

s-plane z-plane
Im(s) Im(z)

ω = π/T sT
z = e-

Re(s) 6 Re(z)
ω = −π/T ω = ±π/T
@
R
@

Figure 18: The mapping z = esT from s-plane to z-plane; the colour coding shows the corresponding
regions in the two planes.

This mapping has the following implications:

imaginary axis (s = jω, σ = 0) −→ unit circle (z = ejωT );


left-half plane (σ < 0) −→ inside of the unit circle (|eσT | < 1);
right-half plane (σ > 0) −→ outside of the unit circle (|eσT | > 1);
[i.e., z-plane poles inside the unit circle are stable]
4.3 Damping ratio and natural frequency 40

negative real axis (ω = 0, −∞ < σ < 0) −→ real axis (0 < z < 1);
positive real axis (ω = 0, 0 < σ < ∞) −→ real axis (z > 1);
negative infinity (σ → −∞) −→ origin (z = 0).
The mapping from s-plane to z-plane is not an one-to-one mapping, because

s = s1 −→ z = es1 T implies s = s1 + j2nπ/T −→ z = es1 T ej2nπ = es1 T ,

for any integer n. On the basis of Nyquist’s sampling theorem, which states that we
need to sample at a frequency at least twice the signal bandwidth, i.e., T1 > 2 |ω|
2π , we
only consider the part of the s-plane within the half-sampling frequency, |ω| < π/T
which maps one-to-one onto the entire z-plane (Figure 18).

4.3 Damping ratio and natural frequency

Recall the s-plane poles with natural frequency ω0 ,


damping ratio ζ < 1:
q
2
s + 2ζω0 s + ω02 =0 =⇒ s = −ζω0 ± jω0 1 − ζ 2

The z-plane poles under the mapping z = esT are


q
z = rejθ with r = e−ζω0 T , θ = ω0 T 1 − ζ 2 .
Figure 19: s-plane poles.

We thus have that:


• Lines of fixed damping ζ, which radiate from the origin of the s-plane map to
logarithmic spirals in the z-plane, as shown in Figure 20.
• Lines of constant natural frequency, ω0 which are circles in the s-plane, map
to the shapes shown in Figure 20.

4.4 System specifications?

Control systems may be designed to satisfy certain specifications. However, the


response of the controlled system is often dictated only by the dominant (i.e., the
slowest) poles. Therefore, we aim for a closed-loop response dominated by a pair
? [Franklin et al, 1998] §2.1.6, 2.1.7, 2.2.2, 2.2.4
41 Step response and pole locations

Figure 20: z-plane lines of constant damping ratio and natural frequency (from [Franklin et al, 1998]
p.125). Note that ωn in the figure corresponds to ω0 in these notes.

of complex conjugate poles constituting an approximation to an underdamped 2nd-


order system, and impose performance specifications for the resulting system.

Figure 21: Discrete controller and continuous plant.

The discrete control system in Figure 21 has a closed-loop transfer function


Y (z) D(z)G(z)
= ,
R(z) 1 + D(z)G(z)
where Y (z) and R(z) are the z-transforms of the output and reference signal,
respectively. Approximating its response by that of a system with a pair of complex
conjugate poles, we need to specify the locations of the dominant z-plane poles,
i.e., the roots of 1 + D(z)G(z) = 0.

Typically we aim for a damping factor ζ around 0.7 and natural frequency ω0 as high
4.4 System specifications 42

Figure 22: Second order system step responses (from [Franklin et al, 1998] p.19, see also HLT p.168).

as reasonably possible to make the response as fast as possible (see also Figure 27
to justify this choice). Examples of second order system step responses and design
specifications are shown in Figures 22 and 23, respectively. Actual design criteria
include:

Rise time: tr ;
Settling time: ts ;
Peak overshoot: Mp ;
Steady state error: ess ;
Gain and Phase margin specifications.
For a 2nd-order underdamped system, we can obtain some approximate relationships
between these criteria and the pole positions:
Rise time (10% to 90%): tr ≈ 1.8/ω0 ;
Settling time (to 1%): ts ≈ 4.6/(ζω0 );

−πζ/ 1−ζ 2
Peak overshoot: Mp ≈ e , (for 0 ≤ ζ ≤ 1);
Steady state error: ess = limz→1 (z − 1)E(z);
Phase margin: φP M ≈ 100ζ, φP M ≤ 60◦ (φP M in degrees).
43 Step response and pole locations

Figure 23: Step response design criteria (from [Franklin et al, 1998] p.20).

To design a controller so as to meet a given specification in terms of ess , ts , Mp


etc., a number of design techniques (including root locus and frequency response
methods) exist for placing the z-plane poles at desired locations. However these
are beyond the scope of this course. However, we could verify whether certain
specifications are met; this is illustrated by means of the following example.

Example 7. A continuous system with transfer function G(s) = 1/(s(10s +


1)) is controlled by a discrete control system with a ZOH, as shown in Fig-
ure 21. The closed loop system is required to have: a step response y(kT )
with overshoot Mp < 16% and settling time ts < 10 s; and steady-state error
to a unit ramp ess < 1.
Validate the satisfaction of these specifications if the sample interval is T = 1
s and controller is

uk = −0.5uk−1 + 13(ek − 0.88ek−1 ).

1. Determine the pulse transfer function of G(s) plus the ZOH:

−1G(s) 

G(z) = (1 − z )Z
s
(z − 1) 
0.1 
= Z 2 .
z s (s + 0.1)
4.4 System specifications 44

From the z-transform tables with T = 1 and a = 0.1 we obtain:


(z − 1) z (0.1 − 1 + e−0.1 )z + (1 − e−0.1 − 0.1e−0.1 )
 

G(z) =
z 0.1(z − 1)2 (z − e−0.1 )
(0.1 − 1 + e−0.1 )z + (1 − e−0.1 − 0.1e−0.1 )
=
0.1(z − 1)(z − e−0.1 )
0.0484(z + 0.9672)
= .
(z − 1)(z − 0.9048)
2. Determine the controller transfer function D(z): Using the linearity and
delay properties of the z-transform, we obtain
U (z) (1 − 0.88z −1 ) (z − 0.88)
D(z) = = 13 = 13 .
E(z) (1 + 0.5z −1 ) (z + 0.5)
3. Verify steady state error specification. The transfer function from r to e
is given by
E(z) 1
= .
R(z) 1 + D(z)G(z)
and the steady state error is ess = limk→∞ ek . From the z-transform of
a ramp (see z-transform tables) we obtain that
Tz
R(z) = .
(z − 1)2
By the final value theorem property of the z-transform we thus have that

Tz 1 
ess = lim(z − 1)E(z) = lim (z − 1)
z→1 z→1 (z − 1)2 1 + D(z)G(z)
Tz
= lim , [poles of (z − 1)E(z) in unit circle]
z→1 (z − 1)(1 + D(z)G(z))
1 − 0.9048
=
0.0484(1 + 0.9672)D(1)
1 (1 + 0.5)
≈ = = 0.96.
D(1) 13(1 − 0.88)
Therefore, ess < 1 as required.

4. Translating the specification on overshoot and settling time into con-


straints on the poles of the transfer function from r to y, we obtain:

overshoot: Mp < 16% =⇒ ζ > 0.5;


settling time: ts < 10 =⇒ ζω0 > 0.46 ⇒ radius of poles < 0.63.
45 Step response and pole locations

The transfer function from r to y is given by


Y (z) D(z)G(z)
= .
R(z) 1 + D(z)G(z)
It has the following two dominant poles:

 r = |−0.050 + j0.304| = 0.31;
z = −0.050 ± j0.304 = re±jθ

θ = tan−1 (0.304/0.05) = 1.73.



Notice that, the roots of 1 + D(z)G(z) = 0, are z = 0.876, −0.050 ±


Y (z)
j0.304. However the transfer function has a zero at z = 0.88
R(z)
which effectively cancels the pole at z = 0.876.
By the dominant poles are we have that the specification r < 0.63 is
satisfied. Finally, to check that ζ > 0.5, by p. 40 we have that

r = e−ζω0 T


 ζ ln(1/r)
=⇒ √ = = 0.680 =⇒ ζ = 0.56.
1 − ζ2
q
θ = ω0 T 1 − ζ 2

 θ

Hence, the controller meets the specifications, as shown by the closed


loop step response in Figure 24.

1.5

1
Output y and input u/10

0.5

−0.5

−1

−1.5
0 1 2 3 4 5 6 7 8 9 10
Time (sec)

Figure 24: Step response, –+– = output y, –o– = input u × 0.1.


4.5 Summary 46

4.5 Summary

The main learning outcomes of this chapter can be summarized as follows:

• The pulse response of a 2nd order system is investigated as the radius and
argument of its z-plane poles are varied.

• For a sampled data system with a ZOH:


if s = pi is a pole of G(s), then z = epi T is a pole of G(z).

• The locus of s = σ + jω under the mapping z = esT is considered:

. the left half plane (σ < 0) maps to the unit disk (|z| < 1);
. s-plane poles with damping ratio ζ, natural frequency ω0 map to z-plane

poles with |z| = e−ζω0 T , arg(z) = 1 − ζ 2 ω0 T .

• Design specifications (rise time, settling time, overshoot) translate into con-
straints on the ζ and ω0 values of the dominant closed loop poles, that can
be verified for the designed controller.
47 Discrete time linear systems in state space form

5 Discrete time linear systems in state space form

We have already seen that discrete time systems emanate from continuous ones
via sampling. In particular, in the previous chapters we focused on such systems
that are linear, analyzed them and discussed their stability properties by means of
transfer functions. Here, we will revisit the problem of analyzing discrete time linear
systems, but we will do so directly in the discrete time domain.

To this end, this chapter will address the following problems:

1. Provide a unified modelling formalism to represent discrete time linear systems,


referred to as state space form.

2. We will provide an explicit characterization of solutions to discrete time linear


systems and discuss how these can be computed.

3. We will discuss how stability can be inferred directly from the system’s state
space representation, without resorting to poles and transfer functions.

5.1 State space representation

Consider a generalization of the plant that is shown in Figure 2, that may have
multiple inputs, encoded by the vector u(t) ∈ Rm , and multiple outputs, encoded
by the vector y(t) ∈ Rp . Rather than describing the plant by means of a transfer
function, we have already seen in earlier lectures of A2 Introduction to Control
Theory that, if it is given by a continuous time linear and time-invariant system
with an input vector u(t) ∈ Rm and an output vector y(t) ∈ Rp , then we can
equivalently represent it in the so called state space form. Specifically, the state
space form of a given plant is given by

ẋ(t) = Āx(t) + B̄u(t),


y(t) = C̄x(t) + D̄u(t).

Vector x(t) ∈ Rn denotes the so called system state that acts as an “internal” vec-
tor, whose elements correspond to physical quantities that change over time, hence
their evolution is described by means of ordinary differential equations (ODEs).
5.1 State space representation 48

Stacking these ODEs together gives rise to the first of the equations in the state
space description above. The second equation is an algebraic one and encodes
the information that is available in the output of the system by means of sensor
measurements. These equations together constitute the state space form of a con-
tinuous, time-invariant, linear system and are fully parameterized by the matrices
Ā ∈ Rn×n , B̄ ∈ Rn×m , C̄ ∈ Rp×n and D̄ ∈ Rp×m .

With reference to Figure 2, we would like to analyze the sampled data system with
input uk and output yk , where k ≥ 0 corresponds to any given sampling instance.
Recall that for any t ∈ [kT, (k + 1)T ] the state solution of the continuous time
linear system can be written as
Z t
Ā(t−kT )
x(t) = e xk + eĀ(t−τ ) B̄u(τ )dτ,
kT

where xk = x(kT ) plays the role of the initial condition of the state over the
sampling interval under consideration. As the initial condition is not x(0), the term
kT appears in the exponential of the first term and the lower limit of the integral in
the second term, to account for the fact that the initial time of the state evolution
is no longer zero but kT . Notice that between consecutive sampling instances kT
and (k + 1)T , the control input remains constant to uk as an effect of the ZOH,
i.e., we have that
u(t) = uk for all t ∈ [kT, (k + 1)T ).
Evaluating the state solution at t = (k + 1)T and setting xk+1 = x((k + 1)T ), we
have that
 
 (k+1)T
Z
xk+1 = eĀT xk +  eĀ((k+1)T −τ ) B̄dτ 
uk
kT

[change of variables: τ ← τ − kT ]
 
 T
Z
= eĀT xk +  eĀ(T −τ ) B̄dτ 
uk .
0

Moreover, the output equation at the sampled time instances is given by

yk = C̄xk + D̄uk .

where yk = y(kT ). Combining the derived equations for the (next) state xk+1 and
the output yk as functions of xk and uk we obtain the state space description of a
sampled data, discrete time linear system. This is summarized below.
49 Discrete time linear systems in state space form

A sampled data, discrete time linear system is said to be in state space form
if it can be written as

xk+1 = Axk + Buk ,


yk = Cxk + Duk ,

where A = eĀT ∈ Rn×n , B = 0T eĀ(T −τ ) B̄dτ ∈ Rn×m , C = C̄ ∈ Rp×n and


R

D = D̄ ∈ Rp×m . Matrices (Ā, B̄, C̄, D̄) correspond to the state space form
of the continuous time, linear, time-invariant system prior to sampling, and T
denotes the sampling period.

Example 8. Consider a plant given by the continuous time linear system

ẋ(t) = −x(t) + u(t),


y(t) = x(t).

The system is already in state space form with Ā = −1, B̄ = 1, C̄ = 1 and


D̄ = 0 (all scalars). To compute the state space description of the associated
sampled data system with sampling period T , we need to determine matrices
(A, B, C, D). To this end, notice that C = C̄ = 1 and D = D̄ = 0, while

A = eĀT = e−T ,
Z T Z T
B= eĀ(T −τ ) B̄dτ = eτ −T dτ = 1 − e−T .
0 0

Therefore, the associated discrete time system is given by

xk+1 = e−T xk + (1 − e−T )uk ,


yk = xk .

For the case where unlike the preceding example the system is non-scalar, given a
continuous time state space description we can construct the discrete time one by
means of the following two steps:

1. Step 1: Compute the matrix exponential eĀT . This can be computed as


discussed in earlier lectures of A2 Introduction to Control Theory. In par-
ticular, if Ā is diagonalizable, we can compute the matrix exponential as
5.2 Solutions to discrete time linear systems 50

eĀT = W eΛT W −1 , where W is a matrix with the eigenvectors of Ā as its


columns (invertible as for diagonalizable matrices eigenvectors are linearly in-
dependent) and Λ is a diagonal matrix with the eigenvalues of Ā as the diagonal
entries. Since Λ is diagonal, computing eΛT becomes then easier as it involves
computing scalar exponentials corresponding to the entries of Λ, i.e.,
 
λ1 T
e 0 ... 0 
eλ2 T
 
 0 ... 0
 
eΛT = .


 .. .. ... .. 
. .


 
 
0 0 . . . eλn T

where λ1 , . . . , λn are the eigenvalues of Ā.

2. Step 2: Compute the integral 0T eĀ(T −τ ) B̄dτ . This should be performed


R

elementwise for every entry of the matrix eĀ(T −τ ) B̄ that appears in the inte-
grand, which in turn involves the matrix exponential.

5.2 Solutions to discrete time linear systems

Consider a discrete time linear system in state space form, and an arbitrary initial
state x0 . For a given sequence of inputs uk , k = 1, . . ., we can provide an explicit
characterization of the solution to such systems. In particular, the state xk and
output yk solution for any instance k, are given by

zero state transition


zero input transition z }| {
z }| {
k−1
Ak x0 Ak−i−1 Bui
X
xk = +
i=0

k−1
CAk x0 CAk−i−1 Bui + Duk .
X
yk = +
| {z } i=0
zero input response | {z }
zero state response

We will not prove that the expressions for xk and yk satisfy the difference and
output equation, respectively; this can be achieved using induction. Notice that
51 Discrete time linear systems in state space form

once xk is computed, the output solution can be directly determined by means of


yk = Cxk + Duk . The first term in the state solution is the so called zero input
transition, i.e., the solution of the system if it was autonomous, or in other words
if ui = 0 for all i. The second term is the so called zero state transition, and it is
a discrete time convolution corresponding to the solution of the system when the
initial state is zero. The interpretation of the zero input response and the zero state
response is analogous, referring to the output yk instead.

These solutions are in direct correspondence with the ones for continuous time
linear systems; the only difference is that the convolution integral is replaced with
a summation involved in discrete time convolution, while the matrix exponential is
replaced by Ak . The latter is the term that is the most difficult to compute so that
we determine the state output solutions xk and yk . We discuss its computation
separately for systems with a diagonalizable and a non-diagonalizable matrix A.

5.2.1 Diagonalizable matrices

A matrix is called diagonalizable if its eigenvectors are linearly independent. We


have the following sufficient conditions for a matrix to be diagonalizable:

1. If a matrix A ∈ Rn×n has distinct eigenvalues (i.e., λi 6= λj for all i 6= j), then
its eigenvectors are linearly independent.

2. If a matrix is symmetric (A = A> ∈ Rn×n ), then i) its eigenvalues are real; ii)
its eigenvectors are orthonormal (hence linearly independent).

Diagonalizability is a desirable property as, if a matrix A is diagonalizable, it can


be decomposed as
A = W ΛW −1 ,

where W is a matrix whose columns are the eigenvectors of A (invertible since the
eigenvectors are linearly independent), and Λ is a diagonal matrix whose diagonal
entries correspond to the eigenvalues of A. For discrete time linear systems with
a diagonalizable matrix A the quantity Ak that appears in the expressions for the
state and output solutions can be computed efficiently in closed form.
5.2 Solutions to discrete time linear systems 52

Fact 4. Consider a discrete time linear system with matrix A ∈ Rn×n being
diagonalizable, thus admitting a decomposition A = W ΛW −1 . We then have
that
Ak = W Λk W −1 ,
 
k
λ1 0 ... 0 
k
 
 0 λ2 . . . 0 

k
where Λ =  . .

. . . ... , with λi being the i-th eigenvalue of A.
 .. ..
 
 
k
0 0 . . . λn

Proof: We show this by means of induction:

1. Base case (k = 0): We have that W Λ0 W −1 = W W −1 = I = A0 , hence


the base case is trivially satisfied.

2. Induction hypothesis: Assume the statement holds true for an arbitrary


k, i.e., Ak = W Λk W −1 .

3. Show the claim for the (k + 1)-th case: By the induction hypothesis we
have that Ak = W Λk W −1 . Hence,
:I
W−1
Ak+1 = Ak A = W Λk  ΛW −1 = W Λk+1 W −1 .


W

Example 9. Consider a discrete time linear system with difference equation


 
1 1
2 2
xk+1 = Axk =   xk .
0 1
 
−1
Compute the zero input transition if the initial state is x0 =  .
1

Step 1: Compute the eigenvalues of A. Since the matrix is triangular, the


eigenvalues correspond to the diagonal elements, i.e., λ1 = 12 and λ2 = 1.
Since the eigenvalues are distinct we infer that A is diagonalizable.
Step 2: Compute the eigenvectors of A. By direct calculation we obtain that
   
1 1
corresponding to λ1 : w1 =   , corresponding to λ2 : w2 =   .
0 1
53 Discrete time linear systems in state space form

Step 3: Since A is diagonalizable, we can write it as A = W ΛW −1 , where


     
1
0
2 1 1 −1 1 −1
Λ= , W =   and W =  .
0 1 0 1 0 1

We then have that the zero state transition is given by

xk = Ak x0 = W Λk W −1 x0
    
1 1  21k 0 1 −1 −1
=     
0 1 0 1 0 1 1
 
1
1 − 2k−1 
=  .
1
 
1
Notice that as k → ∞ the state tends to  .
1

5.2.2 Non-diagonalizable matrices

A matrix A ∈ Rn×n is called non-diagonalizable if the number of linearly indepen-


dent eigenvectors is strictly lower than n. Moreover, not all of its eigenvalues are
distinct, and at least one of them would be repeated. If the matrix A of a given
discrete time linear system is non-diagonalizable, then we can no longer decompose
A using the eigenvector matrix W as this will no longer be invertible (recall that
the columns of W are the eigenvectors).

Computing Ak for non-diagonalizable matrices with generic structure is a difficult


task; it requires resorting to the so called Jordan form and will not be addressed in
these notes. However, for a particular class of non-diagonalizable matrices comput-
ing Ak can be performed efficiently. We illustrate this by means of an example.

Example 10. Consider the matrix


 

0 1 0
A = 0 0 1 .
 
 
0 0 0
5.3 Stability of discrete time linear systems 54

The diagonal elements of A correspond to its eigenvalues, hence A has a


repeated eigenvalue λ = 0 with multiplicity equal to 3. To decide whether A
is diagonalizable we have to compute its eigenvectors. Using λ = 0 we obtain
only one eigenvector, i.e.,
    

0 1 0 w1  1
 
0 0 1 w  = 0 ⇒ w = w = 0, eigenvector: w = 0
    
   2 2 3  
    
0 0 0 w3 0

Since we only have 1 < 3 linearly independent eigenvectors, A is non-


diagonalizable.
However, notice that we can still compute Ak efficiently, as A3 = 0 and as a
result, Ak = 0 for all k ≥ 3.

Matrices that exhibit this property (excluding the trivial case of a zero matrix), i.e.,
there exists some integer k̄ such that Ak = 0 for all k ≥ k̄, are called Nilpotent.
Triangular n × n matrices with zeros along the main diagonal are all Nilpotent with
k̄ ≤ n. For Nilpotent matrices the state solution satisfies

xk = Ak x0 = 0 for all k ≥ k̄.

In other words, the state of the system becomes zero in finite time (k̄ time instances)
and stays there from then on. Therefore, for non-diagonalizable but Nilpotent ma-
trices A the system’s state solution can be easily computed. Despite the analogies
between continuous and discrete time linear systems, this behaviour is not encoun-
tered in continuous time systems.

5.3 Stability of discrete time linear systems

In this section we will investigate the stability properties of discrete time linear
systems with no inputs, i.e., systems governed by

xk+1 = Axk .

In other words, we will analyze the so called zero input transition of the state
solution, namely xk = Ak x0 . However, stability is related to the limiting behaviour
55 Discrete time linear systems in state space form

of the system state xk as k → ∞. In particular, we will investigate the stability


properties of the equilibrium point xk = 0, as if the state becomes zero for some
k, we would have that all subsequent states would be zero as well since xk+1 =
Axk = 0. We consider the following notions of stability:

1. Stability: A system is called stable? if we can stay arbitrarily close enough to


0 if we start sufficiently close to it.

2. Asymptotic stability: A system is called asymptotically stable if it is stable,


and approaches 0 as time tends to infinity, i.e., limk→∞ kxk k = 0. In other
words, not only we stay close to 0, but also converge to it.

We then say that a system that is not stable is unstable. We will investigate these
notions of stability for systems of the form xk+1 = Axk , separately for diagonalizable
and non-diagonalizable A matrices.

5.3.1 Diagonalizable matrices

In the case where A is diagonalizable, following the procedure outlined in Fact 4,


we can represent the state solution of the system (i.e., the zero input transition in
the absence of inputs) for any k as

xk = Ak x0 = W Λk W −1 x0 .

It follows then that Ak (and as result xk ) will be a linear combination of terms λki ,
i = 1, . . . , n, where λ1 , . . . , λn are the eigenvalues of A. The coefficients of this
linear combination would then depend on the eigenvectors that appear in W and
the initial state, and would dictate how the terms λki , i = 1, . . . , n, mix.

It follows then that the eigenvalues affect the limiting behaviour of the state. Eigen-
values are in general complex, hence we can represent them as λi = σi + jωi , which
q
implies that |λi | = σi2 + ωi2 . It can be then observed that

• If |λi | = 1 then |λi |k = 1 for all k.


? Formally,
a system is called stable if for all  > 0, there exists δ > 0 such that if kx0 k ≤ δ then
kxk k ≤  for all k ≥ 0.
5.3 Stability of discrete time linear systems 56

• If |λi | < 1 then limk→∞ |λi |k = 0.

• If |λi | > 1 then limk→∞ |λi |k = ∞.

The relationships above sumarize the limiting behaviour for one of the terms that
would appear in the state solution, i.e., the one related to λki . However, the state
solution would be a mix of such terms corresponding to the different eigenvalues of
A. We are then able to make the following statements related to stability.

Fact 5 (Stability of xk+1 = Axk with diagonalizable A). Consider a discrete


time linear system of the form xk+1 = Axk with A ∈ Rn×n diagonalizable.
Denote by λi , i = 1, . . . , n, the eigenvalues of A. We then have that the
system is

• Stable (for all initial conditions) if and only if |λi | ≤ 1 for all i = 1, . . . , n.

• Asymptotically stable (for all initial conditions) if and only if |λi | < 1 for
all i = 1, . . . , n.

• Unstable (for some initial conditions) if and only if there exists i such
that the corresponding eigenvalue has |λi | > 1.

Note that it suffices that at least one eigenvalue has magnitude greater than one
for the system to be unstable. Moreover, if at least one eigenvalue has magnitude
equal to one, while all other ones have magnitude strictly lower than one, then the
system is stable but not asymptotically stable. The reason is that the contribution
of that particular eigenvalue in the state solution is bounded (constant or periodic,
hence we only stay “close” to zero but do not converge to it). Notice that this is
the case in Example 9 as one of the eigenvalues is equal to one, hence in the limit
the state does not tend to zero for the particular choice of the initial condition.

These implications of stability are in direct correspondence with the less formal
stability observations according to the poles of the system’s transfer function. In
particular, poles and eigenvalues convey the same information about stability. In
fact, a pole is also an eigenvalue of the system’s A matrix; vice verca, if the there
are no pole-zero cancellations, an eigenvalue is also a pole of the system’s transfer
function.
57 Discrete time linear systems in state space form

5.3.2 Non-diagonalizable matrices

In the case where A is non-diagonalizable but Nilpotent, then the state reaches zero
in finite time and stays there afterwards (see Example 11), hence we have stability
and in fact we achieve this in finite time. However, for non-diagonalizable matrices
with generic structure, eigenvalues offer less information as far as determining the
system’s stability is concerned. To see this, recall first that for non-diagonalizable
matrices at least one eigenvalue will be repeated. If for all eigenvalues |λi | ≤
1, i = 1, . . . , n, but the repeated eigenvalue is such that |λi | = 1 then, unlike
diagonalizable matrices, the response may be stable or unstable according to the
initial condition (and how this relates to eigenvectors). We illustrate this by means
of an example.

Example 11. Consider the system


 
1 1
xk+1 = Axk =   xk .
0 1
The diagonal elements of A correspond to its eigenvalues, hence A has a
repeated eigenvalue λ = 1 with multiplicity equal to 2. To decide whether A
is diagonalizable we have to compute its eigenvectors. Using λ = 1 we obtain
only one eigenvector, i.e.,
      
1 1 w1  w1  1
  =  ⇒ w2 = 0, eigenvector: w =  
0 1 w2 w2 0
Since we only have 1 < 2 linearly independent eigenvectors, A is non-
diagonalizable.
By computing a few powers and observing the patterm, notice that for all
k≥1  
1 k
Ak =  .
0 1
For different initial states we observe the following:
    
1 k  1 1
xk = Ak x0 =    =  ,
0 1 0 0
    
1 k  0 k 
xk = Ak x0 =    =  .
0 1 1 1
5.4 Summary 58

Notice that the first initial state (aligned with the eigenvector) leads to a
stable solution, while for the second initial state kxk k tends to inifinity as k
increases.

However, looking into the eigenvalues we can still claim the following.

Fact 6 (Stability of xk+1 = Axk with non-diagonalizable A). Consider a


discrete time linear system of the form xk+1 = Axk with A ∈ Rn×n non-
diagonalizable. Denote by λi , i = 1, . . . , n, the eigenvalues of A (at least one
of them would be repeated). We then have that the system is

• Asymptotically stable (for all initial conditions) if and only if |λi | < 1 for
all i = 1, . . . , n.

• Unstable (for some initial conditions) if there exists i such that the cor-
responding eigenvalue has |λi | > 1.

5.4 Summary

The main learning outcomes of this chapter can be summarized as follows:

• Given a continuous time linear system with state space description encoded by
(Ā, B̄, C̄, D̄), the associated sampled data (with sampling period T ), discrete
time linear system can be written in state space form as

xk+1 = Axk + Buk ,


yk = Cxk + Duk ,

eĀ(T −τ ) B̄dτ ∈ Rn×m , C = C̄ ∈ Rp×n and


RT
where A = eĀT ∈ Rn×n , B = 0
D = D̄ ∈ Rp×m .

• The state and output solutions to discrete linear systems are, respectively,
59 Discrete time linear systems in state space form

given by
k−1
k
Ak−i−1 Bui ,
X
xk = A x0 +
i=0
k−1
yk = CAk x0 + CAk−i−1 Bui + Duk .
X

i=0

It was shown that for

– Diagonalizable A: Ak = W Λk W −1 , where W includes the eigenvectors


of A as columns, while Λ is a diagonal matrix with the eigenvalues of A
on its diagonal.
– Non-diagonalizable A: For the particular class of Nilpotent matrices, Ak =
0 for some integer k̄.

• The stability of discrete time systems of the form xk+1 = Axk was analyzed
and conditions to guarantee stability based on the eigenvalues of matrix A
were derived. Irrespective of whether A is diagonalizable or not, if λ1 , . . . , λn
denote its eigenvalues, we can claim that:

– Asymptotically stable system if and only if |λi | < 1 for all i = 1, . . . , n.


– Unstable system if there exists i such that |λi | > 1.
60

6 Appendix: The inverse z-transform

We provide in this appendix a formal definition of the inverse z-transform? . To


this end, consider a discrete time signal f (kT ), k = 0, 1, . . ., and its z-transform
(assuming that all values corresponding to negative indices are zero)

fk z −k .
n o n o X
F (z) = Z f (kT ) = Z fk =
k=0

The inverse z-transform is defined as


1 I k−1
f (kT ) = Z −1 F (z) =
n o
z F (z) dz,
2πj
where the contour encircles the region of convergence of F (z) (recall that the z-
transform is defined for a particular region of z values where the infinite series sum
converges).

To calculate the integral is rather not easy, and relies on the following result which
is based on Cauchy’s residue calculus. Consider some function G(z) and let zi be
the i-th pole of G(z) which is of order n. The function (z − zi )n G(z) is then
analytic at zi and as such we can obtain its Taylor series expansion as
(z − zi )n G(z) = A−n + A−n+1 (z − zi ) + . . . + A−1 (z − zi )n−1 + A0 (z − zi )n + . . .
A−1 is then defined as the residue of G(z) at zi , and is denoted as Res(zi ). For
single poles (i.e., n = 1) the residue is the constant term of the Taylor series
expansion. According to Cauchy’s residue calculus we then have that
1 I X
G(z) dz = Res(zi ), [Cauchy’s equation]
2πj i
if G(z) is analytic on the closed contour where the integral is defined, as well as in
its interior, except from a finite number of singularities.

Proof of the inverse z-transform: We will show that the right-hand side of the
inverse z-transform is indeed f (kT ). To achieve this consider the right-hand side
of the inverse z-transform, and substitute F (z) according to its definition, i.e.,
1 I k−1 1 I k−1 X ∞
z F (z) dz = z f` z −` dz
2πj 2πj `=0
1 ∞ I
f` z k−1−` dz,
X
=
2πj `=0
? [Franklin et al, 1998] §4.6.2
61 Appendix: The inverse z-transform

where the integral and the summation can be exchanged as the integration contour
is taken in the region where F (z) is convergent.

Letting G(z) = z k−1−` , three cases can be distinguished: i) if k − 1 − ` ≥ 0 then


G(z) has no poles inside the contour, hence there are no residue. ii) if k − ` < 0
then G(z) has a pole at zero of order ` + 1 − k. This implies that z `+1−k G(z) = 1
would be constant, and according to Taylor’s expansion the residue A−1 would be
zero. iii) if ` = k then G(z) has a single pole at zero. This implies then that
zG(z) = 1, but the residue A−1 is now 1, the constant term of the Taylor series
expansion. Therefore, all terms in the summation preceding the integral would be
zero but for the case ` = k where i Res(zi ) = 1, and by Cauchy’s equation with
P

1 H k−1−`
G(z) = z k−1−` we have that 2πj z dz = 1. Hence, the right-hand side of the
inverse z-transform definition becomes
1 I k−1
z F (z) dz = f (kT ),
2πj
which is indeed the discrete-time signal f (kT ).
z
Example 12. Let F (z) = z−1 (with convergence region |z| > 1). We will
show that its inverse z-transform is

1,
 k ≥ 0,
f (kT ) =
0,

k < 0.
i.e., the unit step signal.
Consider the inverse z-transform
1 I z k−1 1 I zk
fk = Z −1 F (z) =
n o
z dz = dz,
2πj z−1 2πj z−1
where the contour encircles the region |z| > 1, where convergence for F (z) is
ensured.
zk
Consider first the case k ≥ 0. Let G(z) = z−1 and notice that it has only
one single pole at one. Hence, by the Taylor series expansion of (z − 1)n G(z)
with n = 1,

(z − 1)G(z) = z k = 1 + k(z − 1) + . . .

with the residue A−1 being equal to 1. By Cauchy’s equation we then have
1 H
that 2πj G(z)dz = 1, which in turn implies that fk = 1 for all k ≥ 0.
62

k
z
Consider now the case k < 0. Let G(z) = z−1 and notice that it has a single
pole at one and a pole at zero of order k. For the pole at one, the Taylor
expansion is the same as before, and the residue is 1. For the pole at zero, by
the Taylor series expansion of z n G(z) with n = −k (recall k is negative),
1
z −k G(z) = = −1(1 + z −1 + z −2 + . . .).
z−1
The residue is −1 irrespective of the value of k. Therefore, Res(1)+Res(0) =
1 H
1 − 1 = 0. As a result, by Cauchy’s equation we have that 2πj G(z)dz = 0,
which in turn implies that fk = 0 for all k < 0.
z
Therefore, we have shown that the inverse z-transform of F (z) = z−1 is the
unit step as expected from the inverse z-transform tables. However, it should
be noted that knowledge of the region of convergence for the z-transform (in
that case |z| > 1) is essential for the determination of the integral’s contour,
and hence the correct calculation of the inverse transform.

You might also like