Sampling of Linear Systems

Similar documents
Analysis of Discrete-Time Systems

Analysis of Discrete-Time Systems

Computer Control: An Overview

Control Systems Lab - SC4070 Control techniques

Lecture 1: Contents of the course. Advanced Digital Control. IT tools CCSDEMO

Discrete and continuous dynamic systems

Control Design. Lecture 9: State Feedback and Observers. Two Classes of Control Problems. State Feedback: Problem Formulation

ESC794: Special Topics: Model Predictive Control

EEE582 Homework Problems

ECE504: Lecture 9. D. Richard Brown III. Worcester Polytechnic Institute. 04-Nov-2008

Module 03 Linear Systems Theory: Necessary Background

AN EXTENSION OF GENERALIZED BILINEAR TRANSFORMATION FOR DIGITAL REDESIGN. Received October 2010; revised March 2011

4F3 - Predictive Control

Control Systems Design

16.30 Estimation and Control of Aerospace Systems

Discrete-time linear systems

EE263: Introduction to Linear Dynamical Systems Review Session 6

Observability. It was the property in Lyapunov stability which allowed us to resolve that

Module 1: Introduction to Digital Control Lecture Note 4

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

Module 08 Observability and State Estimator Design of Dynamical LTI Systems

Linear System Theory

Control System Design

AC&ST AUTOMATIC CONTROL AND SYSTEM THEORY SYSTEMS AND MODELS. Claudio Melchiorri

Ingegneria dell Automazione - Sistemi in Tempo Reale p.1/28

Linear System Theory. Wonhee Kim Lecture 1. March 7, 2018

Advanced Control Theory

Chapter 3. LQ, LQG and Control System Design. Dutch Institute of Systems and Control

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

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

State Feedback and State Estimators Linear System Theory and Design, Chapter 8.

5. Observer-based Controller Design

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

CBE507 LECTURE III Controller Design Using State-space Methods. Professor Dae Ryook Yang

Linear dynamical systems with inputs & outputs

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015

Lec 6: State Feedback, Controllability, Integral Action

Full State Feedback for State Space Approach

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

Lecture Note #6 (Chap.10)

Design Methods for Control Systems

1 Continuous-time Systems

SYSTEMTEORI - ÖVNING 5: FEEDBACK, POLE ASSIGNMENT AND OBSERVER

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

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

CONTROL OF DIGITAL SYSTEMS

ME 132, Fall 2017, UC Berkeley, A. Packard 334 # 6 # 7 # 13 # 15 # 14

Controls Problems for Qualifying Exam - Spring 2014

SYSTEMTEORI - ÖVNING Stability of linear systems Exercise 3.1 (LTI system). Consider the following matrix:

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

4F3 - Predictive Control

6.241 Dynamic Systems and Control

Introduction to Modern Control MT 2016

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

Digital Control & Digital Filters. Lectures 13 & 14

Automatic Control 2. Model reduction. Prof. Alberto Bemporad. University of Trento. Academic year

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

Control Systems Design

Exercise 5: Digital Control

Output Adaptive Model Reference Control of Linear Continuous State-Delay Plant

Pole placement control: state space and polynomial approaches Lecture 2

Pole placement control: state space and polynomial approaches Lecture 1

Properties of Open-Loop Controllers

Lecture: Sampling. Automatic Control 2. Sampling. Prof. Alberto Bemporad. University of Trento. Academic year

Controllability, Observability, Full State Feedback, Observer Based Control

It is common to think and write in time domain. creating the mathematical description of the. Continuous systems- using Laplace or s-

CDS 101: Lecture 4.1 Linear Systems

EL Hybrid and Embedded Control Systems Exercises

Systems and Control Theory Lecture Notes. Laura Giarré

DISCRETE-TIME SYSTEMS AND DIGITAL CONTROLLERS

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science : Dynamic Systems Spring 2011

Chapter 13 Digital Control

EE Experiment 11 The Laplace Transform and Control System Characteristics

