1
<?xml version="1.0" encoding="UTF-8"?>
3
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
* Copyright (C) INRIA -
6
* This file must be used under the terms of the CeCILL.
7
* This source file is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at
10
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="ss2ss" xml:lang="en">
15
<refname>ss2ss</refname>
16
<refpurpose>state-space to state-space conversion, feedback,
21
<title>Calling Sequence</title>
22
<synopsis>[Sl1,right,left]=ss2ss(Sl,T, [F, [G , [flag]]])</synopsis>
25
<title>Arguments</title>
31
linear system (<literal>syslin</literal> list) in state-space
39
<para>square (non-singular) matrix</para>
43
<term>Sl1, right, left</term>
45
<para>linear systems (syslin lists) in state-space form</para>
51
<para>real matrix (state feedback gain)</para>
57
<para>real matrix (output injection gain)</para>
63
<title>Description</title>
65
Returns the linear system <literal>Sl1=[A1,B1,C1,D1]</literal> where
66
<literal>A1=inv(T)*A*T, B1=inv(T)*B, C1=C*T, D1=D</literal>.
69
Optional parameters <literal>F</literal> and <literal>G</literal>
70
are state feedback and output injection respectively.
73
For example, <literal>Sl1=ss2ss(Sl,T,F)</literal> returns
74
<literal>Sl1</literal> with:
78
<imagedata align="center" fileref="../mml/ss2ss_equation1.mml"/>
82
and <literal>right</literal> is a non singular linear system such
83
that <literal>Sl1=Sl*right</literal>.
86
<literal>Sl1*inv(right)</literal> is a factorization of
87
<literal>Sl</literal>.
90
<literal>Sl1=ss2ss(Sl,T,0*F,G)</literal> returns
91
<literal>Sl1</literal> with:
95
<imagedata align="center" fileref="../mml/ss2ss_equation2.mml"/>
99
and <literal>left</literal> is a non singular linear system such
100
that <literal>Sl1=left*Sl</literal> (<literal>right=Id</literal> if
101
<literal>F=0</literal>).
104
When both <literal>F</literal> and <literal>G</literal> are given,
105
<literal>Sl1=left*Sl*right</literal>.
110
When <literal>flag</literal> is used and
111
<literal>flag=1</literal> an output injection as follows is used
115
<imagedata fileref="../mml/ss2ss_equation3.mml"/>
119
and then a feedback is performed, <literal>F</literal> must be
120
of size <literal>(m+p,n)</literal>
124
<imagedata align="left" fileref="../mml/ss2ss_equation4.mml"/>
128
<literal>right</literal> and <literal>left</literal> have the
131
<programlisting role=""><![CDATA[
132
Sl1 = left*sysdiag(sys,eye(p,p))*right
137
When <literal>flag</literal> is used and
138
<literal>flag=2</literal> a feedback (<literal>F</literal> must be of
139
size <literal>(m,n)</literal>) is performed and then the above output
140
injection is applied. <literal>right</literal> and
141
<literal>left</literal> have the following property:
143
<programlisting role=""><![CDATA[
144
Sl1 = left*sysdiag(sys*right,eye(p,p)))
150
<title>Examples</title>
151
<programlisting role="example"><![CDATA[
152
Sl=ssrand(2,2,5); trzeros(Sl) // zeros are invariant:
153
Sl1=ss2ss(Sl,rand(5,5),rand(2,5),rand(5,2));
154
trzeros(Sl1), trzeros(rand(2,2)*Sl1*rand(2,2))
155
// output injection [ A + GC, (B+GD,-G)]
157
p=1,m=2,n=2; sys=ssrand(p,m,n);
159
// feedback (m,n) first and then output injection.
163
[sys1,right,left]=ss2ss(sys,rand(n,n),F1,G,2);
165
// Sl1 equiv left*sysdiag(sys*right,eye(p,p)))
167
res=clean(ss2tf(sys1) - ss2tf(left*sysdiag(sys*right,eye(p,p))))
169
// output injection then feedback (m+p,n)
170
F2=rand(p,n); F=[F1;F2];
171
[sys2,right,left]=ss2ss(sys,rand(n,n),F,G,1);
173
// Sl1 equiv left*sysdiag(sys,eye(p,p))*right
175
res=clean(ss2tf(sys2)-ss2tf(left*sysdiag(sys,eye(p,p))*right))
177
// when F2= 0; sys1 and sys2 are the same
178
F2=0*rand(p,n);F=[F1;F2];
179
[sys2,right,left]=ss2ss(sys,rand(n,n),F,G,1);
181
res=clean(ss2tf(sys2)-ss2tf(sys1))
184
<refsection role="see also">
185
<title>See Also</title>
186
<simplelist type="inline">
188
<link linkend="projsl">projsl</link>
191
<link linkend="feedback">feedback</link>