File: SPcorPmse.html

package info (click to toggle)
libtsp 3r0-1
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 5,096 kB
  • ctags: 1,798
  • sloc: ansic: 14,464; sh: 1,217; makefile: 182
file content (89 lines) | stat: -rw-r--r-- 2,113 bytes parent folder | download
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
<HTML>
<HEAD>
<TITLE>TSP (libtsp/SP) - SPcorPmse</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>SPcorPmse</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
double SPcorPmse (const float pc[], const float rxx[], int Np)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Calculate the mean-square prediction error
</DL>
<H4>Description</H4>
This function calculates the mean-square prediction error for a linear
predictor.  Consider a linear predictor with Np coefficients,
<PRE>
          Np
  y(k) = SUM p(i) x(k-i) ,
         i=1
</PRE>
where x(k) is the input signal.  The prediction error is
<P>
<PRE>
  e(k) = x(k) - y(k) .
</PRE>
<P>
The mean-square prediction error is E[e(k)^2] or in vector-matrix notation
<P>
<PRE>
  E = Ex - 2 p'r + p'R p ,
</PRE>
<P>
The mean-square value Ex, matrix R and vector p are defined as follows
<PRE>
      Ex = E[x(k)^2]
  R(i,j) = E[x(k-i) x(k-j)],  for 1 &lt;= i,j &lt;= Np,
    r(i) = E[x(k) x(k-i)],    for 1 &lt;= i &lt;= Np.
</PRE>
<P>
For this routine, the matrix R must be symmetric and Toeplitz.  Then
<P>
<PRE>
  R(i,j) = rxx(|i-j|)
    r(i) = rxx(i)
</PRE>
<P>
Predictor coefficients are usually expressed algebraically as vectors with
1-offset indexing.  The correspondence to the 0-offset C-arrays is as
follows.
<PRE>
  p(1) &lt;==&gt; pc[0]       predictor coefficient corresponding to lag 1
  p(i) &lt;==&gt; pc[i-1]     1 &lt;= i &lt; Np
</PRE>
<H4>Parameters</H4>
<DL>
<DT>
&lt;-  double SPcorPmse
<DD>
Resultant mean-square prediction error
<DT>
 -&gt; const float pc[]
<DD>
Np element vector of predictor coefficients.  Coefficient pc[i] is the
predictor coefficient corresponding to lag i+1.
<DT>
 -&gt; const float rxx[]
<DD>
Np+1 element vector of autocorrelation values.  Element rxx[i] is the
autocorrelation at lag i.
<DT>
-&gt;  int Np
<DD>
Number of predictor coefficients
</DL>
<H4>Author / revision</H4>
P. Kabal  Copyright (C) 1996
/ Revision 1.4  1996/05/31
<H4>See Also</H4>
<A HREF="SPcorXpc.html">SPcorXpc</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>