Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Mathematical Models of Systems © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-1 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Dynamics of systems • Dynamics describes how the states evolves, as a function on the current state and any external inputs • Inputs describe the external excitation of the dynamics • Outputs describe the directly measured variables Outputs are a function of the state and inputs ⇒ not independent variables Not all states are outputs; some states can’t be directly measured © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-2 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Dynamics of Mechanical Systems © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-3 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Dynamics of Mechanical Systems © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-4 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Dynamics of Electrical Systems © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-5 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Dynamics of Thermal Systems Derive dynamic equation of the tank C: Thermal capacitance hi: Heat rate of input ho: : Change of temperature © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-6 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems What is your observation? • The dynamics of many systems, whether they are mechanical, electrical, thermal, and so on, may be described in terms of differential equations • The differential equations may be obtained by using physical laws governing a particular system (e.g., Newton’s laws for mechanical systems and Kirchhoff’s laws for electrical systems) • Deriving reasonable mathematical models is the most important part of the entire analysis of control systems © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-7 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems System modeling Models are a mathematical representations of system dynamics: • Models allow the dynamics to be simulated and analyzed, without having to build the system • Models are never exact, but they can be predictive The model you use depends on the questions you want to answer • A single system may have many models • Time and spatial scale must be chosen to suit the questions you want to answer • Always formulate questions before building a model © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-8 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems The principle of causality The current output of the system (the output at time t = 0) depends on the past input (the input for t0) Examples of causal systems - Memoryless system: ∝ - Autoregressive filter: Examples of noncausal systems - Central moving average: - Time reversal: © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-9 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Linear systems A system is called linear if the principle of superposition applies Given : → then Linear time invariant system (LTI) The coefficients are constants or functions only of the independent variable Linear timevarying system (LTV) The coefficients are functions of time: Ex: Spacecraft control system (The mass of a spacecraft changes due to fuel consumption) © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-10 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems How to find the output in time domain? The output Y(s) can be written as the product of G(s) and X(s) Taking an inverse Laplace transform gives the following convolution integral: If the input is an impulse Complete information of the system (the dynamic characteristics of the system) can be obtained by exciting it with an impulse input and measuring the response © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-19 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Matlab for Dynamic Systems and Control © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-20 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Modelling in State Space Why we need state space model? - Q: Are transfer function (TF) enough to model systems? - A: TF is not applicable and convenience for MIMO (multi input multi output), LTV, and nonlinear system Frequency domain Transfer function SISO-LTI Time domain State space model SISO-LTI SISO-LTV MIMO-LTI MIMO-LTV Nonlinear system © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-21 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems States and States Variables - State of a dynamic system is the smallest set of variables with the input that completely determines the behavior of the system State variables of a dynamic system are the variables making up the smallest set of variables that determine the state of the dynamic system State vector: If n state variables are needed to completely describe the behavior of a given system, then these n state variables can be considered the n components of a vector x State space: The n-dimensional space whose coordinate axes consist of the x1 axis, x2 axis,…, xn axis, where x1 axis, x2 axis,…, xn axis are state variables, is called a state space State-space equations include modeling of dynamic systems input variables, output variables, and state variables © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-22 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems States Space Model Differential equation of states Define Output equation LTI model LTV model State equation © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-23 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Differential equation Defining state variables output variables state space model © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-24 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Differential equation Define state variables outputs of the system state space model © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-25 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems What we can with the system including derivatives of input? © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-26 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Consider the differential equation system define the following n variables as a set of n state variables with © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-27 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Rewrite the differential equation: © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-28 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Compute the coefficients: Then, we obtain the state equation and output equation © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-29 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems In matrix form © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-30 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Connection between Transfer Functions and State-Space Equations Q?: How to get an inverse of a matrix © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-31 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Connection between Transfer Functions and State-Space Equations © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-32 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems END OF CHAPTER LINEAR SYSTEM THEORY WILL BE THE NEXT © 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-33 ... 0 -16 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Dynamics of Electrical Systems Taking a Laplace transform 11 11 Transfer function 1 © 2 015 Quoc Chi Nguyen, Head of Control. .. Matlab for Dynamic Systems and Control © 2 015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-20 Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems... Dynamic Systems and Control, Chapter 1: Mathematical Models of Systems Dynamics of Electrical Systems © 2 015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 0-5 Dynamic