Vous êtes sur la page 1sur 118

State space

representations
(SEM)

Modelling, analysis and control of linear O.Sename

systems using state space Introduction

representations Modelling of
dynamical
systems

Properties

Discrete-time
O. Sename1 systems

State feedback
1 Gipsalab, control
CNRS-INPG, FRANCE
Olivier.Sename@inpg.fr Observer
www.lag.ensieg.inpg.fr/sename Integral Control

A polynomial
approach
Approche Etat pour la commande / IEG- SEM
Further in
discrete-time
control

Conclusion
State space
Outline representations
(SEM)

O.Sename
Introduction
Introduction

Modelling of dynamical systems Modelling of


dynamical
systems
Properties Properties

Discrete-time
Discrete-time systems systems

State feedback
State feedback control control

Observer
Observer Integral Control

A polynomial
Integral Control approach

Further in
A polynomial approach discrete-time
control

Conclusion
Further in discrete-time control

Conclusion
State space
References representations
(SEM)

O.Sename

Introduction
Some interesting books: Modelling of
dynamical
◮ K.J. Astrom and B. Wittenmark, Computer-Controlled systems

Systems, Information and systems sciences series. Properties

Prentice Hall, New Jersey, 3rd edition, 1997. Discrete-time


systems
◮ R.C. Dorf and R.H. Bishop, Modern Control Systems, State feedback
control
Prentice Hall, USA, 2005.
Observer
◮ G.C. Goodwin, S.F. Graebe, and M.E. Salgado, Integral Control
Control System Design, Prentice Hall, New Jersey, A polynomial
approach
2001.
Further in
◮ discrete-time
control
◮ Conclusion
State space
representations
Objective of any control system: (SEM)

O.Sename
Nominal stability (NS): The system is stable with the
Introduction
nominal model (no model uncertainty)
Modelling of
Nominal Performance (NP): The system satisfies the dynamical
systems
performance specifications with the nominal Properties
model (no model uncertainty) Discrete-time
systems
Robust stability (RS): The system is stable for all State feedback
perturbed plants about the nominal model, up control

to the worst-case model uncertainty Observer

Integral Control
(including the real plant)
A polynomial
Robust performance (RP): The system satisfies the approach

performance specifications for all perturbed Further in


discrete-time
plants about the nominal model, up to the control

worst-case model uncertainty (including the Conclusion

real plant).
State space
representations
(SEM)

O.Sename

Introduction
Recall of the "control design" process: Modelling of
dynamical
◮ Plant study and modelling systems

Properties
◮ Determination of sensors and actuators (measured
Discrete-time
and controlled outputs, control inputs) systems

◮ Performance specifications State feedback


control
◮ Control design (many methods) Observer

Integral Control
◮ Simulation tests
A polynomial
◮ Implementation, tests and validation approach

Further in
discrete-time
control

Conclusion
State space
representations
Different issues for modelling: (SEM)

Identification based method O.Sename

◮ System excitations using PRBS (Pseudo Random Introduction

Binary Signal) or sinusoïdal signals Modelling of


dynamical
systems
◮ Determination of a transfer function reproducing the
Properties
input/ouput system behavior
Discrete-time
systems
Knowledge-based method:
State feedback
◮ Represent the system behavior using differential control

and/or algebraic equations, based on physical Observer

knowledge. Integral Control

A polynomial
◮ Formulate a nonlinear state-space model, i.e. a matrix approach

differential equation of order 1. Further in


discrete-time
control
◮ Determine the steady-state operating point about
Conclusion
which to linearize.
◮ Introduce deviation variables and linearize the model.
State space
representations
(SEM)

O.Sename
Why state space equations ?
Introduction
◮ dynamical systems where physical equations can be
Modelling of
derived : electrical engineering, mechanical dynamical
systems
engineering, aerospace engineering, microsystems,
Properties
process plants .... Discrete-time
systems
◮ include physical parameters: easy to use when
State feedback
parameters are changed for design control

◮ State variables have physical meaning. Observer

Integral Control
◮ Easy to extend to Multi-Input Multi-Output (MIMO) A polynomial
systems approach

Further in
◮ Advanced control design method are based on state discrete-time
control
space equations (reliable numerical optimisation tools)
Conclusion
State space
Some physical examples representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
General dynamical system representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Many dynamical systems can be represented by Ordinary Properties

Differential Equations (ODE) as Discrete-time