16.31 Fall 2005 Lecture Presentation Mon 31-Oct-05 ver 1.1

10 Transfer Matrix Models

Modelling and Control of Dynamic Systems. Stability of Linear Systems. Sven Laur University of Tartu


Some solutions of the written exam of January 27th, 2014

Transfer Functions. Chapter Introduction. 6.2 The Transfer Function

ECE 388 Automatic Control

Lecture 2 and 3: Controllability of DT-LTI systems

Identification Methods for Structural Systems

Digital Control System Models. M. Sami Fadali Professor of Electrical Engineering University of Nevada

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

6.245: MULTIVARIABLE CONTROL SYSTEMS by A. Megretski. Solutions to Problem Set 1 1. Massachusetts Institute of Technology

Robust Control 2 Controllability, Observability & Transfer Functions

Control Systems. Laplace domain analysis

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 1354 MODERN CONTROL SYSTEMS

Module 07 Controllability and Controller Design of Dynamical LTI Systems

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

Control Systems I. Lecture 2: Modeling and Linearization. Suggested Readings: Åström & Murray Ch Jacopo Tani

CDS 101: Lecture 5-1 Reachability and State Space Feedback

Lecture 4 and 5 Controllability and Observability: Kalman decompositions

1. Find the solution of the following uncontrolled linear system. 2 α 1 1

Solutions to the exam in Real-Time Systems

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

Intro. Computer Control Systems: F8

NAME: ht () 1 2π. Hj0 ( ) dω Find the value of BW for the system having the following impulse response.

GATE EE Topic wise Questions SIGNALS & SYSTEMS

ECE557 Systems Control

Transcription:

Sampling of Linear Systems Real-Time Systems, Lecture 6 Karl-Erik Årzén January 26, 217 Lund University, Department of Automatic Control

Lecture 6: Sampling of Linear Systems [IFAC PB Ch. 1, Ch. 2, and Ch. 3 (to pg 23)] Effects of Sampling Sampling a Continuous-Time State-Space Model Difference Equations State-Space Models in Discrete Time 1

Textbook The main text material for this part of the course is: Wittenmark, Åström, Årzén: IFAC Professional Brief: Computer Control: An Overview, (Educational Version 216) ( IFAC PB ) Summary of the digital control parts of Åström and Wittenmark: Computer Controlled Systems (1997) Some new material Chapters 1 and 11 are not part of this course (but can be useful in other courses, e.g., Predictive Control) Chapters 7, 13 and 14 partly overlap with RTCS. 2

Sampled Control Theory u( t ) y ( t ) u( t ) t Process y( t ) t u k Hold u k D-A Computer A-D Sampler y k y k t t System theory analogous to continuous-time linear systems Better control performance can be achieved (compared to discretization of continuous-time design) Problems with aliasing, intersample behaviour 3

Sampling Computer A/D Algorithm D/A u Process y AD-converter acts as sampler A/D Regular/periodic sampling: Constant sampling interval h Sampling instants: t k = kh 4

Hold Devices Zero-Order Hold (ZOH) almost always used. DA-converter acts as hold device piecewise constant control signals First-Order Hold (FOH): Signal between the conversions is a linear extrapolation f(t) = f(kh)+ t kh (f(kh+h) f(kh)) kh t < kh+h h Advantages: Better reconstruction Continuous output signal Disadvantages: f(kh+h) must be available at time kh More involved controller design Not supported by standard DA-converters 5

Hold Devices Zero order hold First order hold 1 1 5 1 1 1 5 1 Time In IFAC PB there are quite a lot of results presented for the first-order hold case. These are not part of this course. 6

Dynamic Effects of Sampling Continuous time control Discrete time control (a).2.2 Output (b).2.2 Output Measured output 1 2.2.2 1 2.2 Measured output 1 2.2.2 1 2.2 Input Input.2.2 1 2 Time 1 2 Time Sampling of high-frequency measurement noise may create new frequencies! 7

