comparison m-toolbox/html_help/help/ug/sigproc_tfe_content.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 <h2>Description</h2>
2 <p>
3 The LTPDA method <a href="matlab:doc('ao/tfe')">ao/tfe</a> estimates the transfer function of time-series
4 signals, included in the input <tt>ao</tt>s following the Welch's averaged, modified periodogram method <a href="#references">[1]</a>.
5 Data are windowed prior to the estimation of the spectra, by multiplying
6 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
7 of the border discontinuities. The window length is adjustable to shorter lenghts to reduce the spectral
8 density uncertainties, and the percentage of subsequent window overlap can be adjusted as well.
9 <br>
10 <br>
11 <h2>Syntax</h2>
12 </p>
13 <div class="fragment"><pre>
14 <br> b = tfe(a1,a2,pl)
15 </pre>
16 </div>
17 <p>
18 <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
19 <tt>pl</tt> is an optional parameters list.
20 </p>
21 <h2>Parameters</h2>
22 The parameter list <tt>pl</tt> includes the following parameters:
23 <ul>
24 <li> <tt>'Nfft'</tt> - number of samples in each fft [default: length of input data]
25 A string value containing the variable 'fs' can
26 also be used, e.g., plist('Nfft', '2*fs') </li>
27 <li> <tt>'Win'</tt> - the window to be applied to the data to remove the
28 discontinuities at edges of segments. [default: taken from user prefs].<br>
29 The window is described by a string with its name and, only in the case of Kaiser window,
30 the additional parameter <tt>'psll'</tt>. <br>For instance: plist('Win', 'Kaiser', 'psll', 200). </li>
31 <li> <tt>'Olap'</tt> - segment percent overlap [default: -1, (taken from window function)] </li>
32 <li> <tt>'Order'</tt> - order of segment detrending <ul>
33 <li> -1 - no detrending </li>
34 <li> 0 - subtract mean [default] </li>
35 <li> 1 - subtract linear fit </li>
36 <li> N - subtract fit of polynomial, order N </li> </ul> </li>
37 <li><tt>'Navs'</tt> - number of averages. If set, and if Nfft was set to 0 or -1, the number of points for each window will be calculated to match the request. [default: -1, not set] </li>
38 <li><tt>'Times'</tt> - interval of time to evaluate the calculation on. If empty [default], it will take the whole section.</li>
39 </ul>
40 The length of the window is set by the value of the parameter <tt>'Nfft'</tt>, so that the window
41 is actually rebuilt using only the key features of the window, i.e. the name and, for Kaiser windows, the PSLL.
42 </p>
43
44 <p>As an alternative to setting the number of points <tt>'Nfft'</tt> in each window, it's possible to ask for a given number of TFE estimates by setting the <tt>'Navs'</tt> parameter, and the algorithm takes care of calculating the correct window length, according to the amount of overlap between subsequent segments.</p>
45 <p>
46 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
47 <tr width="90%">
48 <td>
49 If the user doesn't specify the value of a given parameter, the default value is used.
50 </td>
51 </tr>
52 </table>
53 </p>
54
55 <p>The function makes transfer functions estimates between the 2 input <tt>ao</tt>s, and the output will contain the transfer function estimate from the first <tt>ao</tt> to the second.</p>
56 <h2>Algorithm</h2>
57 <p>
58 The algorithm is based in standard MATLAB's tools, as the ones used by <a href="matlab:doc('pwelch')">pwelch</a>. The standard deviation of the mean
59 is computed as
60 <div align="center">
61 <img src="images/tfe_sigma1.png" >
62 </div>
63 where
64 <div align="center">
65 <img src="images/tfe_sigma2.png" >
66 </div>
67 is the coherence function.
68 </p>
69 <h2>Example</h2>
70 <p>
71 Evaluation of the transfer function between two time-series represented by:
72 a low frequency sinewave signal superimposed to
73 white noise, and a low frequency sinewave signal at the same frequency, phase shifted and with different
74 amplitude, superimposed to white noise.
75 </p>
76 <div class="fragment"><pre>
77 <br> <span class="comment">% parameters</span>
78 nsecs = 1000;
79 fs = 10;
80
81 <span class="comment">% create first signal AO</span>
82 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)) + ...
83 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));
84 x.setYunits(<span class="string">'m'</span>);
85
86 <span class="comment">% create second signal AO</span>
87 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)) + ...
88 0.1*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));
89 y.setYunits(<span class="string">'rad'</span>);
90
91 <span class="comment">% compute transfer function</span>
92 nfft = 1000;
93 psll = 200;
94 Txy = tfe(x,y,plist(<span class="string">'win'</span>,<span class="string">'Kaiser'</span>,<span class="string">'psll'</span>,psll,<span class="string">'nfft'</span>,nfft));
95
96 <span class="comment">% plot</span>
97 iplot(Txy)
98 </pre>
99 </div>
100 <br>
101 <img src="images/transfer_1.png" alt="" border="3">
102
103 <h2><a name="references">References</a></h2>
104
105 <ol>
106 <li> P.D. Welch, The Use of Fast Fourier Transform for the Estimation of Power Spectra: A Method Based on Time Averaging Over Short,
107 Modified Periodograms, <i>IEEE Trans. on Audio and Electroacoustics</i>, Vol. 15, No. 2 (1967), pp. 70 - 73.</a></li>
108 </ol>
109
110