Home > classes > @ao > mdc1_ifo2acc_fd.m

mdc1_ifo2acc_fd

PURPOSE ^

MDC1_IFO2ACC_FS calculates the external acceleration in the frequency-domain.

SYNOPSIS ^

function varargout = mdc1_ifo2acc_fd(varargin)

DESCRIPTION ^

 MDC1_IFO2ACC_FS calculates the external acceleration in the frequency-domain.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: MDC1_IFO2ACC_FS calculates the external acceleration in
              the frequency-domain for MDC1.

 It computes: a = [DS^-1 + C]o

 CALL:        b = mdc1_ifo2acc_fd(o1xx,o12xx,pl)
 
 INPUTS:      o1xx       - spectral estimate of the IFO output o12
                           [default: empty ao]
              o12xx      - spectral estimate of the IFO output o12
                           [default: empty ao]
              o112xx     - cross-spectral estimate of the IFO output o1 and o12
                           [default: empty ao]
 PARAMETERS:

           'Omega1'   - the square of the stiffness term for the dynamical response
                        of test-mass 1 coupling to SC [default: 1.3e-6]
           'Omega3'   - the square of the stiffness term for the dynamical response
                        of test-mass 2 coupling to SC [default: 2e-6]
           'delta'    - the cross-coupling factor of o1 into o12 [default: -1e-4]

 VERSION:     $Id: mdc1_ifo2acc_fd.m,v 1.4 2008/09/05 11:05:29 ingo Exp $

 M-FILE INFO: Get information about this methods by calling
              >> ao.getInfo('mdc1_ifo2acc_fd')

              Get information about a specified set-plist by calling:
              >> ao.getInfo('mdc1_ifo2acc_fd', 'None')

 HISTORY: 11-04-08 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % MDC1_IFO2ACC_FS calculates the external acceleration in the frequency-domain.
0002 %
0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0004 %
0005 % DESCRIPTION: MDC1_IFO2ACC_FS calculates the external acceleration in
0006 %              the frequency-domain for MDC1.
0007 %
0008 % It computes: a = [DS^-1 + C]o
0009 %
0010 % CALL:        b = mdc1_ifo2acc_fd(o1xx,o12xx,pl)
0011 %
0012 % INPUTS:      o1xx       - spectral estimate of the IFO output o12
0013 %                           [default: empty ao]
0014 %              o12xx      - spectral estimate of the IFO output o12
0015 %                           [default: empty ao]
0016 %              o112xx     - cross-spectral estimate of the IFO output o1 and o12
0017 %                           [default: empty ao]
0018 % PARAMETERS:
0019 %
0020 %           'Omega1'   - the square of the stiffness term for the dynamical response
0021 %                        of test-mass 1 coupling to SC [default: 1.3e-6]
0022 %           'Omega3'   - the square of the stiffness term for the dynamical response
0023 %                        of test-mass 2 coupling to SC [default: 2e-6]
0024 %           'delta'    - the cross-coupling factor of o1 into o12 [default: -1e-4]
0025 %
0026 % VERSION:     $Id: mdc1_ifo2acc_fd.m,v 1.4 2008/09/05 11:05:29 ingo Exp $
0027 %
0028 % M-FILE INFO: Get information about this methods by calling
0029 %              >> ao.getInfo('mdc1_ifo2acc_fd')
0030 %
0031 %              Get information about a specified set-plist by calling:
0032 %              >> ao.getInfo('mdc1_ifo2acc_fd', 'None')
0033 %
0034 % HISTORY: 11-04-08 M Hewitson
0035 %             Creation
0036 %
0037 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0038 function varargout = mdc1_ifo2acc_fd(varargin)
0039 
0040   % Check if this is a call for parameters
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   % Collect input variable names
0050   in_names = cell(size(varargin));
0051   for ii = 1:nargin,in_names{ii} = inputname(ii);end
0052 
0053   % Collect all AOs and plists
0054   [as, ao_invars] = utils.helper.collect_objects(varargin(:), 'ao', in_names);
0055   pl              = utils.helper.collect_objects(varargin(:), 'plist', in_names);
0056   % Decide on a deep copy or a modify
0057   bs = copy(as, nargout);
0058 
0059   % combine plists
0060   pl = combine(pl, getDefaultPlist());
0061   %% Extract parameters from plist
0062 
0063   % Get parameters out
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   % Get frequency vector from one of the input spectra
0085   f = o1xx.data.getX;
0086 
0087   %% Compute response for frequencies f
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 % Get DF controller for each frequency
0096 function [a11xx, a22xx] = computeAcc(f, w1, w3, delta, o1xx, o12xx, o112xx)
0097 
0098   % A model of the downsampling from 100 to 10Hz
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   % Drag-free
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   % Suspension
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   % Square terms for dealing with PSDs
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   % Calibrate back to a1
0128 
0129   a11xx = o1xx .* (Sw1xx + Cdfxx - Cdf.*conj(Sw1) - conj(Cdf).*Sw1);
0130   a11xx.setName('PSD(a11)', 'internal');
0131 
0132   % Calibrate back to a2
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 %                               Local Functions                               %
0148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0149 
0150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0151 %
0152 % FUNCTION:    getInfo
0153 %
0154 % DESCRIPTION: Get Info Object
0155 %
0156 % HISTORY:     11-07-07 M Hewitson
0157 %                Creation.
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   % Build info object
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 % FUNCTION:    getDefaultPlist
0176 %
0177 % DESCRIPTION: Get Default Plist
0178 %
0179 % HISTORY:     11-07-07 M Hewitson
0180 %                Creation.
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

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003