40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
 40m Log, Page 56 of 339 Not logged in
ID Date Author Type Category Subject
15934   Wed Mar 17 16:30:46 2021 AnchalUpdateSUSNormalized Input Matrices plotted better than SURF students

Here, I present the same input matrices now normalized row by row to have same norm as current matrices rows. These now I plotted better than last time. Other comments same as 15902. Please let us know what you think.

Thu Mar 18 09:11:10 2021 :

Note: The comparison of butterfly dof in the two cases is bit bogus. The reason is that we know what the butterfly vector is in sensing matrix (N_osems x (N_dof +1)) and that is the last column being (1, -1, 1, -1, 0) corresponding to (UL, UR, LR, LL, Side). However, the matrix we multiply with the OSEM data is the inverse of this matrix (which becomes the input matrix) which has dimensions ((N_dof + 1) x N_osem) and has the last row corresponding to the butterfly dof. This row was not stored for old calculation of the input matrix (which is currently in use) and can not be recovered (mathematically not possible) with the existing 5x4 part of that input matrix. We just added (1, -1, 1, -1, 0) row in the bottom of this matrix (as was done in the matlab codes) but that is wrong and hence the butterfly vector looks so bad for the existing input matrix.

Proposal: We should store the last row of generated input matrix somewhere for such calculations. Ideally, another row in the epics channels for the input matrix would be the best place to store them but I guess that would be too destructive to implement. Other options are to store this 5 number information in wiki or just elogs. For this post, the buttefly row for the generated input matrix is present in the attached files (for future references).

15937   Thu Mar 18 09:18:49 2021 Paco, AnchalUpdateSUSTesting of new input matrices with new data

[Paco, Anchal]

Since the new generated matrices were created for the measurement made last time, they are of course going to work well for it. We need to test with new independent data to see if it works in general.

• We have run scripts/SUS/InMatCal/freeSwingMC.py for 1 repition and free swinging duration of 1050s on tmux session FreeSwingMC on Rossa. Started at GPS: 1300118787.
• Thu Mar 18 09:24:57 2021 : The script ended successfully. IMC is locked back again. Killing the tmux session.
• Attached are the results of 1-kick test, time series data and the ASD of DOFs for calculated using existing input matrix and our calculated input matrix.
• The existing one was already pretty good except for maybe the side DOF which was improved on our diagonalization.

[Paco]

After Anchal left for his test, I took the time to set up the iMAC station so that Stephen (and others) can remote desktop into it to use Omnigraffle. For this, I enabled the remote login and remote management settings under "Sharing" in "System Settings". These two should allow authenticated ssh-ing and remote-desktopping respectively. The password is the same that's currently stored in the secrets.

Quickly tested using my laptop (OS:linux, RDP client = remmina + VNC protocol) and it worked. Hopefully Stephen can get it to work too.

15939   Thu Mar 18 12:46:53 2021 ranaUpdateSUSTesting of new input matrices with new data

Good Enough! Let's move on with output matrix tuning. I will talk to you guys about it privately so that the whole doesn't learn our secret, and highly sought after, actuation balancing.

I suspect that changing the DC alignment of the SUS changes the required input/output matrix (since changes in the magnet position w.r.t. the OSEM head change the sensing cross-coupling and the actuation gain), so we want to make sure wo do all this with the mirror at the correct alignment.

15943   Fri Mar 19 10:49:44 2021 Paco, AnchalUpdateSUSTrying coil actuation balance

[Paco, Anchal]

• We decided to try out the coil actuation balancing after seeing some posts from Gautum about the same on PRM and ETMY.
• We used diaggui to send swept sine excitation signal to C1:SUS-MC3_ULCOIL_EXC and read it back at C1:SUS-MC3_ASCPIT_IN1. Idea was to create transfer function measurements similar to 15880.
• We first tried taking the transfer function with excitation amplitude 0f 1, 10, 50, 200 with damping loops on (swept from 10 to 100 Hz lograthmically in 20 points).
• We found no meaningful measurement and looked like we were just measuring noise.
• We concluded that it is probably because our damping loops are damping all the excitation down.
• So we decided to switch off damping and retry.
• We switched off: C1:SUS-MC3_SUSPOS_SW2 , C1:SUS-MC3_SUSPIT_SW2, C1:SUS-MC3_ASCPIT_SW2, C1:SUS-MC3_ASCYAW_SW2, C1:SUS-MC3_SUSYAW_SW2, and C1:SUS-MC3_SUSSIDE_SW2.
• We repeated teh above measurements going up in amplitudes of excitation as 1, 10, 20. We saw the oscillation going out of UL_COIL but the swept sine couldn't measure any meaningful transfer function to C1:SUS-MC3_ASCPIT_IN1. So we decided to just stop. We are probably doing something wrong.

### Trying to go back to same state:

• We switch on: C1:SUS-MC3_SUSPOS_SW2 , C1:SUS-MC3_SUSPIT_SW2, C1:SUS-MC3_ASCPIT_SW2, C1:SUS-MC3_ASCYAW_SW2, C1:SUS-MC3_SUSYAW_SW2, and C1:SUS-MC3_SUSSIDE_SW2.
• But C1:SUS-MC3_ASCYAW_INMON had accumulated about 600 offset and was distrupting the alignment. We switched off C1:SUS-MC3_ASCYAW_SW2 hoping the offset will go away once the optic is just damped with OSEM sensors, but it didn't.
• Even after minutes, the offset in C1:SUS-MC3_ASCYAW_INMON kept on increasing and crossed beyond 2000 counts limit set in C1:IOO-MC3_YAW filter bank.
• We tried to unlock the IMC and lock it back again but the offset still persisted.
• We tried to add bias in YAW DOF by increasing C1:SUS-MC3_YAW_OFFSET, and while it was able to somewhat reduce the WFS C1:SUS-MC3_ASCYAW_INMON offset  but it was misalgning the optic and the lock was lost. So we retracted the bias to 0 and made it zero.
• We tried to track back where the offset is coming from. In C1IOO_WFS_MASTER.adl, we opened the WFS2_YAW filter bank to see if the sensor is indeed reading the increasing offset.
• It is quite weird that C1:IOO-WFS2_YAW_INMON is just oscillating but the output in this WFS2_YAW filter bank is slowly increasing offset.
• We tried to zero the gain and back to 0.1 to see if some holding function is causing it, but that was not the case. The output went back to high negative offset and kept increasing.
• We don't know what else to do. Only this one WFS YAW output is increasing, everything else is at normal level with no increasing offset or peculiar behavior.
• We are leaving C1:SUS-MC3_ASCYAW_SW2 off as it is disrupting the IMC lock.

[Jon walked in, asked him for help]

• Jon suggested to do burt restore on IOO channels.
• We used (selected through burtgooey): burtwb -f /opt/rtcds/caltech/c1/burt/autoburt/snapshots/2021/Mar/19/08:19/c1iooepics.snap -l /tmp/controls_1210319_113410_0.write.log -o /tmp/controls_1210319_113410_0.nowrite.snap -v <
• No luck, the problem persists.
15951   Mon Mar 22 11:57:21 2021 Paco, AnchalUpdateSUSTrying coil actuation balance

[Paco, Anchal]

• For MC coil balancing we will use the ASC (i.e. WFS) error signals since there are no OPLEV inputs (are there OPLEVs at all?).

### Test MC1

• Using the SUS screen LockIns the plan is to feed excitation(s) through the coil outputs, and look at the ASC(Y/P) error signals.
• A diaggui xml template was saved in /users/Templates/SUS/MC1-actDiag.xml which was based on /users/Templates/SUS/ETMY-actDiag.xml
• Before running the measurement, we of course want to plug our input matrix, so we ran /scripts/SUS/InMatCalc/writeMatrix.py only to find that it tripped the MC1 Watchdog.
• The SIDE input seems to have the largest rail, but we just followed the procedure of temporarily increasing the WD max! threshold to allow the damping action and then restoring it.
• This happened because in latest iteration of our code, we followed an advice from the matlab code to ensure the SIDE OSEM -> SIDE DOF matrix element remains positive, but we found out that MC1 SIDE gain (C1:SUS-MC1_SUSSIDE_GAIN) was set to -8000 (instead of a positive value like all other suspensions).
• So we decided to try our new input matrix with a positive gain value of 8000 at C1:SUS-MC1_SUSSIDE_GAIN and we were able to stablize the optic and acquire lock, but...
• We saw that WFS YAW dof started accumulating offset and started disturbing the lock (much like last friday). We disabled the ASC Input button (C1:SUS-MC1_ASCYAW_SW2).
• This made the lock stable and IMC autolocker was able to lock. But the offset kept on increasing (see attachment 1).
• After sometime, the offset begain to exponential go to some steady state value which was around -3000.
• We wrote back the old matrix values and changed the C1:SUS-MC1_SUSSIDE_GAIN back to -8000. But the ASCYAW offset remained to the same position. We're leaving it disabled again as we don't know how to fix this. Hopefully, it will organically come back to small value later in the day like last time (Gautum just reenabled the ASCYAW input and it worked).

Test MC3

