modelling, analysis and control of linear systems using ...o.sename/docs/me_auto.pdf · modelling,...

104
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 Observer design Observer-based control Introduction to optimal control Introduction to digital control Conclusion Modelling, analysis and control of linear systems using state space representations Olivier Sename Grenoble INP / GIPSA-lab February 2018

Upload: letram

Post on 06-Feb-2018

244 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Modelling, analysis and control of linear systems usingstate space representations

Olivier Sename

Grenoble INP / GIPSA-lab

February 2018

Page 2: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

IntroductionModelling of dynamical systems asstate space representations

Nonlinear modelsLinear modelsLinearisationTo/from transfer functions

Properties (stability)State feedback control

Problem formulationControllabilityDefinition of the state feedbackcontrolSynthesis of the state feedbackcontrol: the pole placement control

SpecificationsIntegral Control or how to ensuredisturbance attenuation with astate feedback control?

Observer and output feedback controlObservationA preliminary property:ObservabilityObserver design

Observer-based control

Introduction to optimal control

Introduction to digital control

Conclusion

Page 3: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Introduction

Page 4: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

References

Some interesting books:I K.J. Astrom and B. Wittenmark, Computer-Controlled Systems,

Information and systems sciences series. Prentice Hall, NewJersey, 3rd edition, 1997.

I R.C. Dorf and R.H. Bishop, Modern Control Systems, PrenticeHall, USA, 2005.

I G.C. Goodwin, S.F. Graebe, and M.E. Salgado, Control SystemDesign, Prentice Hall, New Jersey, 2001.

I G. Franklin, J. Powell, A. Emami-Naeini, Feedback Control ofDynamic Systems, Prentice Hall, 2005

Page 5: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

The "control design" process

I Plant study and modellingI Determination of sensors and actuators (measured and controlled

outputs, control inputs)I Performance specificationsI Control design (many methods)I Simulation testsI Implementation, tests and validation

Page 6: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

The "control design" process in CLEAR

Page 7: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

About modelling...

Identification based methodI System excitations using PRBS (Pseudo Random Binary Signal)

or sinusoïdal signalsI Determination of a transfer function reproducing the input/ouput

system behavior

Knowledge-based method:I Represent the system behavior using differential and/or algebraic

equations, based on physical knowledge.I Formulate a nonlinear state-space model, i.e. a matrix differential

equation of order 1.I Determine the steady-state operating point about which to

linearize.I Introduce deviation variables and linearize the model.

Tools: Matlab/Simulink, LMS Imagine.Lab Amesim, Catia-Dymola,ADAMS, MapleSim .....

Page 8: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Simulation of complex system (LMS Imagine.Lab AMESim)

Restricted © Siemens AG 2016

Page 9 Siemens PLM Software

System Simulation for Controller DesignWhat it means and what is required

Simulation of the complete system using an assembly

of components

Components are described with analytical or tabulated

models

Multi-physics / Multi-level approach

Control-oriented actuator models

Description of physical phenomena based on few

“macroscopic” parameters

Models for static and dynamic responses, in time &

frequency domains

Page 9: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Modelling of dynamical systemsas state space representations

Page 10: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Why state space equations ?

I dynamical systems where physical equations can be derived :electrical engineering, mechanical engineering, aerospaceengineering, microsystems, process plants ....

I include physical parameters: easy to use when parameters arechanged for design. Need only for parameter identification orknowledge.

I State variables have physical meaning.I Allow for including non linearities (state constraints, input

saturation)I Easy to extend to Multi-Input Multi-Output (MIMO) systemsI Advanced control design methods are based on state space

equations (reliable numerical optimisation tools)I easy exportation from advanced modelling softwares

Page 11: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Towards state space representation

What is a state space system ?A "matrix-form" representation of the dynamics of an N- orderdifferential equation system into a FIRST order differential equation in avector form of size N, which is called the state.

Definition of a system stateThe state of a dynamical system is the set of variables, known as statevariables, that fully describe the system and its response to any givenset of inputs.Mathematically, the knowledge of the initial values of the state variablesat t0 (namely xi (t0), i = 1, ...,n), together with the knowledge of thesystem inputs for time t ≥ t0, are sufficient to predict the behavior of thefuture system state and output variables (for t ≥ t0).

Page 12: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Definition of a NonLinear dynamical system

