CDS 101: Lecture 2.1 System Modeling. Lecture 1.1: Introduction Review from to last Feedback week and Control

Similar documents
CDS 101: Lecture 2.1 System Modeling

CDS 101: Lecture 2.1 System Modeling

CDS 101/110: Lecture 2.1 System Modeling. Model-Based Analysis of Feedback Systems

CDS 101/110a: Lecture 2.1 Dynamic Behavior

CDS 101/110a: Lecture 8-1 Frequency Domain Design

CDS 101/110a: Lecture 10-1 Robust Performance

CDS 101/110a: Lecture 2.1 Dynamic Behavior

AME 301: Differential Equations, Control and Vibrations

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems

Miscellaneous. Regarding reading materials. Again, ask questions (if you have) and ask them earlier

ELEC4631 s Lecture 2: Dynamic Control Systems 7 March Overview of dynamic control systems

EXAMPLE: MODELING THE PT326 PROCESS TRAINER

CDS 110: Lecture 2-2 Modeling Using Differential Equations

Dr Ian R. Manchester

Lecture 1. Scott Pauls 1 3/28/07. Dartmouth College. Math 23, Spring Scott Pauls. Administrivia. Today s material.

CDS 101/110a: Lecture 1.1 Introduction to Feedback & Control. CDS 101/110 Course Sequence

Lab 5: Nonlinear Systems

What is flight dynamics? AE540: Flight Dynamics and Control I. What is flight control? Is the study of aircraft motion and its characteristics.

Overview of the Seminar Topic

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

Contents. Dynamics and control of mechanical systems. Focus on

AE2610 Introduction to Experimental Methods in Aerospace DYNAMIC RESPONSE OF A 3-DOF HELICOPTER MODEL

Lesson 9: Predator-Prey and ode45

Lecture 1: Introduction to System Modeling and Control. Introduction Basic Definitions Different Model Types System Identification

WORK SHEET FOR MEP311

Reglerteknik, TNG028. Lecture 1. Anna Lombardi

ET3-7: Modelling I(V) Introduction and Objectives. Electrical, Mechanical and Thermal Systems

MECH 3140 Final Project

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

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

The basic principle to be used in mechanical systems to derive a mathematical model is Newton s law,

EVOLVING DOCUMENT ME 5070 Flight Dynamics

Getting Started With The Predator - Prey Model: Nullclines

/ m U) β - r dr/dt=(n β / C) β+ (N r /C) r [8+8] (c) Effective angle of attack. [4+6+6]

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems

Math 128A Spring 2003 Week 12 Solutions

Simple Car Dynamics. Outline. Claude Lacoursière HPC2N/VRlab, Umeå Universitet, Sweden, May 18, 2005

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Lecture 14: Ordinary Differential Equation I. First Order

State Space Representation

Chapter 5 Performance analysis I Steady level flight (Lectures 17 to 20) Keywords: Steady level flight equations of motion, minimum power required,

Name: Fall 2014 CLOSED BOOK

Introduction to Control (034040) lecture no. 2

2002 Prentice Hall, Inc. Gene F. Franklin, J. David Powell, Abbas Emami-Naeini Feedback Control of Dynamic Systems, 4e

(Refer Slide Time: 00:01:30 min)

Driving in Rural Areas. 82 percent of a miles of roadways are rural roads.

CS 188: Artificial Intelligence Spring 2009

First Order Systems of Linear Equations. or ODEs of Arbitrary Order

Review: control, feedback, etc. Today s topic: state-space models of systems; linearization

suppressing traffic flow instabilities

Mech 6091 Flight Control System Course Project. Team Member: Bai, Jing Cui, Yi Wang, Xiaoli

Linearized Equations of Motion!

Dynamic Analysis on Vibration Isolation of Hypersonic Vehicle Internal Systems

Homework Assignment 4 Root Finding Algorithms The Maximum Velocity of a Car Due: Friday, February 19, 2010 at 12noon

System Modeling. Lecture-2. Emam Fathy Department of Electrical and Control Engineering

Predator - Prey Model Trajectories and the nonlinear conservation law

WHITE PAPER. Winter Tires

AEROSPACE ENGINEERING

Introduction to Aerospace Engineering

Kinematics + Dynamics

Problem Set Number 01, MIT (Winter-Spring 2018)

Translational Mechanical Systems

Fundamentals Physics

Systems of Ordinary Differential Equations

Question: Are distance and time important when describing motion? DESCRIBING MOTION. Motion occurs when an object changes position relative to a.

2.010 Fall 2000 Solution of Homework Assignment 7

Performance. 7. Aircraft Performance -Basics

Elastic Potential Energy

Alireza Mousavi Brunel University

A&S 320: Mathematical Modeling in Biology

3.3 Acceleration An example of acceleration Definition of acceleration Acceleration Figure 3.16: Steeper hills

Chapter 4 The Equations of Motion

Chapter 5 Lecture. Pearson Physics. Newton's Laws of Motion. Prepared by Chris Chiaverina Pearson Education, Inc.

1 The pendulum equation

Emil Ritzén. Reg. nr: LiTH-ISY-EX

Modeling the Immune System W9. Ordinary Differential Equations as Macroscopic Modeling Tool

Energy methods problem solving

Math 266: Ordinary Differential Equations

Module 03 Modeling of Dynamical Systems

UNIT #3 LINEAR FUNCTIONS, EQUATIONS, AND THEIR ALGEBRA COMMON CORE ALGEBRA II

Modeling and Experimentation: Compound Pendulum

Tutorial 1 - Drive fundamentals and DC motor characteristics

Dynamics of Ocean Structures Prof. Dr. Srinivasan Chandrasekaran Department of Ocean Engineering Indian Institute of Technology, Madras

Differential Equations FMNN10 Graded Project #1 c G Söderlind 2017

MEAM 510 Fall 2012 Bruce D. Kothmann

EQUIVALENT SINGLE-DEGREE-OF-FREEDOM SYSTEM AND FREE VIBRATION

Final Examination Thursday May Please initial the statement below to show that you have read it

Modeling Mechanical Systems

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Physics 8.01 Physics Fall Term = # v x. t " =0. are the values at t = 0.

2015 Holl ISU MSM Ames, Iowa. A Few Good ODEs: An Introduction to Modeling and Computation

Free Response- Exam Review

Dynamics and control of mechanical systems

Physics 121, April 3, Equilibrium and Simple Harmonic Motion. Physics 121. April 3, Physics 121. April 3, Course Information

Introduction to Flight Dynamics

CHAPTER 1 INTRODUCTION Hydrodynamic journal bearings are considered to be a vital component of all the rotating machinery. These are used to support

ν δ - 1 -

Time Response of Dynamic Systems! Multi-Dimensional Trajectories Position, velocity, and acceleration are vectors

Lecture 9: Harmonic Loads (Con t)

Lesson 1.2 Position Time Graphs

AP Calculus AB Riemann Sums

Transcription:

CDS 101: Lecture 2.1 System Modeling Richard M. Murray 7 October 2002 Goals: Describe what a model is and what types of questions it can be used to answer Introduce the concepts of state, dynamic, and inputs Provide examples of common modeling techniques: finite state automata, difference equations, differential equations, Markov chains Describe common modeling tradeoffs Reading: K. J. Astrom, Control Systems Design, Sections 3.1-3.2, 3.6 Optional: Astrom, Section 3.3 Lecture 1.1: Introduction Review from to last Feedback week and Control Actuate Sense Control = Sensing + Computation + Actuation Compute Feedback Principles Robustness to Uncertainty Design of Dynamics Many examples of control and feedback in natural and engineered systems: BIO BIO ESE ESE CS 730 Oct Sep 02 02 CDS 20 1

Models 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 Models can be used in ways that the system can t Certain types of analysis (eg, parametric variations) can t easily be done on the actual system In many cases, models can be run much more quickly than the original models 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 Example: Weather Forecasting Question 1: how much will it rain tomorrow? Question 2: will it rain in the next 5-10 days? Question 3: will we have a drought next summer? Different questions different models CDS 3 Physical Concept of State A key concept in modeling is the concept of state The state of a model of a dynamic system is a set of independent physical quantities, the specification of which (in the absence of excitation) completely determines the future evolution of the system Example #1: car on a sloping road State: position and velocity of car Angle of incline is not a state (not part of the model of the car) Accelerator position is not a state (not intrinsic to the car) Example #2: predator prey (rabbits vs foxes) State: number of rabbits and foxes Amount of rabbit food is not a state (not intrinsic to the ecosystem as we have defined it) Number of dead rabbits is not a state (not independent of number of live rabbits) Warning: objects in picture may not include any actual foxes. CDS 4 2

Dynamics Dynamics describes how the state evolves The dynamics of a model is an update rule for the system state that describes how the state evolves, as a function on the current state and any external inputs Example #1: car on a sloping road Dynamics: Newton s law (F = ma) mx = bx + u () t + u () t engine hill Example #2: predator prey Engine force modeled as external input Hill modeled as external input Dynamics: empirically observed difference eqs R[ k + 1] = R[ k] + br R[ k] ar[ k] F[ k] Fk [ + 1] = Fk [ ] dfk [ ] + arkfk [ ] [ ] f System of difference equations CDS 5 Inputs Inputs describe the external excitation of the dynamics Inputs are extrinsic to the system dynamics (externally specified) Constant inputs are often considered to be parameters Example #1: car on a sloping road mx = bx + u () t + u () t engine hill Input #1 Input #2 Example #2: predator prey R[ k + 1] = R[ k] + b(u) r R[ k] ar[ k] F[ k] Fk [ + 1] = Fk [ ] dfk [ ] + arkfk [ ] [ ] Rabbit food can either be a parameter (if constant) or an external input (if nonconstant) f CDS 6 3

Outputs 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 Example #1: car on a sloping road Outputs: position and velocity Measure velocity with speedometer Measure position with odometer (or GPS) Example #2: motion of an airplane over US States: position, altitude, linear + angular vel Dynamics: aerodynamics of flight Inputs: thrust, rudder, elevator, flaps, wind Outputs (from radar): heading and speed Roll, pitch and yaw are not directly measurable; part of state, but not part of outputs http://www.flightview.com/ CDS 7 Modeling Properties Choice of state is not unique There may be many choices of variables that can act as the state Predator prey example: look at number of rabbits plus the excess of foxes over rabbits: R[ k + 1] = f ( [ ], [ ]) E = F R r R k F k R[ k + 1] = fr( R[ k], E[ k]) Fk [ + 1] = f( Rk [ ], Fk [ ]) Ek [ + 1] = f( Rk [ ], Ek [ ]) e Can also look at models for the same system with different numbers of states Ignore certain physical effects (and hence eliminate states) e Choice of inputs and outputs depends on point of view Inputs: what factors are external to the model that you are building Inputs in one model might be outputs of another model (eg, the output of a cruise controller provides the input to the vehicle model) Outputs: what physical variables (often states) can you measure Choice of outputs depends on what you can sense and what parts of the component model interact with other component models CDS 8 4

Model Types 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 Different types of models are used for different purposes Ordinary differential equations for rigid body mechanics Finite state machines for manufacturing, Internet, information flow Partial differential differential equations for fluid flow, solid mechanics, etc CDS 9 Model Type #1: Finite State Machines Finite state machines model discrete transitions between finite number of states Represent each configuration of system as a state Model transition between states using a graph Inputs force transition between states Example: Traffic light logic Car arrives on E-W St Timer expires Timer expires Car arrives on N-S St State: Inputs: Outputs: current pattern of lights that are on + internal timers presence of car at intersections current pattern of lights that are on CDS 10 5

Model Type #2: Difference Equations Difference equations model discrete transitions between state variables Discrete time description (clocked transitions) x[ k + 1] = f( x[ k], u[ k]) New state is function of current state + inputs yk [ + 1] = hxk ( [ + 1]) State is represented as a continuous variable Example: predator prey R[ k + 1] = R[ k] + b(u) r R[ k] ar[ k] F[ k] Fk [ + 1] = Fk [ ] dfk [ ] + arkfk [ ] [ ] f Note that state is continuous models average number of rabbits, foxes State: Inputs: Outputs: number of rabbits and foxes rabbit food available number of rabbits and foxes CDS 11 Model Type #3: Differential Equations Differential equations model continuous evolution of state variables Describe the rate of change of the state variables dx Both state and time are continuous variables = f ( xu, ) dt y = h( x) Example: Coupled spring mass system u(t) mq 1 1= k2( q2 q1) kq 1 1 q 2 mq = k( u q) k( q q) bq q 1 2 2 3 2 2 2 1 2 k 1 State: Inputs: Outputs: m 1 m 2 k 2 positions and velocities of masses motion of end of rightmost spring positions of masses (via sensors) k 3 b q 1 q1 q 2 q d 2 = k2 k1 ( q2 q1) q q 1 dt 1 m m q 2 k3 k2 b ( u q2) ( q2 q1) q 2 m m m q1 y = q 2 State space form CDS 12 6

Model type #4: Markov chains Markov chains model continuous or discrete evolution of probabilities States correspond to probabilities of events d P H = W u( H, H ) P H W u( H, H ) P H Dynamics can be continuous or discrete time dt H Very useful for stochastic systems Example: Molecular models for materials growth states inputs transition rates State: Inputs: Outputs: W(H 1, H 2 ) H 1 W(H 2, H 1 ) probabilities of being in given states processing conditions (temp, flow) surface profile, film properties Questions What is the roughness of the final surface? What are the film properties? How do we modify the film properties by varying the processing conditions under sensor feedback (control)? CDS 13 Comments on Model Type One system may have many choices for type of model Mass spring system sampled be a computer could use a continuous time description (what your eyes see) or a discrete time description (what the computer sees) The choice of model type depends on the question you want to answer Many other types of models besides those listed Partial differential equations (PDEs) Hybrid systems: mixed discrete and continuous time/variables BIO ESE This class will focus primarily on ordinary differential equations (ODEs) Wide applicability + lots of tools Homework will explore discrete time analogs to continuous time results CDS 14 7

