Source-linked AI summary

MagLearn 2: High-Fidelity, Saturation-Aware, and History-Efficient Sequence-to-sequence Modeling of Transient B-H Behaviour Under PWM Excitation

Jingrong Yang, Binyu Cui, Yuming Huo, Lizhong Zhang, Alfonso Martinez, Song Liu, Jun Wang

arXiv:2610.03504v1eess.SYcs.SY

TL;DR

Transient B–H prediction must account for both the present excitation and magnetic history, while addressing history length, saturation, and adaptation to unseen materials. MagLearn 2 combines a condition-aware short-window Seq2Seq model with saturation correction and transfer learning; across 15 materials, it reports a mean relative RMSE of 4.06%.

  • Problem

    Transient H(t) depends on both the current B excitation and preceding magnetic history, while existing approaches do not jointly address history requirements, saturation, and adaptation to unseen materials.

    Source: §I · p. 2, §II · p. 3
  • Method

    MagLearn 2 uses a condition-aware, short-window LSTM Seq2Seq model to predict the future H waveform from historical B–H trajectories and known future B excitation, with saturation-aware correction and performance-driven transfer learning.

    Source: §I · p. 2, 1) LSTM-Based Seq2Seq Encoder-Decoder… · p. 4
  • Results

    4.06% overall mean relative RMSE across 15 magnetic materials, with a material-averaged 95th-percentile relative RMSE of 9.44%.

    Source: §VII · p. 15
  • Takeaways & Limitations

    The most informative history is the recent local B–H trajectory over only a few PWM cycles, so transient prediction does not necessarily require fundamental-cycle-scale memory.

    Source: §I · p. 2, §VII · p. 15

Abstract

from arXiv · show

Accurate transient B-H modeling under pulsewidth-modulated (PWM) excitation is challenging since the magnetic-field response depends on both the instantaneous flux density and the preceding magnetisation trajectory. Although sequence-to-sequence models enable waveform prediction, existing studies have not jointly addressed how much magnetic history is required, how saturation region should be handled, and how trained models can be adapted to unseen materials. To address these gaps, this paper presents MagLearn 2, a condition-aware, short-window LSTM-based sequence-to-sequence framework for reconstructing the future H(t) response from the historical B(t) and H(t) trajectories. A saturation-aware auxiliary module selectively replaces saturation-dominated predictions within the complete waveform forecast. In a representative saturated 3C90 case, the auxiliary module reduces the sequence-level relative RMSE from 67.84% to 9.19%. To understand how much the history samples contributes to the predictions, an occlusion-based sensitivity analysis is conducted to quantifies the contribution of magnetic history and reveals that that the information most relevant to prediction is concentrated near the forecast boundary. In the independent evaluation for MagNet Challenge II, the proposed framework's best-performing model achieved the lowest reported average RMSE to date on the sequence-prediction task at 2.2%.

I. INTRODUCTION

Transient PWM modeling must predict future H(t) from a partial magnetic trajectory, where hysteresis makes the response depend on prior history. MagLearn 2 combines short-window sequence prediction, saturation handling, history analysis, and adaptation to unseen materials.

I. INTRODUCTION

  • Existing transient-modeling studies leave magnetic-history requirements, saturation robustness, and adaptation under limited target-material data less systematically investigated.Earlier full-cycle approaches do not directly forecast unknown future H(t) from a partially observed trajectory.Source: §I · p. 2
  • MagLearn 2 develops a condition-aware, short-window LSTM Seq2Seq framework for transient B–H modeling under PWM excitation.The framework addresses history requirements, waveform prediction, saturation robustness, computational efficiency, and cross-material adaptation.Source: §I · p. 2
  • A saturation-aware auxiliary module selectively corrects saturation-dominated predictions while preserving the non-saturated baseline response.The contribution is presented as addressing high prediction error in saturation regions.Source: §I · p. 2
  • The transfer-learning procedure validates base-model compatibility for each target, then fine-tunes on limited target-material data.Across ten base-model materials, mean and 95th-percentile relative RMSEs average 3.75% and 8.75%; across five unseen materials after fine-tuning, they average 4.69% and 10.83%. Three of the five targets rank in the MagNet Challenge II top three.Source: §I · p. 2
  • History-length and occlusion analyses find informative magnetic history concentrated near the prediction boundary, so fundamental-cycle-scale memory is not necessarily required.The analysis provides a quantitative basis for selecting short modeling windows.Source: §I · p. 2

