Simulate LPF with matched stiffness


Simulating LPF with matched stiffness involves bringing together the details of the previous section. The following code snippet builds two versions of the LPF model: one with matched stiffness, one with unmatched stiffness.

        
    % Configuration plist for building our model with matched stiffness
    modelPlistMatched = plist(...
                          'built-in', 'LPF', ...
                          'EOM_TM1_STIFF_XX', 2e-6, ...
                          'EOM_TM2_STIFF_XX', 2e-6 ...
                          );
    
    % Configuration plist for building our model with unmatched stiffness
    modelPlistUnmatched = plist(...
                            'built-in', 'LPF', ...
                            'EOM_TM1_STIFF_XX', 1e-6, ...
                            'EOM_TM2_STIFF_XX', 5e-6 ...
                            );
    
    % Build the LPF model with our configuration plists
    lpfMatched   = ssm(modelPlistMatched);
    lpfUnmatched = ssm(modelPlistUnmatched);
    
  
We can simulate both of these models with all noise on:
      
      % Create a covariance matrix and port list sized for our LPF model
      cov_matrix = lpfMatched.generateCovariance();
      
      % Define the simulation plist for a 100,000s simulation
      simPlist = plist(...
                  'CPSD Variable Names', cov_matrix.find('names'), ...
                  'CPSD', cov_matrix.find('cov'), ...
                  'Return outputs', {'IFO.x1', 'IFO.x12', 'DFACS.sc_x', 'DFACS.tm2_x'}, ...
                  'Nsamples', 1000000 ...
                  );
      
      % Run the simulations
      outMatched   = simulate(lpfMatched, simPlist);
      outUnmatched = simulate(lpfUnmatched, simPlist);
      
  
Now we have two simulated data sets. We can look at the effect of matching the stiffness by looking at the coherence of the force commanded on the spacecraft with the differential displacement of the TMs measured by the IFO:
      % Compare the coherence between force on SC and the diff. displacement
      
      % Unpack the outputs from the simulations
      [o1m, o12m, F_cmd_Xm, F_cmd_x2m] = unpack(outMatched);
      [o1u, o12u, F_cmd_Xu, F_cmd_x2u] = unpack(outUnmatched);
      
      % Compute the coherence
      coherePlist = plist(...
                      'navs', 16, ...
                      'order', 1 ...
                      );
      
      Cm = cohere(F_cmd_Xm, o12m, coherePlist);
      Cm.setName('SC Jitter to X12 coherence (matched stiffness)');
      
      Cu = cohere(F_cmd_Xu, o12u, coherePlist);
      Cu.setName('SC Jitter to X12 coherence (unmatched stiffness)');
      
      % Bin the data to do some frequency-domain averaging
      Cm_binned = Cm.bin_data;
      Cu_binned = Cu.bin_data;
      
      % Plot the results with error bars
      iplot(Cm_binned, Cu_binned)
  
You should see a plot like the following, showing a clear decrease in coherence in the matched stiffness case:





©LTP Team