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;17232200">
|
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 <P>Built-in models enable to build fast predefined models to use
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 later in simulations.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 <H2>Using existing built-in models</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 <P>The constructor can be called using either of the following
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 syntax:</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 <DIV CLASS="fragment"><PRE><FONT COLOR="#000000">>> system = ssm(plist(</FONT><FONT COLOR="#a020f0">'built-in'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'<model name>'</FONT><FONT COLOR="#000000">))</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 <FONT COLOR="#000000">>> system = ssm(plist(</FONT><FONT COLOR="#a020f0">'built-in'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'<model number>'</FONT><FONT COLOR="#000000">)) </FONT></PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 If the user does not know the model name/number, then he may use the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 following call to see the list of all models :</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 <DIV CLASS="fragment"><PRE STYLE="margin-bottom: 0.5cm">>><FONT COLOR="#000000"> </FONT><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>''</FONT></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>))</FONT></FONT></FONT></PRE></DIV><P STYLE="margin-bottom: 0cm">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 This way the numbers and names are displayed in an error message.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 <P STYLE="margin-bottom: 0cm">Note that the numbers may change if a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 new model is added, and using the name is highly recommended.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 <P STYLE="margin-bottom: 0cm"><BR>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 <P STYLE="margin-bottom: 0cm">The LTPDA includes one mass-spring
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 model which can be generated :</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 <P STYLE="margin-bottom: 0cm"><BR>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 <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>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 M: running ssmFromBuiltinSystem
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 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
|
36 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
|
37 M: running buildParamPlist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 M: running fromStruct
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 M: running ssm/ssm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 M: running validate
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 M: running validate
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 M: running display
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 ------ ssm/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 amats: { [2x2] } [1x1]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 mmats: { [2x2] } [1x1]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 bmats: { [2x1] [2x2] } [1x2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 cmats: { [1x2] } [1x1]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 dmats: { [] [1x2] } [1x2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 timestep: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 inputs: [1x2 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 1 : U | Fu [kg m s^(-2)]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 2 : N | Fn [kg m s^(-2)], On [m]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 states: [1x1 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 1 : standard test system | x [m], xdot [m s^(-1)]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 outputs: [1x1 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 1 : Y | y [m]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 params: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 version: $Id: ssm_build_built_in_content.html,v 1.3 2009/08/28 14:20:07 adrien Exp $-->$Id: ssm_build_built_in_content.html,v 1.3 2009/08/28 14:20:07 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 Ninputs: 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 inputsizes: [1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 Noutputs: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 outputsizes: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 Nstates: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 statesizes: 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 Nparams: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 isnumerical: true
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 hist: ssm.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 procinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 plotinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 name: standard_system_params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 description: standard spring-mass-dashpot test system
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 mdlfile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 UUID: 4415784d-79d9-408d-9b82-3f39ace0d518</PRE></DIV><H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 Options for the built-in constructor</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 <P>There are two options:</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 <UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 <LI><P>NAME and DESCRIPTION allow to set the object's name and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 description in the constructor</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 <LI><P>DIM allows to reduce the model to 3, 2 or 1 dimension. Lower
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 dimension models are built using the 3D model and deleting
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 inputs/states/outputs. The consequence is that parameters that
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 affect primarily the 3D model may still remain in the 1D model in
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 the „params“ field, but also in the matrices if they
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 have a small effect on the 1D dynamics.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 <LI><P>WITHPARAMS allows to keep selected parameters symbolic, to
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 modify their value later. However current issues with MuPad make the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 use of multiple symbolic systems complicated, as the symbolic
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 parameters are global variable with problematic side effects. The
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 keyword 'ALL' returns the system with all its parameters symbolic.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 <DIV CLASS="fragment"><PRE>>> system = ssm(plist(<FONT COLOR="#a020f0">'built-in'</FONT>, <FONT COLOR="#a020f0">'standard_system_params'</FONT>, <FONT COLOR="#a020f0">'withparams'</FONT>, {<FONT COLOR="#a020f0">'D'</FONT>}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 >> system = ssm(plist(<FONT COLOR="#a020f0">'built-in'</FONT>, <FONT COLOR="#a020f0">'standard_system_params'</FONT>, <FONT COLOR="#a020f0">'withparams'</FONT>, <FONT COLOR="#a020f0">'ALL'</FONT>))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 >> <FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>sys = 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>'setnames'</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>'W'</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>'setvalues'</FONT></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=2>, 0.2*i ));</FONT></FONT></FONT></PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 Trying sys.isStable with the first and the third system shows a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 different result, the negative stiffness making the latter unstable.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 </UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 <UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 <LI><P>SETNAMES and SETVALUES allow to set the value for parameters,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 including those which are not kept symbolic. The first field is a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 cell array of strings, the second is a double array of the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 corresponding values.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 </UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 <H2>How to make your own built-in model?</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 <P>The model must exist as a function mfile in the built-in folders
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 defined in the LTPDA preferences panel. The file name must be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 “ssm_model_<model name>.m” .</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 <P>A good template to start writing a file should be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 “ssm_model_standard_system_params.m”. The model should
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 support all the options above, and the use of the ssm “structure“
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 constructor is recommended because it does not increment the history.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 <P><BR><BR>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 </BODY>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 </HTML> |