II. MOTIVATION FOR DATA-DRIVEN TRANSIENT MAGNETIC MODELING

Under large-signal PWM excitation, nested minor loops and magnetic history make a single static permeability or B–H mapping insufficient to describe transient response. The paper motivates recurrent sequence modeling, then frames the task as forecasting future H from magnetic history and known future B.

II. MOTIVATION FOR DATA-DRIVEN TRANSIENT MAGNETIC MODELING

  • Large-signal PWM excitation produces nested, unclosed minor loops, for which incremental permeability better captures time-varying B–H dynamics than static permeability specifications.The passage defines incremental permeability over a discrete interval as ∆B divided by µ0∆H.Source: §II · pp. 2–3
  • At B = 0.2 T, measured H values can differ and yield incremental-permeability values differing by more than a factor of three, reflecting dependence on preceding trajectory and operating conditions.The local incremental-permeability variation is qualitatively compared with the 3C90 datasheet amplitude-permeability characteristic.Source: §II · p. 3, Figure 1 · p. 3
  • Because transient H depends on preceding magnetic history as well as instantaneous excitation, the paper motivates a recurrent architecture; LSTM and Seq2Seq provide temporal memory and map history to a potentially different-length forecast.The cited discussion distinguishes neural networks' nonlinear data learning from a feedforward network's lack of inherent preceding-time-step memory.Source: §II · p. 3

III. SEQ2SEQ FRAMEWORK AND MODELING PIPELINE

  • The forecasting objective is to reconstruct unknown future H(t) from available magnetic history and known future B(t), with temperature and effective PWM frequency as conditions.The history and forecast windows may have different lengths.Source: §III · p. 3

A. Model Architecture

The architecture encodes historical B–H trajectories and operating conditions separately, then decodes them with known future B excitation to predict a complete future H waveform. Its LSTM encoder–decoder supports different history and forecast lengths.

1) LSTM-Based Seq2Seq Encoder-Decoder Structure:

  • The encoder processes paired historical [B, H] inputs into hidden and cell states that initialize future sequence generation.The hidden state represents extracted historical features, while the cell state preserves longer-term memory; encoder and decoder sequence lengths need not match.Source: 1) LSTM-Based Seq2Seq Encoder-Decoder… · p. 4
  • A separate embedding branch maps temperature and effective PWM frequency into a latent condition vector, keeping static operating variables distinct from sequential waveform features.The condition representation and history-dependent features are learned separately before decoding.Source: 1) LSTM-Based Seq2Seq Encoder-Decoder… · p. 4
  • The decoder combines encoded history, operating-condition representation, and known future B excitation to generate the time-resolved future H waveform.Future B is supplied because it is known in the voltage-driven operating setting described by the paper.Source: 1) LSTM-Based Seq2Seq Encoder-Decoder… · p. 4, Figure 2 · p. 4
  • LSTM gates regulate retained, updated, and output information; its cell state carries temporal memory relevant to history-dependent B–H response.The encoder input is [Bt, Ht], while the decoder input is [Zc, Bt].Source: 1) LSTM-Based Seq2Seq Encoder-Decoder… · pp. 4–5
  • The stated forward process splits B into historical and forecast segments, encodes [Bhis, Hhis], repeats the condition embedding over the forecast, and decodes with Bfut.The algorithm initializes decoding with the encoder state and produces the predicted future magnetic-field sequence.Source: 1) LSTM-Based Seq2Seq Encoder-Decoder… · p. 5

2) Full-Window and Short-Window Configuration:

The full-window baseline partitions each complete sequence into history and forecast segments, while the proposed short-window approach shifts local forecasting windows along the sequence to create multiple samples.

