You are on page 1of 104

State space

approach

Olivier Sename

Introduction

Modelling

Modelling, analysis and control of linear systems using Nonlinear models


Linear models

state space representations Linearisation


To/from transfer
functions

Properties (stability)

State feedback
Olivier Sename control
Problem formulation
Controllability
Grenoble INP / GIPSA-lab Definition
Pole placement control
Specifications

February 2018 Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Introduction Specifications Linear models
Modelling of dynamical systems as Integral Control or how to ensure Linearisation

state space representations disturbance attenuation with a To/from transfer


functions
Nonlinear models state feedback control? Properties (stability)
Linear models Observer and output feedback control State feedback
Linearisation Observation control
To/from transfer functions A preliminary property: Problem formulation

Properties (stability) Observability


Controllability
Definition
State feedback control Observer design Pole placement control
Problem formulation Specifications
Controllability Observer-based control Integral Control

Definition of the state feedback Introduction to optimal control Observer


control Observation

Synthesis of the state feedback Introduction to digital control Observability


Observer design
control: the pole placement control Conclusion
Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback

Introduction
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
References approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
Some interesting books: To/from transfer
functions
I K.J. Astrom and B. Wittenmark, Computer-Controlled Systems,
Properties (stability)
Information and systems sciences series. Prentice Hall, New State feedback
Jersey, 3rd edition, 1997. control
Problem formulation
I R.C. Dorf and R.H. Bishop, Modern Control Systems, Prentice Controllability
Definition
Hall, USA, 2005. Pole placement control
Specifications
I G.C. Goodwin, S.F. Graebe, and M.E. Salgado, Control System Integral Control

Design, Prentice Hall, New Jersey, 2001. Observer


Observation
I G. Franklin, J. Powell, A. Emami-Naeini, Feedback Control of Observability

Dynamic Systems, Prentice Hall, 2005 Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
The "control design" process approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions
I Plant study and modelling Properties (stability)
I Determination of sensors and actuators (measured and controlled State feedback
control
outputs, control inputs) Problem formulation
Controllability
I Performance specifications Definition
Pole placement control
I Control design (many methods) Specifications
Integral Control
I Simulation tests
Observer
I Implementation, tests and validation Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
The "control design" process in CLEAR approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
About modelling... approach

Olivier Sename

Introduction
Identification based method Modelling
Nonlinear models
I System excitations using PRBS (Pseudo Random Binary Signal) Linear models

or sinusoïdal signals Linearisation


To/from transfer
functions
I Determination of a transfer function reproducing the input/ouput
Properties (stability)
system behavior
State feedback
control
Knowledge-based method: Problem formulation

I Represent the system behavior using differential and/or algebraic Controllability


Definition
equations, based on physical knowledge. Pole placement control
Specifications
I Formulate a nonlinear state-space model, i.e. a matrix differential Integral Control

equation of order 1. Observer


Observation
I Determine the steady-state operating point about which to Observability
Observer design
linearize.
Observer-based
I Introduce deviation variables and linearize the model. control

Introduction to
Tools: Matlab/Simulink, LMS Imagine.Lab Amesim, Catia-Dymola, optimal control

ADAMS, MapleSim ..... Introduction to


digital control

Conclusion
State space
Simulation of complex system (LMS Imagine.Lab AMESim) approach

Olivier Sename

Introduction

Modelling
System Simulation for Controller Design Nonlinear models
What it means and what is required Linear models
Linearisation
To/from transfer
functions

Properties (stability)
 Simulation of the complete system using an assembly
of components State feedback
 Components are described with analytical or tabulated control
models Problem formulation
Controllability
 Multi-physics / Multi-level approach
Definition
 Control-oriented actuator models Pole placement control
 Description of physical phenomena based on few Specifications
“macroscopic” parameters Integral Control
 Models for static and dynamic responses, in time &
Observer
frequency domains
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
Restricted © Siemens AG 2016 digital control
Page 9 Siemens PLM Software
Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

Modelling of dynamical systems State feedback


control
Problem formulation

as state space representations Controllability


Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Why state space equations ? approach

Olivier Sename

Introduction

Modelling
Nonlinear models
I dynamical systems where physical equations can be derived : Linear models

electrical engineering, mechanical engineering, aerospace Linearisation


To/from transfer
engineering, microsystems, process plants .... functions

Properties (stability)
I include physical parameters: easy to use when parameters are
State feedback
changed for design. Need only for parameter identification or control
knowledge. Problem formulation
Controllability
I State variables have physical meaning. Definition
Pole placement control

I Allow for including non linearities (state constraints, input Specifications


Integral Control
saturation) Observer
I Easy to extend to Multi-Input Multi-Output (MIMO) systems Observation
Observability

I Advanced control design methods are based on state space Observer design

Observer-based
equations (reliable numerical optimisation tools) control

I easy exportation from advanced modelling softwares Introduction to


optimal control

Introduction to
digital control

Conclusion
State space
Towards state space representation approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
What is a state space system ? Linearisation
To/from transfer
A "matrix-form" representation of the dynamics of an N- order functions

differential equation system into a FIRST order differential equation in a Properties (stability)

vector form of size N, which is called the state. State feedback


control
Problem formulation
Definition of a system state Controllability
Definition
The state of a dynamical system is the set of variables, known as state Pole placement control

variables, that fully describe the system and its response to any given Specifications
Integral Control
set of inputs. Observer
Mathematically, the knowledge of the initial values of the state variables Observation
Observability
at t0 (namely xi (t0 ), i = 1, ..., n), together with the knowledge of the Observer design

system inputs for time t ≥ t0 , are sufficient to predict the behavior of the Observer-based
control
future system state and output variables (for t ≥ t0 ).
Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Definition of a NonLinear dynamical system approach

Olivier Sename

Introduction

Modelling
Many dynamical systems can be represented by Ordinary Differential Nonlinear models
Linear models
Equations (ODE). Linearisation