• Defeated by MC1, we moved to MC3.
• Here, the gain value for C1:SUS-MC3_SUSSIDE_GAIN was already positive (+500) so it could directly take our new matrix.
• When we switched off watchdog, loaded the new matrix and switched the watchdog back on.
• The IMC lock was slightly distrupted but remain locked. There was no unusual activity in the WFS sensor values. However, we saw the the SIDE coil output is slowly accumulating offset.
• So we switched off the watchdog before it will trip itself, wrote back the old matrix and reinstated the status quo.
• This suggests we need to carefully look back our latest changes of normalization and have new input matriced which keep the system stable other than working on paper with offline data.
15952   Mon Mar 22 15:10:00 2021 ranaUpdateSUSTrying coil actuation balance

There's an integrator in the MC WFS servos, so you should never be disabling the ASC inputs in the suspensions. Disabling 1 leg in a 6 DOF MIMO system is like a kitchen table with 1 leg removed.

Just diagnose your suspension stuff with the cavity unlocked. You should be able to see the effect by characterizing the damping loops / cross-coupling.

15954   Mon Mar 22 19:07:50 2021 Paco, AnchalUpdateSUSTrying coil actuation balance

We found that following protocol works for changing the input matrices to new matrices:

• Shut the PSL shutter C1:PSL-PSL_ShutterRqst. Switch off IMC autolocker C1:IOO-MC_LOCK_ENABLE.
• Switch of the watchdog, C1:SUS-MC1_LATCH_OFF.
• Update the new matrix. (in case of MC1, we need to change sign of C1:SUS-MC1_SUSSIDE_GAIN for new matrix)
• Switch on the watchdog back again which enables all the coil outputs. Confirm that the optic is damped with just OSEM sensors.
• Switch on IMC autolocker C1:IOO-MC_LOCK_ENABLE and open PSL shutter C1:PSL-PSL_ShutterRqst.

We repeated this for MC2 as well and were able to lock. However, we could not do the same for MC3. It was getting unstable as soon as cavity was locked i.e. the WFS were making the lock unstable. However, the unstability was different in different attempts but we didn't try mroe times as we had to go.

### Coil actuation balancing:

• We set LOCKIN1 and LOCKIN2 oscillators at 10.5 Hz anf 13.5 Hz with amplitude of 10 counts.
• We wrote PIT, YAW and Butterfly actuation vectors (see attached text files used for this) on LOCKIN1 and LOCKIN2 for MC1.
• We measured C1:SUS-MC1_ASCYAW_IN1 and C1:SUS-MC1_ASCPIT_IN1 and compared it against the case when no excitation was fed.
• We repeated the above steps for MC2 except that we did not use LOCKIN2. LOCKIN2 was found to already on at oscillator frequency of 0.03Hz with amplitude of 500 counts and was fed to all coils with gain of 1 (so it was effectively moving position DOF at 0.03 Hz.) When we changed it, it became ON back again after we turned on the autolocker, so we guess this must be due to some background script and msut be important so we did not make any changes here. But what is it for?
• We have gotten some good data for MC1 and MC2 to ponder upon next.
• MC1 showed no cross coupling at all while MC2 shoed significant cross coupling between PIT and YAW.
• Both MC1 and MC2 did not show any cross coupling between butterfly actuation and PIT/YAW dof.

### On another news, IOO channels died!

• Infront of us, the medm channels starting with C1:IOO just died. See attachment 8.
• We are not sure why that happened, but we have reported everything we did up here.
• This happened around the time we were ready to switch back on the IMC autolocker and open the shutter. But now these channels are dead.
• All optics were restored with old matrices and settings and are damped in good condition as of now.
• IMC should lock back as soon as someone can restart the EPICS channels and switch on C1:IOO-MC_LOCK_ENABLE and C1:PSL-PSL_ShutterRqst.
15957   Wed Mar 24 09:23:49 2021 PacoUpdateSUSMC3 new Input Matrix

[Paco]

• Found IMC locked upon arrival
• Loaded newest MC3 Input Matrix coefficients using /scripts/SUS/InMatCalc/writeMatrix.py after unlocking the MC, and disabling the watchdog.
• Again, the sens signals started increasing after the WD is reenabled with the new Input matrix, so I manually tripped it and restored the old matrix; recovered MC lock.
• Something is still off with this input matrix that makes the MC3 loop unstable.

### Proof-of-principle

• We excited PIT and YAW dofs using LOCKIN1 in MC2 on Monday.
• We analyzed this data in a simple analysis explained in Attachment 1 python notebook (also present at /users/anchal/20210323_AnalyszingCoilActuationBalance/)
• Basically, we tried to estimate the cross coupling in 2x2 matrix from actuated DOF to sensed DOF, inverted it, and applied it to output matrix to undo the cross coupling.
• Attachments 2 and 3 show how much we performed in undoing the cross coupling.
• The ratio of 13.5 Hz peaks shows how much coupling is still present.

### Going towards 3x3 Coil balancing:

• In a conversation with Rana yesterday, we understood that we can use MC_F data as POS sensing data out of the loop.
• So today, we repreated the excitation measurements while exciting POS, PIT and YAW dofs from LOCKIN1 on MC2 and measuring C1:IOO-MC_F, C1:SUS-MC2_ASCPIT_IN1 and C1:SUS-MC2_ASCPIT_IN2.
• Data from MC_F is converted into units of um using factor 9.57e-8 um/Hz.
• We changed the excitation amplitude in order to see cross coupling peaks when they were not visible with low excitation.
• The data was measured while new calculated input matrix was loaded which from our calculations diagonalized the sensing matrix of OSEMs.

### Some major changes:

• We actually found that the C1:SUS-MC2_ASCPIT_IN1 showed a broadband increase in noise today (from Monday) by factor of about 100 in range 0-20 Hz.
• We were not sure why this changed from our 22nd March measurement.
• We checked if the gain values in the loops changed in alst 3 days, but they didn't.
• Then we realized that the WFS1_PIT and WFS2_PIT switched that we turned ON on Tuesday were the only changes that were made in the loop.
• We turned back OFF C1:IOO-WFS1_PIT_SW1 and C1:IOO-WFS2_PIT_SW1. This actually brought back the noise level of C1:SUS-MC2_ASCPIT_IN1 down to what it was on Monday.

15966   Thu Mar 25 16:02:15 2021 gautamSummarySUSRepeated measurement of coil Rs & Ls for PRM/BS

Method

Since I am mainly concerned with the actuator part of the OSEM, I chose to do this measurement at the output cables for the coil drivers in 1X4. See schematic for pin-mapping. There are several parts in between my measurement point and the actual coils but I figured it's a good check to figure out if measurements made from this point yield sensible results. The slow bias voltages were ramped off under damping (to avoid un-necessarily kicking the optics when disconnecting cables) and then the suspension watchdogs were shutdown for the duration of the measurement.

I used an LCR meter to measure R and L - as prescribed by Koji, the probe leads were shorted and the readback nulled to return 0. Then for R, I corroborated the values measured with the LCR meter against a Fluke DMM (they turned out to be within +/- 0.5 ohms of the value reported by the BK Precision LCR meter which I think is reasonable).

Result

 PRM Pin1-9 (UL)   / R = 30.6Ω / L=3.23mH   Pin2-10 (LL)  / R = 30.3Ω / L=3.24mH Pin3-11 (UR) / R = 30.6Ω / L=3.25mH Pin4-12 (LR) / R = 31.8Ω / L=3.22mH Pin5-13 (SD) / R = 30.0Ω / L=3.25mH BS Pin1-9 (UL)   / R = 31.7Ω / L=3.29mH Pin2-10 (LL)  / R = 29.7Ω / L=3.26mH Pin3-11 (UR) / R = 29.8Ω / L=3.30mH Pin4-12 (LR) / R = 29.7Ω / L=3.27mH Pin5-13 (SD) / R = 29.0Ω / L=3.24mH

Conclusions

On the basis of this measurement, I see no problems with the OSEM actuators - the wire resistances to the flange seem comparable to the nominal OSEM resistance of ~13 ohms, but this isn't outrageous I guess. But I don't know how to reconcile this with Koji's measurement at the flange - I guess I can't definitively rule out the wire resistance being 30 ohms and the OSEMs being ~1 ohm as Koji measured. How to reconcile this with the funky PRM actuator measurement? Possibilities, the way I see it, are:

1. Magnets on PRM are weird in some way. Note that the free-swinging measurement for the PRM showed some unexpected features.
2. The imbalance is coming from one of the drive chain - could be a busted current buffer for example.
3. The measurement technique was wrong.

[Paco, Anchal]

• Today we spent the morning testing the scripts under ~/c1/scripts/SUS/OutMatCalc/ that automate the procedure (which we have been doing by hand) and catch any "bad" behavior instances that we have identified. In such instances, the script sets up to restore the IMC state smoothly.
• After some testing and debugging, we managed to get some data for MC2 using ~/c1/scripts/SUS/OutMatCalc/getCrossCouplingData.py
15971   Sun Mar 28 14:16:25 2021 AnchalSummarySUSMC3 new Input Matrix not providing stable loop

Rana asked us to write out here the new MC3 input matrix we have calculated along with the old one. The new matrix is not working out for us as it can't keep the suspension loops stable.

Matrices:

Old (Current) MC3 Input Matrix (C1:SUS-MC3_INMATRIX_ii_jj)
UL UR LR LL SD
POS 0.288 0.284 0.212 0.216 -0.406
PIT 2.658 0.041 -3.291 -0.674 -0.721
YAW 0.605 -2.714 0.014 3.332 0.666
SIDE 0.166 0.197 0.105 0.074 1

