Introduction to Statespace Models with LTPDA


What is a ssm object?

The ssm class is a class to use “state space models” for simulation, identification and modeling in the toolbox. A state space model is a mathematical object constituted of

Input and output variables (lines in u and y) may be named and assigned a unit. However for the state x there is more of a choice since if free of choice via a basis change. The most usual choice is that x contents the same units as y and it derivatives, or the same units as u and its integrals. In general the size of the state space is equal to the number of poles in the system.

In the LTPDA toolbox, lines in u,y,x are grouped in blocks (input blocks, state blocks, output blocks) to ease the understanding of a large system. This means the matrices A, B, C, and D are also split into blocks of the corresponding size. The diagonal blocks of A may represent the dynamics of a LTP subsystem (the controller, the propulsion …) or the coupling between two systems (from the propulsion to the equations of motion)... In addition the dynamic equation also contains an inertia matrix M so that the parametric equation is made simple. The equation becomes M x' = Ax + Bu. If not user set M is supposed to be the identity.

Below we build a standard system to show the contents of the object.

>> system = ssm(plist('built-in', 'standard_system_params', 'withparams', 'ALL'))
M: running ssm/ssm
M: running ssmFromBuiltinSystem
M:   looking for models in C:\Documents and Settings\Adrien.IFR-NB01\My Documents\MATLAB2008\LTPDA_SSM_MODELS\ltp_ssm_models
M:   looking for models in C:\Users\Adrien.IFR-NB01\My Documents\MATLAB2008\ltpda_toolbox\ltpda\classes\@ssm\..\..\m\built_in_models
M: running buildParamPlist
M: running ssm/ssm
M: running ssm/ssm
M: running fromStruct
M: running ssm/ssm
M: running validate
M: running validate
M: running display
------ ssm/1 -------
      amats: {  [2x2]  }  [1x1]
      mmats: {  [2x2]  }  [1x1]
      bmats: {  [2x1]   [2x2]  }  [1x2]
      cmats: {  [1x2]  }  [1x1]
      dmats: {  [1x1]   [1x2]  }  [1x2]
   timestep: 0
     inputs:  [1x2 ssmblock]
         1 : U | Fu [kg m s^(-2)]
         2 : N | Fn [kg m s^(-2)], On [m]
     states:  [1x1 ssmblock]
         1 : standard test system | x [m], xdot [m s^(-1)]
    outputs:  [1x1 ssmblock]
         1 : Y | y [m]
     params: (W=0.2, C=0.5, C1=0, C2=0, B=1, D=0) [1x1 plist]
    version: $Id$-->$Id$
    Ninputs: 2
 inputsizes: [1 2]
   Noutputs: 1
outputsizes: 1
    Nstates: 1
 statesizes: 2
    Nparams: 6
isnumerical: false
       hist: ssm.hist [1x1 history]
   procinfo: (empty-plist) [1x1 plist]
   plotinfo: (empty-plist) [1x1 plist]
       name: standard_system_params
description: standard spring-mass-dashpot test system
    mdlfile: 
       UUID: 8eafd65e-9052-4800-a694-9482e2bd7b70
--------------------

The fields “amats”, “mmats”, “bmats”, “cmats”, “dmats” contain the matrices of the differential and observation equation of a mass spring system with dampening.

The systems inputs/states/outputs are listed by blocks. There are two input blocks, which correspond to the commanded signal (U) and the noise (N). There is one state block and one output block. Each input has its name displayed followed with individual input variable names and units. Note that the empty ssm object does not have an input block, a state block and an output block of size 0, it has no such blocks, and the size fields are empty.

The “params” field is the 1x1 default plist with no parameter. This is the case when the system is fully numerical, parameters are deleted from the field “params” as they get substituted .

Inputs, states and output sizes are summed up in the fields N* and *sizes.



©LTP Team