PhD Thesis Outline:

Title: High-Precision Magnetic Field Prediction and Control in Synchrotrons Author: Anton LU, [email protected] Technical supervisors:

Abstract

  • Summary of work on transformer-based models for magnetic field prediction
  • Key achievements: prediction accuracy near sensor noise floor (2×10⁻⁵ T)
  • Operational impact: energy savings, improved beam reproducibility, automated feedforward control

1. Introduction

1.1 Motivation and Problem Statement

  • Magnetic hysteresis and rate-dependent dynamics in particle accelerators
  • Limitations of static current-to-field maps
  • Operational constraints: manual corrections, energy-intensive precycles, limitation in flexibility
  • Quantify current operational costs and inefficiencies, include blocking point of DBS.

1.2 Research Objectives

  • Develop data-driven models for high-precision field prediction
  • Implement feedforward control without feedback systems
  • Eliminate or reduce reliance on magnetic precycles
    • Improvement on current beam operation
    • Enable more flexible beam improvement in the future.
  • Extend methodology to different magnet families

1.3 Thesis Structure and Contributions

  • Overview of chapters and key contributions
  • Clearly define novel contributions vs. existing work

2. Background and Literature Review

2.1 Accelerator Physics Fundamentals

  • Synchrotron operation principles
  • Beam dynamics and stability requirements
    • Magnetic field expansion and magnet families
    • Nonlinear beam mechanics (chromaticity)
  • Magnetic field requirements and tolerances

2.1.1 RF Interaction with bending fields

2.2 Normal Conducting Accelerator Magnets

  • Hysteresis is an effect primarily in iron-dominated magnets (not superconducting)
  • Examples of magnets (SPS, PS combined function magnets etc)

2.2.1 Accelerator Magnet Design and Tolerances

  • How accelerator magnets are designed, shape of yoke, coil design, laminated
    • Finite element models
    • Accelerator magnets are designed with static field models
  • Good field region, multipoles in accelerator magnets, manufacturing imperfections, etc
  • Measurement, shimming, alignment
  • Mitigations for static and dynamic effects

2.2.2 Sources of Field Errors and Mitigation

2.2.3 Physical mechanisms of hysteresis

  • General overview of hysteresis. For details see later sections.
  • Impact on beam quality and operational flexibility
  • Current mitigation strategies (precycles, feedback systems)

2.3 Hysteresis Models

  • No perfect hysteresis models exist, but here are a few

2.3.1 Phenomenological Models

2.3.2 Operator-type models

  • Preisach, Prandtl-Ishlinskii, Krasnosel’skii-Pokrovskii

2.3.3 ODE-type models

  • Flatley, Jiles-Atherton, Coleman-Hodgdon, Tellinen, Duhem, Bouc-wen, Ramberg-Osgood, etc. and all of their derivatives for dfiferent materials
  • 🔴 Need work: Comprehensive comparison of model limitations

2.3.4 Common Models for Magnetic Hysteresis

2.3.5 Machine Learning Approaches

  • NARX, Preisach-NNs, LSTMs, MLPs vs seq2seq
  • Neural operator methods
  • Time series forecasting approaches
  • 🔴 Need work: Critical assessment of existing ML methods in accelerator context

2.4 Eddy Current Effects

2.4.1 Physical mechanisms in accelerator magnets

  • Faraday’s law (oppose change in magnetic field)
  • Generation and decay of eddy currents in the iron yoke
  • Temporal dynamics and decay characteristics

2.4.2 Mitigations

  • Laminations
  • Physical mechanisms in accelerator magnets
  • Temporal dynamics and decay characteristics
  • 🔴 Need work: Literature review on eddy current modeling approaches

2.4.3 Decay in Accelerator Components

  • Eddy currents generated in vacuum chamber
  • Decay in structures in tunnel
    • Grounding schemes for different accelerators

3. Beam Operation at CERN and the SPS

  • Beam operation at CERN directly determines how hysteresis compensation can be performed from high-level
  • How beam operation limits the ways we can do hysteresis compensation
    • Why can we not do it low level

3.1 Magnetic Sequences as Cycles

  • Different beam parameters for each user in each injector - one cycle per user
  • Introduce the concept of cycles (1 physics user = 1 cycle), and how they are grouped into static supercycles
  • Cycle scheduling (now static, soon dynamic)

