elec-e8101: digital and optimal control

40
ELEC-E8101: Digital and Optimal Control Themistoklis Charalambous Oce number: 2561, TUAS Building Email: themistoklis.charalambous@aalto.fi Oce hours: Wednesday 16.00-18.00 7. Stability of discrete-time systems

Upload: others

Post on 03-Apr-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

ELEC-E8101: Digital and Optimal Control

Themistoklis Charalambous Office number: 2561, TUAS Building

Email: [email protected] hours: Wednesday 16.00-18.00

7. Stability of discrete-time systems

In the previous lecture…

We:

• Discretized a continuous-time system in a state-space form to its discrete counterpart

• Computed the transfer function of a discrete-time system expressed in a state-space representation

• Derived the stability conditions for the state space form

Local stability

• Different forms of stability: suppose and be solutions to a system with initial conditions and , respectively.

- Local asymptotic stability: The solution is asymptotically stable if it is stable and if can be chosen such that:

- (Local) Stability of a particular solution (non-linear and/or time-varying systems): The solution is stable if for a given , there exists , such that:

x1[k] x2[k]x1[k0] x2[k0]

x1[k]δ

x1[k] ε > 0 δ(ε, k0) > 0

kx2[k0]� x1[k0]k < � ) kx2[k]� x1[k]k < ", 8k � k0

kx2[k0]� x1[k0]k < � ) kx2[k]� x1[k]k ! 0, as k ! 1

Lecture 7: Lyapunov stability and invariance

Mikael JohanssonKTH - Royal Institute of Technology

Outline

• Lyapunov stability• Linear systems and quadratic Lyapunov functions• Application: closed-loop stability of infinite-horizon LQR• Positively invariant sets• Constrained invariant and control invariant sets

2 / 29

Stability of dynamical systems

Consider the nonlinear system

xt+1 = f (xt) (1)

with equilibrium point xeq, i.e. xeq = f (xeq).

Definition. The system is globally asymptotically stable if, for everytrajectory {xt}, we have that xt ! xeq as t !1.

Definition. The system is locally asymptotically stable near xeq if there is aconstant � > 0 such that kx0 � xeqk � ) xt ! xeq as t !1.

Definition. The system is (locally) stable if for every (small) " > 0, thereexists � > 0 such that kx0 � xeqk � ) kxt � xeqk " for all t � 0.

3 / 29

Stability concepts in pictures

ε

δ

Globally asymptotically stable Locally asymptotically stable Locally stable

xeq xeq xeq

δ

4 / 29

Stability of discrete-time LTI systems

• Consider the following discrete-time LTI system:

x[k + 1] = �x[k], x[0] = ↵

• To investigate the stability of the system above, its initial value is perturbed:

x0[k + 1] = �x0[k], x0[0] = ↵0

• Then, the difference satisfies:

x̃[k + 1] = x[k + 1]� x0[k + 1]

= �x[k]� �x0[k]

= �x̃[k], x̃[0] = ↵� ↵0

x̃ = x� x0

• This implies that if the solution x is stable, then every other solution is also stable. For LTI systems, stability is a property of the system and not of a special solution.

Lecture 7: Lyapunov stability and invariance

Mikael JohanssonKTH - Royal Institute of Technology

Outline

• Lyapunov stability• Linear systems and quadratic Lyapunov functions• Application: closed-loop stability of infinite-horizon LQR• Positively invariant sets• Constrained invariant and control invariant sets

2 / 29

Stability of dynamical systems

Consider the nonlinear system

xt+1 = f (xt) (1)

with equilibrium point xeq, i.e. xeq = f (xeq).

Definition. The system is globally asymptotically stable if, for everytrajectory {xt}, we have that xt ! xeq as t !1.

Definition. The system is locally asymptotically stable near xeq if there is aconstant � > 0 such that kx0 � xeqk � ) xt ! xeq as t !1.

Definition. The system is (locally) stable if for every (small) " > 0, thereexists � > 0 such that kx0 � xeqk � ) kxt � xeqk " for all t � 0.

3 / 29

Stability concepts in pictures

ε

δ

Globally asymptotically stable Locally asymptotically stable Locally stable

xeq xeq xeq

δ

4 / 29

Stability of discrete-time LTI systems

• The solution to the discrete-time LTI system:

x[k + 1] = �x[k], x[0] = ↵

is given byx[k + 1] = �x[k] = � (�x[k � 1]) = . . . = �kx[0]

• If Φ is diagonalizable: x[k + 1] = �kx[0] = V ⇤kV �1x[0]

• We define and hencey[k] = V �1x[k]

y[k + 1] = ⇤ky[0], y[0] = V �1x[0] = V �1↵

where are polynomials in k of order one less than the multiplicity of the corresponding eigenvalue

• If Φ is NOT diagonalizable: the solution is instead a linear combination of the terms

pi[k]�ki

pi[k]

Stability of discrete-time LTI systems • To get asymptotic stability, all solutions must go to 0 as k increases to infinity

|�i| < 1, i = 1, 2, . . . , n

