ENGI9496 Lecture Notes State-Space Equation Generation

Similar documents
Part IB Numerical Analysis

Applied Math for Engineers

ODE Runge-Kutta methods

NUMERICAL SOLUTION OF ODE IVPs. Overview

Numerical Methods for the Solution of Differential Equations

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Solving Ordinary Differential equations

Modeling and Experimentation: Compound Pendulum

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

ENGI9496 Modeling and Simulation of Dynamic Systems Bond Graphs

Scientific Computing: An Introductory Survey

Ordinary Differential Equations (ODEs)

Multistep Methods for IVPs. t 0 < t < T

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods

Linear Multistep Methods I: Adams and BDF Methods

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP):

Efficient Simulation of Physical System Models Using Inlined Implicit Runge Kutta Algorithms

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras

Modeling Basics: 4. Numerical ODE Solving In Excel 5. Solving ODEs in Mathematica

Solving Ordinary Differential Equations

Consistency and Convergence

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations

Fourth Order RK-Method

Scientific Computing II

COSC 3361 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods

Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations

Euler s Method, cont d

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

A First Course on Kinetics and Reaction Engineering Supplemental Unit S5. Solving Initial Value Differential Equations

A first order system of ordinary di erential equations is a set of equations of the form .. (24) x 1 (t 0 )=x 10 x 2 (t 0 )=x 20.

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

Numerical Algorithms for ODEs/DAEs (Transient Analysis)

Lecture 17: Ordinary Differential Equation II. First Order (continued)

COMPARISON OF TWO METHODS TO SOLVE PRESSURES IN SMALL VOLUMES IN REAL-TIME SIMULATION OF A MOBILE DIRECTIONAL CONTROL VALVE

Numerical Integration of Equations of Motion

Functions as Infinitely Long Column Vectors

Cyber-Physical Systems Modeling and Simulation of Continuous Systems

Ordinary Differential Equations

Review for Exam 2 Ben Wang and Mark Styczynski

Numerical Methods for Engineers

Initial value problems for ordinary differential equations

Chapter 9 Implicit Methods for Linear and Nonlinear Systems of ODEs

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

Modeling & Simulation 2018 Lecture 12. Simulations

Initial value problems for ordinary differential equations

16.7 Multistep, Multivalue, and Predictor-Corrector Methods

Modeling of Dynamic Systems: Notes on Bond Graphs Version 1.0 Copyright Diane L. Peters, Ph.D., P.E.

Applied Numerical Analysis

Numerical Methods - Initial Value Problems for ODEs

REGLERTEKNIK AUTOMATIC CONTROL LINKÖPING

CHAPTER 10: Numerical Methods for DAEs

CS520: numerical ODEs (Ch.2)

Physics 299: Computational Physics II Project II

δ Substituting into the differential equation gives: x i+1 x i δ f(t i,x i ) (3)

Ordinary Differential Equations II

Differential Equations

ME451 Kinematics and Dynamics of Machine Systems

130 CHAPTER 4. SEQUENCES AND FUNCTIONS OF A DISCRETE VARIABLE

An initialization subroutine for DAEs solvers: DAEIS

Mathematics Qualifying Exam Study Material

Ordinary differential equations - Initial value problems

Virtual University of Pakistan

Exam in TMA4215 December 7th 2012

Computing DC operating points of non-linear circuits using homotopy methods

Black-Box Testing Techniques III

Chapter 6 - Ordinary Differential Equations

Optimising the Computational Simulation of Mechanical Models: Designing a Real-Time Mass-Aggregate Physics Engine

The Chemical Kinetics Time Step a detailed lecture. Andrew Conley ACOM Division

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi Lecture March, 2016

ODEs. PHY 688: Numerical Methods for (Astro)Physics

MATH 345 Differential Equations

Numerical Methods. Scientists. Engineers

G6943y: Myths and Methods in Modeling (M&M s in M)

Manifesto on Numerical Integration of Equations of Motion Using Matlab

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

Ordinary Differential Equations II

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations

Research Article Diagonally Implicit Block Backward Differentiation Formulas for Solving Ordinary Differential Equations

Fundamentals Physics

Numerical Methods for ODEs. Lectures for PSU Summer Programs Xiantao Li

Lösning: Tenta Numerical Analysis för D, L. FMN011,

A quadratic expression is a mathematical expression that can be written in the form 2

AM205: Assignment 3 (due 5 PM, October 20)

QUESTIONS FOR THE TESTS-ECI 146

Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras

Faster Kinetics: Accelerate Your Finite-Rate Combustion Simulation with GPUs

Three Body Problem using High-Order Runge-Kutta Interpolation

ODEs. PHY 688: Numerical Methods for (Astro)Physics

Astronomy 8824: Numerical Methods Notes 2 Ordinary Differential Equations

FIRST-ORDER ORDINARY DIFFERENTIAL EQUATIONS III: Numerical and More Analytic Methods David Levermore Department of Mathematics University of Maryland

I. Numerical Computing

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 21

APPLICATION TO TRANSIENT ANALYSIS OF ELECTRICAL CIRCUITS

Transcription:

ENGI9496 Lecture Notes State-Space Equation Generation. State Equations and Variables - Definitions The end goal of model formulation is to simulate a system s behaviour on a computer. A set of coherent mathematical equations must be written for the computer to solve. These equations are called state equations. The state equations are written in terms of state variables, defined as [A] minimum set of [variables] which contain enough information about a system's history to enable computation of its future behavior. www.answers.com The state variables must completely describe the effect of the past history of the system on its response in the future. are, ideally, independent (so that you can t express one as a combination of the others). are usually associated with energy storage elements, since energy stored in these elements at t = t o is transferred to other elements and affects future response. To predict future system response for time t t o, you need knowledge of inputs for time t t o initial values of a suitable set of state variables at time t = t o. Consider mass-spring system. How many state variables are required? What are they?

Numerical integration example, showing how to proceed when you can plug the current value of the state variables into the right-hand side, along with the value of the input, and calculate the derivatives of the state variables. This is Euler integration.

For greatest ease of computation, state equations should: be first order differential equations have left-hand side equal to the derivative of one of the state variables have right-hand side containing only state variables and input variables ideally be explicit (the state variable derivative appears only on the left-hand side) Given an nth-order system, with r input variables, the most general (non-linear) form of explicit state equations is (Karnopp et al. Eq n 5.0) x x x 3 φ φ φ 3 n n n r r x,x,,x ;u,u,,u x,x,,x ;u,u,,u x,x,,x ;u,u,,u r For linear systems, explicit state equations can be written in matrix-vector form: x Ax Bu where dim(a) = n x n, dim(b) = n x r. As you may have guessed, system order is the number of first-order state variables required. It can also be defined as the number of independent energy storage elements in a system. If you have an nth order system, then you can express the system dynamics as a single nth order differential equation in one unknown variable n first-order equations some combination of first and higher-order equations Go back to mechanical (or electrical) system example from Lecture handout. Write state equations in matrix-vector form.. Demonstrate that state variables are not unique. The following scans are the closest you ll ever find to a procedure for writing governing equations for electrical and mechanical systems, in a typical system dynamics textbook. From Close, Frederick and Newell: 3

Mechanical Electrical 4

. Implicit and Differential-Algebraic Equations Possible forms of the governing equations (state equations): A. Explicit Ordinary Differential Equations each equation expresses derivative of a state variable as an algebraic function of other state variables, inputs, and system parameters Sometimes additional state variables may be required beyond the typical variables associated with energy storage elements Equations will be of the form x f x, u, t which can be written in matrix-vector form as above, for linear systems. x is vector of state variables u is vector in inputs This is the easiest form for computer simulation, as any explicit integration scheme can be used (e.g., Euler, Vode-Adams, Runge-Kutta, Runge-Kutta Fehlberg in 0SIM). Given initial values of the state variables, along with inputs, then the state derivatives can be easily calculated. A numerical integration time step then gives new values of the state variables and the process is repeated. B. Differential-Algebraic Equations (DAE s) Caused by Algebraic Loops algebraic equations exist among variables, which show up in the governing equations the algebraic variables do not have associated differential equations theoretically, the algebraic variables can be substituted out symbolically to create ODE s, but this is sometimes impractical Equations will be of the form x f x, u, z, t z g x, u, z, t z is vector of algebraic variables The algebraic variables in the vector z are not governed by differential equations. Numerical integration is more difficult, and 0SIM s implicit integrators (BDF Method, Modified BDF Method) are required. Such integrators use a predictorcorrector scheme. Given initial values for x and u, the algebraic equations must be solved numerically (for example, with a Newton-Raphson routine). Values of z must be found that make the right and left-hand sides of the algebraic equations equal to within some tolerance. These values for z are then plugged into the differential equations to calculate the derivatives. 5

C. Implicit Equations Algebraic constraints among state variables (dependency among state variables) Energy storage element initial states cannot be specified independently May have state variable derivatives on left and right-hand sides of governing equations, and it may be hard to solve for the derivatives explicitly. Equations may be of the form x f x, x, u, t The state variable vector x may consist of independent states x i and dependent states x d which depend on x i. x = x i x d. Again, implicit integration schemes are required. Given x and u, state derivatives cannot be calculated from the right-hand side of the equations. Given the independent state variables x i, the dependent states x d must be calculated so that the left and righthand sides of the above equation are equal. Many software packages such as 0SIM can symbolically solve the algebraic loops or derivative causalities and create explicit equations for simple systems. Examples: A. Explicit Equations with Additional State Variables B. DAE s / Algebraic Loop 6

Example B. Cont d Eq ns -4 are DAE s:. Start with state variable values x, v, x. Solve algebraic equation for v 3. Compute 4. Integrate 5. Repeat To convert to ODE s (explicit), substitute Eq n 4 into Eq ns and 3. What if we substitute Eq n 3 into Eq ns and 4? This will result in implicit ODE s. 7

Example B Cont d Taking the implicit equations, could we just substitute Eq n 3A into A? No, because we would still be left with x, and would need an equation for. To make the implicit equations explicit, write in matrix-vector form and use matrix inversion. 8

C. Implicit Equations (Dependent States) 9

Example C Cont d 0