GainMon (v1.0): DARM Loop Unity Gain Frequency Monitor for the DMT
GainMon currently monitors the unity gain frequency in the DARM control loop. It will eventaully be modified to monitor the MICH and PRC loops as well. The code and documentation for GainMon has been cloned from SenseMonitor.GainMon uses the open loop gain as a function of frequency at start time to determine the unity gain frequency at all later times. GainMon reads in the loop transfer function (Actuation*Sensing*digital) which determines the initial gain G(f,t=0) at t=0. The dynamic alpha and beta calibration factors are then used to scale the open loop gain to any later time t. G(f, t)=G(f, t=0)*alpha*beta. Once the open loop gain is determined at some later time t, GainMon interpolates the frequency at which the gain is unity and reports this in minute trends.
GainMon generates a report of the following quantities:
The principle forms of output are:
- the current unity gain frequency;
- the current amplitude of the calibration line (used to track the interferometer's response function);
- the current values of the calibration parameters `alpha' and `beta' (see the calibration section below).
- a summary web page and shorter `revolver' page available through the CDS homepage;
- the DMTViewer;
- trend files.
GainMon Output
Gainmon produces the following output at regular intervals (normally once per minute):Graphical: DMTViewer Plots
The following time series are reported to the DMTViewer (the name of the corresponding channel in the trend files is in parentheses):
- `Unity Gain Frequency (UGF) expressed in Hz':
The frequency at which the open loop gain is unity.- `Calibration Line Amplitude (ASQ counts)' (LSC-CalLine_Ampl_ASQcounts)
The amplitude of the calibration line as seen in the AS_Q channel. (This is the peak amplitude, which is sqrt(2) times the rms amplitude.)- `Alpha From Calibration Line' (CAL-CAV_FAC)
The value of the calibration parameter alpha. This quantity is computed using the measured calibration-line amplitudes in the AS_Q and excitation (injection) channels, beta as measured from the DARM channels, and the user-supplied open-loop gain, sensing function, reference line amplitudes, and reference DARM value. It is usually equal to `Gain From Calibration Line' to within a few percent.- `Calibration Open Loop Factor Alpha*Beta' (CAL-OLOOP_FAC)
The value of the calibration parameter beta as computed from the DARM channels and the user-supplied reference DARM value. The trend channel CAL-OLOOP_FAC contains the product alpha*beta.Interpreting Plots:
GainMon reports zero or negative values for all of these channels under special conditions.
- All Values = 0: The interferometer is not in lock. (GainMon typically requires that the interferometer be running in strict common_mode for it to calculate a UGF for the DARM loop. The precise condition is specified with the -OSCcond option.)
- All Values = -1 or -2: The data for this time is missing. This could be due to a "data dropout", or because GainMon was not running for the period in question. (Check to see if other monitors had dropouts, or look at the SenseMon Error log file.)
When restarted, GainMon fills in the 12hr DMTViewer history with data stored from the previous run of the program. If no such file is found, GainMon initializes its plots with '-1's. Otherwise, GainMon puts a '-2' in the latest data spot as a tag to indicate that the preceeding data was read from a file.
- Alpha = 0 (only): The alpha parameter is calculated from the calibration line, which sometimes is not available. If the computed alpha is not real and positive (which may happen if the calibration line dies) then alpha is reset to zero. The range estimate is then made using the reference response function (alpha=1=beta).
Html and data files
GainMon writes summary log files and other useful data products.
- GDS SPI page. The GainMon links contain summary information, including the UGF estimates averaged over the last 1, 5, and 15 strides. There are also links to these error and log pages:
- Errors: Shows GainMon's error messages. The most important error messages are about missing data. If lots of data has been lost recently, it is likely that the computer running GainMon is overloaded. Contact your DMT expert.
- Monitor Output: Details of the current run of GainMon, including command line arguments used, and the UGF and calibration histories. Useful for troubleshooting problems.
- Cumulative Monitor Output: Concatenated log files from ALL runs of GainMon. These can be very large.
- Other: The following files are by default written to the directory specified by the environment variable $DMTHTMLOUT (set to point to a subdirectory of $GDS_APACHE/monitor_reports/ on sand and delaronde). If this environment variable is not set or if the -local option is used, these files are placed in the local directory instead.
- Web Pages: The SPI page html files live here. The top page is index.html; <IFO>_GainMon_Summary.revolver.html is an abbreviated verison.
- 2-Week Summary: The file <IFO>_GainMon_summary.txt contains a two-week summary of the range averaged over 1000-second intervals.
- Calibrated Noise Power: Every 1000 seconds, if the IFO is locked, the current calibrated (strain) noise power spectrum is written to the ASCII file <IFO>_CalPSD_GPS:xxxxxxxxx.txt (eg, L1_CalPSD_GPS:715580020.txt). The latest plots are available from the homepage of the current run.
- Trends: Every hour a trend file is produced showing the minute trends for each of the quantities sent to the DMTViewer. These are available at the sites through LDAS.
Running GainMon
GainMon is managed by the Process Manager, and so it should always be running at the sites. If it is missing, please contact Aaron Rogan.
The standard way to start GainMon is
GainMon -config <file_name>where <file_name> is a configuration file. Up-to-date configuration files are usually available on the dmt machines (sand, delaronde, etc) as ~ops/pars/GainMon_L1.conf, etc. A sample configuration file for H1 is-OSCfile StateVector.conf -OSCcond Both_arms_locked_strict_cm -xmlfile ReferenceCalibration_H1.xml -fmin 30.0 -trend H1The last entry in the configuration file must be one of H1, H2, or L1. The remaining arguments (which may be invoked in any order) are listed below. Arguments in red are required.
-fmax # Specify maximum frequency to include in range estimate. Default 1400Hz. -fmin # Specify minimum frequency to include in range estimate. Default 20Hz. -h, --help Print usage information, then exit. -local Run in local mode. All output files are dumped in the local directory instead of to the default directory specified by the environment variable $DMTHTMLOUT. The plain-text log file is renamed <GPS_Start_Time>.log. -logfile <name> Name plain-text version of log file <name>. Only works if -local option is also selected. Default filename is <GPS_start_time>.log (-local mode) or <IFO>_SenseMonitor_CumLog.txt (otherwise). -max # Specify maximum number of strides to process before program exits. -n # Specify number of sections to divide data into for calculating the noise power spectrum. The 'stride' variable must be a multiple of this number. Default 15. -OSCfile <file> REQUIRED. Specify the OSC configuration file defining the various operating conditions for the interferometer. (If not specified, SenseMonitor will attempt to open $SENSEMONITOR_OSCCONF/SenseMonitor_LockLoss.conf, then ./SenseMonitor_LockLoss.conf.) SenseMonitor will exit if no OSC configuration file can be found. -OSCcond <cond> Specify the OSC (operating state condition) for which SenseMonitor will compute range estimates. Default is SV_IFO_UP. -screen Update and error messages are sent to the screen instead of to the default files <IFO>_SenseMonitor_Log.txt and <IFO>_SenseMonitor_Errors.txt. -stride # Specify length in seconds of data to use for each range estimate. Default 60. -trend Write range and calibration data to trend files as minute trends. When writing trends it is recommended that `stride' be a factor of 60 (eg: 15, 30, 60). -window <type> Specify data window type for power spectrum estimation, where <type> is one of: `hanning' for Hanning window, `blackman' for Blackman window, `flattop' for FlatTop window (NOT RECOMMENDED), `hamming' for Hamming window (NOT RECOMMENDED), `square' for no window (NOT RECOMMENDED). Default Hanning. -xmlcalREQUIRED. Use dynamical calibration based on a reference calibration file .
Calibration
GainMon estimates the strain noise spectrum from the AS_Q data following the calibration notes of Gonzalez et al (2002, 2003). All actual calibration calculations are performed by the FDEasyCalibrate class, which requires as input a specially formatted file containing reference calibration information. These reference calibration files will be produced by the calibration team. The only point that might interest the casual user is that this calibration data should be linearly sampled over a frequency range larger than [fmin,fmax] Hz (see -fmin, -fmax options) and not including 0 Hz or 4096 Hz. GainMon will exit if the calibration data does not cover [fmin,fmax] Hz.Operating State Condition (OSC)
GainMon requires a file defining the condition under which range estimates will be computed. A good choice for OSC (-OSCcond) is Both_arms_locked_strict_cm. In this case the detector is required to be in common mode, but not necessarily in science mode. A good choice for the definitions file (-OSCfile) is D. Chin's /export/home/ops/pars/LockLoss.conf, which contains up-to-date definitions of standard states.The user may specify an alternative location and file name at launch. Otherwise, GainMon will search for the file GainMon_LockLoss.conf, first in the directory specified by $GAINMON_OSCCONF and then in the local directory. You can (re-)set the environment variable GAINMON_OSCCONF using a command like
setenv GAINMON_OSCCONF directory_pathKnown Bugs
- None.
Contact Info
Comments, queries, and suggestions regarding any aspect of GainMon are welcome; please email the authors.
Author: Aaron Rogan Documentation from SenseMonitor written by: John Zweizig Patrick J. Sutton Code Version: 1.0; last modified Nov. 25 2005. Documentation: last modified Jan. 25 2006.