Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/sigproc_lcohere.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 coherence 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;"> </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_lcpsd.html"><img src="b_prev.gif" border="0" align= | |
30 "bottom" alt="Log-scale cross-spectral density estimates"></a> <a href= | |
31 "sigproc_ltfe.html"><img src="b_next.gif" border="0" align= | |
32 "bottom" alt="Log-scale transfer function estimates"></a></td> | |
33 </tr> | |
34 </table> | |
35 | |
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Log-scale cross coherence density estimates</h1> | |
37 <hr> | |
38 | |
39 <p> | |
40 <h2>Description</h2> | |
41 <p> | |
42 The LTPDA method <a href="matlab:doc('ao/lcohere')">ao/lcohere</a> estimates the coherence function 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 = lcohere(a1,a2,pl) | |
61 </pre> | |
62 </div> | |
63 <p> <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. | |
64 | |
65 <h2>Parameters</h2> | |
66 <p>The parameter list <tt>pl</tt> includes the following parameters:</p> | |
67 <ul> | |
68 <li> <tt>'Kdes'</tt> - desired number of averages [default: 100]</li> | |
69 <li> <tt>'Jdes'</tt> - number of spectral frequencies to compute [default: 1000]</li> | |
70 <li> <tt>'Lmin'</tt> - minimum segment length [default: 0]</li> | |
71 <li> <tt>'Win'</tt> - the window to be applied to the data to remove the | |
72 discontinuities at edges of segments. [default: taken from user prefs].<br> | |
73 The window is described by a string with its name and, only in the case of Kaiser window, | |
74 the additional parameter <tt>'psll'</tt>. <br>For instance: plist('Win', 'Kaiser', 'psll', 200). </li> | |
75 <li> <tt>'Olap'</tt> - segment percent overlap [default: -1, (taken from window function)] </li> | |
76 <li> <tt>'Order'</tt> - order of segment detrending <ul> | |
77 <li> -1 - no detrending </li> | |
78 <li> 0 - subtract mean [default] </li> | |
79 <li> 1 - subtract linear fit </li> | |
80 <li> N - subtract fit of polynomial, order N </li> </ul> </li> | |
81 <li><tt>'Type'</tt> - type of scaling of the coherence function. Choose between:</li> | |
82 <ul> | |
83 <li> <tt>'C'</tt> - Complex Coherence Sxy / sqrt(Sxx * Syy) [default ]</li> | |
84 <li> <tt>'MS'</tt> - Magnitude-Squared Coherence (abs(Sxy))^2 / (Sxx * Syy) </li> | |
85 </ul> | |
86 </ul> | |
87 The length of the window is set by the value of the parameter <tt>'Nfft'</tt>, so that the window | |
88 is actually rebuilt using only the key features of the window, i.e. the name and, for Kaiser windows, the PSLL. | |
89 </p> | |
90 <p> | |
91 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1"> | |
92 <tr width="90%"> | |
93 <td> | |
94 If the user doesn't specify the value of a given parameter, the default value is used. | |
95 </td> | |
96 </tr> | |
97 </table> | |
98 </p> | |
99 <p> | |
100 The function makes magnitude-squadred coherence estimates between the 2 input <tt>ao</tt>s, on a logaritmic frequency scale. | |
101 If passing two identical objects <tt>ai</tt> or linearly combined signals, the output will be 1 at all frequencies.</p> | |
102 </pre> </div> | |
103 </p> | |
104 <h2>Algorithm</h2> | |
105 <p> | |
106 The algorithm is implemented according to <a href="#references">[1]</a>. The standard deviation of the mean is computed according to <a href="#references">[2]</a>: | |
107 </p> | |
108 <div align="center"> | |
109 <img src="images/cohere_sigma1.png" > | |
110 </div> | |
111 where | |
112 <div align="center"> | |
113 <img src="images/tfe_sigma2.png" > | |
114 </div> | |
115 <br> | |
116 <p> | |
117 is the coherence function. | |
118 In the LPSD algorithm, the first frequencies bins are usually computed using a single segment containing all the data. | |
119 For these bins, the sample variance is set to <tt>Inf</tt>. | |
120 </p> | |
121 <h2>Example</h2> | |
122 <p> | |
123 Evaluation of the coherence of two time-series represented by: a low frequency sinewave signal superimposed to | |
124 white noise, and a low frequency sinewave signal at the same frequency, phase shifted and with different | |
125 amplitude, superimposed to white noise. | |
126 </p> | |
127 <div class="fragment"><pre> | |
128 <br> <span class="comment">% Parameters</span> | |
129 nsecs = 1000; | |
130 fs = 10; | |
131 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)) + ... | |
132 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)); | |
133 x.setYunits(<span class="string">'m'</span>); | |
134 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)) + ... | |
135 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)); | |
136 y.setYunits(<span class="string">'V'</span>); | |
137 | |
138 <span class="comment">% Compute log coherence</span> | |
139 Cxy = lcohere(x,y,plist(<span class="string">'win'</span>,<span class="string">'Kaiser'</span>,<span class="string">'psll'</span>,200)); | |
140 | |
141 <span class="comment">% Plot</span> | |
142 iplot(Cxy); | |
143 </pre> | |
144 </div> | |
145 | |
146 <img src="images/l_cohere_1.png" alt="" border="3"> | |
147 <br> | |
148 <!-- <img src="images/l_cohere_2.png" alt="" border="3"> | |
149 <br> --> | |
150 | |
151 <h2><a name="references">References</a></h2> | |
152 | |
153 <ol> | |
154 <li> M. Troebs, G. Heinzel, Improved spectrum estimation from digitized time series | |
155 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> | |
156 <li> G.C. Carter, C.H. Knapp, A.H. Nuttall, Estimation of the Magnitude-Squared Coherence Function Via Overlapped Fast Fourier Transform Processing | |
157 , <i>IEEE Trans. on Audio and Electroacoustics</i>, Vol. 21, No. 4 (1973), pp. 337 - 344.</a></li> | |
158 </ol> | |
159 </p> | |
160 | |
161 <br> | |
162 <br> | |
163 <table class="nav" summary="Navigation aid" border="0" width= | |
164 "100%" cellpadding="0" cellspacing="0"> | |
165 <tr valign="top"> | |
166 <td align="left" width="20"><a href="sigproc_lcpsd.html"><img src= | |
167 "b_prev.gif" border="0" align="bottom" alt= | |
168 "Log-scale cross-spectral density estimates"></a> </td> | |
169 | |
170 <td align="left">Log-scale cross-spectral density estimates</td> | |
171 | |
172 <td> </td> | |
173 | |
174 <td align="right">Log-scale transfer function estimates</td> | |
175 | |
176 <td align="right" width="20"><a href= | |
177 "sigproc_ltfe.html"><img src="b_next.gif" border="0" align= | |
178 "bottom" alt="Log-scale transfer function estimates"></a></td> | |
179 </tr> | |
180 </table><br> | |
181 | |
182 <p class="copy">©LTP Team</p> | |
183 </body> | |
184 </html> |