Asymptotic stability theorem: The discrete-time LTI system

x[k + 1] = �x[k], x[0] = ↵

is asymptotically stable if and only if all eigenvalues of Φ are strictly inside the unit disk, i.e.,

• If Φ has unique eigenvalues on the circumference of the unit circle with all other eigenvalues being located inside → steady-state output will perform oscillations of finite amplitude - system is marginally stable

System

StableUnstable

Asymptotically Stable

Marginally Stable

Stability of discrete-time LTI systems

Time responses as a function of the poles location

x

1. Distance from origin is a measure of decay rate.

2. Complex poles just inside unit circle give lightly damped oscillation.

3. Oscillation is possible for real poles on negative real axis.

x

x

x

x x

xx

xx

x

x

x

7

uk = cos(k✓) (yss)k

uk = cos(✓k) + j sin(✓k)

The frequency response determines the steady-state behavior

G(z)LTI stable causal

G�ej✓

�ejk✓

��G�ej✓

��� cos�k✓ + \G

�ej✓

��(yss)k =

(yss)k =

=��G

�ej✓

��� ej\G(ej✓)

For a real input uk = cos(k✓)

For the exponential input , the magic formula gives

• Distance from origin is a measure of decay rate

• Complex poles just inside unit circle give lightly-damped oscillation. Oscillation is possible for real poles on negative real axis

Learning outcomes

By the end of this lecture, you should be able to:

• Understand the different notions and forms of stability

• Analyze the stability properties of discrete dynamical systems using:

‣ Jury’s stability criterion,

‣ Nyquist stability criterion, and

‣ Lyapunov’s stability theory

Stability tests

• 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

• Also important to have algebraic or graphical methods for investigating stability. The most prevalent methods are:

- Direct numerical or algebraic computation of the eigenvalues of Φ

- Methods based on properties of characteristic polynomials (e.g., Jury’s criterion)

- The root locus method

- The Nyquist stability criterion

- The Bode stability criterion

- Lyapunov's method

• There are good numerical algorithms to compute the eigenvalues; in MATLAB:>> eig(A)

Jury’s stability criterion

• Explicit calculation of the eigenvalues of a matrix cannot be done conveniently by hand for systems of order higher than 2

• In some cases it is easy to calculate the characteristic equation

�(z) , |zI � �| = a0zn + a1z

n�1 + . . .+ an�1z + an = 0

and investigate its roots

• It is the discrete time analogue of the Routh–Hurwitz stability criterion:

- The Jury stability criterion requires that the system poles are located inside the unit circle centered at the origin

- The Routh-Hurwitz stability criterion requires that the poles are in the left half of the complex plane

Jury’s stability criterion

• The following test is useful for determining if the characteristic equation has all its roots inside the unit disc

χ(z)

a0 a1 · · · an�1 an

an an�1 · · · a1 a0

an�10 an�1

1 · · · an�1n�1

an�1n�1 an�2

n�1 · · · an�10

...

a00

1st and 2nd rows are the coefficients of in forward and reverse order, respectively

χ(z)bn =

ana0

bn�1 =an�1n�1

an�10

3rd row obtained by multiplying the 2nd row by bn and subtracting this from the 1st

4th row is the third row in reverse order

ak�1i = aki � bka

kk�i

bk =akkak0

where

The scheme is then repeated until there are 2n +1 rows,

which includes a single term

. . .

Jury’s stability criterion

Jury’s stability test: If then the characteristic polynomial has all its roots inside the unit circle if and only if

χ(z)

ak0 > 0, k = 0, 1, 2, . . . , n� 1

a0 > 0

If no , then the number of negative is equal to the roots of χ(z)ak0 = 0 ak0outside the unit circle.

• Remark: If , then the condition can be shown to be equivalent to the conditions

ak0 > 0, k = 0, 1, 2, . . . , n� 1 a00 > 0

�(1) > 0

(�1)n�(�1) > 0

These conditions constitute necessary conditions for stability and hence can be used before forming the table.

In-class exercise

• Consider the system with the following characteristic equation:

�(z) = 3z2 + 2z + 1

Is the system stable?

Solution:

3 2 1

1 2 3

�3� 1⇥ 1

3 =�

83

�2� 2⇥ 1

3 =�

43

43

83

�83 � 1

2 ⇥ 43 =

�2

b2 =1

3

a00 > 0, a10 > 0, a0 > 0The system is stable:

In fact, the roots can easily be solved directly: – 0.3333 ± 0.4714j

a0 a1 a2

a2 a1 a0

a10 a11

a11 a10

a00

b1 =4/3

8/3=

1

2

Example using symbolic calculations

• The Jury criterion can easily be used in the case of a small system, when a computer is not at hand.

• The real power of the Jury criterion comes into action in symbolic calculations. Stability can be determined as a function of one or even more parameters.

• For example, consider the system with the following characteristic equation:

�(z) = z2 + a1z + a2

1 a1 a2

a2 a1 1

1� (a2)2 a1(1� a2)

a1(1� a2) 1� (a2)2

