Modelling, analysis and control of linear systems using state space representations

Similar documents
Methods for analysis and control of. Lecture 6: Introduction to digital control

Pole placement control: state space and polynomial approaches Lecture 2

Pole placement control: state space and polynomial approaches Lecture 1

Modelling, analysis and control of linear systems using state space representations

Automatique. A. Hably 1. Commande d un robot mobile. Automatique. A.Hably. Digital implementation

Methods for analysis and control of dynamical systems Lecture 4: The root locus design method

Linear State Feedback Controller Design

State Regulator. Advanced Control. design of controllers using pole placement and LQ design rules

5. Observer-based Controller Design

Richiami di Controlli Automatici

Introduction to Modern Control MT 2016

Exam. 135 minutes, 15 minutes reading time

ESC794: Special Topics: Model Predictive Control

Raktim Bhattacharya. . AERO 422: Active Controls for Aerospace Vehicles. Dynamic Response

D(s) G(s) A control system design definition

CONTROL DESIGN FOR SET POINT TRACKING

sc Control Systems Design Q.1, Sem.1, Ac. Yr. 2010/11

Control System Design

Methods for analysis and control of. Lecture 4: The root locus design method

Control Systems Design

Problem Set 3: Solution Due on Mon. 7 th Oct. in class. Fall 2013

Course Outline. Higher Order Poles: Example. Higher Order Poles. Amme 3500 : System Dynamics & Control. State Space Design. 1 G(s) = s(s + 2)(s +10)

Identification Methods for Structural Systems

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015

Control Systems Lab - SC4070 Control techniques

ECEN 420 LINEAR CONTROL SYSTEMS. Lecture 6 Mathematical Representation of Physical Systems II 1/67

ECE557 Systems Control

Topic # Feedback Control Systems

Raktim Bhattacharya. . AERO 632: Design of Advance Flight Control System. Preliminaries

Automatic Control II Computer exercise 3. LQG Design

Chapter 7. Digital Control Systems

ẋ n = f n (x 1,...,x n,u 1,...,u m ) (5) y 1 = g 1 (x 1,...,x n,u 1,...,u m ) (6) y p = g p (x 1,...,x n,u 1,...,u m ) (7)

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Review

Control Systems Design, SC4026. SC4026 Fall 2010, dr. A. Abate, DCSC, TU Delft

MODERN CONTROL DESIGN

BIBO STABILITY AND ASYMPTOTIC STABILITY

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

Time Response of Systems

Autonomous Mobile Robot Design

Outline. Classical Control. Lecture 1

Fall 線性系統 Linear Systems. Chapter 08 State Feedback & State Estimators (SISO) Feng-Li Lian. NTU-EE Sep07 Jan08

Control Systems Design

Control Systems Design

Dr Ian R. Manchester

Control Systems. Design of State Feedback Control.

EEE 188: Digital Control Systems

CONTROL OF DIGITAL SYSTEMS

Chapter 3. State Feedback - Pole Placement. Motivation

Computer Problem 1: SIE Guidance, Navigation, and Control

Modeling and Analysis of Dynamic Systems

Extensions and applications of LQ

Subject: Optimal Control Assignment-1 (Related to Lecture notes 1-10)

Control Systems I. Lecture 4: Diagonalization, Modal Analysis, Intro to Feedback. Readings: Emilio Frazzoli

Control Systems I. Lecture 7: Feedback and the Root Locus method. Readings: Jacopo Tani. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

Control Systems Design, SC4026. SC4026 Fall 2009, dr. A. Abate, DCSC, TU Delft

Lec 6: State Feedback, Controllability, Integral Action

EECS C128/ ME C134 Final Wed. Dec. 15, am. Closed book. Two pages of formula sheets. No calculators.

Multivariable Control. Lecture 03. Description of Linear Time Invariant Systems. John T. Wen. September 7, 2006

Wind Turbine Control

EE C128 / ME C134 Final Exam Fall 2014

Topic # Feedback Control. State-Space Systems Closed-loop control using estimators and regulators. Dynamics output feedback

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL

Contents. PART I METHODS AND CONCEPTS 2. Transfer Function Approach Frequency Domain Representations... 42

1 x(k +1)=(Φ LH) x(k) = T 1 x 2 (k) x1 (0) 1 T x 2(0) T x 1 (0) x 2 (0) x(1) = x(2) = x(3) =

Intro. Computer Control Systems: F9

6 OUTPUT FEEDBACK DESIGN

ECEN 605 LINEAR SYSTEMS. Lecture 7 Solution of State Equations 1/77

Introduction to Feedback Control

Robust Control 5 Nominal Controller Design Continued

6.241 Dynamic Systems and Control

Lecture 1: Feedback Control Loop

Implementation Issues for the Virtual Spring

RELAY CONTROL WITH PARALLEL COMPENSATOR FOR NONMINIMUM PHASE PLANTS. Ryszard Gessing

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

Linear Systems Theory

Pole placement control: state space and polynomial approaches Lecture 3

Suppose that we have a specific single stage dynamic system governed by the following equation:

Controls Problems for Qualifying Exam - Spring 2014

Classify a transfer function to see which order or ramp it can follow and with which expected error.

EEE582 Homework Problems

FEL3210 Multivariable Feedback Control

Lecture 7 (Weeks 13-14)

A FEEDBACK STRUCTURE WITH HIGHER ORDER DERIVATIVES IN REGULATOR. Ryszard Gessing

An Introduction to Control Systems

Control Systems I. Lecture 6: Poles and Zeros. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

TRACKING AND DISTURBANCE REJECTION

EE C128 / ME C134 Feedback Control Systems

Control Systems I. Lecture 2: Modeling. Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch Emilio Frazzoli

CDS 101/110: Lecture 3.1 Linear Systems

