Locking slopes

From MCEWiki
Revision as of 23:49, 16 April 2009 by 128.189.202.245 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MCE/MAS parameters that affect locking slopes

Slope controls

The following things affect the locking slopes:

  • sq2servo_gain in experiment.cfg: determines the sign of the lock point of the SA.
  • sq1servo_gain in experiment.cfg: determines the sign of the lock point of the SQ2.
  • default_servo_i in experiment.cfg: determines the I gain of the MCE servo (rc# gaini#), and thus the sign of the lock point of the SQ1.

Plotting controls

The following things affect plotting of locking slopes in IDL, as well as the choice of initial guesses for lock-points:

  • sq2servo_slope in experiment.cfg: (+1 or -1) the sign of the SA slope to which we expect to lock.
  • sq1servo_slope in experiment.cfg: (+1 or -1) the sign of the SQ2 slope to which we expect to lock.

Consistency between locking and plotting

The above slope and plotting parameters should satisfy the following:

  • sq2servo_slope = -sign( sq2servo_gain / sq1servo_gain)
  • sq1servo_slope = -sign( sq1servo_gain / default_servo_i)

Violation of the above will likely only result in misleading plots, and not bad locking. Misleading plots can indirectly lead to a user setting up bad locking, however; so keep it clean.

The sa_points.ps plot may be misleading: the code (at time of writing) plots the positive-slope lock-points, regardless of any other parameters.

Future code will eliminate sq2servo_slope and sq1servo_slope and determine all locking slopes from the servo gains.


MCE and tuning servos

Servos

We will need to deal with three servos. One is the "MCE servo", which is the fast servoing of the TES signal via adjustment of the SQ1 feedback. The other two are the auto-tuning SQ2 and SQ1 servos, described [here | auto_setup_squids.pro].

In all cases, the servo is computed by measuring an error (y), multiplying by a gain (g), and using this to correct the output (x):

\Delta x = g \Delta y

In the case of the MCE PID loop servo, we run with an I term only so we actually calculate

 x = P * \sum dy

but differentially this is exactly \Delta x = P * \Delta y.

MCE/MAS and sneaky signs

There are no sneaky, extra signs in any of the MCE/MAS servo calculations. This means that given an error (dy) and a gain g, we calculate the change in the feedback (dx) as:

dx = g * dy

and not

dx = -g * dy   (not used)


The meaning of the plots

Definition of a lock point

Let the feedback signals on the three stages (in one channel) be x_{SA}, x_{S2}, x_{S1}, and let the error signal be y. Let s be the signal from the TES. The error signal is obviously a function of all 4 numbers:

y = f(x_{SA}, x_{S2}, x_{S1}, t)

But for small variations about one point in this space, we can expand in differentials

dy = a_1 dx_{SA} + a_2 dx_{S2} + a_3 dx_{S1} +  a_4 s

but it is convenient to reparametrize this to resemble the chain of amplifiers:

dy = m_{SA}(dx_{SA} - m_{S2}(dx_{S2} - m_{S1}(dx_{S1} - m_{TES} s)

So the 'slopes' m account for the gain between the stages.

Open loop ramps

Note that lock points are not ultimately chosen as a result of the open loop ramps. However, it is important to understand the relationship between what the open loop ramps and the settings for the auto-tuning and MCE servos.

For the "SA ramp", we hold x_{S2}, x_{S1} and s constant, and plot y vs. x_{SA}. Thus identifying a lock point permits the measurement of

dy / dx_{SA} = m_{SA}

For the "SQ1 ramp", we hold x_{SA}, x_{S2} and s constant, and plot y vs. x_{S1}. A slope measurement on this curve is a measurement of

dy / dx_{S1} = m_{SA} m{S2} m{S1}

Servos

In servos, we ramp one x while adjusting another to keep the output value to be zero.

Thus in the "SQ2 servo" step (where S2 FB is ramped and SA FB adjusted) we have:

dx_{SA} = -m_{S2} dx_{S2}

However, this can only be accomplished via measurement of the error

\Delta y = m_{SA} m_{S2} \Delta x_{S2}

so operationally we apply

\Delta x_{SA} = - \Delta y / m_{SA}

This tells us the ideal gain of the sq2 servo:

g_{S2} = -1/m_{SA}

In the "SQ1 servo" step (where S1 FB is ramped and S2 FB adjusted) we have:

dx_{S2} = -m_{S1} dx_{S1}

so we measure

\Delta y = -m_{SA} m_{S2} m_{S1} \Delta x_{S1}

and apply

\Delta x_{S2} = \Delta y / (m_{SA} m_{S2}).

so the ideal gain of the sq1 servo is

g_{S1} = 1/(m_{SA} m_{S2})

MCE servo I parameter

When the MCE servo is activated, it cancels changes in TES signal by adjusting the S1 FB:

dx_{S1} = -m_{TES} ds

i.e.

\Delta x_{S1} = -\Delta y / (m_{S1} m_{S2} m_{S3})

and ideal gain is thus

I_{servo} = -1 / (m_{S1} m_{S2} m_{S3})

Consequences for tuning parameters

We have expressed, above, the ideal gains for the servos as a function of the slopes of the ramp and servo curves from auto-tuning. Unraveling this, you learn what the signs of the various gains should be:

SA locking point

The locking slope (on the SA ramp) is determined by the gain in the SQ2 servo:

sign(m_SA) =  -sign(1/g_{S2})

SQ2 locking point

The locking slope (on the SQ2 servo curve) is determined by the ratio of the gains in the SQ1 and SQ2 servos:

sign(m_{S2}) = -sign(g_{S2}/g_{S1})

SQ1 locking point

The locking slope (on the SQ1 servo curve) is determined by the ratio of the gains in the SQ1 servo and the MCE servo I term:

sign(m_{S1}) = -sign(g_{S1}/I)

But the sign of the locking slope on the SQ1 ramp curve is simply:

sign(m_{S1} m_{S2} m_{S1}) = - sign(1/I)