comparison m-toolbox/html_help/help/ug/sigproc_lcpsd.html @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
3
4 <html lang="en">
5 <head>
6 <meta name="generator" content=
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
8 <meta http-equiv="Content-Type" content=
9 "text/html; charset=us-ascii">
10
11 <title>Log-scale cross-spectral density estimates (LTPDA Toolbox)</title>
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
14 <meta name="description" content=
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
16 </head>
17
18 <body>
19 <a name="top_of_page" id="top_of_page"></a>
20
21 <p style="font-size:1px;">&nbsp;</p>
22
23 <table class="nav" summary="Navigation aid" border="0" width=
24 "100%" cellpadding="0" cellspacing="0">
25 <tr>
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
27
28 <td valign="baseline" align="right"><a href=
29 "sigproc_lpsd.html"><img src="b_prev.gif" border="0" align=
30 "bottom" alt="Log-scale power spectral density estimates"></a>&nbsp;&nbsp;&nbsp;<a href=
31 "sigproc_lcohere.html"><img src="b_next.gif" border="0" align=
32 "bottom" alt="Log-scale cross coherence density estimates"></a></td>
33 </tr>
34 </table>
35
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Log-scale cross-spectral density estimates</h1>
37 <hr>
38
39 <p>
40 <h2>Description</h2>
41 <p>
42 The LTPDA method <a href="matlab:doc('ao/lcpsd')">ao/lcpsd</a> estimates the cross-power spectral density of time-series
43 signals, included in the input <tt>ao</tt>s following the LPSD algorithm <a href="#references">[1]</a>. Spectral density estimates are not
44 evaluated at frequencies which are linear multiples of the minimum frequency resolution <tt>1/T</tt>, where <tt>T</tt>
45 is the window lenght, but on a logarithmic scale. The algorithm takes care of calculating the frequencies at which to evaluate
46 the spectral estimate, aiming at minimizing the uncertainty in the estimate itself, and to recalculate a suitable
47 window length for each frequency bin.
48 </p>
49 <p>
50 Data are windowed prior to the estimation of the spectrum, by multiplying
51 it with a<a href="specwin.html">spectral window object</a>, and can be detrended by polinomial of time in order to reduce the impact
52 of the border discontinuities. Detrending is performed on each individual window.
53 The user can choose the quantity being given in output among ASD (amplitude spectral density),
54 PSD (power spectral density), AS (amplitude spectrum), and PS (power spectrum).
55 </p>
56 <br>
57 <h2>Syntax</h2>
58 </p>
59 <div class="fragment"><pre>
60 <br> b = lcpsd(a1,a2,pl)
61 </pre>
62 </div>
63 <p>
64 <tt>a1</tt> and <tt>a2</tt> are the 2 <tt>ao</tt>s containing the input time series to be evaluated, <tt>b</tt> is the output object and <tt>pl</tt> is an optional parameter list.
65
66 <h2>Parameters</h2>
67 <p>The parameter list <tt>pl</tt> includes the following parameters:</p>
68 <ul>
69 <li> <tt>'Kdes'</tt> - desired number of averages [default: 100]</li>
70 <li> <tt>'Jdes'</tt> - number of spectral frequencies to compute [default: 1000]</li>
71 <li> <tt>'Lmin'</tt> - minimum segment length [default: 0]</li>
72 <li> <tt>'Win'</tt> - the window to be applied to the data to remove the
73 discontinuities at edges of segments. [default: taken from user prefs].<br>
74 The window is described by a string with its name and, only in the case of Kaiser window,
75 the additional parameter <tt>'psll'</tt>. <br>For instance: plist('Win', 'Kaiser', 'psll', 200). </li>
76 <li> <tt>'Olap'</tt> - segment percent overlap [default: -1, (taken from window function)] </li>
77 <li> <tt>'Order'</tt> - order of segment detrending <ul>
78 <li> -1 - no detrending </li>
79 <li> 0 - subtract mean [default] </li>
80 <li> 1 - subtract linear fit </li>
81 <li> N - subtract fit of polynomial, order N </li> </ul> </li>
82 </ul>
83 The length of the window is set by the value of the parameter <tt>'Nfft'</tt>, so that the window
84 is actually rebuilt using only the key features of the window, i.e. the name and, for Kaiser windows, the PSLL.
85 </p>
86 <p>
87 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
88 <tr width="90%">
89 <td>
90 If the user doesn't specify the value of a given parameter, the default value is used.
91 </td>
92 </tr>
93 </table>
94 </p>
95
96 <p>The function makes log-scale CPSD estimates between the 2 input <tt>ao</tt>s. The input argument
97 list must contain 2 analysis objects, and the output will contain the LCPSD estimate.
98 If passing two identical objects <tt>ai</tt>, the output will be equivalent to the output of <tt>lpsd(ai)</tt>.
99 </p>
100 </pre> </div>
101 </p>
102 <h2>Algorithm</h2>
103 <p>
104 The algorithm is implemented according to <a href="#references">[1]</a>. In order to
105 compute the standard deviation of the mean for each frequency bin, the averaging of the different segments is performed using Welford's
106 algorithm <a href="#references">[2]</a> which allows to compute mean and variance in one loop. <br>
107 In the LPSD algorithm, the first frequencies bins are usually computed using a single segment containing all the data.
108 For these bins, the sample variance is set to <tt>Inf</tt>.
109 </p>
110 <b>Example</b>
111 <p>
112 Evaluation of the log-scale CPSD of two time-series represented by: a low frequency sinewave signal superimposed to
113 white noise, and a low frequency sinewave signal at the same frequency, phase shifted and with different
114 amplitude, superimposed to white noise.
115 </p>
116 <div class="fragment"><pre>
117 <br> <span class="comment">% Parameters</span>
118 nsecs = 1000;
119 fs = 10;
120
121 <span class="comment">% Create input AOs</span>
122 x = ao(plist(<span class="string">'waveform'</span>,<span class="string">'sine wave'</span>,<span class="string">'f'</span>,0.1,<span class="string">'A'</span>,1,<span class="string">'nsecs'</span>,nsecs,<span class="string">'fs'</span>,fs)) + ...
123 ao(plist(<span class="string">'waveform'</span>,<span class="string">'noise'</span>,<span class="string">'type'</span>,<span class="string">'normal'</span>,<span class="string">'nsecs'</span>,nsecs,<span class="string">'fs'</span>,fs));
124 x.setYunits(<span class="string">'m'</span>);
125 y = ao(plist(<span class="string">'waveform'</span>,<span class="string">'sine wave'</span>,<span class="string">'f'</span>,0.1,<span class="string">'A'</span>,2,<span class="string">'nsecs'</span>,nsecs,<span class="string">'fs'</span>,fs,<span class="string">'phi'</span>,90)) + ...
126 4*ao(plist(<span class="string">'waveform'</span>,<span class="string">'noise'</span>,<span class="string">'type'</span>,<span class="string">'normal'</span>,<span class="string">'nsecs'</span>,nsecs,<span class="string">'fs'</span>,fs));
127 y.setYunits(<span class="string">'V'</span>);
128
129 <span class="comment">% Compute log cpsd</span>
130 z = lcpsd(x,y,plist(<span class="string">'nfft'</span>,1000));
131
132 <span class="comment">% Plot</span>
133 iplot(z);
134 </pre>
135 </div>
136
137 <img src="images/l_cpsd_1.png" alt="" border="3">
138 <br>
139 <h2><a name="references">References</a></h2>
140
141 <ol>
142 <li> M. Troebs, G. Heinzel, Improved spectrum estimation from digitized time series
143 on a logarithmic frequency axis, <a href="http://dx.doi.org/10.1016/j.measurement.2005.10.010" ><i>Measurement</i>, Vol. 39 (2006), pp. 120 - 129</a>. See also the <a href="http://dx.doi.org/10.1016/j.measurement.2008.04.004" >Corrigendum</a>. </li>
144 <li> B. P. Weldford, Note on a Method for Calculating Corrected Sums of Squares and Products,
145 <i>Technometrics<i>, Vol. 4, No. 3 (1962), pp 419 - 420.</li>
146 </ol>
147 </p>
148
149 <br>
150 <br>
151 <table class="nav" summary="Navigation aid" border="0" width=
152 "100%" cellpadding="0" cellspacing="0">
153 <tr valign="top">
154 <td align="left" width="20"><a href="sigproc_lpsd.html"><img src=
155 "b_prev.gif" border="0" align="bottom" alt=
156 "Log-scale power spectral density estimates"></a>&nbsp;</td>
157
158 <td align="left">Log-scale power spectral density estimates</td>
159
160 <td>&nbsp;</td>
161
162 <td align="right">Log-scale cross coherence density estimates</td>
163
164 <td align="right" width="20"><a href=
165 "sigproc_lcohere.html"><img src="b_next.gif" border="0" align=
166 "bottom" alt="Log-scale cross coherence density estimates"></a></td>
167 </tr>
168 </table><br>
169
170 <p class="copy">&copy;LTP Team</p>
171 </body>
172 </html>