comparison m-toolbox/test/MDC1/test_ltpda_mdc1_ifo2control.m @ 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 % function test_ltpda_mdc1_ifo2control
2 clear all;
3
4 % Test the computation of the control terms
5 %
6 % M Hewitson 11-04-08
7 %
8 % $Id: test_ltpda_mdc1_ifo2control.m,v 1.1 2008/04/14 15:39:44 hewitson Exp $
9 %
10
11
12 % Make a white-noise AO
13 fs = 10;
14 nsecs = 10000;
15
16 o1 = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', nsecs));
17 o12 = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', nsecs));
18
19 [a1, a2] = ltpda_mdc1_ifo2control(plist('o1', o1, 'o12', o12));
20
21 % Split off transients
22 spl = plist('split_type', 'times', 'times', [200 nsecs-200]);
23
24 a1 = split(a1, spl);
25 a2 = split(a2, spl);
26 o1 = split(o1, spl);
27 o12 = split(o12, spl);
28
29 % Spectra
30 a1xx = ltpda_lpsd(a1);
31 a2xx = ltpda_lpsd(a2);
32 iplot(a1xx,a2xx)
33
34 % TFs
35 tf1 = ltpda_tfe(a1,o1);
36 tf2 = ltpda_tfe(a2,o12);
37
38 % Compare to models
39 f = tf1(1,2).data.x;
40 cdf = ltpda_mdc1_C(plist('f', f, 'Controller', 'df'));
41 csus = ltpda_mdc1_C(plist('f', f, 'Controller', 'sus'));
42 adf = ltpda_mdc1_actuator(plist('Actuator', 'df', 'f', f));
43 asus = ltpda_mdc1_actuator(plist('Actuator', 'sus', 'f', f));
44
45 iplot(tf1(2,1), cdf.*adf);
46 iplot(tf2(2,1), csus.*asus);
47
48
49 % END