CIS 540 Principles of Embedded Computation Spring 2016 Instructor: Rajeev Alur

Slides:



Advertisements
Similar presentations
Ch 7.6: Complex Eigenvalues
Advertisements

Ch 7.7: Fundamental Matrices
Chapter 6 Eigenvalues and Eigenvectors
Section 5.1 Eigenvectors and Eigenvalues. Eigenvectors and Eigenvalues Useful throughout pure and applied mathematics. Used to study difference equations.
Lecture 17 Introduction to Eigenvalue Problems
ENGG2013 Unit 25 Second-order Linear DE
Eigenvalues and Eigenvectors
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Linear Transformations
Symmetric Matrices and Quadratic Forms
Ch 7.8: Repeated Eigenvalues
Chapter 6 Eigenvalues.
Lecture 18 Eigenvalue Problems II Shang-Hua Teng.
1 Lavi Shpigelman, Dynamic Systems and control – – Linear Time Invariant systems  definitions,  Laplace transform,  solutions,  stability.
6 1 Linear Transformations. 6 2 Hopfield Network Questions.
Modern Control Systems1 Lecture 07 Analysis (III) -- Stability 7.1 Bounded-Input Bounded-Output (BIBO) Stability 7.2 Asymptotic Stability 7.3 Lyapunov.
1 Lavi Shpigelman, Dynamic Systems and control – – Linear Time Invariant systems  definitions,  Laplace transform,  solutions,  stability.
Matrices CS485/685 Computer Vision Dr. George Bebis.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Linear Algebra Review 1 CS479/679 Pattern Recognition Dr. George Bebis.
Autumn 2008 EEE8013 Revision lecture 1 Ordinary Differential Equations.
Eigenvalues and Eigenvectors
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Matrices CHAPTER 8.1 ~ 8.8. Ch _2 Contents  8.1 Matrix Algebra 8.1 Matrix Algebra  8.2 Systems of Linear Algebra Equations 8.2 Systems of Linear.
Chapter 7 Stability and Steady-State Error Analysis
Chapter 5 Eigenvalues and Eigenvectors 大葉大學 資訊工程系 黃鈴玲 Linear Algebra.
Vector Norms and the related Matrix Norms. Properties of a Vector Norm: Euclidean Vector Norm: Riemannian metric:
Elementary Linear Algebra Anton & Rorres, 9 th Edition Lecture Set – 07 Chapter 7: Eigenvalues, Eigenvectors.
5.1 Eigenvectors and Eigenvalues 5. Eigenvalues and Eigenvectors.
Instructor: Mircea Nicolescu Lecture 8 CS 485 / 685 Computer Vision.
5 5.1 © 2016 Pearson Education, Ltd. Eigenvalues and Eigenvectors EIGENVECTORS AND EIGENVALUES.
Boot Camp in Linear Algebra TIM 209 Prof. Ram Akella.
DYNAMIC BEHAVIOR OF PROCESSES :
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Characteristic Polynomial Hung-yi Lee. Outline Last lecture: Given eigenvalues, we know how to find eigenvectors or eigenspaces Check eigenvalues This.
Eigenvalues, Zeros and Poles
Chapter 6 Eigenvalues and Eigenvectors
Systems of Linear Differential Equations
ISHIK UNIVERSITY FACULTY OF EDUCATION Mathematics Education Department
CS479/679 Pattern Recognition Dr. George Bebis
Eigenvalues and Eigenvectors
Boyce/DiPrima 10th ed, Ch 7.7: Fundamental Matrices Elementary Differential Equations and Boundary Value Problems, 10th edition, by William E. Boyce and.
Boyce/DiPrima 10th ed, Ch 7.8: Repeated Eigenvalues Elementary Differential Equations and Boundary Value Problems, 10th edition, by William E. Boyce.
§7-4 Lyapunov Direct Method
CHE 391 T. F. Edgar Spring 2012.
Autonomous Cyber-Physical Systems: Basics of Control
Final value theorem Conditions: f(t) is finite and converges
Autonomous Cyber-Physical Systems: Dynamical Systems
Research Methods in Acoustics Lecture 9: Laplace Transform and z-Transform Jonas Braasch.
Three Dimensional Systems of Linear Ordinary Differential Equations
Digital Control Systems
Chapter 6 Eigenvalues Basil Hamed
8. Stability, controllability and observability
Stability Analysis of Linear Systems
Symmetric Matrices and Quadratic Forms
Homework 3: Transfer Function to State Space
Linear Algebra Lecture 32.
Engineering Mathematics-I Eigenvalues and Eigenvectors
Boyce/DiPrima 10th ed, Ch 7.6: Complex Eigenvalues Elementary Differential Equations and Boundary Value Problems, 10th edition, by William E. Boyce and.
EIGENVECTORS AND EIGENVALUES
Linear Algebra Lecture 29.
Homework 3: Transfer Function to State Space
Linear Algebra Lecture 35.
Eigenvalues and Eigenvectors
Subject :- Applied Mathematics
Linear Time Invariant systems
Eigenvalues and Eigenvectors
Symmetric Matrices and Quadratic Forms
Presentation transcript:

CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur

Control Design Problem Plant model as Continuous-time Component H Uncontrolled Inputs Observable Outputs  Design a controller C so that the composed system C || H is stable  Is there a mathematical way to check when a system is stable?  Is there a way to design C so that C||H is stable ?  Yes, if the plant model is linear ! Controllable inputs Controller C CIS 540 Spring 2016; Lecture April 4

Eigenvalues and Eigenvectors  For an (n x n) matrix A, if the equation A x = x holds, for an n- dimensional non-zero vector x and scalar, then x is called an eigenvector of A, and is called a corresponding eigenvalue  The characteristic polynomial of A is the degree-n polynomial in variable given by Determinant(A – I )  For 2 x2 matrix A, it is (A 1,1 - )(A 2,2 - ) - A 1,2 A 2,1  Eigenvalues are the roots of this characteristic polynomial  An eigenvalue can be a complex number  Multiplicity of eigenvalue can be more than 1  If A is a diagonal matrix then diagonal entries are the eigenvalues  For a given eigenvalue, compute the corresponding eigenvector(s) by solving system of linear equations A x = x, with unknown vector x  If all eigenvalues are distinct then corresponding eigenvectors are linearly independent CIS 540 Spring 2016; Lecture April 4

Response of Linear Systems  S contains n variables, system has no inputs, and dynamics is given by: dS/dt = A S; initial state is s 0  Execution is given by the signal S(t) = e At s 0  Matrix exponential e A = I + A + A 2 /2 + A 3 /3! + A 4 /4! + …  If A is diagonal matrix D(a 1, a 2, … a n ) then e A is the diagonal matrix D(e a1, e a2, …e an )  What if A is not diagonal?  Consider the behavior of a transformed system whose dynamics is simpler to analyze! CIS 540 Spring 2016; Lecture April 4

Similarity Transformation  Consider H with dynamics given by: dS/dt = A S; Initial state s 0  Let P be an invertible (n x n) matrix  Consider the dynamical system H’ whose state vector S’ is P -1 S  Note the original system state S equals P S’  Dynamics of the transformed system H’ d/dt S’ = d/dt (P -1 S) = P -1 dS/dt = P -1 A S = P -1 A P S’ = J S’  The matrix J = P -1 A P, and is said to be similar to A  Initial state of transformed system H’ is S’(0) = P -1 s 0  Response of the transformed system H’ is given by S’(t) = e Jt P -1 s 0  Response of original system S(t) = P e Jt P -1 s 0  When is all this useful ??  Choose P so that J is diagonal ! CIS 540 Spring 2016; Lecture April 4

Similarity Transformation using Eigenvectors  Consider H with dynamics is given by: dS/dt = A S; Initial state s 0  Calculate eigenvalues 1,…  n and eigenvectors x 1, … x n  Suppose all eigenvectors are linearly independent  Consider the (n x n) matrix P = [x 1 x 2 … x n ]  Let P -1 be its inverse (note: inverse must exist in this case)  Claim: The matrix J = P -1 A P is the diagonal matrix D( 1,…  n )  Execution of the system is given by S(t) = P D(e  t, …e n t ) P -1 s 0 CIS 540 Spring 2016; Lecture April 4

Example: Response of Linear Systems Consider 2-dimensional system with dynamics given by d s 1 = 4 s s 2 d s 2 = s s 2 1.Calculate eigenvalues 1 and 2 of A = [[4 6] [1 3]] 2.Calculate eigenvectors x 1 and x 2 3.Choose the similarity transformation matrix P = [x 1 x 2 ] 4.Find the inverse P -1 of P 5.Calculate J = P -1 A P (verify this is indeed diagonal matrix D[ 1 2 ]) 6.Desired solution is S(t) = P J P -1 s 0 CIS 540 Spring 2016; Lecture April 4

Back to Equilibria and Stability  Consider a linear system H with dynamics given by: dS/dt = A S  A state s is an equilibrium state of H if A s = 0  How to compute equilibria: solve system of linear equations  Claim 1: the state 0 is always an equilibrium  Claim 2: If A is invertible, then 0 is the sole equilibrium  If state s 0 is a (non-zero) equilibrium of the system H, then consider the transformed system H’ whose state S’ = S – s 0  Properties of the equilibrium 0 of the transformed system H’ coincide with the properties of the equilibrium s 0 of H  Henceforth, let us focus on a linear system H and the equilibrium 0  H is stable = equilibrium state 0 is stable  H is asymptotically stable = equilibrium 0 is asymptotically stable CIS 540 Spring 2016; Lecture April 4