3.2 The CERN SPS

  • Introduce SPS cycles; SFTPRO, LHC, HiRadMat, AWAKE, Ion cycles
  • SPS hardware
    • Magnetic families are controlled in series - one circuit per magnet family
    • SPS magnets, design etc.
  • Power usage, power converter economy modes

3.3 Accelerator Controls Infrastructure at CERN

  • Brief overview of accelerator controls

3.3.1 Timing

  • Introduce this as the nervous system of the accelerator complex
  • How actions for equipment is triggered

3.3.2 Middleware

  • Introduce CMW as method of having access to cycle-by-cycle real time data

3.3.3 Logging

  • Introduce NXCALS as method of retrieving data for analysis

3.3.4 LSA

  • Introduce concept of hierarchical control system, makerules
  • Separate settings for each cycle, they are settings, not corrections.
  • Discrete functions are (time, value) piecewise linear functions, and propagate to hardware, like current to power converter, etc

3.3.5 UCAP

  • Introduce server-based processing, exploiting the middleware and control system

3.3.6 FGCs

  • Introduce power converter infrastructure and their limitations in adding additional infrastructure
  • Need discrete function far before cycle is played

3.4 Magnetic Field Control in the CERN Injectors

  • Explain why magnetic field control now is very “stiff”

3.4.1 Hierarchical Field Control

  • Describe use of LSA for propagating current to FGCs ( and )
  • Calibration functions used to translate

3.4.2 B-Train for Field Regulation in the PS and PSB

  • PS and PSB main dipole fields regulated by B-Train
    • Only takes into account effects seen on the reference magnet
    • Higher order multipoles not regulated
  • Not used in the SPS

3.5 Magnetic Precycle and Degaussing in Operation

  • For higher order magnets, and magnets not regulated in field, resort to precycling and quasi-degaussing

3.5.1 Dedicated Magnetic Precycle in the SPS (MD1)

  • Precycle for SFT-type beams only on dipoles and quadrupoles
    • Plot precycle
  • Energy intensive and time consuming
    • Does not

3.5.2 Quasi-Degaussing of Higher Order Magnets in the SPS

  • Quasi-degaussing at the end of each cycle for sextupoles and octupoles
    • Plot quasi-degauss
    • ⚠️ would be good to quantify effect
  • Requirements on power converters

3.5.3 Degaussing and mitigation in the PS

  • Dedicated degaussing cycle, constraints on cycle sequences
  • Adding unnecessary MTE cycles

3.5.4 Operational Limitations from Hysteresis

Lattice

3.6 Machine Development Time

  • Opportunities to take measurement and do testing is limited by MD time
  • Full control of the accelerator is only allowed in Dedicated MDs

4. Accelerator Magnetic Measurements

  • Measurement techniques for accelerator magnets and their purposes
  • Critical for determining magnetic imperfections like multipoles
  • Useful for measuring magnets which is not possible in the accelerator

4.1 Measurement Techniques

  • Figure (Buzio) over different measurement techniques and their limitations in brief.
  • Two workhorses (stretched wire and induction coil) discussed later, and complementary local measurements

4.1.1 Local, Integral, and Average measurement

  • Difference between the three, when to use which, and why integral measurement are preferred

4.1.2 Hall sensors

  • Simplicity of hall probes
  • Can be used to map magnet aperture
  • Limited in precision (Why?)
  • Nonlinear drift
  • Thermal drift
  • Calbiration required

4.1.3 NMR probes

  • What NMRs are used for, their precision
  • Highly precise instrument, provides local measurement corresponding to a frequency generator
  • Accurate to 1e-6 T

4.1.4 Stretched Wire Measurement

  • First workhorse and the most primitive measurement technique
  • An area spanned by the wire and capture linked flux
  • Integral field and multipole measurement
  • Highly precise
  • Static measurement only
  • Limited primarily by precision of motors and wire alignment (can be calibrated).

4.1.5 Fluxmeter Measurement

  • Measures change of flux
  • Integral field and multipole measurement
  • Less precise than stretched wire, but suitable for pulsed measurements (changing field)
  • Coil surfaces need to be calibrated
  • Limited primarily by integration drift from integrating over long periods of time
  • Must be purpose built for each magnet

4.1.6 Rotating coils

  • Integral measurements
  • Absolute measurements
  • Measures multipoles directly by identifying harmonic coefficients
  • Length of magnet needs to be suitable - main limiting factor
  • Calibrate rotary encoder etc.

