view 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
line wrap: on
line source

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

<html lang="en">
<head>
  <meta name="generator" content=
  "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
  <meta http-equiv="Content-Type" content=
  "text/html; charset=us-ascii">

  <title>Building from scratch (LTPDA Toolbox)</title>
  <link rel="stylesheet" href="docstyle.css" type="text/css">
  <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
  <meta name="description" content=
  "Presents an overview of the features, system requirements, and starting the toolbox.">
  </head>

<body>
  <a name="top_of_page" id="top_of_page"></a>

  <p style="font-size:1px;">&nbsp;</p>

  <table class="nav" summary="Navigation aid" border="0" width=
  "100%" cellpadding="0" cellspacing="0">
    <tr>
      <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>

      <td valign="baseline" align="right"><a href=
      "ssm_building.html"><img src="b_prev.gif" border="0" align=
      "bottom" alt="Building Statespace models"></a>&nbsp;&nbsp;&nbsp;<a href=
      "ssm_build_built_in.html"><img src="b_next.gif" border="0" align=
      "bottom" alt="Building from built-in models"></a></td>
    </tr>
  </table>

  <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Building from scratch</h1>
  <hr>
  
  <p>
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.1  (Win32)">
	<META NAME="CREATED" CONTENT="0;0">
	<META NAME="CHANGEDBY" CONTENT="Adrien G">
	<META NAME="CHANGED" CONTENT="20090827;17511500">
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P>The models can be built from a plist constructor describing each
field. It is possible to give incomplete information on the model and
let the constructor auto-complete some fields.</P>
<P>It is still rather lengthy to build a ssm object, and it is
advisable to write built-in models to limit the time spent on
modeling.</P>
<H2>Incomplete description without parameters (params field) and
input/state/outputs names</H2>
<P>The most retrained set of inputs is 
</P>
<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>
Then a shortcut for the scripts is (note that the input order must be
respected)</P>
<DIV CLASS="fragment"><PRE STYLE="margin-bottom: 0.5cm">sys = ssm( amats, bmats, cmats, dmats, timestep, name )</PRE></DIV><P>
example :</P>
<DIV CLASS="fragment"><PRE><FONT COLOR="#000000">&gt;&gt; name = </FONT><FONT COLOR="#a020f0">'sys'</FONT><FONT COLOR="#000000">;</FONT>
&gt;&gt; timestep = 0;
&gt;&gt; amats = cell(3,3);
&gt;&gt; bmats = cell(3,3);
&gt;&gt; cmats = cell(3,3);
&gt;&gt; dmats = cell(3,3);
<FONT COLOR="#000000">&gt;&gt; amats{1,1} = -(sym(</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">));</FONT>
&gt;&gt; amats{2,2} = -2;
&gt;&gt; amats{3,3} = [0 1 ; -0.05 -0.01];
&gt;&gt; amats{3,1} = [-1;-3];
&gt;&gt; bmats{1,1} = 1;
&gt;&gt; bmats{2,2} = 2;
&gt;&gt; bmats{3,3} = 3*eye(2);
&gt;&gt; cmats{1,1} = 1;
&gt;&gt; cmats{2,2} = 1;
&gt;&gt; cmats{3,3} = eye(2);
&gt;&gt; dmats{1,3} = [6 6];
&gt;&gt; dmats{2,1} = 6;
&gt;&gt; dmats{3,2} = [6;6];
<FONT COLOR="#000000">&gt;&gt; sys = ssm(plist( </FONT><FONT COLOR="#0000ff">...</FONT>
<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>
<FONT SIZE=2>'timestep'</FONT><FONT COLOR="#000000">,timestep, </FONT>'name'<FONT COLOR="#000000">,name))</FONT>
------ ssm/1 -------
      amats: {  [1x1]    []      []     
                 []     [1x1]    []     
                [2x1]    []     [2x2]  }  [3x3]
      mmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      bmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      cmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      dmats: {   []      []     [1x2]   
                [1x1]    []      []     
                 []     [2x1]    []    }  [3x3]
   timestep: 0
     inputs:  [1x3 ssmblock]
         1 : input 1 | input 1 &gt; 1 []
         2 : input 2 | input 2 &gt; 1 []
         3 : input 3 | input 3 &gt; 1 [], input 3 &gt; 2 []
     states:  [1x3 ssmblock]
         1 : state 1 | state 1 &gt; 1 []
         2 : state 2 | state 2 &gt; 1 []
         3 : state 3 | state 3 &gt; 1 [], state 3 &gt; 2 []
    outputs:  [1x3 ssmblock]
         1 : output 1 | output 1 &gt; 1 []
         2 : output 2 | output 2 &gt; 1 []
         3 : output 3 | output 3 &gt; 1 [], output 3 &gt; 2 []
     params: (empty-plist) [1x1 plist]
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
    Ninputs: 3
 inputsizes: [1 1 2]
   Noutputs: 3
outputsizes: [1 1 2]
    Nstates: 3
 statesizes: [1 1 2]
    Nparams: 0
isnumerical: false
       hist: ssm.hist [1x1 history]
   procinfo: (empty-plist) [1x1 plist]
   plotinfo: (empty-plist) [1x1 plist]
       name: sys
description: 
    mdlfile: 
       UUID: 61f33fcc-f06a-4d71-944f-3ea094c80458
--------------------</PRE></DIV><P>
Then the field &ldquo;params&rdquo; must be user set using the syntax
&ldquo;sys.setParams(&lt;parameter plist&gt;)&rdquo;. Otherwise the
toolbox will simply assume there are no parameters in the system and
the matrices should be exclusively numerical in this case..</P>
<P>The content of &bdquo;params&ldquo; is a plist with parameters
whose:</P>
<UL>
	<LI><P>KEY is the name of the parameter in the matrices</P>
	<LI><P>VALUE is a property which must be set before proceeding
	numerical substitutions</P>
	<LI><P>MIN, MAX, and SIGMA which are useful for an optimizer if
	system identification is proceeded.</P>
</UL>
<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>
------ ssm/1 -------
      amats: {  [1x1]    []      []     
                 []     [1x1]    []     
                [2x1]    []     [2x2]  }  [3x3]
      mmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      bmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      cmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      dmats: {   []      []     [1x2]   
                [1x1]    []      []     
                 []     [2x1]    []    }  [3x3]
   timestep: 0
     inputs:  [1x3 ssmblock]
         1 : input 1 | input 1 &gt; 1 []
         2 : input 2 | input 2 &gt; 1 []
         3 : input 3 | input 3 &gt; 1 [], input 3 &gt; 2 []
     states:  [1x3 ssmblock]
         1 : state 1 | state 1 &gt; 1 []
         2 : state 2 | state 2 &gt; 1 []
         3 : state 3 | state 3 &gt; 1 [], state 3 &gt; 2 []
    outputs:  [1x3 ssmblock]
         1 : output 1 | output 1 &gt; 1 []
         2 : output 2 | output 2 &gt; 1 []
         3 : output 3 | output 3 &gt; 1 [], output 3 &gt; 2 []
     params: (OMEGA=2) [1x1 plist]
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
    Ninputs: 3
 inputsizes: [1 1 2]
   Noutputs: 3
outputsizes: [1 1 2]
    Nstates: 3
 statesizes: [1 1 2]
    Nparams: 1
isnumerical: false
       hist: ssm.hist [1x1 history]
   procinfo: (empty-plist) [1x1 plist]
   plotinfo: (empty-plist) [1x1 plist]
       name: sys
description: 
    mdlfile: 
       UUID: 7bccc440-fcc3-4d71-bf9c-057bbc08d318
--------------------</PRE></DIV><P>
The method &ldquo;setParams&rdquo; should not be confused with
&ldquo;setParameters&rdquo; which only allows to modify the property
VALUE in the &ldquo;params&rdquo; field.</P>
<P>Input blocks and input variables will be automatically maned after
their index number in this case, and the description field will be
empty. 
</P>
<H2>Incomplete description whithout input/state/outputs names</H2>
<P>In case the user has a plist describing the parameters, he may use
the following either of the syntaxes:</P>
<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>
&gt;&gt; sys = ssm( amats, bmats, cmats, dmats, timestep, name, params )

<FONT COLOR="#000000">&gt;&gt; name = </FONT><FONT COLOR="#a020f0">'sys'</FONT><FONT COLOR="#000000">;</FONT>
&gt;&gt; timestep = 0;
<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>
&gt;&gt; amats = cell(3,3);
&gt;&gt; bmats = cell(3,3);
&gt;&gt; cmats = cell(3,3);
&gt;&gt; dmats = cell(3,3);
<FONT COLOR="#000000">&gt;&gt; amats{1,1} = -(sym(</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">));</FONT>
&gt;&gt; amats{2,2} = -2;
&gt;&gt; amats{3,3} = [0 1 ; -0.05 -0.01];
&gt;&gt; amats{3,1} = [-1;-3];
&gt;&gt; bmats{1,1} = 1;
&gt;&gt; bmats{2,2} = 2;
&gt;&gt; bmats{3,3} = 3*eye(2);
&gt;&gt; cmats{1,1} = 1;
&gt;&gt; cmats{2,2} = 1;
&gt;&gt; cmats{3,3} = eye(2);
&gt;&gt; dmats{1,3} = [6 6];
&gt;&gt; dmats{2,1} = 6;
&gt;&gt; dmats{3,2} = [6;6];
<FONT COLOR="#000000">&gt;&gt; sys = ssm(plist( </FONT><FONT COLOR="#0000ff">...</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="#0000ff">...</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></PRE></DIV><P>
Then the inputs, states and outputs name fields are still
automatically set. 
</P>
<P>They can be modified by using the &ldquo;setBlock*&rdquo; and
&ldquo;setPort*&rdquo; setter methods. Blocks are vectors of ports
which will be matched when assembling two system. Setting their name
correctly is important as the names are used to identify
automatically which output will be fed to which input. Ports are
independent variables and have properties like the name, the
description and the unit which the user may want to set to keep track
of the systems data. Note that there is no unit check implemented
when assembling two systems.</P>
<P>The setter functions are respectively &ldquo;setBlockNames&rdquo;,
&ldquo;setBlockDescription&rdquo;, &ldquo;setPortNames&rdquo;,
&ldquo;setPortDescriptions&rdquo;, &ldquo;setPortUnits&rdquo;.</P>
<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>
<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>
<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>
<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>
<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>
&gt;&gt; sys.inputs

------ ssmblock/1 -------
       name: myinput1
      ports: input 1 &gt; 1 [] [1x1 ssmport]
description: myinput1 description
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
-------------------------
------ ssmblock/2 -------
       name: myinput2
      ports: input 2 &gt; 1 [] [1x1 ssmport]
description: 
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
-------------------------
------ ssmblock/3 -------
       name: myinput3
      ports: my port 3-1 [kg m^(-2)], my port 3-2 [m] [1x2 ssmport]
description: 
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
-------------------------

&gt;&gt;sys.inputs(3).ports

------ ssmport/1 -------
       name: my port 3-1
      units: [kg m^(-2)] [1x1 unit]
description: first description
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
------------------------
------ ssmport/2 -------
       name: my port 3-2
      units: [m] [1x1 unit]
description: second description
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
------------------------</PRE></DIV><P>
So far there is no special display function for ssmblocks so the
description of the ports is not displayed. This may change in the
future</P>
<H2>Description whith input/state/outputs names</H2>
<DIV CLASS="fragment"><PRE>Then a more extensive set of inputs is :
<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>
&gt;&gt; sys = ssm( amats, bmats, cmats, dmats, timestep, name, params, statenames, inputnames, outputnames );</PRE></DIV><P>
Still here, the port names are set automatically without any
description or unit.</P>
<H2>Complete description</H2>
<P>example :</P>
<DIV CLASS="fragment"><PRE><FONT COLOR="#000000">&gt;&gt; name = </FONT><FONT COLOR="#a020f0">'sys'</FONT><FONT COLOR="#000000">;</FONT>
<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>
<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>
<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>
&gt;&gt; timestep = 0;
<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>
&gt;&gt; amats = cell(3,3);
&gt;&gt; bmats = cell(3,3);
&gt;&gt; cmats = cell(3,3);
&gt;&gt; dmats = cell(3,3);
<FONT COLOR="#000000">&gt;&gt; amats{1,1} = -(sym(</FONT><FONT COLOR="#a020f0">'OMEGA'</FONT><FONT COLOR="#000000">));</FONT>
&gt;&gt; amats{2,2} = -2;
&gt;&gt; amats{3,3} = [0 1 -0.05 -0.01];
&gt;&gt; amats{3,1} = [-1;-3];
&gt;&gt; bmats{1,1} = 1;
&gt;&gt; bmats{2,2} = 2;
&gt;&gt; bmats{3,3} = 3*eye(2);
&gt;&gt; cmats{1,1} = 1;
&gt;&gt; cmats{2,2} = 1;
&gt;&gt; cmats{3,3} = eye(2);
&gt;&gt; dmats{1,3} = [6 6];
&gt;&gt; dmats{2,1} = 6;
&gt;&gt; dmats{3,2} = [6;6];
<FONT COLOR="#000000">&gt;&gt; sys = ssm(plist( </FONT><FONT COLOR="#0000ff">...</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="#0000ff">...</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="#0000ff">...</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>
&gt;&gt; sys
------ ssm/1 -------
      amats: {  [1x1]    []      []     
                 []     [1x1]    []     
                [2x1]    []     [2x2]  }  [3x3]
      mmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      bmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      cmats: {  [1x1]    []      []     
                 []     [1x1]    []     
                 []      []     [2x2]  }  [3x3]
      dmats: {   []      []     [1x2]   
                [1x1]    []      []     
                 []     [2x1]    []    }  [3x3]
   timestep: 0
     inputs:  [1x3 ssmblock]
         1 : input1 | input1 &gt; 1 []
         2 : input2 | input2 &gt; 1 []
         3 : input3 | input3 &gt; 1 [], input3 &gt; 2 []
     states:  [1x3 ssmblock]
         1 : ss1 | ss1 &gt; 1 []
         2 : ss2 | ss2 &gt; 1 []
         3 : ss3 | ss3 &gt; 1 [], ss3 &gt; 2 []
    outputs:  [1x3 ssmblock]
         1 : output1 | output1 &gt; 1 []
         2 : output2 | output2 &gt; 1 []
         3 : output3 | output3 &gt; 1 [], output3 &gt; 2 []
     params: (OMEGA=2) [1x1 plist]
    version: $Id: ssm_build_description_content.html,v 1.4 2009/08/28 15:11:53 adrien Exp $
    Ninputs: 3
 inputsizes: [1 1 2]
   Noutputs: 3
outputsizes: [1 1 2]
    Nstates: 3
 statesizes: [1 1 2]
    Nparams: 1
isnumerical: false
       hist: ssm.hist [1x1 history]
   procinfo: (empty-plist) [1x1 plist]
   plotinfo: (empty-plist) [1x1 plist]
       name: sys
description: 
    mdlfile: UUID: b30c0d1d-9d09-4fd5-8dc1-8185f8b1c165</PRE></DIV><P>
<BR>This constructor still
does not set ports properties (except automatic name) nor the block
description. <BR>These may be set by the user later on using the
setter functions above.<BR><BR><BR><BR><BR>
</P>
</BODY>
</HTML>
  </p>

  <br>
  <br>
  <table class="nav" summary="Navigation aid" border="0" width=
  "100%" cellpadding="0" cellspacing="0">
    <tr valign="top">
      <td align="left" width="20"><a href="ssm_building.html"><img src=
      "b_prev.gif" border="0" align="bottom" alt=
      "Building Statespace models"></a>&nbsp;</td>

      <td align="left">Building Statespace models</td>

      <td>&nbsp;</td>

      <td align="right">Building from built-in models</td>

      <td align="right" width="20"><a href=
      "ssm_build_built_in.html"><img src="b_next.gif" border="0" align=
      "bottom" alt="Building from built-in models"></a></td>
    </tr>
  </table><br>

  <p class="copy">&copy;LTP Team</p>
</body>
</html>