Alignment›Alignment
#29277
Automating BMS and BS alignment at step 1, part 2
We updated the optimization algorithm for the automatic alignment of BMS and BS at step 1. It no longer performs a linear scan and picks the highest value, but does something more similar to what we do by hand:
-measure initial value of signal to optimize
-move DOF by 1 step
-measure new value, if decreased reverse direction
-continue doing steps until value drops below a certain threshold. If a new maximum value is found, the threshold is updated.
-reverse direction and search for point where value drops below treshold on other side of the maximum, without updating the threshold.
-move actuator to value in between the two points where the threshold was crossed.
To avoid misaligning the ITF completely in case of troubles, the macro will move the actuator back to the initial position if a maximum number of steps is exceeded.
Attached figure shows two attempts to align BMS_tx by optimizing B7_DC/Tra_MC. In the first case, the starting position was already pretty good, so the macro immediately found a lower value and changed direction. For the second attempt, we misaligned the BMS to 0.15 (around 16:11), so the macro updates the treshold several times while it moves towards the maximum. In both cases, the same optimal position was found.
The new macros are called ALIGN_SMART_BMS/BS_tx/ty and can be launched using 'Load Macro' from the Alp_Ali menu. Relevant signals can be followed by
dataDisplay ~/swinkels/dd/align_step1.car
The macro still takes about 5 minutes to optimize one DOF, which might be reduced by lowering the wait- and ramp-times. The algorithm can be easily modified to optimize other degrees of freedom.