4.2 Laboratory Measurement Systems

  • All magnets at CERN are measured in lab prior to installation
    • Alignment, multipole identification & shimming
  • All SPS magnets are in the 867 measurement lab at CERN, powered by a HOLEC converter.
    • Electronics for each bench can be custom built
  • All measurements performed in-house with FFMM.

4.2.1 SPS Main Dipole Measurement Bench

  • Setup description and specifications
  • Measurement techniques: stretched wire, rotating coil, fluxmeter
  • 🔴 Need work: Detailed characterization of measurement uncertainties

4.2.2 SPS Main Quadrupole Measurement Bench

  • Setup description and unique challenges
  • New bench, describe electronics and PCB coil
  • Measurement accuracy limitations
  • 🔴 Need work: Analysis of noise sources and systematic errors

4.3 Online B-Train Measurement System

  • Magnetic fields at CERN are measured in real time for feedback or RF frequency regulation
  • Each system is purpose built for the accelerator and magnet it is measuring
  • Magnet is typically powered in series with the ones in the tunnel
    • It is not possible to measure magnets in the tunnel due to space and radiation constraints
  • It is costly to measure each magnetic circuit in real time

4.3.1 B-Train systems at CERN

  • Measured with an induction coil + marking at each each cycle start with NMR
    • Sampled at high frequency
    • Marker is calibrated to trigger at specific field level, with peak detections in FESA to determine when to apply marker
    • Integrated field is reset to this marker when triggered
    • Marker triggers only once, and not at the start of each cycle
    • No drift-correction since data is published live
  • Field measurements are logged
  • Current measurements from FGC are logged
  • Limitations: integration drift, noise floor
    • Drift grows over long cycles
    • System primarily built for short cycles

4.3.2 SPS B-Train

  • Operational and spare system
  • Not used for feedback. Hardware exists to make it possible to regulate in field, but integration drift would make it unsuitable for beam control.
  • 🔴 Need work: Quantitative analysis of drift correction methods
  • Not possible to install additional hardware trivially

4.3.2.1 Marker limitations)

5. Field modeling with Machine Learning

  • Sequence modeling, architectures

6. Field Compensation Strategies in the SPS

  • Bind together the previous 4 chapters and motivate why we choose to go forward with pure data-driven hysteresis modeling
  • Constraints from measurement
  • Constraints from operation
  • Constraints from modeling
  • Make it clear that the method was designed to also be able to capture dynamic effects

7. Data-Driven Hysteresis Modeling

  • Method

7.1 Problem Formulation

  • Sequence-to-sequence prediction framework
  • Input/output variable selection
  • Temporal dependency modeling

7.2 Model Architectures

7.2.1 Baseline Models

  • Encoder-decoder LSTM (EDLSTM)
  • Attention-augmented LSTM (ATTNLSTM)

7.2.2 Transformer-Based Models

  • Temporal Fusion Transformer (TFT)
  • Transformer-LSTM hybrid (TFLSTM)
  • 🔴 Need work: Ablation studies on architectural choices

7.2.3 Other approaches

  • MLPs
  • Neural operators
  • Differentiable Preisach

7.3 Prediction Strategies

  • Strength of encoder-decoder models is that we can produce variable length predictions

7.3.1 Autoregressive vs. Direct Prediction

  • Performance comparison
  • Benefits of using Autoregressive vs using B-Train input, even for dipoles

7.3.2 Chunked Prediction Approach

  • Point-by-point vs. chunk-by-chunk prediction
  • 🔴 Need work: Optimization of chunk size and overlap

7.4 Measurement Design and Execution

  • Experimental protocols for hysteresis characterization
  • Software and hardware limitations
  • Data post-processing techniques
  • 🔴 Need work: Statistical analysis of measurement repeatability

7.5 Training Methodology

7.5.1 Dataset Preparation

  • 108 measurement sets (41M training steps, 300K validation steps)
  • Data preprocessing: filtering, downsampling strategies
  • 🔴 Need work: Analysis of better downsampling techniques beyond uniform sampling

7.5.2 Pretraining Strategy

  • Simulation with Jiles-Atherton model
  • Transfer learning benefits
  • 🔴 Need work: Systematic study of simulation parameter sensitivity

7.5.3 Modeling Constraints and Considerations

  • Available variables and feature engineering
  • Temporal feature incorporation
  • Computational performance requirements
  • 🔴 Need work: Analysis of remanent field knowledge integration

8. Eddy Current Decay

  • Originally foreseen to be captured with neural network but turns out behaviour in machine is different

