Drake
 All Classes Files Functions Variables
SimulinkModel Class Reference

Implements the DynamicalSystem interface for any existing simulink model with one (vector) input and one (vector) output. More...

Inheritance diagram for SimulinkModel:
Collaboration diagram for SimulinkModel:

Public Member Functions

function SimulinkModel (mdl, num_u)
 Construct a simulink model DynamicalSystem. More...
 
function getNumContStates (obj)
 
function getNumDiscStates (obj)
 
function getNumInputs (obj)
 
function getNumOutputs (obj)
 
function getSampleTime (obj)
 
function getModel (obj)
 
function getInitialState (obj)
 
function dynamics (obj, t, x, u, yes_i_promise_that_i_called_output_first)
 
function update (obj, t, x, u, yes_i_promise_that_i_called_output_first)
 
function output (obj, t, x, u)
 
- Public Member Functions inherited from DynamicalSystem
virtual function dynamics (obj, t, x, u)
 Implements the differential equation governing the dynamics of the continuous state variables. More...
 
virtual function update (obj, t, x, u)
 Implements the difference equation governing the dynamics of the discrete state variables. More...
 
function DynamicalSystem ()
 
function inInputFrame (sys, frame)
 Ensures that sys has the specified input frame, by searching for and cascading a coordinate transformation to the existing input if necessary. More...
 
function inStateFrame (sys, frame)
 Ensures that sys has the specified state frame. More...
 
function inOutputFrame (sys, frame)
 Ensures that sys has the specified output frame, by searching for and cascading a coordinate transformation to the existing output if necessary. More...
 
function cascade (sys1, sys2)
 Creates a new system with the output of system 1 connected to the input of system 2. More...
 
function feedback (sys1, sys2)
 Creates a new systems with sys1 and sys2 in a feedback interconnect (with sys1 on the forward path, and sys2 on the return path). More...
 
function parallel (sys1, sys2)
 Creates a new system that takes the inputs to both sys1 and sys2 as a single input (which is "demux"ed and passed independently to the two systems), and outputs the "mux"ed output of the two systems. More...
 
