summaryrefslogtreecommitdiff
path: root/modules/cacsd/help/en_US/lqg2stan.xml
blob: 96c07c2428b0f43c142aceee728750f2278cfe11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA - F Delebecque
 * 
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at    
 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
 *
 -->
<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:lang="en" xml:id="lqg2stan">
    <refnamediv>
        <refname>lqg2stan</refname>
        <refpurpose>LQG to standard problem</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>[P,r]=lqg2stan(P22,bigQ,bigR)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>P22</term>
                <listitem>
                    <para>
                        <literal>syslin</literal> list (nominal plant) in state-space form
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>bigQ</term>
                <listitem>
                    <para>
                        <literal>[Q,S;S',N]</literal> (symmetric) weighting matrix
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>bigR</term>
                <listitem>
                    <para>
                        <literal>[R,T;T',V]</literal> (symmetric) covariance matrix
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>r</term>
                <listitem>
                    <para>
                        <literal>1</literal>x<literal>2</literal> row vector = (number of measurements, number of inputs)  (dimension of  the 2,2 part of <literal>P</literal>)
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>P</term>
                <listitem>
                    <para>
                        <literal>syslin</literal> list (augmented plant)
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <literal>lqg2stan</literal>  returns the augmented plant for linear LQG (H2) controller 
            design.
        </para>
        <para>
            <literal>P22=syslin(dom,A,B2,C2)</literal> is the nominal plant; it can be in continuous 
            time (<literal>dom='c'</literal>) or discrete time (<literal>dom='d'</literal>).
        </para>
        <programlisting role=""><![CDATA[ 
. 
x = Ax + w1 + B2u
y = C2x + w2
 ]]></programlisting>
        <para>
            for continuous time plant.
        </para>
        <programlisting role=""><![CDATA[ 
x[n+1]= Ax[n] + w1 + B2u
    y = C2x + w2
 ]]></programlisting>
        <para>
            for discrete time plant.
        </para>
        <para>
            The (instantaneous) cost function is <literal>[x' u'] bigQ [x;u]</literal>.
        </para>
        <para>
            The covariance of <literal>[w1;w2]</literal> is <literal>E[w1;w2] [w1',w2'] = bigR</literal>
        </para>
        <para>
            If <literal>[B1;D21]</literal> is a factor of <literal>bigQ</literal>, <literal>[C1,D12]</literal>
            is a factor of <literal>bigR</literal> and <literal>[A,B2,C2,D22]</literal> is
            a realization of P22, then <literal>P</literal> is a realization of
            <literal>[A,[B1,B2],[C1,-C2],[0,D12;D21,D22]</literal>.
            The (negative) feedback computed by <literal>lqg</literal> stabilizes <literal>P22</literal>,
            i.e. the poles of <literal>cl=P22/.K</literal> are stable.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[ 
ny=2;nu=3;nx=4;
P22=ssrand(ny,nu,nx);
bigQ=rand(nx+nu,nx+nu);bigQ=bigQ*bigQ';
bigR=rand(nx+ny,nx+ny);bigR=bigR*bigR';
[P,r]=lqg2stan(P22,bigQ,bigR);K=lqg(P,r);  //K=LQG-controller
spec(h_cl(P,r,K))      //Closed loop should be stable
//Same as Cl=P22/.K; spec(Cl('A'))
s=poly(0,'s')
lqg2stan(1/(s+2),eye(2,2),eye(2,2))
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="lqg">lqg</link>
            </member>
            <member>
                <link linkend="lqr">lqr</link>
            </member>
            <member>
                <link linkend="lqe">lqe</link>
            </member>
            <member>
                <link linkend="obscont">obscont</link>
            </member>
            <member>
                <link linkend="h_inf">h_inf</link>
            </member>
            <member>
                <link linkend="augment">augment</link>
            </member>
            <member>
                <link linkend="fstabst">fstabst</link>
            </member>
            <member>
                <link linkend="feedback">feedback</link>
            </member>
        </simplelist>
    </refsection>
</refentry>