8.1 Eddy Current Decay in the SPS main dipoles

  • Plot and discuss difference between lab, B-Train and decays on orbit
    • The cause is unknown, but the effect is driven by the main dipoles
    • TO BE CONFIRMED
  • Show empirical eddy current compensations on tune and chromaticity from LSA (Auto Q)

8.2 Modeling Eddy Current Decay in the SPS

  • Eddy current decay for the main dipoles

8.2.1 Eddy Current Decay as ODE

  • Propose eddy current models as ODE, as simplification of overall behaviours in the accelerator
    • Derive solution to ODE as exponential convolution
    • Specify we use and not since eddy currents are driven by magnetic field changes

8.2.2 Measuring Eddy Current Decay in the SPS

  • Propose way to capture data by taking first turn , translating to , and modeling the relative difference (to take out static effects), with time resolution of 1200 ms.
    • Also use orbits decays since first turn data is scarce, and orbit decays describe the decay dynamics, and first turn captures accumulation of eddy currents

8.2.3 Physics Contraints and Parameter Restrictions

  • Our problem is constrained - we cannot fit arbitrary data
    • Problem is fundamentally physical
  • Time constants must be positive
  • Coefficients must be negative
  • Time constants cannot be too large, and not too small (relative to our measurements)

8.3 Data-Driven Eddy Current Modeling

  • Discuss different way to fit the two different datasets
    • Discuss feasibility of formulating problem for Neural ODE, but not possible with small amount of data and two different dataset
  • Present scipy.minimize, bobyqa, differentiable optimizations, pareto fronts, varpro
  • Restrictions of

8.4 Qualitative evaluation

  • Discuss different time constants captured, feasibility of results
  • Plot modeled modeled magnetic field

8.5 Eddy Current Decay in the SPS main Quadrupoles

8.5.1 Tune Decay Measurements in the SPS

  • 2 sets of measurements, summer 2025 and fall 2025
  • Plot raw tunes (spectogram)
  • Plot tune decay (relative), and with statistical significance

8.5.2 Field Decay on Lab Magnet Measurement

  • Plot magnetic field measurements, both in field, and in gradient (?? or for later)

8.5.3 XSuite simulation

  • Correlate amplitude of decay in machine to tune decay, see if they match

9. Control System Implementation

9.1 Control law

  • Present how to determine necessary field change using surrogate model
  • Incorporate eddy current field if needed
  • Use CERN Control system to propagate correction to power converters

9.2 Feedforward Control Architecture

  • Real-time prediction pipeline for all cycles
  • Integration with CERN control system,
    • All information we need to do prediction (which cycle, programmed current etc)
    • Prediction strategies ?
    • Timing signals - know when to trigger
  • Handle asynchronous timing signals like DYNECO, and other current waveforms like FULLECO
  • Evaluation on the B-train
  • Draw a timeline
  • Latency analysis and optimization
  • Publishing of programmed , DYNECO and FULLECO IREF

Deployment to Control Room

  • Everything implemented in Python, Pytorch, etc.

Frontend Application

  • Present the frontend application used to control the feedforward control
  • Allows trimming of all cycles, any time for each cycle
    • Keeps track of reference for each cycle individually
    • Other modifications of cycle settings can be done in LSA -
  • Trim gain
  • Visualization
  • Should not run for different

Online Cycle Prediction on UCAP

  • Same implementation as in the GUI
  • Server-based
  • Can trim LSA directly
  • Not used, but can be observed with GUI

9.3 Operational Results

9.3.1 Field Compensation Performance

  • 3×10⁻⁵ T accuracy at flattop
  • 5×10⁻⁵ T accuracy at injection
  • Beam reproducibility improvements

9.3.2 Energy and Time Savings

  • Precycle elimination potential: 4 GWh/year, 18% time savings
  • 🔴 Need work: Cost-benefit analysis of implementation

10. Experimental Results - Hysteresis Compensation

10.1 Measurement of impact of Precycle

  • MD1 with and without, dipoles
  • MD1 with and without, quadrupoles
  • Sextupole precycle, if possible.

10.1.1 Chromaticity Changes

  • Measurement methodology
  • Error quantification
  • Dipole precycle has significant impact on field
    • XSuite simulation for determining and link to field measurement
    • 🔴 Where to put field measurements from dipole?
  • Link back to simulation of dipole magnet from Accelerator Magnets
  • 🔴 Need work: Systematic characterization and modeling

