Skip to content
Matthew Daigle edited this page Feb 6, 2017 · 3 revisions

Class for defining a general time-variant state space model.

Description

The Model class is a wrapper around a mathematical model of a system as represented by a state and output equation. Optionally, it may also include an input equation, which defines what the system input should be at any given time, and an initialize equation, which computes the initial system state given the inputs and outputs.

A Model also has a parameters structure, which contains fields for various model parameters. The parameters structure is always given as first argument to all provided equation handles. However, when calling the methods for these equations, it need not be specified as it is passed by default since it is a property of the class.

The process and sensor noise variances are represented by vectors. When using the generate noise methods, samples are generated from zero-mean uncorrelated Gaussian noise as specified by these variances.

Methods

  • stateEqn - Compute new states given current state, inputs, noise, dt
  • outputEqn - Compute new outputs given current state, inputs, noise
  • inputEqn - Compute inputs given current time and "input parameters"
  • initializeEqn - Compute initial state given current inputs, outputs
  • getDefaultInitialization - Compute default initial state, inputs, outputs
  • generateProcessNoise - Generate process noise samples
  • generateSensorNoise - Generate sensor noise samples
  • setParams - Set parameters in parameters structure by name and value
  • printParams - Print current values of given parameter names
  • simulate - Simulate model up to a given time point
  • printStates - Print the names and values of states
  • printInputs - Print the names and values of inputs
  • printOutputs - Print the names and values of outputs
  • plotStates - Plot given state trajectories
  • plotInputs - Plot given input trajectories
  • plotOutputs - Plot given output trajectories

See also PrognosticsModel.