0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 <HTML>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 <HEAD>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 <TITLE></TITLE>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.1 (Win32)">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 <META NAME="CREATED" CONTENT="0;0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 <META NAME="CHANGEDBY" CONTENT="Adrien G">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 <META NAME="CHANGED" CONTENT="20090827;17351600">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 </HEAD>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 <BODY LANG="en-US" DIR="LTR">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 <H2>What is a ssm object?</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 <P>The ssm class is a class to use “state space models”
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 for simulation, identification and modeling in the toolbox. A state
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 space model is a mathematical object constituted of</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 <UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 <LI><P>A time model represented by the field “timestep”,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 either discrete or continuous (“timestep” is then 0)</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 <LI><P>A linear differential equation, which turns into a difference
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 equation it the model is time discrete. This equation is written
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 using a state space x in the form x' = Ax + Bu where A is the state
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 transition matrix and B the state input matrix, u being the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 exogenous input signal. In this setup, x and u are time series.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 <LI><P>An observation equation which allows for linear observation
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 of the input and the state : y = Cx+Du. The variable y is the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 of the system.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 </UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 <P>Input and output variables (lines in u and y) may be named and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 assigned a unit. However for the state x there is more of a choice
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 since if free of choice via a basis change. The most usual choice is
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 that x contents the same units as y and it derivatives, or the same
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 units as u and its integrals. In general the size of the state space
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 is equal to the number of poles in the system.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 <P>In the LTPDA toolbox, lines in u,y,x are grouped in blocks (input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 blocks, state blocks, output blocks) to ease the understanding of a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 large system. This means the matrices A, B, C, and D are also split
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 into blocks of the corresponding size. The diagonal blocks of A may
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 represent the dynamics of a LTP subsystem (the controller, the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 propulsion …) or the coupling between two systems (from the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 propulsion to the equations of motion)... In addition the dynamic
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 equation also contains an inertia matrix M so that the parametric
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 equation is made simple. The equation becomes M x' = Ax + Bu. If not
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 user set M is supposed to be the identity.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 <P>Below we build a standard system to show the contents of the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 object.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 <DIV CLASS="fragment"><PRE>>> <FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>system = ssm(plist(</FONT></FONT></FONT><FONT COLOR="#a020f0"><FONT FACE="Courier New, monospace"><FONT SIZE=2>'built-in'</FONT></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>, </FONT></FONT></FONT><FONT COLOR="#a020f0"><FONT FACE="Courier New, monospace"><FONT SIZE=2>'standard_system_params'</FONT></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>, </FONT></FONT></FONT><FONT COLOR="#a020f0"><FONT FACE="Courier New, monospace"><FONT SIZE=2>'withparams'</FONT></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>, </FONT></FONT></FONT><FONT COLOR="#a020f0"><FONT FACE="Courier New, monospace"><FONT SIZE=2>'ALL'</FONT></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>))</FONT></FONT></FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 M: running ssmFromBuiltinSystem
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 M: looking for models in C:\Documents and Settings\Adrien.IFR-NB01\My Documents\MATLAB2008\LTPDA_SSM_MODELS\ltp_ssm_models
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 M: looking for models in C:\Users\Adrien.IFR-NB01\My Documents\MATLAB2008\ltpda_toolbox\ltpda\classes\@ssm\..\..\m\built_in_models
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 M: running buildParamPlist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 M: running fromStruct
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 M: running validate
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 M: running validate
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 M: running display
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 ------ ssm/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 amats: { [2x2] } [1x1]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 mmats: { [2x2] } [1x1]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 bmats: { [2x1] [2x2] } [1x2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 cmats: { [1x2] } [1x1]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 dmats: { [1x1] [1x2] } [1x2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 timestep: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 inputs: [1x2 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 1 : U | Fu [kg m s^(-2)]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 2 : N | Fn [kg m s^(-2)], On [m]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 states: [1x1 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 1 : standard test system | x [m], xdot [m s^(-1)]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 outputs: [1x1 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 1 : Y | y [m]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 params: (W=0.2, C=0.5, C1=0, C2=0, B=1, D=0) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 version: $Id: ssm_introduction_content.html,v 1.3 2009/08/28 14:20:07 adrien Exp $-->$Id: ssm_introduction_content.html,v 1.3 2009/08/28 14:20:07 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 Ninputs: 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 inputsizes: [1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 Noutputs: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 outputsizes: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 Nstates: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 statesizes: 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 Nparams: 6
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 isnumerical: false
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 hist: ssm.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 procinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 plotinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 name: standard_system_params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 description: standard spring-mass-dashpot test system
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 mdlfile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 UUID: 8eafd65e-9052-4800-a694-9482e2bd7b70
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 --------------------</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 The fields “amats”, “mmats”, “bmats”,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 “cmats”, “dmats” contain the matrices of the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 differential and observation equation of a mass spring system with
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 dampening.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 <P>The systems inputs/states/outputs are listed by blocks. There are
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 two input blocks, which correspond to the commanded signal (U) and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 the noise (N). There is one state block and one output block. Each
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 input has its name displayed followed with individual input variable
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 names and units. Note that the empty ssm object does not have an
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 input block, a state block and an output block of size 0, it has no
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 such blocks, and the size fields are empty.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 <P>The “params” field is the 1x1 default plist with no
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 parameter. This is the case when the system is fully numerical,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 parameters are deleted from the field “params” as they
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 get substituted .</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 <P>Inputs, states and output sizes are summed up in the fields N* and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 *sizes.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 </BODY>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 </HTML> |