10.1.2 Injection Field Shift Characterization

  • Measurements without dipole precycle
  • B-Train measurement with drift correction
  • 🔴 Need work: Reference magnet laboratory validation

10.1.3 Beam Tolerance Analysis

  • Prediction accuracy vs. beam tolerance requirements
  • 🔴 Need work: Comprehensive sensitivity analysis

10.2 Hysteresis Excitation from Supercycle Change

  • Primarily flattop measurements of main dipole field
    • Describe in which conditions this is excited
  • Examples of SFT and AWAKE cycles which are impacted
  • Show examples of SFT injection which is NOT impacted

10.3 Main Dipole Field Prediction

  • Explain chunked vs cycled prediction modes, also autoregressive
    • Using the same API

10.3.1 Model Performance Comparison

  • RMSE results across different architectures
  • Validation vs. test set performance
  • Autoregressive prediction stability

10.4 Main Dipole Field Compensation

  • Operational field compensation of main dipole field
  • We compensate only on injection and flat top of fixed target because it’s the only place that needs hysteresis compensation
    • Injection needs compensation because of precycle removal
    • Flattop needs compensation when supercycle changes

10.4.1 Fixed Target Flat Top Compensation

  • Demonstrate field compensation on measured field
  • Demonstrate field compensation on spill improvement

10.4.2 Injection Field Compensation with Transformer

  • Figure from IPAC 2024 (injection correction) on 26 GeV LHC type MD cycle
  • Note that drift at

10.4.3 Eddy current Compensation at injection

  • Only compensate at injection, because

10.4.4 Injection Field Compensation on MD cycle

  • Perfect cycle on LHC-type MD cycle
  • Note does not work perfectly with more ZEROs - seems “overfitted” on that dataset

10.5 Operational Validation

  • 36-hour continuous operation tests
  • Sequence change response
  • 🔴 Need work: Statistical significance testing of performance improvements

10.6 Main Quadrupole Analysis

10.6.1 Measurement Challenges

  • Insufficient measurement accuracy for compensation
  • Data cleaning techniques
  • 🔴 Need work: Systematic study of required measurement improvements

10.6.2 Beam Impact Studies

  • Tune decay measurements without precycle
  • 🔴 Need work: Characterization and modeling of tune decay effects

11. Discussion and Future Work

11.1 Current Limitations

11.1.1 Measurement accuracy

  • Data quality and coverage constraints

11.1.2 Data variety limitations

  • Measurement system limitations

11.1.3 Generalization challenges

11.2 Operational Requirements Analysis

  • Quadrupole compensation necessity for precycle removal
  • Flattop vs. injection compensation requirements
  • 🔴 Need work: Decision framework for operational deployment

11.3 Extension to Other Magnet Families

11.3.1 Transfer learning for higher order magnet families

  • Refer back to beam operation chapter that waveforms for quadrupoles are similar to dipoles
    • Physics may be similar
  • Transfer learning approach for quadrupoles/sextupoles/octupoles
  • Feasbility study, and required magnetic measurement accuracy
  • 🔴 Need work: Feasibility study and preliminary results on quadrupoles

11.3.2 Other Magnet Families

  • Discuss potential for sextupoles, octupoles, etc.

11.4 Future Developments

  • Integration with dynamic beam scheduling
  • Extension to other CERN synchrotrons (PS, LEIR)
  • 🔴 Need work: Roadmap for broader deployment

12. Conclusions

  • Summary of achievements
  • Impact on accelerator operation
  • Scientific and technical contributions

Appendices

  • A. Detailed Model Architectures
  • B. Measurement System Specifications
  • C. Training Hyperparameters
  • D. Additional Experimental Results

Missing Elements to Explore

  1. Economic Analysis: Detailed cost-benefit analysis of the implementation, including development costs vs. operational savings
  2. Comparison with Alternative Approaches: How does this approach compare to hardware-based solutions (better reference magnets, improved feedback systems)?
  3. Scalability Analysis: How does the approach scale to other accelerators with different operational patterns?
  4. Model Interpretability: Can you extract physical insights from the learned models? Are there interpretability techniques that could provide accelerator physics insights?
  5. Failure Mode Analysis: What happens when the model fails? Are there safety mechanisms and fallback procedures?
  6. Cross-Validation with Different Beam Types: How does performance vary with different beam species and energies?
  7. Long-term Stability: Analysis of model performance degradation over time and retraining requirements