modelling, analysis and control of linear systems using state...

81
Modelling, analysis and control of linear systems using state space representations (part 1) Olivier Sename Grenoble INP / GIPSA-lab www.gipsa-lab.grenoble-inp.fr/o.sename/ 2020 Olivier Sename State space approach 2020 1 / 80

Upload: others

Post on 10-Mar-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling, analysis and control of linear systems using state spacerepresentations (part 1)

Olivier Sename

Grenoble INP / GIPSA-labwww.gipsa-lab.grenoble-inp.fr/∼o.sename/

2020

Olivier Sename State space approach 2020 1 / 80

Page 2: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

1 Introduction2 Modelling of dynamical systems as

state space representationsNonlinear modelsLinear modelsLinearisationDiscrete-time state spacerepresentations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation -Time response

The discrete-time caseThe continuous-time caseDiscretization of continuous-timestate space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Most of the course is developed for continuous-time systems.It is easily extended to discrete-time systems (when needed the specificdefinitions/developements) for discrete-time systems are explained too.

Olivier Sename State space approach 2020 2 / 80

Page 3: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Introduction

Introduction

Olivier Sename State space approach 2020 3 / 80

Page 4: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Introduction

References

Some interesting books:• R.C. Dorf and R.H. Bishop, Modern Control Systems, Prentice Hall, USA, 2005.• G.C. Goodwin, S.F. Graebe, and M.E. Salgado, Control System Design, Prentice

Hall, New Jersey, 2001.• G. Franklin, J. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems,

Prentice Hall, 2005• K.J. Astrom and B. Wittenmark, Computer-Controlled Systems, Information and

systems sciences series. Prentice Hall, New Jersey, 3rd edition, 1997.

Olivier Sename State space approach 2020 4 / 80

Page 5: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Introduction

The "control design" process

• Plant study and modelling• Determination of sensors and actuators (measured and controlled outputs, control

inputs)• Performance specifications (objectives, constraints ...)• Control design (many methods)• Simulation tests• Real-time implementation, tests and validation

Olivier Sename State space approach 2020 5 / 80

Page 6: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Introduction

The "control design" process in CLEAR

Olivier Sename State space approach 2020 6 / 80

Page 7: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Introduction

Some "mechanical engineering" examples

Mechanics

Vehicle Dynamics Control (braking, steering, suspension), Flight control, Trajectoryplanning and control, Vibration control, Position control (servo-valves, satellites...),

Thermodynamics

Engine control, Propulsion systems (jet engines), Air pressure and temperature control,Power systems (fuel-cell, battery...)

Domains

Aerospace, Automotive, Trains, Energy, Robotics, Acoustics, Nanotechnology

Olivier Sename State space approach 2020 7 / 80

Page 8: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling

Modelling of dynamical systems as statespace representations

Olivier Sename State space approach 2020 8 / 80

Page 9: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 9 / 80

Page 10: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling

About modelling...

Identification based method (data-driven)• System excitations using PRBS (Pseudo Random Binary Signal) or sinusoïdal

signals• Determination of a transfer function or state-space model reproducing the

input/ouput system behavior

Knowledge-based method:• Represent the system behavior using differential and/or algebraic equations,

based on physical knowledge.• Formulate a nonlinear state-space model, i.e. a matrix differential equation of

order 1.• Determine the steady-state operating point about which to linearize.• Introduce deviation variables and linearize the model.

Tools: Matlab/Simulink, Siemens Simcenter Amesim, Catia-Dymola, ADAMS,MapleSim .....

Olivier Sename State space approach 2020 10 / 80

Page 11: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling

Simulation of complex system (Siemens Simcenter 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

Olivier Sename State space approach 2020 11 / 80

Page 12: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling

Simulation of complex system (Siemens Simcenter Amesim)

Olivier Sename State space approach 2020 11 / 80

Page 13: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling

Why state space equations ?

• dynamical systems where physical equations can be derived : electricalengineering, mechanical engineering, aerospace engineering, microsystems,process plants ....

• include physical parameters: easy to use when parameters are changed fordesign. Need only for parameter identification or knowledge.

• State variables have physical meaning.• Allow for including non linearities (state constraints, input saturation)• Easy to extend to Multi-Input Multi-Output (MIMO) systems• Advanced control design methods are based on state space equations (reliable

numerical optimisation tools)• easy exportation from advanced modelling softwares

Olivier Sename State space approach 2020 12 / 80

Page 14: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling

Towards state space representation

What is a state space system ?

A "matrix-form" representation of the dynamics of an N- order differential equationsystem into a FIRST order differential equation in a vector form of size N, which iscalled the state.

Definition of a system state

The state of a dynamical system is the set of variables, known as state variables, thatfully describe the system and its response to any given set of inputs.Mathematically, the knowledge of the initial values of the state variables at t0 (namelyxi(t0), i = 1, ...,n), together with the knowledge of the system inputs for time t ≥ t0, aresufficient to predict the behavior of the future system state and output variables (fort ≥ t0).

Olivier Sename State space approach 2020 13 / 80

Page 15: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Nonlinear models

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 14 / 80

Page 16: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Nonlinear models

Definition of a NonLinear dynamical system

Many dynamical systems can be represented by Ordinary Differential Equations (ODE).A nonlinear state space model consists in rewritting the physical equation into afirst-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 matrix functions and• x(t) ∈ Rn is referred to as the system state (vector of state variables),• u(t) ∈ Rm the vector of m control inputs (actuators)• y(t) ∈ Rp the vector of p measured outputs (sensors)• x0 is the initial condition.

Objective: rewrite the set of differential equations in the form (1), and then give thematrix functions f and g.

Olivier Sename State space approach 2020 15 / 80

Page 17: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Nonlinear models

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, and Qs the output flowdefined by Qs = a

√H.

Definition the state space model

The system is represented by an Ordinary Differential Equation whose solutiondepends on H(t0) and Qe(t). Clearly H is the system state, Qe is the input, and thesystem 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

Olivier Sename State space approach 2020 16 / 80

Page 18: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Nonlinear models

Example: Underwater Autonomous Vehicle UAV Asterx

Actions: axial propeller to control the velocity in Ox direction and 5 independent mobilefins :• 2 horizontals fins in the front part of the vehicle (β1, β ′1).• 1 vertical fin at the tail of the vehicle (δ ).• 2 fins at the tail of the vehicle (β2, β ′2).

Olivier Sename State space approach 2020 17 / 80

Page 19: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Nonlinear models

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.

Olivier Sename State space approach 2020 18 / 80

Page 20: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Nonlinear models

UAV state definition

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

]T .

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

]T with η1 =[x y z

]T andη2 =

