Today we worked on the Acl code for the green and IR AA loop.
The schemes of the two loops are shown in pic 1 and pic 2. The loops have been implemented in the AFC_Ctrl process, in IR_AA_Steering and GREEN_AA config files. The channel names may be further modified in the future.
Few other things have also been done.
1. Added a common demodulation phase for each IR QPD
The old code in EQB2_QD provides the possibility to have a different demodulation phase for sections from each QPD. But as decided for the green QPDs, we will use only one demodulation phase for each QPD.
We added the following lines in the EQB2_QD file.
ACL_CONST_CH {QD-RF}_{RF-FREQ}_X_phi0 "rad" 1 LOOP_FREQ 1.6
ACL_CONST_CH {QD-RF}_{RF-FREQ}_Y_phi0 "rad" 1 LOOP_FREQ 1.6
ACL_ROTATE_CH {QD-RF}_{RF-FREQ}_X 0.0 {QD-RF}_{RF-FREQ}_X_I_raw {QD-RF}_{RF-FREQ}_X_Q_raw 0. "none"
ACL_ROTATE_PHI {QD-RF}_{RF-FREQ}_X {QD-RF}_{RF-FREQ}_X_phi0
ACL_ROTATE_CH {QD-RF}_{RF-FREQ}_Y 0.0 {QD-RF}_{RF-FREQ}_Y_I_raw {QD-RF}_{RF-FREQ}_Y_Q_raw 0. "none"
ACL_ROTATE_PHI {QD-RF}_{RF-FREQ}_Y {QD-RF}_{RF-FREQ}_Y_phi0
2. Exported the IR AA error signal from the EQB2_QD process.
Since the EQB2_QD and AFC_Ctrl are on the same rtpc. So I simply sent the error signal channels to the real time task channel buffer and commented the lines sent those channels to the DAQ. Note: only I quadrature has been sent out with sampling frequency of 10kHz. The Q channels were down sampled to 2000Hz and sent to the DAQ.
ACL_CHBUF_D "EQB2_" IR_QD1_RF_11MHz_X_I IR_QD1_RF_11MHz_Y_I
ACL_CHBUF_D "EQB2_" IR_QD2_RF_11MHz_X_I IR_QD2_RF_11MHz_Y_I
3. Sent the correction signals of the IR AA to EQB1_HD_AA process
The IR AA correction signals need to be sent to the M3 and M5 mirrors, this has been done in the EQB1_HD_AA process.
I imported the IR AA corrections signal there and sum it with the IR BPC correction signals.
ACL_SUM_CH IR_M3_MT1_X_cmd "" 1 1.0 IR_M3_BPC_X_CMD 0.0 IR_M3_AA_X_CMD
ACL_SUM_CH IR_M3_MT1_Y_cmd "" 1 1.0 IR_M3_BPC_Y_CMD 0.0 IR_M3_AA_Y_CMD
ACL_SUM_CH IR_M5_X_cmd "" 1 1.0 IR_M5_BPC_X_CMD 0.0 IR_M5_AA_X_CMD
ACL_SUM_CH IR_M5_Y_cmd "" 1 1.0 IR_M5_BPC_Y_CMD 0.0 IR_M5_AA_Y_CMD
By changing the coeffcient of the two channels, we will be able to switch between the IR BPC loop and the IR AA loop.
4. Simplified the buttons for EQB2_QD QD1 and QD2 galvo loop
IR QD1 and QD2 are used for the IR AA loop, to simplify the procedure, I changed the buttons arrangement in the EQB2_QD process.
Now we have only 'Close galvo loop' and 'Open galvo loop' for each QPD.