Message ID: 16007
Entry time: Thu Apr 8 17:04:43 2021
In reply to: 16005
Reply to this: 16009

Author:

Anchal, Paco

Type:

Update

Category:

SUS

Subject:

First 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 O_{k} is defined as (note @ is the matmul operator):
O_{k} = C @ A_{k}
where A_{k} 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, S_{k}

For next iteration, A_{k+1} is calcualted by:
A_{k+1} = A_{k} - b * (S_{k} - 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 K_{P} 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.