1� (a2)2 � (a1)2(1�a2)1+a2

a0 a1 a2

a2 a1 a0

a10 a11

a11 a10

a00

b2 =a21

= a2

b1 =a1(1� a2)

1� (a2)2=

a11 + a2

• The system is stable if

Example using symbolic calculations

(1� (a2)2 > 0

1� (a2)2 � (a1)2(1�a2)1+a2

> 0

• Doing algebraic manipulations to the second inequality

1� (a2)2 � (a1)2(1� a2)

1 + a2=

(1� a2)(1 + a2)2 � (a1)2(1� a2)

1 + a2

=(1� a2)

1 + a2[(1 + a2)

2 � (a1)2]

=(1� a2)(1 + a2 � a1)(1 + a2 + a1)

1 + a2> 0

• Factoring differences of squares in the first inequality

1� (a2)2 = (1� a2)(1 + a2) > 0

• The set of inequalities can be simplified to (triangle rule):

Example using symbolic calculations

(1� a2)(1 + a2) > 0

(1� a2)(1 + a2 � a1)(1 + a2 + a1)

1 + a2> 0

9=

; )((1� a2)(1 + a2) > 0

(1 + a2 � a1)(1 + a2 + a1) > 0

)

8><

>:

�1 < a2 < 1

a1 � 1 < a2�a1 � 1 < a2

OR

8><

>:

�1 < a2 < 1

a1 � 1 > a2�a1 � 1 > a2

infeasible

The Jury stability criterion

System with the characteristic polynomial

is stable for the values α1 and α2 such that:

aa aa a

2

2 1

2 1

111

�! � �! �

RS|T| -2 -1 1 2

-1

1

a1

a2

A z z a z a( ) � �21 2

Stability in the frequency domain

• The frequency response of is: . It can be graphically presented:

- in the complex plane as the Nyquist curve, or,

- as amplitude/phase curves as a function of frequency - Bode diagram

G(s) G(j!),! 2 [0,1)

• Correspondingly, for a discrete-time system H(z) the frequency response is H(ejω), where . This can also be presented graphically as a discrete-time Nyquist curve or discrete-time Bode diagram

!h 2 [0,⇡)

• Note that it is sufficient to consider the map in the interval because the function H(ejω) is periodic with period

!h 2 [�⇡,⇡)2⇡/h

Stability in the frequency domain

• Consider, for example, the continuous-time system with transfer function:

G(s) =1

s2 + 1.4s+ 1

• Zero-order-hold sampling of the system with gives the discrete-time system

h = 0.4

G(z) =0.066z + 0.055

z2 � 1.45z + 0.571Stability in frequency domain

nyquist(sys,w)holdnyquist(sysd,w)

Real Axis

Imag

inar

y A

xis

Nyquist Diagrams

-0.2 0 0.2 0.4 0.6 0.8 1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

discrete

continuous