Many dynamical systems can be represented by Ordinary DifferentialEquations (ODE).A nonlinear state space model consists in rewritting the physicalequation into a first-order matrix form as{

x(t) = f ((x(t),u(t), t), x(0) = x0

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

where f and g are non linear functions andI x(t) ∈ Rn is referred to as the system state (vector of state

variables),I u(t) ∈ Rm the vector of m control inputs (actuators)I y(t) ∈ Rp the vector of p measured outputs (sensors)I x0 is the initial condition.

Page 13: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Example of a one-tank model

Usually the hydraulic equation is non linear and of the form

SdHdt

= Qe−Qs

where H is the tank height, S the tank surface, Qe the input flow, andQs the output flow defined by Qs = a

√H.

Definition the state space modelThe system is represented by an Ordinary Differential Equation whosesolution depends on H(t0) and Qe. Clearly H is the system state, Qe isthe input, and the system can be represented as:{

x(t) = f (x(t),u(t)), x(0) = x0

y(t) = x(t)(2)

with x = H, f (x ,u) =− aS√

x + 1S u

Page 14: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Example: Underwater Autonomous Vehicle UAV Aster x

Actions: axial propeller to control the velocity in Ox direction and 5independent mobile fins :

I 2 horizontals fins in the front part of the vehicle (β1, β ′1).I 1 vertical fin at the tail of the vehicle (δ ).I 2 fins at the tail of the vehicle (β2, β ′2).

Page 15: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

UAV modelling

Physical model:

M ν = G(ν)ν + D(ν)ν + Γg + Γu (3)

η = Jc(η2)ν (4)

where:- M: mass matrix: real mass of the vehicle augmented by the"water-added-mass" part,- G(ν) : action of Coriolis and centrifugal forces,- D(ν): matrix of hydrodynamics damping coefficients,- Γg : gravity effort and hydrostatic forces,- Jc(η2): referential transform matrix,- Γu : forces and moments due to the vehicle’s actuators.

Page 16: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

UAV state definition

A 12 dimensional state vector : X =[η(6) ν(6)

]T .

I η(6): position in the inertial referential: η =[η1 η2

]T with

η1 =[x y z

]T and η2 =[φ θ ψ

]T . x , y and z are thepositions of the vehicle , and φ , θ and ψ are respectively the roll,pitch and yaw angles.

I ν(6): velocity vector, in the local referential (linked to the vehicle)describing the linear and angular velocities (first derivative of theposition, considering the referential transform: ν =

[ν1 ν2

]T with

ν1 =[u v w

]T and ν2 =[p q r

]T

Page 17: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Exercise: a simple pendulumLet consider the following pendulum

T

l

θ

M

where θ is the angle (assumed to be measured), T the controlledtorque, l the pendulum length, M its mass. Give the dynamicalequations of motion for the pendulum angle (neglecting friction) andwrite the nonlinear state space model.

Page 18: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Definition of linear state space representations

A continuous-time LINEAR state space system is given as :{x(t) = Ax(t) + Bu(t), x(0) = x0

y(t) = Cx(t) + Du(t)(5)

I x(t) ∈ Rn is the system state (vector of state variables),I u(t) ∈ Rm the control inputI y(t) ∈ Rp the measured outputI A, B, C and D are real matrices of appropriate dimensions, e.g.

A = [aij ]i ,j=1:n with n rows and n columnsI x0 is the initial condition.

n is the order of the state space representation.Matlab : ss(A,B,C,D) creates a SS object SYSrepresenting a continuous-time state-space model

Page 19: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

A state space representation of a DC Motor

Assumption: only the speed is measured.The dynamical equations are :

Ri + Ldidt

+ e = u e = Keω

Jdω

dt=−f ω + Γm Γm = Kc i

System of 2 equations of order 1 =⇒ 2 state variables.

A possible choice x =

i

)It gives:

A =

(−f/J Kc/J−Ke/L −R/L

)B =

(0

1/L

)C =

(0 1

)How to extend this definition when: measurement= motor angularposition θ?

Page 20: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Examples: Suspension

Let the following mass-spring-damper system.

where x1 is the relative position (measured), M1 the system mass, k1the spring coefficient, u the force generated by the active damper, andF1 is an external disturbance. Applying the mechanical equationsaround the equilibrium leads to:

M1x1 =−k1x1 + u + F1 (6)

Page 21: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Examples: Suspension cont.

The choice x =

(x1x1

)gives

{x(t) = Ax(t) + Bu(t) + Ed(t)y(t) = Cx(t)

where d = F1 , y = x1 with

A =

(0 1

−k1/M1 0

), B = E =

(0

1/M1

),and C =

(1 0

)

Page 22: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Example : Wind turbine modelling from CAD software

Page 23: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Some important issues

I A complete ADAMS or CATIA model can include 193 DOFs torepresent fully flexible tower, drive-train, and blade components⇒simulation model

I Different operating conditions according to the wind speedI Control objectives: maximize power , enhance damping in the first

drive train torsion mode, design a smooth transition differentmodes

I The control model is obtained by a linearisation of a non linearelectro-mechanical model (done by the software):{

x(t) = Ax(t) + Bu(t) + Ed(t)y(t) = Cx(t)

where x1 = rotor-speed x2 = drive-train torsion spring force, x3=rotational generator speedu = generator torque, d : wind speed

Page 24: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Homework

Let the following quarter car model with active suspension.

zs and zus) are the relative position of thechassis and of the wheel,ms (resp. mus) the mass of the chassis(resp. of the wheel),ks (resp. kt ) the spring coefficient of thesuspension (of the tire),u the active damper force,zr is the road profile.

Choose some state variables and give a state space representation ofthis system

Page 25: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Linearisation: how to get a linear model from a nonlinearone?

The linearisation can be done around an equilibrium point or around aparticular point defined by:{

xeq(t) = f ((xeq(t),ueq(t), t), given xeq(0)

yeq(t) = g((xeq(t),ueq(t), t)(7)

Definingx = x −xeq , u = u−ueq , y = y −yeq

this leads to a linear state space representation of the system, aroundthe equilibrium point: {

˙x(t) = Ax(t) + Bu(t),

y(t) = Cx(t) + Du(t)(8)

with A = ∂ f∂x |x=xeq ,u=ueq , B = ∂ f

∂u |x=xeq ,u=ueq ,

C = ∂g∂x |x=xeq ,u=ueq and D = ∂g

∂u |x=xeq ,u=ueq

Usual caseUsually an equilibrium point satisfies:

0 = f ((xeq(t),ueq(t), t) (9)

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

Page 26: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Are state space representations equivalent to transferfunctions ?

Equivalence transfer function - state space representationConsider a linear system given by:{

x(t) = Ax(t) + Bu(t), x(0) = x0y(t) = Cx(t) + Du(t) (10)

Using the Laplace transform (and assuming zero initial conditionx0 = 0), (10) becomes:

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

Then the transfer function matrix of system (10) is given by

G(s) = C(sIn−A)−1B + D =N(s)

D(s)(11)

Matlab: if SYS is an SS object, then tf(SYS) gives the associatedtransfer matrix. Equivalent to tf(N,D)

Page 27: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Conversion TF to SS

There mainly three cases to be considered

Simple numeratoryu

= G(s) =1

s3 + a1s2 + a2s + a3

Numerator order less than denominator order

yu

= G(s) =b1s2 + b2s + b3

s3 + a1s2 + a2s + a3=

N(s)

D(s)

Numerator equal to denominator order

yu

= G(s) =b0s3 + b1s2 + b2s + b3s3 + a1s2 + a2s + a3

=N(s)

D(s)

Page 28: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Canonical forms

For the strictly proper transfer function:

G(s) =c0 + c1s + . . .+ cn−1sn−1

a0 + a1s + . . .+ an−1sn−1 + sn

a very well-known specific state space representations, referred to asthe controllable canonical form is defined as:

A =

0 1 0 . . . 00 0 1 0 . . ....

......

. . ....

0... 0 1

−a0 −a1 . . . . . . −an−1

, B =

0......01

and

C =[

c0 c1 . . . cn−1].

In Matlab, use canon

Page 29: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

What is a canonical form for a physical system?

It is worth noting that the following state space representation

A =

0 1 0 . . . 00 0 1 0 . . ....

......

. . ....

0... 0 1

−a0 −a1 . . . . . . −an−1

, B =

0......01

with

C =[

1 0 . . . . . . 0]

does correspond to the Nth-order differential equation

dnydtn + an−1

dn−1ydtn−1 + . . .+ a1y + a0y = u

This indeed can be reformulated into N simultaneous first-orderdifferential equations defining the state variables :

x1 = y , ,x2 = y , , . . .xn =dn−1ydtn−1 ,

Page 30: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

How to compute the solution x(t) of a linear system?

This theoretical problem is solved now using simulation tools (asSimulink)

Case of the autonomous equation x(t) = Ax(t)It is the generalization of the scalar case: if y = αy theny(t) = exp(αt)y0.The state x(t) with initial condition x(0) = x0 is then given by

x(t) = eAt x(0) (12)

To get an explicit analytical formula, this requires to compute thefunction eAt , which can be done following one of the 3 methods tocompute eAt :

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

2. Diagonalisation of A

3. Cayley-Hamilton method

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

Page 31: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

How to compute the solution x(t) of a linear system ?(cont..)

General case of system (10)The state x(t), solution of system (10), is given by

x(t) = eAt x(0)︸ ︷︷ ︸free response

+∫ t

0eA(t−τ)Bu(τ)dτ︸ ︷︷ ︸

forced response

(13)

Simulation of state space systemsUse lsim.Example:t = 0:0.01:5; u = sin(t); lsim(sys,u,t)

Page 32: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Properties

Page 33: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Non unicity

Given a transfer function, there exists an infinity of state spacerepresentations (equivalent in terms of input-output behavior). Let{

x(t) = Ax(t) + Bu(t),y(t) = Cx(t) + Du(t) (14)

the transfer matrix being G(s) = C(sIn−A)−1B + D, and consider thechange of variables x = Tz (T being an invertible matrix). Replacingx = Tz in the previous system gives:

T z(t) = ATz(t) + Bu(t) (15)

y(t) = CTz(t) + Du(t) (16)

Hence

z(t) = T−1ATz(t) + T−1Bu(t) (17)

y(t) = CTz(t) + Du(t) (18)

Page 34: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Defining A = T−1AT , B = T−1B and C = CT , the transfer function ofthe previous system is:

G(s) = C(sIn− A)−1B + D (19)

= C T (sIn−T−1AT )−1 T−1 B + D (20)

(21)

Using In = T−1T , we get

G(s) = C T T−1 (sIn−A)−1 T T−1 B + D = G(s) (22)

Exercise: For the quarter-car model, choose:

x1 = zs, x2 = zs, x3 = zs−zus, x4 = zs− zus

and give the equivalent state space representation.

Page 35: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Stability

DefinitionAn equilibrium point xeq is stable if, for all ρ > 0, there exists a η > 0such that:

‖x(0)−xeq‖< η =⇒‖x(t)−xeq‖< ρ,∀t ≥ 0

DefinitionAn equilibrium point xeq is asymptotically stable if it is stable and,there exists η > 0 such that:

‖x(0)−xeq‖< η =⇒ x(t)→ xeq , when t → ∞

These notions are equivalent for linear systems (not for non linearones).

Page 36: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Stability Analysis

The stability of a linear state space system is analyzed through thecharacteristic equation det(sIn−A) = 0.The system poles are then the eigenvalues of the matrix A. It thenfollows:

PropositionA system x(t) = Ax(t), with initial condition x(0) = x0, is stable ifRe(λi ) < 0, ∀i , where λi , ∀i , are the eigenvalues of A.

Using Matlab, if SYS is an SS object then pole(SYS) computes thepoles P of the LTI model SYS. It is equivalent to compute eig(A).

Page 37: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

The Phase PlaneIt consists in plotting the trajectory of the state variables (valid also fornonlinear systems). Trajectories that converge to zero are stable !{

x1(t) = x2(t)x2(t) = −5x1(t)−6x2(t) given x1(0) & x2(0)

Page 38: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

State feedback control

Page 39: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Objective of any control system

In one sentence: shape the response of the system to a givenreference and get (or keep) a stable system in closed-loop, with desiredperformances, while minimising the effects of disturbances andmeasurement noises, and avoiding actuators saturation, this despite ofmodelling uncertainties, parameter changes or change of operatingpoint.Steps to be achieved:Nominal stability (NS): The system is stable with the nominal model

(no model uncertainty)

Nominal Performance (NP): The system satisfies the performancespecifications with the nominal model (no modeluncertainty)

Robust stability (RS): The system is stable for all perturbed plantsabout the nominal model, up to the worst-case modeluncertainty (including the real plant)

Robust performance (RP): The system satisfies the performancespecifications for all perturbed plants about the nominalmodel, up to the worst-case model uncertainty(including the real plant).

Page 40: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

About Feedback control

How to design a controller using a state space representation ?Two classes of controllers do exist (in red those studied in the course):

I Static controllers (output or state feedback)I Dynamic controllers (output feedback or observer-based)

What for ?I Closed-loop stability (of state or output variables)I disturbance rejectionI Model trackingI Input/Output decouplingI Other performance criteria : H2 optimal, H∞ robust...

Page 41: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Why state feedback and not output feedback?

Exercise: G(s) = y(s)u(s) = 1

s2−sFollow the steps below:

1. Define x1 = y , x2 = y . Write the differential equations that thestate variables (x1 , x2) do satisfy. Deduce the state space systemrepresentation, and check that this corresponds to the controllablecanonical form .

2. Case of output feedback= Proportional control :Let us consider u = Kp(yref −y)

I Compute the transfer function of the closed-loop system (with unitaryfeedback), and check that the closed-loop system poles are thosegiven by the roots of the polynomial PBF (s) = s2−s+Kp .

I Can the closed-loop system be stabilized (chosen Kp well)?

3. Case of state feedback : choose u =−x1−3x2 + yrefI From 1., compute the state space representation of the closed-loop

system (replacing u by u =−x1−3x2 +yref ).I What are the poles of the closed-loop system? Is the closed-loop

system stable?I Now, consider u =−f1x1− f2x2 +yref . How can we choose (f1, f2)

such that the closed-loop system is stable ?

4. To conclude, when the closed-loop system is stable, explain whythe second control law is efficient?

Page 42: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

A preliminary property analysis: Controllability

Controllability refers to the ability of controlling a state-space modelusing state feedback.

DefinitionGiven two states x0 and x1, the system (10) is controllable if there existt1 > 0 and a piecewise-continuous control input u(t), t ∈ [0, t1], suchthat x(t) takes the values x0 for t = 0 and x1 for t = t1.

PropositionThe controllability matrix is defined by C = [B,A.B, . . . ,An−1.B]. Thensystem (10) is controllable if and only if rank(C ) = n.If the system is single-input single output (SISO), it is equivalent todet(C ) 6= 0.

Using Matlab, if SYS is an SS object then crtb(SYS) returns thecontrollability matrix of the state-space model SYS with realization(A,B,C,D). This is equivalent to ctrb(sys.a,sys.b)

ExercicesTest the controllability of the previous examples: DC motor, suspension,inverted pendulum.

Page 43: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Definition of the state feedback control

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

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

where F is a m×n real matrix.When the system is SISO, it corresponds to :u(t) =−f1x1− f2x2− . . .− fnxn with F = [f1, f2, . . . , fn].When the system is MIMO we have

u1u2...

um

=

f11 . . . f1n...

...fm1 . . . fmn

x1x2...

xn

Page 44: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

State feedback (2): stabilization

Using state feedback controllers (23), we get in closed-loop (forsimplicity D = 0) {

x(t) = (A−BF )x(t),y(t) = Cx(t) (24)

The stability (and dynamics) of the closed-loop system is then given bythe eigenvalues of A−BF .Indeed, in that case, the solution y(t) = C exp(A−BF )t x0 convergesasymptotically to zero!

But what happens if the closed-loop system must also track areference signal r ?We might select u(t) = r(t)−Fx(t). Therefore the closed-loop transfermatrix is :

y(s)

r(s)= C(sIn−A + BF )−1B (25)

for which the static gain is C(−A + BF )−1B and may differ from 1!!The control law must be completed.

Page 45: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

State feedback (3): complete solution for reference trackingWhen the objective is to track some reference signal r , i.e

y(t)−→t→∞

r(t),

the state feedback control must be of the form:

u(t) =−Fx(t)+Gr(t) (26)

where G is a m×p real matrix to be determined.Then the closed-loop transfer matrix is defined as:

GCL(s) = C(sIn−A + BF )−1BG (27)

Therefore, the following choice for G ensures a unitary steady-stategain for the closed-loop system:

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

F Need to adapt when D 6= 0

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

Page 46: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Implementation in Simulink

Page 47: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

How to synthetize the state feedback control gain F?The pole placement control

Problem definitionGiven a linear system (5), does there exist a state feedback control law(23) such that the closed-loop system poles are in predefined locations(denoted γi , i = 1, ...,n ) in the complex plane ?

PropositionLet a linear system given by A, B, and let γi , i = 1, ...,n , a set ofcomplex elements (i.e. the desired poles of the closed-loop system).There exists a state feedback control u =−Fx such that the poles ofthe closed-loop system are γi , i = 1, ...,n if and only if the pair (A,B) iscontrollable.

In Matlab, use F=acker(A,B,P) or F=place(A,B,P) whereP = [γ1, . . . ,γn] is the set of desired closed-loop poles.

Remarkpredefined locations means that, according to the required closed-loopperformances (settiling time, rise time, overshoot ...), the designer haschosen a set of desired poles for the closed-loop system.

Page 48: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Illustration on the easy case of controllable canonical formsHere we assume that the system state space model is of the form:

A =

0 1 0 . . . 00 0 1 0 . . ....

......

. . ....

0... 0 1

−a0 −a1 . . . . . . −an−1

, B =

0......01

and

C =[

c0 c1 . . . cn−1],

corresponding to the transfer function:

G(s) =c0 + c1s + . . .+ cn−1sn−1

a0 + a1s + . . .+ an−1sn−1 + sn

Let F = [ f1 f2 . . . fn ]Then

A−BF =

0 1 0 . . . 00 0 1 0 . . ....

......

. . ....

0... 0 1

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

(29)

Page 49: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

the case of controllable canonical forms (cont..)

From the specifications of the predefined closed-loop system poleslocations, {γi}, i = 1,n., the desired closed-loop characteristicpolynomial (denominator of the closed-loop transfer function) is givenas:

(s− γ1)(s− γ2)...(s− γn)

and can be developed as:

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

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

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

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

Remarkthe case of controllable canonical forms is very important since , whenwe consider a general state space representation, it is first necessary touse a change of basis to make the system under canonical form, whichwill simplify a lot the computation of the state feedback control gain F .

Page 50: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

How to specificy the desired closed-loop performances?The required closed-loop performances should be chosen in thefollowing zone

which ensures a damping greater than ξ = sinφ .−γ implies that the real part of the CL poles are sufficiently negatives(so fast enough).

Page 51: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Specifications (2)

Some useful rules for selection the desired pole/zero locations (for asecond order system):

I Rise time : tr ' 1.8ωn

I Seetling time : ts ' 4.6ξ ωn

I Overshoot Mp = exp(−πξ/sqrt(1−ξ 2)):ξ = 0.3⇔Mp = 35%,ξ = 0.5⇔Mp = 16%,ξ = 0.7⇔Mp = 5%.

Page 52: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Specifications(3)Some rules do exist to shape the transient response. The ITAE (Integralof Time multiplying the Absolute value of the Error), defined as:

ITAE =∫

0t |e(t)|dt

can be used to specify a dynamic response with relatively smallovershoot and relatively little oscillation (there exist other methods to doso). The optimum coefficients for the ITAE criteria are given below (seeDorf & Bishop 2005).

Order Characteristic polynomials dk (s)1 d1 = [s + ωn]

2 d2 = [s2 + 1.4ωns + ω2n ]

3 d3 = [s3 + 1.75ωns2 + 2.15ω2n s + ω3

n ]

4 d4 = [s4 + 2.1ωns3 + 3.4ω2n s2 + 2.7ω3

n s + ω4n ]

5 d5 = [s5 + 2.8ωns4 + 5ω2n s3 + 5.5ω3

n s2 + 3.4ω4n s + ω5

n ]

6 d6 = [s6 + 3.25ωns5 + 6.6ω2n s4 + 8.6ω3

n s3 + 7.45ω4n s2 + 3.95ω5

n s + ω6n ]

and the corresponding transfer function is of the form:

Hk (s) =ωk

ndk (s)

, ∀k = 1, ...,6

Page 53: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Specifications(4): responses of the optimum ITAEHk (s)∀k = 1, ...,6

Page 54: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Integral Control or how to ensure disturbance attenuationwith a state feedback control?

Let us consider the system:{x(t) = Ax(t) + Bu(t)+Ed(t), x(0) = x0

y(t) = Cx(t)(30)

where d is the disturbance.

Control objectivesWe wish to keep y following a reference signal r even in the presenceof d , which means

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

r(t),

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

0,

BUTA state feedback controller may not allow to reject the effects ofdisturbances (particularly of input disturbances)!!

Page 55: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Formulation of the Integral ControlWithout integralLet consider the state feedback control u(t) =−Fx(t) + Gr(t) for thesystem {

x(t) = Ax(t) + Bu(t) + Ed(t), x(0) = x0y(t) = Cx(t) (31)

The tracking and disturbance rejection objectives can be formulated asI y

r −−−→t→∞1 ? i.e. C(−A + BF )−1BG = 1 ?

I yd −−−→t→∞

0? i.e. C(−A + BF )−1BE = 0 ?

However, there are few chances to find F and G such that bothobjectives, together with the pole placement one, are achieved!

A solution to solve both problems: add and integral termA very useful method consists in adding an integral term (as usual onthe tracking error) to ensure a unitary static closed-loop gain. Thereforethe control law is chosen as:

u(t) =−Fx(t)−H∫ t

0(r(τ)−y(τ))dτ

Now the question is: how to find H? (and F too since a single designprocedure is better in order to get a solution)

Page 56: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Synthesis of the Integral Control

The state space methodIt consists in first extending the system by introducing the new statevariable:

z(t) = r(t)−y(t)

which leads, for the whole system, to define the extended state vector[xz

].

Then the new open-loop state space representation is given as:

[x(t)z(t)

]=

[A 0−C 0

][xz

]+

[01

]u(t) +

[B0

]r(t) +

[E0

]d(t)

y(t) =[

C 0][ x

z

]

Let us denote:

Ae =

[A 0−C 0

], Be =

[B0

], Ce =

[C 0

]

Page 57: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

The new state feedback control is now defined as:

u(t) =−[F H]

[xz

]=−Fx(t)−Hz(t)

Then the synthesis of the control law u(t) (i.e of Fe = [F H]) requires:I the verification of the extended system controllability, i.e of (Ae,Be)

I the specification of the desired closed-loop performances, i.e. aset Pe of n + 1 desired closed-loop poles has to be chosen,

I the computation of the full state feedback Fe usingFe=acker(Ae,Be,Pe)

We then get the closed-loop system[x(t)z(t)

]=

[A−BF BH−C 0

][xz

]+

[01

]r(t) +

[E0

]d(t)

y(t) =[

C 0][ x

z

]

Page 58: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Integral control scheme

The complete structure has the following form:

When an observer is to be used (see next chapter), the control actionsimply becomes:

u(t) =−Fx(t)−Hz(t)

Page 59: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Observer and output feedbackcontrol

Page 60: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Introduction

A first insightTo implement a state feedback control, the measurement of all the statevariables is necessary. If this is not available, we will use a stateestimation through a so-called Observer.

Observation or EstimationThe estimation theory is based on the famous Kalman contribution tofiltering problems (1960), and accounts for noise induced problems.The observation theory has been developed for Linear Systems byLuenberger (1971), and doe snot consider the noise effects.

Other interest of observation/estimationIn practice the use of sensors is often limited for several reasons:feasibility, cost, reliability, maintenance ...An observer is a key issue to estimate unknown variables (then nonmeasured variables) and to propose a so-called virtual sensor.

Objective: Develop a dynamical system whose state x(t) satisfies:I (x(t)− x(t))−−−→

t→∞0

I (x(t)− x(t))→ 0 as fast as possible

Page 61: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

How to simply (bad) compute x(t) ?

Let consider {x(t) = Ax(t) + Bu(t), x(0) = x0

y(t) = Cx(t)(32)

Knowing that:

y(t) = Cx(t)y(t) = CAx(t)+CBu(t)

y(t) = CA2x(t)+CABu(t)+CBu(t). . . = . . .

yn−1(t) = CAn−1 + . . .

and given that we know the measurement, the inputs (and the systemmatrices), we can just perform some few computation to compute x(t)as:

x(t) =

C

CA...

CAn−1

−1

y(t)y(t)

...yn−1(t)

−F (u(t), u(t), . . . ,un−2(t))

This

requires the system to be observable (but still cannot work in practicewhen faced to measurement noises, modelling errors ....)

Page 62: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

A preliminary property: Observability

Observability refers to the ability to estimate a state variable (often notmeasured !!).

DefinitionA linear system (5) is completely observable if, given the control andthe output over the interval t0 ≤ t ≤ T , one can determine any initialstate x(t0).It is equivalent to characterize the non-observability as :A state x(t) is not observable if the corresponding output vanishes, i.e.if the following holds: y(t) = y(t) = y(t) = . . . = 0

Proposition

The observability matrix is defined by O =

C

CA...

CAn−1

. Then system

(10) is observable if and only if rank(O) = n.If the system is single-input single output (SISO), it is equivalent todet(O) 6= 0.

Page 63: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Observability cont.Using Matlab, if SYS is an SS object then obsv(SYS) returns theobservability matrix of the state-space model SYS with realization(A,B,C,D). This is equivalent to OBSV(sys.a,sys.c).

Where does observability come from ?Compare the transfer function of the two different systems*

x = −x + u

y = 2x

and

x =

[−1 00 −2

]x +

[11

]u

y =[

2 0]x

ExercicesTest the observability of the previous examples: DC motor, suspension,inverted pendulum.Analysis of different cases, according to the considered number ofsensors.

Page 64: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Open loop (OL) observers: estimation from input data

Such a method, consists in performing, in real-time (embeddedcomputer), a simulation of the system model feeded by the known inputvariables.For a linear system, it means that we may define the OL observer as:{

˙x(t) = Ax(t) + Bu(t), given x(0)

y(t) = Cx(t) + Du(t)(33)

x(t) ∈ Rn is the estimated state of x(t).Now, IF x(0) = x(0), then x(t) = x(t),∀t ≥ 0.

BUTI x(0) is UNKNOWN so we cannot choose x(0) = x(0),I the estimation error (e = x − x) satisfies e(t) = Ae(t) (could be

unstable AND cannot be modified)I the effects of disturbance and noise cannot be mitigated

NEED FOR A FEEDBACK FROM MEASURED OUTPUTS TOCORRECT THE ESTIMATION ON LINE!

Page 65: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Closed-loop Observer: estimation from input AND outputdata

Objective: since y is KNOWN (measured) and is function of the statevariables, use an on line comparison of the measured system output yand the estimated output y .Observer description:

˙x(t) = Ax(t) + Bu(t) + L(y(t)− y(t))︸ ︷︷ ︸Correction

y(t) = Cx(t) + Du(t)(34)

with x0 to be defined, and where x(t) ∈ Rn is the estimated state of x(t)and L is the n×p constant observer gain matrix to be designed.

Page 66: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Analysis of the observer properties

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

e(t) = (A−LC)e(t) (35)

If L is designed such that A−LC is stable, then x(t) convergesasymptotically towards x(t).

Proposition(34) is an observer for system (5) if and only if the pair (C,A) isobservable, i.e.

rank(O) = n

where O =

C

CA...

CAn−1

.

Page 67: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Observer designThe observer design is restricted to find L such that A−LC is stable (sothat (x(t)− x(t))−−−→

t→∞0) and has some desired eigenvalues (so that

(x(t)− x(t))→ 0 as fast as possible). This is still a pole placementproblem.

SpecificationsUsually the observer poles are chosen around 5 to 10 times higher thanthe closed-loop system, so that the state estimation is good as early aspossible. This is quite important to avoid that the observer makes theclosed-loop system slower.

Design method

I In order to use the acker Matlab function, we will use the dualityproperty between observability and controllability, i.e. :(C,A) observable⇔ (AT ,CT ) controllable.

I Then there exists LT such that the eigenvalues of AT −CT LT canbe randomly chosen. As (A−LC)T = AT −CT LT then L existssuch that A−LC is stable.

I Matlab : use L=acker(A’,C’,Po)’ where Po is theset of desired observer poles.

Page 68: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Theoretical validation scheme using Simulink

Written below for D = 0.

Page 69: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

About the robustness of the observer

Let assume that the systems is indeed given by{x(t) = Ax(t) + Bu(t) + Edx (t), x(0) = x0

y(t) = Cx(t) + Nν(t)(36)

where dx can represent input disturbance or modelling error, and ν

stands for measurement noise.Then the estimated error satisfies:

e(t) = (A−LC)e(t) + Edx −LNν (37)

Therefore the presence of dx or dy may lead to non zero estimationerrors due to bias or variations. Then do not forget that you can:

I Provide an analysis of the observer performances/robustness dueto dx or ν (see later)

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

Page 70: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Implementation

RulesI use a state-space block in SimulinkI enter ’formal’ matrices ’A’=A-LC,’B’=[B L],’C’= eye(n), ’D’= zeros(n,m))

I Choose x(0) 6= x(0),

I alternative use of estim

Page 71: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Observer-based control

Page 72: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Observer-based control

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

u(t) =−Fx(t) + Gr(t) (38)

The closed-loop system is then{x(t) = (A−BF )x(t) + BF (x(t)− x(t)),y(t) = Cx(t) (39)

Therefore the fact that x(0) 6= x(0) will have an impact on theclosed-loop system behavior.The stability analysis of the closed-loop system with an observer-basedstate feedback control needs to consider an extended state vector as:

xe(t) =[

x(t) e(t)]T

Page 73: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Observer-based control: stability analysis

Definingxe(t) =

[x(t) e(t)

]TThe closed-loop system with observer (34) and control (38) is:

xe(t) =

[A−BF BF

0 A−LC

]xe(t) +

[BG0

]r(t) (40)

The characteristic polynomial of the extended system is:

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

If the observer and the control are designed separately then theclosed-loop system with the dynamic measurement feedback is stable,given that the control and observer systems are stable and theeigenvalues of (40) can be obtained directly from them.This corresponds to the so-called separation principle.

Remark: check pzmap of the extended closed-loop system.

Page 74: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Closed-loop analysis

The closed-loop system from r to y is then computed from:

y = [C 0][

x(t) e(t)]T

which leads toyr

= C(sIn−A + BF )BG

However if some disturbance acts as for:{x(t) = Ax(t) + Bu(t) + Ed(t), x(0) = x0

y(t) = Cx(t)(41)

where d is the disturbance, then the extended system writes

xe(t) =

[A−BF BF

0 A−LC

]xe(t) +

[BG0

]r(t) +

[EE

]d(t) (42)

which is a problem for the performances of closed-loop system and ofthe estimation (see later the Integral control).

Page 75: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

How to define the observer+state feedback control as a"usual" controller?

The observer-based controller is nothing else than a 2-DOF DynamicOutput Feedback controller.Indeed it comes from{

˙x(t) = Ax(t) + Bu(t) + L(y(t)− y(t))u(t) = −Fx(t) + Gr(t)

(43)

which can be written as (when D = 0){˙x(t) = (A−BF −LC)x(t) + BGr(t) + Ly(t)u(t) = −Fx(t) + Gr(t)

(44)

We then can write:

U(s) = Kr (s)R(s)−Ky (s)Y (s)

with Kr (s) = G−F (sIn−A + BF + LC)−1BG andKy (s) = F (sIn−A + BF + LC)−1L

Page 76: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Introduction to optimal control

Page 77: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Introduction

The objective of an optimal control is to minimize a cost function whichpenalizes simultaneously the state and input behaviors, of the form∫

0 L(x ,y)dt , i.e to reach a tradeoff between the transient response andthe control effort.This objective is defined through the following criteria alwaysconsidered in the quadratic form:

J =∫

0(xT Qx + uT Ru)dt

In that form:I xT Qx is the state cost,I uT Ru is the control cost,I Q and R are respectively the state and cost penalties.

It can be proved that the state feedback control that minimizes J inclosed-loop (given Q and R) is obtained solving an Algebraic RiccatiEquation (ARE)

Page 78: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Linear-Quadratic Regulator (LQR) design

LQR problem solutionGiven a linear system x(t) = Ax(t) + Bu(t), with (A,B) stabilizable, andgiven positive definite matrices Q = QT > 0 and R = RT > 0, if thereexists P = PT > 0 s.t:

AT P + PA−PBR−1BT P + Q = 0

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

K = R−1BT P

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

This problem is handled in Matlab through the lqr command.

Page 79: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Introduction to digital control

Page 80: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Toward digital control

Digital controlUsually controllers are implemented in a digital computer as:

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

Page 81: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Definition of the Z-Transform

Mathematical definitionBecause the output of the ideal sampler, x∗(t), is a series of impulseswith values x(kTe), we have:

x∗(t) =∞

∑k=0

x(kTe)δ (t−kTe)

by using the Laplace transform,

L [x∗(t)] =∞

∑k=0

x(kTe)e−ksTe

Noting z = esTe , we can derive the so called Z-Transform

X (z) = Z [x(k)] =∞

∑k=0

x(k)z−k

Page 82: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Properties

Definition

X (z) = Z [x(k)] =∞

∑k=0

x(k)z−k

Properties

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

Z [x(k −n)] = z−nZ [x(k)]

Z [kx(k)] = −zddz

Z [x(k)]

Z [x(k)∗y(k)] = X (z).Y (z)

limk→∞

x(k) = lim1→z−1

(z−1)X (z)

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

Page 83: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Zero order holder

Sampler and Zero order holderA sampler is a switch that close every Te seconds.A Zero order holder holds the signal x for Te seconds to get h as:

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

Page 84: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Zero order holder (cont’d)

Model of the Zero order holderThe transfer function of the zero-order holder is given by:

GBOZ (s) =1s− e−sTe

s

=1−e−sTe

s

Influence of the D/A and A/DNote that the precision is also limited by the available precision of theconverters (either A/D or D/A).This error is also called the amplitude quantization error.

Page 85: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Representation of the discrete linear systems

The discrete output of a system can be expressed as:

y(k) =∞

∑n=0

h(k −n)u(n)

hence, applying the Z-transform leads to

Y (z) = Z [h(k)]U(z) = H(z)U(z)

H(z) =b0 + b1z + · · ·+ bmzm

a0 + a1z + · · ·+ anzn =YU

where n (≥m) is the order of the systemCorresponding difference equation:

y(k) =1an

[b0u(k −n) + b1u(k −n + 1) + · · ·+ bmu(k −n + m)

− a0y(k −n)−a2y(k −n + 1)−·· ·−an−1y(k −1)]

Page 86: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Some useful transformations

x(t) X(s) X(z)δ(t) 1 1

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

u(t) 1s

zz−1

t 1s2

zTe(z−1)2

e−at 1s+a

zz−e−aTe

1−e−at 1s(s+a)

z(1−e−aTe )

(z−1)(z−e−aTe )

sin(ωt) ω

s2+ω2zsin(ωTe)

z2−2zcos(ωTe)+1

cos(ωt) ss2+ω2

z(z−cos(ωTe))

z2−2zcos(ωTe)+1

Page 87: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Poles, Zeros and Stability

Equivalence {s}↔ {z}The equivalence between the Laplace domain and the Z domain isobtained by the following transformation:

z = esTe

Two poles with a imaginary part witch differs of 2π/Te give the samepole in Z.

Stability domain

Page 88: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Approximations for discretization

Forward difference (Rectangle inferior)

s =z−1Te

Backward difference (Rectangle superior)

s =z−1zTe

Page 89: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Approximations for discretization (cont’d)

Trapezoidal difference (Tustin)

s =2

Te

z−1z + 1

Page 90: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Systems definition

A discrete-time state space system is as follows:{x((k + 1)h) = Ad x(kh) + Bd u(kh), x(0) = x0

y(kh) = Cd x(kh) + Dd u(kh)(45)

where h is the sampling period.Matlab : ss(Ad,Bd,Cd,Dd,h) creates a SS object SYSrepresenting a discrete-time state-space modelFrom a discretization step (c2d) we have:

Ad = exp(Ah), Bd = (∫ h

0exp(Aτ)dτ)B

For discrete-time systems,{x((k + 1)h) = Ad x(kh) + Bd u(kh), x(0) = x0y(kh) = Cd x(kh) + Dd u(kh)

(46)

the discrete transfer function is given by

G(z) = Cd (zIn−Ad )−1Bd + Dd (47)

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

Page 91: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Solution of state space equations - discrete case

The state xk , solution of system xk+1 = Ad xk with initial condition x0, isgiven by

x1 = Ad x0 (48)

x2 = A2d x0 (49)

xn = And x0 (50)

The state xk , solution of system (45), is given by

x1 = Ad x0 + Bd u0 (51)

x2 = A2d x0 + Ad Bd u0 + Bd u1 (52)

xn = And x0 +

n−1

∑i=0

An−1−id Bd ui (53)

Page 92: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

State space analysis (discrete-time systems)

StabilityA system (state space representation) is stable iff all the eigenvalues ofthe matrix F are inside the unit circle.

Controllability definition

DefinitionGiven two states x0 and x1, the system (45) is controllable if there existK1 > 0 and a sequence of control samples u0,u1, . . . ,uK1 , such that xktakes the values x0 for k = 0 and x1 for k = K1.

Observability definition

DefinitionThe system (45) is said to be completely observable if every initial statex(0) can be determined from the observation of y(k) over a finitenumber of sampling periods.

Page 93: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

State space analysis (2)

ControllabilityThe system is controllable iff

Cd(Ad ,Bd )= rg[Bd Ad Bd . . .A

n−1d Bd ] = n

ObservabilityThe system is observable iff

O(Ad ,Cd ) = rg[Cd Cd Ad . . .Cd An−1d ]T = n

DualityObservability of (Cd ,Ad )⇔ Controllability of (AT

d ,CTd ).

Controllability of (Ad ,Bd )⇔ Observability of (BTd ,AT

d ).

Page 94: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

About sampling period

Influence of the sampling period on the time response

Impose a maximal time response to a discrete system is equivalent toplace the poles inside a circle defined by the upper bound of the boundgiven by this time response.The closer to zero the poles are , the faster the system is.

Page 95: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Frequency analysis

As in the continuous time, the Bode diagram can also be used.Example with sampling Time Te = 1s⇔ fe = 1Hz⇔ we = 2π):

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

Sampling↔ LimitationsRecall the Shannon theorem which imposes the sampling frequency atleast 2 times higher than the system maximum frequency. Related tothe anti-aliasing filter. . .

Page 96: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Frequency analysis

As in the continuous time, the Bode diagram can also be used.Example with sampling Time Te = 1s⇔ fe = 1Hz⇔ we = 2π):

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

Sampling↔ LimitationsRecall the Shannon theorem which imposes the sampling frequency atleast 2 times higher than the system maximum frequency. Related tothe anti-aliasing filter. . .

Page 97: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

About sampling period and robustness

Influence of the sampling period on the polesIn theory, smaller the sampling period Te is, closer the discrete systemis from the continuous one.

But reducing the sampling time modify poles location. . . Poles andzeros become closer to the limit of the unit circle⇒ can introduceinstability (decrease robustness).⇒ Sampling influences stability and robustness⇒ Over sampling increase noise sensitivity

Page 98: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Stability

RecallA linear continuous feedback control system is stable if all poles of theclosed-loop transfer function T (s) lie in the left half s-plane.The Z-plane is related to the S-plane by z = e−sTe = e(σ+jω)Te . Hence

|z|= eσTe and ∠z = ωTe

Jury criteriaThe denominator polynomial (den(z) = a0zn + a1zn−1 + · · ·+ an = 0)has all its roots inside the unit circle if all the first coefficients of the oddrow are positive.

1 a0 a1 a2 . . . an−k . . . an2 an an−1 an−2 . . . ak . . . a03 b0 b1 b2 . . . bn−12 bn−1 bn−2 bn−3 . . . b0...

...2n + 1 s0

b0 = a0−anan

a0

b1 = a1−an−1an

a0

bk = ak −an−kan

a0

ck = bk −bn−1−kbn−1b0

Page 99: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

How to get a discrete controller

First way

I Obtain a discrete-time plant model (by discretization)I Design a discrete-time controllerI Derive the difference equation

Second way

I Design a continuous-time controllerI Converse the continuous-time controller to discrete time (c2d)I Derive the difference equation

Now the question is how to implement the computed controller on areal-time (embedded) system, and what are the precautions to takebefore?

Page 100: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Discretisation

The idea behind discretisation of a controller is to translate it fromcontinuous-time to discrete-time, i.e.

A/D + algorithm + D/A≈G(s)

To obtain this, few methods exists that approach the Laplace operator(see lecture 1-2).

Recall

s =z−1Te

s =z−1zTe

s =2

Te

z−1z + 1

Page 101: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Implementation characteristics

Anti-aliasingPractically it is smart to use a constant high sampling frequency with ananalog filter matching this frequency. Then, after the A/D converter, thesignal is down-sampled to the frequency used by the controller.Remember that the pre-filter introduce phase shift.

Sampling frequency choiceThe sampling time for discrete-time control are based on the desiredspeed of the closed loop system. A rule of thumb is that one shouldsample 4−10 times per rise time Tr of the closed loop system.

Nsample =Tr

Te≈ 4−10

where Te is the sampling period, and Nsample the number of samples.

Page 102: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Delay

ProblematicSampled theory assume presence of clock that synchronizes allmeasurements and control signal. Hence in a computer based controlthere always is delays (control delay, computational delay, I/O latency).

OriginsThere are several reasons for delay apparition

I Execution time (code)I Preemption from higher order processI InterruptI Communication delayI Data dependencies

Hence the control delay is not constant. The delay introduce a phaseshift⇒ Instability!

Page 103: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Delay (cont’d)

Admissible delay (Bode)

I Measure the phase margin: PM = 180 + ϕw0 [r], where ϕw0 is thephase at the crossover frequency w0, i.e. |G(jw0)|= 1

I Then the delay margin is DM = PMπ

180w0[s]

Exercise: compute delay margin for these 3 cases

Page 104: Modelling, analysis and control of linear systems using ...o.sename/docs/ME_auto.pdf · Modelling, analysis and control of linear systems ... LMS Imagine.Lab Amesim, Catia-Dymola,

State spaceapproach

Olivier Sename

Introduction

ModellingNonlinear models

Linear models

Linearisation

To/from transferfunctions

Properties (stability)

State feedbackcontrolProblem formulation

Controllability

Definition

Pole placement control

Specifications

Integral Control

ObserverObservation

Observability

Observer design

Observer-basedcontrol

Introduction tooptimal control

Introduction todigital control

Conclusion

Conclusion

I A state space approach for continuous-time and discrete-timeMIMO systems

I A first insight in optimal control... that can be extended towardspredictive control (over a finite horizon)

I The state space approach is also considered in Robust control, inorder to

I design H∞ controllersI provide a robustness analysis in the presence of parameter

uncertaintiesI prove the stability of a closed-loop system in the presence of non

linearities (as state or input constraints)I design non linear controllers (feedback linearisation...)I solve an optimisation problem using efficient numerical tools as Linear

Matrix Inequalities