New MC3 Input Matrix (C1:SUS-MC3_INMATRIX_ii_jj)
UL UR LR LL SIDE
POS 0.144 0.182 0.124 0.086 0.586
PIT 2.328 0.059 -3.399 -1.13 -0.786
YAW 0.552 -2.591 0.263 3.406 0.768
SIDE -0.287 -0.304 -0.282 -0.265 0.871

Note that the new matrix has been made so that the norm of each row is the same as the norm of the corresponding row in the old (current) input matrix.

Peak finding results:

Guess Values Fittted Values
PIT Resonant Freq. (Hz) 0.771 0.771
YAW Resonant Freq. (Hz) 0.841 0.846
POS Resonant Freq. (Hz) 0.969 0.969
SIDE Resonant Freq. (Hz) 0.978 0.978
PIT Resonance Q 600 345
YAW Resonance Q 230 120
POS Resonance Q 200 436
SIDE Resonance Q 460 282
PIT Resonance Amplitude 500 750
YAW Resonance Amplitude 1500 3872
POS Resonance Amplitude 3800 363
SIDE Resonance Amplitude 170 282

Note: The highest peak on SIDE OSEM sensor free swinging data as well as the DOF basis data created using existing input matrix, comes at 0.978 Hz. Ideally, this should be 1 Hz and in MC1 and MC2, we see the resonance on SIDE DOF to show near 0.99 Hz. If you look closely, there is a small peak present near 1 Hz actually, but it is too small to be the SIDE DOF eigenfrequency. And if it is indeed that, then which of the other 4 peaks is not the DOF we are interested in?

On possiblity is that the POS eigenfrequency which is supposed to be around 0.97 Hz is split off in two peaks due to some sideways vibration and hence these peaks get strongly coupled to SIDE OSEM as well.

P.S. I think something is wrong and out limited experience is not enough to pinpoint it. I can show up more data or plots if required to understand this issue. Let us know what you all think.

We ran the coil balancing procedure 4 times while iterating through the output matrix optimization.

Attachment 1, pages 1 to 4 show the progression of cross coupling from current output matrix (which is theoretical ideal) to the latest iteration. We plot the sensed DOF ASD which we used to determine the cross coupling when different excitations are fed using the LOCKIN1 feeding 13Hz oscillation of 200 counts amplitude along the vector defined in output matrix. That means, when we change the output matrix, in subsequent tests, we alos change the exciation direction along with it.

Unfortunately, we don't see a very good optimizations over iterations. While we see some peaks going down in sensed PIT and sensed POS (through MC_F), we rather see an increase in cross coupling in the sensed YAW.

### Scripts:

• For running the tests, we used script in scripts/SUS/OutMatCalc/crossCoupleTest.py and wrote commanding scripts in the /users/anchal/20210329_MC2_TestingNewOutMat .
• The optimization code is at in scripts/SUS/OutMatCalc/outMatOptimize.py.
• The code reads sensed DOF data using nds2 and calculated cross spectral density among the sensed DOF at the excitation frequencies.
• This is normalized by the power spectral density of reference data (no excitation) and power spectral density of position data to create a TF estimate.
• The real values of the sensor matrix thus created is used to get the inverse matrix.
• The inverse matrix is first normalized along each row by diagonal elements to get 1 there and then multiplied by previous output matrix to create a new output matrix.
• I guess, reading the code will be a better way of understanding this algorithm.
15973   Mon Mar 29 17:07:17 2021 gautamSummarySUSMC3 new Input Matrix not providing stable loop

I suppose you've tried doing the submatrix approach, where SIDE is excluded for the face DoFs? Does that give a better matrix? To me, it's unreasonable that the side OSEM senses POS motion more than any single face OSEM, as your matrix suggests (indeed the old one does too). If/when we vent, we can try positioning the OSEMs better.

For this technique to work, (i) the WFS loops must be well tuned and (ii) the beam must be well centered on MC2. I am reasonably certain neither is true. For MC2 coil balancing, you can use a HeNe, there is already one on the table (not powered), and I guess you can use the MC2 trans QPD as a sensor, MC won't need to be locked so you can temporarily hijack that QPD (please don't move anything on the table unless you're confident of recovering everything, it should be possible to do all of this with an additional steering mirror you can install and then remove once your test is done). Then you can do any variant of the techniques available once you have an optical lever, e.g. single coil drive, pringle mode drive etc to do the balancing.

I think Hang had some technique he tried recently as well, maybe that is an improvement.

I think there's been some mis-communication. There's no updated Hang procedure, but there is the one that Anchal, Paco and I discussed, which is different from what is in the elog.

We'll discuss again, and try to get it right, but no need to make multiple forks yet.

15982   Wed Mar 31 22:58:32 2021 Anchal, PacoUpdateSUSMC2 Coil Balancing Test

A cross-coupling test has been set to trigger at 05:00 am on April 1st, 2021. The script is waiting on tmux session 'cB' on pianosa. /scripts/SUS/OutMatCalc/MC2crossCoupleTest.py is being used here. The script will switch on oscillator in LOCKIN1 of MC2 at 13 Hz and 200 counts and would send it along the POS, PIT and YAW vectors on output matrix one by one, each for 2 minutes. It will take data from C1:IOO-MC_F_DQ, C1:IOO-MC_TRANS_PIT_ERR and C1:IOO-MC_TRANS_YAW_ERR and use it to measure 'sensing matrix' S. Sensing matrix S is defined as the cross-coupling between excited and sensed DOF and we ideally want it to be an identity matrix. The code will use the measured S to create a guess matrix A which on being multiplied by ideal coil output matrix would give us a rotated coil output matrix O. This guess O will be applied and the measurement will be repeated. On each iteration, next, A matrix is defined by:

$A_{k+1} = (1 + \beta) A_k - \beta S_k A_k$

This recursive algorithm converges A to the inverse of initial S. The above relation is derived by noticing that in steady state $A S = \mathrm{I} \Rightarrow A = A S A \Rightarrow A = A - \beta(A S A - A)$. I've taken this idea from a mathematics paper I found on some more complex stuff (c.f. https://doi.org/10.31219/osf.io/yrvck).

At each iteration, all three matrices A, O and S will be stored in a text file for analysis later.

The code has the error-catching capability and would restore the optic to the status quo if an error occurs or watchdogs trip due to earthquakes.

15983   Thu Apr 1 00:50:06 2021 gautamUpdateSUSPRMdiag

I spent some time investigating the PRM this evening, trying out some of the stuff we discussed in the meeting.

