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
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
*
* This help file was generated from levinson.sci using help_from_sci().
*
-->
<refentry version="5.0-subset Scilab" xml:id="levinson" xml:lang="en"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns3="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:scilab="http://www.scilab.org"
xmlns:db="http://docbook.org/ns/docbook">
<refnamediv>
<refname>levinson</refname>
<refpurpose>Levinson-Durbin Recurssion Algorithm</refpurpose>
<para> </para>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>
a = levinson(r)
a = levinson(r,n)
[a,e] = levinson(r,n)
[a,e,k] = levinson(r,n)
</synopsis>
<para> </para>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry><term>r</term>
<listitem><para> Real or complex deterministic autocorrelation sequence input </para></listitem></varlistentry>
<varlistentry><term>a</term>
<listitem><para> Coefficients of length(r)-1 order Autoregressive linear process </para></listitem></varlistentry>
<varlistentry><term>n</term>
<listitem><para> Order of autoregressive model (default value is length(r)-1 , if n is not given)</para></listitem></varlistentry>
<varlistentry><term>e</term>
<listitem><para> Prediction error of order n</para></listitem></varlistentry>
<varlistentry><term>k</term>
<listitem><para> Reflection coefficient vector of length n</para></listitem></varlistentry>
</variablelist>
<para> </para>
</refsection>
<refsection>
<title>Description</title>
<para> The Levinson-Durbin recursion algorithm is used for finding an all-pole IIR filter with a given deterministic autocorrelation sequence (r) </para>
<para>
<latex>
\begin{eqnarray}
H(z) = \frac{1}{1+a(2)z^{-1}+a(3)z^{-2} + ... +a(n+1)z^{-n}}
\end{eqnarray}
</latex>
</para>
<para> </para>
</refsection>
<refsection>
<title>Examples </title>
<para> Estimate the coefficients of an autoregressive process given by equation </para>
<para>
<latex>
\begin{eqnarray}
x(n) = 0.1x(n-1) - 0.8x(n-2) + w(n)
\end{eqnarray}
</latex>
</para>
<para> </para>
<programlisting role="example"><![CDATA[
a = [1 0.1 -0.8];
v = 0.4; //variance, v=0.4
w = sqrt(v)*rand(15000,1,"normal");
x = filter(1,a,w);
[r,lg] = xcorr(x,'biased');
r(lg<0) = [];
ar = levinson(r,length(a)-1) //coefficients of autoregressive process
]]></programlisting>
</refsection>
</refentry>
|