>> sys = tf(1,[1 1.4 1]);>> sysd = c2d(sys,0.4,’zoh');>> w=logspace(2,1,1000)’;>> figure(1); hold on;>> nyquist(sys,w)>> nyquist(sysd,w)>> figure(2); hold on;>> bode(sys,w)>> bode(sysd,w)

Stability in frequency domainsys=tf(1,[1 1.4 1])Transfer function:

1---------------s^2 + 1.4 s + 1

sysd=c2d(sys,0.4)

Transfer function:0.06609 z + 0.05481---------------------z^2 - 1.45 z + 0.5712

Sampling time: 0.4

w=logspace(-2,1,1000)';bode(sys,w)holdbode(sysd,w)

Frequency Z (rad/sec)

Pha

se (d

eg);

Mag

nitu

de (d

B)

Bode Diagrams

-60

-40

-20

0

10-1 100-250

-200

-150

-100

-50

0

continuous

discrete

continuous

discrete

ZN

C(z)YREF(z) Y(z)

P(z)X

+- ⌘

L(z)YREF(z) Y(z)X

+-

Nyquist diagram

• Nyquist diagram: A plot of the open-loop frequency response of , with the imaginary part plotted against the real part on an Argand diagram (complex plane).

L(z)Im(L(ejω)) Re(L(ejω))

Re(

L(ejω))

Im(

L(ejω))

ω = ω1

|L(ejω1)|

∠L(ejω1)

1

Im(z)

it i l

by the product of the distances from the polesto exp(j!) (A1given by the sum of the angles from the zerosexp(j!), minus the sum of the angles from the

Xd1A1 z=exp(j

unit circle poles to exp(j(M-N) !

O

A1

B1

z=exp(j

!O

B2

O

A2

O-1 1c2c1

XdThus when exp(jthe magnitude of the response rises (resonance).

2 When exp(jthe magnitude falls (a null).

p1

p2

μ1 μ2

\ ( ) = \( ° 1) + \( ° 2) + + \( ° )°°\( ° 1)° \( ° 2)° ° \( ° )

x

x

o o!<latexit sha1_base64="COchiK1BUgCh4UMd4KCR4O3lCz8=">AAAB7XicbVDLSgNBEOyNrxhfUY9eBoPgKeyK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oUXGLDciuwnWqkSSSwFY1uZ37rCbXhSj7YcYphQgeSx5xR66RmVyU4oL1yxa/6c5BVEuSkAjnqvfJXt69YlqC0TFBjOoGf2nBCteVM4LTUzQymlI3oADuOSpqgCSfza6fkzCl9EivtSloyV39PTGhizDiJXGdC7dAsezPxP6+T2fgmnHCZZhYlWyyKM0GsIrPXSZ9rZFaMHaFMc3crYUOqKbMuoJILIVh+eZU0L6qBXw3uLyu1qzyOIpzAKZxDANdQgzuoQwMYPMIzvMKbp7wX7937WLQWvHzmGP7A+/wBjJWPDw==</latexit><latexit sha1_base64="COchiK1BUgCh4UMd4KCR4O3lCz8=">AAAB7XicbVDLSgNBEOyNrxhfUY9eBoPgKeyKqMeAF48RzAOSJcxOepMxszPLzKwQQv7BiwdFvPo/3vwbJ8keNLGgoajqprsrSgU31ve/vcLa+sbmVnG7tLO7t39QPjxqGpVphg2mhNLtiBoUXGLDciuwnWqkSSSwFY1uZ37rCbXhSj7YcYphQgeSx5xR66RmVyU4oL1yxa/6c5BVEuSkAjnqvfJXt69YlqC0TFBjOoGf2nBCteVM4LTUzQymlI3oADuOSpqgCSfza6fkzCl9EivtSloyV39PTGhizDiJXGdC7dAsezPxP6+T2fgmnHCZZhYlWyyKM0GsIrPXSZ9rZFaMHaFMc3crYUOqKbMuoJILIVh+eZU0L6qBXw3uLyu1qzyOIpzAKZxDANdQgzuoQwMYPMIzvMKbp7wX7937WLQWvHzmGP7A+/wBjJWPDw==</latexit>

How to find L(ejω)

• As we have already seen, rational z-transform can be written as

• To compute the frequency response of , we compute at z = ej!

• But represents a point on the circle’s perimeterz = ej!

• Let Ai = |ej! � pi| and Bi = |ej! � µi|

L(z) = c(z � µ1)(z � µ2) . . . (z � µM )

(z � p1)(z � p2) . . . (z � pN )

L(z)L(ej!)

|L(ej!)| = |c| |ej! � µ1| |ej! � µ2| . . . |ej! � µM |

|ej! � p1| |ej! � p2| . . . |ej! � pN | , N � M

= |c|B1B2 . . . BM

A1A2 . . . AN

\L(ej!) = \(ej! � µ1) + \(ej! � µ2) + . . .+ \(ej! � µM )�� \(ej! � p1)� \(ej! � p2)� . . .� \(ej! � pN )

C(z)YREF(z) Y(z)

P(z)X

+- ⌘

L(z)YREF(z) Y(z)X

+-

• Definition (asymptotic stability of a feedback system):We say that the closed-loop system is asymptotically stable if the closed-loop transfer function L(z)/(1 + L(z)) is asymptotically stable.

• Closed-loop poles poles of L(z)/(1 + L(z)) zeros of 1 + L(z)=0 ⌘ ⌘

• This corresponds to all the roots lying in the unit circle, i.e., if the characteristic equation has zeros outside the unit circle, the closed loop system is unstable

Discrete-time Nyquist stability criterion

Discrete-time Nyquist stability criterion Discrete-time Nyquist stability criterion: The closed-loop system will be stable if (and only if) the number of clockwise encirclements of the point by as increases from 0 to is equal to

N−1 L(ejω) ω 2π

L(z)YREF(z) Y(z)X

+-

N = Z � PwhereZ : # of zeros of outside the unit circleχ(z) : 1 + L(z) = 0P : # of poles of outside the unit circleχ(z) : 1 + L(z) = 0

• The open loop poles are the same as the poles of the characteristic equation

• The zeros of determine the stability of the system so that if the characteristic equation has zeros outside the unit circle, then the closed loop system is unstable. The stability criterion is thus obtained by setting

and by demanding that the Nyquist curve encircles the point times counterclockwise

χ(z)

Z = 0 −1 P

Discrete-time Nyquist stability criterion

• The criterion becomes simple, if the open loop pulse transfer function L(z) has no poles outside the unit circle. Then, the Nyquist curve must not encircle the point –1 at all.

Re(

L(ejω))

Im(

L(ejω))

+−1

1

Re(

L(ejω))

Im(

L(ejω))

+−1

1

Re(

L(ejω))

Im(

L(ejω))

+−1

1

) L(z)

1 + L(z)

Asymptotically Stable

) L(z)

1 + L(z)

Marginally Stable Unstable

) L(z)

1 + L(z)

Example

• A discrete process ( ) is controlled with a proportional controller, which has gain , as shown below

h = 1K

KYREF(z) Y(z)

H(z)X

+-

H(z) =0.4

(z � 0.5)(z � 0.2)

• The discrete Nyquist diagram is constructed with MATLAB

-1 -0.5 0 0.5 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1Nyquist Diagram

Real Axis

Imag

inar

y Ax

is

>> sysd=zpk([ ],[0.2 0.5],0.4,1);>> nyquist(sysd)

• By zooming in at the intersection wit the real axis, the point is approximately -0.4416

-0.4416

• The magnitude can thus be multiplied with to reach the critical point (1/0.4416) −1

• The controlled system is stable when

K <1

0.4416⇡ 2.26

Example

• Stability can be determined by direct calculus from the pulse transfer function

H(z) =0.4

(z � 0.5)(z � 0.2)

• Substitute z with (Euler formula)ej!h = ej! = cos(!) + j sin(!)

• Then: H(ej!) =0.4

(ej! � 0.5)(ej! � 0.2)

=0.4

(cos! + j sin! � 0.5)(cos! + j sin! � 0.2)

=0.4

(cos2 ! � sin2 ! � 0.7 cos! + 0.1) + (2 cos! sin! � 0.7 sin!)j

=0.4

(2 cos2 ! � 0.7 cos! � 0.9) + (2 cos! sin! � 0.7 sin!)j

Example

• Setting the imaginary part equal to 0 the intersection point with the real axis is obtained:

2 cos! sin! � 0.7 sin! = 0 ) sin!(2 cos! � 0.7) = 0 )(sin! = 0

cos! = 0.35

• The frequency describes the start point in the Nyquist curve and the frequency the intersection point with the real axis.

0arccos(0.35)

• Substitute it to the frequency response function

• The gain of the controller K can be multiplied by the factor in order the crossing at point to take place. The controlled system is stable, when

(1/0.444)−1

K <9

4⇡ 2.25

H

⇣ejarccos(0.35)

⌘=

0.4

(2(0.35)2 � 0.7(0.35)� 0.9)= �4

9⇡ �0.444

<latexit sha1_base64="zTv+lua8F1TOL0e+maLjjnA7w8s=">AAACVXicbZHPS+NAFMcnWXW1/qrr0ctgEdpDQ1K7qAuC4MWjwlaFppbJ9KUdnWTCzItYQv5JL4v/iRfBadODqz4Y+PD9vse8+U6USWHQ918c98fS8srP1bXa+sbm1nZ959e1Ubnm0ONKKn0bMQNSpNBDgRJuMw0siSTcRA/nM//mEbQRKv2L0wwGCRunIhacoZWGdXkRSoixCXfFfZgwnOikYJpzZcqm7x3+bpWhFuMJtk7DWDNe+F63LJqdyrvrtH3vqGJLJ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RJuMw0siSTcRA/nM//mEbQRKv2L0wwGCRunIhacoZWGdXkRSoixCXfFfZgwnOikYJpzZcqm7x3+bpWhFuMJtk7DWDNe+F63LJqdyrvrtH3vqGJLJ62SnrarPtt1UoYsy7R6orRN7Vy3O6w3fM+fF/0KwQIaZFGXw/pzOFI8TyBFLpkx/cDPcGAXRMEllLUwN5Ax/sDG0LeYsgTMoJinUtIDq4xorLQ9KdK5+nGiYIkx0ySynbOHm8/eTPzO6+cYHw8KkWY5Qsqri+JcUlR0FjEdCQ0c5dQC41rYXSmfMJsK2o+o2RCCz0/+CtcdL7B81W2c/VnEsUr2yD5pkoAckTNyQS5Jj3DyTF4dx3Gdf86bu+SuVK2us5jZJf+Vu/0OBj6taA==</latexit><latexit sha1_base64="zTv+lua8F1TOL0e+maLjjnA7w8s=">AAACVXicbZHPS+NAFMcnWXW1/qrr0ctgEdpDQ1K7qAuC4MWjwlaFppbJ9KUdnWTCzItYQv5JL4v/iRfBadODqz4Y+PD9vse8+U6USWHQ918c98fS8srP1bXa+sbm1nZ959e1Ubnm0ONKKn0bMQNSpNBDgRJuMw0siSTcRA/nM//mEbQRKv2L0wwGCRunIhacoZWGdXkRSoixCXfFfZgwnOikYJpzZcqm7x3+bpWhFuMJtk7DWDNe+F63LJqdyrvrtH3vqGJLJ62SnrarPtt1UoYsy7R6orRN7Vy3O6w3fM+fF/0KwQIaZFGXw/pzOFI8TyBFLpkx/cDPcGAXRMEllLUwN5Ax/sDG0LeYsgTMoJinUtIDq4xorLQ9KdK5+nGiYIkx0ySynbOHm8/eTPzO6+cYHw8KkWY5Qsqri+JcUlR0FjEdCQ0c5dQC41rYXSmfMJsK2o+o2RCCz0/+CtcdL7B81W2c/VnEsUr2yD5pkoAckTNyQS5Jj3DyTF4dx3Gdf86bu+SuVK2us5jZJf+Vu/0OBj6taA==</latexit>

Example

• Find the values of K for which the following system

KYREF(z) Y(z)

G(z)X

+-

is stable for .G(z) =1

z � 2

Solution:G(z) =

1

z � 2) G(ej!) =

1

ej! � 2

=z � 2 + K

z � 21 + K

1z � 2

check:

) G(ej✓) =1

ej✓ � 2

ej✓

, 1 < K < 3

) 1 < K < 3