Aliasing 1 1 5 1 Time Sampling frequency [rad/s]: ω s = 2π/h Nyquist frequency [rad/s]: ω N = ω s /2 Frequencies above the Nyquist frequency are folded and appear as low-frequency signals. Calculation of fundamental alias for an original frequency ω 1 : ω = (ω 1 +ω N ) mod (ω s ) ω N 8

Aliasing Real World Example Feed water heating in a ship boiler Feed water Pressure Steam Pump Condensed water Valve To boiler Temperature Temperature 38 min 2 min Pressure 2.11 min Time 9

Prefiltering Analog low-pass filter needed to remove high-frequency measurement noise before sampling Example: (a) 1 1 1 2 3 (c) 1 1 1 2 3 Time (b) 1 1 1 2 3 (d) 1 1 1 2 3 Time (a), (c): f 1 =.9 Hz, f N =.5 Hz f alias =.1 Hz (b), (d): 6th order Bessel prefilter with bandwidth f B =.25 Hz More on aliasing in Lecture 11. 1

Time Dependence in Sampled-Data Systems (a) u y s A-D Computer D-A Clock (b) Output 1 Output 1 Output 1 1 1 Time Output 1 1 1 Time 11

Sample and Hold Approximation A sampler in direct combination with a ZOH device gives an average delay of h/2 12

Design Approaches for Computer Control Continuous Time Process Model Discretized Process Model Control Design in Continuous Time Control Design in Discrete Time Discretized Controller Difference Equation Software Algorithm 13

Design Approaches for Computer Control Continuous Time Process Model Lectures 6,7,9 Lecture 8 Discretized Process Model Control Design in Continuous Time Control Design in Discrete Time Discretized Controller Difference Equation Software Algorithm 14

Sampled Control Theory Computer Clock A-D { } { y(t k )} u(t k) Algorithm D-A u(t) Process y(t) Basic idea: Look at the sampling instances only Stroboscopic model Look upon the process from the computer s point of view 15

Disk Drive Example Control of the arm of a disk drive Continuous time controller G(s) = k Js 2 U(s) = bk a U c(s) K s+b s+a Y(s) Discrete time controller (continuous time design + discretization) ( ) b u(t k ) = K a u c(t k ) y(t k )+x(t k ) ( ) x(t k+1 ) = x(t k )+h (a b)y(t k ) ax(t k ) (Continuous-time poles placed according to P(s) = s 3 +2ω s 2 +2ω 2 s+ω 3 ) 16

Disk Drive Example uc := adin(1) y := adin(2) u := K*(b/a*uc-y+x) daout(u) x := x+h*((a-b)*y-a*x) Clock Algorithm Sampling period h =.2/ω Output 1 5 1.5 Input.5 5 1 Time (ω t) 17

Increased Sampling Period (a) h =.5/ω, (b) h = 1.8/ω (a) (b) Output 1 Output 1 5 1.5 5 1.5 Input Input.5 5 1 15 Time (ω t).5 5 1 15 Time (ω t) 18

Better Performance? Deadbeat control, h = 1.4/ω u(t k ) = t u c (t k )+t 1 u c (t k 1 ) s y(t k ) s 1 y(t k 1 ) r 1 u(t k 1 ) Position 1 5 1 Velocity.5 5 1.5 Input.5 5 1 Time (ω t) 19

Better Performance? Deadbeat: The output reaches the reference value after n samples (n = model order) No counterpart in continuous time However, long sampling periods also have problems Open loop between samples Sensitive to model errors Disturbance and reference changes that occur between samples will remain undetected until the next sample 2

Sampling of Linear Systems Look at the system from the point of view of the computer Clock { } {u(t k )} u(t) y(t) y(t k) D-A System A-D Zero-order-hold sampling Let the inputs be piecewise constant Look at the sampling points only 21

Continuous-Time System Model Linear time-invariant system model in continuous time: dx dt = Ax+Bu y = Cx+Du Solution (see basic course in control): t x(t) = e At x(t )+ e A(t τ) Bu(τ)ds t y(t) = Ce At x(t )+C t Use this to derive a discrete-time model t e A(t τ) Bu(τ)ds+Du(t) 22