Stability: Single Dimensional System  Consider a single-dimensional linear system H with dynamics is given by: dx/dt = a x  H is stable: for every  >0, there exists  >0 such that for all states s 0 with || s 0 || =0, ||e at s 0 ||<   H is asymptotically stable: there exists  >0 such that for all states s 0 with || s 0 ||< , ||e at s 0 ||  0 as t  infinity  Case coefficient a < 0: e at s 0 converges exponentially to 0 as t goes to infinity, no matter what the initial state s 0 is. Asymptotically stable !  Case coefficient a = 0: dynamics is dx/dt = 0. The state stays equal to the initial state. Stable but not asymptotically stable.  Case coefficient a > 0: e at grows exponentially as t increases, and thus, state diverges away from 0. Unstable ! CIS 540 Spring 2016; Lecture April 4

Stability: Diagonal State Dynamics  Consider n-dimensional linear system H with dynamics given by dS/dt = A S, where A is the diagonal matrix D(a 1, … a n )  Each dimension evolves independently: the i-th component of state vector at time t is e ai t s 0i where s 0 is the initial state vector  Case all coefficients a i < 0: Asymptotically stable ! State converges to the equilibrium 0 no matter what the initial state is  Case all coefficients a i <= 0: Stable. Not asymptotically stable if some coefficient a i = 0 (this state component stays unchanged)  Case some coefficient a i > 0: Unstable ! Some state component grows unboundedly away from equilibrium 0 CIS 540 Spring 2016; Lecture April 4

Similarity Transformations and Stability  Consider H with dynamics given by: dS/dt = A S  Let P be an invertible (n x n) matrix, and consider J = P -1 A P  Consider the dynamical system H’ whose state vector S’ is P -1 S, and note the original system state S equals P S’  Response of the transformed system H’ is given by S’(t) = e Jt P -1 s 0  Response of original system S(t) = P e Jt P -1 s 0  Response signal of H’ is simply a linear transformation of the response signal of H  If a signal is bounded, then its linear transformation is also bounded  The bounds can be different  If a signal converges to 0, then so does its linear transformation  Claim: H is stable if and only if H’ is stable  Claim: H is asymptotically stable if and only if H’ is asymptotically stable CIS 540 Spring 2016; Lecture April 4

Eigenvalues and Stability  Consider H with dynamics is given by: dS/dt = A S  Suppose all eigenvalues 1,…  n are real and distinct  Then all eigenvectors are guaranteed to be linearly independent  Choose (n x n) matrix P = [x 1 x 2 … x n ] for similarity transformation  The matrix J = P -1 A P is the diagonal matrix D( 1,…  n )  If all eigenvalues are negative, the transformed system is asymptotically stable, and so is the original system  If all eigenvalues are non-positive, the transformed system is stable, and so is the original system  Theorem: Linear system H with dynamics dS/dt = A S is asymptotically stable if and only if every eigenvalue of the matrix A has a negative real part CIS 540 Spring 2016; Lecture April 4

Continuous-time Component Car v F dx = v; dv = (F - kv)/ m;  The matrix A is given by [ [ 0 1] [ 0 -k/m] ]  Eigenvalues: 0 and –k/m  Conclusion: Stable  If we consider only the velocity, then asymptotically stable  Set F=0, and analyze what happens if we perturb the system from the equilibrium x=0, v=0 CIS 540 Spring 2016; Lecture April 4

Lyapunov Stability vs BIBO Stability  Consider linear component H with dynamics given by: dS/dt = A S + B I; O = C S + D I  BIBO stability: Starting from initial state 0, if the input is a bounded signal, output must be a bounded signal  Theorem: For linear components, asymptotic stability implies BIBO stability  Note: Asymptotic stability depends only on the properties of matrix A  Proof of the theorem relies of analysis of dynamical systems using transfer functions CIS 540 Spring 2016; Lecture April 4

Control Design Problem Plant model as Continuous-time Component H Uncontrolled inputs Observable Outputs  Design a controller C so that the composed system C || H is stable  Reference inputs are high-level commands supplied by humans (e.g. desired speed of the car, temperature in the room)  Controller should satisfy additional safety/liveness requirements corresponding to reference inputs (e.g. speed of car eventually becomes close to desired cruising speed) Controllable inputs Controller C Reference inputs CIS 540 Spring 2016; Lecture April 4

Feedback Controller for Helicopter Model  Design controller so that composed system is stable  Error e = (r –s) : difference in desired value and observed output  Proportional controller: Its output is proportional to this error  Constant K P : Proportional Gain  Note that the direction of torque changes with sign of the error ds = T / I Torque T Spin s Helicopter plant T = K P (r-s) Reference r Controller CIS 540 Spring 2016; Lecture April 4

Stabilizing Controller for Helicopter Model  Dynamics of the composed system: ds/dt = K P (r – s) /I  When is this system asymptotically stable ? BIBO stable?  If the coefficient –K P /I is negative  Control design: choose a positive gain constant K P  Rate of convergence depends on its magnitude ds = T / I Torque T Spin s Helicopter plant T = K P (r-s) Reference r Controller CIS 540 Spring 2016; Lecture April 4