Im

Re

Closed-loop stable

Example.

x1 2-1

Im

Re-1

-1/3

z-plane

G(z) =1

z � 2

�1 < � 1K

< �13

33

Interpretation

Note the following points:

• If the open-loop system is stable, then just plot G(ej✓) for 0 ✓ ⇡,and use the same rule as for continuous-time: ‘Leave the �1/Kpoint on your left as you move along the Nyquist diagram’.

• Although plotting the discrete-time Nyquist diagram is di↵erentfrom plotting the continuous-time one (G(ej✓) instead of G(j!)),its interpretation is exactly the same: gain and phase margins canbe read o↵ it in the same way, and have the same meanings. Gainand phase margins can also be found from the Bode diagram inexactly the same way as for continuous time.

• For physical systems G(ej✓) = G(e�j✓). Thus to find a completeNyquist diagram you only need to plot G(ej✓) for 0 ✓ ⇡(which corresponds to frequencies used on Bode plot) andthen draw in complex conjugate locus.

• See Remark 2 on continuous time revision notes for tips oncounting encirclements.

34

ej!

Closed-loop stable:

One unstable pole

One counter clockwise encirclement of point

-1/K�1 < � 1

K< �1

3) 1 < K < 3

Open-loop poles on the unit circle

• To obtain a closed curve for the Nyquist plot (and hence correctly count the encirclements), it is customary to indent the path of ejω around the poles on the unit circle with a small semi-circular excursion outside the unit circle.

