0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 <html lang="en">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 <head>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 <meta name="generator" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 <meta http-equiv="Content-Type" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 "text/html; charset=us-ascii">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 <title>Building from scratch (LTPDA Toolbox)</title>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 <meta name="description" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 </head>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 <body>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 <a name="top_of_page" id="top_of_page"></a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 <p style="font-size:1px;"> </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 <table class="nav" summary="Navigation aid" border="0" width=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 "100%" cellpadding="0" cellspacing="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 <td valign="baseline" align="right"><a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 "ssm_building.html"><img src="b_prev.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 "bottom" alt="Building Statespace models"></a> <a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 "ssm_build_built_in.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 "bottom" alt="Building from built-in models"></a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Building from scratch</h1>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 <HTML>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 <HEAD>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 <TITLE></TITLE>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.1 (Win32)">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 <META NAME="CREATED" CONTENT="0;0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 <META NAME="CHANGEDBY" CONTENT="Adrien G">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 <META NAME="CHANGED" CONTENT="20090827;17511500">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 </HEAD>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 <BODY LANG="en-US" DIR="LTR">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 <P>The models can be built from a plist constructor describing each
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 field. It is possible to give incomplete information on the model and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 let the constructor auto-complete some fields.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 <P>It is still rather lengthy to build a ssm object, and it is
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 advisable to write built-in models to limit the time spent on
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 modeling.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 <H2>Incomplete description without parameters (params field) and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 input/state/outputs names</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 <P>The most retrained set of inputs is
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 <DIV CLASS="fragment"><PRE STYLE="margin-bottom: 0.5cm">sys = ssm(plist( 'amats',amats, 'bmats',bmats, 'cmats',cmats, 'dmats',dmats, 'timestep',timestep, 'name',name )</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 Then a shortcut for the scripts is (note that the input order must be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 respected)</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 <DIV CLASS="fragment"><PRE STYLE="margin-bottom: 0.5cm">sys = ssm( amats, bmats, cmats, dmats, timestep, name )</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 example :</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 <DIV CLASS="fragment"><PRE><FONT COLOR="#000000">>> name = </FONT><FONT COLOR="#a020f0">'sys'</FONT><FONT COLOR="#000000">;</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 >> timestep = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 >> amats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 >> bmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 >> cmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 >> dmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 <FONT COLOR="#000000">>> amats{1,1} = -(sym(</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 >> amats{2,2} = -2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 >> amats{3,3} = [0 1 ; -0.05 -0.01];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 >> amats{3,1} = [-1;-3];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 >> bmats{1,1} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 >> bmats{2,2} = 2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 >> bmats{3,3} = 3*eye(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 >> cmats{1,1} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 >> cmats{2,2} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 >> cmats{3,3} = eye(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 >> dmats{1,3} = [6 6];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 >> dmats{2,1} = 6;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 >> dmats{3,2} = [6;6];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 <FONT COLOR="#000000">>> sys = ssm(plist( </FONT><FONT COLOR="#0000ff">...</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 <FONT SIZE=2>'amats'</FONT><FONT COLOR="#000000">,amats, </FONT>'bmats'<FONT COLOR="#000000">,bmats, </FONT>'cmats'<FONT COLOR="#000000">,cmats, </FONT>'dmats'<FONT COLOR="#000000">,dmats, </FONT><FONT COLOR="#0000ff">...</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 <FONT SIZE=2>'timestep'</FONT><FONT COLOR="#000000">,timestep, </FONT>'name'<FONT COLOR="#000000">,name))</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 ------ ssm/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 amats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 [2x1] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 mmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 bmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 cmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 dmats: { [] [] [1x2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 [] [2x1] [] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 timestep: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 inputs: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 1 : input 1 | input 1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 2 : input 2 | input 2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 3 : input 3 | input 3 > 1 [], input 3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 states: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 1 : state 1 | state 1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 2 : state 2 | state 2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 3 : state 3 | state 3 > 1 [], state 3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 outputs: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 1 : output 1 | output 1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 2 : output 2 | output 2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 3 : output 3 | output 3 > 1 [], output 3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 params: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 Ninputs: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 inputsizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 Noutputs: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 outputsizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 Nstates: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 statesizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 Nparams: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 isnumerical: false
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 hist: ssm.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 procinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 plotinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 name: sys
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 mdlfile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 UUID: 61f33fcc-f06a-4d71-944f-3ea094c80458
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 --------------------</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 Then the field “params” must be user set using the syntax
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 “sys.setParams(<parameter plist>)”. Otherwise the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 toolbox will simply assume there are no parameters in the system and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 the matrices should be exclusively numerical in this case..</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 <P>The content of „params“ is a plist with parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 whose:</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 <UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 <LI><P>KEY is the name of the parameter in the matrices</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 <LI><P>VALUE is a property which must be set before proceeding
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 numerical substitutions</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 <LI><P>MIN, MAX, and SIGMA which are useful for an optimizer if
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 system identification is proceeded.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 </UL>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 <DIV CLASS="fragment"><PRE><FONT SIZE=2><FONT FACE="Courier New, monospace"><FONT COLOR="#000000">>>sys.setParams(plist({</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'system frequency'</FONT><FONT COLOR="#000000">}, 2))</FONT></FONT></FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 ------ ssm/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 amats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 [2x1] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 mmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 bmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 cmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 dmats: { [] [] [1x2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 [] [2x1] [] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 timestep: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 inputs: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 1 : input 1 | input 1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 2 : input 2 | input 2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 3 : input 3 | input 3 > 1 [], input 3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 states: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 1 : state 1 | state 1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 2 : state 2 | state 2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 3 : state 3 | state 3 > 1 [], state 3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 outputs: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 1 : output 1 | output 1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 2 : output 2 | output 2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 3 : output 3 | output 3 > 1 [], output 3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 params: (OMEGA=2) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 Ninputs: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 inputsizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 Noutputs: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 outputsizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 Nstates: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 statesizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 Nparams: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 isnumerical: false
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 hist: ssm.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 procinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 plotinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 name: sys
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 mdlfile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 UUID: 7bccc440-fcc3-4d71-bf9c-057bbc08d318
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 --------------------</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 The method “setParams” should not be confused with
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 “setParameters” which only allows to modify the property
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 VALUE in the “params” field.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 <P>Input blocks and input variables will be automatically maned after
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 their index number in this case, and the description field will be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 empty.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 <H2>Incomplete description whithout input/state/outputs names</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 <P>In case the user has a plist describing the parameters, he may use
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 the following either of the syntaxes:</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 <DIV CLASS="fragment"><PRE><FONT FACE="Courier New, monospace"><FONT SIZE=2><FONT COLOR="#000000">>> sys = ssm(plist( </FONT><FONT COLOR="#a020f0">'amats'</FONT><FONT COLOR="#000000">,amats, </FONT><FONT COLOR="#a020f0">'bmats'</FONT><FONT COLOR="#000000">,bmats, </FONT><FONT COLOR="#a020f0">'cmats'</FONT><FONT COLOR="#000000">,cmats, </FONT><FONT COLOR="#a020f0">'dmats'</FONT><FONT COLOR="#000000">,dmats, </FONT><FONT COLOR="#a020f0">'timestep'</FONT><FONT COLOR="#000000">,timestep, </FONT><FONT COLOR="#a020f0">'name'</FONT><FONT COLOR="#000000">,name, </FONT><FONT COLOR="#a020f0">'params'</FONT><FONT COLOR="#000000">,params ));</FONT></FONT></FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 >> sys = ssm( amats, bmats, cmats, dmats, timestep, name, params )
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 <FONT COLOR="#000000">>> name = </FONT><FONT COLOR="#a020f0">'sys'</FONT><FONT COLOR="#000000">;</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 >> timestep = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 <FONT COLOR="#000000">>> params = plist({</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'system frequency'</FONT><FONT COLOR="#000000">}, 2);</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 >> amats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 >> bmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 >> cmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 >> dmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 <FONT COLOR="#000000">>> amats{1,1} = -(sym(</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 >> amats{2,2} = -2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 >> amats{3,3} = [0 1 ; -0.05 -0.01];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 >> amats{3,1} = [-1;-3];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 >> bmats{1,1} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 >> bmats{2,2} = 2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 >> bmats{3,3} = 3*eye(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 >> cmats{1,1} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 >> cmats{2,2} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 >> cmats{3,3} = eye(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 >> dmats{1,3} = [6 6];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 >> dmats{2,1} = 6;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 >> dmats{3,2} = [6;6];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 <FONT COLOR="#000000">>> sys = ssm(plist( </FONT><FONT COLOR="#0000ff">...</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 <FONT COLOR="#a020f0">'amats'</FONT><FONT COLOR="#000000">,amats, </FONT><FONT COLOR="#a020f0">'bmats'</FONT><FONT COLOR="#000000">,bmats, </FONT><FONT COLOR="#a020f0">'cmats'</FONT><FONT COLOR="#000000">,cmats, </FONT><FONT COLOR="#a020f0">'dmats'</FONT><FONT COLOR="#000000">,dmats, </FONT><FONT COLOR="#0000ff">...</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 <FONT COLOR="#a020f0">'timestep'</FONT><FONT COLOR="#000000">,timestep, </FONT><FONT COLOR="#a020f0">'name'</FONT><FONT COLOR="#000000">,name, </FONT><FONT COLOR="#a020f0">'params'</FONT><FONT COLOR="#000000">,params ));</FONT></PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 Then the inputs, states and outputs name fields are still
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 automatically set.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 <P>They can be modified by using the “setBlock*” and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 “setPort*” setter methods. Blocks are vectors of ports
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 which will be matched when assembling two system. Setting their name
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 correctly is important as the names are used to identify
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 automatically which output will be fed to which input. Ports are
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 independent variables and have properties like the name, the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 description and the unit which the user may want to set to keep track
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 of the systems data. Note that there is no unit check implemented
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 when assembling two systems.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 <P>The setter functions are respectively “setBlockNames”,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 “setBlockDescription”, “setPortNames”,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 “setPortDescriptions”, “setPortUnits”.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 <DIV CLASS="fragment"><PRE><FONT COLOR="#000000">>> sys.setBlockNames(plist(</FONT><FONT COLOR="#a020f0">'field'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'inputs'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'blocks'</FONT><FONT COLOR="#000000">, [1 2 3], </FONT><FONT COLOR="#a020f0">'names'</FONT><FONT COLOR="#000000">, {</FONT><FONT COLOR="#a020f0">'myinput1'</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#a020f0">'myinput2'</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#a020f0">'myinput3'</FONT><FONT COLOR="#000000">} ));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 <FONT COLOR="#000000">>> sys.setBlockDescriptions(plist(</FONT><FONT COLOR="#a020f0">'field'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'inputs'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'blocks'</FONT><FONT COLOR="#000000">, {</FONT><FONT COLOR="#a020f0">'myinput1'</FONT><FONT COLOR="#000000">}, </FONT><FONT COLOR="#a020f0">'descriptions'</FONT><FONT COLOR="#000000">,{</FONT><FONT COLOR="#a020f0">'myinput1 description'</FONT><FONT COLOR="#000000">} ));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 <FONT COLOR="#000000">>> sys.setPortNames(plist(</FONT><FONT COLOR="#a020f0">'field'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'inputs'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'block'</FONT><FONT COLOR="#000000">, {</FONT><FONT COLOR="#a020f0">'myinput3'</FONT><FONT COLOR="#000000">}, </FONT><FONT COLOR="#a020f0">'ports'</FONT><FONT COLOR="#000000">, [1 2], </FONT><FONT COLOR="#a020f0">'names'</FONT><FONT COLOR="#000000">,{</FONT><FONT COLOR="#a020f0">'my port 3-1'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'my port 3-2'</FONT><FONT COLOR="#000000">} ));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 <FONT COLOR="#000000">>> sys.setPortDescriptions(plist(</FONT><FONT COLOR="#a020f0">'field'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'inputs'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'block'</FONT><FONT COLOR="#000000">, {</FONT><FONT COLOR="#a020f0">'myinput3'</FONT><FONT COLOR="#000000">}, </FONT><FONT COLOR="#a020f0">'ports'</FONT><FONT COLOR="#000000">, [1 2], </FONT><FONT COLOR="#a020f0">'descriptions'</FONT><FONT COLOR="#000000">,{</FONT><FONT COLOR="#a020f0">'first description'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'second description'</FONT><FONT COLOR="#000000">} ));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 <FONT COLOR="#000000">>> sys.setPortUnits(plist(</FONT><FONT COLOR="#a020f0">'field'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'inputs'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'block'</FONT><FONT COLOR="#000000">, {</FONT><FONT COLOR="#a020f0">'myinput3'</FONT><FONT COLOR="#000000">}, </FONT><FONT COLOR="#a020f0">'ports'</FONT><FONT COLOR="#000000">, [1 2], </FONT><FONT COLOR="#a020f0">'units'</FONT><FONT COLOR="#000000">, [unit(</FONT><FONT COLOR="#a020f0">'kg m^-2'</FONT><FONT COLOR="#000000">) unit(</FONT><FONT COLOR="#a020f0">'m'</FONT><FONT COLOR="#000000">)] ));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 >> sys.inputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 ------ ssmblock/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 name: myinput1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 ports: input 1 > 1 [] [1x1 ssmport]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 description: myinput1 description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 -------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 ------ ssmblock/2 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 name: myinput2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 ports: input 2 > 1 [] [1x1 ssmport]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 -------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 ------ ssmblock/3 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 name: myinput3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 ports: my port 3-1 [kg m^(-2)], my port 3-2 [m] [1x2 ssmport]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 -------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 >>sys.inputs(3).ports
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 ------ ssmport/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 name: my port 3-1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 units: [kg m^(-2)] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 description: first description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 ------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 ------ ssmport/2 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 name: my port 3-2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 units: [m] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 description: second description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 ------------------------</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 So far there is no special display function for ssmblocks so the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 description of the ports is not displayed. This may change in the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 future</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 <H2>Description whith input/state/outputs names</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 <DIV CLASS="fragment"><PRE>Then a more extensive set of inputs is :
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 <FONT COLOR="#000000">>>sys = ssm(plist( </FONT><FONT COLOR="#a020f0">'amats'</FONT><FONT COLOR="#000000">,amats, </FONT><FONT COLOR="#a020f0">'bmats'</FONT><FONT COLOR="#000000">,bmats, </FONT><FONT COLOR="#a020f0">'cmats'</FONT><FONT COLOR="#000000">,cmats, </FONT><FONT COLOR="#a020f0">'dmats'</FONT><FONT COLOR="#000000">,dmats, </FONT><FONT COLOR="#a020f0">'timestep'</FONT><FONT COLOR="#000000">,timestep, </FONT><FONT COLOR="#a020f0">'name'</FONT><FONT COLOR="#000000">,name, </FONT><FONT COLOR="#a020f0">'params'</FONT><FONT COLOR="#000000">,params, </FONT><FONT COLOR="#a020f0">'statenames'</FONT><FONT COLOR="#000000">,statenames, </FONT><FONT COLOR="#a020f0">'inputnames'</FONT><FONT COLOR="#000000">,inputnames, </FONT><FONT COLOR="#a020f0">'outputnames'</FONT><FONT COLOR="#000000">,outputnames ));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 >> sys = ssm( amats, bmats, cmats, dmats, timestep, name, params, statenames, inputnames, outputnames );</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 Still here, the port names are set automatically without any
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 description or unit.</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 <H2>Complete description</H2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 <P>example :</P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 <DIV CLASS="fragment"><PRE><FONT COLOR="#000000">>> name = </FONT><FONT COLOR="#a020f0">'sys'</FONT><FONT COLOR="#000000">;</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 <FONT COLOR="#000000">>> statenames = {</FONT><FONT COLOR="#a020f0">'ss1'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'ss2'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'ss3'</FONT><FONT COLOR="#000000">};</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 <FONT COLOR="#000000">>> inputnames = {</FONT><FONT COLOR="#a020f0">'input1'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'input2'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'input3'</FONT><FONT COLOR="#000000">};</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 <FONT COLOR="#000000">>> outputnames = {</FONT><FONT COLOR="#a020f0">'output1'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'output2'</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#a020f0">'output3'</FONT><FONT COLOR="#000000">};</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 >> timestep = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 <FONT COLOR="#000000">>> params = plist({</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#a020f0">'system frequency'</FONT><FONT COLOR="#000000">}, 2);</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 >> amats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 >> bmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 >> cmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 >> dmats = cell(3,3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 <FONT COLOR="#000000">>> amats{1,1} = -(sym(</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 >> amats{2,2} = -2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 >> amats{3,3} = [0 1 -0.05 -0.01];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 >> amats{3,1} = [-1;-3];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 >> bmats{1,1} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 >> bmats{2,2} = 2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 >> bmats{3,3} = 3*eye(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 >> cmats{1,1} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 >> cmats{2,2} = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 >> cmats{3,3} = eye(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 >> dmats{1,3} = [6 6];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 >> dmats{2,1} = 6;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 >> dmats{3,2} = [6;6];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 <FONT COLOR="#000000">>> sys = ssm(plist( </FONT><FONT COLOR="#0000ff">...</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 <FONT COLOR="#a020f0"> 'amats'</FONT><FONT COLOR="#000000">,amats, </FONT><FONT COLOR="#a020f0">'bmats'</FONT><FONT COLOR="#000000">,bmats, </FONT><FONT COLOR="#a020f0">'cmats'</FONT><FONT COLOR="#000000">,cmats, </FONT><FONT COLOR="#a020f0">'dmats'</FONT><FONT COLOR="#000000">,dmats, </FONT><FONT COLOR="#0000ff">...</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 <FONT COLOR="#a020f0"> 'timestep'</FONT><FONT COLOR="#000000">,timestep, </FONT><FONT COLOR="#a020f0">'name'</FONT><FONT COLOR="#000000">,name, </FONT><FONT COLOR="#a020f0">'params'</FONT><FONT COLOR="#000000">,params, </FONT><FONT COLOR="#0000ff">...</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 <FONT COLOR="#a020f0"> 'statenames'</FONT><FONT COLOR="#000000">,statenames, </FONT><FONT COLOR="#a020f0">'inputnames'</FONT><FONT COLOR="#000000">,inputnames, </FONT><FONT COLOR="#a020f0">'outputnames'</FONT><FONT COLOR="#000000">,outputnames ));</FONT>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 >> sys
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326 ------ ssm/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 amats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 [2x1] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 mmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 bmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 cmats: { [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 [] [1x1] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 [] [] [2x2] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 dmats: { [] [] [1x2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 [1x1] [] []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 [] [2x1] [] } [3x3]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 timestep: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 inputs: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 1 : input1 | input1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 2 : input2 | input2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 3 : input3 | input3 > 1 [], input3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 states: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 1 : ss1 | ss1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 2 : ss2 | ss2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 3 : ss3 | ss3 > 1 [], ss3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 outputs: [1x3 ssmblock]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 1 : output1 | output1 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 2 : output2 | output2 > 1 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 3 : output3 | output3 > 1 [], output3 > 2 []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 params: (OMEGA=2) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 Ninputs: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 inputsizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 Noutputs: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 outputsizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 Nstates: 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 statesizes: [1 1 2]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 Nparams: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 isnumerical: false
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 hist: ssm.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 procinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 plotinfo: (empty-plist) [1x1 plist]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 name: sys
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 mdlfile: UUID: b30c0d1d-9d09-4fd5-8dc1-8185f8b1c165</PRE></DIV><P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 <BR>This constructor still
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 does not set ports properties (except automatic name) nor the block
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 description. <BR>These may be set by the user later on using the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 setter functions above.<BR><BR><BR><BR><BR>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 </P>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 </BODY>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 </HTML>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 <table class="nav" summary="Navigation aid" border="0" width=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 "100%" cellpadding="0" cellspacing="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 <td align="left" width="20"><a href="ssm_building.html"><img src=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 "b_prev.gif" border="0" align="bottom" alt=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 "Building Statespace models"></a> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389 <td align="left">Building Statespace models</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 <td> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 <td align="right">Building from built-in models</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395 <td align="right" width="20"><a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 "ssm_build_built_in.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 "bottom" alt="Building from built-in models"></a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 </table><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 <p class="copy">©LTP Team</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 </body>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 </html>
|