DOC PREVIEW
CALTECH CDS 101 - System Modeling

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CDS 101, Lecture 2.16 Oct 03R. M. Murray, Caltech1CDS 101: Lecture 2.1System ModelingRichard M. Murray6 October 2003Goals:y Define what a model is and its use in answering questions about a systemy Introduce the concepts of state, dynamics, inputs and outputsy Provide examples of common modeling techniques: differential equations, difference equations, finite state automataReading: y Åström and Murray, Analysis and Design of Feedback Systems, Ch 2y Advanced: Lewis, A Mathematical Approach to Classical Control, Ch 16 Oct 03 R. M. Murray, Caltech CDS 2Week 1: Introduction to Feedback and ControlSenseComputeActuateControl =Sensing + Computation +ActuationFeedback Principlesy Robustness to Uncertaintyy Design of DynamicsMany examples of feedback and control in natural & engineered systems:BIOBIOESEESECSReview from last weekCDS 101, Lecture 2.16 Oct 03R. M. Murray, Caltech26 Oct 03 R. M. Murray, Caltech CDS 3Model-Based Analysis of Feedback SystemsAnalysis and design based on modelsy A model provides a prediction of how the system will behavey Feedback can give counter-intuitive behavior; models help sort out what is going ony For control design, models don’t have to be exact: feedback provides robustnessControl-oriented models: inputs and outputsThe model you use depends on the questions you want to answery A single system may have many modelsy Time and spatial scale must be chosen to suit the questions you want to answery Formulate questions before building a modelWeather 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 models6 Oct 03 R. M. Murray, Caltech CDS 4Example #1: Spring Mass SystemApplicationsy Flexible structures (many apps)y Suspension systems (eg, “Bob”)y Molecular and quantum dynamicsQuestions we want to answery How much do masses move as a function of the forcing frequency?y What happens if I change the values of the masses?y Will Bob fly into the air if I take that hill at 25 mph?Modeling assumptionsy Mass, spring, and damper constants are fixed and knowny Springs satisfy Hooke’s law y Damper is (linear) viscous force, proportional to velocitybk3m1m2q1u(t)q2k2k1CDS 101, Lecture 2.16 Oct 03R. M. Murray, Caltech36 Oct 03 R. M. Murray, Caltech CDS 5Modeling a Spring Mass SystemModel: rigid body physics (Ph 1)y Sum of forces = mass ∗accelerationy Hooke’s law: F = k(x – xrest)y Viscous friction: F = b v11 2 2 1 1122 3 2 2 2 1 2()()( )mq k q q kqmq k u q k q q bq=−−=−−−− 11222121 11232221212()()( )qqqqdkkqq qqdtmmqkk buq q q qmm mqyq=−−−− −−=“State space form”bk3m1m2q1u(t)q2k2k1Converting models to state space formy Construct a vector of the variables that are required to specify the evolution of the systemy Write dynamics as a system of first order differential equations:(,) ,()npqdxfxu x udtyhx y=∈∈=∈\\\6 Oct 03 R. M. Murray, Caltech CDS 6Frequency Response for a Mass Spring SystemSteady state frequency responsey Force the system with a sinusoidy Plot the “steady state” response, after transients have died outy Plot relative magnitude and phase of output versus input (more later)Matlab simulation (see handout)function dydt = f(t, y, ...)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);bk3m1m2q1u(t)q2k2k1Frequency ResponseFrequency (rad/sec)Phase (deg)Magnitude (dB)-60-50-40-30-20-10010200.1 1 10-360-270-180-900CDS 101, Lecture 2.16 Oct 03R. M. Murray, Caltech46 Oct 03 R. M. Murray, Caltech CDS 7Modeling TerminologyState captures effects of the pasty independent physical quantities that determines future evolution (absent external excitation)Inputs describe external excitation y Inputs are extrinsic to the system dynamics (externally specified)Dynamics describes state evolutiony update rule for system state y function of current state and any external inputsOutputs describe measured quantitiesy Outputs are function of state and inputs ⇒ not independent variablesy Outputs are often subset of stateExample: spring mass systemy State: position and velocities of each mass: y Input: position of spring at right end of chain: u(t)y Dynamics: basic mechanicsy Output: measured positions of the masses: bk3m1m2q1u(t)q2k2k11212,,,qqqq12,qq6 Oct 03 R. M. Murray, Caltech CDS 8Modeling PropertiesChoice of state is not uniquey There may be many choices of variables that can act as the statey Trivial example: different choices of units (scaling factor)y Less trivial example: sums and differences of the mass positions (HW 2.4)Choice of inputs and outputs depends on point of viewy 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)y 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 modelsCan also have different types of modelsy Ordinary differential equations for rigid body mechanicsy Finite state machines for manufacturing, Internet, information flowy Partial differential equations for fluid flow, solid mechanics, etcCDS 101, Lecture 2.16 Oct 03R. M. Murray, Caltech56 Oct 03 R. M. Murray, Caltech CDS 9Differential EquationsDifferential equations model continuous evolution of state variables y Describe the rate of change of the state variablesy Both state and time are continuous variablesExample: electrical power grid(,)()dxfxudtyhx==State:Inputs:Outputs:rotor angles, velocities ( )power loading on the grid (Pi)voltage levels and frequency (based on rotor speed)()()11101 12 1221202 12 12sin( ) cos( )sin( ) cos( )DPB GDPB Gδδω δδ δδδδ ω δδ δδ+= − −+ −+= − −+ −  Swing equationsy Describe how generator rotor angles (δi) interact through the transmission line (G, B)y Stability of these equations determines how loads on the grid are accommodated,iiδδ6 Oct 03 R. M. Murray, Caltech CDS 10Finite State MachinesFinite state machines model discrete transitions between finite # of statesy


View Full Document

CALTECH CDS 101 - System Modeling

Documents in this Course
Load more
Download System Modeling
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view System Modeling and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view System Modeling 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?