Add more examples in cacsd + images 18/10218/3
Sylvestre Ledru [Tue, 15 Jan 2013 13:05:57 +0000 (14:05 +0100)]
Change-Id: I54f7e2802480657a034756ecf2208d1abc9cc10c

scilab/modules/cacsd/help/en_US/dtsi.xml
scilab/modules/cacsd/help/en_US/fspecg.xml
scilab/modules/cacsd/help/en_US/invsyslin.xml
scilab/modules/cacsd/help/en_US/lqg.xml
scilab/modules/cacsd/help/en_US/nehari.xml
scilab/modules/cacsd/help/en_US/sensi.xml
scilab/modules/helptools/images/lqg_1.png [new file with mode: 0644]

index 56805f0..47438dc 100644 (file)
             </member>
         </simplelist>
     </refsection>
+    
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+a=0.5;
+b=1;
+c=2;
+sl=syslin('c',a,b,c);
+dtsi(sl)
+ ]]></programlisting>
+    </refsection>
     <refsection>
         <title>History</title>
         <revhistory>
index f1b9c15..9244e39 100644 (file)
@@ -41,7 +41,7 @@
         <para>
             returns <literal>gm</literal> with <literal>gm</literal> and <literal>gm^-1</literal> stable such that:
         </para>
-        <programlisting><![CDATA[ 
+        <programlisting role="no-scilab-exec"><![CDATA[ 
 gtild(g)*g = gtild(gm)*gm
  ]]></programlisting>
         <para>
@@ -51,6 +51,17 @@ gtild(g)*g = gtild(gm)*gm
             Imaginary-axis poles are forbidden.
         </para>
     </refsection>
+    
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+a=0.5;
+b=1;
+c=2;
+sl=syslin('c',a,b,c);
+fspecg(sl)
+ ]]></programlisting>
+    </refsection>
     <refsection>
         <title>History</title>
         <revhistory>
index 6893c20..0ba8eba 100644 (file)
             <literal>inv(S)</literal> when <literal>S</literal> is a <literal>syslin</literal> list.
         </para>
     </refsection>
+    
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+a=0.5;
+b=1;
+c=2;
+sl=syslin('c',a,b,c);
+slInversed=invsyslin(sl)
+ ]]></programlisting>
+    </refsection>
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 16a8cee..796ae28 100644 (file)
             See example in <literal>lqg2stan</literal>.
         </para>
     </refsection>
+    
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+  s=poly(0,'s');
+  Plant=syslin('c',[1/(s+1)*s/(s-1)^2]);     //Nominal Plant
+  P22=tf2ss(Plant);    //...in state-space form
+  [ny,nu,nx]=size(P22);
+  rand('seed',0);rand('normal');
+  bigQ=rand(nx+nu,nx+nu);
+  bigQ=bigQ*bigQ';
+  bigR=rand(nx+ny,nx+ny);
+  bigR=bigR*bigR';  //random weighting matrices
+  [Plqg,r]=lqg2stan(P22,bigQ,bigR);     //LQG pb as a standard problem
+  Klqg=lqg(Plqg,r);          //Controller
+  spec(h_cl(Plqg,r,Klqg))    //Check internal stability
+  [Slqg,Rlqg,Tlqg]=sensi(P22,Klqg);  //Sensitivity functions
+  frq=logspace(-3,3);     //10^-3  to 10^3
+  y=svplot(Slqg);       //Computes singular values;
+  gainplot(frq,y)   //Plot sing. values
+ ]]></programlisting>
+        <scilab:image>
+            s=poly(0,'s');
+            Plant=syslin('c',[1/(s+1)*s/(s-1)^2]);     //Nominal Plant
+            P22=tf2ss(Plant);    //...in state-space form
+            [ny,nu,nx]=size(P22);
+            rand('seed',0);rand('normal');
+            bigQ=rand(nx+nu,nx+nu);
+            bigQ=bigQ*bigQ';
+            bigR=rand(nx+ny,nx+ny);
+            bigR=bigR*bigR';  //random weighting matrices
+            [Plqg,r]=lqg2stan(P22,bigQ,bigR);     //LQG pb as a standard problem
+            Klqg=lqg(Plqg,r);          //Controller
+            spec(h_cl(Plqg,r,Klqg))    //Check internal stability
+            [Slqg,Rlqg,Tlqg]=sensi(P22,Klqg);  //Sensitivity functions
+            frq=logspace(-3,3);     //10^-3  to 10^3
+            y=svplot(Slqg);       //Computes singular values;
+            gainplot(frq,y)   //Plot sing. values
+        </scilab:image>
+    </refsection>
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 9980711..ac8f348 100644 (file)
@@ -54,7 +54,7 @@
             <literal>R</literal> is strictly proper and <literal>- R~</literal> is stable 
             (i.e. <literal>R</literal> is anti stable).
         </para>
-        <programlisting role=""><![CDATA[ 
+        <programlisting role="no-scilab-exec"><![CDATA[ 
 || R - X ||oo = min || R - Y ||oo
               Y in Hoo
  ]]></programlisting>
index 43bd32b..8baf17f 100644 (file)
@@ -93,7 +93,8 @@
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
-G=ssrand(1,1,3);K=ssrand(1,1,3);
+G=ssrand(1,1,3);
+K=ssrand(1,1,3);
 [Se,Re,Te]=sensi(G,K);
 Se1=inv(eye()+G*K);  //Other way to compute
 ss2tf(Se)    //Se seen in transfer form
diff --git a/scilab/modules/helptools/images/lqg_1.png b/scilab/modules/helptools/images/lqg_1.png
new file mode 100644 (file)
index 0000000..e1b0bfd
Binary files /dev/null and b/scilab/modules/helptools/images/lqg_1.png differ