• Then, the open loop poles on the unit circle are counted as being stable in the stability criterion.

Open-loop poles on the unit circle

Closing the locus

Im

Re

x

x1

In order to obtain a closed curve for the Nyquist locus and hencecorrectly count the encirclements, it is customary to indent the pathof z around the poles on the unit circle with a small semi-circularexcursion outside the unit circle. Then the open loop poles on theunit circle are counted as being stable in the stability criterion.

The “right turn” in the z-plane then gives a “right turn” in the G-planeand a circular arc of large radius is produced which continues for m⇡radians where m is the multiplicity of the pole on the unit circle.

35

G(z) =1

(z � 1)F (z)

G(z) =1

(z � 1){F (1) + F 0(1)(z � 1)+

+12F 00(1)(z � 1)2 + . . .

Asymptotes

If there is an open-loop pole of multiplicity one on the unitcircle then the Nyquist diagram will be asymptotic to astraight line as it tends to infinity. It is possible to findthe asymptote along which it tends as follows.

Suppose that G(z) has a pole at z = 1, i.e.

where F (z) has no poles or zeros at z = 1.

Then for z ⇡ 1, expand F (z) in a Taylor series to give

36

• The “right turn” in the z-plane gives a “right turn” in the Argand diagram and a circular arc of large radius is produced.

Closing the plot:

Open-loop poles on the unit circle

Asymptotes:

• If there is an open-loop pole of multiplicity one on the unit circle then the Nyquist diagram will be asymptotic to a straight line as it tends to infinity.

• It is possible to find the asymptote along which it tends. Suppose has a pole at , i.e.,

G(z)z = 1

G(z) =1

z � 1F (z)

where has no poles at . Then for , expand in a Taylor series to give:

F(z) z = 1 z ≈ 1 F(z)

G(z) =1

z � 1

⇢F (1) + (z � 1)F 0(1) +

1

2F 00(z)(z � 1)2 + . . .

⇡ F (1)

(z � 1)+ F 0(1)

Open-loop poles on the unit circle

• But

1

ej! � 1=

1

ej!2 (ej

!2 � e�j !

2 )=

e�j !2

2j sin !2

=cos !

2 � j sin !2

2j sin !2

= �1

2� j

2 tan !2

large as ! ! 0

• Hence

G(ej!) ⇡ �1

2F (1) + F 0(1)� j

F (1)

2 tan !2

constant real part

• For multiple poles on the unit circle the asymptotic behavior is more complex and requires more terms in the Taylor series expansion.

1ej✓ � 1

=n

ej✓/2(ej✓/2 � e�j✓/2)o�1

=e�j✓/2

2j sin(✓/2)

= �12� j

2 tan(✓/2)

G(ej✓) ⇡ �12F (1) + F 0(1)� j

F (1)2 tan(✓/2)

But

Hence

⇡ F (1)(z � 1)

+ F 0(1)

Hence the asymptote as ✓ ! 0 will be a straight line with a constant

real part of � 12F (1) + F 0

(1).

For multiple poles on the unit circle the asymptotic behaviour is morecomplex and requires more terms in the Taylor series expansion.

= cos✓

2� j sin

2

large as ✓ ! 0

37

and � 12F (1) + F 0(1) =

1z

� 1z2

� 1K

< �1 , 0 < K < 1

� 1K

x1

Example.

Im

Rex

z-plane

right turn

Closed-loop stable for

Im

Re

Nyquist diagram

0.5-1.5 -1

G(z) =1

z(z � 1). Then, F (z) = , F 0(z) =

�1.5

38

Example

• Find the values of K for which the following system

KYREF(z) Y(z)

G(z)X

+-

is stable for .

Solution:

G(z) =1

z(z � 1)

Closed-loop stable for: � 1

K< �1 ) 0 < K < 1