systems
( State feedback
ẋ(t) = f ((x(t), u(t), t), x(0) = x0 control
(1) Observer
y(t) = g((x(t), u(t), t)
Integral Control

A polynomial
where f and g are non linear functions. approach

Further in
discrete-time
control

Conclusion
State space
Example: Inverted pendulum representations
(SEM)
It is described by: O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach
Parameters:
Further in
discrete-time
control

Conclusion
State space
Example: Inverted pendulum representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
The dynamical equations are as follows: systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Example: Lateral vehicle model representations
(SEM)

The dynamical equations are as follows: O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Definition of state space representations representations
(SEM)

O.Sename

Introduction
A continuous-time LINEAR state space system is given Modelling of
as : ( dynamical
systems
ẋ (t) = A(x(t) + Bu(t), x(0) = x0
Properties
(2)
y(t) = Cx(t) + Du(t) Discrete-time
systems

where x(t) ∈ Rn is the system state (vector of state State feedback


control
variables), u(t) ∈ Rm the control input and y(t) ∈ Rp the Observer
measured output. A, B, C and D are real matrices of Integral Control
appropriate dimensions. x0 is the initial condition. A polynomial
approach
n is the order of the state space representation.
Further in
Matlab : ss(A,B,C,D) creates a SS object discrete-time
control
SYS representing a continuous-time
Conclusion
state-space model
State space
A first example: DC Motor representations
(SEM)

O.Sename

The dynamical equations are : Introduction

Modelling of
dynamical
di
Ri + L + e = u e = Ke ω systems

dt Properties

= −f ω + Γm Γm = K c i
Discrete-time
J systems
dt State feedback
control
System of 2 equations
 of order
 1 =⇒ 2 state variables. A Observer
ω
possible choice x = It gives: Integral Control
i A polynomial
approach
    Further in
−f /J Kc /J 0  discrete-time
A= B= C= 0 1 control
−Ke /L −R/L 1/L
Conclusion

Extension: measurment= motor angular position


State space
Example : Wind turbine representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
A linearisation within 2 regions gives State space
representations
(SEM)

ẋ(t) = Ax(t) + Bu(t) + Ed (t) O.Sename

y(t) = Cx(t) Introduction

Modelling of
with dynamical
systems
 γ −Cd Cd
    α 
−1 Properties
Irot Irot Irot 0 Irot
  Discrete-time
A =  Kd 0 −Kd  , B =  0  , E =  0  , systems
Cd −1 Cd −1
Igen Igen Igen Igen 0 State feedback
control

 Observer
and C = 0 0 1 Integral Control
x1 = rotor-speed x2 = drive-train torsion spring force, x3 = A polynomial
rotational generator speed approach

u = generator torque, d : wind speed Further in


discrete-time
Irot : rotor rotational inertia, Igen : generator rotational inertia, Kd : control

spring constant, Cd : torsional damping constant, α partial Conclusion

derivative of rotor aerodynamic torque with respect blade pitch


angle, γ : partial derivative of rotor aerodynamic torque with
respect to rotor speed
State space
Examples: Suspension representations
(SEM)

Let the following mass-spring-damper system. O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
where x1 is the relative position, M1 the system mass, k1 discrete-time
control
the spring coefficient, u the force generated by the active
Conclusion
damper, and F1 is an external disturbance. Applying the
mechanical equations it leads:
M1 ẍ1 = −k1 x1 + u + F1 (3)
State space
Examples: Suspension cont. representations
(SEM)

O.Sename

Introduction
  Modelling of
x1 dynamical
The choice x = gives systems
ẋ1
Properties
 Discrete-time
ẋ(t) = Ax(t) + Bu(t) + Ed (t) systems

y(t) = Cx(t) State feedback


control

Observer
where d = F1 , y = x1 with
Integral Control
    A polynomial
0 1 0  approach
A= , B=E = , and C = 0 1
−k1 /M1 0 1/M1 Further in
discrete-time
control

Conclusion
State space
Exercice representations
(SEM)

O.Sename

Introduction
Let the following quarter car model with active suspension. Modelling of
dynamical
Zcaisse and Zroue ) are the relative systems
position of the chassis and of the Properties

tire, Discrete-time
systems
mc (resp. mr ) the mass of the chas-
State feedback
sis (resp. of the tire), control

k (resp. kp ) the spring coefficient of Observer

the suspension (of the tire), Integral Control

A polynomial
u the active damper force, approach
Zsol is the road profile. Further in
discrete-time
Choose some state variables and give a state space control

representation of this system Conclusion


State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Linearisation systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Equilibrium point representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

An equilibrium point satisfies: Discrete-time


systems

State feedback
0 = f ((xeq (t), ueq (t), t) (4) control

Observer
For the pendulum, we can choose y = θ = f = 0. Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Linearisation Method (1) representations
(SEM)

O.Sename
The linearisation can be done around an equilibrium point
Introduction
or around a particular point.
Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Linearisation Method (2) representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
This leads to a linear state space representation of the systems

system, around the equilibrium point. Properties

Defining x̃ = x − xeq , ũ = u − ueq and ỹ = y − yeq we get Discrete-time


systems
( State feedback
x̃˙ (t) = Ax̃(t) + B ũ(t), control
(5) Observer
ỹ(t) = C x̃ (t) + D ũ(t) Integral Control

A polynomial
with A = ∂∂xf |x=xeq ,u=ueq , B = ∂∂uf |x=xeq ,u=ueq , approach

C = ∂∂ gx |x=xeq ,u=ueq and D = ∂∂ gu |x=xeq ,u=ueq Further in


discrete-time
control

Conclusion
State space
Example: Inverted pendulum (2) representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
Applying the linearisation method leads to : systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Linear systems : Discrete-time


systems

State feedback

transfer function control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Equivalence transfer function - state space representations
(SEM)
representation O.Sename

Introduction
Consider a linear system given by:
Modelling of
 dynamical
ẋ(t) = Ax(t) + Bu(t), x(0) = x0 systems
(6)
y(t) = Cx(t) + Du(t) Properties

Discrete-time
systems
Using the Laplace transform (and assuming zero initial
State feedback
condition x0 = 0), (6) becomes: control

Observer

s.x(s) = Ax(s) + Bu(s) ⇒ (s.In − A)x(s) = Bu(s) Integral Control

A polynomial
approach
Then the transfer function matrix of system (6) is given by
Further in
discrete-time
N(s) control
G(s) = C(sIn − A)−1 B + D = (7) Conclusion
D(s)

Matlab: if SYS is an SS object, then tf(SYS) gives the


associated transfer matrix. Equivalent to tf(N,D)
State space
Conversion TF to SS representations
(SEM)

O.Sename

There mainly three cases to be considered Introduction


Simple numerator Modelling of
dynamical
systems
y 1
= G(s) = 3 s
Properties
u s + a1 2 + a2 s + a3 Discrete-time
systems

Numerator order less than denominator order State feedback


control

y b s2 + b s + b3 N(s) Observer
= G(s) = 3 1 s 2 = Integral Control
u s + a12 + a2 s + a3 D(s)
A polynomial
approach
Numerator equal to denominator order Further in
discrete-time
control
y b0 s3 + b1 s2 + b2 s + b3 N(s)
= G(s) = = Conclusion
u s3 + as12 + a2 s + a3 D(s)
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Canonical forms systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Canonical forms representations
(SEM)

O.Sename

Some specific state space representations are well-known Introduction

and often used as the so-called controllable


 canonical
 form Modelling of
0 1 0 ... 0 0 dynamical
systems
 0 0 1 0 ...   .. 
   .  Properties
 .. .. .. . . ..   
A= . .  .  Discrete-time
. . .  , B =  ..  and
  systems
 ..    State feedback
 0 . 0 1   0  control
−a0 −a1 . . . . . . −an−1 1 Observer
 
C= c0 c1 ... cn−1 . Integral Control

It corresponds to the transfer function: A polynomial


approach

Further in
c0 + c1 s + . . . + cn−1 sn−1 discrete-time
G(s) = control
a0 + a1 s + . . . + an−1 sn−1 + sn Conclusion

In Matlab, use canon


State space
Modal form representations
(SEM)
Let us consider a transfer funtion as: O.Sename

b1 b2 bn
G(s) = + + ... + Introduction
s − a1 s − a2 s − an Modelling of
dynamical
systems
◮ Define a set of transfer functions:
Properties
Xi (s) bi
= ⇒ ẋi = ai xi bi ui Discrete-time
U(s) s − ai systems

State feedback
◮ This gives control

 Observer
ẋ(t) = Ax(t) + Bu(t), x(0) = x0 Integral Control
(8)
y(t) = Cx(t) + Du(t) A polynomial
approach
   
a1 0 . . . 0 b1 Further in
discrete-time
 ..   b2  control
 0 a2 0 . 
with A =  , B =  
 ..  and Conclusion

 0 . .
.. .. 0    . 
0 . . . 0 an bn
 
C= 1 1 1 1 .
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Solution of state space Discrete-time


systems

State feedback

linear systems control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Solution of state space equations - continuous representations
(SEM)
case O.Sename

Introduction

Modelling of
dynamical
The state x(t), solution of ẋ(t) = Ax(t), with initial systems

Properties
condition x(0) = x0 is given by
Discrete-time
systems
At
x(t) = e x(0) (9) State feedback
control

This requires to compute eAt . There exist 3 methods to Observer

compute eAt : Integral Control

A polynomial
1. Inverse Laplace transform of (sIn − A)−1 : approach

Further in
2. Diagonalisation of A discrete-time
control
3. Cayley-Hamilton method Conclusion
State space
Complete state solution representations
(SEM)

O.Sename

Introduction

The state x(t), solution of system (6), is given by Modelling of


dynamical
systems
Z t
x(t) = At
e x(0) + eA(t− τ ) Bu(τ )d τ (10) Properties

|0
| {z } Discrete-time
{z } systems
free response
forced response State feedback
control

In Matlab : use expm and not exp. Observer

Integral Control
Simulation of state space systems A polynomial
approach
Use lsim.
Further in
Example: discrete-time
control
t = 0:0.01:5; u = sin(t); lsim(sys,u,t)
Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Non unicity systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Non unicity representations
(SEM)
Given a transfer function, there exists an infinity of state O.Sename

space representations (equivalent in terms of input-output


Introduction
behavior). Let Modelling of
 dynamical
ẋ(t) = Ax(t) + Bu(t), systems
(11)
y(t) = Cx(t) + Du(t) Properties

Discrete-time

the transfer matrix being G(s) = C(sIn − A)−1B + D, and


systems

State feedback
consider the change of variables x = Tz (T being an control

invertible matrix). Replacing x = Tz in the previous system Observer

gives: Integral Control

A polynomial
T ż(t) = ATz(t) + Bu(t) (12) approach

Further in
y(t) = CTz(t) + Du(t) (13) discrete-time
control

Hence Conclusion

ż(t) = T −1 ATz(t) + T −1 Bu(t) (14)


y(t) = CTz(t) + Du(t) (15)
State space
representations
(SEM)

O.Sename

Defining à = T −1AT , B̃ = T −1B and C̃ = CT , the transfer Introduction

Modelling of
function of the previous system is: dynamical
systems

G̃(s) = C̃(sIn − Ã)−1 B̃ + D (16) Properties

−1 −1 −1 Discrete-time
= C T (sIn − T AT ) T B +D (17) systems

State feedback
(18) control

Observer
Using In = T −1 T , we get Integral Control

A polynomial
G̃(s) = C T T −1 (sIn − A)−1 T T −1 B + D = G(s) (19) approach

Further in
discrete-time
control

Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Stability systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Stability representations
(SEM)

O.Sename

Definition Introduction

An equilibrium point xeq is stable if, for all ρ > 0, there Modelling of
dynamical
exists a η > 0 such that: systems

Properties

kx(0) − xeq k < η =⇒ kx(t) − xeq k < ρ , ∀t ≥ 0 Discrete-time


systems

State feedback
control

Definition Observer

An equilibrium point xeq is asymptotically stable if it is Integral Control

stable and, there exists η > 0 such that: A polynomial


approach

Further in
kx(0) − xeq k < η =⇒ x(t) → xeq , when t → ∞ discrete-time
control

Conclusion
These notions are equivalent for linear systems (not for
non linear ones).
State space
Stability Analysis representations
(SEM)

O.Sename

Introduction

The stability of a linear state space system is analyzed Modelling of


dynamical
through the characteristic equation det(sIn − A) = 0. systems

The system poles are then the eigenvalues of the matrix A. Properties

It then follows: Discrete-time


systems

Proposition State feedback


control
A system ẋ(t) = Ax(t), with initial condition x(0) = x0 , is Observer

stable if Re(λi ) < 0, ∀i, where λi , ∀i, are the eigenvalues of Integral Control

A. A polynomial
approach
Using Matlab, if SYS is an SS object then pole(SYS) Further in
discrete-time
computes the poles P of the LTI model SYS. It is control
equivalent to compute eig(A). Conclusion
State space
Stability Analysis - Lyapunov representations
(SEM)

The stability of a linear state space system can be O.Sename

analysed through the Lyapunov theory. Introduction


It is the basis of all extension of stability for non linear Modelling of
systems, time-delay systems, time-varying systems ... dynamical
systems

Theorem Properties

A system ẋ(t) = Ax(t), with initial condition x(0) = x0 , is Discrete-time


systems
asymoptotically stable at x = 0 if and only if there exist State feedback
some matrices P = P T > 0 and Q > 0 such that: control

Observer
T
A P + PA = −Q (20) Integral Control

A polynomial
approach
see lyap in MATLAB. Further in
Proof: The Lyapunov theory says that a linear system is discrete-time
control
stable if there exists a continuous function V (x) s.t.: Conclusion

dV
V (x) > 0 with V (0) = 0 and V̇ (x) = ≥0
dx
A possible Lyapunov function for the above system is :
State space
About zeros representations
(SEM)

O.Sename

◮ Roots of the transfer function numerator are called the Introduction

system zeros. Modelling of


dynamical
◮ Need to develop a similar way of defining/computing systems

Properties
them using a state space model.
Discrete-time
◮ Zero: is a generalized frequency α for which the systems

system can have a non-zero input u(t) = u0 eα t , but State feedback


control
exactly zero output y(t) = 0. Observer
◮ The zeros are found by solving: Integral Control

A polynomial
 
A − λ In B approach
=0 (21) Further in
C D discrete-time
control

Conclusion
In Matlab use zero
s+3
Example: find the zero of : s2+5s+2
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Controllability systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Controllability representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems
Controllability refers to the ability of controlling a Properties
state-space model using state feedback. Discrete-time
systems
Definition State feedback
control
Given two states x0 and x1 , the system (6) is controllable if
Observer
there exist t1 > 0 and a piecewise-continuous control input
Integral Control
u(t), t ∈ [0, t1 ], such that x(t) takes the values x0 for t = 0 A polynomial
and x1 for t = t1 . approach

Further in
discrete-time
control

Conclusion
State space
Controllability cont. representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
Proposition systems

The controllability matrix is defined by Properties

C = [B, A.B, . . . , An−1 .B]. Then system (6) is controllable if Discrete-time


systems
and only if rank(C ) = n. State feedback
If the system is single-input single output (SISO), it is control

equivalent to det(C ) 6= 0. Observer

Integral Control
Using Matlab, if SYS is an SS object then crtb(SYS) A polynomial
approach
returns the controllability matrix of the state-space model
Further in
SYS with realization (A,B,C,D). This is equivalent to discrete-time
control
ctrb(sys.a,sys.b)
Conclusion
State space
Exercices representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems
Test the controllability of the previous examples: DC motor,
State feedback
suspension, inverted pendulum. control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Observability systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Observability representations
(SEM)

O.Sename

Introduction

Modelling of
Observability refers to the ability to estimate a state dynamical
systems
variable.
Properties

Definition Discrete-time
systems
A linear system (2) is completely observable if, given the State feedback
control and the output over the interval t0 ≤ t ≤ T , one can control

determine any initial state x(t0 ). Observer

Integral Control
It is equivalent to characterize the non-observability as :
A polynomial
A state x(t) is not observable if the corresponding output approach

vanishes, i.e. if the following holds: Further in


discrete-time
y(t) = ẏ(t) = ÿ (t) = . . . = 0 control

Conclusion
State space
Where does observability come from ? representations
(SEM)

O.Sename

Introduction

Compare the transfer function of the two different systems* Modelling of


dynamical
systems

ẋ = −x + u Properties

Discrete-time
y = 2x systems

State feedback
control
and
Observer
   
−1 0 1 Integral Control
ẋ = x+ u
0 −2 1 A polynomial
approach

  Further in
y = 2 0 x discrete-time
control

Conclusion
State space
Observability cont. representations
(SEM)

O.Sename

Introduction
Proposition   Modelling of
dynamical
C systems

 CA 
 Properties
The observability matrix is defined by O =  .. . Discrete-time
 .  systems

CAn−1 State feedback


control
Then system (6) is observable if and only if rank(O) = n.
Observer
If the system is single-input single output (SISO), it is Integral Control
equivalent to det(O) 6= 0. A polynomial
approach
Using Matlab, if SYS is an SS object then obsv(SYS) Further in
returns the observability matrix of the state-space model discrete-time
control
SYS with realization (A,B,C,D). This is equivalent to Conclusion
OBSV(sys.a,sys.c).
State space
Exercices representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Test the observability of the previous examples: DC motor, Discrete-time


systems
suspension, inverted pendulum. State feedback
control
Analysis of different cases, according to the considered
Observer
number of sensors.
Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Minimality systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Minimality representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems
Definition Properties
A state space representation of a linear system (2) of order Discrete-time
systems
n is said to be minimal if it is controllable and observable.
State feedback
In this case, the corresponding transfer function G(s) is of control

Observer
minimal order n, i.e is irreducible (no cancellation of poles
Integral Control
and zeros).
A polynomial
When the transfer function is not of minimal order, there approach

exists non controllable or non observable modes. Further in


discrete-time
control

Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Kalman decomposition systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Kalman decomposition representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties
When the linear system Discrete-time
(2) is not completely systems

controllable or observ- State feedback


control
able, it can be decom- Observer
posed as shown. Use Integral Control
ctrbf and obsvf in A polynomial
approach
Matlab.
Further in
discrete-time
control

Conclusion
State space
Toward digital control representations
(SEM)

Digital control O.Sename

Usually controllers are implemented in a digital computer Introduction

as: Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach
This requires the use of the discrete theory. Further in
m (Sampling theory + Z-Transform) m discrete-time
control

Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time

Z-Transform systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Definitions representations
(SEM)

O.Sename
Mathematical definition
Because the output of the ideal sampler, x ∗ (t), is a series Introduction

Modelling of
of impulses with values x(kTe ), we have: dynamical
systems

∑ x(kTe )δ (t − kTe )
Properties
x ∗ (t) = Discrete-time
k =0 systems

State feedback
by using the Laplace transform, control

Observer

∑ x(kTe )e−ksT
Integral Control
L [x ∗ (t)] = e
A polynomial
k =0 approach

Further in
Noting z = esTe , we can derive the so called Z-Transform discrete-time
control

∞ Conclusion

X (z) = Z [x(k)] = ∑ x(k)z −k

k =0
State space
Properties representations
(SEM)

O.Sename

Definition Introduction
∞ Modelling of
X (z) = Z [x(k)] = ∑ x(k)z −k dynamical
systems
k =0 Properties

Discrete-time
Properties systems

State feedback
Z [α x(k) + β y(k)] = α X (z) + β Y (z) control

Observer
Z [x(k − n)] = z −n Z [x(k)] Integral Control
d A polynomial
Z [kx(k)] = −z Z [x(k)] approach
dz
Further in
Z [x(k) ∗ y(k)] = X (z).Y (z) discrete-time
control
lim x(k) = lim (z − 1)X (z) Conclusion
k →∞ 1→z −1

The z −1 can be interpreted as a pure delay operator.


State space
Exercise representations
(SEM)
Determine the Z-Transform of the step function (1) and of O.Sename
the ramp function (2)
Introduction

xstep (k) = 1 if k ≥ 0 xramp (k) = k if k ≥ 0 Modelling of


dynamical
= 0 if k < 0 = 0 if k < 0 systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Exercise representations
(SEM)
Determine the Z-Transform of the step function (1) and of O.Sename
the ramp function (2)
Introduction

xstep (k) = 1 if k ≥ 0 xramp (k) = k if k ≥ 0 Modelling of


dynamical
= 0 if k < 0 = 0 if k < 0 systems

Properties

Discrete-time
Solution systems

1) Step State feedback


control

Observer
1 z
Xstep (z) = 1 + z −1 + z −2 + · · · = = Integral Control
1 − z −1 z − 1 A polynomial
approach
2) Ramp (note that xramp (k) = kxstep (k)) Further in
discrete-time
control
d z 
Xramp (z) = −z Conclusion
dz z − 1
z
=
(z − 1)2
State space
Zero order holder representations
(SEM)

O.Sename

Sampler and Zero order holder Introduction


A sampler is a switch that close every Te seconds. Modelling of
dynamical
A Zero order holder holds the signal x for Te seconds to systems
get h as: Properties

h(t + kTe ) = x(kTe ), 0 ≤ t < Te Discrete-time


systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Zero order holder (cont’d) representations
(SEM)

O.Sename

Introduction

Model of the Zero order holder Modelling of


dynamical
The transfer function of the zero-order holder is given by: systems

Properties
1 e−sTe Discrete-time
GBOZ (s) = − systems
s s
State feedback
1−e e−sT control
=
s Observer

Integral Control

A polynomial
approach
Influence of the D/A and A/D
Further in
Note that the precision is also limited by the available discrete-time
control
precision of the converters (either A/D or D/A).
Conclusion
This error is also called the amplitude quantization error.
State space
Representation of the discrete linear systems representations
(SEM)

The discrete output of a system can be expressed as: O.Sename

∞ Introduction
y(k) = ∑ h(k − n)u(n) Modelling of
dynamical
n=0
systems

hence, applying the Z-transform leads to Properties

Discrete-time
systems
Y (z) = Z [h(k)]U(z) = H(z)U(z) State feedback
control

Observer
b0 + b1 z + · · · + bm z m Y
H(z) = n
= Integral Control
a0 + a1 z + · · · + an z U A polynomial
approach
where n (≥ m) is the order of the system Further in
discrete-time
Corresponding difference equation: control

Conclusion
1
y(k) = b0 u(k − n) + b1u(k − n + 1) + · · · + bm u(k − n + m)
an

− a0 y(k − n) − a2y(k − n + 1) − · · · − an−1y(k − 1)
State space
Some useful transformations representations
(SEM)

O.Sename
x (t) X (s) X (z)
δ (t) 1 1 Introduction

δ (t − kTe ) e−ksTe z −k Modelling of


dynamical
1 z systems
u(t) s z−1
1 zTe Properties
t s2 (z−1)2
Discrete-time
e−at 1
s+a
z
z−e−aTe
systems

z(1−e−aTe )
1 − e−at 1
s(s+a) (z−1)(z−e−aTe )
State feedback
control
ω zsin(ω Te )
sin(ω t) s 2 +ω 2 z 2 −2zcos(ω Te )+1
Observer

z(z−cos(ω Te )) Integral Control


cos(ω t) s
s 2 +ω 2 z 2 −2zcos(ω Te )+1 A polynomial
approach

Further in
Exercise discrete-time
control
Discretize (sampling time Te ) the system described by the
Conclusion
Laplace function (using a Zero order holder):

Y (s) 1
H(s) = =
U(s) s(s + 1)
State space
Exercise representations
(SEM)
Discretize the system described by the Laplace function O.Sename
(using a Zero order holder):
Introduction

Y (s) 1 Modelling of
H(s) = = dynamical
U(s) s(s + 1) systems

Properties
Adding the Zero order holder leads to: Discrete-time
systems

1 − e−sTe 1 State feedback


GBOZ (s)H(s) = control
s s(s + 1) Observer

1−e −sT e Integral Control


=
s2 (s + 1) A polynomial
approach
1 1 1 
= (1 − e−sTe ) 2 − +
Further in
discrete-time
s s s+1 control

Conclusion
hence
1 1 1 
Z [GBOZ (s)H(s)] = (1 − z −1 )Z 2
− +
s s s+1
State space
Exercise (cont’d) representations
(SEM)

O.Sename

1 1 1  Introduction
Z [GBOZ (s)H(s)] = (1 − z −1 )Z 2
− +
s s s+1 Modelling of
dynamical
 zT e z z  systems
= (1 − z −1 ) 2
− + −T Properties
(z − 1) z −1 z −e e
Discrete-time
(ze−Te − z + zTe ) + (1 − e−Te − Te e−Te ) systems
=
(z − 1)(z − e−Te ) State feedback
control

Observer
if Te = 1, we have Integral Control

A polynomial
(ze−Te − z + zTe ) + (1 − e−Te − T e e−Te ) approach
Z [GBOZ (s)H(s)] =
(z − 1)(z − e−Te ) Further in
discrete-time
ze−1 + 1 − 2e−1 control
= Conclusion
(z − 1)(z − e−1 )
b1 z + b0
= 2
z + a1 z + a0
State space
Exercise (cont’d) representations
(SEM)

Let us return back to sampled-time domain O.Sename

Y (z) b1 z+b0
U(z) = z 2 +a1 z+a0
Introduction

b1 z+b0 Modelling of
⇔ Y (z) = z 2 +a1 z+a0
U(z) dynamical
systems
⇔ 2
Y (z)(z + a1 z + a0 ) = (b1 z + b0 )U(z) Properties
⇔ y(n + 2) + a1y(n + 1) + a0y(n) = b1 u(n + 1) + b0u(n) Discrete-time
systems
With an unit feedback, the closed loop function is given by: State feedback
control
G(z)
Fcl (z) = Observer
1 + G(z) Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Poles, Zeros and Discrete-time


systems

State feedback

Stability control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Equivalence {s} ↔ {z} representations
(SEM)

{s} → {z} O.Sename

The equivalence between the Laplace domain and the Z Introduction

domain is obtained by the following transformation: Modelling of


dynamical
systems

z = esTe Properties

Discrete-time

Two poles with a imaginary part witch differs of 2π /Te give


systems

State feedback
the same pole in Z. control

Observer
Stability domain Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Approximations representations
(SEM)

O.Sename

Introduction
Forward difference (Rectangle inferior) Modelling of
dynamical
systems

Properties
z −1 Discrete-time
s= systems
Te
State feedback
control

Observer
Backward difference (Rectangle superior) Integral Control

A polynomial
approach

Further in
z −1 discrete-time
s= control
zTe Conclusion
State space
Approximations (cont’d) representations
(SEM)

Trapezoidal difference (Tustin) O.Sename

Introduction

Modelling of
dynamical
2 z −1 systems
s=
Te z + 1 Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Systems definition representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
A discrete-time state space system is as follows: systems

Properties
(
x((k + 1)h) = Ad x(kh) + Bd u(kh), x(0) = x0 Discrete-time
systems
(22)
y(kh) = Cd x(kh) + Dd u(kh) State feedback
control

Observer
where h is the sampling period.
Integral Control
Matlab : ss(Ad ,Bd ,Cd ,Dd ,h) creates a SS A polynomial
object SYS representing a discrete-time approach

state-space model Further in


discrete-time
control

Conclusion
State space
Relation with transfer function representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
For discrete-time systems, systems

 Properties
x((k + 1)h) = Ad x(kh) + Bd u(kh), x(0) = x0 Discrete-time
(23) systems
y(kh) = Cd x(kh) + Dd u(kh)
State feedback
control
the discrete transfer function is given by Observer

Integral Control
G(z) = Cd (zIn − Ad )−1 Bd + Dd (24) A polynomial
approach

where z is the shift operator, i.e. zx(kh) = x((k + 1)h) Further in


discrete-time
control

Conclusion
State space
Recall Laplace & Z-transform representations
(SEM)

From Transfer Function to State Space O.Sename

Introduction

Modelling of
dynamical
systems
H(s) to state space H(z) to state space
Properties

Discrete-time
systems
X X
U = den(s) U = den(z) State feedback
Y Y control
X = num(s) X = num(z)
Observer

Integral Control

Ẋ = AX + BU Xk +1 = FXk + GUk A polynomial


approach
Y = CX + DU Yk = CXk + DUk Further in
discrete-time
control
    Conclusion
Y (s) = C[sI − A]−1 B + D U(s) Y (z) = C[zI − F ]−1 G + D U(z)
| {z } | {z }
H(s) H(z)
State space
Solution of state space equations - discrete representations
(SEM)
case O.Sename

Introduction
The state xk , solution of system xk +1 = Ad xk with initial Modelling of
condition x0 , is given by dynamical
systems

Properties
x1 = Ad x0 (25)
Discrete-time
x2 = A2d x0 (26) systems

State feedback
xn = And x0 (27) control

Observer

The state xk , solution of system (22), is given by Integral Control

A polynomial
approach
x1 = Ad x0 + Bd u0 (28)
Further in
x2 = A2d x0 + Ad Bd u0 + Bd u1 (29) discrete-time
control
n−1 Conclusion
xn = And x0 + ∑ An−1−i
d Bd ui (30)
i=0
State space
State space analysis (discrete-time systems) representations
(SEM)

Stability O.Sename

A system (state space representation) is stable iff all the Introduction

eigenvalues of the matrix F are inside the unit circle. Modelling of


dynamical
systems
Controllability definition Properties

Discrete-time
Definition systems
Given two states x0 and x1 , the system (22) is controllable State feedback
control
if there exist K1 > 0 and a sequence of control samples
Observer
u0 , u1 , . . . , uK1 , such that xk takes the values x0 for k = 0
Integral Control
and x1 for k = K1 . A polynomial
approach

Observability definition Further in


discrete-time
control
Definition Conclusion
The system (22) is said to be completely observable if
every initial state x(0) can be determined from the
observation of y(k) over a finite number of sampling
periods.
State space
State space analysis (2) representations
(SEM)

O.Sename
Controllability
Introduction
The system is controllable iff
Modelling of
dynamical
C⌈ (A = rg[Bd Ad Bd . . . An−1
d Bd ] =n systems
d ,Bd )
Properties

Discrete-time
systems
Observability State feedback
control
The system is observable iff
Observer

Integral Control
O(Ad ,Cd ) = rg[Cd Cd Ad . . . Cd An−1 T
d ] =n A polynomial
approach

Further in
discrete-time
Duality control

Observability of (Cd , Ad ) ⇔ Controllability of (ATd , CdT ). Conclusion

(proof. . . )
Controllability of (Ad , Bd ) ⇔ Observability of (BdT , ATd ).
(proof. . . )
State space
State feedback representations
(SEM)

O.Sename

Introduction
A state feedback controller for a continuous-time system is:
Modelling of
dynamical
u(t) = −Fx(t) (31) systems

Properties

where F is a m × n real matrix. Discrete-time


systems
When the system is SISO, it corresponds to : State feedback
u(t) = −f1 x1 − f2 x2 − . . . − fn xn with F = [f1 , f2 , . . . , fn ]. control

Observer
When the system is MIMO we have
Integral Control
    A polynomial
u1   x1 approach
 u2  f11 . . . f1n
   .. ..

 x2 
 Further in
 ..  =  . .  ..  discrete-time
control
 .   . 
fm1 . . . fmn Conclusion
um xn
State space
State feedback (2) representations
(SEM)

O.Sename

Introduction
Using state feedback controllers (31), we get in Modelling of
dynamical
closed-loop (for simplicity D = 0) systems

 Properties
ẋ(t) = (A − BF )x(t), Discrete-time
(32)
y(t) = Cx(t) systems

State feedback
control
and the stability (and dynamics) of the closed-loop system Observer
is then given by the eigenvalues of A − BF . Integral Control
For discrete-time system we get: A polynomial
approach

x(k + 1) = (A − BF )x(k), Further in
(33) discrete-time
y(k) = Cx(k) control

Conclusion
State space
State feedback (3) representations
(SEM)

When the objective is to track some reference signal r , the O.Sename

state feedback control is of the form: Introduction

Modelling of
u(t) = −Fx(t) + Gr (t) (34) dynamical
systems
or u(k) = −Fx(k) + Gr (k) (35) Properties

Discrete-time
G is a m × p real matrix. Then the closed-loop transfer systems

matrix is : State feedback


control

Observer
GCL (s) = C(sIn − A + BF )−1BG (36) Integral Control

A polynomial
G is chosen to ensure a unitary steady-state gain as: approach

Further in
discrete-time
G = [C(−A + BF )−1B]−1 (37) control

Conclusion
⋆ For discrete-time system:

G = [C(In − A + BF )−1B]−1 (38)


State space
Pole placement control representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties
Proposition Discrete-time
Let a linear system given by A, B, and let γi , i = 1, ..., n , a systems

State feedback
set of complex elements (i.e. the desired poles of the control
closed-loop system). There exists a state feedback control Observer

u = −Fx such that the poles of the closed-loop system are Integral Control

γi , i = 1, ..., n if and only if the pair (A, B) is controllable. A polynomial


approach

Further in
discrete-time
control

Conclusion
State space
Why state feedback and not output feedback? representations
(SEM)

O.Sename

Introduction

1 Modelling of
Example: G(s) = s2 −s dynamical
systems
Consider the canonical form.
Properties
Case of output feedback : u = −Ly
Discrete-time
Then ẋ(t) = (A − BLC)x(t) systems

For the example, the characteristic polynomial is State feedback


control
PBF (s) = s2 − s − L. The closed-loop system cannot be Observer
stabilized. Integral Control
Case of state feedback : u = −Fx A polynomial
Let F = [f1 , f2 ]. Then PBF (s) = s2 + (−1 + f2)s + f1 approach

Further in
So we can choose any F . For instance f1 = 1, f2 = 3 gives discrete-time

PBF (s) = (s + 1)2 control

Conclusion
State space
Pole placement control (1) representations
(SEM)

Firstcase: controllable canonical form    O.Sename

0 1 0 ... 0 0 Introduction
 0 0 1 0 ...   .. 

 ..
  .  Modelling of
.. .. . . ..    dynamical
A= . . . . . , B= ..  and systems
  . 
 ..    Properties
 0 . 0 1   0 
Discrete-time
−a0 −a1 . . . . . . −an−1 1 systems
  State feedback
C= c0 c1 ... cn−1 . control
Let F = [ f1 f2 . . . fn ] Observer

Then Integral Control

  A polynomial
0 1 0 ... 0 approach


 0 0 1 0 ... 

Further in
discrete-time
 .
.. .
.. .. .. ..  control
A − BF =   . . . 
 Conclusion
 .. 
 0 . 0 1 
−a0 − f1 −a1 − f2 . . . . . . −an−1 − fn
(39)
State space
Pole placement control (2) representations
(SEM)

O.Sename

Introduction

Consider the desired clos-ed-loop polynomial: Modelling of


dynamical
(s − γ1 )(s − γ2 )...(s − γn ) = sn + αn−1 sn−1 + . . . + α1 s + α0 systems

The solution: Properties

Discrete-time
systems
fi = −ai−1 + αi−1 , i = 1, .., n State feedback
control
ensures that the poles of A − BF are {γi }, i = 1, n Observer

When we consider a general state space representation, it Integral Control

is first necessary to use a change of basis to make the A polynomial


approach
system under canonical form. Further in
Use F=acker(A,B,P) where P is the set of desired discrete-time
control
closed-loop poles. Conclusion
State space
Pole placement control (3) representations
(SEM)

Procedure for the general case: O.Sename

1. Check controllability of (A, B) Introduction


2. Calculate C = [B, AB, . . . , An−1 B]. Modelling of
 −1 dynamical
  qn systems
q1
 .. 
 qn A  Properties
−1
Note C =  . . Define T = 
 
..  Discrete-time
 .  systems
qn
qn An−1 State feedback
control
3. Note Ā = T −1 AT and B̄ = T −1B (which are under the Observer
controllable canonical form) Integral Control
4. Choose the desired closed-loop poles and define the A polynomial
approach
desired closed-loop characteristic polynomial:
sn + αn−1 sn−1 + . . . + α1 s + α0
Further in
discrete-time
control
5. Calculate the state feedback u = −F̄ x with:
Conclusion
f̄i = −ai−1 + αi−1 , i = 1, .., n
6. Calculate (for the original system):
u = −Fx, with F = F̄ T −1
State space
Observer representations
(SEM)

O.Sename

Introduction

Modelling of
Problem: To implement a state feedback control, the dynamical
systems
measurement of all the state variables is necessary. If this Properties
is not available, we will use a state estimation through a Discrete-time
so-called Observer. systems

Observer form: State feedback


control

Observer
˙
x̂(t) = Ax̂(t) + Bu(t) − L(C x̂(t) − y(t))
(40) Integral Control
x̂0 A polynomial
approach
where x̂(t) ∈Rn is the estimated state of x(t) and L is the Further in
discrete-time
n × p constant observer gain matrix to be designed. control

Conclusion
State space
Observer representations
(SEM)

O.Sename
Th estimated error, e(t) := x(t) − x̂(t), satisfies:
Introduction
ė(t) = (A − LC)e(t) (41) Modelling of
dynamical
systems
If L is designed such that A − LC is stable, then x̂ (t) Properties
converges asymptotically towards x(t). Discrete-time
systems
Proposition State feedback
control
(40) is an observer for system (2) if and only if the pair
Observer
(C,A) is observable, i.e. Integral Control

A polynomial
rank(O) = n approach

  Further in
discrete-time
C control

 CA 
 Conclusion
where O =  .. .
 . 
CAn−1
State space
Observer design representations
(SEM)

The observer design is restricted to find L such that A − LC O.Sename

is stable. This is still a pole placement problem. Introduction

In order to use the acker Matlab function, we will use the Modelling of
dynamical
duality property between observability and controllability, systems

i.e. : Properties

(C, A) observable ⇔ (AT , C T ) controllable. Discrete-time


systems
Then there exists LT such that the eigenvalues of State feedback
AT − C T LT can be randomly chosen. As control

(A − LC)T = AT − C T LT then L exists such that A − LC is Observer

Integral Control
stable.
A polynomial
Matlab : use L=acker(A’,C’,Po)’ where Po approach

is the set of desired observer poles. Further in


discrete-time
Remark : usually the observer poles are chosen around 5 control

to 10 times higher than the closed-loop system, so that the Conclusion

state estimation is good as early as possible. This is quite


important to avoid that the observer makes the closed-loop
system slower.
State space
Observer-based control representations
(SEM)

O.Sename

When an observer is built, we will use as control law: Introduction

Modelling of
dynamical
u(t) = −F x̂(t) + Gr (t) (42) systems

Properties
We then need to study the stability of the complete Discrete-time
systems
closed-loop system, using the extended state:
State feedback
 T control
xe (t) = x(t) e(t) Observer

Integral Control
The closed-loop system with observer (40) and control A polynomial
approach
(42) is:
Further in
    discrete-time
A − BF BF BG control
ẋe (t) = xe (t) + r (t) (43)
0 A − LC 0 Conclusion
State space
Separation principle representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
The characteristic polynomial of the extended system is: systems

Properties
det(sIn − A + BF ) × det(sIn − A + LC) Discrete-time
systems

State feedback
If the observer and the control are designed separately control
then the closed-loop system with the dynamic Observer
measurement feedback is stable, given that the control and Integral Control

observer systems are stable and the eigenvalues of (43) A polynomial


approach
can be obtained directly from them.
Further in
This corresponds to the so-called separation principle. discrete-time
control

Conclusion
State space
Stabilisation/ Detectability representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
When the linear system (2) is not completely controllable systems
or observable, it is then important to study the stability of State feedback
control
the non controllable and non observable modes.
Observer
Use ctrbf and obsvf Matlab commands Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Integral Control representations
(SEM)

O.Sename

Introduction
A state feedback controller may not allow to reject the Modelling of
effects of disturbances (particularly of input disturbances). dynamical
systems
A very useful method consists in adding an integral term to Properties
ensure a unitary static closed-loop gain . Discrete-time
systems
Considered system:
State feedback
( control
ẋ(t) = Ax(t) + Bu(t) + Ed (t), x(0) = x0 Observer
(44)
y(t) = Cx(t) Integral Control

A polynomial
approach
where d is the disturbance. Further in
The objective is to keep y close to a reference signal r , discrete-time
control
even in the presence of d , i.e to keep r − y asymptotically Conclusion
stable.
State space
Integral Control representations
(SEM)

O.Sename

Introduction
The method consists in extending the system by adding a Modelling of
new state variable: dynamical
systems

Properties
ż(t) = r (t) − y(t) Discrete-time
systems
and to use a new state feedback: State feedback
control

Observer
u(t) = −Fx(t) − Hz(t)
Integral Control

We get A polynomial
approach
         Further in
ẋ(t) A − BF BH x 0 E discrete-time
= + r (t) + d (t) control
ż(t) −C 0 z 1 0
Conclusion
State space
Integral control scheme representations
(SEM)

O.Sename

Introduction
The complete structure has the following form: Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

When an observer is to be used, the control action simply Further in


discrete-time
becomes: control

u(t) = −F x̂(t) − Hz(t) Conclusion


State space
Equivalence RST controller and representations
(SEM)
observer-based O.Sename

Introduction

Modelling of
dynamical
The use of an observer-based controller is equivalent to systems

the following controller : Properties

Discrete-time
systems
−1
u(s) = −F (sIn − A + BF + LC) Ly(s) State feedback
control
−1
+[In − F (sIn − A + BF + LC) B]Gr (s) Observer

Integral Control
which corresponds to a two-degrees of freedom controller
A polynomial
approach
R(s) T (s)
u(s) = − y(s) + r (s) Further in
discrete-time
S(s) S(s) control

and this can be implemented in an RST form. Conclusion


State space
About sampling period and time response representations
(SEM)

O.Sename
Influence of the sampling period on the time response
Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
Impose a maximal time response to a discrete system is control
equivalent to place the poles inside a circle defined by the Conclusion

upper bound of the bound given by this time response.


The more the poles are close to zero, the more the system
is fast.
State space
Frequency analysis representations
(SEM)
As in the continuous time, the Bode diagram can also be O.Sename

used.
Introduction
Example with sampling Time Modelling of
Te = 1s ⇔ fe = 1Hz ⇔ we = 2π ): dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
Note that, in our case, the Bode is cut at the pulse w = π . control

see SYSD = c2d(SYSC,Ts,METHOD) in MATLAB. Conclusion


State space
Frequency analysis representations
(SEM)
As in the continuous time, the Bode diagram can also be O.Sename

used.
Introduction
Example with sampling Time Modelling of
Te = 1s ⇔ fe = 1Hz ⇔ we = 2π ): dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
Note that, in our case, the Bode is cut at the pulse w = π . control

see SYSD = c2d(SYSC,Ts,METHOD) in MATLAB. Conclusion

Sampling ↔ Limitations
Recall the Shannon theorem that impose the sampling
frequency at least 2 times higher that the system
State space
About sampling period and robustness representations
(SEM)

Influence of the sampling period on the poles O.Sename

In theory, smaller the sampling period Te is, closer the Introduction

discrete system is from the continuous one. Modelling of


dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
But reducing the sampling time modify poles discrete-time
control
location. . . Poles and zeros become closer to the limit of
Conclusion
the unit circle ⇒ can introduce instability (decrease
robustness).
⇒ Sampling influences stability and robustness
⇒ Over sampling increase noise sensitivity
State space
Zeros representations
(SEM)

O.Sename

Influence of the sampling period on the poles Introduction

A discrete system with one or few zeros at the origin is Modelling of


dynamical
faster than one with no origin zeros. In the time domain a systems

Properties
zero at the origin induces a sample advance.
Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Stability representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems
Recall Properties
A linear continuous feedback control system is stable if all Discrete-time
poles of the closed-loop transfer function T (s) lie in the left systems

half s-plane. State feedback


control
The Z-plane is related to the S-plane by Observer
z = e−sTe = e(σ +j ω )Te . Hence Integral Control

A polynomial
|z| = eσ Te and ∠z = ω Te approach

Further in
discrete-time
control

Conclusion
State space
Stability (cont’d) representations
(SEM)

O.Sename

Introduction
Jury criteria
Modelling of
The denominator polynomial dynamical
systems
(den(z) = a0 z n + a1 z n−1 + · · · + an = 0) has all its roots Properties
inside the unit circle if all the first coefficients of the odd Discrete-time
row are positive. systems

State feedback
an control
b = a0 − an Observer
1 a0 a1 a2 ... an−k . . . an 0 a0
Integral Control
2 an an−1 an−2 ... ak ... a0 an
b1 = a1 − an−1 A polynomial
3 b0 b1 b2 ... bn−1 aapproach
0
2 bn−1 bn−2 bn−3 ... b0 aFurther
n in

.. .. bk = ak − an−k discrete-time
. . acontrol
0

2n + 1 b
Conclusion
s0 ck = bk − bn−1−k n−1
b0
State space
Example representations
(SEM)

O.Sename
Stability
Find the stability region of D(z) = z 2 + a1 z + a2 Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Example representations
(SEM)

O.Sename
Stability
Find the stability region of D(z) = z 2 + a1 z + a2 Introduction

Modelling of
dynamical
Solution systems

Properties

Discrete-time
systems
1 1>0 a1 a2
State feedback
2 a2 a1 1 control

3 1 − a22 > 0? a1 − a1 a2 Observer

4 a1 − a1 a2 1 − a22 Integral Control

(1−a22 )2 −(a21 (1−a2 )2 ) A polynomial


5 1−a22
> 0? approach

Further in
discrete-time
hence, control

Conclusion

1 − a22 > 0
(1 + a2)2 > a21
State space
How to get a discrete controller representations
(SEM)

O.Sename
First way
Introduction

◮ Obtain a discrete-time plant model (by discretization) Modelling of


dynamical
systems
◮ Design a discrete-time controller
Properties
◮ Derive the difference equation Discrete-time
systems

State feedback
Second way control

Observer
◮ Design a continuous-time controller Integral Control

◮ Converse the continuous-time controller to discrete A polynomial


approach
time (c2d) Further in
discrete-time
◮ Derive the difference equation control

Conclusion
Now the question is how to implement the computed
controller on a real-time (embedded) system, and what are
the precautions to take before?
State space
representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties

Implementation Discrete-time
systems

State feedback

characteristics control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Anti-aliasing & Sampling representations
(SEM)

Anti-aliasing O.Sename

Practically it is smart to use a constant high sampling Introduction

frequency with an analog filter matching this frequency. Modelling of


dynamical
Then, after the A/D converter, the signal is down-sampled systems

Properties
to the frequency used by the controller. Remember that
Discrete-time
the pre-filter introduce phase shift. systems

State feedback
Sampling frequency choice control

The sampling time for discrete-time control are based on Observer

Integral Control
the desired speed of the closed loop system. A rule of
A polynomial
thumb is that one should sample 4 − 10 times per rise time approach
Tr of the closed loop system. Further in
discrete-time
control
Tr
Nsample = ≈ 4 − 10 Conclusion
Te
where Te is the sampling period, and Nsample the number
of samples.
State space
Delay representations
(SEM)

O.Sename
Problematic
Introduction
Sampled theory assume presence of clock that
Modelling of
synchronizes all measurements and control signal. Hence dynamical
systems
in a computer based control there always is delays (control
Properties
delay, computational delay, I/O latency). Discrete-time
systems
Origins State feedback
control
There are several reasons for delay apparition
Observer
◮ Execution time (code) Integral Control

◮ Preemption from higher order process A polynomial


approach
◮ Interrupt Further in
discrete-time
◮ Communication delay control

Conclusion
◮ Data dependencies
Hence the control delay is not constant. The delay
introduce a phase shift ⇒ Instability!
State space
Delay (cont’d) representations
(SEM)

Admissible delay (Bode) O.Sename

Measure the phase margin: PM = 180 + ϕw0 [ř], where


Introduction

Modelling of
ϕw0 is the phase at the crossover frequency w0 , i.e. dynamical
systems
|G(jw0 )| = 1 Properties
◮ Then the delay margin is Discrete-time
systems

PM π State feedback
DM = [s] control
180w0 Observer

Integral Control

A polynomial
Exercise: compute delay margin for these 3 cases approach

Further in
discrete-time
control

Conclusion
State space
Delay (cont’d) representations
(SEM)

O.Sename

Static scheduling vs Minimal control delay Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Delay (cont’d) representations
(SEM)

How to compensate the delay? O.Sename

There are several ways Introduction

Modelling of
◮ Minimize the delay (case B - Minimal control delay) dynamical
systems
◮ Compensate it off-line Properties
◮ Make the controller robust (case A - static scheduling) Discrete-time
systems
◮ Compensate on-line State feedback
control

Exple: Code that minimize the delay Observer

Integral Control

LOOP A polynomial
%%% At each clock interrup
approach
ADin Further in
discrete-time
CalculateOutput control
DAout Conclusion
UpdateStates
IncTime %%% Evaluate remaining tim
WaitUntilTe
END
State space
Delay (cont’d) representations
(SEM)

Exercise O.Sename

Consider the following controller, Introduction

Modelling of
x(k + 1) = Fx(k) + Gy(k) dynamical
systems

u(k) = Cx(k) + Dy(k) Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Delay (cont’d) representations
(SEM)

Exercise O.Sename

Consider the following controller, Introduction

Modelling of
x(k + 1) = Fx(k) + Gy(k) dynamical
systems

u(k) = Cx(k) + Dy(k) Properties

Discrete-time
systems

State feedback
control

Observer
LOOP
Integral Control
ADin(y); A polynomial
%%% CalculateOutput approach

u := u1 + D*y; Further in
discrete-time
DAout(u) Note that such a structure is not
control

%%% UpdateStates the only one! Controller can work


Conclusion

x := F*x + G*y; on interrupts (exple: Brushless


u1 := C*x; motor)
%%% Wait for the next
State space
Quantification representations
(SEM)

Effects O.Sename

◮ Non linear phenomena Introduction

Modelling of
◮ Limit cycles dynamical
systems

Properties
Example (stable for K<2) Discrete-time
systems

State feedback
control
0.25
H(z) = Observer
(z − 1)(z − 0.5) Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Quantification (cont’d) representations
(SEM)

O.Sename

Results Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Quantification (cont’d) representations
(SEM)

O.Sename

Results Introduction

Modelling of
dynamical
systems

Properties

Discrete-time
systems

State feedback
control

Observer

Integral Control

A polynomial
approach

Further in
discrete-time
control

Conclusion
State space
Discretisation representations
(SEM)

O.Sename

The idea behind discretisation of a controller is to translate Introduction


it from continuous-time to discrete-time, i.e. Modelling of
dynamical
systems
A/D + algorithm + D/A ≈ G(s)
Properties

Discrete-time
To obtain this, few methods exists that approach the systems

Laplace operator (see lecture 1-2). State feedback


control

Recall Observer

Integral Control

A polynomial
z −1 approach
s = Further in
Te discrete-time
control
z −1
s = Conclusion
zTe
2 z −1
s =
Te z + 1
State space
Conclusion representations
(SEM)

O.Sename

Introduction

Modelling of
dynamical
systems

Properties
◮ A state space approach to pole placement control Discrete-time
systems
◮ A similar design can be done using a polynomial
State feedback
approach control

Observer
◮ Continuous but directly extended to discrete-time
Integral Control
systems.
A polynomial
approach

Further in
discrete-time
control

Conclusion