Improve the lindquist example
[scilab.git] / scilab / modules / signal_processing / help / en_US / filters / lindquist.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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="lindquist">
3     <refnamediv>
4         <refname>lindquist</refname>
5         <refpurpose>Lindquist's algorithm</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>[P,R,T]=lindquist(n,H,F,G,R0)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>n</term>
16                 <listitem>
17                     <para>number of iterations.</para>
18                 </listitem>
19             </varlistentry>
20             <varlistentry>
21                 <term>H, F, G</term>
22                 <listitem>
23                     <para>
24                         estimated triple from the covariance sequence of <literal>y</literal>.
25                     </para>
26                 </listitem>
27             </varlistentry>
28             <varlistentry>
29                 <term>R0</term>
30                 <listitem>
31                     <para>E(yk*yk')</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>P</term>
36                 <listitem>
37                     <para>solution of the Riccati equation after n iterations.</para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>R, T</term>
42                 <listitem>
43                     <para>gain matrices of the filter.</para>
44                 </listitem>
45             </varlistentry>
46         </variablelist>
47     </refsection>
48     <refsection>
49         <title>Description</title>
50         <para>
51             computes iteratively the minimal solution of the algebraic
52             Riccati equation and gives the matrices <literal>R</literal> and <literal>T</literal> of the 
53             filter model, by the Lindquist's algorithm.
54         </para>
55     </refsection>
56     <refsection>
57         <title>Example</title>
58         <programlisting role="example"><![CDATA[
59 //Generate signal
60 x=%pi/10:%pi/10:102.4*%pi;
61 y=[1; 1] * sin(x) + [sin(2*x); sin(1.9*x)] + rand(2,1024,"normal");
62
63 //Compute correlations
64 c=[];
65 for j=1:2
66    for k=1:2
67      c=[c;corr(y(k,:),y(j,:),64)];
68    end
69 end
70 c=matrix(c,2,128);
71
72 //Find H,F,G with 6 states
73 hk=hank(20,20,c);
74 [H,F,G]=phc(hk,2,6);
75
76 //Solve Riccati equation
77 R0=c(1:2,1:2);
78 [P,R,T]=lindquist(100,H,F,G,R0);
79 ]]></programlisting>
80     </refsection>
81     <refsection role="see also">
82         <title>See Also</title>
83         <simplelist type="inline">
84             <member>
85                 <link linkend="srfaur">srfaur</link>
86             </member>
87             <member>
88                 <link linkend="faurre">faurre</link>
89             </member>
90             <member>
91                 <link linkend="phc">phc</link>
92             </member>
93         </simplelist>
94     </refsection>
95 </refentry>