2) Full-Window and Short-Window Configuration:

  • The full-window baseline downsamples each fundamental-cycle sequence and splits it at the history boundary into paired historical B–H segments and future B excitation and H response.The forecast H sequence matches the supplied future B sequence length.Source: 2) Full-Window and Short-Window… · p. 5
  • 5.62% mean relative error across ten materials is achieved by the full-window baseline, but longer histories do not consistently improve accuracy.Reducing history length can lower relative error, motivating local windows that make greater use of waveform subsequences.Source: 2) Full-Window and Short-Window… · p. 5
  • The proposed short-window configuration shifts a local history–forecast window along each full sequence, producing multiple forecasting samples with the same encoder–decoder backbone.The window has length Lw and is shifted using stride S.Source: 2) Full-Window and Short-Window… · p. 5, Figure 3 · p. 5
  • Sliding-window extraction uses waveform data in multiple local training samples, while restricting context to recent magnetic history relevant to each forecast segment.The approach is motivated by the diminishing contribution of distant history and the inconsistent benefits of longer history windows.Source: 2) Full-Window and Short-Window… · p. 5

B. Data Preparation and Model Optimisation Strategy

The MagNet Challenge II dataset supports model development on ten materials and evaluation of adaptation to five previously unseen materials, across varied PWM switching frequencies.

1) Dataset Overview:

  • 148,214 measured sequences cover ten base-model materials and five previously unseen materials used to evaluate adaptation and generalisation.The ten development materials each have approximately 7,000–17,000 sequences.Source: 1) Dataset Overview · p. 6
  • Table I summarizes sequence counts for individual materials in the MagNetX database.Source: Table I · p. 6
  • All waveforms are sampled at 16 MHz, with PWM switching frequencies spanning 50 kHz to 800 kHz.Known-material sequences contain 100 switching sub-cycles, so their sampled lengths vary inversely with switching frequency.Source: 1) Dataset Overview · p. 6

2) Data Pre-Processing, Training, and Inference Workflow:

The workflow splits measured trajectories before preprocessing, trains on shifted windows across three history–forecast configurations, and evaluates predictions on a held-out test subset.

2) Data Pre-Processing, Training, and Inference Workflow:

  • Original trajectories are split into mutually exclusive training, validation, and test subsets at a 60:20:20 ratio before later processing to prevent trajectory-level information leakage.The test subset is reserved for final performance evaluation.Source: 2) Data Pre-Processing, Training, and… · p. 6
  • A shifted 1000-sample window is extracted from each variable-length sequence using 1:9, 5:5, and 9:1 history-to-forecast configurations.The configurations provide different levels of magnetic history and forecast duration while generating multiple local samples per trajectory.Source: 2) Data Pre-Processing, Training, and… · p. 6
  • Training uses a 5% quantile-trimmed MSE loss and Adam, with validation losses averaged equally across the three history configurations.Pointwise squared errors above the 95th percentile are excluded from the loss calculation.Source: 2) Data Pre-Processing, Training, and… · p. 6
  • Testing reports mean sequence-level relative RMSE across all test sequences and the 95th percentile of sequence-level relative errors.Predicted H waveforms are returned to physical scale and aligned with measured waveforms before evaluation.Source: 2) Data Pre-Processing, Training, and… · p. 7

3) Conditional Parameters: Effective PWM Frequency and Temperature with Ablation Analysis:

MagLearn 2 adds operating-condition inputs to its Seq2Seq model and uses a selective auxiliary path to address saturation. In a representative 3C90 case, that correction substantially reduces sequence-level relative RMSE.

3) Conditional Parameters: Effective PWM Frequency and Temperature with Ablation Analysis:

  • The model conditions on temperature and an effective PWM-frequency descriptor derived from significant positive and negative B(t) turning points.The descriptor represents switching-activity density rather than recovering nominal switching frequency exactly.Source: 3) Conditional Parameters: Effective… · p. 7
  • Using both temperature and effective PWM frequency achieves the lowest mean and 95th-percentile relative RMSE among the four tested conditioning configurations.The comparison includes both conditions, temperature only, frequency only, and no conditions; inference values substantially outside the training range may reduce accuracy.Source: 3) Conditional Parameters: Effective… · pp. 7–8

C. Saturation-aware Auxiliary Module

  • The auxiliary MLP processes identified saturated inputs and has 0.91% as many parameters as the baseline LSTM.A threshold applied to the preliminary forecast identifies potentially saturated time steps; the MLP output replaces those predictions while the rest of the waveform is preserved.Source: C. Saturation-aware Auxiliary Module · p. 8
  • 67.84% to 9.19%: the saturation-aware prediction reduces sequence-level relative RMSE for a representative saturated 3C90 trajectory.The auxiliary output replaces predictions only at identified saturated indices; the non-saturated forecast remains from Seq2Seq.Source: C. Saturation-aware Auxiliary Module · p. 8, Figure 6 · p. 9

IV. FEW-SHOT ADAPTATION TO UNSEEN MATERIALS VIA FINE-TUNING

The study tests adaptation to five unseen materials chosen to represent practical data and domain constraints. It reuses data-rich base-model representations and adapts them to each target rather than training a separate model from scratch.

A. Representative Material-specific Industrial Scenarios

  • The five unseen targets represent data scarcity, incomplete operating-condition coverage, limited magnetic history, and material-level domain shift.The benchmark tests adaptation under incomplete measurement conditions.Source: A. Representative Material-specific… · p. 9
  • 3C92 has approximately 15% of the training data available, while 3C95 and FEC014 have missing switching-frequency and flux-density regions, respectively.FEC007 has only one historical H sample, and T37 represents cross-material out-of-distribution generalisation.Source: A. Representative Material-specific… · p. 9
  • The approach reuses representations from data-rich base models and adapts them through transfer learning and few-shot fine-tuning instead of training each target model from scratch.The study notes that separate training would require sufficient target-specific data and repeated optimisation, which is impractical in several scenarios.Source: A. Representative Material-specific… · p. 9

B. Few-Shot Adaptation Procedure

The paper selects a compatible pretrained model for each unseen material, fine-tunes it using target data, and applies scenario-specific preprocessing where needed. Its size–accuracy analysis selects H128-L3 as a favorable reference architecture.

1) Base-Model Selection:

  • For each target, the source model is selected by comparing candidate base-model initialisations using equally weighted validation losses across history-to-forecast configurations.The short adaptation run uses only the target training subset to avoid information leakage.Source: 1) Base-Model Selection · p. 9

2) Material-Specific Adaptation Strategies and Fine-Tuning Setup:

  • Fine-tuning starts from the selected checkpoint, keeps all layers trainable, and uses a reduced learning rate while monitoring validation performance.The typical Adam learning rate is 1 × 10^-4 to 3 × 10^-4.Source: 2) Material-Specific Adaptation… · p. 9
  • For 3C92, augmentation adds interpolated 500- and 900-sample histories; for FEC007, history length is fixed at one sample and frequency conditioning uses the complete B sequence.FEC007 also uses a ratio-matched base model before fine-tuning; the remaining targets retain standard protocol-matched preprocessing.Source: 2) Material-Specific Adaptation… · pp. 9–10
  • Reusing the same Seq2Seq backbone allows material-specific adaptation with limited target labels and avoids retraining from scratch for each material.The paper characterizes the material-specific fine-tuning as lightweight.Source: 2) Material-Specific Adaptation… · p. 10

A. Model Size-Accuracy Trade-off

  • H128-L3 achieves 3.07% mean and 6.60% 95th-percentile relative errors; increasing hidden size from 128 to 160 adds approximately 56% parameters for only a 0.06-percentage-point mean-error reduction.H160-L3 has the lowest absolute errors, but its improvement is small relative to its parameter and memory increase; H128-L3 is selected as the reference architecture.Source: A. Model Size-Accuracy Trade-off · p. 10

B. Model Interpretability: History-Length Sensitivity and Contribution Analysis

The history analysis finds that useful information for future H prediction is concentrated near the forecast boundary. Progressive occlusion quantifies how much history can be removed before prediction error rises rapidly, supporting error-guided history-window selection.

B. Model Interpretability: History-Length Sensitivity and Contribution Analysis

  • The analysis progressively masks the oldest H-history points while keeping the remaining history, complete B sequence, and operating conditions unchanged, then measures future-waveform relative error.This occlusion-based sensitivity analysis avoids retraining a model for each history length.Source: B. Model Interpretability:… · p. 11
  • The occlusion plots show relative error rising gradually as history is reduced, then rapidly when only the most recent history remains; the threshold marks maximum positive error-growth acceleration.The plotted mean error and percentile ranges summarize samples across materials, history-to-prediction ratios, and operating conditions.Source: B. Model Interpretability:… · p. 11, Figure 9 · p. 12
  • In the representative T37 case with 500 history samples, 20% and 30% relative-error levels correspond to about 357 and 281 remaining H-history time steps, respectively.The corresponding durations are 34.92 µs and 27.62 µs; the error curve's intersections with prescribed error levels provide the retained-history estimates.Source: B. Model Interpretability:… · p. 11, Figure 10 · p. 12
  • Across evaluated materials, the median error-growth threshold is approximately 560 ns, with some thresholds reaching approximately 2.31 µs; tighter error requirements call for longer retained history.These results support selecting history length according to the application's allowable prediction error.Source: B. Model Interpretability:… · pp. 11–12, Table VI · p. 12
  • More than approximately 90% of preceding history can be removed in most investigated cases before rapid error growth, with the threshold remaining near the prediction boundary across frequencies.The findings indicate that useful information is primarily in the recent B–H trajectory rather than a complete switching- or fundamental-cycle history.Source: B. Model Interpretability:… · pp. 12–13

VI. OVERALL PERFORMANCE AND GENERALISATION

The framework generalises across unseen materials and challenging operating conditions, with target-specific validation guiding source-model selection and fine-tuning. It directly forecasts future H sequences, with a separate module correcting saturation-dominated predictions.

Unseen target materials

  • Target-specific validation selects N87 for 3C95, FEC007, and FEC014, and N27 for 3C92 and T37, rather than relying on obvious material similarity.After fine-tuning, FEC014 has the lowest mean relative RMSE at 2.24%, with a 95th-percentile error of 5.66%.Source: §VI · p. 13
  • 5.66%–18.22% versus 40.70%–96.95%: the framework’s 95th-percentile relative RMSE is lower than the Princeton benchmark across all five unseen materials.FEC014 and T37 achieve first-place results, while 3C92 ranks third among 32 participating teams.Source: §VI · pp. 13–14
  • FEC007 achieves mean relative RMSE below 6% despite having almost no prior magnetic-state information.The passage identifies FEC007 as an extremely limited-history case.Source: §VI · p. 14

Representative operating conditions

  • Fig. 11 compares time-domain H waveforms and B–H trajectories across material variation, extreme frequency and temperature, limited history, and saturation; the reported cases remain closely aligned with measurements.FEC014 combines approximately 800 kHz switching frequency with 75 °C; the 3C90 example shows rapid H increase into saturation.Source: §VI · p. 14, Figure 11 · p. 14

Prediction framework

  • The sequence-to-sequence framework forecasts the complete future H sequence without feeding prior predicted H values back into later forecast steps.Operating conditions use an independent pathway, and effective PWM frequency compactly represents local PWM cycling and associated minor loops when nominal switching frequency is unavailable.Source: §VI · p. 14

Saturation-aware correction

  • The auxiliary module selectively corrects saturation-dominated predictions while preserving the non-saturated baseline prediction.The framework combines this targeted correction with few-shot adaptation from data-rich source materials to unseen targets with limited labelled measurements.Source: §VI · p. 15

VII. CONCLUSION

The paper presents a condition-aware LSTM Seq2Seq framework for transient B–H modeling under PWM excitation, with saturation correction and transfer learning for unseen materials. Across 15 materials, it reports mean relative RMSE of 4.06% and material-averaged 95th-percentile relative RMSE of 9.44%.

VII. CONCLUSION

  • The LSTM Seq2Seq encoder-decoder reconstructs the complete future H waveform from historical B–H trajectories and known future B excitation, with operating conditions and a saturation-aware auxiliary module.Performance-driven base-model selection and fine-tuning adapt the pretrained model to unseen materials with limited data.Source: §VII · p. 15
  • Occlusion-based sensitivity analysis identifies recent local B–H history over only a few PWM cycles as most informative, so fundamental-cycle-scale memory is not necessarily required.The paper presents this finding as a physical interpretation and an engineering basis for selecting retained history length.Source: §VII · p. 15
  • Across 15 magnetic materials, the framework achieves overall mean relative RMSE of 4.06% and material-averaged 95th-percentile relative RMSE of 9.44%.The paper notes that deployment in converter simulation software could potentially support more accurate component sizing and optimisation.Source: §VII · p. 15
Loading 2610.03504v1…