A nonlinear state space model consists in rewritting the physical To/from transfer
functions
equation into a first-order matrix form as Properties (stability)
( State feedback
ẋ(t) = f ((x(t), u(t), t), x(0) = x0 control
(1) Problem formulation

y (t) = g((x(t), u(t), t) Controllability


Definition
Pole placement control
where f and g are non linear functions and Specifications
Integral Control
I x(t) ∈ Rn is referred to as the system state (vector of state Observer
variables), Observation
Observability
I u(t) ∈ Rm the vector of m control inputs (actuators) Observer design

I y (t) ∈ Rp the vector of p measured outputs (sensors) Observer-based


control

I x0 is the initial condition. Introduction to


optimal control

Introduction to
digital control

Conclusion
State space
Example of a one-tank model approach

Olivier Sename

Introduction

Usually the hydraulic equation is non linear and of the form Modelling
Nonlinear models
Linear models
dH Linearisation
S = Qe − Qs To/from transfer
dt functions

Properties (stability)
where H is the tank height, S the tank
√surface, Qe the input flow, and State feedback
Qs the output flow defined by Qs = a H. control
Problem formulation

Definition the state space model Controllability


Definition
The system is represented by an Ordinary Differential Equation whose Pole placement control
Specifications
solution depends on H(t0 ) and Qe . Clearly H is the system state, Qe is Integral Control

the input, and the system can be represented as: Observer


Observation
(
ẋ(t) = f (x(t), u(t)), x(0) = x0 Observability
Observer design
(2)
y (t) = x(t) Observer-based
control

√ Introduction to
with x = H, f (x, u) = − Sa x + S1 u optimal control

Introduction to
digital control

Conclusion
Example: Underwater Autonomous Vehicle UAV Aster x
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Actions: axial propeller to control the velocity in Ox direction and 5 Observer design
independent mobile fins : Observer-based
I 2 horizontals fins in the front part of the vehicle (β1 , β10 ). control

Introduction to
I 1 vertical fin at the tail of the vehicle (δ ). optimal control

I 2 fins at the tail of the vehicle (β2 , β20 ). Introduction to


digital control

Conclusion
State space
UAV modelling approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Physical model: Linear models
Linearisation
To/from transfer
M ν̇ = G(ν)ν + D(ν)ν + Γg + Γu (3) functions

Properties (stability)

State feedback
η̇ = Jc (η2 )ν (4) control
Problem formulation
Controllability
where: Definition

- M: mass matrix: real mass of the vehicle augmented by the Pole placement control
Specifications
"water-added-mass" part, Integral Control

- G(ν) : action of Coriolis and centrifugal forces, Observer

- D(ν): matrix of hydrodynamics damping coefficients, Observation


Observability
- Γg : gravity effort and hydrostatic forces, Observer design

- Jc (η2 ): referential transform matrix, Observer-based


control
- Γu : forces and moments due to the vehicle’s actuators.
Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
UAV state definition approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
 T Linearisation
A 12 dimensional state vector : X = η(6) ν(6) . To/from transfer
functions
 T
I η(6): position in the inertial referential: η = η1 η2 with Properties (stability)
 T  T State feedback
η1 = x y z and η2 = φ θ ψ . x, y and z are the control
positions of the vehicle , and φ , θ and ψ are respectively the roll, Problem formulation
Controllability
pitch and yaw angles. Definition
Pole placement control
I ν(6): velocity vector, in the local referential (linked to the vehicle) Specifications

describing the linear and angular velocities (first derivative of the Integral Control

 T Observer
position, considering the referential transform: ν = ν1 ν2 with Observation
 T  T Observability
ν1 = u v w and ν2 = p q r Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Exercise: a simple pendulum approach

Olivier Sename
Let consider the following pendulum
Introduction

Modelling
T Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)
l State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
θ Observation
Observability
Observer design
M Observer-based
control

Introduction to
optimal control
where θ is the angle (assumed to be measured), T the controlled Introduction to
torque, l the pendulum length, M its mass. Give the dynamical digital control

equations of motion for the pendulum angle (neglecting friction) and Conclusion

write the nonlinear state space model.


State space
Definition of linear state space representations approach

Olivier Sename

Introduction

Modelling
A continuous-time LINEAR state space system is given as : Nonlinear models
Linear models
(
ẋ(t) = Ax(t) + Bu(t), x(0) = x0 Linearisation
To/from transfer
(5) functions
y (t) = Cx(t) + Du(t) Properties (stability)

State feedback
I x(t) ∈ Rn is the system state (vector of state variables), control
Problem formulation

I u(t) ∈ Rm the control input Controllability


Definition

y (t) ∈ Rp the measured output


Pole placement control
I
Specifications
Integral Control
I A, B, C and D are real matrices of appropriate dimensions, e.g.
Observer
A = [aij ]i,j=1:n with n rows and n columns Observation
Observability
I x0 is the initial condition. Observer design

Observer-based
n is the order of the state space representation. control
Matlab : ss(A,B,C,D) creates a SS object SYS Introduction to
optimal control
representing a continuous-time state-space model
Introduction to
digital control

Conclusion
State space
A state space representation of a DC Motor approach

Olivier Sename

Introduction

Modelling
Assumption: only the speed is measured. Nonlinear models
Linear models
The dynamical equations are : Linearisation
To/from transfer
functions
di
Ri + L + e = u e = Ke ω Properties (stability)
dt State feedback
dω control
J = −f ω + Γm Γm = K c i Problem formulation
dt Controllability
Definition
System of 2 equationsof order
 1 =⇒ 2 state variables. Pole placement control
Specifications
ω
A possible choice x = It gives: Integral Control

i Observer
Observation
   
−f /J Kc /J 0 
A= B= C= 0 1 Observability

−Ke /L −R/L 1/L Observer design

Observer-based
How to extend this definition when: measurement= motor angular control

position θ ? Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Examples: Suspension approach

Olivier Sename

Let the following mass-spring-damper system. Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
where x1 is the relative position (measured), M1 the system mass, k1 Observer design

the spring coefficient, u the force generated by the active damper, and Observer-based
control
F1 is an external disturbance. Applying the mechanical equations
Introduction to
around the equilibrium leads to: optimal control

Introduction to
M1 ẍ1 = −k1 x1 + u + F1 (6) digital control

Conclusion
State space
Examples: Suspension cont. approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
  Linearisation

x1 To/from transfer
The choice x = gives functions
ẋ1 Properties (stability)
 State feedback
ẋ(t) = Ax(t) + Bu(t) + Ed(t) control
Problem formulation
y (t) = Cx(t) Controllability
Definition

where d = F1 , y = x1 with Pole placement control


Specifications
    Integral Control
0 1 0 
A= , B=E = , and C = 1 0 Observer
−k1 /M1 0 1/M1 Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Example : Wind turbine modelling from CAD software approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Some important issues approach

Olivier Sename

Introduction

Modelling
I A complete ADAMS or CATIA model can include 193 DOFs to Nonlinear models

represent fully flexible tower, drive-train, and blade components ⇒ Linear models
Linearisation
simulation model To/from transfer
functions
I Different operating conditions according to the wind speed Properties (stability)
I Control objectives: maximize power , enhance damping in the first State feedback
control
drive train torsion mode, design a smooth transition different Problem formulation

modes Controllability
Definition
I The control model is obtained by a linearisation of a non linear Pole placement control
Specifications
electro-mechanical model (done by the software): Integral Control

 Observer
ẋ(t) = Ax(t) + Bu(t) + Ed(t) Observation
Observability
y (t) = Cx(t) Observer design

Observer-based
where x1 = rotor-speed x2 = drive-train torsion spring force, x3 = control

rotational generator speed Introduction to


optimal control
u = generator torque, d : wind speed
Introduction to
digital control

Conclusion
State space
Homework approach

Olivier Sename

Introduction

Modelling

Let the following quarter car model with active suspension. Nonlinear models
Linear models
Linearisation
To/from transfer
functions

zs and zus ) are the relative position of the Properties (stability)


chassis and of the wheel, State feedback
control
ms (resp. mus ) the mass of the chassis Problem formulation
(resp. of the wheel), Controllability
Definition
ks (resp. kt ) the spring coefficient of the Pole placement control

suspension (of the tire), Specifications


Integral Control
u the active damper force,
Observer
zr is the road profile. Observation
Observability
Observer design

Observer-based
Choose some state variables and give a state space representation of control

this system Introduction to


optimal control

Introduction to
digital control

Conclusion
State space
Linearisation: how to get a linear model from a nonlinear approach

one? Olivier Sename

The linearisation can be done around an equilibrium point or around a Introduction


particular point defined by: Modelling
( Nonlinear models
ẋeq (t) = f ((xeq (t), ueq (t), t), given xeq (0) Linear models

(7) Linearisation

yeq (t) = g((xeq (t), ueq (t), t) To/from transfer


functions

Properties (stability)
Defining
x̃ = x − xeq , ũ = u − ueq , ỹ = y − yeq State feedback
control
Problem formulation
this leads to a linear state space representation of the system, around Controllability
the equilibrium point: Definition
Pole placement control
˙
( Specifications
x̃(t) = Ax̃(t) + B ũ(t), Integral Control
(8)
Observer
ỹ (t) = C x̃(t) + D ũ(t) Observation
Observability
∂f
with A = |
∂ x x=xeq ,u=ueq
, B = ∂∂uf |x=xeq ,u=ueq , Observer design

∂g
C= |
∂ x x=xeq ,u=ueq
and D = ∂∂ gu |x=xeq ,u=ueq Observer-based
control

Usual case Introduction to


optimal control
Usually an equilibrium point satisfies: Introduction to
digital control
0 = f ((xeq (t), ueq (t), t) (9) Conclusion

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


State space
Are state space representations equivalent to transfer approach

functions ? Olivier Sename

Introduction

Modelling

Equivalence transfer function - state space representation Nonlinear models


Linear models

Consider a linear system given by: Linearisation


To/from transfer
functions

ẋ(t) = Ax(t) + Bu(t), x(0) = x0 Properties (stability)
(10)
y (t) = Cx(t) + Du(t) State feedback
control
Problem formulation
Using the Laplace transform (and assuming zero initial condition Controllability

x0 = 0), (10) becomes: Definition


Pole placement control
Specifications

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

Observer
Then the transfer function matrix of system (10) is given by Observation
Observability
Observer design
N(s)
G(s) = C(sIn − A)−1 B + D = (11) Observer-based
D(s) control

Introduction to
optimal control

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


digital control
transfer matrix. Equivalent to tf(N,D)
Conclusion
State space
Conversion TF to SS approach

Olivier Sename

Introduction

Modelling
Nonlinear models
There mainly three cases to be considered Linear models
Linearisation
Simple numerator To/from transfer
functions
y 1
= G(s) = 3 2
Properties (stability)
u s + a1 s + a2 s + a3 State feedback
control
Numerator order less than denominator order Problem formulation
Controllability

y b s2 + b2 s + b3 N(s) Definition

= G(s) = 3 1 2
= Pole placement control
u s + a1 s + a2 s + a3 D(s) Specifications
Integral Control

Numerator equal to denominator order Observer


Observation
Observability
y b0 s3 + b1 s2 + b2 s + b3 N(s) Observer design
= G(s) = =
u s3 + a1 s2 + a2 s + a3 D(s) Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Canonical forms approach

Olivier Sename

Introduction

Modelling
For the strictly proper transfer function: Nonlinear models
Linear models
Linearisation

sn−1
c0 + c1 s + . . . + cn−1 To/from transfer
G(s) = functions

a0 + a1 s + . . . + an−1 sn−1 + sn Properties (stability)

State feedback
a very well-known specific state space representations, referred to as control
Problem formulation
the controllable canonical form is defined
 as:  Controllability
0 1 0 ... 0 0
 
Definition

 0 0 1 0 ...   ..  Pole placement control

 .  Specifications
 .. .. .. .. ..
 
   Integral Control
A=  . . . . .  , B =  .  and
  ..  Observer

 0 ..    Observation

. 0 1   0  Observability
Observer design
−a0 −a1 . . . . . . −an−1 1
  Observer-based
C= c0 c1 ... cn−1 . control

In Matlab, use canon Introduction to


optimal control

Introduction to
digital control

Conclusion
State space
What is a canonical form for a physical system? approach

Olivier Sename
It is worth noting that the following state space representation
Introduction

0 1 0 ... 0 0
    Modelling
Nonlinear models
 0 0 1 0 ...   ..  Linear models

 .. .. .. .. ..



 . 
 Linearisation

A= . . . . . , B =  ..  To/from transfer


functions

 ..



 . 
 Properties (stability)
 0 . 0 1   0 
State feedback
−a0 −a1 ... ... −an−1 1 control
Problem formulation
Controllability
with   Definition

C= 1 0 ... ... 0 Pole placement control


Specifications
Integral Control
does correspond to the Nth-order differential equation
Observer

d ny d n−1 y
Observation
Observability

n
+ an−1 n−1 + . . . + a1 ẏ + a0 y = u Observer design
dt dt
Observer-based
control
This indeed can be reformulated into N simultaneous first-order
Introduction to
differential equations defining the state variables : optimal control

Introduction to
d n−1 y digital control
x1 = y , , x2 = ẏ , , . . . xn = ,
dt n−1 Conclusion
State space
How to compute the solution x(t) of a linear system? approach

Olivier Sename

Introduction
This theoretical problem is solved now using simulation tools (as Modelling
Simulink) Nonlinear models
Linear models

Case of the autonomous equation ẋ(t) = Ax(t) Linearisation


To/from transfer
functions
It is the generalization of the scalar case: if ẏ = αy then
Properties (stability)
y (t) = exp(αt)y0 .
State feedback
The state x(t) with initial condition x(0) = x0 is then given by control
Problem formulation
Controllability
x(t) = eAt x(0) (12) Definition
Pole placement control
Specifications
To get an explicit analytical formula, this requires to compute the Integral Control

function eAt , which can be done following one of the 3 methods to Observer
compute eAt : Observation
Observability

1. Inverse Laplace transform of (sIn − A)−1 Observer design

Observer-based
2. Diagonalisation of A control

Introduction to
3. Cayley-Hamilton method optimal control

In Matlab : use expm(A*t) and not exp (if t is given). Introduction to


digital control

Conclusion
State space
How to compute the solution x(t) of a linear system ? approach

(cont..) Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation

General case of system (10) To/from transfer


functions

The state x(t), solution of system (10), is given by Properties (stability)

State feedback
Z t control
At A(t−τ)
x(t) = e x(0) + e Bu(τ)dτ (13) Problem formulation

|0
| {z } Controllability
{z } Definition
free response
forced response Pole placement control
Specifications
Integral Control

Observer
Simulation of state space systems Observation
Observability

Use lsim. Observer design

Example: Observer-based
control
t = 0:0.01:5; u = sin(t); lsim(sys,u,t) Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback

Properties control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Non unicity approach

Olivier Sename

Introduction

Given a transfer function, there exists an infinity of state space Modelling

representations (equivalent in terms of input-output behavior). Let Nonlinear models


Linear models

 Linearisation

ẋ(t) = Ax(t) + Bu(t), To/from transfer


(14) functions
y (t) = Cx(t) + Du(t) Properties (stability)

State feedback
the transfer matrix being G(s) = C(sIn − A)−1 B + D,
and consider the control
Problem formulation
change of variables x = Tz (T being an invertible matrix). Replacing Controllability

x = Tz in the previous system gives: Definition


Pole placement control
Specifications
T ż(t) = ATz(t) + Bu(t) (15) Integral Control

Observer
y (t) = CTz(t) + Du(t) (16) Observation
Observability

Hence Observer design

Observer-based

ż(t) = T −1 ATz(t) + T −1 Bu(t) (17) control

Introduction to
y (t) = CTz(t) + Du(t) (18) optimal control

Introduction to
digital control

Conclusion
State space
approach

Olivier Sename

Introduction
Defining à = T −1 AT , B̃ = T −1 B and C̃ = CT , the transfer function of Modelling
the previous system is: Nonlinear models
Linear models
Linearisation
−1
G̃(s) = C̃(sIn − Ã) B̃ + D (19) To/from transfer
functions
−1 −1 −1
= C T (sIn − T AT ) T B +D (20) Properties (stability)

State feedback
(21) control
Problem formulation

Using In = T −1 T , we get Controllability


Definition
Pole placement control
−1 −1 −1
G̃(s) = C T T (sIn − A) T T B + D = G(s) (22) Specifications
Integral Control

Exercise: For the quarter-car model, choose: Observer


Observation
Observability
x1 = zs , x2 = żs , x3 = zs − zus , x4 = żs − żus Observer design

Observer-based
and give the equivalent state space representation. control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Stability approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Definition Linear models
Linearisation
An equilibrium point xeq is stable if, for all ρ > 0, there exists a η > 0 To/from transfer

such that: functions

Properties (stability)

kx(0) − xeq k < η =⇒ kx(t) − xeq k < ρ, ∀t ≥ 0 State feedback


control
Problem formulation
Controllability
Definition
Definition Pole placement control

An equilibrium point xeq is asymptotically stable if it is stable and, Specifications


Integral Control
there exists η > 0 such that: Observer
Observation
kx(0) − xeq k < η =⇒ x(t) → xeq , when t → ∞ Observability
Observer design

Observer-based
These notions are equivalent for linear systems (not for non linear control

ones). Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Stability Analysis approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation

The stability of a linear state space system is analyzed through the To/from transfer
functions

characteristic equation det(sIn − A) = 0. Properties (stability)


The system poles are then the eigenvalues of the matrix A. It then State feedback
control
follows: Problem formulation
Controllability
Proposition Definition
Pole placement control
A system ẋ(t) = Ax(t), with initial condition x(0) = x0 , is stable if Specifications

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

Observer
Using Matlab, if SYS is an SS object then pole(SYS) computes the Observation

poles P of the LTI model SYS. It is equivalent to compute eig(A). Observability


Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
The Phase Plane approach

It consists in plotting the trajectory of the state variables (valid also for Olivier Sename

nonlinear systems). Trajectories that converge to zero are stable ! Introduction


 Modelling
ẋ1 (t) = x2 (t)
given x1 (0) & x2 (0) Nonlinear models

ẋ2 (t) = −5x1 (t) − 6x2 (t) Linear models


Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback

State feedback control


control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Objective of any control system approach

Olivier Sename

In one sentence: shape the response of the system to a given Introduction


reference and get (or keep) a stable system in closed-loop, with desired Modelling
performances, while minimising the effects of disturbances and Nonlinear models
Linear models
measurement noises, and avoiding actuators saturation, this despite of Linearisation

modelling uncertainties, parameter changes or change of operating To/from transfer


functions
point. Properties (stability)
Steps to be achieved: State feedback
control
Nominal stability (NS): The system is stable with the nominal model Problem formulation

(no model uncertainty) Controllability


Definition

Nominal Performance (NP): The system satisfies the performance Pole placement control
Specifications
specifications with the nominal model (no model Integral Control

uncertainty) Observer
Observation
Robust stability (RS): The system is stable for all perturbed plants Observability
Observer design
about the nominal model, up to the worst-case model
Observer-based
uncertainty (including the real plant) control

Robust performance (RP): The system satisfies the performance Introduction to


optimal control
specifications for all perturbed plants about the nominal Introduction to
model, up to the worst-case model uncertainty digital control

(including the real plant). Conclusion


State space
About Feedback control approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
How to design a controller using a state space representation ? Linearisation

Two classes of controllers do exist (in red those studied in the course): To/from transfer
functions

I Static controllers (output or state feedback) Properties (stability)

State feedback
I Dynamic controllers (output feedback or observer-based) control
Problem formulation

What for ? Controllability


Definition
I Closed-loop stability (of state or output variables) Pole placement control
Specifications
I disturbance rejection Integral Control

Observer
I Model tracking Observation
Observability
I Input/Output decoupling Observer design

I Other performance criteria : H2 optimal, H∞ robust... Observer-based


control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Why state feedback and not output feedback? approach

Olivier Sename
y (s) 1
Exercise: G(s) = u(s) = s2 −s Introduction
Follow the steps below:
Modelling
Nonlinear models
1. Define x1 = y , x2 = ẏ . Write the differential equations that the Linear models
state variables (x1 , x2 ) do satisfy. Deduce the state space system Linearisation
To/from transfer
representation, and check that this corresponds to the controllable functions

canonical form . Properties (stability)

State feedback
2. Case of output feedback= Proportional control : control
Let us consider u = Kp (yref − y ) Problem formulation
Controllability
I Compute the transfer function of the closed-loop system (with unitary Definition
feedback), and check that the closed-loop system poles are those Pole placement control

given by the roots of the polynomial PBF (s) = s2 − s + Kp . Specifications


Integral Control
I Can the closed-loop system be stabilized (chosen Kp well)?
Observer
3. Case of state feedback : choose u = −x1 − 3x2 + yref Observation
Observability
I From 1., compute the state space representation of the closed-loop Observer design
system (replacing u by u = −x1 − 3x2 + yref ).
Observer-based
I What are the poles of the closed-loop system? Is the closed-loop control
system stable?
Introduction to
I Now, consider u = −f1 x1 − f2 x2 + yref . How can we choose (f1 , f2 ) optimal control
such that the closed-loop system is stable ? Introduction to
digital control
4. To conclude, when the closed-loop system is stable, explain why
Conclusion
the second control law is efficient?
State space
A preliminary property analysis: Controllability approach

Olivier Sename

Controllability refers to the ability of controlling a state-space model Introduction


using state feedback. Modelling
Nonlinear models

Definition Linear models


Linearisation
Given two states x0 and x1 , the system (10) is controllable if there exist To/from transfer
functions
t1 > 0 and a piecewise-continuous control input u(t), t ∈ [0, t1 ], such
Properties (stability)
that x(t) takes the values x0 for t = 0 and x1 for t = t1 .
State feedback
control
Proposition Problem formulation
Controllability
The controllability matrix is defined by C = [B, A.B, . . . , An−1 .B]. Then Definition
Pole placement control
system (10) is controllable if and only if rank (C ) = n. Specifications

If the system is single-input single output (SISO), it is equivalent to Integral Control

det(C ) 6= 0. Observer
Observation
Observability
Using Matlab, if SYS is an SS object then crtb(SYS) returns the Observer design

controllability matrix of the state-space model SYS with realization Observer-based


control
(A,B,C,D). This is equivalent to ctrb(sys.a,sys.b)
Introduction to
Exercices optimal control

Introduction to
Test the controllability of the previous examples: DC motor, suspension, digital control
inverted pendulum. Conclusion
State space
Definition of the state feedback control approach

Olivier Sename

Introduction

Modelling
Nonlinear models

A state feedback controller for a continuous-time system is: Linear models


Linearisation
To/from transfer

u(t) = −Fx(t) (23) functions

Properties (stability)

where F is a m × n real matrix. State feedback


control
When the system is SISO, it corresponds to : Problem formulation

u(t) = −f1 x1 − f2 x2 − . . . − fn xn with F = [f1 , f2 , . . . , fn ]. Controllability


Definition
When the system is MIMO we have Pole placement control
Specifications
    Integral Control
u1   x1
 u2  f 11 . . . f1n  x 
Observer

..   2 
Observation
  .
 .  =  ..  . 
 Observability

 ..  . 
 ..  Observer design

fm1 . . . fmn Observer-based


um xn control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
State feedback (2): stabilization approach

Olivier Sename

Using state feedback controllers (23), we get in closed-loop (for Introduction

simplicity D = 0) Modelling
Nonlinear models

ẋ(t) = (A − BF )x(t), Linear models
(24)
y (t) = Cx(t) Linearisation
To/from transfer
functions
The stability (and dynamics) of the closed-loop system is then given by Properties (stability)
the eigenvalues of A − BF . State feedback
Indeed, in that case, the solution y (t) = C exp(A−BF )t x0 converges control
Problem formulation
asymptotically to zero! Controllability
Definition
Pole placement control
Specifications

But what happens if the closed-loop system must also track a Integral Control

reference signal r ? Observer


Observation

We might select u(t) = r (t) − Fx(t). Therefore the closed-loop transfer Observability
Observer design
matrix is :
Observer-based
y (s)
= C(sIn − A + BF )−1 B (25) control
r (s) Introduction to
optimal control
for which the static gain is C(−A + BF )−1 B and may differ from 1!! Introduction to
digital control
The control law must be completed.
Conclusion
State space
State feedback (3): complete solution for reference tracking approach

Olivier Sename
When the objective is to track some reference signal r , i.e
Introduction
y (t) −→ r (t), Modelling
t→∞ Nonlinear models
Linear models
the state feedback control must be of the form: Linearisation
To/from transfer
functions
u(t) = −Fx(t)+Gr (t) (26) Properties (stability)

State feedback
where G is a m × p real matrix to be determined. control

Then the closed-loop transfer matrix is defined as: Problem formulation


Controllability
Definition
−1
GCL (s) = C(sIn − A + BF ) BG (27) Pole placement control
Specifications
Integral Control
Therefore, the following choice for G ensures a unitary steady-state Observer
gain for the closed-loop system: Observation
Observability

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


Observer design
(28)
Observer-based
control

Introduction to
optimal control
F Need to adapt when D 6= 0 Introduction to
digital control

GCL (s) = [(C − DF )(sIn − A + BF )−1 B + D]G


Conclusion
State space
Implementation in Simulink approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
How to synthetize the state feedback control gain F ? approach

The pole placement control Olivier Sename

Introduction

Modelling
Problem definition Nonlinear models

Given a linear system (5), does there exist a state feedback control law Linear models
Linearisation
(23) such that the closed-loop system poles are in predefined locations To/from transfer
functions
(denoted γi , i = 1, ..., n ) in the complex plane ? Properties (stability)

State feedback
Proposition control
Problem formulation
Let a linear system given by A, B, and let γi , i = 1, ..., n , a set of Controllability

complex elements (i.e. the desired poles of the closed-loop system). Definition
Pole placement control
There exists a state feedback control u = −Fx such that the poles of Specifications
Integral Control
the closed-loop system are γi , i = 1, ..., n if and only if the pair (A, B) is
Observer
controllable. Observation
Observability
In Matlab, use F=acker(A,B,P) or F=place(A,B,P) where Observer design

P = [γ1 , . . . , γn ] is the set of desired closed-loop poles. Observer-based


control
Remark Introduction to
optimal control
predefined locations means that, according to the required closed-loop
Introduction to
performances (settiling time, rise time, overshoot ...), the designer has digital control
chosen a set of desired poles for the closed-loop system. Conclusion
State space
Illustration on the easy case of controllable canonical forms approach

Here we assume that the system state space model is of the form: Olivier Sename

0 1 0 ... 0 0
   
Introduction
 0 0 1 0 ...   ..  Modelling
 . 
 .. .. .. .. ..
 
   Nonlinear models
A=  . . . . .  , B =  .  and
  ..  Linear models
Linearisation

 0 ..   
To/from transfer
. 0 1   0  functions

−a0 −a1 . . . . . . −an−1 1 Properties (stability)


 
C= c0 c1 ... cn−1 , State feedback
control
corresponding to the transfer function: Problem formulation
Controllability

sn−1
Definition
c0 + c1 s + . . . + cn−1 Pole placement control
G(s) =
a0 + a1 s + . . . + an−1 sn−1 + sn Specifications
Integral Control

Observer
Let F = [ f1 f2 ... fn ] Observation

Then Observability
Observer design

0 1 0 ... 0 Observer-based
 
control
 0 0 1 0 ...  Introduction to
.. .. .. .. ..
  optimal control
 
A − BF = 
 . . . . . 
 (29) Introduction to
 ..  digital control
 0 . 0 1  Conclusion

−a0 − f1 −a1 − f2 ... ... −an−1 − fn


State space
the case of controllable canonical forms (cont..) approach

Olivier Sename

From the specifications of the predefined closed-loop system poles


Introduction
locations, {γi }, i = 1, n., the desired closed-loop characteristic Modelling
polynomial (denominator of the closed-loop transfer function) is given Nonlinear models

as: Linear models


Linearisation
(s − γ1 )(s − γ2 )...(s − γn ) To/from transfer
functions

and can be developed as: Properties (stability)

State feedback
control
(s − γ1 )(s − γ2 )...(s − γn ) = sn + αn−1 sn−1 + . . . + α1 s + α0 Problem formulation
Controllability

Therefore, from A − BF given before, the chosen solution: Definition


Pole placement control
Specifications

fi = −ai−1 + αi−1 , i = 1, .., n Integral Control

Observer
ensures that the poles of A − BF are {γi }, i = 1, n. Observation
Observability
Observer design

Observer-based
Remark control

the case of controllable canonical forms is very important since , when Introduction to
optimal control
we consider a general state space representation, it is first necessary to Introduction to
use a change of basis to make the system under canonical form, which digital control

will simplify a lot the computation of the state feedback control gain F . Conclusion
State space
How to specificy the desired closed-loop performances? approach

Olivier Sename
The required closed-loop performances should be chosen in the
following zone Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
which ensures a damping greater than ξ = sin φ . digital control

−γ implies that the real part of the CL poles are sufficiently negatives Conclusion

(so fast enough).


State space
Specifications (2) approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
Some useful rules for selection the desired pole/zero locations (for a functions

second order system): Properties (stability)


1.8
I Rise time : tr ' ωn
State feedback
control
Problem formulation
4.6
I Seetling time : ts ' ξ ωn Controllability
Definition

I Overshoot Mp = exp(−πξ /sqrt(1 − ξ 2 )): Pole placement control


Specifications
ξ = 0.3 ⇔ Mp = 35%, Integral Control

ξ = 0.5 ⇔ Mp = 16%, Observer


Observation
ξ = 0.7 ⇔ Mp = 5%. Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Specifications(3) approach

Olivier Sename
Some rules do exist to shape the transient response. The ITAE (Integral
of Time multiplying the Absolute value of the Error), defined as: Introduction

Z ∞ Modelling
Nonlinear models
ITAE = t|e(t)|dt Linear models
0 Linearisation
To/from transfer
can be used to specify a dynamic response with relatively small functions

overshoot and relatively little oscillation (there exist other methods to do Properties (stability)

so). The optimum coefficients for the ITAE criteria are given below (see State feedback
control
Dorf & Bishop 2005). Problem formulation
Controllability
Order Characteristic polynomials dk (s) Definition

1 d1 = [s + ωn ] Pole placement control


Specifications
2 d2 = [s2 + 1.4ωn s + ωn2 ] Integral Control

3 d3 = [s3 + 1.75ωn s2 + 2.15ωn2 s + ωn3 ] Observer

d4 = [s4 + 2.1ωn s3 + 3.4ωn2 s2 + 2.7ωn3 s + ωn4 ]


Observation
4 Observability

5 d5 = [s5 + 2.8ωn s4 + 5ωn2 s3 + 5.5ωn3 s2 + 3.4ωn4 s + ωn5 ] Observer design

6 d6 = [s6 + 3.25ωn s5 + 6.6ωn2 s4 + 8.6ωn3 s3 + 7.45ωn4 s2 + 3.95ωn5 s +Observer-based


ωn6 ]
control

Introduction to
optimal control
and the corresponding transfer function is of the form:
Introduction to
digital control
ωnk
Hk (s) = , ∀k = 1, ..., 6 Conclusion
dk (s)
State space
Specifications(4): responses of the optimum ITAE approach

Hk (s)∀k = 1, ..., 6 Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Integral Control or how to ensure disturbance attenuation approach

with a state feedback control? Olivier Sename

Introduction

Let us consider the system: Modelling


Nonlinear models
( Linear models
ẋ(t) = Ax(t) + Bu(t)+Ed(t), x(0) = x0 Linearisation
(30) To/from transfer
y (t) = Cx(t) functions

Properties (stability)

where d is the disturbance. State feedback


control
Problem formulation
Controllability

Control objectives Definition


Pole placement control

We wish to keep y following a reference signal r even in the presence Specifications


Integral Control
of d, which means Observer

when d = 0 and r (t) 6= 0 : y (t) −−−→ r (t), Observation


Observability
t→∞
Observer design
when r = 0 and d(t) 6= 0 : y (t) −−−→ 0, Observer-based
t→∞ control

Introduction to
optimal control
BUT
Introduction to
A state feedback controller may not allow to reject the effects of digital control
disturbances (particularly of input disturbances)!! Conclusion
State space
Formulation of the Integral Control approach

Olivier Sename
Without integral
Let consider the state feedback control u(t) = −Fx(t) + Gr (t) for the Introduction

system 
Modelling
Nonlinear models
ẋ(t) = Ax(t) + Bu(t) + Ed(t), x(0) = x0 Linear models
(31)
y (t) = Cx(t) Linearisation
To/from transfer
functions
The tracking and disturbance rejection objectives can be formulated as Properties (stability)
y
I −−→ 1 ? i.e. C(−A + BF )−1 BG = 1 ?
r − State feedback
t→∞ control
Problem formulation
y
I −−→ 0? i.e. C(−A + BF )−1 BE = 0 ?
d − Controllability
t→∞ Definition
Pole placement control
However, there are few chances to find F and G such that both Specifications

objectives, together with the pole placement one, are achieved! Integral Control

Observer
A solution to solve both problems: add and integral term Observation
Observability
A very useful method consists in adding an integral term (as usual on Observer design

the tracking error) to ensure a unitary static closed-loop gain. Therefore Observer-based
control
the control law is chosen as:
Introduction to
Z t optimal control

u(t) = −Fx(t)−H (r (τ) − y (τ))dτ Introduction to


0 digital control

Conclusion
Now the question is: how to find H? (and F too since a single design
procedure is better in order to get a solution)
State space
Synthesis of the Integral Control approach

Olivier Sename

The state space method Introduction


It consists in first extending the system by introducing the new state Modelling
variable: Nonlinear models
Linear models
Linearisation

ż(t) = r (t) − y (t) To/from transfer


functions

Properties (stability)
which leads, for the whole system, to define the extended state vector
 State feedback
x control
.
z Problem formulation
Controllability
Then the new open-loop state space representation is given as: Definition
Pole placement control
Specifications
           Integral Control
ẋ(t) A 0 x 0 B E
= + u(t) + r (t) + d(t) Observer
ż(t) −C 0 z 1 0 0 Observation
  Observability
  x Observer design
y (t) = C 0
z Observer-based
control

Introduction to
optimal control
Let us denote:
    Introduction to
digital control
A 0 B  
Ae = , Be = , Ce = C 0 Conclusion
−C 0 0
State space
approach

Olivier Sename
The new state feedback control is now defined as:
Introduction
 
x Modelling
u(t) = −[F H] = −Fx(t)−Hz(t) Nonlinear models
z Linear models
Linearisation

Then the synthesis of the control law u(t) (i.e of Fe = [F H]) requires: To/from transfer
functions

I the verification of the extended system controllability, i.e of (Ae , Be ) Properties (stability)

State feedback
I the specification of the desired closed-loop performances, i.e. a control
set Pe of n + 1 desired closed-loop poles has to be chosen, Problem formulation
Controllability

I the computation of the full state feedback Fe using Definition


Pole placement control
Fe=acker(Ae,Be,Pe) Specifications
Integral Control
We then get the closed-loop system Observer
         Observation

ẋ(t) A − BF BH x 0 E Observability
= + r (t) + d(t) Observer design
ż(t) −C 0 z 1 0
Observer-based
  control
  x
y (t) = C 0 Introduction to
z optimal control

Introduction to
digital control

Conclusion
State space
Integral control scheme approach

Olivier Sename

Introduction

Modelling
Nonlinear models
The complete structure has the following form: Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation

When an observer is to be used (see next chapter), the control action Observability
Observer design
simply becomes: Observer-based
u(t) = −F x̂(t) − Hz(t) control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

Observer and output feedback State feedback


control
Problem formulation

control Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Introduction approach

Olivier Sename

A first insight Introduction

To implement a state feedback control, the measurement of all the state Modelling
Nonlinear models
variables is necessary. If this is not available, we will use a state Linear models

estimation through a so-called Observer. Linearisation


To/from transfer
functions

Observation or Estimation Properties (stability)

The estimation theory is based on the famous Kalman contribution to State feedback
control
filtering problems (1960), and accounts for noise induced problems. Problem formulation

The observation theory has been developed for Linear Systems by Controllability
Definition
Luenberger (1971), and doe snot consider the noise effects. Pole placement control
Specifications
Integral Control
Other interest of observation/estimation Observer
In practice the use of sensors is often limited for several reasons: Observation
Observability
feasibility, cost, reliability, maintenance ... Observer design
An observer is a key issue to estimate unknown variables (then non Observer-based
measured variables) and to propose a so-called virtual sensor. control

Introduction to
Objective: Develop a dynamical system whose state x̂(t) satisfies: optimal control

I (x(t) − x̂(t)) −−−→ 0 Introduction to


digital control
t→∞
Conclusion
I (x(t) − x̂(t)) → 0 as fast as possible
State space
How to simply (bad) compute x(t) ? approach

Olivier Sename
Let consider (
ẋ(t) = Ax(t) + Bu(t), x(0) = x0 Introduction
(32) Modelling
y (t) = Cx(t) Nonlinear models
Linear models

Knowing that: Linearisation


To/from transfer
functions
y (t) = Cx(t)
Properties (stability)
ẏ (t) = CAx(t) + CBu(t)
State feedback
ÿ (t) = CA2 x(t) + CABu(t) + CB u̇(t) control
Problem formulation
... = ... Controllability
Definition
y n−1 (t) = CAn−1 + . . . Pole placement control
Specifications
Integral Control

and given that we know the measurement, the inputs (and the system Observer
Observation
matrices), we can just perform some few computation to compute x(t) Observability

as:  Observer design

−1 Observer-based
C y (t)
   
  control
CA ÿ (t)

 

    
 − F (u(t), u̇(t), . . . , u n−2 Introduction to
x(t) =  .. .. (t)) This
   
  optimal control
 .  
 .  

Introduction to
 
CAn−1 n−1
 
y (t) digital control
requires the system to be observable (but still cannot work in practice Conclusion
when faced to measurement noises, modelling errors ....)
State space
A preliminary property: Observability approach

Olivier Sename

Observability refers to the ability to estimate a state variable (often not Introduction

measured !!). Modelling


Nonlinear models

Definition Linear models


Linearisation
A linear system (5) is completely observable if, given the control and To/from transfer
functions
the output over the interval t0 ≤ t ≤ T , one can determine any initial Properties (stability)
state x(t0 ). State feedback
It is equivalent to characterize the non-observability as : control
Problem formulation
A state x(t) is not observable if the corresponding output vanishes, i.e. Controllability

if the following holds: y (t) = ẏ (t) = ÿ (t) = . . . = 0 Definition


Pole placement control
Specifications

Proposition Integral Control

C
  Observer
Observation
 CA  Observability

The observability matrix is defined by O =  ..  . Then system


  Observer design
 .  Observer-based
control
CAn−1
Introduction to
(10) is observable if and only if rank (O) = n. optimal control

If the system is single-input single output (SISO), it is equivalent to Introduction to


digital control
det(O) 6= 0.
Conclusion
State space
Observability cont. approach

Olivier Sename
Using Matlab, if SYS is an SS object then obsv(SYS) returns the
observability matrix of the state-space model SYS with realization Introduction

(A,B,C,D). This is equivalent to OBSV(sys.a,sys.c). Modelling


Nonlinear models

Where does observability come from ? Linear models


Linearisation

Compare the transfer function of the two different systems* To/from transfer
functions

Properties (stability)
ẋ = −x + u
State feedback
control
y = 2x Problem formulation
Controllability

and Definition
Pole placement control
    Specifications
−1 0 1
ẋ = x+ u Integral Control

0 −2 1 Observer
Observation
  Observability
y = 2 0 x Observer design

Observer-based
control

Exercices Introduction to
optimal control
Test the observability of the previous examples: DC motor, suspension, Introduction to
inverted pendulum. digital control

Analysis of different cases, according to the considered number of Conclusion

sensors.
State space
Open loop (OL) observers: estimation from input data approach

Olivier Sename

Such a method, consists in performing, in real-time (embedded Introduction

computer), a simulation of the system model feeded by the known input Modelling
Nonlinear models
variables. Linear models

For a linear system, it means that we may define the OL observer as: Linearisation
To/from transfer
functions
˙
(
x̂(t) = Ax̂(t) + Bu(t), given x̂(0) Properties (stability)
(33) State feedback
ŷ (t) = C x̂(t) + Du(t) control
Problem formulation

x̂(t) ∈ Rn is the estimated state of x(t).


Controllability
Definition

Now, IF x̂(0) = x(0), then x̂(t) = x(t), ∀t ≥ 0. Pole placement control


Specifications
Integral Control
BUT Observer
Observation
I x(0) is UNKNOWN so we cannot choose x̂(0) = x(0), Observability
Observer design
I the estimation error (e = x − x̂) satisfies ė(t) = Ae(t) (could be
Observer-based
unstable AND cannot be modified) control

I the effects of disturbance and noise cannot be mitigated Introduction to


optimal control

NEED FOR A FEEDBACK FROM MEASURED OUTPUTS TO Introduction to


digital control
CORRECT THE ESTIMATION ON LINE! Conclusion
State space
Closed-loop Observer: estimation from input AND output approach

data Olivier Sename

Introduction

Objective: since y is KNOWN (measured) and is function of the state Modelling

variables, use an on line comparison of the measured system output y Nonlinear models
Linear models
and the estimated output ŷ . Linearisation
To/from transfer
Observer description: functions

 Properties (stability)
˙
 x̂(t)
 = Ax̂(t) + Bu(t) + L(y (t) − ŷ (t)) State feedback
control
(34)
| {z }
Problem formulation
 Correction
 ŷ (t) = C x̂(t) + Du(t) Controllability
Definition
Pole placement control
with x̂0 to be defined, and wherex̂(t) ∈ Rnis the estimated state of x(t) Specifications
Integral Control
and L is the n × p constant observer gain matrix to be designed.
Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Analysis of the observer properties approach

Olivier Sename

Introduction

The estimated error, e(t) := x(t) − x̂(t), satisfies: Modelling


Nonlinear models
Linear models
ė(t) = (A − LC)e(t) (35) Linearisation
To/from transfer
functions
If L is designed such that A − LC is stable, then x̂(t) converges Properties (stability)
asymptotically towards x(t). State feedback
control
Proposition Problem formulation
Controllability
(34) is an observer for system (5) if and only if the pair (C,A) is Definition

observable, i.e. Pole placement control


Specifications
Integral Control

rank (O) = n Observer


Observation

C
  Observability
Observer design
 CA  Observer-based
where O =  .. .
 
control
 . 
Introduction to
CAn−1 optimal control

Introduction to
digital control

Conclusion
State space
Observer design approach

Olivier Sename
The observer design is restricted to find L such that A − LC is stable (so
that (x(t) − x̂(t)) −−−→ 0) and has some desired eigenvalues (so that Introduction
t→∞
Modelling
(x(t) − x̂(t)) → 0 as fast as possible). This is still a pole placement Nonlinear models

problem. Linear models


Linearisation
To/from transfer
Specifications functions

Usually the observer poles are chosen around 5 to 10 times higher than Properties (stability)

State feedback
the closed-loop system, so that the state estimation is good as early as control
possible. This is quite important to avoid that the observer makes the Problem formulation
Controllability
closed-loop system slower. Definition
Pole placement control
Specifications
Design method Integral Control

Observer
I In order to use the acker Matlab function, we will use the duality Observation

property between observability and controllability, i.e. : Observability


Observer design
(C, A) observable ⇔ (AT , C T ) controllable. Observer-based
I Then there exists LT such that the eigenvalues of AT − C T LT can control

be randomly chosen. As (A − LC)T = AT − C T LT then L exists Introduction to


optimal control
such that A − LC is stable. Introduction to
digital control
I Matlab : use L=acker(A’,C’,Po)’ where Po is the
Conclusion
set of desired observer poles.
State space
Theoretical validation scheme using Simulink approach

Olivier Sename

Introduction
Written below for D = 0.
Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
About the robustness of the observer approach

Olivier Sename

Introduction
Let assume that the systems is indeed given by Modelling
Nonlinear models
( Linear models
ẋ(t) = Ax(t) + Bu(t) + Edx (t), x(0) = x0 Linearisation
(36) To/from transfer
y (t) = Cx(t) + Nν(t) functions

Properties (stability)
where dx can represent input disturbance or modelling error, and ν State feedback
control
stands for measurement noise. Problem formulation
Then the estimated error satisfies: Controllability
Definition
Pole placement control
ė(t) = (A − LC)e(t) + Edx − LNν (37) Specifications
Integral Control

Therefore the presence of dx or dy may lead to non zero estimation Observer


Observation
errors due to bias or variations. Then do not forget that you can: Observability
Observer design
I Provide an analysis of the observer performances/robustness due
Observer-based
to dx or ν (see later) control

Introduction to
I Design optimal observer when dx and ν represent noise effects optimal control
(Kalman - lqe, see next course ) Introduction to
digital control

Conclusion
State space
Implementation approach

Olivier Sename

Introduction
Rules Modelling
I use a state-space block in Simulink Nonlinear models
Linear models

I enter ’formal’ matrices ’A’=A-LC,’B’=[B L], Linearisation


To/from transfer
’C’= eye(n), ’D’= zeros(n,m)) functions

Properties (stability)
I Choose x̂(0) 6= x(0),
State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
I alternative use of estim digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback

Observer-based control
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Observer-based control approach

Olivier Sename

Introduction

Modelling
Nonlinear models
When an observer is built, we will use as control law: Linear models
Linearisation

u(t) = −F x̂(t) + Gr (t) (38) To/from transfer


functions

Properties (stability)
The closed-loop system is then
State feedback
 control
ẋ(t) = (A − BF )x(t) + BF (x(t) − x̂(t)), Problem formulation
(39) Controllability
y (t) = Cx(t) Definition
Pole placement control

Therefore the fact that x̂(0) 6= x(0) will have an impact on the Specifications
Integral Control
closed-loop system behavior. Observer
The stability analysis of the closed-loop system with an observer-based Observation
Observability
state feedback control needs to consider an extended state vector as: Observer design

 T Observer-based
xe (t) = x(t) e(t) control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Observer-based control: stability analysis approach

Olivier Sename

Introduction

Defining Modelling
 T Nonlinear models
xe (t) = x(t) e(t) Linear models
Linearisation
The closed-loop system with observer (34) and control (38) is: To/from transfer
functions

Properties (stability)
   
A − BF BF BG
ẋe (t) = xe (t) + r (t) (40) State feedback
0 A − LC 0 control
Problem formulation

The characteristic polynomial of the extended system is: Controllability


Definition
Pole placement control

det(sIn − A + BF ) × det(sIn − A + LC) Specifications


Integral Control

Observer
If the observer and the control are designed separately then the Observation
closed-loop system with the dynamic measurement feedback is stable, Observability
Observer design
given that the control and observer systems are stable and the
Observer-based
eigenvalues of (40) can be obtained directly from them. control
This corresponds to the so-called separation principle. Introduction to
optimal control
Remark: check pzmap of the extended closed-loop system. Introduction to
digital control

Conclusion
State space
Closed-loop analysis approach

Olivier Sename

Introduction
The closed-loop system from r to y is then computed from:
Modelling
 T Nonlinear models
y = [C 0] x(t) e(t) Linear models
Linearisation
To/from transfer
which leads to functions
y
= C(sIn − A + BF )BG Properties (stability)
r State feedback
control
However if some disturbance acts as for: Problem formulation
( Controllability
ẋ(t) = Ax(t) + Bu(t) + Ed(t), x(0) = x0 Definition

(41) Pole placement control

y (t) = Cx(t) Specifications


Integral Control

Observer
where d is the disturbance, then the extended system writes Observation
Observability
Observer design
     
A − BF BF BG E Observer-based
ẋe (t) = xe (t) + r (t) + d(t) (42) control
0 A − LC 0 E
Introduction to
optimal control
which is a problem for the performances of closed-loop system and of Introduction to
the estimation (see later the Integral control). digital control

Conclusion
State space
How to define the observer+state feedback control as a approach

"usual" controller? Olivier Sename

Introduction

Modelling
The observer-based controller is nothing else than a 2-DOF Dynamic Nonlinear models
Linear models
Output Feedback controller. Linearisation
To/from transfer
Indeed it comes from functions

Properties (stability)
˙

x̂(t) = Ax̂(t) + Bu(t) + L(y (t) − ŷ (t))
(43) State feedback
u(t) = −F x̂(t) + Gr (t) control
Problem formulation
Controllability
which can be written as (when D = 0) Definition
Pole placement control

˙
 Specifications
x̂(t) = (A − BF − LC)x̂(t) + BGr (t) + Ly (t)
(44) Integral Control

u(t) = −F x̂(t) + Gr (t) Observer


Observation
Observability
We then can write: Observer design

Observer-based
U(s) = Kr (s)R(s) − Ky (s)Y (s) control

Introduction to
with Kr (s) = G − F (sIn − A + BF + LC)−1 BG and optimal control

Ky (s) = F (sIn − A + BF + LC)−1 L Introduction to


digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback

Introduction to optimal control control


Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Introduction approach

Olivier Sename

Introduction
The objective of an optimal control is to minimize a cost function which Modelling
penalizes
R∞
simultaneously the state and input behaviors, of the form Nonlinear models
Linear models

0 L(x, y )dt, i.e to reach a tradeoff between the transient response and Linearisation
To/from transfer
the control effort. functions

This objective is defined through the following criteria always Properties (stability)

considered in the quadratic form: State feedback


control
Z ∞ Problem formulation

J= (x T Qx + u T Ru)dt Controllability
Definition
0
Pole placement control
Specifications
In that form: Integral Control

I x T Qx is the state cost, Observer


Observation
I u T Ru is the control cost, Observability
Observer design
I Q and R are respectively the state and cost penalties. Observer-based
control
It can be proved that the state feedback control that minimizes J in
Introduction to
closed-loop (given Q and R) is obtained solving an Algebraic Riccati optimal control

Equation (ARE) Introduction to


digital control

Conclusion
State space
Linear-Quadratic Regulator (LQR) design approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models

LQR problem solution Linearisation


To/from transfer
functions
Given a linear system ẋ(t) = Ax(t) + Bu(t), with (A, B) stabilizable, and
given positive definite matrices Q = Q T > 0 and R = R T > 0, if there Properties (stability)

exists P = P T > 0 s.t:


State feedback
control
Problem formulation

AT P + PA − PBR −1 B T P + Q = 0 Controllability
Definition
Pole placement control

then the state feedback control u = −Kx such that: Specifications


Integral Control

−1 T Observer
K =R B P Observation
Observability

minimizes the quadractic criteria J (for given Q and R). Observer design

Observer-based
This problem is handled in Matlab through the lqr command. control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback

Introduction to digital control control


Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Toward digital control approach

Olivier Sename

Digital control Introduction

Usually controllers are implemented in a digital computer as: Modelling


Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
This requires the use of the discrete theory. Observation
Observability
m (Sampling theory + Z-Transform) m Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Definition of the Z-Transform approach

Olivier Sename

Introduction

Modelling
Mathematical definition Nonlinear models

Because the output of the ideal sampler, x ∗ (t), is a series of impulses Linear models
Linearisation
with values x(kTe ), we have: To/from transfer
functions

∞ Properties (stability)
x ∗ (t) = ∑ x(kTe )δ (t − kTe ) State feedback
k =0 control
Problem formulation
Controllability
by using the Laplace transform, Definition
Pole placement control
∞ Specifications
∗ −ksTe
L [x (t)] = ∑ x(kTe )e Integral Control

k =0 Observer
Observation
Observability
Noting z = esTe , we can derive the so called Z-Transform Observer design

Observer-based
∞ control
X (z) = Z [x(k )] = ∑ x(k )z −k Introduction to
k =0 optimal control

Introduction to
digital control

Conclusion
State space
Properties approach

Olivier Sename

Introduction

Modelling
Definition Nonlinear models
Linear models
∞ Linearisation
−k
X (z) = Z [x(k )] = ∑ x(k )z To/from transfer
functions
k =0
Properties (stability)

Properties State feedback


control
Problem formulation

Z [αx(k ) + β y (k )] = αX (z) + β Y (z) Controllability


Definition
−n
Z [x(k − n)] = z Z [x(k )] Pole placement control
Specifications
d Integral Control
Z [kx(k )] = −z Z [x(k )]
dz Observer
Observation
Z [x(k ) ∗ y (k )] = X (z).Y (z) Observability
Observer design
lim x(k ) = lim (z − 1)X (z) Observer-based
k →∞ 1→z −1 control

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


optimal control

Introduction to
digital control

Conclusion
State space
Zero order holder approach

Olivier Sename

Introduction

Sampler and Zero order holder Modelling


Nonlinear models

A sampler is a switch that close every Te seconds. Linear models


Linearisation
A Zero order holder holds the signal x for Te seconds to get h as: To/from transfer
functions

h(t + kTe ) = x(kTe ), 0 ≤ t < Te Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Zero order holder (cont’d) approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Model of the Zero order holder Linearisation
To/from transfer
The transfer function of the zero-order holder is given by: functions

Properties (stability)
1 e−sTe State feedback
GBOZ (s) = − control
s s Problem formulation

1 − e−sTe Controllability

= Definition
s Pole placement control
Specifications
Integral Control

Observer
Influence of the D/A and A/D Observation

Note that the precision is also limited by the available precision of the Observability
Observer design
converters (either A/D or D/A).
Observer-based
This error is also called the amplitude quantization error. control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Representation of the discrete linear systems approach

Olivier Sename

Introduction
The discrete output of a system can be expressed as:
Modelling
Nonlinear models

Linear models
y (k ) = ∑ h(k − n)u(n) Linearisation
n=0 To/from transfer
functions

hence, applying the Z-transform leads to Properties (stability)

State feedback
control
Y (z) = Z [h(k )]U(z) = H(z)U(z) Problem formulation
Controllability
Definition

b + b1 z + · · · + bm z m Y Pole placement control

H(z) = 0 = Specifications

a0 + a1 z + · · · + an z n U Integral Control

Observer
where n (≥ m) is the order of the system Observation
Observability
Corresponding difference equation: Observer design

Observer-based
1 control
y (k ) = b u(k − n) + b1 u(k − n + 1) + · · · + bm u(k − n + m)
an 0 Introduction to
 optimal control
− a0 y (k − n) − a2 y (k − n + 1) − · · · − an−1 y (k − 1) Introduction to
digital control

Conclusion
State space
Some useful transformations approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
x(t) X (s) X (z) functions

δ (t) 1 1 Properties (stability)

δ (t − kTe ) e−ksTe z −k State feedback


1 z control
u(t) s z−1 Problem formulation
1 zTe
t s2 (z−1)2
Controllability
Definition
1 z
e−at s+a z−e−aTe
Pole placement control
Specifications
1 z(1−e−aTe )
1 − e−at s(s+a) (z−1)(z−e−aTe )
Integral Control

ω zsin(ωTe ) Observer
sin(ωt) s2 +ω 2 z 2 −2zcos(ωTe )+1 Observation
s z(z−cos(ωTe )) Observability
cos(ωt) s2 +ω 2 z 2 −2zcos(ωTe )+1 Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Poles, Zeros and Stability approach

Olivier Sename

Introduction
Equivalence {s} ↔ {z}
Modelling
The equivalence between the Laplace domain and the Z domain is Nonlinear models
Linear models
obtained by the following transformation: Linearisation
To/from transfer
sTe functions
z =e
Properties (stability)

Two poles with a imaginary part witch differs of 2π/Te give the same State feedback
control
pole in Z. Problem formulation
Controllability
Definition
Stability domain Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Approximations for discretization approach

Olivier Sename

Introduction

Modelling

Forward difference (Rectangle inferior) Nonlinear models


Linear models
Linearisation
To/from transfer
functions

Properties (stability)
z −1
s= State feedback
Te control
Problem formulation
Controllability
Definition
Pole placement control

Backward difference (Rectangle superior) Specifications


Integral Control

Observer
Observation
Observability

z −1 Observer design
s= Observer-based
zTe control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Approximations for discretization (cont’d) approach

Olivier Sename
Trapezoidal difference (Tustin)
Introduction

Modelling
Nonlinear models
Linear models
2 z −1 Linearisation
s=
Te z + 1 To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Systems definition approach

Olivier Sename
A discrete-time state space system is as follows:
Introduction
(
x((k + 1)h) = Ad x(kh) + Bd u(kh), x(0) = x0 Modelling
(45) Nonlinear models

y (kh) = Cd x(kh) + Dd u(kh) Linear models


Linearisation
To/from transfer

where h is the sampling period. functions

Properties (stability)
Matlab : ss(Ad ,Bd ,Cd ,Dd ,h) creates a SS object SYS
State feedback
representing a discrete-time state-space model control
From a discretization step (c2d) we have: Problem formulation
Controllability
Z h Definition
Pole placement control
Ad = exp(Ah), Bd = ( exp(Aτ)dτ)B Specifications
0 Integral Control

Observer
For discrete-time systems, Observation

 Observability

x((k + 1)h) = Ad x(kh) + Bd u(kh), x(0) = x0 Observer design


(46)
y (kh) = Cd x(kh) + Dd u(kh) Observer-based
control

Introduction to
the discrete transfer function is given by optimal control

Introduction to
G(z) = Cd (zIn − Ad )−1 Bd + Dd (47) digital control

Conclusion
where z is the shift operator, i.e. zx(kh) = x((k + 1)h)
State space
Solution of state space equations - discrete case approach

Olivier Sename

Introduction

Modelling

The state xk , solution of system xk +1 = Ad xk with initial condition x0 , is Nonlinear models


Linear models
given by Linearisation
To/from transfer
functions
x1 = Ad x0 (48) Properties (stability)

x2 = A2d x0 (49) State feedback


control
xn = And x0 (50) Problem formulation
Controllability
Definition
The state xk , solution of system (45), is given by Pole placement control
Specifications
Integral Control
x1 = Ad x 0 + Bd u 0 (51)
Observer
x2 = A2d x0 + Ad Bd u0 + Bd u1 (52) Observation
Observability
n−1 Observer design

xn = And x0 + ∑ An−1−i
d Bd ui (53) Observer-based
control
i=0
Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
State space analysis (discrete-time systems) approach

Olivier Sename

Introduction

Stability Modelling
Nonlinear models

A system (state space representation) is stable iff all the eigenvalues of Linear models
Linearisation
the matrix F are inside the unit circle. To/from transfer
functions

Controllability definition Properties (stability)

State feedback
control
Definition Problem formulation

Given two states x0 and x1 , the system (45) is controllable if there exist Controllability
Definition
K1 > 0 and a sequence of control samples u0 , u1 , . . . , uK1 , such that xk Pole placement control

takes the values x0 for k = 0 and x1 for k = K1 . Specifications


Integral Control

Observer

Observability definition Observation


Observability
Observer design

Definition Observer-based
control
The system (45) is said to be completely observable if every initial state
Introduction to
x(0) can be determined from the observation of y (k ) over a finite optimal control
number of sampling periods. Introduction to
digital control

Conclusion
State space
State space analysis (2) approach

Olivier Sename

Introduction

Modelling
Controllability Nonlinear models
Linear models

The system is controllable iff Linearisation


To/from transfer
functions

Cd (A = rg[Bd Ad Bd . . . An−1
d Bd ] = n Properties (stability)
d ,Bd )
State feedback
control
Problem formulation

Observability Controllability
Definition
The system is observable iff Pole placement control
Specifications
Integral Control
O(Ad ,Cd ) = rg[Cd Cd Ad . . . Cd An−1
d ]
T
=n Observer
Observation
Observability
Observer design
Duality Observer-based
Observability of (Cd , Ad ) ⇔ Controllability of (ATd , CdT ). control

Introduction to
Controllability of (Ad , Bd ) ⇔ Observability of (BdT , ATd ). optimal control

Introduction to
digital control

Conclusion
State space
About sampling period approach

Olivier Sename

Introduction

Influence of the sampling period on the time response Modelling


Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Impose a maximal time response to a discrete system is equivalent to Observer-based


control
place the poles inside a circle defined by the upper bound of the bound Introduction to
given by this time response. optimal control

The closer to zero the poles are , the faster the system is. Introduction to
digital control

Conclusion
State space
Frequency analysis approach

Olivier Sename

As in the continuous time, the Bode diagram can also be used. Introduction
Example with sampling Time Te = 1s ⇔ fe = 1Hz ⇔ we = 2π): Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation

Note that, in our case, the Bode is cut at the pulse w = π. Observability
Observer design
see SYSD = c2d(SYSC,Ts,METHOD) in MATLAB. Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Frequency analysis approach

Olivier Sename

As in the continuous time, the Bode diagram can also be used. Introduction
Example with sampling Time Te = 1s ⇔ fe = 1Hz ⇔ we = 2π): Modelling
Nonlinear models
Linear models
Linearisation
To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation

Note that, in our case, the Bode is cut at the pulse w = π. Observability
Observer design
see SYSD = c2d(SYSC,Ts,METHOD) in MATLAB. Observer-based
control
Sampling ↔ Limitations Introduction to
optimal control
Recall the Shannon theorem which imposes the sampling frequency at
Introduction to
least 2 times higher than the system maximum frequency. Related to digital control
the anti-aliasing filter. . . Conclusion
State space
About sampling period and robustness approach

Olivier Sename

Introduction

Influence of the sampling period on the poles Modelling


Nonlinear models
In theory, smaller the sampling period Te is, closer the discrete system Linear models

is from the continuous one. Linearisation


To/from transfer
functions

Properties (stability)

State feedback
control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design
But reducing the sampling time modify poles location. . . Poles and
Observer-based
zeros become closer to the limit of the unit circle ⇒ can introduce control

instability (decrease robustness). Introduction to


optimal control
⇒ Sampling influences stability and robustness
Introduction to
⇒ Over sampling increase noise sensitivity digital control

Conclusion
State space
Stability approach

Olivier Sename

Recall Introduction
A linear continuous feedback control system is stable if all poles of the Modelling
closed-loop transfer function T (s) lie in the left half s-plane. Nonlinear models

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


Linear models
Linearisation
To/from transfer
σ Te functions
|z| = e and ∠z = ωTe
Properties (stability)

State feedback
control
Jury criteria Problem formulation
Controllability
The denominator polynomial (den(z) = a0 z n + a1 z n−1 + · · · + an = 0) Definition
Pole placement control
has all its roots inside the unit circle if all the first coefficients of the odd Specifications

row are positive. Integral Control

Observer
an Observation
b0 = a0 − an Observability
1 a0 a1 a2 ... an−k ... an a0 Observer design

2 an an−1 an−2 ... ak ... a0 anObserver-based


b1 = a1 − an−1 control
3 b0 b1 b2 ... bn−1 a0
Introduction to
2 bn−1 bn−2 bn−3 ... b0 anoptimal control
.. .. bk = ak − an−k
. . a0Introduction to
digital control

2n + 1 s0 bn−1
ck = bk − bn−1−k Conclusion
b0
State space
How to get a discrete controller approach

Olivier Sename

Introduction

Modelling
First way Nonlinear models
Linear models
Linearisation
I Obtain a discrete-time plant model (by discretization) To/from transfer
functions
I Design a discrete-time controller Properties (stability)

I Derive the difference equation State feedback


control
Problem formulation
Controllability

Second way Definition


Pole placement control
Specifications
I Design a continuous-time controller Integral Control

I Converse the continuous-time controller to discrete time (c2d) Observer


Observation

I Derive the difference equation Observability


Observer design

Observer-based
Now the question is how to implement the computed controller on a control

real-time (embedded) system, and what are the precautions to take Introduction to
optimal control
before?
Introduction to
digital control

Conclusion
State space
Discretisation approach

Olivier Sename

Introduction

Modelling
The idea behind discretisation of a controller is to translate it from Nonlinear models
Linear models
continuous-time to discrete-time, i.e. Linearisation
To/from transfer
functions
A/D + algorithm + D/A ≈ G(s) Properties (stability)

State feedback
To obtain this, few methods exists that approach the Laplace operator control
(see lecture 1-2). Problem formulation
Controllability
Definition

Recall Pole placement control


Specifications
Integral Control

Observer
z −1
s = Observation

Te Observability
Observer design
z −1
s = Observer-based
zTe control

Introduction to
2 z −1 optimal control
s =
Te z + 1 Introduction to
digital control

Conclusion
State space
Implementation characteristics approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Anti-aliasing Linear models
Linearisation
Practically it is smart to use a constant high sampling frequency with an To/from transfer
functions
analog filter matching this frequency. Then, after the A/D converter, the
Properties (stability)
signal is down-sampled to the frequency used by the controller.
State feedback
Remember that the pre-filter introduce phase shift. control
Problem formulation
Controllability
Sampling frequency choice Definition
Pole placement control
The sampling time for discrete-time control are based on the desired Specifications

speed of the closed loop system. A rule of thumb is that one should Integral Control

sample 4 − 10 times per rise time Tr of the closed loop system. Observer
Observation
Observability
Tr Observer design
Nsample = ≈ 4 − 10
Te Observer-based
control

where Te is the sampling period, and Nsample the number of samples. Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Delay approach

Olivier Sename

Introduction

Modelling
Problematic Nonlinear models
Linear models
Sampled theory assume presence of clock that synchronizes all Linearisation

measurements and control signal. Hence in a computer based control To/from transfer
functions

there always is delays (control delay, computational delay, I/O latency). Properties (stability)

State feedback
Origins control
Problem formulation
There are several reasons for delay apparition Controllability
Definition
I Execution time (code) Pole placement control
Specifications
I Preemption from higher order process Integral Control

Observer
I Interrupt Observation
Observability
I Communication delay Observer design

I Data dependencies Observer-based


control
Hence the control delay is not constant. The delay introduce a phase Introduction to
shift ⇒ Instability! optimal control

Introduction to
digital control

Conclusion
State space
Delay (cont’d) approach

Olivier Sename

Admissible delay (Bode) Introduction

Modelling
I Measure the phase margin: PM = 180 + ϕw0 [ř], where ϕw0 is the Nonlinear models
Linear models
phase at the crossover frequency w0 , i.e. |G(jw0 )| = 1 Linearisation
To/from transfer
PMπ
I Then the delay margin is DM = 180w0 [s]
functions

Properties (stability)

State feedback
Exercise: compute delay margin for these 3 cases control
Problem formulation
Controllability
Definition
Pole placement control
Specifications
Integral Control

Observer
Observation
Observability
Observer design

Observer-based
control

Introduction to
optimal control

Introduction to
digital control

Conclusion
State space
Conclusion approach

Olivier Sename

Introduction

Modelling
Nonlinear models
Linear models
I A state space approach for continuous-time and discrete-time Linearisation

MIMO systems To/from transfer


functions

I A first insight in optimal control... that can be extended towards Properties (stability)

predictive control (over a finite horizon) State feedback


control
I The state space approach is also considered in Robust control, in Problem formulation

order to Controllability
Definition
I design H∞ controllers Pole placement control
I provide a robustness analysis in the presence of parameter Specifications
Integral Control
uncertainties
I prove the stability of a closed-loop system in the presence of non Observer
Observation
linearities (as state or input constraints) Observability
I design non linear controllers (feedback linearisation...) Observer design
I solve an optimisation problem using efficient numerical tools as Linear Observer-based
Matrix Inequalities control

Introduction to
optimal control

Introduction to
digital control

Conclusion