[φ θ ψ

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

• ν(6): velocity vector, in the local referential (linked to the vehicle) describing thelinear and angular velocities (first derivative of the position, considering thereferential transform: ν =

[ν1 ν2

]T with ν1 =[u v w

]T and ν2 =[p q r

]T

Olivier Sename State space approach 2020 19 / 80

Page 21: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Nonlinear models

Exercise: a simple pendulum

Let consider the following pendulum

T

l

θ

M

θ is the angle (assumed to be measured),T the controlled torque, l the pendulumlength, M its mass.Give the dynamical equations of motion forthe pendulum angle (neglecting friction) andwrite the nonlinear state space model.

Olivier Sename State space approach 2020 20 / 80

Page 22: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 21 / 80

Page 23: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

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)

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

A = [ai j]i, j=1:n with n rows and n columns• x0 is the initial condition.

n is the order of the state space representation.This is refered to as an Linear Time-Invariant (LTI) system.Matlab : ss(A,B,C,D) creates a SS object SYS representing acontinuous-time state-space model

Olivier Sename State space approach 2020 22 / 80

Page 24: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

A state space representation of a DC Motor

The dynamical equations are :

Ri+Ldidt

+ e = u e = Keω

Jdω

dt=− f ω +Γm Γm = Kci

Assumption: only the speed is measured.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 =

(1 0

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

Olivier Sename State space approach 2020 23 / 80

Page 25: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

What happens when there is an additional disturbance input ?

Let the following mass-spring-damper system (a quarter-car suspension model).

where x1 is the relative position (measured), M1 the system mass, k1 the springcoefficient, u the force generated by the active damper, and F1 is an externaldisturbance. Applying the mechanical equations around the equilibrium leads to:

M1x1 =−k1x1 +u+F1 (6)

Olivier Sename State space approach 2020 24 / 80

Page 26: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

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

)

Olivier Sename State space approach 2020 25 / 80

Page 27: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

Example : Wind turbine modelling from CAD software

Olivier Sename State space approach 2020 26 / 80

Page 28: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

Some important issues

• A complete ADAMS or CATIA model can include 193 DOFs to represent fullyflexible tower, drive-train, and blade components⇒ simulation model

• Different operating conditions according to the wind speed• Control objectives: maximize power , enhance damping in the first drive train

torsion mode, design a smooth transition different modes• The control model is obtained by a linearisation of a non linear electro-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= rotationalgenerator speedu = generator torque, d : wind speed

Olivier Sename State space approach 2020 27 / 80

Page 29: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linear models

Homework

Let the following quarter car model with active suspension.

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

Choose some state variables and give a state space representation of this system

Olivier Sename State space approach 2020 28 / 80

Page 30: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linearisation

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 29 / 80

Page 31: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linearisation

First: find and choose the equilibrium points (the operating conditions)

The operating conditions are defined by the set of equations:{xO(t) = f ((xO(t),uO(t)),yO(t) = g((xO(t),uO(t), t)

(7)

They can be found solving these equations (denoted the trim equations in Aerospace).

Important (usual?) case: equilibrium

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

What is the clue of the linearization method?

1 We develop a Taylor series expansion following, given a function h:

h(x(t)) = h(xO)+dhdx

∣∣∣x=xO

(x− xO)

1!+ .....

2 The slope of the function h in xO, dhdx

∣∣∣x=xO

, is a good approximation (at the first

order so linear ) of the variations of the function h around xO.

Olivier Sename State space approach 2020 30 / 80

Page 32: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Linearisation

Linearisation: how to get a linear model from a nonlinear one?

First let us define the variations around the operating conditions

x = x− xO, u = u−uO, y = y− yO

Then, for each state variable (remind x = (x1,x2, . . . ,xn)T ), satisfying:

xi(t) = fi(x(t),u(t)),∀i ∈ {1,2, ...,n}

we can write:

fi(x(t),u(t)) = fi(xO + x,uO + u) (9)

≈ fi(xO,uO)+∂ fi∂x

∣∣∣x=xO

(x(t)− xO)

1!+

∂ fi∂u

∣∣∣u=uO

(u(t)−uO)

1!(10)

this leads to a linear state space representation of the system, around the equilibriumpoint: { ˙x(t) = Ax(t)+Bu(t),

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

with A = ∂ f∂x |x=xO,u=uO , B = ∂ f

∂u |x=xO,u=uO ,C = ∂g∂x |x=xO,u=uO and D = ∂g

∂u |x=xO,u=uO

Olivier Sename State space approach 2020 31 / 80

Page 33: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Discrete-time state space representations

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 32 / 80

Page 34: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Modelling Discrete-time state space representations

Discrete-time state space representations

Definition

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

y(kh) =Cdx(kh)+Ddu(kh)(12)

where h is the sampling period.

Usual notation

Usually it is rewritten as the simple form:{xk+1 = Adxk +Bdukyk =Cdxk +Dduk

(13)

Matlab : ss(Ad,Bd,Cd,Dd,h) creates a SS object SYS representinga discrete-time state-space model

Olivier Sename State space approach 2020 33 / 80

Page 35: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions

To/from transfer functions

Olivier Sename State space approach 2020 34 / 80

Page 36: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 35 / 80

Page 37: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

Are state space representations equivalent to transfer functions ?

Transfer functions are representing an input/output system behavior.

From a State Space representation to a Transfer Function

Consider a linear system given by:{x(t) = Ax(t)+Bu(t), x(0) = x0y(t) =Cx(t)+Du(t)

(14)

Using the Laplace transform (and assuming zero initial condition x0 = 0), (14) becomes:

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

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

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

(15)

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

Olivier Sename State space approach 2020 36 / 80

Page 38: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

Conversion TF to SS

There mainly three cases to be considered

Simple numeratoryu= G(s) =

1s3 +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+b3

s3 +a1s2 +a2s+a3=

N(s)D(s)

The developments follow simple inverse Laplace transforms

Olivier Sename State space approach 2020 37 / 80

Page 39: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

Modal form

Let us consider a transfer funtion as:

G(s) =b1

s−a1+

b2

s−a2+ . . .+

bn

s−an

• Define a set of transfer functions:

Xi(s)U(s)

=bi

s−ai⇒ xi = aixi +biui

• This gives {x(t) = Ax(t)+Bu(t), x(0) = x0y(t) =Cx(t)+Du(t)

(16)

with A =

a1 0 . . . 0

0 a2 0...

0. . .

. . . 00 . . . 0 an

, B =

b1b2...

bn

and C =[

1 1 1 1].

Olivier Sename State space approach 2020 38 / 80

Page 40: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

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 as the controllablecanonical form is defined as:

A =

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

......

. . ....

0... 0 1

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

, B =

0......01

(17)

C =[

c0 c1 . . . cn−1]

(18)

In Matlab, use canon

Olivier Sename State space approach 2020 39 / 80

Page 41: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

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-order differential equationsdefining the state variables :

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

Olivier Sename State space approach 2020 40 / 80

Page 42: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

State space transformation - Non unicity

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

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

(19)

the transfer matrix being G(s) =C(sIn−A)−1B+D, and consider the change of variablesx = T z (T being an invertible matrix). Replacing x = T z in the previous system gives:

T z(t) = AT z(t)+Bu(t) (20)

y(t) = CT z(t)+Du(t) (21)

Hence

z(t) = T−1AT z(t)+T−1Bu(t) (22)

y(t) = CT z(t)+Du(t) (23)

Olivier Sename State space approach 2020 41 / 80

Page 43: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The continuous-time case

Defining A = T−1AT , B = T−1B and C =CT , the transfer function of the previous systemis:

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

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

(26)

Using In = T−1T , we get

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

Exercise: For the quarter-car model, choose:

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

and give the equivalent state space representation.

Olivier Sename State space approach 2020 42 / 80

Page 44: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The discrete-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 43 / 80

Page 45: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

To/from transfer functions The discrete-time case

Discrete-time case

Let us consider the representation{xk+1 = Adxk +Bdukyk =Cdxk +Dduk

(28)

Discrete-time transfer function

It is given byG(z) =Cd(zIn−Ad)

−1Bd +Dd (29)

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

Remark

• The steady-state gain is: G(z = 1) =Cd(In−Ad)−1Bd +Dd

• The system poles are the eigenvalues of Ad

• The canonical and modal forms do exits for discrete-time systems• The non-unicity (input/output equivalence through a change of basis) is also true

Olivier Sename State space approach 2020 44 / 80

Page 46: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response

Solution of the state space equation -Time response

Olivier Sename State space approach 2020 45 / 80

Page 47: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response The discrete-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 46 / 80

Page 48: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response The discrete-time case

Solution of state space equations - discrete case

The discrete-time case is much easier.

Case of the autonomous equation xk+1 = Adxk

The state xk, solution of system xk+1 = Adxk with initial condition x0, is given by

x1 = Adx0

x2 = A2dx0

xn = Andx0

General case

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

x1 = Adx0 +Bdu0

x2 = A2dx0 +AdBdu0 +Bdu1

xn = Andx0 +

n−1

∑i=0

An−1−id Bdui

Olivier Sename State space approach 2020 47 / 80

Page 49: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response The continuous-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 48 / 80

Page 50: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response The continuous-time case

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

This theoretical problem is solved now using simulation tools (as Simulink)

Case of the autonomous equation x(t) = Ax(t)

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

x(t) = eA(t−t0)x(t0) (30)

To get an explicit analytical formula, this requires to compute the function eAt (referredto as the state transition matrix), which can be done following one of the 3 methodsto compute eAt :

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

2 Diagonalisation of A3 Cayley-Hamilton method

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

Olivier Sename State space approach 2020 49 / 80

Page 51: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response The continuous-time case

Computation of eAt : Inverse Laplace and Diagonalisation methods

Laplace method

Compute the transfer matrix (sIn−A)−1 and apply the inverse Laplace transform toeach element of this matrix. So:

eAt = L −1((sIn−A)−1)

Diagonalisation method

For simplicity we present the case where A has distinct eigenvalues, so when A isdiagonolizable.Let (λ1,λ2, . . . ,λn) be the eigenvalues of the matrix A.Therefore, there exists an invertible matrix T such that

T−1AT = Λ, where Λ = diag(λ1,λ2, . . . ,λn)

T is composed by then eigenvectors of A, i.e.

T = [v1,v2, ...vn] with Avi = λivi, ∀i = 1,N

ThereforeeAt = TeΛtT−1

Olivier Sename State space approach 2020 50 / 80

Page 52: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response The continuous-time case

Computation of eAt : Cayley-Hamilton method

Using the Cayley-Hamilton theorem, it can be stated that each power n and more of thematrix A (i.e. A j for j > n) can be described as a combination of the previous power A j

for j = 0, ...,n−1.For simplicity we present the case where A has distinct eigenvalues.

Principle

eAt can be defined by the following finite expansion: eAt = ∑n−1j=0 α j(t)A j where the

functions αi(t) are determined solving the equation above for all eigenvalues (replacingA by λi,∀i solving a system of n equations with n variables)

Application to the case n = 2

eAt = α0(t)I2 +α1(t)ATo determine α0(t) and α0(t) we only have to solve the system of equations below:

eλ1t = α0(t)+α1(t)λ1 (31)

eλ2t = α0(t)+α1(t)λ2 (32)

where λ1 and λ2 are the 2 different eigenvalues of A.

Olivier Sename State space approach 2020 51 / 80

Page 53: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response The continuous-time case

The general solution x(t) of a linear system

General case of system (14)

The state x(t), solution of system (14), is given by (considering t0 = 0)

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

+∫ t

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

forced response

(33)

Interpretation: the dynamic modes

Following the solution above, the time response of the state x(t) when u = 0 is functionof the modes eλitvi where vi is the eigenvector associated to λi.

x(t) =n

∑i=1

βieλitvi

Simulation of state space systems

Use lsim.Example: t = 0:0.01:5; u = sin(t); lsim(sys,u,t)

Olivier Sename State space approach 2020 52 / 80

Page 54: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response Discretization of continuous-time state space representations

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 53 / 80

Page 55: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response Discretization of continuous-time state space representations

Discretization of continuous-time state space representations (1)

Objective

Find the matrices Ad , Bd of the discrete-time representation from matrices A and B ofthe continuous-time one.Note that: Cd =C and Dd = D

1. Consider the solution of a continuous-time system

x(t) = eAtx(0)+∫ t

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

2. Sample the continuous-time equation at (k+1)h and kh

x((k+1)h) = eA((k+1)h)x(0)+∫ (k+1)h

0eA((k+1)h−τ)Bu(τ)dτ

x(kh) = eA(khx(0)+∫ kh

0eA(kh−τ)Bu(τ)dτ

Olivier Sename State space approach 2020 54 / 80

Page 56: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response Discretization of continuous-time state space representations

Discretization of continuous-time state space representations (2)

3.Build the discrete-time difference equation

x((k+1)h) = eAh(eA(kh)x(0)+∫ (k+1)h

0eA(kh−τ)Bu(τ)dτ)

= eAh(x(kh)+∫ (k+1)h

kheA(kh−τ)Bu(τ)dτ)

= eAhx(kh)+∫ (k+1)h

kheA((k+1)h−τ)Bu(τ)dτ

4. Deduce (using a change of variable)

Ad = eAh, Bd = (∫ h

0eAτ ′dτ

′)B

In Matlab use c2d

Olivier Sename State space approach 2020 55 / 80

Page 57: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Solution of the state space equation - Time response Discretization of continuous-time state space representations

Discretization of continuous-time state space representations (3)

Remark

From Ad = eAh, Bd = (∫ h

0 eAτ ′dτ ′)B, using the series expansioneAh = In +Ah+ A2h2

2! + A3h3

3! + . . . we can state that:

Ad = (In +AΨ) (34)

Bd = ΨB (35)

with

Ψ = (∫ h

0eAτ ′dτ

′) = Inh+Ah2

2!+

A2h3

3!+ . . .+

Aih(i+1)

(i+1)!+ . . .

Therefore, if A is invertible we can compute:

Bd = A−1(eAh− In)B

Another interesting formula(Ad Bd0 I

)= eMh avec M =

(A B0 0

)Good to compare with c2d

Olivier Sename State space approach 2020 56 / 80

Page 58: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis

Stability analysis

Olivier Sename State space approach 2020 57 / 80

Page 59: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The continuous-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 58 / 80

Page 60: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The continuous-time case

Stability

Definition

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

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

Definition

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

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

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

Olivier Sename State space approach 2020 59 / 80

Page 61: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The continuous-time case

Stability Analysis

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

Proposition

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

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

Olivier Sename State space approach 2020 60 / 80

Page 62: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The continuous-time case

The Phase Plane

It consists in plotting the trajectory of the state variables (valid also for nonlinearsystems). Trajectories that converge to zero are stable !{

x1(t) = x2(t)x2(t) = −5x1(t)−6x2(t)

given x1(0) & x2(0)

Olivier Sename State space approach 2020 61 / 80

Page 63: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The continuous-time case

Stability Analysis - Lyapunov

The stability of a linear state space system can be analysed through the Lyapunovtheory.It is the basis of all extension of stability for non linear systems, time-delay systems,time-varying systems ...

Theorem

A system x(t) = Ax(t), with initial condition x(0) = x0, is asymoptotically stable at x = 0 ifand only if there exist some matrices P = PT > 0 and Q > 0 such that:

AT P+PA =−Q (36)

see lyap in MATLAB.Proof: The Lyapunov theory says that a linear system is stable if there exists acontinuous function V (x) s.t.:V (x)> 0 with V (0) = 0 and V (x) = dV

dx ≤ 0.A possible Lyapunov function for the above system is : V (x) = xT Px

Olivier Sename State space approach 2020 62 / 80

Page 64: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The continuous-time case

About zeros

• Roots of the transfer function numerator are called the system zeros.• Need to develop a similar way of defining/computing them using a state space

model.• Zero: is a generalized frequency α for which the system can have a non-zero input

u(t) = u0eαt , but exactly zero output y(t) = 0.• Not easy for MIMO systems• The zeros are found by solving:

det[

A−λ In BC D

]= 0 (37)

In Matlab use zero

• do remind that zeros may change the system behavior.

Example: find the zero of : s+3s2+5s+2

Olivier Sename State space approach 2020 63 / 80

Page 65: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The discrete-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 64 / 80

Page 66: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Stability analysis The discrete-time case

Stability analysis (discrete-time systems)

Olivier Sename State space approach 2020 65 / 80

Stability

A system (state space representation)is stable if and only if all the eigenvaluesof the matrix Ad are strictly inside theunit circle.

Comment

This is coherent with the discretizationof continuous-time system x = Ax, givenas xk+1 = Adxk = eAhxk. Indeedλ (A)< 0⇔ |λ (Ad)|< 1

Page 67: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability

Controllability & Observability

Olivier Sename State space approach 2020 66 / 80

Page 68: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The continuous-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 67 / 80

Page 69: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The continuous-time case

Controllability

Controllability refers to the ability of controlling a state-space model using statefeedback.

Definition

Given two states x0 and x1, the system (5) is controllable if there exist t1 > 0 and apiecewise-continuous control input u(t), t ∈ [0, t1], such that x(t) takes the values x0 fort = 0 and x1 for t = t1.

Proposition

The controllability matrix is defined by C = [B,A.B, . . . ,An−1.B]. Then system (5) iscontrollable if and only if rank(C ) = n.If the system is single-input single output (SISO), it is equivalent to det(C ) 6= 0.

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

Exercices

Test the controllability of the previous examples: DC motor, suspension, invertedpendulum.

Olivier Sename State space approach 2020 68 / 80

Page 70: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The continuous-time case

More on controllability

• Other criteria• Definition of stabilizability• About the decomposition into the controllable/uncontrollable subspaces: use ofctrbf

Olivier Sename State space approach 2020 69 / 80

Page 71: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The continuous-time case

Observability

Observability refers to the ability to estimate a state variable, from the knowledge of thesystem input and output variables

Definition

A linear system (5) is completely observable if, given the control and the output overthe interval t0 ≤ t ≤ T , one can determine any initial state 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 followingholds: y(t) = y(t) = y(t) = . . .= 0

Comments• When x(0) is determined we can always reconstruct x(t)∀t.• Only the case u(t) = 0 is useful for observability analysis

Olivier Sename State space approach 2020 70 / 80

Page 72: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The continuous-time case

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

Olivier Sename State space approach 2020 71 / 80

Page 73: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The continuous-time case

Observability cont.

Proposition

The observability matrix is defined by O =

C

CA...

CAn−1

. Then system (5) is observable

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

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

Exercices

Test the observability of the previous examples: DC motor, suspension, invertedpendulum.Analysis of different cases, according to the considered number of sensors.

Olivier Sename State space approach 2020 72 / 80

Page 74: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The discrete-time case

Outline1 Introduction2 Modelling of dynamical systems as state space representations

Nonlinear modelsLinear modelsLinearisationDiscrete-time state space representations

3 To/from transfer functionsThe continuous-time caseThe discrete-time case

4 Solution of the state space equation - Time responseThe discrete-time caseThe continuous-time caseDiscretization of continuous-time state space representations

5 Stability analysisThe continuous-time caseThe discrete-time case

6 Controllability & ObservabilityThe continuous-time caseThe discrete-time case

7 Some properties8 Concluding remarks

Olivier Sename State space approach 2020 73 / 80

Page 75: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The discrete-time case

Controllability

Consider the discrete-time state space system as follows:{xk+1 = Adxk +Bdukyk =Cdxk +Dduk

(38)

Controllability definition

Definition

Given two states x0 and xend , the system (38) is controllable if there exist K > 0 and asequence of control samples u0,u1, . . . ,uK−1, such that xk takes the values x0 for k = 0and xend for k = K.

Controllability

The system is controllable iff

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

n−1d Bd ] = n

Olivier Sename State space approach 2020 74 / 80

Page 76: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The discrete-time case

Observability

Observability definition

Definition

The system (38) is said to be completely observable if every initial state x0 can bedetermined from the observation of yk over a finite number of sampling periods.

Observability

The system is observable iff

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

Duality

Observability of (Cd ,Ad)⇔ Controllability of (ATd ,C

Td ).

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

Td ).

Olivier Sename State space approach 2020 75 / 80

Page 77: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Controllability & Observability The discrete-time case

Some properties

Olivier Sename State space approach 2020 76 / 80

Page 78: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Some properties

Minimality

Definition

A state space representation of a linear system (5) of order n is said to be minimal if itis controllable and observable.

In this case, the corresponding transfer function G(s) is of minimal order n, i.e isirreducible (no cancellation of poles and zeros).When the transfer function is not of minimal order, there exists non controllable or nonobservable modes.

Olivier Sename State space approach 2020 77 / 80

Page 79: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Some properties

Kalman decomposition

• When the linear system (5) is notcompletely controllable or observable,it can be decomposed as shown.

• It is of course very important, in thatcase, to study the stability of the noncontrollable and non observablemodes, which refers to as thestabilizability and detectability,respectively

• Use ctrbf and obsvf in Matlab.

Olivier Sename State space approach 2020 78 / 80

Page 80: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Concluding remarks

Concluding remarks

Olivier Sename State space approach 2020 79 / 80

Page 81: Modelling, analysis and control of linear systems using state ...o.sename/docs/ASI_SS_2020_part1.pdf1 Introduction 2 Modelling of dynamical systems as state space representations Nonlinear

Concluding remarks

Conclusion

• A state space approach for continuous-time and discrete-time SISO and MIMOsystems

• The state vector is defined for one state-space representation (not for a giveninput/output representation)

• Stability can be analysed easily• Some possible extensions to time-varying systems, Linear Parameter Varying

systems, switched systems.... in the continuous-time and discrete-timeframeworks

• Next part: control and observer design

Olivier Sename State space approach 2020 80 / 80