1. I used one of the SUS lockin oscillator to drive the butterfly mode (UL=+1, UR=-1, LL=-1, LR=+1) of the optic, @4.45 Hz, Amplitude=450cts (Oplev loops were engaged during the measurement).
2. Used the sensing matrix infrastructure to demodulate the Oplev PIT/YAW error signals, using the other lockin channel (so that oscillator is just for demodulation, it doesn't actuate on the suspension).
3. The digital demod phase was adjusted to put all of the demodulated signal in one ("I") quadrature.
4. The balancing of the coils was perturbed by adding small amounts of the naive PIT (YAW) DoF to the pringle-mode actuation, while simultaneously looking to minimize the demodulated signal in YAW (PIT).

Basically, my finding tonight was that I could not improve (make the pringle mode actuation witnessed by the Oplev QPD smaller) by +/- perturbing the butterfly actuation with of 0.05%, 0.5% and 1% of PIT (I didn't try YAW, or other values of PIT, as none of these seemed to do any good). It seems highly unlikely that the existing coil gains (these come after the output matrix) and the actual coil/magnet pairs are so perfectly tuned, so there must be something wrong with my method. I'll try more combos tomorrow. Separately, I verified that the naive PIT (YAW) moves the optic mainly, i.e. to the eye), in PIT(YAW) as judged by the REFL spot on the camera and the readback of the Oplev QPD.

For this work, I made a few changes to filter banks:

1. Added 2Hz wide BPs centered around 4.45 Hz to the "SIGNAL" FM of the BS and PRM suspension lockins.
2. Added 100mHz LPFs to the I and Q demodulated outputs.
3. Made a copy of Kiwamu's perturbcoilbalance_fourosem.py (in scripts/SUS) to add little bit of PIT/YAW to the pringle actuation.

I noticed that the filters/switch states/gains for LOCKIN1 and LOCKIN2 are not consistent within either PRM or BS suspension, or across suspensions. Several filter INs/OUTs were also disabled - something for the SUSdiag team to note, whenever this is scripted, the script should check that the signal is indeed making it end-to-end.

15984   Thu Apr 1 13:56:49 2021 Anchal, PacoUpdateSUSMC2 Coil Balancing Test Results

The coil balancing attempt failed. The off-diagonal values in the measured sensing matrices either remained the same or increased.

The attempt in the morning was too slow. By the time we reached, it had reached to iteration 7 only and still nowhere near optimum sensing matrix had reached. We still needed to see if the optimum would eventually reach if more iterations happened.

So we worked a bit on speeding up the data loading process and then ran the code again which now was running much faster. Still within 1 hr or so, we saw it had reached to iteration 7 with no sign of sensing matrix getting any better.

<Paco left for vaccination>

To determine if the method would work in principle, I decided to stop the current run and start with a 0.5 Hz bandwidth run (so about 7 averages with 8s duration data and welch method). This completed 20 iterations before Gautum came. But it was clear now that the method is not converging to a better solution. Need to find a bug in the implementation of the algorithm mentioned in last post or find a better algoritm.

Attachment 1 is the plot of how the sensing matrix's distance from the identity matrix increased over iterations in the last run.

Attachment 2 is the plot for different off-diagonal terms in the sensing matrix. It is clear that POS->PIT,YAW coupling is not being measured properly as it remains constant.

Attachment 3 Gautum told us that there is some naming error in nds and MC_TRANS_PIT/YAW can be read through C1:IOO-MC_TRANS_PIT_ERR and C1:IOO-MC_TRANS_YAW_ERR channels instead. To test if they indeed point to same values, we did a test of exciting YAW degree through LOCKIN1 and seeing if the peaks are visible in the channels. This was also done to give Radhika an opportunity to do something I could confidently mentor about. and to experience using diaggui.

15985   Thu Apr 1 18:01:06 2021 Anchal, PacoUpdateSUSMC2 Coil Balancing Test Results Success??

After fixing a few things we felt were wrong in our implementation of the algorithm, we ran the coil balancing for 12 iterations with just 11s per excitation and still taking CSD with 0.1 Hz bandwidth. This time we saw the distance of sensing matrix from identity going down.

### Performance Analysis

• Attachment 1 shows the trend of distance of Sensing matrix from identity matrix over iterations.
• Attachment 2 shows the trend of off-diagonal terms in sensing matrix over iterations.
• Attachment 3 shows the ASD for the different sensed DOF when excited in different DOFs with the new output matrix. This is the better truth of what happened by the end. The true sensing matrix is proportional to the peak heights in this plot. Rows are different sensed DOFs (POS, PIT, YAW) and columns are excited DOFs (POS, PIT, YAW). The black dotted curves are ASD when no excitation was present.

### Next step

• We want to run it for longer, more iterations and more duration to get better averaging. Hopefully, this will do a better job. We'll try running this new code tomorrow at 5:00am.
• We'll work on using uncertainties of measured data.
• Use awg to excite all DOF together at different frequencies and make the code faster.
15987   Thu Apr 1 18:48:45 2021 gautamUpdateSUSMC2 Coil Balancing Test Results Success??

In these results, can you also include the new matrix and what the relative imbalances were?

15988   Thu Apr 1 21:13:54 2021 AnchalUpdateSUSMatrix results, new measurement set to trigger
New Input matrix used for MC2 (C1:SUS-MC2_INMATRIX_ii_jj
UL UR LR LL SIDE
POS 0.2464 0.2591 0.2676 0.2548 -0.1312
PIT 1.7342 0.7594 -2.494 -1.5192 -0.0905
YAW 1.2672 -2.0309 -0.9625 2.3356 -0.2926
SIDE 0.1243 -0.1512 -0.1691 0.1064 0.9962

New output matrix for MC2 (C1:SUS-MC2_TO_COIL_ii_jj_GAIN)
POS PIT YAW
UL 1 1.022 0.6554
UR 1 0.9776 -1.2532
LL 1 -0.9775 1.2532
LR 1 -1.0219 -0.6554

Measured Sensing Matrix (Cross Coupling) (Sensed DOF x Excited DOF)
Excited POS Excited PIT Excited YAW
Sensed POS 1 1.9750e-5 -3.5615e-6
Sensed PIT 0 1 -6.93550e-2
Sensed YAW 0 -2.4429e-4 1

A longer measurement is set to trigger at 5:00 tomorrow on April 2nd, 2021. This measurement will run for 35 iterations with an excitation duration of 120s and bandwidth for CSD measurement set to 0.1 Hz. The script is set to trigger in a tmux session named 'cB' on pianosa.

15991   Fri Apr 2 14:51:20 2021 AnchalUpdateSUSBug found, need to redo the balancing

Last run gave similar results as the quick run we did earlier. The code has been unable to strike out couplings with POS. We found the bug which is causing this. This was because the sampling rate of MC_F channel is different from the test-point channels used for PIT and YAW. Even though we were aware of it, we made an error in handling it while calculating CSD. Due to this, CSD calculation with POS data was performed by the code with zero padding which made it think that no PIT/YAW <-> POS coupling exist. Hence our code was only able to fix PIT <-> YAW couplings.

We'll need to do another run with this bug fixed. I'll update this post with details of the new measurement.

15993   Fri Apr 2 15:22:54 2021 gautamUpdateSUSMatrix results, new measurement set to trigger

How should I try to understand why PIT and YAW are so different?

Quote:
New output matrix for MC2 (C1:SUS-MC2_TO_COIL_ii_jj_GAIN)
POS PIT YAW
UL 1 1.022 0.6554
UR 1 0.9776 -1.2532
LL 1 -0.9775 1.2532
LR 1 -1.0219 -0.6554

As mentioned in last post, we earlier made an error in making sure that all time series arrays go in with same sampling rate in CSD calculation. When we fixed that, our recursive method just blew out in all the efforts since then.

We suspect a major issue is how our measured sensing matrix (the cross-coupling matrix between different degrees of freedom on excitation) has significant imaginary parts in it. We discard the imaginary vaues and only use real parts for iterative method, but we think this is not the solution.

Here we present cross-spectral density of different channels representing the three sensed DOFs (normalized by ASD of no excitation data for each involved component) and the sensing matrix (TF estimate) calculated by normalizing the first cross spectral density plots column wise by the diagonal values. These are measured with existing ideal output matrix but with the new input matrix. This is to get an idea of how these elements look when we use them.

Note, that we used only 10 seconds of data in this run and used binwidth of 0.25Hz. When we used binwidth of 0.1 Hz, we found that the peaks were broad and highest at 13.1 Hz instead of 13 Hz which is the excitation frequency used in these measurements.

### How should we proceed?

• We feel that we should figure out a way to use the imaginary value of the sensing matrix, either directly or as weights representing noise in that particular data point.
• Should we increase the excitation amplitude? We are currently using 500 counts of excitation on coil output.
• Are there any other iterative methods for finding the inverse of the matrix that we should be aware of? Our current method is rudimentary and converges linearly.
• Should we use the absolute value of the sensing matrix instead? In our experience, that is equivalent to simply taking ratios of the PSD of each channel and does not work as well as the TF estimate method.
16003   Wed Apr 7 02:50:49 2021 KojiUpdateSUSFlange Inspections

Basically I went around all the chambers and all the DB25 flanges to check the invac cable configurations. Also took more time to check the coil Rs and Ls.

Exceptions are the TTs. To avoid unexpected misalignment of the TTs, I didn't try to disconnect the TT cables from the flanges.

Upon the disconnection of the SOS cables, the following steps are taken to avoid large impact to the SOSs

• The alignment biases were saved or recorded.
• Gradually moved the biases to 0
• Turned off the watchdogs (thus damping)

After the measurement, IMC was lock and aligned. The two arms were locked and aligned with ASS. And the PRM alignment (when "misalign" was disengaged) was checked with the REFL CCD.
So I believe the SOSs are functioning as before, but if you find anything, please let me know.

16004   Wed Apr 7 13:07:03 2021 JordanUpdateSUSCoM on 3"->2" Adapter Ring for SOS

Adding the chamfer around the edge of the optic ring did not change the center of mass relative to the plane from the suspension wires.

The CoM was .0003" away from the plane. Adding the chamfer moved it closer by .0001". See the attached photo.

I've also attached the list of the Moments of Inertia of the SOS Assembly.

16005   Wed Apr 7 17:38:51 2021 AnchalUpdateSUSTrying to uncouple only PIT and YAW first

To test if our method is working at all, we went for the simpler case of just uncoupling PIT and YAW. This is also because the sensor used for these two degrees of freedom is similar (the MC Trans WFS).

We saw a successful decrease in cross-coupling between PIT and YAW over the first 50 iterations that we tried. Here are some results:

### Final output matrix:

Output matrix for uncoupling PIT and YAW from eachother
PIT YAW COILS
1.01858 1.16820 UL
0.98107 -0.79706 UR
-0.98107 0.79706 LL
-1.01858 -1.16820 LR

### Plots:

• Attachment 1 shows distance of sensing matrix from identity as iterations go.
• Attachment 2 shows the off-diagonal elements of sensing matrix as the iterations increase.
• It is worth noting that PIT -> YAW coupling was the main element that was reduced successfully while the YAW -> PIT was reducing but much more slowly.
• Most of the remaining cross coupling in the end was from YAW -> PIT.
• Attachment 3 shows first 10 oscillations in the time series data during excitation of some of the iterations.
• Attachment 4 shows the cross spectral density of the sensed data during excitation with each other. This has been normalized by reference PSD data (taken with no excitation) of the sensed DOFs involved in the CSD calculation.
• Attachment 5 shows the TF estimate made by normalizing CSD data column wise by the diagonal elements. The excitation frequency point in these plots become the Sensing matrix in the calculation.
• One can notice how the PIT -> YAW element is going down in these plots.
• Even though we are using only the real value of the sensing matrix, the imaginary values are also going down.

### Next, tried uncoupling POS and PIT:

• Next, we tried to uncouple POS and PIT. We expect them to be more coupled than with YAW.
• At the time of writing this post, 15 iterations of this attempt have been completed and it is not looking good .
• The distance of the sensing matrix from identity is growing at an accelerated rate.
• The POS output matrix column seems to be trying to go towards the negative of PIT output matrix column! Why? We don't know.
• We have seen in the past that once POS transforms into PIT or YAW, it just makes the output matrix worse as no feedback actually goes into the POS column. Eventually, the IMC will cease to remain locked.
• So, I'm cancelling this attempt for now. Will consider more alternatives later.
16007   Thu Apr 8 17:04:43 2021 Anchal, PacoUpdateSUSFirst Successful Coil Balancing

Today, we finally crossed the last hurdle and got a successful converging coil balancing run.

### What was the issue with POS?

• Position of the MC2 mirror is being sensed using C1:IOO-MC_F_DQ channel which is proportional to the resonant frequency of the locked IMC.
• However, this sensor is always 180 degrees out of phase of our actuator, the coils.
• When the coils push the mirror forward, the length of the cavity actually decreases.
• We added an extra option of providing a sign to the sensors such that -1 will be multiplied to sensed values for sensors which measure in opposite direction to the actuation.
• This is important, because the feedback is applied to the coil output matrix assuming a particular direction of acctuation.
• When we gave negative sign for the position sensor, it all started making sense and the algorithm started converging.

### First run parameters:

• We used binwidth of 0.25 Hz and duration of excitation as 41s. This would give welch and csd averaging of 19. We used median averaging to ignore outliers.
• This iteration was run after PIT and YAW were separetly uncoupled before. We'll post a clean start to end run results in near future.
• The iteration works in following manner:
• Define a constant coil matrix C = [[1, 1, 1], [1, 1, -1], [1, -1, 1], [1, -1, -1]] which is ideal coil output matrix.
• In each iteration, the output matrix Ok is defined as (note @ is the matmul operator):
Ok = C @ Ak
where Ak is a 3x3 matrix. A-1 is identity matrix.
• At the end of each iteration, a sensing matrix is calculated in dimensions sensedDOF x excitedDOF, Sk
• For next iteration, Ak+1 is calcualted by:
Ak+1 = Ak - b * (Sk - I)
where I is the identity matrix.
• At convergence, the sensing matrix would become same as identity and matrix A will stop updating.
• For this run, we kept the parameter b to be 0.05. This is similar to the KP parameter in PID loops. It should be between 0 and 1.
• Since b value was small enough to allow for convergence from the inital point, but later it slowed down the process a lot.
• Ideally, we should figure out a way to increase this paramter when the coil has been balanced somewhat, to increase the speed of the algorithm.
• Secondly, we have a code which excites all DOFs at different frequencies directly using excitation channels in coil output matrix using awg.py. But for some reason, the excitation channel for 4th row in the output matrix column only connects intermittantly. Because of this, we can't use this method reliably yet. We can investigate more into it if suggested.

### Balancing characteristics:

• Attachment 1 shows how the distance of sensing matrix falls as iterations increase. We only ran for 50 iterations.
• Attachment 2 shows how different off-diagonal terms of sensing matrix decreased.
• Note that POS -> PIT, POS -> YAW and PIT-YAW have settled down to the noise floor.
• The noise floor can be improved by increasing the excitation amplitude and/or increasing the duration of measurement.
• Attachment 3 shows the evolution of sensing matrix as iterations move.

### Final balanced output matrix:

Final balanced output coil matrix for MC2
POS PIT YAW COILS
1.02956 1.13053 1.19116 UL
1.01210 1.09188 -0.74832 UR
0.98737 -0.85502 0.70485 LR
0.96991 -0.89366 -1.23463 LR
Final Sensing Matrix
Exc POS Exc PIT Exc YAW
Sens POS 1 -2.96e-2 8.00e-3
Sens PIT 8.58e-4 1 -4.84e-3
Sens YAW 5.97e-4 -1.15e-3 1

### Code features and next:

• Majority of the code is in two files: scripts/SUS/OutMatCalc/MC2crossCoupleTest.py and scripts/SUS/OutMatCalc/crossCoupleTest.py .
• The code runs from start to end without human involevement and restores the state of channels in any case (error, kyboard interrupt, end of code) using finally statement.
• Currently, each excitation is done one at a time through LockIn1. As mentioned above, this can be sped up 3 times if we get the awg.py to work reliably.
• The complete code is in python3 and currently is run through native python3 on allegra (a new debian10 workstation with latest cds-workstation installed).
• The code can be easily generalized for balancing any optic. Please let us know if we should work on making the generalized optic.
• We're also working on thinking about increasing b as iterations move forward and the error signal becomes smaller.
• We can also include the uncertainty in the Sensing matrix measurement to provide a weighted feedback. That way, we can probably increase b more.
16009   Fri Apr 9 13:13:00 2021 Anchal, PacoUpdateSUSFaster coil balancing

We ran again this method but with the 'b' parameter as a matrix instead. This provides more gain on some off-diagonal terms than others. This gave us a better convergence with the code reaching to the tolerance level provided (0.01 distance of S matrix from identity) within 16 iterations (~17 mins).

Attachment 1 again shows how the off-diagonal terms go down and how the overall distance of sensing matrix from identity goes down. This is 'Cross coupling budget' of the coils as iterations move forward.

### Jumping to near zero-crossing:

• Rana mentioned a ezlockin code which first makes 5 step changes in output matrix without using feedback and calculates the changes required to reach zero-crossing in the behavior of the off-diagonal terms during these steps.
• This is similar to what we did above by hand where we increased the value of b for slowly converging off-diagonal elements.
• We plan to implement this 'jump' to near zero-crossing method next. Aim is to get a coil balancing code that does the job in ~5 min.
• We have been throwing away imaginary part of sensing matrix so far. We wanted to get to some owrking solution before we try more complex stuff. We have to figure out global phases in each transfer function estimate to rotate the measured transfer function appropriately.
16010   Fri Apr 9 17:41:12 2021 ranaUpdateSUSFaster coil balancing

convergence is great.

Next we wanna get the F2A filters made since most of the IMC control happens at f < 3 Hz. Once you have the SUS state space model, you should be able to see how this can be done using only the free'swinging eigenfrequencies. Then you should get the closed loop model including the F2A filters and the damping filters to see what the closed loop behavior is like.

16014   Sat Apr 10 10:07:47 2021 ranaUpdateSUSFaster coil balancing

I think I mis-spoke about the balancing channels before. The ~20 Hz balancing could go into either the COIL banks or the SUS output matrix.

I believe its more conceptually clean to do this as gains in the outputmatrix, and leave the coil gains as +/- 1. i.e. we would only use the coil gains to compensate for coil/magnet actuation strength.

Then the high frequency balance goes into the outputmatrix. The F2A and A2L decoupling filters would then be generated having a high frequency gain = 1.

16017   Mon Apr 12 10:07:35 2021 AnchalUpdateSUSWhat's F2A??

I'm not sure I understand what F2A is? I couldn't find a description of this filter anywhere and don't remember if you have already explained it. Can you describe what is needed to be done again, please? We would keep SUS state space model and seismic transfer functions calculation ready meanwhile.

 Quote: Next we wanna get the F2A filters made since most of the IMC control happens at f < 3 Hz. Once you have the SUS state space model, you should be able to see how this can be done using only the free'swinging eigenfrequencies. Then you should get the closed loop model including the F2A filters and the damping filters to see what the closed loop behavior is like.

16020   Tue Apr 13 09:51:22 2021 ranaUpdateSUSWhat's F2A??

Force to Angle. It just means the filters that are in the POS OUTPUT matrix. I think in the past sometimes they are called F2P or F2A.

These filters account for the frequency dependent coupling of the DOFs around the suspension resonance. Take a look at what Bhavini is doing for the plots.

16031   Wed Apr 14 17:53:38 2021 AnchalUpdateSUSPlan for calculating filter banks for output matrix aka F2A aka F2P

### Plan of action

• Get the transfer functions of the suspension plant from actuated DOF to sensed DOF. We'll verify Bhavini's state-space model and get these transfer functions. Use the model TFs, not measured.
• For each of POS->POS, PIT->PIT, and YAW->YAW, we'll get the resonant frequency and Q of the resonance from these models. No, forget about the Q.
• We can correct the resonant frequencies from the measured ones in our free swinging data.
• Now, we'll repeat the following for each column of output matrix filters (inspired from scripts/SUS/F2Pcalc.py, but not fully understood how/why):
• Select col (eg. POS)
• Set f0 to the resonant frequency.
• Calculate $\large f_{UL} = f_0 * \sqrt{G_{UL}}$ where GUL is the corrected DC gain we got after output matrix optimization earlier. (Not sure how, why?). No, use the SS model.
• Calculate fUR, fLL, and fLR like above.
• Set $\large Q_{UL} = \sqrt{G_{UL}}$   (This just seems like a way of keeping some approximately low Q, ideally we should keep this same to what we got above but that might cause saturation issues like Rana mentioned in the meeting)
• Then, set the following filter in the output matrix element for UL:
$\dpi{200} G_{UL}\frac{1 + i\frac{f}{f_{UL}Q_{UL}} - \frac{f^2}{f_{UL}^2}}{1 + i\frac{f}{f_{0}} - \frac{f^2}{f_{0}^2}}$
which is in zpk form equivalent to:
$\dpi{150} z: \frac{f_0}{2 Q_{UL}} +/- i f_0 \sqrt{1 - \frac{1}{4Q_{UL}}} \quad, \quad p: \frac{f_0}{2} +/- i f_0 \frac{\sqrt{3}}{2} \quad, \quad k: G_{UL}$
• Repeat the above for UR, LL, LR.
• Note that this filter function takes values GUL at DC and at high frequencies while it would dip at the resonant frequency for POS with depth and narrowness directly proportional to QUL. No, the DC gain is different from the AC gain.
• However, the F2P filter plots we found in several places on elog look a bit different. Like here: 40m/4719. One important difference is that the filter magnitude always become 1 after the resonance at higher frequencies. Yes, this is  what we want, since you already did the balancing at high frequencies.
• A preliminary plot of the above calculation for the 1,1 output matrix filter bank (POS -> UL) is attached in Attachment 1.

### Discussion:

• We can make 12 such filters for the 12 numbers we got for the optimized output matrix. Is that the aim or should we do it only for the POS column as has been done in past?
• We are not sure how the choice of Q is made in setting the above filter function. We'll think more about it to understand this.
• We are also not sure how the choice of fUL is made above. It looks like depending on the correction gain, we want to slide the zero positions with respect to the pole positions which are fixed at the resonant frequency as expected. This seems to have some complex explanation.
• Please let us know if we are planning this right before we dive into these calculations/script writing. Thanks.

Edit Thu Apr 15 08:32:58 2021 :

Corrected the plot in the attachment. It shows the correct behavior at high frequencies now.

16035   Thu Apr 15 11:41:43 2021 AnchalUpdateSUSProposed filters for output matrix aka F2A aka F2P

Here' s aquick update before we leave for lunch. We have managed to calculate some filter that would go on the POS column in MC2 output matrix filter banks aka F2A aka F2P filters. In the afternoon if we can come and work on the IMC, we'll try to load them on the output matrix. We have never done that so it might take some time for us to understand on how to do that. Attached is the bode plot for these proposed filters. Let us know if you have any comments.

16042   Fri Apr 16 11:36:36 2021 Anchal, PacoUpdateSUSTested proposed filters for POS colum in MC2 output matrix

We tried two sets of filters on the output matrix POS column in MC2. Both versions failed. Following are some details.

### How test was done:

• PSL shutter was closed and autolocker was switch off.
• Turned off damping on POS, PIT, and YAW using C1:SUS-MC2_SUSPOS_SW2, C1:SUS-MC2_SUSPIT_SW2, and C1:SUS-MC2_SUSYAW_SW2.
• Reference data was taken with no excitation to get relative increase at excitation.
• Channels C1:SUS-MC2_SUSPIT_IN1, C1:SUS-MC2_SUSPOS_IN1, and C1:SUS-MC2_SUSYAW_IN1.
• Frist we sent an excitation through LOCKIN1 at 0.11 Hz and 500 counts amplitude.
• LOCKIN column in MC2 output matrix was kept identical to POS column, so all ones.
• This formed our reference data set when no filters were used. Attachment 1.
• Note that the peak at 0.03 Hz is due to LOCKIN2 that was left switched on due to autolocker.
• Then the calculated filters were loaded using foton. Procedure:
• Right click on filter bank med. Got to Execute-> Foton.
• Go to File and uncheck 'Read Only'.
• Find the filter module name in Module drop down.
• Select an empty module section in Sections.
• Write a name for the filter. We used DCcoupF2A and DCcouF2A2 for the two version respectively.
• Paste the zpk foton format in Command.
• Check with Bode plot if these are correct filters. Then click on Save. It will take about 30s to become responsive again.
• GO back to filter bank medm screen and click on 'Load Coefficients'. This should start displaying your new filter module.
• To switch on the module, click on the button below its name.
• Once fitlers were loaded, we realized we can not use the LOCKIn to excite anymore as it comes as separate excitation.
• So we used awggui to excite C1:SUS-MC2_LSCEXC at 0.11 Hz and 500 counts.
• Then we retook the data and checked if the peaks are visible on PIT and YAW channels and how high they are.

### Filer version 1

• This was calculated by starting from ideal output matrix elements as they are currently loaded. All 1's for POS and so on.
• The calculations were done in scripts/SUS/OutMatCalc/coilBalanceDC.py.
• This file uses a state space model of the suspension and calculated the cross-coupling. Then the cross coupling is inverted and applied to the current output matrix elements to get correction DC gains.
• These corrected DC gains are then used to create the filters as described in last post.
• Attachment 2 shows the filter transfer functions and Attachment 3 shows the test results. Failed :(.
• There was practivally no change in cross coupling that we can see.

### Filter version 2:

• In this version we used the output matrix optimized at high frequencies earlier (16009).
• While testing this version, we also uploaded this optimised output amtrix at high frequency.
• In this test, we realized the LOCKIN2 was on and switched it off manually. All excitations were done through awggui.
• Attachment 4 shows the filter transfer functions and Attachment 5 shows the test results. Failed :(.
• There was again practivally no change in cross coupling that we can see.

## Forgot to upload new MC2 input matrix:

• In hindsight, we should have uploaded our diagonalized suspension input matrix in MC2.
• Without it, there was cross-coupling the in the sensor data to begin with.
• But this can only be part of the reason why all our filters failed miserably.
• Because the output matrix was not diagonalized earlier but it was not so bad. Onyl a fresh test can tell if it was the culprit.
16043   Fri Apr 16 15:47:58 2021 ranaUpdateSUSTested proposed filters for POS colum in MC2 output matrix

Looks mostly right, but you used the OSEM sensors as readbacks. We are diagonalizing using the cavity sensors. Using the diagonalized input matrix is also good since that will reduce the cross-coupling due to the damping loops.

Its sort of a subtle issue:

1. The sensors are are diagonalized into the eigenmode basis, not the Cartesian basis of the mirror motion.
2. What the cavity cares about is the Cartesian motion.
3. Q1: in the model, how much Cartesian pitch motion is there at the POS eigenfrequency in the free-swinging case?
4. Q2: should we somehow diag the input matrix into the Cartesian basis?
5. Q3: if so, How?
6. Q4: and why?
16049   Mon Apr 19 12:18:19 2021 Anchal, PacoUpdateSUSTested proposed filters for POS colum in MC2 output matrix

The filters were somewhat successful, how much we can see in attachment 1. The tip about difference between eigenmode basis and cartesian basis was the main thing that helped us take data properly. We still used OSEM data but rotated the output from POS, PIT, YAW to x, theta, phi (cartesian basis where x is also measured as angle projected by suspension length).

### Eigenmode basis and Cartesian basis:

• It is important to understand the difference between these two and what channels/sensors read what.
• Eigenmode basis as the name suggests is the natural basis for the suspended pendulum.
• It signifies the motion along three independent and orthogonal modes of motion: POS (longitudinal pendulum oscillation), PIT, and YAW.
• The position of optic can be written in eigenmode basis as three numbers:
• POS: Angle made by the center of mass of optic with verticle line from suspension point.
• PIT: Angle made by the optic face with the suspension wires (this is important to note).
• YAW: Angle made by optic surface with the nominal plane of suspension wires. (the yaw angle basically).
• Cartesian basis is the lab reference frame.
• Here we define three variables that can also represent an optic positioned and orientation:
• x: Angle made by the center of mass of optic with verticle line from suspension point. (Same as POS)
• $\large \theta$: Angle made by the optic surface with absolute verticle (z-axis) in lab frame.
• $\large \phi$: Twist of the optic around the z-axis. Same as YAW angle above.
• We want to apply the feedback gains and filters in eigenmode basis because they are a set of known independent modes. (RXA: NOOO!!!!!! read me elog entry on this topic)
• Hence, the output from input matrix of suspensions comes out at POS, PIT and YAW in the eigenmode basis.
• However, the sensors of optic positional, and orientation such at MC_F, wave front sensors and optical levers measure it in lab frame and thus in cartesian basis.
• Essentially, the $\large \theta$ measured by these sensors is different from the PIT calculated using the OSEM sensor data and is related by:
• $\large \theta = PIT - POS$, where PIT and POS both are in radians as defined above.
• When we optimized the cross-coupling in output matrix at high frequencies using the MC_F and WFS data, we actually optimized it In cartesian basis.
• The three feedback filters from POS, PIT and YAW which carry data in the eigenmode basis need to be rotated into the cartesian basis in the output matrix before application to the coils.
• The so-called F2A and A2L filters are essentially doing this rotation.
• Above the resonant frequencies, the PIT and $\large \theta$ become identical. Hence we want our filters to go to unity

### The two filter sets:

• The filters are named Eg2Ctv1 and Eg2Ctv2 on the POS column of MC2 output matrix.
• This is to signify that these filters convert the POS, PIT, and YAW basis data (eigenmode basis data) into the cartesian basis (x, theta, phi) in which the output matrix is already optimized at higher frequencies.
• v1 filter used an ideal output matrix during the calculation of filter as described in 16042 (script at scripts/SUS/OutMatCalc/coilBalanceDC.py).
• Attachment 2 shows these filter transfer functions.
• v2 filter use the output matrix optimized to reduce cross-coupling amount cartesian basis modes (MC_F, WFS_PIT and WFS_YAW) in 16009.
• Attachment 3 shows these filter transfer funcitons.
• Because of this, the v2 filter is different among right and left coils as well. We do see in Attachment 1 that this version of filter helps in reducing POS->YAW coupling too.

### Test procedure:

• We uploaded both the diagonalized input matrix and the diagonalized output matrix as calculated earlier.
• We measured channels C1:SUS-MC2_SUSPOS_IN1_DQ, C1:SUS-MC2_SUSPIT_IN1_DQ, and C1:SUS-MC2_SUSYAW_IN1_DQ throughout this test.
• These channels give output in an eigenmode basis (POS, PIT, and YAW) and the rows of the input matrix have some arbitrary normalization.
• We normalize these channels to have same input matrix normalization as would be for ideal matrix (2 in each row).
• Then, assuming the UL_SENS, UR_SENS, LR_SENS, and LL_SENS channels that come at input of the input matrix are calibrated in units of um, we calculate the cartesian angles x, theta, phi. for this calculation, we used the distance between coils as 49.4 mm (got it from Koji) and length of suspension as 0.2489 m and offset of suspension points from COM, b = 0.9 mm.
• Now that we have true measures of angles in cartesian basis, we can use them to understand the effect on cross coupling from the filters we used.
• PSL shutter is closed and autolocker is disabled. During all data measurements, we switched of suspension damping loops. This would ensure that our low frequency excitation survives for measurement at the measurement channels.
• We first took reference data with no excitation and no filters for getting a baseline on each channel (dotted curves in Attachment 1).
• We then send excitation of 0.03 Hz with 500 counts amplitude at C1:SUS-MC2_LSC_EXC and switched on LSC output.
• One set of data is taken with no filters active (dashed curve in attachment 1).
• Then two sets of data are taken with the two filters. Each data set was of 500s in length.
• Welch function is used to take the PSD of data with bin widht of  0.01Hz and 9 averages.

### Results:

• Filter v1 was the most successful in reducing $\large x \rightarrow \theta$ coupling by factor of 17.5.
• The reduction in $\large x \rightarrow \phi$ coupling was less. By a factor of 1.4.
• Filter v2 was worse but still did a reduction of $\large x \rightarrow \theta$ coupling by factor of 7.8.
• The reduction in $\large x \rightarrow \phi$ coupling was better. By a factor of 3.3.

### Next, filters in PIT columns too

• We do have filters calculated for PIT as well.
• Now that we know how to test these properly, we can test them tomorrow fairly quickly.
• For the YAW column though, the filters would probably just undo the output matrix optimization as they are derived from ideal transfer function models and ideally there is no coupling between YAW and other DOFs. So maybe, we should skip putting these on.
16054   Tue Apr 20 10:52:49 2021 Anchal, PacoUpdateSUSAC gain coil output balancing for IMC

[Paco, Anchal]

• We adopted the following procedure to balance the coil output gains using a high-frequency (> 10 Hz) excitation on "C1:SUS-MCX_ASCPIT_EXC", "C1:SUS-MCX_ASCYAW_EXC", and "C1:SUS-MCX_LSC_EXC", where X is one of {1, 2, 3} for the three IMC optics, and the cavity sensors (MC_F, and MC_TRANS);
1. We load the new input matrix found on March-23rd.
2. Using awggui, we launch a single 23.17 Hz sine with 500 - 1000 counts amplitude on the aforementioned channels.
• We are still unable to launch multiple excitations simultaneously through either API (python-awg or dtt-awggui)
3. Using our built-in hominid neural networks, we look at the "C1:IOO-MC_F", "C1:IOO-MC_TRANS_PIT_IN", and "C1:IOO-MC_TRANS_YAW_IN" exponentially averaging power spectra, on and about the excitation frequency, and identify the amount of cross-coupling going into angular or longitudinal motion depending on the excited degree of freedom.
4. We step the "C1:SUS-MCX_URCOIL_GAIN", "C1:SUS-MCX_ULCOIL_GAIN", "C1:SUS-MCX_LRCOIL_GAIN", "C1:SUS-MCX_LLCOIL_GAIN" coil output gains by hand in the presence of an excitation (e.g. "LSC") along a given degree of freedom (e.g. along "PIT") to try and minimize the coupling.
5. We iterate step (4) until we find an optimum gain set, and move on to another optic.

## Results

• For MC2 the optimal gains changed from: [1.0, -1.0, 1.0, -1.0] → [1.05, -1.05, 0.995, -1.03] **
• Here we were able to first decouple PIT and YAW from a POS excitation almost entirely (see Attachment #1), but weren't as successful in decoupling YAW and POS from PIT, or PIT and POS from YAW excitations (Attachment #2).
• For MC1 the optimal gains changed from: [1.0, 1.0, 1.0, 1.0] → [0.282, 0.035, 0.302, 2.46] **
• Here we mostly succeeded in decoupling POS from YAW and PIT excitations (see Attachments #3 - 4).
• For MC3 the optimal gains changed from: [1.0, -1.0, 1.0, -1.0] → [0.126, -0.123, 0.298, -0.306] **
• Here the LSC_EXC didn't show up on MC_F (??), and the PIT/YAW excitations decouple by virtue of seemingly low gains, so maybe the optimum is an artifact of the lower coil gains...
• Plots are to follow up for this one.

** The notation here is [UL, UR, LR, LL]

16055   Tue Apr 20 18:19:30 2021 AnchalUpdateSUSMC2 coil balanced at DC

Following up from morning's work, I balanced the coils at DC as well. Attachment 1 is screenshot of striptool in which blue and red traces show ASCYAW and ASCPIT outputs when C1:SUS-MC2_LSC_OFFSET was switched by 500 counts. We see very slight disturbance but no real DC offset shown on PIT and YAW due to position step. This data was taken while nominal F2A filter calculated to balance coils at DC was uploaded

I have uploaded the filters on filter banks 7-10 where FM7 is the nominal filter with Q close to 1 and 8-10 are filters with Q 3, 7 and 10 respectively. The transfer function of these filters can be seen in Attachment 2. Note, that the high frequency gain drops a lot when higher Q filters are used.

These filters are designed such that the total DC gain after the application of coil outputs gains for high frequency balancing (as done in morning 16054) balances the coils at DC.

Since I had access to the complete output matrix that balances the coils to less than 1% cross coupling at high frequencies from 16009, I also did a quick test of DC coil balancing with this kind of high frequency balancing. In this case, I uploaded another set of filters which were made at Q close to 1 and gain such that effective DC gain matrix becomes what I got by balancing in the above case. This set of filter also worked as good as the above filters. This completes the proof that we can also use complete matrix for high frequency coil balancing which can be calculated by a script in 20min and works with DC coil balancing as well. In my opinion, this method is more clear and much faster than toggling values in coil output gains where we have only 4 values to optimize 6 cross-coupling parameters. But don't worry, I'm not wasting time on this and will abandon this effort for now, to be taken up in future.

### Next up:

• Tomorrow, we'll finish DC balancing for MC1 and MC3 with the method I practiced today. This should not take much time and should be completed before the meeting.
• I'll also, calculate and upload the F2A filters for MC1 and MC3.
• Next, we'll optimize gains in the suspension damping loops by doing step response test (with TRAMP = 0s). We'll look for decaying response (at MC_F, and WFS sensors) with a few oscillations for each step in POS, PIT, and YAW.

### Edit Tue Apr 20 21:25:46 2021 :

Corrected the calculation of filters in case of Q different than $\large \sqrt{G_{DC}}$. There was a bug in the code which I overlooked. I'll correct the filter bank modules tomorrow.

Edit Wed Apr 21 11:06:42 2021 :

I have uploaded the corrected foton filters. Please see attachment 3 for the transfer functions calculated by foton. They match the filters we intended to upload. Only after uploading and closing the foton filter, I realized that the X=7 filter plot (bottom left in attachment 3) does not have dB units on y-axis. It is plotted in linear y-scale (this plot in foton is for phase by default to I guess I forgot to change the scaling when repurposing it for my plot).

16063   Wed Apr 21 11:38:27 2021 Anchal, PacoUpdateSUSMC2 Damping Gains Optimized

We did a step response test with MC2 Suspensoin Damping Gains and optimized them to get <5 oscillations in ringdown.

### Procedure:

• We uploaded the diagonalized input matrix.
• We uploaded the coil balancing gains at high frequencies found in 16054.
• We applied Eg2CtQ1 filter module for DC gain balancing foun inf 16055.
• We set TRAMP to 0 in C1:SUS-MC2_SUSPOS_TRAMP, C1:SUS-MC2_SUSPIT_TRAMP, and C1:SUS-MC2_SUSYAW_TRAMP.
• We played with offsets to get a good step height. Finally we used:
• C1:SUS-MC2_SUSPOS_OFFSET: 3000
• C1:SUS-MC2_SUSPIT_OFFSET: 100
• C1:SUS-MC2_SUSYAW_OFFSET: 100
• We looked at channels C1:SUS-MC2_SUSPOS_INMON, C1:SUS-MC2_SUSPIT_INMON, and C1:SUS-MC2_SUSYAW_INMON on a striptool screen to see the step response of the switching on/off of the offsets.
• We tried to decrease/increase gain to get <5 oscillations during ringdown due to the step inputs.
• Restored everything back to old values at the end.

### Results:

• Gain in POS was found to be already good. In PIT and YAW we changed the gains from 10 -> 30.
• Attachment 1 shows the striptool screen when offset was switched ON/Off in POS, PIT and YAW respectively after appling the optimized gains.
• Attachment 2 shows the same test with old gains for comparison.

In the afternoon, we'll complete doing the above steps for MC1 and MC3. Their coil balancing has not been done on DC so, it is bit non-ideal right now. We'll look into scripting this process as well.

16066   Wed Apr 21 15:50:01 2021 Anchal, PacoUpdateSUSMC2 Suspension Optimization summary
MC2 Coil Balancing DC and AC Gains
POS PIT YAW COIL_GAIN (AC balancing)

UL

1.038 1 1 1.05
UR 1.009 1 -1 -1.05
LL 0.913 -1 1 -1.030
LR 0.915 -1 -1 0.995

MC2 Diagonalized input matrix
UL UR LR LL SIDE
POS 0.2464 0.2591 0.2676 0.2548 -0.1312
PIT 1.7342 0.7594 -2.494 -1.5192 -0.0905
YAW 1.2672 -2.0309 -0.9625 2.3356 -0.2926
SIDE 0.1243 -0.1512 -0.1691 0.1064 0.9962

MC2 Suspension Gains
Old gain New Gain
SUSPOS 150 150
SUSPIT 10 30
SUSYAW 10 30

16067   Wed Apr 21 18:49:29 2021 ranaUpdateSUSMC2 Suspension Optimization summary

the POS column should be all 1 for the AC balancing. Where did those non-1 numbers come from?

16071   Thu Apr 22 08:50:21 2021 AnchalUpdateSUSMC2 Suspension Optimization summary

Yes, during the AC balancing, POS column was set to all 1. This table shows the final values after all the steps. The first 3 columns are DC balancing results when output matrix was changed. While the last column is for AC balancing. During AC balancing, the output matrix was kept to ideal position as you suggested.

 Quote: the POS column should be all 1 for the AC balancing. Where did those non-1 numbers come from?

16072   Thu Apr 22 12:17:23 2021 Anchal, PacoUpdateSUSMC1 and MC3 Suspension Optimization Summary
MC1 Coil Balancing DC and AC Gains
POS (DC coil Gain) PIT (DC coil Gain) YAW (DC coil Gain) Coil Output Gains (AC)
UL 0.6613 1 1 0.5885
UR 0.7557 1 -1 0.1636
LL 1.3354 -1 1 1.8348
LR 1.0992 -1 -1 0.5101

Note: The AC gains were measured by keeping output matrix to ideal values of 1s. When optimizing DC gains, the AC gains were uploaded in coil ouput gains.

MC1 Diagonalized input matrix
UL UR LR LL SIDE
POS 0.1700 0.1125 0.0725 0.1300 0.4416
PIT 0.1229 0.1671 -0.1021 -0.1463 0.1567
YAW 0.2438 -0.1671 -0.2543 0.1566 -0.0216
SIDE 0.0023 0.0010 0.0002 0.0015 0.0360

MC1 Suspension Damping Gains
Old gains New Gains
SUSPOS 120 270
SUSPIT 60 180
SUSYAW 60 180

MC3 Coil Balancing DC and AC Gains
POS (DC coil Gain) PIT (DC coil Gain) YAW (DC coil Gain) Coil Output Gains (AC)
UL 1.1034 1 1 0.8554
UR 1.1034 1 -1 -0.9994
LL 0.8845 -1 1 -0.9809
LR 0.8845 -1 -1 1.1434

Note: The AC gains were measured by keeping output matrix to ideal values of 1s. When optimizing DC gains, the AC gains were uploaded in coil ouput gains.

MC3 Input matrix (Unchanged from previous values)
UL UR LR LL SIDE
POS 0.28799 0.28374 0.21201 0.21626 -0.40599
PIT 2.65780 0.04096 -3.2910 -0.67420 -0.72122
YAW 0.60461 -2.7138 0.01363 3.33200 0.66647
SIDE 0.16601 0.19725 0.10520 0.07397 1.00000

MC3 Suspension Damping Gains
Old gains New Gains
SUSPOS 200 500
SUSPIT 12 35
SUSYAW 8 12
16073   Thu Apr 22 14:22:39 2021 gautamUpdateSUSSettings restored

The MC / WFS stability seemed off to me. Trending some channels at random, I saw that the MC3 PIT/YAW gains were restored mixed up (PIT was restored to YAW and vice versa) in the last day sometime - I wasn't sure what other settings are off so I did a global burtrestore from the last time I had the interferometer locked since those were settings that at least allow locking (I am not claiming they are optimal).

How are these settings being restored after the suspension optimization? If the burtrestore is randomly mixing up channels, seems like something we should be worried about and look into. I guess it'd also be helpful to make sure we are recording snapshots of all the channels we are changing - I'm not sure if the .req file gets updated automatically / if it really records every EPICS record. It'd be painful to lose some setting because it isn't recorded.

Unconnected to this work - the lights in the BS/PRM chamber were ON, so I turned them OFF. Also unconnected to this work, the summary pages job that updates the "live" plots every half hour seem to be dead again. There is a separate job whose real purpose is to wait for the data from EOD to be transferred to LDAS before filling in the last couple of hours of timeseries data, but seems to me like that is what is covering the entire day now.

16078   Thu Apr 22 15:36:54 2021 AnchalUpdateSUSSettings restored

The mix up was my fault I think. I restored the channels manually instead of using burt restore. Your message suggests that we can set burt to start noticing channel changes at home point and create a .req file that can be used to restore later. We'll try to learn how to do that. Right now, we only know how to burt restore using the existing snapshots from the autoburt directory, but they touch more things than we work on, I think. Or can we just always burt restore it to morning time? If yes, what snapshot files should we use?

16079   Thu Apr 22 17:04:17 2021 gautamUpdateSUSSettings restored

Indeed, you can make your own snapshot by specifying the channels to snap in a .req file. But what I meant was, we should confirm that all the channels that we modify are already in the existing snapshot files in the autoburt dir. If it isn't, we should consider adding it. I think the whole burt system needs some cleaning up - a single day of burt snapshots occupies ~400MB (!) of disk space, but I think we're recording a ton of channels which don't exist anymore. One day...

 Quote: Your message suggests that we can set burt to start noticing channel changes at home point and create a .req file that can be used to restore later. We'll try to learn how to do that. Right now, we only know how to burt restore using the existing snapshots from the autoburt directory, but they touch more things than we work on, I think. Or can we just always burt restore it to morning time? If yes, what snapshot files should we use?
16086   Mon Apr 26 18:55:39 2021 Anchal, PacoUpdateSUSMC2 F2A Filters Tested

Today we tested the F2A filters created from the DC gain values listed in 16066.

### Filters:

• For a DC gain $G_{DC}$ required for balancing the coil at DC and $f_0$ being the resonance frequency of the mode (POS in this case), we calculate the filter using:
$\frac{1 + i \frac{f_z}{f Q} - \frac{f_z^2}{f^2}}{1 + \frac{f_0}{f} - \frac{f_0^2}{f^2}}$where $f_z = f_0 \sqrt{G_{DC}}$.
• Attachment 1 shows the motivation for choosing the resonant frequency in the formula above. It makes gain at DC as $G_{DC}$ while keeping AC gain as 1.
• Attachment 2 shows the transfer functions of the filters uploaded.
• Filters are named Eg2CtQ3, Eg2CtQ7 and Eg2CtQ10 for Q=3,7,10 filters respectively. (Named for Eigenmode Basis to Cartesian Basis conversion filters, aka F2A filters).

### Testing procedure:

• We uploaded the new input matrix listed in 16066.
• We then uploaded the coil output gains (AC gains) that are also listed in 16066.
• Then we reduced the C1:IOO-WFS_GAIN to 0.05 (by a factor of 20).
• Rana asked us to test the WFS sensors' impulse response to observe a minimum 10s decay to ensure that the UGF of WFS control loops is at or below 0.1 Hz.
• We were unable to have any effect on this decay actually. We tried setting offsets without tramps in multiple places but whenever we were able to excite this loop, it will always damp down in about 5-6s regardless of the value of C1:IOO-WFS_GAIN.
• So we moved on.
• Then, with MC locked we took reference data with no excitation or filters uploaded. (dotted curves)
• We took cross spectral density from C1:IOO-MC_F to C1:IOO-MC_TRANS_PIT_IN1, C1:IOO-MC_TRANS_YAW_IN1, C1:IOO-WFS1_PIT_IN1, C1:IOO-WFS1_PIT_IN1, C1:IOO-WFS2_PIT_IN1, and C1:IOO-WFS2_PIT_IN1.
• We were also looking at the power spectral density of these channels.
• Then using awggui (after the fix we did as in 16085), we added noise in C1:SUS-MC2_LSC_EXC as uniform noise between 0.05 Hz to 3.5 Hz with amplitude of 100 and gain of 100.
• We took a set of data without switching on the filters to have a comparison later. (Dash-dort curves)
• We then took data after switching on the filters. (Solid curves)

### Next:

• Tomorrow we'll repeat this for MC1 and MC3 if we get a favourable grade in our work here.
• Even if not, we'll jsut conclude the suspension optimization work tomorrow morning and get into main interferometer.
ELOG V3.1.3-