summaryrefslogtreecommitdiff
path: root/modules/cacsd/help/en_US/ddp.xml
blob: 10087768a73a73822a425a34782bfc186dba484f (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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA - 
 * 
 * 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="ddp">
    <refnamediv>
        <refname>ddp</refname>
        <refpurpose>disturbance decoupling</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>[Closed,F,G]=ddp(Sys,zeroed,B1,D1)
            [Closed,F,G]=ddp(Sys,zeroed,B1,D1,flag,alfa,beta)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>Sys</term>
                <listitem>
                    <para>
                        <literal>syslin</literal> list containing the matrices <literal>(A,B2,C,D2)</literal>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>zeroed</term>
                <listitem>
                    <para>
                        integer vector, indices of outputs of <literal>Sys</literal> which are zeroed.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>B1</term>
                <listitem>
                    <para>real matrix</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>D1</term>
                <listitem>
                    <para>
                        real matrix. <literal>B1</literal> and <literal>D1</literal> have the same number of columns.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>flag</term>
                <listitem>
                    <para>
                        string <literal>'ge'</literal> or <literal>'st'</literal> (default) or <literal>'pp'</literal>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>alpha</term>
                <listitem>
                    <para>real or complex vector (loc. of closed loop poles)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>beta</term>
                <listitem>
                    <para>real or complex vector (loc. of closed loop poles)</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Exact disturbance decoupling (output nulling algorithm).
            Given a linear system, and a subset of outputs, z, which are to
            be zeroed, characterize the inputs w of Sys such that the 
            transfer function from w to z is zero.
            <literal>Sys</literal> is a linear system {A,B2,C,D2} with one input and two outputs 
            ( i.e.  Sys: u--&gt;(z,y) ), part the following system defined from <literal>Sys</literal>
            and <literal>B1,D1</literal>:
        </para>
        <programlisting role=""><![CDATA[ 
xdot =  A x + B1  w + B2  u
   z = C1 x + D11 w + D12 u
   y = C2 x + D21 w + D22 u
 ]]></programlisting>
        <para>
            outputs of Sys are partitioned into (z,y) where z is to be zeroed,
            i.e. the matrices C and D2 are:
        </para>
        <programlisting role=""><![CDATA[ 
C=[C1;C2]         D2=[D12;D22]
C1=C(zeroed,:)    D12=D2(zeroed,:)
 ]]></programlisting>
        <para>
            The matrix <literal>D1</literal> is partitioned similarly as <literal>D1=[D11;D21]</literal>
            with <literal>D11=D1(zeroed,:)</literal>.
            The control is u=Fx+Gw and one  looks for matriced <literal>F,G</literal> such that the 
            closed loop system: w--&gt;z given by
        </para>
        <programlisting role=""><![CDATA[ 
xdot= (A+B2*F)  x + (B1 + B2*G) w
  z = (C1+D12F) x + (D11+D12*G) w
 ]]></programlisting>
        <para>
            has zero transfer transfer function.
        </para>
        <para>
            <literal>flag='ge'</literal>no stability constraints.
            <literal>flag='st'</literal> : look for stable closed loop system (A+B2*F stable).
            <literal>flag='pp'</literal> : eigenvalues of A+B2*F are assigned to <literal>alfa</literal> and 
            <literal>beta</literal>.
        </para>
        <para>
            Closed is a realization of the <literal>w--&gt;y</literal> closed loop system
        </para>
        <programlisting role=""><![CDATA[ 
xdot= (A+B2*F)  x + (B1 + B2*G) w
  y = (C2+D22*F) x + (D21+D22*G) w
 ]]></programlisting>
        <para>
            Stability (resp. pole placement) requires stabilizability 
            (resp. controllability) of (A,B2).
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[ 
rand('seed',0);nx=6;nz=3;nu=2;ny=1;
A=diag(1:6);A(2,2)=-7;A(5,5)=-9;B2=[1,2;0,3;0,4;0,5;0,0;0,0];
C1=[zeros(nz,nz),eye(nz,nz)];D12=[0,1;0,2;0,3];
Sys12=syslin('c',A,B2,C1,D12);
C=[C1;rand(ny,nx)];D2=[D12;rand(ny,size(D12,2))];
Sys=syslin('c',A,B2,C,D2);
[A,B2,C1,D12]=abcd(Sys12);  //The matrices of Sys12.
my_alpha=-1;my_beta=-2;flag='ge';
[X,dims,F,U,k,Z]=abinv(Sys12,my_alpha,my_beta,flag);
clean(X'*(A+B2*F)*X)
clean(X'*B2*U)
clean((C1+D12*F)*X)
clean(D12*U);
//Calculating an ad-hoc B1,D1
G1=rand(size(B2,2),3);
B1=-B2*G1;
D11=-D12*G1;
D1=[D11;rand(ny,size(B1,2))];

[Closed,F,G]=ddp(Sys,1:nz,B1,D1,'st',my_alpha,my_beta);
closed=syslin('c',A+B2*F,B1+B2*G,C1+D12*F,D11+D12*G);
ss2tf(closed)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="abinv">abinv</link>
            </member>
            <member>
                <link linkend="ui_observer">ui_observer</link>
            </member>
        </simplelist>
    </refsection>
</refentry>