Gain and phase margins

• L(ejω) being close to -1 without encircling it is undesirable for 2 main reasons: 1. It implies that a closed-loop pole will be close to the imaginary axis and

that the closed-loop system will be oscillatory2. If our plant P(z) is the transfer function of an inaccurate model, then the

“true” Nyquist diagram might actually encircle −1

Re(

L(ejω))

Im(

L(ejω))

ω = ωgc

ω = ωpc

L(ejω)

θ

−1 −α

1

• The gain margin (GM) is a measure of how much the gain can be increased before the closed-loop system becomes unstable

• The phase margin (PM) is a measure of how much phase lag can be added before the closed-loop system becomes unstable

GM =1

↵=

1

|L(ej!pc)|

PM = ✓ = ⇡ + \L(ej!gc)

Gain and phase margins via Bode plots

Gain plot

Phase plot

!pc!gc

PM

GM

• Phase crossover frequency ωpc: frequency at which the phase equals 180o

• Gain crossover frequency ωgc: frequency at which the magnitude equals 1

Lyapunov’s stability theory

• A useful tool for determining the stability of linear and nonlinear dynamical systems

• Allows to guarantee asymptotic stability, regions of stability, etc.

• Main idea: introduce a generalized energy function, called the Lyapunov function, which is zero at the equilibrium and positive elsewhere

• Aleksandr Mikhailovich Lyapunov developed the theory for differential equations in 1900, but the corresponding theory has also been developed for difference equations.

• Lyapunov well known for his development of the stability theory of a dynamical system, as well as for his contributions to mathematical physics and probability theory.

• The theory passed into oblivion, until N. G. Chetaev realized the magnitude of the discovery made by Lyapunov. The interest in it skyrocketed during the Cold War period when it was found to be applicable to the stability of aerospace guidance systems which typically contain strong nonlinearities not treatable by other methods.

Lyapunov’s stability theory

• Stability: - Once the state enters a level set, it does not leave. Bounded level sets ensure

bounded trajectories (stability) - The equilibrium will be asymptotically stable if we can show that the Lyapunov

function decreases along the trajectories of the system.

• Geometric illustration of Lyapunov’s theorem:

- Lyapunov function (left)

- Level curves for Lyapunov function in the 2-dimensional case (right). All level curves encircle the origin and do not intersect any other level curve.

V(x)

V(x)

How to ensure stability?

How do we ensure that a system is globally asymptotically stable?

• Easy if system is linear:

xt+1 = Axt

It is necessary and su�cient that all |�i(A)| < 1.

• Much more di�cult for nonlinear or constrained systems

Lyapunov theory very powerful for analysis of nonlinear systems

• Basic idea: introduce energy measure, show that does not increase• Allows to guarantee asymptotic stability, regions of local stability, etc• Sometimes both necessary and su�cient

5 / 29

A first Lyapunov theorem

Theorem. If there exists a continuous function V (x) whose sublevel sets

LV (↵) = {x | V (x) ↵}

are bounded for every value of ↵, and

�V (x) = V (f (x))� V (x) 0 8x

then all trajectories of (1) are bounded.

Proof.

V (xt) = V (x0) +t�1X

k=0

�V (xk) V (x0)

so trajectory lies in {x | V (x) V (x0)} which is bounded by assumption.

6 / 29

Lyapunov theorem in pictures

Lyapunov function (left); level sets and one state trajectory (right)

x1x 2

−10 −5 0 5 10−10

−8

−6

−4

−2

0

2

4

6

8

10

CV,α = {x | V (x) ≤ α}

x(0) x(1) x(2)

• once the state enters a level set, it never leaves.• bounded level sets ensure bounded trajectories (stability).• a few additional conditions on V will ensure asymptotic stability

7 / 29

Positive definite functions

Definition. A function V : Rn 7! R is positive semidefinite if

V (x) � 0 for all x

Definition. A function V : Rn 7! R is positive definite if(a) V (x) � 0 for all x

(b) V (0) = 0 if and only if x = 0

(c) all sublevel sets of V are bounded

Condition (c) is equivalent to V (x)!1 as x !1

Example. V (x) = xTPx with P = P T is positive definite i↵ P � 0.

8 / 29

How to ensure stability?

How do we ensure that a system is globally asymptotically stable?

• Easy if system is linear:

xt+1 = Axt

It is necessary and su�cient that all |�i(A)| < 1.

• Much more di�cult for nonlinear or constrained systems

