0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 function varargout = mdc1_ifo2acc_fd(varargin)
0039
0040
0041 if utils.helper.isinfocall(varargin{:})
0042 varargout{1} = getInfo(varargin{3});
0043 return
0044 end
0045
0046 import utils.const.*
0047 utils.helper.msg(msg.MNAME, 'running %s/%s', mfilename('class'), mfilename);
0048
0049
0050 in_names = cell(size(varargin));
0051 for ii = 1:nargin,in_names{ii} = inputname(ii);end
0052
0053
0054 [as, ao_invars] = utils.helper.collect_objects(varargin(:), 'ao', in_names);
0055 pl = utils.helper.collect_objects(varargin(:), 'plist', in_names);
0056
0057 bs = copy(as, nargout);
0058
0059
0060 pl = combine(pl, getDefaultPlist());
0061
0062
0063
0064 w1 = find(pl, 'Omega1');
0065 w3 = find(pl, 'Omega3');
0066 delta = find(pl, 'delta');
0067 o1xx = bs(1);
0068 o12xx = bs(2);
0069 o112xx = bs(3);
0070 if ~strcmp(o1xx.name, 'o1xx')
0071 warning('!!! The name of the first input AO is no ''o1''. Are you sure this is the o1xx frequency-series?');
0072 end
0073 if ~strcmp(o12xx.name, 'o12xx')
0074 warning('!!! The name of the second input AO is no ''o12''. Are you sure this is the o12xx frequency-series?');
0075 end
0076
0077 if isempty(o1xx.data) || isempty(o12xx.data) || isempty(o112xx.data)
0078 error('### Please provide two input frequency-series.');
0079 end
0080 if ~isequal(o1.data.x, o12.data.x, o112xx.data.x)
0081 error('### The three input frequency-series should be computed at the same frequencies.');
0082 end
0083
0084
0085 f = o1xx.data.getX;
0086
0087
0088
0089 [a11xx, a22xx] = computeAcc(f, w1, w3, delta, o1xx, o12xx, o112xx);
0090
0091 varargout{1} = a11xx;
0092 varargout{2} = a22xx;
0093 end
0094
0095
0096 function [a11xx, a22xx] = computeAcc(f, w1, w3, delta, o1xx, o12xx, o112xx)
0097
0098
0099 pl = plist('gain',1, 'poles', [pz(10), pz(10), pz(10)], 'zeros', []);
0100 pzm = pzmodel(pl);
0101 ds = resp(pzm, plist('f', f));
0102
0103
0104 Cdf = ltpda_mdc1_C(plist('f', f, 'Controller', 'df'));
0105 Adf = ltpda_mdc1_actuator(plist('f', f, 'Actuator', 'df'));
0106 Cdf = ds.*Cdf.*Adf;
0107 Sw1 = ltpda_mdc1_dynamics(plist('f', f, 'Omega2', w1.data.y.^2));
0108 Sw1.setName('Sw1', 'internal');
0109
0110
0111 Csus = ltpda_mdc1_C(plist('f', f, 'Controller', 'sus'));
0112 Asus = ltpda_mdc1_actuator(plist('f', f, 'Actuator', 'sus'));
0113 Csus = ds.*Csus.*Asus;
0114 Sw3 = ltpda_mdc1_dynamics(plist('f', f, 'Omega2', w3.data.y.^2));
0115 Sw3.setName('Sw3', 'internal');
0116
0117
0118 Csusxx = abs(Csus).^2;
0119 Cdfxx = abs(Cdf).^2;
0120 Sw1xx = abs(Sw1).^2;
0121 Sw3xx = abs(Sw3).^2;
0122
0123 wd = w3.^2-w1.^2;
0124 beta = wd - delta.*Sw3;
0125 bxx = abs(beta).^2;
0126
0127
0128
0129 a11xx = o1xx .* (Sw1xx + Cdfxx - Cdf.*conj(Sw1) - conj(Cdf).*Sw1);
0130 a11xx.setName('PSD(a11)', 'internal');
0131
0132
0133
0134 e1 = o1xx.*bxx;
0135 e2 = sqrt(o12xx).*Sw3;
0136 e3 = sqrt(o12xx).*Csus;
0137 a22t1 = e1 + abs(e2 - e3).^2;
0138
0139 a22t2 = beta.*(conj(Sw3)+conj(Csus)).*o112xx;
0140 a22t3 = conj(beta).*(Sw3+Csus).*o112xx;
0141 a22xx = abs(a22t1 ...
0142 + a22t2 ...
0143 + a22t3);
0144 a22xx.setName('PSD(a22)', 'internal');
0145 end
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161 function ii = getInfo(varargin)
0162 if nargin == 1 && strcmpi(varargin{1}, 'None')
0163 sets = {};
0164 pl = [];
0165 else
0166 sets = {'Default'};
0167 pl = getDefaultPlist;
0168 end
0169
0170 ii = minfo(mfilename, 'ao', '', utils.const.categories.mdc01, '$Id: mdc1_ifo2acc_fd.m,v 1.4 2008/09/05 11:05:29 ingo Exp $', sets, pl);
0171 end
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184 function plo = getDefaultPlist()
0185 plo = plist('Omega1', 1.3e-6, ...
0186 'Omega3', 2e-6, ...
0187 'delta', -1e-4, ...
0188 'o1xx', ao, ...
0189 'o12xx', ao, ...
0190 'o112xx', ao);
0191 end
0192
0193