Lecture 5: Linear Systems. Transfer functions. Frequency Domain Analysis. Basic Control Design.

Topic # Feedback Control

Robust Control 2 Controllability, Observability & Transfer Functions

Stochastic Optimal Control!

MEM 355 Performance Enhancement of Dynamical Systems MIMO Introduction

Control Systems I. Lecture 5: Transfer Functions. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

ACM/CMS 107 Linear Analysis & Applications Fall 2016 Assignment 4: Linear ODEs and Control Theory Due: 5th December 2016

Control Systems. Frequency domain analysis. L. Lanari

A Model-Free Control System Based on the Sliding Mode Control Method with Applications to Multi-Input-Multi-Output Systems

CDS 101: Lecture 4.1 Linear Systems

Topic # Feedback Control Systems

Transcription:

Modelling, analysis and of linear systems using state space O. Sename 1 1 Gipsa-lab, CNRS-INPG, FRANCE Olivier.Sename@gipsa-lab.fr www.gipsa-lab.fr/ o.sename 12th January 2015 feedback optimal digital

Outline feedback feedback optimal digital optimal digital

feedback optimal digital

References Some interesting books: K.J. Astrom and B. Wittenmark, Computer-Controlled Systems, Information and systems sciences series. Prentice Hall, New Jersey, 3rd edition, 1997. 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 feedback optimal digital

The " design" process Plant study and modelling Determination of sensors and actuators (measured and led outputs, inputs) Performance specifications Control design (many methods) Simulation tests Implementation, tests and validation feedback optimal digital

About modelling... Identification based method System excitations using PRBS (Pseudo Random Binary Signal) or sinusoïdal signals Determination of a transfer function 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. feedback optimal digital

Why state space equations? where physical equations can be derived : electrical engineering, mechanical engineering, aerospace engineering, microsystems, process plants... include physical parameters: easy to use when parameters are changed for design. 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 design methods are based on state space equations (reliable numerical optimisation tools) feedback optimal digital

feedback optimal digital

Towards state space representation system A "matrix-form" representation of the dynamics of an N- order differential equation system into a FIRST order differential equation in a vector form of size N, which is called the state. Definition of a system state The state of a dynamical system is the set of variables, known as state variables, that fully describe the system and its response to any given set of inputs. Mathematically, the knowledge of the initial values of the state variables at t 0 (namely x i (t 0 ),i = 1,...,n), together with the knowledge of the system inputs for time t t 0, are sufficient to predict the behavior of the future system state and output variables (for t t 0 ). feedback optimal digital

Example of a one-tank model Usually the hydraulic equation is non linear and of the form S dh dt = Q e Q s where H is the tank height, S the tank surface, Q e the input flow, and Q s the output flow defined by Q s = a H. Definition the state space model The system is represented by an Ordinary Differential Equation whose solution depends on H(t 0 ) and Q e. Clearly H is the system state, Q e is the input, and the system can be represented as: feedback optimal digital with x = H, f = a S x+ 1 S u ẋ(t)=f(x(t),u(t)), x(0)=x 0 (1)

Example Let consider the following pendulum T l feedback optimal digital θ M where θ is the angle, T the led torque, l the pendulum length, M its mass. Give the dynamical equations of motion for the pendulum angle (neglecting friction) and propose a state space model.

Example: Underwater Autonomous Vehicle UAV Aster x feedback optimal digital Actions: axial propeller to the velocity in Ox direction and 5 independent mobile fins : 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 ).

UAV modelling Physical model: M ν = G(ν)ν+ D(ν)ν+Γ g +Γ u (2) η = J c (η 2 )ν (3) 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, - J c (η 2 ): referential transform matrix, - Γ u : forces and moments due to the vehicle s actuators. feedback optimal digital