Lyapunov theory very powerful for analysis of nonlinear systems

• Basic idea: introduce energy measure, show that does not increase• Allows to guarantee asymptotic stability, regions of local stability, etc• Sometimes both necessary and su�cient

5 / 29

A first Lyapunov theorem

Theorem. If there exists a continuous function V (x) whose sublevel sets

LV (↵) = {x | V (x) ↵}

are bounded for every value of ↵, and

�V (x) = V (f (x))� V (x) 0 8x

then all trajectories of (1) are bounded.

Proof.

V (xt) = V (x0) +t�1X

k=0

�V (xk) V (x0)

so trajectory lies in {x | V (x) V (x0)} which is bounded by assumption.

6 / 29

Lyapunov theorem in pictures

Lyapunov function (left); level sets and one state trajectory (right)

x1

x 2

−10 −5 0 5 10−10

−8

−6

−4

−2

0

2

4

6

8

10

CV,α = {x | V (x) ≤ α}

x(0) x(1) x(2)

• once the state enters a level set, it never leaves.• bounded level sets ensure bounded trajectories (stability).• a few additional conditions on V will ensure asymptotic stability

7 / 29

Positive definite functions

Definition. A function V : Rn 7! R is positive semidefinite if

V (x) � 0 for all x

Definition. A function V : Rn 7! R is positive definite if(a) V (x) � 0 for all x

(b) V (0) = 0 if and only if x = 0

(c) all sublevel sets of V are bounded

Condition (c) is equivalent to V (x)!1 as x !1

Example. V (x) = xTPx with P = P T is positive definite i↵ P � 0.

8 / 29

Lyapunov function

• V(x) is a Lyapunov function for the system

Condition 3 implies that the dynamics of the system is such that the solution always moves toward curves with lower values

x[k + 1] = f(x[k]), f(0) = 0

if

1. is continuous in and .

2. for all .

3. is negative definite.

V(x) x V(0) = 0

V(x) ≥ 0 x

ΔV(x) = V(x[k + 1]) − V(x[k])

Stability theorem of Lyapunov

• From the geometric interpretation → the existence of a Lyapunov function ensures asymptotic stability

• The following theorem is a precise statement of this fact:

Theorem: The solution is asymptotically stable if there exists a Lyapunov function to the system

x[k] = 0

Further, if

x[k + 1] = f(x[k]), f(0) = 0

0 < �(kxk) < V (x)

where , then the solution is asymptotically stable for all initial conditions.

�(kxk) ! 1 as kxk ! 1

• Main obstacle to using the Lyapunov theory is finding a suitable Lyapunov function

Application to Linear systems

• For the linear system

it is straightforward to determine quadratic Lyapunov functions. Take:

x[k + 1] = �x[k], x[0] = ↵

V (x) = xTPx

as a candidate Lyapunov function. The increment of V is then given by

�V (x) = V (x[k + 1])� V (x[k])

= V (�x[k])� V (x[k])

= xT [k]�TP�x[k]� xT [k]Px[k]

= xT [k]��TP�� P

�x[k]

= �xT [k]Qx[k]

• For V to be a Lyapunov function is necessary and sufficient that there exists a positive definite matrix P that satisfies the equation:

�TP�� P = �Q

where Q is positive definite. The equation above is called the Lyapunov equation

Application to Linear systems

• There is always a solution to the Lyapunov equation when the linear system is stable. Matrix P is positive definite if Q is positive definite

• One way of determining a Lyapunov function for a linear system is to choose a positive definite matrix Q and solve the Lyapunov equation. If the solution P is positive definite then the system is asymptotically stable.

90

2 0 .....00.

Analysis ofDiscrete-Time Systems Chap. 3

-2 oState Xl

2

Figure 3.9 Level curves ofV(x} and trajectories for different initial valuesof the system in Example 3.6. The sampling points are indicated by dots.

Sensitivity

We will first determine the sensitivity of a closed-loop system with respectto changes in the open-loop pulse-transfer function. Consider the system inFig. 3.10. The closed-loop system has a feedforward filter Hrr from the referencesignal and a feedback controller H{h' There are also an input load disturbancev and measurement noise e.The primary process output is x, and the measuredsignal is y. The pulse-transfer operator from the inputs to y is given by

HffH H 1y;;;; 1+ L Ur + 1 +L v + 1+L e

where the loop-transfer function is defined as L = HrbH. The closed-loop pulse-

v

H

e

-HfQ

Figure 3.10 Closed-loop system withfeedback andfeedforward controllers.

• Example: x[k + 1] =

0.4 0�0.4 0.6

�x[k]

Using Q =

1 00 1

�) P =

1.19 �0.25�0.25 2.06

Level curves for V (x) = xTPx

Trajectories for some starting values of x

Learning outcomes

By the end of this lecture, you should be able to:

• Understand the different notions and forms of stability

• Analyze the stability properties of discrete dynamical systems using:

‣ Jury’s stability criterion,

‣ Nyquist stability criterion, and

‣ Lyapunov’s stability theory