Virgo Logbook
UTC--:--:--
GPS-
Reports
AdV-COM›AdV commissioning (1st part) #35812

swept-sine noise injection code for transfer function measurements

Here at Virgo, we are in the habit of using broadband noise injections for measuring transfer functions.  This works very well around the loop UGF, but it's hard to use this method below the UGF.  At low frequencies, you need to inject noise with an amplitude that is comparable to the *unsuppressed* loop noise, and if you try to do this with a broadband noise injection you can easily saturate the loop.

To measure the loop shape below the UGF, it's easier to use a series of sine wave injections and calculate the TF at a collection of points.  I've written a couple of scripts to manage sine-wave injections at varying frequencies and amplitudes (using the CALnoise channels), and download the data from the frames and analyze the transfer function.  The scripts are in the /olusers/virgorun/ISC/TFs/ directory. They are:

  • swept_sine.py is a Python script that asks the user for the start frequency and stop frequency of the sweep, the number of data points, the number of averages and cycles at each frequency, and the minium duration of each average at each frequency.  It also asks for the LSC DOF that you want to measure.  This script changes the amplitude and frequency of the LSC_line channel in the CALnoise process, and sends this sine line to the LSC DOF under measurement.  It sets everything back to zero when it's finished, and it should have good error handling, so if the user ctrl-C's out of the script, the noise injection will be shut off gracefully. The script writes a text file with the parameters of the measurement (gps times, frequencies, etc).
  • TF_swept_sine.m is a Matlab function that downloads the data from the frames and calculates the transfer function.  It reads the output file from the Python script, grabs the frame data corresponding to each injection frequency, and turns the crank on the TF estimation. It's written as a function so it can be called in other matlab code.

An example of a swept-sine measurement of the WArm loop is attached; the swept sine data points are plotted on top of the loop model and a TF measurement with a broadband noise injection.  Note that the coherence of the broadband noise injection is only good around the loop UGF, but the swept sine datapoints maintain coherence well below the UGF.  The measurement in this region matches the TF model very nicely.

These scripts are still a little hacked together, feel free to modify them, change the functionality, etc.

p.s. Let's keep useful scripts for TF measurements in the /olusers/virgorun/ISC/TFs/ directory.  I've moved my Matlab scripts there, for each LSC DOF - these scripts have Matlab models of the current loop control filters, suspension response, cavity response, etc.