UAV state definition A 12 dimensional state vector : X = [ η(6) ν(6) ] T. η(6): position in the inertial referential: η = [ ] T η 1 η 2 with η 1 = [ x y z ] T and η2 = [ φ θ ψ ] T. x, y and z are the positions of the vehicle, and φ, θ and ψ are respectively the roll, pitch and yaw angles. ν(6): velocity vector, in the local referential (linked to the vehicle) describing the linear and angular velocities (first derivative of the position, considering the referential transform: ν = [ ν 1 ν 2 ] T with ν 1 = [ u v w ] T and ν2 = [ p q r ] T feedback optimal digital

Example: Inverted pendulum It is described by: feedback optimal digital Parameters:

Example: Inverted pendulum The dynamical equations are as follows: feedback optimal digital to be put in form (4).

General NL dynamical system Many can be represented by Ordinary Differential Equations (ODE) as { ẋ(t)=f((x(t),u(t),t), x(0)=x0 (4) y(t)= g((x(t),u(t),t) where f and g are non linear functions and x(t) R n is referred to as the system state (vector of state variables), u(t) R m the input y(t) R p the measured output x 0 is the initial condition. feedback optimal digital

Definition of state space A continuous-time LINEAR state space system is given as : { ẋ(t)=ax(t)+bu(t), x(0)=x0 y(t)= Cx(t)+Du(t) x(t) R n is the system state (vector of state variables), u(t) R m the input y(t) R p the measured output A, B, C and D are real matrices of appropriate dimensions x 0 is the initial condition. n is the order of the state space representation. Matlab : ss(a,b,c,d) creates a SS object SYS representing a continuous-time state-space model (5) feedback optimal digital

A state space representation of a DC Motor The dynamical equations are : Ri+ L di dt + e= u J dω dt = f ω+γ m e= K eω Γ m = K c i System of 2 equations( of order ) 1 = 2 state variables. ω A possible choice x = It gives: i ( ) ( ) f/j Kc /J 0 A= B = C = ( 0 1 ) K e /L R/L 1/L Extension: measurement= motor angular position feedback optimal digital

Example : Wind turbine feedback optimal digital

Some important issues A complete ADAMS model includes 193 DOFs to represent fully flexible 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 A Generator torque ler to enhance drive train torsion damping in Regions 2 and 3 The model is obtained by linearisation of a non linear electro-mechanical model: { ẋ(t)=ax(t)+bu(t)+ed(t) feedback optimal digital y(t)= Cx(t) where x 1 = rotor-speed x 2 = drive-train torsion spring force, x 3 = rotational generator speed u = generator torque, d : wind speed

Examples: Suspension Let the following mass-spring-damper system. feedback optimal digital where x 1 is the relative position, M 1 the system mass, k 1 the spring coefficient, u the force generated by the active damper, and F 1 is an external disturbance. Applying the mechanical equations it leads: M 1 ẍ 1 = k 1 x 1 + u+ F 1 (6)

Examples: Suspension cont. ( x1 The choice x = ẋ1 ) gives { ẋ(t)=ax(t)+bu(t)+ed(t) y(t)=cx(t) where d = F 1, y = x 1 with ( ) ( 0 1 0 A=, B = E = k 1 /M 1 0 1/M 1 ),and C = ( 0 1 ) feedback optimal digital

Exercise Let the following quarter car model with active suspension. z s and z us ) are the relative position of the chassis and of the wheel, m s (resp. m us ) the mass of the chassis (resp. of the wheel), k s (resp. k t ) the spring coefficient of the suspension (of the tire), u the active damper force, z r is the road profile. feedback optimal digital Choose some state variables and give a state space representation of this system

More generally Reformulate Nth-order differential equation into N simultaneous first-order differential equations d n y dt n + a d n 1 y n 1 dt n 1 +...+a1ẏ+ a 0y = f Define the state variables : x 1 =...,,x 2 =...,,...x n =..., and give the according state space representation. Remark : Knowledge of state variables allows one to determine every possible output of the system feedback optimal digital

Linearisation The linearisation can be done around an equilibrium point or around a particular point defined by: { ẋeq (t)= f((x eq (t),u eq (t),t), givenx eq (0) (7) y eq (t)= g((x eq (t),u eq (t),t) Defining x = x x eq, ũ = u u eq, ỹ = y y eq this leads to a linear state space representation of the system, around the equilibrium point: { x(t)=a x(t)+bũ(t), (8) ỹ(t)=c x(t)+dũ(t) feedback optimal digital with A= f x x=x eq,u=u eq, B = f C = g x x=x eq,u=u eq u x=x eq,u=u eq, and D = g u x=x eq,u=u eq Usual case Usually an equilibrium point satisfies: 0=f((x eq (t),u eq (t),t) (9) For the pendulum, we can choose y = θ = f = 0.

Underwater Autonomous Vehicle UAV Aster x Nonlinear model: 12 state variables; 6 inputs. Equilibrium point chosen as [u v w p q r]=[1 0 0 0 0 0] : all velocities are taken equal to 0, except the longitudinal velocity taken equal to 1m/s (cruising speed). Tangential linearization around the chosen equilibrium point: { x = A x(t)+bũ(t) where x = δ[x u y v z w φ p θ q ψ r] T ũ = δ[β 1 β 1 β 2 β 2 δ 1 Q c ] T ỹ = C x(t)+du(t) ỹ measured output (here only the altitude z is measured) Matrices A, B, C and D depend on the model parameters : hydrodynamical parameters, mass of the vehicle, dimension of fins... Note that most of these parameters are uncertain, and that here the design is proposed for the nominal plant case only. feedback optimal digital

Exercise: Inverted pendulum (2) Applying the linearisation method leads to : feedback optimal digital

Linear systems vs transfer function Equivalence transfer function - state space representation Consider a linear system given by: { ẋ(t)=ax(t)+bu(t), x(0)=x0 y(t)= Cx(t)+Du(t) Using the Laplace transform (and assuming zero initial condition x 0 = 0), (10) becomes: s.x(s)= Ax(s)+Bu(s) (s.i n A)x(s)= Bu(s) Then the transfer function matrix of system (10) is given by G(s)=C(sI n A) 1 B+ D = N(s) D(s) (10) (11) feedback optimal digital Matlab: if SYS is an SS object, then tf(sys) gives the associated transfer matrix. Equivalent to tf(n,d)

Conversion TF to SS There mainly three cases to be considered Simple numerator y u = G(s)= 1 s 3 + a 1 s 2 + a 2 s+ a 3 Numerator order less than denominator order Numerator equal to denominator order y u = G(s)= b 1s 2 + b 2 s+ b 3 s 3 + a 1 s 2 = N(s) + a 2 s+ a 3 D(s) feedback optimal digital y u = G(s)= b 0s 3 + b 1 s 2 + b 2 s+ b 3 s 3 + a 1 s 2 = N(s) + a 2 s+ a 3 D(s)

Canonical forms Some specific state space are well-known and often used as the so-called lable canonical form 0 1 0... 0 0 0 0 1 0... A=.........., B =. and 0. 0 1 0 a 0 a 1...... a n 1 1 C = [ ] c 0 c 1... c n 1. It corresponds to the transfer function: feedback optimal digital In Matlab, use canon G(s)= c 0+ c 1 s+...+c n 1 s n 1 a 0 + a 1 s+...+a n 1 s n 1 + s n

Modal form Let us consider a transfer funtion as: G(s)= b 1 s a 1 + b 2 s a 2 +...+ b n s a n Define a set of transfer functions: X i (s) U(s) = b i s a i ẋ i = a i x i + b i u i This gives { ẋ(t)=ax(t)+bu(t), x(0)=x0 y(t)=cx(t)+du(t) a 1 0... 0 b 1 with A= 0 a 2 0.. 0..... 0, B = b 2.. and 0... 0 a b n n C = [ 1 1 1 1 ]. (12) feedback optimal digital

Solution of state space linear systems The state x(t), solution of ẋ(t)=ax(t), with initial condition x(0)=x 0 is given by x(t)=e At x(0) (13) This requires to compute e At. There exist 3 methods to compute e At : 1. Inverse Laplace transform of (si n A) 1 : 2. Diagonalisation of A 3. Cayley-Hamilton method In Matlab : use expm(a*t) and not exp (if t is given). The state x(t), solution of system (10), is given by x(t)= e At x(0) }{{} free response t + 0 e A(t τ) Bu(τ)dτ } {{ } forced response (14) feedback optimal digital Simulation of state space systems Use lsim. Example: t = 0:0.01:5; u = sin(t); lsim(sys,u,t)

feedback optimal digital

Non unicity Given a transfer function, there exists an infinity of state space (equivalent in terms of input-output behavior). Let { ẋ(t)=ax(t)+bu(t), y(t)= Cx(t)+Du(t) the transfer matrix being G(s)=C(sI n A) 1 B+ D, and consider the change of variables x = Tz (T being an invertible matrix). Replacing x = Tz in the previous system gives: (15) T ż(t) = ATz(t) + Bu(t) (16) y(t) = CTz(t) + Du(t) (17) feedback optimal digital Hence ż(t) = T 1 ATz(t)+T 1 Bu(t) (18) y(t) = CTz(t) + Du(t) (19)

Defining Ã=T 1 AT, B = T 1 B and C = CT, the transfer function of the previous system is: Using I n = T 1 T, we get G(s) = C(sI n Ã) 1 B+ D (20) = C T (si n T 1 AT) 1 T 1 B+ D (21) (22) G(s)=C T T 1 (si n A) 1 T T 1 B+ D = G(s) (23) Exercise: For the quarter-car model, choose: feedback optimal digital x 1 = z s, x 2 = ż s, x 3 = z s z us, x 4 = ż s ż us and give the equivalent state space representation.

Stability Definition An equilibrium point x eq is stable if, for all ρ > 0, there exists a η > 0 such that: x(0) x eq <η = x(t) x eq <ρ, t 0 Definition An equilibrium point x eq is asymptotically stable if it is stable and, there exists η > 0 such that: feedback optimal digital x(0) x eq <η = x(t) x eq, when t These notions are equivalent for linear systems (not for non linear ones).

Stability Analysis The stability of a linear state space system is analyzed through the characteristic equation det(si n A)=0. The system poles are then the eigenvalues of the matrix A. It then follows: Proposition A system ẋ(t)= Ax(t), with initial condition x(0)=x 0, 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 the LTI model SYS. It is equivalent to compute eig(a). feedback optimal digital

Stability Analysis - Lyapunov The stability of a linear state space system can be analysed through the Lyapunov theory. It is the basis of all extension of stability for non linear systems, time-delay systems, time-varying systems... Theorem A system ẋ(t)= Ax(t), with initial condition x(0)=x 0, is asymoptotically stable at x = 0 if and only if there exist some matrices P = P T > 0 and Q > 0 such that: A T P+ PA= Q (24) feedback optimal digital see lyap in MATLAB. Proof: The Lyapunov theory says that a linear system is stable if there exists a continuous function V(x) s.t.: dv V(x)>0 with V(0)=0 and V(x)= dx 0. A possible Lyapunov function for the above system is : V(x)=x T Px

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)=u 0 e αt, but exactly zero output y(t)= 0. The zeros are found by solving: [ A λin B det C D ] = 0 (25) feedback optimal digital In Matlab use zero Example: find the zero of : s+3 s 2 +5s+2

Controllability Controllability refers to the ability of ling a state-space model using state feedback. Definition Given two states x 0 and x 1, the system (10) is lable if there exist t 1 > 0 and a piecewise-continuous input u(t), t [0,t 1 ], such that x(t) takes the values x 0 for t = 0 and x 1 for t = t 1. Proposition The lability matrix is defined by C =[B,A.B,...,A n 1.B]. Then system (10) is lable if and only if rank(c)=n. If the system is single-input single output (SISO), it is equivalent to det(c) 0. Using Matlab, if SYS is an SS object then crtb(sys) returns the lability matrix of the state-space model SYS with realization (A,B,C,D). This is equivalent to ctrb(sys.a,sys.b) Exercices Test the lability of the previous examples: DC motor, suspension, inverted pendulum. feedback optimal digital

Observability Observability refers to the ability to estimate a state variable. Definition A linear system (5) is completely observable if, given the and the output over the interval t 0 t T, one can determine any initial state x(t 0 ). 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)=ẏ(t)=ÿ(t)=...=0 Where does observability come from? Compare the transfer function of the two different systems* feedback optimal digital ẋ y = x+ u = 2x and ẋ = [ 1 0 0 2 ] [ 1 x+ 1 ] u y = [ 2 0 ] x

Observability cont. Proposition The observability matrix is defined by O = C CA. CA n 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 to det(o) 0. Using Matlab, if SYS is an SS object then obsv(sys) returns the observability matrix of the state-space model SYS with realization (A,B,C,D). This is equivalent to OBSV(sys.a,sys.c). Exercices Test the observability of the previous examples: DC motor, suspension, inverted pendulum. Analysis of different cases, according to the considered number of sensors. feedback optimal digital

Minimality and Kalman decomposition Definition A state space representation of a linear system (5) of order n is said to be minimal if it is lable and observable. In this case, the corresponding transfer function G(s) is of minimal order n, i.e is irreducible (no cancellation of poles and zeros). When the transfer function is not of minimal order, there exists non lable or non observable modes. Kalman decomposition feedback optimal digital When the linear system (5) is not completely lable or observable, it can be decomposed as shown. Use ctrbf and obsvf in Matlab.

feedback optimal digital

Objective of any system shape the response of the system to a given reference and get (or keep) a stable system in closed-loop, with desired performances, while minimising the effects of disturbances and measurement noises, and avoiding actuators saturation, this despite of modelling uncertainties, parameter changes or change of operating point. feedback optimal digital

Formal objective of any system Nominal stability (NS): The system is stable with the nominal model (no model uncertainty) Nominal Performance (NP): The system satisfies the performance specifications with the nominal model (no model uncertainty) Robust stability (RS): The system is stable for all perturbed plants about the nominal model, up to the worst-case model uncertainty (including the real plant) Robust performance (RP): The system satisfies the performance specifications for all perturbed plants about the nominal model, up to the worst-case model uncertainty (including the real plant). feedback optimal digital

About Feedback How to design a ler using a state space representation? Tow cases are possible : Static lers (output or state feedback) Dynamic lers (output feedback or observer-based) What for? Closed-loop stability (of state or output variables) disturbance rejection Model tracking Input/Output decoupling Other performance criteria : H 2 optimal, H robust... feedback optimal digital

Why state feedback and not output feedback? Example: G(s)= 1 s 2 s Consider the lable canonical form. Case of output feedback : u = Ly Then ẋ(t)=(a BLC)x(t) For the example, the characteristic polynomial is P BF (s)=s 2 s L. The closed-loop system cannot be stabilized. Case of state feedback : u = Fx Let F =[f 1,f 2 ]. Then P BF (s)=s 2 +( 1+f 2 )s+ f 1. So it is easy to choose F to get a stable closed-loop system. For instance f 1 = 1, f 2 = 3 gives P BF (s)=(s+ 1) 2 feedback optimal digital

A state feedback ler for a continuous-time system is: u(t)= Fx(t) (26) where F is a m n real matrix. When the system is SISO, it corresponds to : u(t)= f 1 x 1 f 2 x 2... f n x n with F =[f 1, f 2,..., f n ]. When the system is MIMO we have u 1 u 2.. u m f 11 =. f m1... f 1n.... f mn x 1 x 2.. x n feedback optimal digital

(2) Using state feedback lers (26), we get in closed-loop (for simplicity D = 0) { ẋ(t)=(a BF)x(t), y(t)=cx(t) (27) and the stability (and dynamics) of the closed-loop system is then given by the eigenvalues of A BF. feedback optimal digital

(3) When the objective is to track some reference signal r, the state feedback is of the form: u(t) = Fx(t) + Gr(t) (28) G is a m p real matrix. Then the closed-loop transfer matrix is : G CL (s)=c(si n A+BF) 1 BG (29) G is chosen to ensure a unitary steady-state gain as: feedback optimal digital G=[C( A+BF) 1 B] 1 (30)

Pole placement Problem definition Given a linear system (5), does there exist a state feedback law (26) such that the closed-loop poles are in predefined locations (denoted γ i, i = 1,...,n ) in the complex plane? Proposition Let a linear system given by A, B, and let γ i, i = 1,...,n, a set of complex elements (i.e. the desired poles of the closed-loop system). There exists a state feedback u = Fx such that the poles of the closed-loop system are γ i, i = 1,...,n if and only if the pair (A,B) is lable. feedback optimal digital

Pole placement (2) First case: lable canonical form 0 1 0... 0 0 0 0 1 0... A=.........., B =. and 0. 0 1 0 C = [ a 0 a 1...... a n 1 1 ] c 0 c 1... c n 1. Let F =[ f 1 f 2... f n ] Then 0 1 0... 0 0 0 1 0... A BF =......... 0. 0 1 (31) feedback optimal digital a 0 f 1 a 1 f 2...... a n 1 f n

Pole placement (3) Consider the desired clos-ed-loop polynomial: (s γ 1 )(s γ 2 )...(s γ n )=s n + α n 1 s n 1 +...+α 1 s+ α 0 The solution: f i = a i 1 + α i 1,i = 1,..,n ensures that the poles of A BF are {γ i },i = 1,n When we consider a general state space representation, it is first necessary to use a change of basis to make the system under canonical form. Use F=acker(A,B,P) where P is the set of desired closed-loop poles. feedback optimal digital

Pole placement (4) Procedure for the general case: 1. Check lability of (A, B) 2. Calculate C =[B,AB,...,A n 1 B]. q 1 Note C 1 =... Define T = q n q n q n A. q n A n 1 1 3. Note Ā=T 1 AT and B = T 1 B (which are under the lable canonical form) 4. Choose the desired closed-loop poles and define the desired closed-loop characteristic polynomial: s n + α n 1 s n 1 +...+α 1 s+ α 0 5. Calculate the state feedback u = F x with: feedback optimal digital fi = a i 1 + α i 1,i = 1,..,n 6. Calculate (for the original system): u = Fx, with F = F T 1

Specifications The required closed-loop performances should be chosen in the following zone feedback optimal digital which ensures a damping greater than ξ = sin φ. γ implies that the real part of the CL poles are sufficiently negatives.

Specifications (2) Some useful rules for selection the desired pole/zero locations (for a second order system): Rise time : t r 1.8 ω n Seetling time : t s 4.6 ξ ω n Overshoot M p = exp( πξ/sqrt(1 ξ 2 )): ξ = 0.3 M p = 35%, ξ = 0.5 M p = 16%, ξ = 0.7 M p = 5%. feedback optimal digital

Specifications(3) Some rules do exist to shape the transient response. The ITAE (Integral of Time multiplying the Absolute value of the Error), defined as: ITAE = t e(t) dt 0 can be used to specify a dynamic response with relatively small overshoot and relatively little oscillation (there exist other methods to do so). The optimum coefficients for the ITAE criteria are given below (see Dorf & Bishop 2005). Order Characteristic polynomials d k (s) feedback optimal 1 d 1 =[s+ ω n ] 2 d 2 =[s 2 + 1.4ω n s+ ω 2 n ] 3 d 3 =[s 3 + 1.75ω n s 2 + 2.15ω 2 n s+ ω3 n ] 4 d 4 =[s 4 + 2.1ω n s 3 + 3.4ω 2 n s 2 + 2.7ω 3 n s+ ω 4 n] 5 d 5 =[s 5 + 2.8ω n s 4 + 5ω 2 n s 3 + 5.5ω 3 n s 2 + 3.4ω 4 n s+ ω 5 n] 6 d 6 =[s 6 + 3.25ω n s 5 + 6.6ω 2 ns 4 + 8.6ω 3 n s 3 + 7.45ω 4 ns 2 + 3.95ω 5 ns+ ω 6 n] digital and the corresponding transfer function is of the form: H k (s)= ωk n, k = 1,...,6 d k (s)

Specifications(4) feedback optimal digital

Integral Control A state feedback ler may not allow to reject the effects of disturbances (particularly of input disturbances). A very useful method consists in adding an integral term to ensure a unitary static closed-loop gain. Considered system: { ẋ(t)=ax(t)+bu(t)+ed(t), x(0)=x0 (32) y(t)=cx(t) where d is the disturbance. The objective is to keep y close to a reference signal r, even in the presence of d, i.e to keep r y asymptotically stable. feedback optimal digital

Integral Control The method consists in extending the system by adding a new state variable: and to use a new state feedback: We get [ ẋ(t) ż(t) ] [ A BF BH = C 0 ż(t)=r(t) y(t) u(t)= Fx(t) Hz(t) ][ x z ] [ 0 + 1 ] [ E r(t)+ 0 ] d(t) feedback optimal digital

Integral scheme The complete structure has the following form: feedback optimal digital When an observer is to be used, the action simply becomes: u(t)= Fˆx(t) Hz(t)

feedback feedback optimal digital

A first insight To implement a state feedback, the measurement of all the state variables is necessary. If this is not available, we will use a state estimation through a so-called Observer. Observation or Estimation The estimation theory is based on the famous Kalman contribution to filtering problems (1960), and accounts for noise induced problems. The observation theory has been developed for Linear Systems by Luenberger (1971), and doe snot consider the noise effects. Other interest of observation/estimation In 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 non measured variables) and to propose a so-called virtual sensor. Objective: Develop a dynamical system whose state ˆx(t) = x(t), t 0. feedback optimal digital

Open loop observer Let consider { ẋ(t)=ax(t)+bu(t), x(0)=x0 y(t)= Cx(t) Given that we know the plant matrices and the inputs, we can just perform a simulation that runs in parallel with the system { ˆx(t)=Ax(t)+Bu(t), x(0)=x0 ŷ(t) = Cˆx(t) Therefore, if ˆx(0)=x(0), then ˆx(t)=x(t), t 0. BUT ˆx(0) is UNKNOWN. the estimation error (ˆx x) dynamics is determined by A (and cannot be modified) (33) (34) the effects of disturbance and noise cannot be attenuated (leads to estimation biais) feedback optimal digital

Closed-loop Observer Objective: since y is function of the state variables and KNOWN, use an on line comparison of the system output y and the estimated output ŷ. feedback optimal digital Observer form: ˆx(t) ˆx 0 to be defined = Aˆx(t) + Bu(t) L(Cˆx(t) y(t)) where ˆx(t) R n is the estimated state of x(t) and L is the n p constant observer gain matrix to be designed. (35)

Closed-loop Observer Objective: since y is function of the state variables and KNOWN, use an on line comparison of the system output y and the estimated output ŷ. feedback optimal digital Observer form: ˆx(t) ˆx 0 to be defined = Aˆx(t) + Bu(t) L(Cˆx(t) y(t)) where ˆx(t) R n is the estimated state of x(t) and L is the n p constant observer gain matrix to be designed. (35)

Observer Th estimated error, e(t):= x(t) ˆx(t), satisfies: ė(t) = (A LC)e(t) (36) If L is designed such that A LC is stable, then ˆx(t) converges asymptotically towards x(t). Proposition (35) is an observer for system (5) if and only if the pair (C,A) is observable, i.e. feedback optimal digital where O = C CA. CA n 1. rank(o)= n

Observer design The observer design is restricted to find L such that A LC is stable. This is still a pole placement problem. In order to use the acker Matlab function, we will use the duality property between observability and lability, i.e. : (C,A) observable (A T,C T ) lable. Then there exists L T such that the eigenvalues of A T C T L T can be randomly chosen. As (A LC) T = A T C T L T then L exists such that A LC is stable. Matlab : use L=acker(A,C,Po) where Po is the set of desired observer poles. Remark : usually the observer poles are chosen around 5 to 10 times higher than the closed-loop system, so that the state estimation is good as early as possible. This is quite important to avoid that the observer makes the closed-loop system slower. feedback optimal digital

Observer-based When an observer is built, we will use as law: u(t)= Fˆx(t)+Gr(t) (37) We then need to study the stability of the complete closed-loop system, using the extended state: x e (t)= [ x(t) e(t) ] T The closed-loop system with observer (35) and (37) is: [ ] [ ] A BF BF BG ẋ e (t)= x 0 A LC e (t)+ r(t) (38) 0 feedback optimal digital The closed-loop system from r to y is then computed from: y =[C 0] [ x(t) e(t) ] T which leads to y r = C(sI n A+BF)BG

Separation principle The characteristic polynomial of the extended system is: det(si n A+BF) det(si n A+LC) If the observer and the are designed separately then the closed-loop system with the dynamic measurement feedback is stable, given that the and observer systems are stable and the eigenvalues of (38) can be obtained directly from them. This corresponds to the so-called separation principle. feedback optimal digital

optimal feedback optimal digital

The objective of an optimal is to minimize a cost function which penalizes simultaneously the state and input behaviors, of the form 0 L(x,y)dt, i.e to reach a tradeoff between the transient response and the effort. This objective is defined through the following criteria always considered in the quadratic form: J = (x T Qx+ u T Ru)dt 0 In that form: x T Qx is the state cost, u T Ru is the cost, Q and R are respectively the state and cost penalties. It can be proved that the state feedback that minimizes J in closed-loop (given Q and R) is obtained solving an Algebraic Riccati Equation (ARE) feedback optimal digital

Linear-Quadratic Regulator (LQR) design LQR problem solution Given a linear system ẋ(t) = Ax(t) + Bu(t), with (A, B) stabilizable, and given positive definite matrices Q = Q T > 0 and R = R T > 0, if there exists P = P T > 0 s.t: A T P+ PA PBR 1 B T P+ Q = 0 then the state feedback u = Kx such that: K = R 1 B T P feedback optimal digital minimizes the quadractic criteria J (for given Q and R). This problem is handled in Matlab through the lqr command.

digital feedback optimal digital

Toward digital Digital Usually lers are implemented in a digital computer as: feedback optimal digital This requires the use of the discrete theory. (Sampling theory + Z-Transform)

Definition of the Z-Transform Mathematical definition Because the output of the ideal sampler, x (t), is a series of impulses with values x(kt e ), we have: by using the Laplace transform, x (t)= x(kt e )δ(t kt e ) k=0 L[x (t)]= x(kt e )e kst e k=0 feedback optimal digital Noting z = e st e, we can derive the so called Z-Transform X(z)=Z[x(k)]= x(k)z k k=0

Definition X(z)=Z[x(k)]= x(k)z k k=0 Z[αx(k)+βy(k)] = αx(z)+βy(z) Z[x(k n)] = z n Z[x(k)] Z[kx(k)] = z d dz Z[x(k)] Z[x(k) y(k)] = X(z).Y(z) lim x(k) = k lim (z 1)X(z) 1 z 1 feedback optimal digital The z 1 can be interpreted as a pure delay operator.

Zero order holder Sampler and Zero order holder A sampler is a switch that close every T e seconds. A Zero order holder holds the signal x for T e seconds to get h as: h(t+ kt e )=x(kt e ), 0 t < T e feedback optimal digital

Zero order holder (cont d) Model of the Zero order holder The transfer function of the zero-order holder is given by: G BOZ (s) = 1 s e st e s = 1 e st e s Influence of the D/A and A/D Note that the precision is also limited by the available precision of the converters (either A/D or D/A). This error is also called the amplitude quantization error. feedback optimal digital

Representation of the discrete linear systems The discrete output of a system can be expressed as: y(k)= h(k n)u(n) n=0 hence, applying the Z-transform leads to Y(z)=Z[h(k)]U(z)=H(z)U(z) H(z)= b 0+ b 1 z+ +b m z m a 0 + a 1 z+ +a n z n where n ( m) is the order of the system Corresponding difference equation: = Y U feedback optimal digital y(k) = 1 a n [ b0 u(k n)+b 1 u(k n+ 1)+ +b m u(k n+ m) a 0 y(k n) a 2 y(k n+ 1) a n 1 y(k 1) ]

Some useful transformations x(t) X(s) X(z) δ(t) 1 1 δ(t kt e ) e kste z k u(t) 1 s z 1 t s 2 e at s+a 1 1 e at 1 s(s+a) ω sin(ωt) cos(ωt) z 1 zt e (z 1) 2 z z e ate z(1 e ate ) (z 1)(z e ate) zsin(ωt e) s 2 +ω 2 z 2 2zcos(ωT e)+1 s z(z cos(ωt e)) s 2 +ω 2 z 2 2zcos(ωT e)+1 feedback optimal digital

Poles, Zeros and Stability Equivalence {s} {z} The equivalence between the Laplace domain and the Z domain is obtained by the following transformation: z = e st e Two poles with a imaginary part witch differs of 2π/T e give the same pole in Z. Stability domain feedback optimal digital

Approximations for discretization Forward difference (Rectangle inferior) s= z 1 T e feedback optimal Backward difference (Rectangle superior) digital s= z 1 zt e

Approximations for discretization (cont d) Trapezoidal difference (Tustin) s= 2 T e z 1 z+ 1 feedback optimal digital

Systems definition A discrete-time state space system is as follows: { x((k+ 1)h)=Ad x(kh)+b d u(kh), x(0)=x 0 y(kh)=c d x(kh)+d d u(kh) where h is the sampling period. Matlab : ss(a d,b d,c d,d d,h) creates a SS object SYS representing a discrete-time state-space model From a discretization step (c2d) we have: h A d = exp(ah), B d =( exp(aτ)dτ)b 0 For discrete-time systems, { x((k+ 1)h)=Ad x(kh)+b d u(kh), x(0)=x 0 y(kh)=c d x(kh)+d d u(kh) (39) (40) feedback optimal digital the discrete transfer function is given by G(z)=C d (zi n A d ) 1 B d + D d (41) where z is the shift operator, i.e. zx(kh)= x((k+ 1)h)

Solution of state space equations - discrete case The state x k, solution of system x k+1 = A d x k with initial condition x 0, is given by The state x k, solution of system (39), is given by x 1 = A d x 0 (42) x 2 = A 2 d x 0 (43) x n = A n d x 0 (44) x 1 = A d x 0 + B d u 0 (45) x 2 = A 2 d x 0+ A d B d u 0 + B d u 1 (46) x n = A n n 1 d x 0+ A n 1 i d B d u i (47) i=0 feedback optimal digital

analysis (discrete-time systems) Stability A system (state space representation) is stable iff all the eigenvalues of the matrix F are inside the unit circle. Controllability definition Definition Given two states x 0 and x 1, the system (39) is lable if there exist K 1 > 0 and a sequence of samples u 0,u 1,...,u K1, such that x k takes the values x 0 for k = 0 and x 1 for k = K 1. Observability definition Definition The system (39) is said to be completely observable if every initial state x(0) can be determined from the observation of y(k) over a finite number of sampling periods. feedback optimal digital

analysis (2) Controllability The system is lable iff C (Ad,B d ) = rg[b d Observability The system is observable iff O (Ad,C d ) = rg[c d A d B d...a n 1 d B d ]=n C d A d...c d A n 1 d ] T = n feedback optimal digital Duality Observability of (C d,a d ) Controllability of (A T d,ct d ). Controllability of (A d,b d ) Observability of (B T d,at d ).

About sampling period Influence of the sampling period on the time response feedback optimal digital Impose a maximal time response to a discrete system is equivalent to place the poles inside a circle defined by the upper bound of the bound given by this time response. The closer to zero the poles are, the faster the system is.

Frequency analysis As in the continuous time, the Bode diagram can also be used. Example with sampling Time T e = 1s f e = 1Hz w e = 2π): feedback optimal digital Note that, in our case, the Bode is cut at the pulse w = π. see SYSD = c2d(sysc,ts,method) in MATLAB.

Frequency analysis As in the continuous time, the Bode diagram can also be used. Example with sampling Time T e = 1s f e = 1Hz w e = 2π): feedback optimal digital Note that, in our case, the Bode is cut at the pulse w = π. see SYSD = c2d(sysc,ts,method) in MATLAB. Sampling Limitations Recall the Shannon theorem which imposes the sampling frequency at least 2 times higher than the system maximum frequency. Related to the anti-aliasing filter...

About sampling period and robustness Influence of the sampling period on the poles In theory, smaller the sampling period T e is, closer the discrete system is from the continuous one. feedback optimal digital But reducing the sampling time modify poles location... Poles and zeros become closer to the limit of the unit circle can introduce instability (decrease robustness). Sampling influences stability and robustness Over sampling increase noise sensitivity

Stability Recall A linear continuous feedback system is stable if all poles of the closed-loop transfer function T(s) lie in the left half s-plane. The Z-plane is related to the S-plane by z = e st e = e (σ+jω)t e. Hence z =e σt e and z = ωt e Jury criteria The denominator polynomial (den(z)= a 0 z n + a 1 z n 1 + +a n = 0) has all its roots inside the unit circle if all the first coefficients of the odd row are positive. feedback optimal digital 1 a 0 a 1 a 2... a n k... a n 2 a n a n 1 a n 2... a k... a 0 3 b 0 b 1 b 2... b n 1 2 b n 1 b n 2 b n 3... b 0.. 2n+ 1 s 0 b 0 b 1 b k c k = a 0 a n a n a 0 = a 1 a n 1 a n a 0 = a k a n k a n a 0 = b k b n 1 k b n 1 b 0

How to get a discrete ler First way Obtain a discrete-time plant model (by discretization) Design a discrete-time ler Derive the difference equation Second way Design a continuous-time ler Converse the continuous-time ler to discrete time (c2d) Derive the difference equation feedback optimal digital Now the question is how to implement the computed ler on a real-time (embedded) system, and what are the precautions to take before?

Discretisation The idea behind discretisation of a ler is to translate it from continuous-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 1 T e s = z 1 zt e s = 2 T e z 1 z+ 1 feedback optimal digital

Implementation characteristics Anti-aliasing Practically it is smart to use a constant high sampling frequency with an analog filter matching this frequency. Then, after the A/D converter, the signal is down-sampled to the frequency used by the ler. Remember that the pre-filter introduce phase shift. Sampling frequency choice The sampling time for discrete-time are based on the desired speed of the closed loop system. A rule of thumb is that one should sample 4 10 times per rise time T r of the closed loop system. feedback optimal digital N sample = T r T e 4 10 where T e is the sampling period, and N sample the number of samples.

Delay Problematic Sampled theory assume presence of clock that synchronizes all measurements and signal. Hence in a computer based there always is delays ( delay, computational delay, I/O latency). Origins There are several reasons for delay apparition Execution time (code) Preemption from higher order process Interrupt Communication delay Data dependencies Hence the delay is not constant. The delay introduce a phase shift Instability! feedback optimal digital

Delay (cont d) Admissible delay (Bode) Measure the phase margin: PM = 180+ϕ w0 [ř], where ϕ w0 is the phase at the crossover frequency w 0, i.e. G(jw 0 ) =1 Then the delay margin is DM = PMπ 180w 0 [s] Exercise: compute delay margin for these 3 cases feedback optimal digital

Quantification Effects Non linear phenomena Limit cycles Example (stable for K<2) H(z)= 0.25 (z 1)(z 0.5) feedback optimal digital

Quantification (cont d) Results feedback optimal digital

Quantification (cont d) Results feedback optimal digital

A state space approach for continuous-time and discrete-time MIMO systems A first insight in optimal... that can be extended towards predictive (over a finite horizon) The state space approach is also considered in Robust, in order to design H lers provide a robustness analysis in the presence of parameter uncertainties prove the stability of a closed-loop system in the presence of non linearities (as state or input constraints) design non linear lers (feedback linearisation...) solve an optimisation problem using efficient numerical tools as Linear Matrix Inequalities feedback optimal digital