A notebook for this purpose was developed and can be found in ~/cernbox/hysteresis/dipole/notebooks/simulations/jiles-atherton-experiment-design.ipynb.
The parameters were found for the Jiles-Atherton model during development of the simulation, slightly tweaked to match the dipoles better:
mbi_params = JilesAthertonParameters(
a = 5000., # A/m
alpha = 0.0013740,
c = 0.94, # controls contribution from the anhysteretic magnetization
k = 20., # A/m
Ms = 3.6e6, # A/m 5900
)Warning
The model parameters were fitted using a trapezoidal single ramp and plateau, where minor discontinuities in the curve were not visible. This was confirmed by implementing the
Simulations with randomized single ramp and plateau
Precycle
All waveforms were precycled with set to 5800 , and plateau of length of s and ramp rate of 2000 .
Which when subtracted a fitted piecewise linear function (~/cernbox/hysteresis/calibration_fn/SPS_MB_I2B_CALIBRATION_FN_SIM.csv) shows 
Randomized cycles with plateaus
To generate a dataset, we ramp the magnets from an “idle current” to a plateau current, with a randomly sampled ramp rate, stay at the plateau for a sampled time, and then ramp down with another randomly sampled idle current.
The random cycle is precycled with the waveform from the previous subsection.
We use the same settings for a training and validation dataset:
- : 5800
- slope
- plateau
- flattop
- Idle current
Where the beta distribution for the flat top has the following shape:

Training dataset
A training dataset of 10h and one of 24h, each “sampled” at 1 kHz were generated, and written to ~/cernbox/hysteresis/dipole/datasets/simulation/train_10h.parquet ~/cernbox/hysteresis/dipole/datasets/simulation/train_24h.parquet
The 24h dataset looks like the following on the I/B space:

Validation dataset
The validation dataset is generated using the same settings as the training dataset, but with only 10 minutes worth of data:

~/cernbox/hysteresis/dipole/datasets/simulation/val_10m.parquet
Warning
It’s extremely important to smooth the interpolated waveform (H) before giving it to the simulation, since the sharp corners will introduce unphysical artifacts. A simple gaussian filter (
scipy.ndimage.gaussian_filter) will the job.