Remove the obsolete help page about the language variable 'getlanguage()' should...
[scilab.git] / scilab / modules / xcos / help / en_US / batch_functions / lincos.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="lincos">
25     <refnamediv>
26         <refname>lincos</refname>
27         <refpurpose>Constructs by linearization a linear state-space model from a general dynamical system described by a xcos diagram</refpurpose>
28     </refnamediv>
29     <refsynopsisdiv>
30         <title>Calling Sequence</title>
31         <synopsis>sys= lincos(scs_m [,x0,u0 [,param] ])</synopsis>
32     </refsynopsisdiv>
33     <refsection id="Module_lincos">
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_lincos">
44         <title>Description</title>
45         <para>
46             Construct a linear state-space system by linearizing a model given as a Xcos diagram. The idea is to transform a <link linkend="SUPER_f">sub-diagram</link> to a linear state-space model. The sub-diagram should have <link linkend="IN_f">inputs</link> and <link linkend="OUT_f">outputs</link>.
47         </para>
48         <para>
49             The output is a Scilab data structure of type continuous-time state-space linear system.  
50         </para>
51         <para>
52         </para>
53         <programlisting role="example"><![CDATA[
54 // loading data
55 exec("SCI/modules/xcos/tests/unit_tests/PENDULUM_ANIM.sci");
56 exec("SCI/modules/xcos/tests/unit_tests/anim_pen.sci");
57
58 loadXcosLibs(); loadScicos();
59 importXcosDiagram("SCI/modules/xcos/tests/unit_tests/pendulum_anim45.xcos");
60
61 // specific context data
62 M  = 10;
63 m  = 3;
64 l  = 3;
65 ph = 0.1;
66
67 // looking for the Superblock to linearize
68 for i=1:length(scs_m.objs)
69     if typeof(scs_m.objs(i))=="Block" & scs_m.objs(i).gui=="SUPER_f" then
70         scs_m = scs_m.objs(i).model.rpar;
71         break;
72     end
73 end
74
75 sys = lincos(scs_m);
76
77 bode(sys);
78  ]]></programlisting>
79     </refsection>
80     <refsection id="Parameters_lincos">
81         <title>Arguments</title>
82         <itemizedlist>
83             <listitem>
84                 <para>
85                     <emphasis role="bold">scs_m :</emphasis> a xcos data structure
86                 </para>
87             </listitem>
88             <listitem>
89                 <para>
90                     <emphasis role="bold">x0 :</emphasis> column vector. Continuous state around which linearization to be done (default 0)
91                 </para>
92             </listitem>
93             <listitem>
94                 <para>
95                     <emphasis role="bold">u0 :</emphasis> column vector. Input around which linearization to be done (default 0)
96                 </para>
97             </listitem>
98             <listitem>
99                 <para>
100                     <emphasis role="bold">param :</emphasis> param: 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.
101                 </para>
102             </listitem>
103             <listitem>
104                 <para>
105                     <emphasis role="bold">sys :</emphasis> state-space system
106                 </para>
107             </listitem>
108         </itemizedlist>
109     </refsection>
110     <refsection id="SeeAlso_lincos">
111         <title>See Also</title>
112         <itemizedlist>
113             <listitem>
114                 <para>
115                     <link linkend="steadycos">steadycos - Finds an equilibrium state of a general dynamical system described by a xcos diagram (Scilab Function)</link>
116                 </para>
117             </listitem>
118             <listitem>
119                 <para>
120                     <link linkend="scicos_simulate">scicos_simulate - Function for running xcos simulation in batch mode (Scilab Function)</link>
121                 </para>
122             </listitem>
123         </itemizedlist>
124     </refsection>
125 </refentry>