
Autonomous Cyber-Physical Systems: Dynamical Systems Overview
Explore the nature of dynamical systems in autonomous cyber-physical systems, emphasizing continuous and discrete models using differential equations and state variables. Understand components like algebraic and differential elements, with examples such as a simple car model. Dive into the execution and state trajectories of these systems, bridging the gap between theory and practical application.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Autonomous Cyber-Physical Systems: Dynamical Systems Spring 2018. CS 599. Instructor: Jyo Deshmukh Acknowledgment: Some of the material in these slides is based on the lecture slides for CIS 540: Principles of Embedded Computation taught by Rajeev Alur at the University of Pennsylvania. http://www.seas.upenn.edu/~cis540/ USC Viterbi School of Engineering Department of Computer Science
Dynamical Systems Most natural model for describing most physical systems Continuous/discrete systems that continuously evolve over time Convenient to model such systems with differential equations Typically consist of physical quantities modeled as state variables Pressure, Temperature, Velocity, Acceleration, Current, Voltage, etc. Could include algebraic relations between state variables Execution semantics similar to synchronous models, but with continuous- time semantics instead of discrete-time USC Viterbi School of Engineering Department of Computer Science 2
Continuous-time Component (Algebraic) real x real error real xref error = (x xref) Input variables: x and xref of type real, Output variable: error of type real No state variables Signals: Assignments of values to variables as a function of time At each time t, error(t) = x(t) xref(t) Input/Output relation expressed algebraically instead of as an assignment USC Viterbi School of Engineering Department of Computer Science 3
Model of a simple car Position ? Force ? Velocity ? Friction ?? Newton s law of motion: ? ?? = ??2? ??2;? =?? ?? USC Viterbi School of Engineering Department of Computer Science 4
Continuous-time component (differential) real ???? ? ? ?? real ???? ? ? ?? Rate of change of each state variable and output variables defined using expressions over inputs and states ? ? ? ??2? ??2= ? ?? ? =?? ? = ? ?? ? =? ?? ? Expressions, not assignments! USC Viterbi School of Engineering Department of Computer Science 5
Executions of Car Let ? represent a set representing time instants, i.e. ? 0 Input Signal: Function ? from ? Input signal is assumed to be continuous or piecewise-continuous Given an initial state (?0,?0) and an input signal ?(?), the execution of the system is defined by state-trajectories? ? and ? ? (from ? to ) that satisfy the initial-value problem: ? 0 = ?0; ? 0 = ?0 ? = ? ? ; ? =? ? ?? ? ? USC Viterbi School of Engineering Department of Computer Science 6
Sample Execution of Car Suppose ?:? ? = 0,?0= 5 m,?0= 20 m/s. Then, we need to solve: ? 0 = 5;? 0 = 20 ? = ?; ? = ?? ? Solution to above differential equation (solve for ? first, then ?): ? ? = ?0? ?? ? Note, as ? , ? ? 0, and ? ? ??0 1 ? ?? ?; ? ? =??0 ? ? = 1000kg ? = 50??/? ? USC Viterbi School of Engineering Department of Computer Science 7
Simulink and Breach Brief Demo Plot of Signals vs. Time USC Viterbi School of Engineering Department of Computer Science 8
Simulink and Breach Demo Plot in phase-space or state- space. Shows trajectory of states starting from ?0= 5, ?0= 20 USC Viterbi School of Engineering Department of Computer Science 9
Sample Execution of Car with constant force Suppose ?:? ? = 500 N,?0= 5 m,?0= 20 m/s. Then, we need to solve: ? 0 = 0;? 0 = ?0 ? = ?; ? = ?? ? Solution to above differential equation (solve for ? first, then ?): Compute solution using Simulink/Matlab/Breach ? = 1000kg ? = 50??/? USC Viterbi School of Engineering Department of Computer Science 10
Plots Phase Plot Input/Output Signals USC Viterbi School of Engineering Department of Computer Science 11
Continuous-Time Component Definition Set ? of real-valued input variables Set ? or real-valued output variables Set ? of real-valued (continuous) state variables Initialization ???? specifying a set ?0of initial values for states Dynamics: for each state variable, ?, a real valued expression ? over ? and ? Output Function: for each output variable, ?, a real valued expression over ? and ?. USC Viterbi School of Engineering Department of Computer Science 12
Execution Definition Convention: ? = ?1,?2, ??,? = (?1,?2, ,??) Given an input signal ?:? , an execution consists of a differentiable state signal ? t , and an output signal ? ? , such that: 1. 1. ? 0 ?0 2. For each output variable ? and time t, ? ? = ? ? ,? ? 3. For each state variable ?, ? ??? ? = ?(? ? ,? ? ) ? = ? ?,? ? = (?,?) USC Viterbi School of Engineering Department of Computer Science 13
Existence and Uniqueness of Solutions Given an input signal ?(?), when are we guaranteed that the system has at least one execution? Is there nondeterminism in continuous-time components? Input signal should be piecewise-continuous, and additional conditions need to be imposed on the RHS of dynamics (?) and output functions ( ) Related to solutions for the initial value problem in the classical theory of ODEs USC Viterbi School of Engineering Department of Computer Science ? = ? ?,? ? = (?,?) 14
Existence There exists at least one solution ?(?) if the function ? is continuous Definition of continuity uses notion of distance between points 2+ + ?? ?? 2 Euclidean distance: ? ?,? = ? ?2= ? is uniformly continuous if for all ? > 0, there exists a ? > 0, such that for all ?,? ?, if ? ?2< ?, then ? ? ? ? Example when solution does not globally exist: ?1 ?1 2< ?. ??= 1 if x = 0 0 otherwise ?? USC Viterbi School of Engineering Department of Computer Science ? = ? ?,? ? = (?,?) 15
Uniqueness Solution to initial value problem is unique if ? is Lipschitz continuous Lipschitz-continuity is a stronger version of continuity: upper bounds how fast a function can change Function ? is Lipschitz-continuous if there exists a constant ? (called the Lipschitz constant) such that: ?,? ?: ? ? ? ? ? ? ? Examples: Linear functions (e.g. ?1 3?2) are Lipschitz continuous Functions: ?2, ? are not Lipschitz continuous over ? Can restrict ? and ? to some bounded and closed set such that ? is piecewise-continuous and Lipschitz to get unique solutions over such compact domains USC Viterbi School of Engineering Department of Computer Science ? = ? ?,? ? = (?,?) 16
What do Matlab/Simulink do? Allow modeling arbitrarily complex functions: even functions with unbounded discontinuities May not be even possible to check for Lipschitz conditions for what s implemented in a Matlab function/Simulink model Rely on numerical integration schemes/solvers to obtain solutions ode45, ode23, ode15, etc. We assume that any continuous component model we will use can be numerically simulated by Matlab/Simulink USC Viterbi School of Engineering Department of Computer Science 17
Linear Systems Equation of simple car dynamics can be written compactly as: ? ? 0 ?/? 0 1 ? ?+0 = 1[?] 0 0 1 ?/?, ? =0 Letting ? = 1, we can re-write above equation in the form: ? = ?? + B?, where ? = ? ? , and ? = ? USC Viterbi School of Engineering Department of Computer Science 18
Linear Components Linear components model linear systems ? is of the form ?1?1+ ?2?2+ + ???? or compactly, ? = ?? is of the form ?1?1+ ?2?2+ + ???? or compactly, = ?? Linear algebra was invented to reason about linear systems! Linear systems have many nice properties: Many analysis methods in the frequency domain (using Fourier/Laplace transform methods) Superposition principle (net response to two or more stimuli is the sum of responses to each stimulus) USC Viterbi School of Engineering Department of Computer Science 19
Solutions to Linear Systems Autonomous linear system has no inputs: ? = ?? Solution of autonomous linear system can be fully characterized: ? ? = ????0 ?? is a matrix exponential = ? + ? +?2 ?? is usually approximated to the first ? terms Computing ?? is easy if ? is a diagonal matrix (non-zero elements are only on the diagonal) In practice, numerical integration methods outperform matrix exponential For a linear system with exogenous inputs? ? ? = ????0+ 0 2!+?3 3!+?4 4!+ ??? ? ??? ? ?? USC Viterbi School of Engineering Department of Computer Science 20
Stability of Systems Property capturing the ability of a system to return to a quiescent state after perturbation Stable systems recover after disturbances, unstable systems may not Almost always a desirable property for a system design Fundamental problem in control: design controllers to stabilize a system Problem: Inverted Pendulum on a moving cart is inherently unstable, aim: keep it upright Solution Strategy: Move cart in direction in the same direction as the pendulum s falling direction Design problem: Design a controller to stabilize the system by computing velocity and direction for cart travel USC Viterbi School of Engineering Department of Computer Science 21
Lyapunov stability ? ?(0) System ? = ? ? Equilibrium point when ? ? is zero (say ? ) Equilibrium point ? is Lyapunov-stable if: For every ? > 0, There exists a ? > 0, such that if ? 0 ? for every ? 0, we have ? ? ? < ?,then, < ? ?-ball ?-ball USC Viterbi School of Engineering Department of Computer Science 22
Asymptotic + Exponential Stability System ? = ? ? Equilibrium point ? is asymptotically-stable if: ? is Lyapunov-stable + There exists ? > 0 s.t. if ? 0 ? ? ? ? ? = 0 < ?, then lim Equilibrium point ? is exponentially-stable if: ? is asymptotically stable + There exist ? > 0,? > 0 s.t. if ? 0 ? ? ? ? < ?, then for all ? 0: ? ? 0 ? ? ?? USC Viterbi School of Engineering Department of Computer Science 23
What do these definitions all mean? Lyapunov stable: solutions starting ?close from equilibrium point must remain close (within ?) forever Asymptotically stable: solutions not only remain close, but also converge to the equilibrium Exponentially stable: solutions not only converge to the equilibrium, but in fact converge at least as fast as a known exponential rate All stable linear systems are exponentially stable This need not be true for nonlinear systems! USC Viterbi School of Engineering Department of Computer Science 24
Analyzing stability for linear systems Eigenvalues of a matrix ?: Value ? satisfying the equation ?? = ?. ?is called the eigenvector Equivalent to saying: values satisfying ? ?? = 0, where ? is the identity matrix Interesting result for linear systems: System ? = ?? is asymptotically stable if and only if every eigenvalue of ? has a negative real part Lyapunov stable if and only if every eigenvalue has non-positive real part Nonlinear systems: no simple analysis technique exists Next time we will look at Lyapunov s methods, which allow reasoning about stability of nonlinear systems USC Viterbi School of Engineering Department of Computer Science 25