283941bff459494b596c6f88044d6d94938e4205
[scilab.git] / scilab / modules / xcos / help / en_US / batch_functions / steadycos.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scicos
4  * 
5  * Copyright (C) INRIA - METALAU Project <scicos@inria.fr> (HTML version)
6  * Copyright (C) DIGITEO - Scilab Consortium (XML Docbook version)
7  * 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  * 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  * 
22  * See the file ./license.txt
23  -->
24 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="steadycos">
25     <refnamediv>
26         <refname>steadycos</refname>
27         <refpurpose>Finds an equilibrium state of a general dynamical system described by a xcos diagram</refpurpose>
28     </refnamediv>
29     <refsynopsisdiv>
30         <title>Calling Sequence</title>
31         <synopsis>[X,U,Y,XP]=steadycos(scs_m,X,U,Y,Indx,Indu,Indy [,Indxp [,param ] ])</synopsis>
32     </refsynopsisdiv>
33     <refsection id="Module_steadycos">
34         <title>Module</title>
35         <itemizedlist>
36             <listitem>
37                 <para>
38                     <link linkend="xcos">xcos</link>
39                 </para>
40             </listitem>
41         </itemizedlist>
42     </refsection>
43     <refsection id="Description_steadycos">
44         <title>Description</title>
45         <para>
46             This function finds the steady state for a given system described by a xcos diagram or <link linkend="SUPER_f">sub-diagram</link>. The diagram should have <link linkend="IN_f">inputs</link> and <link linkend="OUT_f">outputs</link>.The steady state concern only the continuous-time dynamics.  
47         </para>
48         <para>
49         </para>
50         <programlisting role="example"><![CDATA[
51 // loading data
52 exec("SCI/modules/xcos/tests/unit_tests/PENDULUM_ANIM.sci");
53 exec("SCI/modules/xcos/tests/unit_tests/anim_pen.sci");
54 importXcosDiagram("SCI/modules/xcos/tests/unit_tests/pendulum_anim45.xcos");
55
56 // configure the context
57 M  = 10;
58 m  = 3;
59 l  = 3;
60 ph = 0.1;
61
62 // look for the specific sub-diagram to work on
63 for i=1:length(scs_m.objs)
64     if typeof(scs_m.objs(i))=="Block" & scs_m.objs(i).gui=="SUPER_f" then
65         scs_m = scs_m.objs(i).model.rpar;
66         break;
67     end
68 end
69
70 [X,U,Y,XP] = steadycos(scs_m,[],[],[],[],1,1:$);
71  ]]></programlisting>
72     </refsection>
73     <refsection id="Parameters_steadycos">
74         <title>Arguments</title>
75         <itemizedlist>
76             <listitem>
77                 <para>
78                     <emphasis role="bold">scs_m :</emphasis> a xcos data structure
79                 </para>
80             </listitem>
81             <listitem>
82                 <para>
83                     <emphasis role="bold">X:</emphasis> column vector. Continuous state. Can be set to [] if zero.
84                 </para>
85             </listitem>
86             <listitem>
87                 <para>
88                     <emphasis role="bold">U:</emphasis> column vector. Input. Can be set to [] if zero.
89                 </para>
90             </listitem>
91             <listitem>
92                 <para>
93                     <emphasis role="bold">Y:</emphasis> column vector. Output. Can be set to [] if zero.
94                 </para>
95             </listitem>
96             <listitem>
97                 <para>
98                     <emphasis role="bold">Indx :</emphasis> index of entries of X that are not fixed. If all can vary, set to 1:$
99                 </para>
100             </listitem>
101             <listitem>
102                 <para>
103                     <emphasis role="bold">Indu :</emphasis> index of entries of U that are not fixed. If all can vary, set to 1:$
104                 </para>
105             </listitem>
106             <listitem>
107                 <para>
108                     <emphasis role="bold">Indy :</emphasis> index of entries of Y that are not fixed. If all can vary, set to 1:$
109                 </para>
110             </listitem>
111             <listitem>
112                 <para>
113                     <emphasis role="bold">Indxp :</emphasis> index of entries of XP (derivative of x) that need not be zero. If all can vary, set to 1:$. Default [].
114                 </para>
115             </listitem>
116             <listitem>
117                 <para>
118                     <emphasis role="bold">param :</emphasis> list with two elements (default list(1.d-6,0)). param(1): scalar. Perturbation level for linearization; the following variation is used del([x;u])_i = param(1)+param(1)*1d-4*abs([x;u])_i. param(2): scalar. Time t.
119                 </para>
120             </listitem>
121             <listitem>
122                 <para>
123                     <emphasis role="bold">X:</emphasis> steady state X
124                 </para>
125             </listitem>
126             <listitem>
127                 <para>
128                     <emphasis role="bold">U:</emphasis> stationary input U
129                 </para>
130             </listitem>
131             <listitem>
132                 <para>
133                     <emphasis role="bold">Y:</emphasis> output corresponding to steady state found
134                 </para>
135             </listitem>
136             <listitem>
137                 <para>
138                     <emphasis role="bold">XP :</emphasis> derivative of the state corresponding to steady state found
139                 </para>
140             </listitem>
141         </itemizedlist>
142     </refsection>
143     <refsection id="Filecontent_steadycos">
144         <title>File content</title>
145         <itemizedlist>
146             <listitem>
147                 <para> SCI/modules/scicos/macros/scicos_auto/steadycos.sci</para>
148             </listitem>
149         </itemizedlist>
150     </refsection>
151     <refsection id="SeeAlso_steadycos">
152         <title>See Also</title>
153         <itemizedlist>
154             <listitem>
155                 <para>
156                     <link linkend="lincos">lincos - Constructs by linearization a linear state-space model from a general dynamical system described by a xcos diagram (Scilab Function)</link>
157                 </para>
158             </listitem>
159             <listitem>
160                 <para>
161                     <link linkend="scicos_simulate">scicos_simulate - Function for running xcos simulation in batch mode (Scilab Function)</link>
162                 </para>
163             </listitem>
164             <listitem>
165                 <para>
166                     <link linkend="xcos">xcos - Block diagram editor and GUI for the hybrid simulator (Scilab Function)</link>
167                 </para>
168             </listitem>
169         </itemizedlist>
170     </refsection>
171 </refentry>