function sampledData (sys, tsin, tsout)
 Creates a new system which is a sampled data (e.g. More...
 
function resolveConstraints (obj, x0, v, constraints)
 attempts to find a x which satisfies the constraints, using x0 as the initial guess. More...
 
function addStateConstraintsToProgram (obj, prog, indices)
 adds state constraints and unilateral constriants to the program on the specified indices. More...
 
function getNumStates (obj)
 Returns the total number of states (discrete + continuous) in the system. More...
 
function getInputSampleTimes (obj)
 Returns the sample time of the input See getSampleTime for more details about sample times. More...
 
function getOutputSampleTimes (obj)
 Returns the sample time of the output See getSampleTime for more details about sample times. More...
 
function isDT (obj)
 Returns true if the system has no states, or has states and only one sample time [a b], with a>0. More...
 
function isCT (obj)
 Returns true if the system has only one sample time [a b], with a==0. More...
 
function isInheritedTime (obj)
 Returns true if the system has only one sample time [a b], with b==-1. More...
 
function isTI (obj)
 Returns true if the system is time-invariant. More...
 
function setTIFlag (obj, bval)
 Sets the time invariant flag. More...
 
function getInputFrame (obj)
 Access the CoordinateFrame object that defines the input to this system. More...
 
function setInputFrame (obj, fr)
 Set the CoordinateFrame object that defines the input of this system. More...
 
function getStateFrame (obj)
 Access the CoordinateFrame object that defines the state of this system. More...
 
function setStateFrame (obj, fr)
 Set the CoordinateFrame object that defines the state of this system. More...
 
function getOutputFrame (obj)
 Access the CoordinateFrame object that defines the output to this system. More...
 
function setOutputFrame (obj, fr)
 Set the CoordinateFrame object that defines the output of this system. More...
 
function getNumStateConstraints (obj)
 Returns the scalar number of state constraints (of the form phi(x)=0) More...
 
function stateConstraints (obj, x)
 defines state equality constraints in the form phi(x)=0 More...
 
function unilateralConstraints (obj, x)
 defines state unilateral constraints in the form phi(x)>=0 More...
 
function getNumUnilateralConstraints (obj)
 Returns the scalar number of state constraints (of the form phi(x)>=0) More...
 
function setSimulinkParam (obj, varargin)
 Sets parameters of the simulink model Syntax setSimulinkParam(obj,param_name,param_value[,param_name,param_value,]) % Se. More...
 
function linearize (obj, t0, x0, u0)
 Linearize the system about an operating point (continuous time) More...
 
function dlinearize (obj, ts, t0, x0, u0)
 Linearize the system about an operating point (discrete time) More...
 
function setParams (obj, p)
 This default setParams method attempts to set class properties of the system according to the coordinate names in the parameter frame. More...
 
function getParams (obj)
 This default getParams method attempts to get class properties of the system according to the coordinate names in the parameter frame. More...
 
function getNumParams (obj)
 
function setParamFrame (obj, fr)
 Set the CoordinateFrame object which describes any system parameters. More...
 
function getParamFrame (obj)
 Returns the CoordinateFrame object which describes any system parameters. More...
 
function setParamLimits (obj, pmin, pmax)
 Set lower and upper bounds on the system parameters. More...
 
function getParamLimits (obj)
 Returns the current lower and upper bounds on the system parameters. More...
 
function parameterEstimation (obj, data, options)
 Estimate parameter values from input-output data. More...
 
function runLCM (obj, x0, options)
 Runs the system as an lcm node. More...
 
function simulate (obj, tspan, x0, options)
 Simulates the dynamical system (using the simulink solvers) More...
 
function tiHinf (obj, x0, u0, Q, R, Bw, gamma)
 Suboptimal state-feedback H-infinity controller for LTI system with bound gamma. More...
 
function tilqr (obj, x0, u0, Q, R, options)
 Computes an LQR controller to stabilize the system around (x0,u0) More...
 
function tilyap (obj, x0, Q)
 Linearizes the system about the state x0 and returns a candidate LyapunovFunction generated by solving the quadratic Lyapunov equation. More...
 
function tvlyap (obj, xtraj, Q, Qf)
 Linearizes the system about the state trajectory xtraj and returns a candidate LyapunovFunction generated by integrating backwards the quadratic differential Lyapunov equation. More...
 

Additional Inherited Members

- Public Attributes inherited from DynamicalSystem
Property warning_manager
 
- Protected Member Functions inherited from DynamicalSystem
function stateIndicesForCombination (sys1, sys2)
 Helper method to figure out the indices of the discrete and continuous states after sys1 and sys2 have been combined into a single system. More...
 
function stateVectorToStructure (obj, xv, mdl)
 Converts the vector state xv to the structure xs for simulink state. More...
 
function stateStructureToVector (obj, xs)
 Converts the simulink state structure representation back to the vector state. More...
 

Detailed Description

Implements the DynamicalSystem interface for any existing simulink model with one (vector) input and one (vector) output.

Constructor & Destructor Documentation

function SimulinkModel ( mdl  ,
num_u   
)

Construct a simulink model DynamicalSystem.

Parameters
mdla string containing the name of an existing simulink model
Return values
obj

Member Function Documentation

function dynamics ( obj  ,
,
,
,
yes_i_promise_that_i_called_output_first   
)
Return values
xcdot
df
function getInitialState ( obj  )
virtual
Return values
x0

Reimplemented from DynamicalSystem.

function getModel ( obj  )
virtual
Return values
mdl

Reimplemented from DynamicalSystem.

function getNumContStates ( obj  )
virtual
Return values
n

Reimplemented from DynamicalSystem.

function getNumDiscStates ( obj  )
virtual
Return values
n

Reimplemented from DynamicalSystem.

function getNumInputs ( obj  )
virtual
Return values
n

Reimplemented from DynamicalSystem.

function getNumOutputs ( obj  )
virtual
Return values
n

Reimplemented from DynamicalSystem.

function getSampleTime ( obj  )
virtual
Return values
ts

Reimplemented from DynamicalSystem.

function output ( obj  ,
,
,
 
)
virtual
Return values
y
dy

Reimplemented from DynamicalSystem.

function update ( obj  ,
,
,
,
yes_i_promise_that_i_called_output_first   
)
Return values
xdn

The documentation for this class was generated from the following file: