The BDOT Converter computes programmed magnetic field derivatives (dB/dt) in real-time using the chain rule dB/dt = dB/dI × dI/dt. It intelligently selects between different current sources (dynamic economy, full economy, or normal programmed) based on machine mode and cycle synchronization, then applies numerical differentiation and calibration interpolation to produce accurate field derivative values for beam dynamics calculations.
Trigger
rda3://${NODE_ID}/XTIM.UCAP.SCY-CT-500/Acquisition - SCY-CT-500 acquisition event from timing system, ensuring synchronization with machine cycles.
Buffered Subscriptions
Normal Programmed Current: rmi://virtual_sps/MBI/IREF (alias: IREF)
Dynamic Economy Current: rda3://${NODE_ID}/SPS.MBI.DYNECO/IREF (alias: DYNECO_IREF)
Full Economy Current: rda3://${NODE_ID}/SPS.MBI.FULLECO/IREF (alias: FULLECO_IREF)
Machine Mode Signal: SX.CZERO-CTML/StartCycle (alias: STARTCYCLE) - Contains MMODE field
Calibration Function: rda3://${NODE_ID}/UCAP.I2BDOT.CALIBRATION/Acquisition (alias: CALIBRATION) - I2BDOT calibration as DiscreteFunction
All subscriptions ignore first updates except the trigger.
Current Source Selection Logic
The converter uses a hierarchical selection strategy:
- Dynamic Economy Priority: If DYNECO IREF has the same cycle stamp as the trigger → use dynamic economy current
- Full Economy Check: If startcycle
MMODEfield == “FULLECO” → use full economy current - Normal Fallback: Use standard programmed current from virtual MBI
This ensures the most appropriate current profile is used based on machine operational mode.
BDOT Calculation Process
- Time Conversion: Convert IREF time points from milliseconds to seconds (÷1000)
- Numerical Differentiation: Compute dI/dt using
np.gradient()with proper time scaling - Calibration Interpolation: Lookup dB/dI values from calibration DiscreteFunction using linear interpolation
- Chain Rule Application: Calculate dB/dt = dB/dI × dI/dt (units: T/s)
Output
Property: BDOT - Array of magnetic field derivative values in Tesla per second (T/s)
Device: UCAP.SPSBEAM
Usage: Real-time programmed field derivatives for beam optics calculations and feedforward systems
Dependencies
- Calibration Provider for I2BDOT calibration function
- sps-ucap-hysteresis-compensation package
- XTIM timing system for cycle synchronization
- Economy mode converters (DYNECO/FULLECO) when applicable
Notes
The converter handles millisecond timing inherent in UCAP systems and ensures proper derivative units through careful time base conversion. Field derivative accuracy depends on both the quality of the I2BDOT calibration function and the precision of current program timing.