Method ssm/simulate


  SIMULATE simulates a discrete ssm with given inputs
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  DESCRIPTION: SIMULATE simulates a discrete ssm with given inputs.
 
  CALL:
          mat_out = simulate(sys, pl)
 
  INPUTS:
          sys - an ssm object
 
  OUTPUTS:
           mat_out - returns a matrix object of AOs, one for each specified
                     model output.
 
  HINT: to run a noise simulation with a fixed noise state, set the random
  number generate seed to a known fixed value before calling ssm/simulate.
  This will ensure that the output of simulate is the same each time you
  call it for a given setup. For example:
 
      rng(0) % set seed to a fixed value (0)
      out1 = simulate(mdl, pl) % simulate
      out2 = simulate(mdl, pl) % simulate the same noise again
 
 
  The procinfo of the matrix object contains the last state of the
  simulation under the key 'LASTX'.
 
 
  Parameters Description
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Method Details
Access public
Defining Class ssm
Sealed 0
Static 0

Parameter Description

Default

no description
Key Default Value Options Description
reorganize
COVARIANCE VARIABLE NAMES {} [0x0] none A cell-array of strings specifying the desired input variable names.
CPSD VARIABLE NAMES {} [0x0] none A cell-array of strings specifying the desired input variable names.
AOS VARIABLE NAMES, AO NAMES, AO PORT NAMES {} [0x0] none A cell-array of input port names corresponding to the different input AOs.
CONSTANT VARIABLE NAMES {} [0x0] none A cell-array of strings of the desired input variable names.
RETURN STATES {} [0x0] none A cell-array of names of state ports to return.
RETURN OUTPUTS, OUTPUTS {} [0x0] none A cell-array of output ports to return.
simulate
COVARIANCE [] none The covariance of this noise between input ports for the time-discrete noise model.
CPSD [] none The one sided cross-psd of the white noise between input ports.
AOS [] none An array of input AOs.
CONSTANTS [] none Array of DC values for the different corresponding inputs.
NSAMPLES Inf none The maximum number of samples to simulate (AO length(s) overide this).
SSINI {} [0x0] none A cell-array of vectors that give the initial position for simulation.
INITIALIZE 0
  • 0
  • 1
When set to 1, a random state value is computed for the initial point.
TINI [] none Same as t0; kept for backwards compatibility.
T0 [] none The initial simulation time (seconds).
DISPLAYTIME 1
  • 1
  • 0
Switch on/off the display
TERMINCOND '' none A string to evaluate a termination condition on the states in x ('lastX') or outputs in y ('lastY')
REORGANIZE 1
  • 1
  • 0
When set to 0, this means the ssm does not need be modified to match the requested i/o. Faster but dangerous!
FORCE COMPLETE 0
  • 0
  • 1
Force the use of the complete simulation code.

Example

plist('COVARIANCE VARIABLE NAMES', cell(0,0), 'CPSD VARIABLE NAMES', cell(0,0), 'AOS VARIABLE NAMES', cell(0,0), 'CONSTANT VARIABLE NAMES', cell(0,0), 'RETURN STATES', cell(0,0), 'RETURN OUTPUTS', cell(0,0), 'COVARIANCE', [[]], 'CPSD', [[]], 'AOS', [[]], 'CONSTANTS', [[]], 'NSAMPLES', [Inf], 'SSINI', cell(0,0), 'INITIALIZE', [false], 'TINI', [[]], 'T0', [[]], 'DISPLAYTIME', [true], 'TERMINCOND', '', 'REORGANIZE', [true], 'FORCE COMPLETE', [false])

back to top back to top

Some information of the method ssm/simulate are listed below:
Class name ssm
Method name simulate
Category Operator
Package name ltpda
VCS Version 967b0eec0dece803a81af8ef54ad2f8c784b20b2
Min input args 1
Max input args -1
Min output args 1
Max output args -1
Can be used as modifier 1
Supported numeric types {'double'}




©LTP Team