Building Models (A True Story) GM Astro tractor Model #1: cruise control Simplest possible model Included simple engine dynamics (1 st order ODE) + vehicle properties Didn t demonstrate instability Model #2: add detailed engine dynamics Added multi-state, nonlinear model of engine dynamics Took into account engine RPM, engine loading, throttle position, etc Problem reported from the field Truck would start bucking when going up hill, in the mountains, in first gear, under full load (trailer) GM Delco Systems Operations called on to solve the problem (and they assigned me!) Experiment #2: field tests 1 st gear, use brakes to simulate load, lots of smoke Forced response testing to get system model (ODEs) Model #3: transmission model Long drive shaft, with loading Increased stiffness in shaft under loading recreated the field data (!) CDS 15 Example #1: mass spring system (1/2) x 1 x 2 u(t) m 1 m 2 Applications of mass/spring systems Flexible structures (buildings, wings, membranes, many more ) Molecular dynamics, potential wells Phase (deg) Magnitude (db) 20 10 0-10 -20-30 -40-50 -60 0-90 -180-270 -360 k 1 k 2 Frequency Response 0.1 1 10 k 3 b Questions we want to answer How much do the masses move as a function of the forcing frequency? What happens if I change the values of the masses? Will my building stay up in an earthquake? Modeling assumptions Mass, spring, and damper constants are fixed and known Springs satisfy Hooke s law Damper is (linear) viscous force, proportional to velocity Frequency (rad/sec) CDS 16 8

Example #1: mass spring system (2/2) q 2 u(t) Matlab simulation # twomass.m CDS 101 example q 1 k 1 m 1 m 2 k 2 Rigid Body Physics Sum of forces = mass * acceleration Hooke s law: F = k(x x rest ) Viscous friction: F = b v Input: changes end point of spring 3 mq 1 1= k2( q2 q1) kq 1 1 mq = k( u q) k( q q) bq 2 2 3 2 2 2 1 2 k 3 b function dydt = f(t,y, k1, k2, k3, m1, m2, b, omega) u = 0.00315*cos(omega*t); dydt = [ y(3); y(4); -(k1+k2)/m1*y(1) + k2/m1*y(2); k2/m2*y(1) - (k2+k3)/m2*y(2) - b/m2*y(4) + k3/m2*u ]; [t,y] = ode45(dydt,tspan,y0,[], k1, k2, k3, m1, m2, b, omega); CDS 17 Example #2: Predator Prey (1/2) Questions we want to answer Given the current population of rabbits and foxes, what will it be next year? If we hunt down lots of foxes in a given year, what will the effect on the rabbit and fox population be? How do long term changes in the amount of rabbit food available affect the populations? FOX http://www.math.duke.edu/education/ccp/ materials/diffeq/predprey/contents.html Modeling assumptions The predator species is totally dependent on the prey species as its only food supply. The prey species has an external food supply and no threat to its growth other than the specific predator. CDS 18 9

Example #2: Predator Prey (2/2) Discrete Lotka-Volterra model State R[k] number of rabbits in period k F[k] number of foxes in period k Inputs (optional) u[k] amount of rabbit food Outputs: number of rabbits and foxes Dynamics: discrete Lotka-Volterra eqs R[ k + 1] = R[ k] + br ( u) R[ k] af[ k] R[ k] Fk [ + 1] = Fk [ ] dfk [ ] + afkrk [ ] [ ] f Matlab simulation # predprey.m CDS 101 example R[1]=20; F[1]=35; br = 0.7; df = 0.5; a = 0.007; nperiods=208; year(1)=1845; for k=1:90*nperiods R(k+1) = R(k) + (br*r(k) a*f(k)*r(k))/nperiods; F(k+1) = F(k) + (-df*f(k) + a*f(k)*r(k))/nperiods; year(k) = year(k) + 1/nperiods; end; Parameters/functions b r (u) annual birth rate of rabbits (depends on food supply) d r annual death rate for foxes a interaction term 350 300 250 200 150 100 50 0 1850 1870 1890 1910 1930 CDS 19 Model = state, inputs, outputs, dynamics Summary: System Modeling dx = f ( xu, ) dt d y = h( x) P = W ( H, H ) P W ( H, H ) P dt H u H u H H Principle: Choice of model depends on the questions you want to answer q 1 k 1 q 2 u(t) m 1 m 2 k 2 k 3 b function dydt = f(t,y, k1, k2, k3, m1, m2, b, omega) u = 0.00315*cos(omega*t); dydt = [ y(3); y(4); -(k1+k2)/m1*y(1) + k2/m1*y(2); k2/m2*y(1) - (k2+k3)/m2*y(2) - b/m2*y(4) + k3/m2*u ]; CDS 20 10