Sampling a Continuous-Time System Solve the system equation dx(t) dt = Ax(t)+Bu(t) from time t k to time t under the assumption that u is piecewise constant (ZOH sampling) x(t) = e A(t t k) x(t k )+ t = e A(t tk) x(t k )+ = e A(t t k) x(t k )+ = e A(t t k) x(t k )+ t t k e A(t s e A(t s t k ) Bu(s )ds ) ds Bu(t k ) (Bu(t k ) const.) t t k e As dsbu(t k ) (var. change s = t s ) t tk = Φ(t,t k )x(t k )+Γ(t,t k )u(t k ) e As dsbu(t k ) (change int. limits) 23

The General Case x(t k+1 ) = Φ(t k+1,t k )x(t k )+Γ(t k+1,t k )u(t k ) y(t k ) = Cx(t k )+Du(t k ) where Φ(t k+1,t k ) = e A(t k+1 t k ) Γ(t k+1,t k ) = tk+1 t k e As ds B No assumption about periodic sampling 24

Periodic Sampling Assume periodic sampling, i.e. t k = kh. Then x(kh+h) = Φx(kh)+Γu(kh) y(kh) = Cx(kh) + Du(kh) where Φ = e Ah Γ = h NOTE: Time-invariant linear system! No approximations e As dsb 25

Example: Sampling of Double Integrator dx dt = 1 x+ y = 1 x Periodic sampling with interval h: u 1 Φ = e Ah = I +Ah+A 2 h 2 /2+ 1 h 1 h = + = 1 1 Γ = h 1 s ds = 1 1 h s ds = 1 h 2 2 h 26

Calculating the Matrix Exponential Pen and paper for small systems Φ = L 1 (si A) 1 Matlab for large systems (numeric or symbolic calculations) >> syms h >> A = [ 1; ]; >> expm(a*h) ans = [ 1, h] [, 1] 27

