State Space Models
description
Transcript of State Space Models
Create a Spark Motivational Contest
Professor Walter W. OlsonDepartment of Mechanical, Industrial and Manufacturing EngineeringUniversity of ToledoState Space Models
Video: Diwheel1Outline of Todays LectureReviewModelsDynamicsStatesPhase PlotsExample: Predator Prey ModelEngineering Modeling ProcedureState Space Models
ModelsA model is a representation of somethingThe something can be an idea, a concrete object or an abstract objectIt is NOT the real thing: they are simplificationsit is a fiction of our imaginationModels can take many formsSolidBlocksEquationsComputer programsWord descriptionsSymbols
3DynamicsModels of dynamics used in this course:Based on functions of timeDifferential equationstime is considered continuous
Difference equationstime is considered discrete
StateA state is a set of variables whose values when known completely define the dynamics (motion)
State variables for nose wheel example:
The parameters of the example are
StateSo, what about ?These are completely determined by the statevariables!We can rewrite the equations as
Phase PlotA phase plot is a plot of a state variable vs. another state variableUseful in understanding how the dynamics change with changes in state
Predator Prey ModelVolterra-Lotke ModelThe model is
subject tox(t) = prey population sizey(t) = predator population sizea = growth rate of preyb = rate of prey predationm = death rate of predatorsn = rate of predator sustenanceModel Solution
State Variables: x, yNote the controls in this nonlinear, coupled, model
Predator Prey ModelLynx Hare ( data from Leigh, 1968)
Discrete Predator Prey ModelTo discretize,choose time step, hreplace
The difference equations are
If h = 1 year, the model is
Evaluation:with x(0)=80, y(0)=30a = 0.7, b = 0.03,m=0.99, n = 0.03Initially h = 1 year
Discrete Predator Prey ModelUnstable Model!Problem: the time step is too big!with h = 0.1 years
Choice of time step is critical to discrete modelingThe smaller the time step, the more accurate the model but more computationsModelsREAL WORLDOBSERVATIONSMATHEMATICALMODELEXPLANATION/PREDICTIONSENSEFORMULATEINTERPRETTESTEngineering Modeling ProcedureUnderstand the problemWhat are the factors and relevant relationships?What assumptions can be made?What equilibrium conditions exist?What should the result look like?Draw and label an engineering sketchFree body diagramHydraulic schematicElectrical schematicWrite the equilibrium equations (usually differential or difference)Newton 2nd LawKirchoff Laws for current and voltagesFlow continuity lawsSolve the equations for the desired resultCheck the validity of the results
Modeling is an Iterative ProcessUnderstandthe ProblemSketchMathematicalModelSolvethe ModelValidate the ResultsUse theModelCan you formulate a model?Can you solve the model?Do the resultsrepresentreality?YESYESYESNONONOModeling TermsSystem: a functional group of interrelated thingsState: A condition (which may or may not be physical) of the system regarding form, structure, location, thermodynamics or compositionState vector: a collection of variables that fully describe the object over timeInput: an external object provide to the systemOutput: a dependent variable (often a state) from within the system that can be measured or quantifiedDynamics: a process of the state variables over timeModeling Example
What is the deflection of the nose in responseto the runway?System: landing gearState: positions and velocitiesof the componentsState vectorInput: runway roughness, zrOutput: Nose deflections, z
State Space FormulationContinuous ModelsLet x be a vector formed of the state variables
The number of components of the state vector is called the order Formulate the system as
The matrices A, B, C and D have constant elementsThe matrix A is the called the State Dynamics MatrixThe matrix B is called the Input or Control MatrixThe matrix C is called the Output or Sensor MatrixThe matrix D is called the Pass Through or Direct term
State Space FormulationDiscrete ModelsLet x be a vector formed of the state variables
The number of components of the state vector is called the order Formulate the system as
The matrices A, B, C and D have constant elementsThe matrix A is the called the State Dynamics MatrixThe matrix B is called the Input or Control MatrixThe matrix C is called the Output or Sensor MatrixThe matrix D is called the Pass Through or Direct term
State Space FormulationAdvantagesTime domain modelAbility to determine which variables can be controlledAbility to determine which variable can be sensedAbility to design predictors for controlThe formulations are not uniqueYou might have several different choices for the state variablesThe states might not be physicalYou might want different outputs (things you measure from the model)State Space Formulation Procedure:Develop the equations of equilibriumPut the equilibrium equations in the form of the highest derivative equal the remainder of the termsMake a choice of states, the input and the outputs Write the equilibrium equations in terms of the state variablesConstruct the dynamics, the input, the output and the pass through matricesWrite the state space formulation
State Space FormulationExample: The Nose Wheel
State Space Formulation
% Nose Wheel Problem% Programmed by WW Olson 8 March 2008%% Parameters:k = 250000; % Nose wheel spring stiffness N/mkt = 5000000; % Nose wheel tire stiffness in N/mb = 125000; % Nose wheel shock absorber in N/m/sm = 250000; % Mass allocated to the nose wheel kgmu = 50; % Mass of the landing gear kg%%% State MatrixA = [ 0 1 0 0; -k/m -b/m k/m b/m; 0 0 0 1; ... k/mu b/mu -(k+kt)/mu -b/mu];B = [0;0;0;kt/mu]; % Input MatrixC = [1,0,0,0]; % Output matrix for nose deflectionD = [ 0 ]; % Pass through matrixsys = ss(A,B,C,D); % State space formulationstep(0.01*sys); % Step input of 1 cmgrid; title('Nose Wheel 0.01 m step input');t = [ 0:.01:100]; % Time for runwayn = length(t); % Length of time arrayu =0.01*exp(.1*(rand(1,n)-.5)); % Runway profilelsim(sys,u,t); % Nose response to runwaygrid;title('Nose Wheel response to runway');legend('nose deflection in m');
Consider the following problemA secret chemical, we will call zonium will change state if to much force is applied to it. This chemical is badly needed in at Galena, Alaska. The only mode of transportation is by air. It has been determined that take off and landing forces by a well trained pilot can be tolereated. However, because of the mountains that need to be flown over, there are air pockets which will cause the airplane to fall or lose altitude quickly. Model the forces on the zonium and determine the state space model for this situation.ZoniumMass mzkbAircraft flooru(t)
Derivatives of the Forcing FunctionConsider
Problem: handling the derivatives of the forcing functionUsing a change of variable as indicated below:
WhereNote that:
24Derivatives of the Forcing Function
Consider the following problemZoniumMass mzkbAircraft flooru(t)
SummaryModelingDefinitions of termsAn Engineering ProcedureUnderstand the problemSketchWrite the equilibrium equationsSolve the modelValidate the modelUse the modelIterative ProcessChoose the model toanswer your question
State Space Continuous
Discrete
Next: Lumped parameter systemsExample