Overview
- Hysteresis compensation at SFTPRO1 flat top through supercycle changes.
- Change dipole field manually to observe changes
Perhaps measure effect of “drift” of using autoregressive predictions only.
Observables
Observe from BCT & FBCT app (BCTs in CCM). Write down timestamps and device name to get from NXCALS. SPS Spill quality application shows spill duty factory and spill length (should be as large as possible)
Tasks in preparation
- Ensure sps-app-hysteresis is commissioned. [priority:: medium] [didue:: 2024-05-08] [completion:: 2024-05-08]
- Select 3 model checkpoints to use (1 TransformerV2, 2 TFT), [priority:: high] [due:: 2024-05-07] [completion:: 2024-05-08]
- Inform Arthur about precycle cycle [priority:: highest] [due:: 2024-05-08] [completion:: 2024-05-08]
- No beam in pre-cycle cycle request. All good.
Checkpoints
TFT 1: ml3:~/hysteresis-experiments/bc_2024_tft/checkpoints/best-v6.ckpt probably trained on the validation set. but whatever.
TFT 2:
ml3:~/hysteresis-experiments/bc_2024_tft/logs_good/best-v7.ckptTransformerV2:
ml1:~/hysteresis-experiments/bc_2024_transformerv2_full2/logs/best-v13.ckptTransformerV2: ml1:~/hysteresis-experiments/bc_2024_transformerv2_full2/logs/best-v16.ckpt
The TransformerV2 checkpoints were rejected at runtime as the discontinuities between prediction horizons were too large. The TFT1 checkpoint performed better than TFT2 and was used, and copied over from ml3 to ml1.
MD Prerequisities
- Reduce intensity to . [completion:: 2024-05-08]
- Set up supercycles (PHYS and PHYS+LHCFILL) [completion:: 2024-05-08]
Log
Setup
Operational SFTPRO1 was used, with a tag created for me before the start of the MD.
Cycle mapping
- SFTPRO1: SFT_PRO_MTE_L4760_2024_v1
- LHC25NS:
- MD1:
- ZERO:
- LHCPILOT:
BCDs
- SFT+LHC
- SFTPRO1 - ZERO - LHC25NS - MD1
- SFT
- SFTPRO1 - MD1 - SFTPRO1 - MD1 - SFTPRO1 - MD1
- PRECYCLE
- LHCPILOT - LHCPILOT - LHCPILOT
Beam
Reduced intensity to from ; only 1 injection of the MTE core to SPS to not irradiate the TED. OK with Verena.
Slightly adjusted QH tune +3e-3 to improve spill. The “baseline” spill quality is ~ 78% duty factor over 3770 ms.

Experiments
Perturbation of magnetic fields
The spill of the SFTPRO1 beam was optimised as best as possible, and then the main magnetic fields were perturbed by a small number to observe change on spill quality; spill length and duty factor. Each perturbation was measured across 10 cycles to get a statistical basis.
The supercycle used was the SFT+LHC to share time with the other LiU MD.
| Experiment | Effective spill length | Spill duty factor |
|---|---|---|
| Baseline | 3768 ms | 78.8% |
Main dipoles
Perturb flat top dipole fields by T on SPSBEAM/BHYS@correction. Some measurements had no beam and were repeated. The experiment can be found in ~/cernbox/hysteresis/dipole/notebooks/MD20240508/MD_field_petrurb.ipynb
Before: unchanged settings
1e-4 T: 2024-05-08 10:41:04 - 2024-05-08 10:44:00
2e-4 T: 2024-05-08 10:44:00 - 2024-05-08 10:47:00
beam loss, cycle switched to dynamic economy
2e-4 T: 2024-05-08 10:49:50 - 2024-05-08 10:55:20
4e-4 T: 2024-05-08 10:55:20 - 22
Main quadrupoles
Tune scan on SPSBEAM/QH.
The experiment can be found in~/cernbox/hysteresis/dipole/notebooks/MD20240508/MD_tune_petrurb.ipynb
+2e-3 QH tune changes QD 0.01A, QF 0.12 A +1e-4 T MBI changes MBI/IREF 0.35 A
The tune changes correspond to very small changes in current, which might not be easily measurable on the magnets.
Automatic field compensation
Manual field perturbation
The field at flat top was shifted vertically to validate the compensation algorithm
- Manual change from 0 to 4e-4 T 16:01:43, then correction back 16:02:30.
- Manual change from 0 to -4e-4 T 16:04:26, then correction back 16:06:25.
Supercycle changes on magnetic fields
- Switch from SFT+LHC to SFT, then back to SFT with automatic compensation
- Switch from SFT+LHC to SFT, wait a few cycles to observe change in spill quality, compensate, change back supercycle, wait a few cycles to observe changes in spill quality, compensate.
- First change 16:14:20, back 16:20:50 to SFTPRO+LHC
- Next 16:27:30 to 16:34:34, back to SFTPRO+LHC Enabled trim at 16:29:61 Trims originally disabled to observe change on spill duty factor, seems down to 70-75%.
- 17:14:10 Switch to LHCPILOT(x12), finished 17:17:00. Get these measured fields out from NXCALS to compare. PRECYCLE supercycle did not have a MD1 at the end, so the SFT on the first SFT+LHC supercycle had messed up eddy currents.
- Switch to SFT+LHC 17:57:45, automatic compensation, finished at 18:00:00.
- Get QH and MBI trims from LSA [due:: 2024-05-10] [priority:: high] [completion:: 2024-05-16]
We need dynamic “clipping” of calculated B depending on the magnitude of the field. T clipping or threshold on flat bottom is useful, but not on flat top, for instance.