Calculating the Matrix Exponential One can show that ) Φ Γ A B = exp ( h I Simultaneous calculation of Φ and Γ >> syms h >> A = [ 1; ]; >> B = [; 1]; >> expm([a B;zeros(1,size(A)) ]*h) ans = [ 1, h, 1/2*h^2] [, 1, h] [,, 1] 28

Sampling of System with Time Delay u( t) Delayed signal τ t kh h kh kh + h kh + 2h t 29

Sampling of System with Time Delay Input delay τ h (assumed to be constant) dx(t) dt = Ax(t)+Bu(t τ) x(kh+h) Φx(kh) = = kh+τ kh kh+h kh e A(kh+h s ) Bu(s τ)ds e A(kh+h s ) ds B u(kh h)+ τ = e A(h τ) e As dsb u(kh h)+ } {{ } Γ 1 kh+h kh+τ h τ x(kh+h) = Φx(kh)+Γ 1 u(kh h)+γ u(kh) e As dsb } {{ } Γ e A(kh+h s ) ds B u(kh) u(kh) 3

Sampling of System with Time Delay Introduce a new state variable z(kh) = u(kh h) Sampled system in state-space form x(kh+h) Φ Γ 1 x(kh) Γ = + u(kh) z(kh+h) z(kh) I The approach can be extended also for τ > h h < τ 2h two extra state variables, etc. Similar techniques can also be used to handle output delays and delays that are internal in the plant. In continuous-time delays mean infinite-dimensional systems. In discrete-time the sampled system is a finite-dimensional system easier to handle 31

Example Double Integrator with Delay τ h 1 h Φ = e Ah = 1 τ 1 h τ τ 2 /2 hτ τ 2 /2 Γ 1 = e A(h τ) e As dsb = = 1 τ τ h τ (h τ) 2 /2 Γ = e As dsb = h τ x(kh+h) = Φx(kh)+Γ 1 u(kh h)+γ u(kh) 32

Solution of the Discrete System Equation x(1) = Φx()+Γu() x(2) = Φx(1)+Γu(1). = Φ 2 x()+φγu()+γu(1) k 1 x(k) = Φ k x()+ Φ k j 1 Γu(j) j= k 1 y(k) = CΦ k x()+ CΦ k j 1 Γu(j)+Du(k) j= Two parts, one depending on the initial condition x() and one that is a weighted sum of the inputs over the interval [,k 1] 33

Stability Definition The linear discrete-time system x(k +1) = Φx(k), x() = x is asymptotically stable if the solution x(k) satisfies x(k) as k for all x R n. Theorem A discrete-time linear system is asymptotically stable if and only λ i (Φ) < 1 for all i = 1,...,n. 34

The matrix Φ can, if it has distinct eigenvalues, be written in the form k λ 1 λ 1 Φ = U... U 1. Hence Φ k = U... U 1. k λ n λ n The diagonal elements are the eigenvalues of Φ. Φ k decays exponentially if and only if λ i (Φ) < 1 for all i, i.e. if all the eigenvalues of Φ are strictly inside the unit circle. This is the asymptotic stability condition for discrete-time systems If Φ has at least one eigenvalue outside the unit circle then the system is unstable If Φ has eigenvalues on the unit circle then the multiplicity of these eigenvalues decides if the system is stable or unstable Eigenvalues obtained from the characteristic equation det(λi Φ) = 35

Stability Regions In continuous time the stability region is the complex left half plane, i.e,, the system is asymptotically stable if all the poles are strictly in the left half plane. In discrete time the stability region is the unit circle. 1 1 36

The Sampling-Time Convention In many cases we are only interested in the behaviour of the discrete-time system and not so much how the discrete-time system has been obtained, e.g., through ZOH-sampling of a continuous-time system. For simplicity, then the sampling time is used as the time unit, h = 1, and the discrete-time system can be described by x(k +1) = Φx(k)+Γu(k) y(k) = Cx(k) + Du(k) Hence, the argument of the signals is not time but instead the number of sampling intervals. This is known as the sampling-time convention. 37

Discrete-time systems may converge in finite time Consider the discrete-time system 1/2 x(k +1) = x(k) We then have that x(2) = for all x(). Thus, the system converges in finite time! Φ has its eigenvalues in the origin Deadbeat Finite-time convergence is impossible for continuous-time linear systems. Hence, the above system cannot have been obtained by sampling a continuous-time system (However, it can be obtained through feedback applied to a continuous-time system, see Lecture 9). 38

Pulse Response 1 1.8.8.6.6.4.2 u h.4.2 5 1 5 1 x(1) = Γ x(2) = ΦΓ x(3) = Φ 2 Γ... h(1) = CΓ h(2) = CΦΓ h(3) = CΦ 2 Γ... h() = D h(k) = CΦ k 1 Γ k = 1,2,3,... (Continuous-time: h(t) = Ce At B +Dδ(t) t ) 39

Convolution Swedish: Faltning Continuous time: (h u)(t) = Discrete time: t h(t s)u(s)ds t k (h u)(k) = h(k j)u(j) k =,1,... j= 4

Solution to the System Equation The solution to the system equation k 1 y(k) = CΦ k x()+ CΦ k j 1 Γu(j)+Du(k) j= can be written in terms of the pulse response y(k) = CΦ k x()+(h u)(k) Two parts, one that depends on the initial conditions and one that is a convolution between the pulse response and the input signal 41

Reachability Definition A discrete-time linear system is reachable if for any final state x f, it is possible to find u(),u(1),...,u(k 1) which drives the system state from x() = to x(k) = x f for some finite value of k. Theorem The discrete-time linear system is reachable if and only if rank(w C ) = n where W C = Γ ΦΓ Φ n 2 Γ Φ n 1 Γ is the reachability matrix and n is the order of the system. 42

Controllability Definition A discrete-time linear system is controllable if for any initial state x(), it is possible to find u(),u(1),...,u(k 1) so that x(k) = for some finite value of k. If a system is reachable it is also controllable, but there are discrete-time linear systems which are controllable but not reachable. One such example is 1/2 1 x(k +1) = x(k)+ u(k) Although W C does not have full rank, u(k) = yields x(2) = no matter which x(). A system is completely controllable if it is controllable in n steps A system is completely controllable if and only if all the eigenvalues of the unreachable part of the system are at the origin 43

Stabilizability Definition A discrete-time linear system is stabilizable if the states of the system can be driven asymptotically to the origin Theorem A discrete-time linear system is stabilizable if and only if all the eigenvalues of its unreachable part are strictly inside the unit circle Reachability Controllability Stabilizability 44

Observability Definition The pair of states x 1 x 2 R n is called indistinguishable from the output y if for any input sequence u y(k,x 1,u) = y(k,x 2,u), k A linear system is called observable if no pair of states are indistinguishable from the output Theorem The discrete-time linear system is observable if and only if rank(w O ) = n where C W O = CΦ. CΦ n 1 is the observability matrix and n is the system order 45

Reconstructability Definition A discrete-time linear system is reconstructable if there is a finite k such that knowledge about inputs u(),u(1),...,u(k 1) and outputs y(),y(1),...,y(k 1) are sufficient for determining the initial state x() Theorem A system is reconstructable if and only if all the eigenvalues of the nonobservable part are zero 46

Detectability Definition A system is detectable if the only unobservable states are such that they decay to the origin, i.e., the corresponding eigenvalues are asymptotically stable. Observability Reconstructability Detectability 47

Duality There is a duality betweeen the reachability and the observability properties: Reachable Observable Controllable Reconstructable Completely Controllable Completely Reconstructable (in n steps) Stabilizable Detectable (asymptotically) We will return to these concepts in Lecture 9. 48

Kalman decomposition In the same way as for continuous-time linear systems one can decompose a system into (un)controllable and (un)observable subsystems, using a state tranformation z = Tx where S ro is reachable and observable S rō is reachable but not observable S ro is not reachable but observable S rō is neither reachable nor observable 49

Difference Equations Difference equation of order n: y(k)+a 1 y(k 1)+ +a n y(k n) = b 1 u(k 1)+ +b n u(k n) Differential equation of order n: d n y dt n +a d n 1 y 1 dt n 1 + +a d n 1 u ny = b 1 dt n 1 + +b nu 5

From Difference Equation to Reachable Caconical Form y(k)+a 1 y(k 1)+ +a n y(k n) = b 1 u(k 1)+ +b n u(k n) Start with b 1 = 1 and b 2 = = b n = in difference equation above Put k k +1, and y(k) = z(k): gives x(k +1) = z(k +1)+a 1 z(k)+ +a n z(k n+1) = u(k) x(k) = [z(k) z(k 1)... z(k n+1)] T z(k+1) z(k). z(k n+2) z(k) = [1... ]x(k) a 1 a 2... a n 1 = 1....... x(k)+. u(k) 1 51

Reachable Canonical Form Let y(k) = b 1 z(k)+b 2 z(k 1)+ +b n z(k n) Then (think superposition!) a 1 a 2... a n 1 1... x(k +1) =..... x(k)+.. u(k) which corresponds to 1 y(k) = [b 1 b 2... b n ]x(k) y(k)+a 1 y(k 1)+ +a n y(k n) = b 1 u(k 1)+ +b n u(k n) 52

State-Space Realizations By choosing different state variables, different state-space models can be derived which all describe the same input output relation A realization is minimal if the number of states is equal to n. In the direct form the states are selected as the old values of y together with the old values of u non-minimal. Some realizations have better numerical properties than others, see Lecture 11. 53

Some useful Matlab commands >> A = [ 1; ] >> B = [;1] >> C = [1 ] >> D = >> contsys = ss(a,b,c,d) >> h =.1 >> discsys = c2d(contsys,h) % ZOH sampling >> pole(discsys) >> impulse(discsys) >> step(discsys) 54