Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/ltpda_training_topic_4_5.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>IFO/Temperature Example - Simulation (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 "ltpda_training_topic_4_4_2.html"><img src="b_prev.gif" border="0" align= | |
30 "bottom" alt="By defining filter properties"></a> <a href= | |
31 "ltpda_training_topic_5.html"><img src="b_next.gif" border="0" align= | |
32 "bottom" alt="Topic 5 - Model fitting"></a></td> | |
33 </tr> | |
34 </table> | |
35 | |
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>IFO/Temperature Example - Simulation</h1> | |
37 <hr> | |
38 | |
39 <p> | |
40 <p> | |
41 We now come back to the IFO/Temperature working example. Our interest here is not | |
42 to add more tools to the data analysis chain that you've been developing but | |
43 to create a simple toy model that allows you to reproduce the steps done up | |
44 to now but with synthetic data. | |
45 </p> | |
46 <p> | |
47 The problem is shown schematically in the figure below. We will generate temperature and interferometer | |
48 noisy data by applying a filter (<b>TMP</b> and <b>IFO</b>) to white noise data | |
49 (<b>WN1</b> and <b>WN2</b>). We will then add a temperature coupling (<b>K2RAD</b>) to the | |
50 interferometer and from the measured interferometer and temperature data we will then estimate | |
51 the temperature to interferometer coupling. | |
52 </p> | |
53 | |
54 <p align="center"> | |
55 <img src="images/ltpda_training_1/topic4/IFO2TSimulation.png" alt="temperature substraction scheme" border="1" > | |
56 </p> | |
57 <p> | |
58 Since we've been through the same steps that you need to apply here in the previous | |
59 section we will give here the step by step description of the task and let you | |
60 play with the models. | |
61 </p> | |
62 | |
63 <h2> Build the models<h2> | |
64 <p> | |
65 We need three models: one to generate temperature-like data, another modelling the | |
66 interferometer and a third one acting as the K-to-rad transfer function. | |
67 </p> | |
68 | |
69 <h3> STEP 1: Build a temperature noise PZMODEL with the following properties<h4> | |
70 | |
71 <table cellspacing="0" class="body" cellpadding="2" border="0" width="50%"> | |
72 <colgroup> | |
73 <col width="15%"/> | |
74 <col width="35%"/> | |
75 </colgroup> | |
76 <thead> | |
77 <tr valign="top"> | |
78 <th class="categorylist">Key</th> | |
79 <th class="categorylist">Value</th> | |
80 </tr> | |
81 </thead> | |
82 <tbody> | |
83 <!-- Key 'filename' --> | |
84 <tr valign="top"> | |
85 <td bgcolor="#f3f4f5"> | |
86 <p><tt><span class="string">'name'</span></tt></p> | |
87 </td> | |
88 <td bgcolor="#f3f4f5"> | |
89 <span class="string">'TMP'</span> | |
90 </td> | |
91 </tr> | |
92 <!-- Key 'filename' --> | |
93 <tr valign="top"> | |
94 <td bgcolor="#f3f4f5"> | |
95 <p><tt><span class="string">'ounits'</span></tt></p> | |
96 </td> | |
97 <td bgcolor="#f3f4f5"> | |
98 <span class="string">'K'</span> | |
99 </td> | |
100 </tr> | |
101 <!-- Key 'filename' --> | |
102 <tr valign="top"> | |
103 <td bgcolor="#f3f4f5"> | |
104 <p><tt>GAIN</tt></p> | |
105 </td> | |
106 <td bgcolor="#f3f4f5"> | |
107 10 | |
108 </td> | |
109 </tr> | |
110 <!-- Key 'filename' --> | |
111 <tr valign="top"> | |
112 <td bgcolor="#f3f4f5"> | |
113 <p><tt>POLE 1</tt></p> | |
114 </td> | |
115 <td bgcolor="#f3f4f5"> | |
116 1e-5 | |
117 </td> | |
118 </tbody> | |
119 </table> | |
120 <p> | |
121 For example, this few lines would do the job | |
122 </p> | |
123 <div class="fragment"><pre> | |
124 TMP = pzmodel(10,1e-5,[]); | |
125 TMP.setOunits(<span class="string">'K'</span>) | |
126 TMP.setName(<span class="string">'TMP'</span>) | |
127 </pre></div> | |
128 | |
129 <h3> STEP 2: Build a interferometer noise PZMODEL with the following properties<h4> | |
130 | |
131 <table cellspacing="0" class="body" cellpadding="2" border="0" width="50%"> | |
132 <colgroup> | |
133 <col width="15%"/> | |
134 <col width="35%"/> | |
135 </colgroup> | |
136 <thead> | |
137 <tr valign="top"> | |
138 <th class="categorylist">Key</th> | |
139 <th class="categorylist">Value</th> | |
140 </tr> | |
141 </thead> | |
142 <tbody> | |
143 <!-- Key 'filename' --> | |
144 <tr valign="top"> | |
145 <td bgcolor="#f3f4f5"> | |
146 <p><tt><span class="string">'name'</span></tt></p> | |
147 </td> | |
148 <td bgcolor="#f3f4f5"> | |
149 <span class="string">'IFO'</span> | |
150 </td> | |
151 </tr> | |
152 <!-- Key 'filename' --> | |
153 <tr valign="top"> | |
154 <td bgcolor="#f3f4f5"> | |
155 <p><tt><span class="string">'ounits'</span></tt></p> | |
156 </td> | |
157 <td bgcolor="#f3f4f5"> | |
158 <span class="string">'rad'</span> | |
159 </td> | |
160 </tr> | |
161 <!-- Key 'filename' --> | |
162 <tr valign="top"> | |
163 <td bgcolor="#f3f4f5"> | |
164 <p><tt>GAIN</tt></p> | |
165 </td> | |
166 <td bgcolor="#f3f4f5"> | |
167 1e-3 | |
168 </td> | |
169 </tr> | |
170 <!-- Key 'filename' --> | |
171 <tr valign="top"> | |
172 <td bgcolor="#f3f4f5"> | |
173 <p><tt>POLE 1</tt></p> | |
174 </td> | |
175 <td bgcolor="#f3f4f5"> | |
176 0.4 | |
177 </td> | |
178 </tr> | |
179 </tbody> | |
180 </table> | |
181 | |
182 | |
183 <h3> STEP 3: Build temperature to interferometer coupling PZMODEL with the following properties<h4> | |
184 | |
185 <table cellspacing="0" class="body" cellpadding="2" border="0" width="50%"> | |
186 <colgroup> | |
187 <col width="15%"/> | |
188 <col width="35%"/> | |
189 </colgroup> | |
190 <thead> | |
191 <tr valign="top"> | |
192 <th class="categorylist">Key</th> | |
193 <th class="categorylist">Value</th> | |
194 </tr> | |
195 </thead> | |
196 <tbody> | |
197 <!-- Key 'filename' --> | |
198 <tr valign="top"> | |
199 <td bgcolor="#f3f4f5"> | |
200 <p><tt><span class="string">'name'</span></tt></p> | |
201 </td> | |
202 <td bgcolor="#f3f4f5"> | |
203 <span class="string">'K2RAD'</span> | |
204 </td> | |
205 </tr> | |
206 <!-- Key 'filename' --> | |
207 <tr valign="top"> | |
208 <td bgcolor="#f3f4f5"> | |
209 <p><tt><span class="string">'iunits'</span></tt></p> | |
210 </td> | |
211 <td bgcolor="#f3f4f5"> | |
212 <span class="string">'K'</span> | |
213 </td> | |
214 </tr> | |
215 <!-- Key 'filename' --> | |
216 <tr valign="top"> | |
217 <td bgcolor="#f3f4f5"> | |
218 <p><tt><span class="string">'ounits'</span></tt></p> | |
219 </td> | |
220 <td bgcolor="#f3f4f5"> | |
221 <span class="string">'rad'</span> | |
222 </td> | |
223 </tr> | |
224 <!-- Key 'filename' --> | |
225 <tr valign="top"> | |
226 <td bgcolor="#f3f4f5"> | |
227 <p><tt>GAIN</tt></p> | |
228 </td> | |
229 <td bgcolor="#f3f4f5"> | |
230 1e-1 | |
231 </td> | |
232 </tr> | |
233 <!-- Key 'filename' --> | |
234 <tr valign="top"> | |
235 <td bgcolor="#f3f4f5"> | |
236 <p><tt>POLE 1</tt></p> | |
237 </td> | |
238 <td bgcolor="#f3f4f5"> | |
239 5e-4 | |
240 </td> | |
241 </tr> | |
242 </tbody> | |
243 </table> | |
244 | |
245 <p> | |
246 You can take a look at your models. Since we are interested in the projection of temperature | |
247 into interferometric data, we can plot the response of TMP*K2RAD against the IFO | |
248 </p> | |
249 <div class="fragment"><pre> | |
250 pl = plist(<span class="string">'f1'</span>,1e-5,<span class="string">'f2'</span>,0.01) | |
251 resp(K2RAD*TMP,IFO,pl) | |
252 </pre></div> | |
253 <p> | |
254 <img src="images/ltpda_training_1/topic4/Ifo2TempEx_T4_1.png" alt="inteferometer data" border="1" > | |
255 </p> | |
256 | |
257 <h2>Discretize the models<h2> | |
258 <p> | |
259 Now discretize the models at fs = 1Hz using the <tt>miir</tt> constructor. | |
260 After that you will obtain three digital filters | |
261 </p> | |
262 <h3> STEP 4: Discretize the three transfer (<b>TMP</b>,<b>IFO</b>,<b>K2RAD</b>) with the | |
263 MIIR constructor<h3> | |
264 <p> | |
265 For example, the model related to temperature noise would be discretized like this: | |
266 </p> | |
267 <div class="fragment"><pre> | |
268 TMPd = miir(TMP,plist(<span class="string">'fs'</span>,1)); | |
269 </pre></div> | |
270 <h2> Generate white noise data<h2> | |
271 <p> | |
272 We will need two initial white noise time series, <b>WN1</b> and <b>WN2</b>, that we will use as a seed | |
273 to apply our filters and get noise shaped time series. | |
274 </p> | |
275 <h3> STEP 5: Generate white noise with the AO constructor<h3> | |
276 <p> | |
277 You will need the ao constructor for that. You could use the following settings | |
278 </p> | |
279 <table cellspacing="0" class="body" cellpadding="2" border="0" width="50%"> | |
280 <colgroup> | |
281 <col width="15%"/> | |
282 <col width="35%"/> | |
283 </colgroup> | |
284 <thead> | |
285 <tr valign="top"> | |
286 <th class="categorylist">Key</th> | |
287 <th class="categorylist">Value</th> | |
288 </tr> | |
289 </thead> | |
290 <tbody> | |
291 <!-- Key 'filename' --> | |
292 <tr valign="top"> | |
293 <td bgcolor="#f3f4f5"> | |
294 <p><tt><span class="string">'name'</span></tt></p> | |
295 </td> | |
296 <td bgcolor="#f3f4f5"> | |
297 <span class="string">'WN1'</span> | |
298 </td> | |
299 </tr> | |
300 <!-- Key 'filename' --> | |
301 <tr valign="top"> | |
302 <td bgcolor="#f3f4f5"> | |
303 <p><tt><span class="string">'tsfcn'</span></tt></p> | |
304 </td> | |
305 <td bgcolor="#f3f4f5"> | |
306 <span class="string">'randn(size(t))'</span> | |
307 </td> | |
308 </tr> | |
309 <!-- Key 'filename' --> | |
310 <tr valign="top"> | |
311 <td bgcolor="#f3f4f5"> | |
312 <p><tt><span class="string">'fs'</span></tt></p> | |
313 </td> | |
314 <td bgcolor="#f3f4f5"> | |
315 1 | |
316 </td> | |
317 </tr> | |
318 <!-- Key 'filename' --> | |
319 <tr valign="top"> | |
320 <td bgcolor="#f3f4f5"> | |
321 <p><tt><span class="string">'nsecs'</span></tt></p> | |
322 </td> | |
323 <td bgcolor="#f3f4f5"> | |
324 250000 | |
325 </td> | |
326 </tr> | |
327 </tbody> | |
328 </table> | |
329 | |
330 <table cellspacing="0" class="body" cellpadding="2" border="0" width="50%"> | |
331 <colgroup> | |
332 <col width="15%"/> | |
333 <col width="35%"/> | |
334 </colgroup> | |
335 <thead> | |
336 <tr valign="top"> | |
337 <th class="categorylist">Key</th> | |
338 <th class="categorylist">Value</th> | |
339 </tr> | |
340 </thead> | |
341 <tbody> | |
342 <!-- Key 'filename' --> | |
343 <tr valign="top"> | |
344 <td bgcolor="#f3f4f5"> | |
345 <p><tt><span class="string">'name'</span></tt></p> | |
346 </td> | |
347 <td bgcolor="#f3f4f5"> | |
348 <span class="string">'WN2'</span> | |
349 </td> | |
350 </tr> | |
351 <!-- Key 'filename' --> | |
352 <tr valign="top"> | |
353 <td bgcolor="#f3f4f5"> | |
354 <p><tt><span class="string">'tsfcn'</span></tt></p> | |
355 </td> | |
356 <td bgcolor="#f3f4f5"> | |
357 <span class="string">'randn(size(t))'</span> | |
358 </td> | |
359 </tr> | |
360 <!-- Key 'filename' --> | |
361 <tr valign="top"> | |
362 <td bgcolor="#f3f4f5"> | |
363 <p><tt><span class="string">'fs'</span></tt></p> | |
364 </td> | |
365 <td bgcolor="#f3f4f5"> | |
366 1 | |
367 </td> | |
368 </tr> | |
369 <!-- Key 'filename' --> | |
370 <tr valign="top"> | |
371 <td bgcolor="#f3f4f5"> | |
372 <p><tt><span class="string">'nsecs'</span></tt></p> | |
373 </td> | |
374 <td bgcolor="#f3f4f5"> | |
375 250000 | |
376 </td> | |
377 </tr> | |
378 </tbody> | |
379 </table> | |
380 | |
381 | |
382 <h2>Generate the noise data streams<h2> | |
383 <p> | |
384 For each noise source you will need to apply the filter that you have designed to | |
385 the white noise data: | |
386 </p> | |
387 | |
388 <h3> STEP 6: Filter white noise WN1 with the TMPd filter </h3> | |
389 <p> | |
390 For example, following our notation: | |
391 </p> | |
392 <div class="fragment"><pre> | |
393 T = filter(WN1,TMPd); | |
394 </pre></div> | |
395 <h3> STEP 7: Filter white noise WN2 with the IFOd filter</h3> | |
396 <p> | |
397 Temperature and interferometric noise are uncorrelated, so we need to use here the | |
398 second noise time series <b>WN2</b> | |
399 </p> | |
400 <p> | |
401 For example, following our notation: | |
402 </p> | |
403 <div class="fragment"><pre> | |
404 IFO = filter(WN2,IFOd); | |
405 </pre></div> | |
406 <h3> STEP 8: Filter white noise WN1 with the TMPd and the K2RADd filter</h3> | |
407 <p> | |
408 In this case you need to apply both filters in serial, you can do this in one command | |
409 by using the 'bank' property of the <tt>filter</tt> method. | |
410 </p> | |
411 <p> | |
412 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1"> | |
413 <tr width="90%"> | |
414 <td> | |
415 Hint: you can input a vector of filters into the <tt>filter</tt> method and | |
416 ask it to filter the data in 'parallel' or in 'serial' (the one we are interested | |
417 here) by doing the following | |
418 <div class="fragment"><pre> | |
419 b = filter(<b>WN1</b>,[<b>TMPd</b> <b>K2RADd</b>],plist(<span class="string">'bank'</span>,<span class="string">'serial'</span>)); | |
420 </pre></div> | |
421 | |
422 </td> | |
423 </tr> | |
424 </table> | |
425 </p> | |
426 <h3> STEP 9: Add the IFO noise to the K2RAD noise</h3> | |
427 <p> | |
428 At this point the IFO represents the purely interferometric noise and the K2RAD the | |
429 contribution to interferometric noise coming from temperature. You need to add both to | |
430 get the final interferometric data. This only requires to add both AOs. | |
431 </p> | |
432 | |
433 <h2>Perform the noise projection<h3> | |
434 <p> | |
435 Here we will reproduce the main steps performed in topic 3 analysis: power spectral and | |
436 transfer function estimation. | |
437 </p> | |
438 | |
439 <h3> STEP 10: Split the data streams </h3> | |
440 <p> | |
441 We will do the analysis with data in the region going from 1e5 to 2e5 seconds to avoid | |
442 initial transients. You must then split your two data streams introducing the following | |
443 parameters in the <tt>split</tt> method. | |
444 </p> | |
445 | |
446 <table cellspacing="0" class="body" cellpadding="2" border="0" width="50%"> | |
447 <colgroup> | |
448 <col width="15%"/> | |
449 <col width="35%"/> | |
450 </colgroup> | |
451 <thead> | |
452 <tr valign="top"> | |
453 <th class="categorylist">Key</th> | |
454 <th class="categorylist">Value</th> | |
455 </tr> | |
456 </thead> | |
457 <tbody> | |
458 <!-- Key 'filename' --> | |
459 <tr valign="top"> | |
460 <td bgcolor="#f3f4f5"> | |
461 <p><tt><span class="string">'times'</span></tt></p> | |
462 </td> | |
463 <td bgcolor="#f3f4f5"> | |
464 [1e5 2e5] | |
465 </td> | |
466 </tr> | |
467 </tbody> | |
468 </table> | |
469 <p> | |
470 After the splitting you must have two data streams that plot together should look like the | |
471 ones below. The code should be similar to one in the following lines | |
472 | |
473 <div class="fragment"><pre> | |
474 Ts = split(T,plist(<span class="string">'times'</span>,[1e5 2e5])) | |
475 Ts.setName(<span class="string">'Temperature'</span>) | |
476 IFOs = split(IFO_all,plist(<span class="string">'times'</span>,[1e5 2e5])) | |
477 IFOs.setName(<span class="string">'Interferometer'</span>) | |
478 <span class="comment">% Plot in different panels with 'subplots' options</span> | |
479 iplot(Ts,IFOs,plist(<span class="string">'arrangement'</span>,<span class="string">'subplots'</span>)) | |
480 </pre></div> | |
481 | |
482 <p> | |
483 <img src="images/ltpda_training_1/topic4/Ifo2TempEx_T4_3.png" alt="inteferometer data" border="1" > | |
484 </p> | |
485 | |
486 <h3> STEP 11: Compute power spectral estimates for the temperature and interferometric data </h3> | |
487 <p> | |
488 Here you need to apply <tt>lpsd</tt> or <tt>psd</tt> methods. For example: | |
489 </p> | |
490 <div class="fragment"><pre> | |
491 pl = plist(<span class="string">'order'</span>,1,<span class="string">'scale'</span>,<span class="string">'ASD'</span>) | |
492 psd_T = lpsd(Ts,pl) | |
493 psd_IFO = lpsd(IFOs,pl) | |
494 </pre></div> | |
495 <p> | |
496 The resulting spectrum should look like this | |
497 </p> | |
498 <p> | |
499 <img src="images/ltpda_training_1/topic4/Ifo2TempEx_T4_4.png" alt="inteferometer data" width="800px" border="1" > | |
500 </p> | |
501 | |
502 <h3> STEP 12: Compute transfer function estimate for the temperature and interferometric data </h3> | |
503 <p> | |
504 Here you need to apply <tt>ltfe</tt> or <tt>tfe</tt> methods. For example: | |
505 </p> | |
506 <div class="fragment"><pre> | |
507 T2IFO = ltfe(Ts,IFOs) | |
508 T2IFO.setName(<span class="string">'Transfer function'</span>) | |
509 </pre></div> | |
510 <p> | |
511 You can now compare the transfer function model with the estimation obtained from the data: | |
512 </p> | |
513 <div class="fragment"><pre> | |
514 pl = plist(<span class="string">'f1'</span>,1e-5,<span class="string">'f2'</span>,1) | |
515 iplot(T2IFO,resp(K2RAD,pl)) | |
516 </pre></div> | |
517 <p> | |
518 <img src="images/ltpda_training_1/topic4/Ifo2TempEx_T4_5.png" alt="inteferometer data" width="800px" border="1" > | |
519 </p> | |
520 <h3> STEP 13: Project the temperature noise </h3> | |
521 <p> | |
522 Reproducing the analysis performed in topic 3 you will be able to project the temperature noise contribution | |
523 into interferometric noise. The result obtained should be the one in the figure below and the code you will need | |
524 for that should be similar to this: | |
525 </p> | |
526 | |
527 <div class="fragment"><pre> | |
528 <span class="comment">% Compute projection</span> | |
529 Projection = abs(T2IFO).*psd_T; | |
530 Projection.simplifyYunits | |
531 Projection.setName; | |
532 <span class="comment">% Plot against interferometer noise</span> | |
533 iplot(psd_IFO,Projection) | |
534 </pre></div> | |
535 | |
536 <p> | |
537 <img src="images/ltpda_training_1/topic4/Ifo2TempEx_T4_6.png" alt="inteferometer data" width="800px" border="1" > | |
538 </p> | |
539 | |
540 | |
541 | |
542 | |
543 | |
544 | |
545 | |
546 | |
547 | |
548 | |
549 | |
550 | |
551 | |
552 | |
553 | |
554 | |
555 | |
556 </p> | |
557 | |
558 <br> | |
559 <br> | |
560 <table class="nav" summary="Navigation aid" border="0" width= | |
561 "100%" cellpadding="0" cellspacing="0"> | |
562 <tr valign="top"> | |
563 <td align="left" width="20"><a href="ltpda_training_topic_4_4_2.html"><img src= | |
564 "b_prev.gif" border="0" align="bottom" alt= | |
565 "By defining filter properties"></a> </td> | |
566 | |
567 <td align="left">By defining filter properties</td> | |
568 | |
569 <td> </td> | |
570 | |
571 <td align="right">Topic 5 - Model fitting</td> | |
572 | |
573 <td align="right" width="20"><a href= | |
574 "ltpda_training_topic_5.html"><img src="b_next.gif" border="0" align= | |
575 "bottom" alt="Topic 5 - Model fitting"></a></td> | |
576 </tr> | |
577 </table><br> | |
578 | |
579 <p class="copy">©LTP Team</p> | |
580 </body> | |
581 </html> |