We automated the centering of the SFP on the IBMS. In the past, this was done using CtrlSrv, but we had some difficulty getting it working again and the algorithm was impossible to modify.
As an experiment, we developed a new application called PyALP, which interfaces with Virgo data using the Fd library. All the logic for centering the SFP is contained in a separate algorithm part. Both the application and the algorithm are written in Python. The process has Cm-name PySFP and runs on olserver40, screen 20579.
Data flows from FbmMainAlp via CM to PyIN via SHM to PySFP via CM to FbmSt. The Python outputs are recorded there as 1Hz trend data.
Input are INJ_SFP_PD, INJ_SFP_RAMP, INJ_IBMS_PD.
The code operates at 1Hz, on one frame at a time.
Outputs, with prefix V1:INJ_SFP, are:
- LSB_PWR = Power of the left SB [V]
- RSB_PWR = Power of the right SB [V]
- CAR_PWR = Carrier [V]
- FP = Feedback of the centering loop + ramp_offset, applied to the SFP ramp [V]
- gain = Gain of the servo.
- SEVO_ERR = Error signal
- SERVO_CORR = Correction / feedack signal of the servo
The code was long-term for 36h (see Fig. 1).
Algorithm
- Check if the power in front of the SFP is reasonable (via INJ_IBMS_PD), if yes then continue
- Find the individual ramps by looking at the derivative of INJ_SFP_RAMP (it is a strongly asymmetric triangle, almost a saw tooth)
- Per ramp: Find the voltage corresponding to the max. power. This is the carrier.
- Per ramp: Calculate the difference in voltage between carrier position and the middle between lower and upper end of the ramp. This is the error signal for the centering.
- Per ramp: Look at a frequency / voltage interval around the carrier for the sidebands. Only one upper and lower SB at 22.4MHz are expected respectively for now. Scaling factor of 1424 MHz / Volt is hard coded.
- Per ramp: If the found carrier power is reasonable and both SBs were found, then add the per ramp values into list that contain all per ramp values
- Average (median) the values of power for carrier and SBs and the error signal
- Feed the averaged error signal into a servo (pole at DC, UGF << 1Hz, slewrate limited, maximum correction limited, deadband = 0.005 (increased now to 0.015, corresponding to ~20% of the maximum.)
- Pass feedback via cm message to PrISYS
- If a valid error signal couldn't be found in 20 consecutive tries: Start applying an offset to the to the ramp (ramp_offset), and vary that slowly. This is in case the carrier and/or SBs have moved out of the ramp.
- When a valid error signal was found, slowly reduce ramp_offset
If the algorithm encounters a problem in one of the ramps it continues with the next. If it encounters a problem with the whole ramp it continues with the next ramp. In that case the feedback is kept constant.
We implemented the posibility to filter the PD signal, by convolving with a signal template. This is deactivated for now, since the spreading of the signal is not due to noise but rather the presence of HOMs in the detected beam. This is evident because the shape of the peaks remains constant from peak to peak (on short time spans anyway).
The procedure is:
- Find the slope of the less steep parts of the ramps. Average (median) the slopes of all ramps.
- Prepare a template (~ exp(-x^2)) to convolve the detected power with. The template's width is scaled inverse proportional to the slope of the ramp. We could also use a Lorentzian as a template.
- Per ramp: Convolve the power in the intervals with the template. This reduces the noise in the measurement. Normalization Is taken care of.
We will work to get the process to show up on the Virgo process monitoring webpages.