comparison m-toolbox/html_help/help/ug/ssm_build_description.html @ 0:f0afece42f48

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