How to build a 12-phase PMSM model for real-time control testing
Power Electronics
01 / 10 / 2026

Key Takeaways
- Deterministic timing and clear I/O rules will decide if control results are trustworthy.
- Multiphase faults and neutral paths need explicit modelling, since three-phase shortcuts fail under phase loss.
- Modelling depth should follow control sensitivity, then stability and timing checks come before closed-loop tests.
A 12 phase PMSM model that runs in real time will only help your controller if it stays deterministic under stress. The model must hit every fixed-step deadline while still reacting correctly to faults, coupling, and inverter behaviour. Electric car sales neared 14 million during 2023, and that scale raises expectations for powertrain validation. Disciplined modelling choices will give you results you can trust.
Most multiphase simulations fail for simple reasons such as mismatched sampling, unstable coupling math, or a plant that runs late once fault logic is added. A workable approach treats timing, interfaces, and fault cases as requirements, then adds magnetic detail only when it changes control outcomes. You will gain more confidence from a stable, instrumented 12-phase model than from a complex one that misses deadlines. That discipline also makes controller behaviour easier to defend during a test review.
“A model that collapses twelve phases into one “average” current will look neat and test nothing.”
What defines a 12-phase PMSM model for real-time testing
A credible 12-phase PMSM model reproduces per-phase electrical behaviour and torque at a fixed step. It matches the winding grouping, neutral connections, and coupling used in your hardware. It exposes the same measurements your controller reads, with explicit sampling and delay. It also stays stable when you inject faults, saturation, or inverter nonidealities.
A concrete target is an actuator motor built as two isolated six-phase sets on one shaft. One phase can open, yet the remaining phases must still track a torque command without large ripple. That case needs separate current feedback per set plus a clear phase order and polarity. A model that collapses twelve phases into one “average” current will look neat and test nothing.
Determinism comes from strict causality and bounded math inside each step. Same-step feedback between inverter switching and current sampling will create an algebraic loop. Aggressive parameter changes with rotor angle will also make the integrator ring. Good testing starts once every signal has a defined update instant and sign.
When multiphase modeling matters more than three-phase assumptions
Multiphase modelling matters most when phase imbalance and fault paths decide the outcome. Three-phase shortcuts can hide neutral shifts, circulating currents, and additional fault-current paths. They also miss current re-allocation logic that keeps torque after a phase loss. A full twelve-phase state model will show the real limits of your control strategy.
A traction motor built from four three-phase groups will not behave like a single three-phase set. After one group is de-rated, torque can stay steady only if currents reshape across the remaining phases. That reshaping depends on correct coupling and neutral behaviour between groups. Electric motor systems accounted for 53% of global electricity consumption, so small control errors can translate into heat and losses.
Full phase detail does not require an expensive magnetic solver. A compact electrical-state model can still represent open-phase, short-to-ground, and sensor-loss conditions cleanly. Ask one question before you simplify anything, will the controller react differently under a fault. If the answer is yes, three-phase assumptions will mislead you at the exact moment you care about.
Choosing the right electrical and magnetic modeling depth
The right modelling depth is the smallest set of effects that changes control behaviour. Start with back-EMF shape, inductance structure, and losses that sit inside your control bandwidth. Add saturation and cross-coupling only when they move current limits, torque ripple, or observer stability. Extra detail that does not affect control action will waste compute time.
A current loop tuned on constant inductance will look perfect until saliency shows up. An observer based on flux will drift if the back-EMF waveform has harmonics you ignore. A torque ripple check will fail if you only model an ideal sinusoid. Those failures hit hard on 12-phase machines, since fault handling pushes controllers into unusual operating points.
| Modelling choices you can make | What you will notice in control tests |
| Constant inductances and sinusoidal back-EMF | It runs fast but hides fault current peaks. |
| Speed-based back-EMF map | It improves low-speed torque prediction. |
| Angle-based inductance matrix | It shows coupling that shifts current sharing. |
| Saturation map tied to current | It moves limits and can upset observers. |
| Simple loss model tied to speed and current | It affects derating and thermal checks. |
Pick your depth with a timing budget, then lock it early. Simple look-up tables beat heavy math when interpolation stays bounded. Bad coupling parameters will look like control bugs, so treat identification as part of the build. Transient current peaks matter more than steady torque when faults are on the table.
“A stable model that answers tough fault questions will beat a fancy model that misses a single step.”
Structuring electromagnetic coupling without breaking determinism

Electromagnetic coupling is the main reason a 12-phase PMSM model feels harder than three-phase work. Mutual inductances link many currents, so one sign mistake can destabilise the system. A deterministic structure keeps coupling in one place and avoids same-step feedback loops. Stable current dynamics follow when the coupling math is explicit and repeatable each step.
One workable structure keeps a 12×12 inductance matrix and a 12-element flux linkage state. Rotor position updates the matrix, then phase voltages come from the state and applied inverter voltages. Cost stays under control when you reuse repeated terms and precompute sine and cosine values. Block forms also work well when the machine is built from repeated phase groups with known phase shifts.
Matrix conditioning decides if the solver stays calm during faults. Scaling currents and flux linkages into a per-unit range will reduce numerical noise on FPGA paths. Integration choice matters, since stiff electrical dynamics punish a loose step size. Single-phase voltage pulse tests and mutual response checks will expose wiring mistakes early.
Handling control interfaces and measurements for twelve phases

Interface design decides if your controller is testing the motor or testing your wiring. You need clear rules for phase order, sign conventions, sampling instants, and measurement filtering. Twelve phases multiply the chance of one swapped channel that ruins every run. A good interface plan treats measurements as part of the model, not a wrapper.
A lab setup can sample 12 phase currents on one boundary and update PWM on the next. A simulator that outputs currents one step late will push the controller into oscillation. Sensor offsets and drop-outs also matter, since fault logic often compares channels. That detail becomes critical when your code uses per-phase limits and reconfiguration rules.
Execution stays clean when plant update, I/O sampling, and PWM update each have a fixed slot. On OPAL-RT real-time systems, you can map these slots explicitly so the controller sees consistent timing. Keep measurement bandwidth realistic, but do not hide delay inside ad hoc filters. Freeze rotor speed, apply a known voltage pattern, and verify the phase order across all 12 channels.
Common modeling shortcuts that fail under real-time constraints
Shortcuts fail when they remove the dynamics your controller is meant to handle. They also fail when they create hidden algebraic loops that only appear at high bandwidth. Multiphase work is unforgiving, since twelve channels multiply every small inconsistency. A shortcut that looks harmless in steady state will break fault tests first.
- Equivalent-phase current models hide reconfiguration limits after faults.
- Missing neutral paths make open-phase tests look too clean.
- Ideal inverter switching removes dead-time ripple triggers.
- Perfect sensors mask offset and drop-out fault logic.
- Abrupt parameter jumps with rotor angle destabilise integration.
Replace shortcuts with staged validation and bounded complexity. Start from a stable electrical core, then add one nonideality at a time. Fault injection should be deterministic, with explicit start times and expected signatures. Surprising results will come from timing or sign errors more often than controller logic.
Validating stability and timing before closing the control loop

Stability and timing validation is the last gate before closed-loop behaviour earns trust. The plant must run every step on time, keep states bounded, and preserve causality between inputs and outputs. Fault signatures must repeat, not appear as one-off glitches that vanish on a rerun. A disciplined validation pass will save more time than extra modelling detail.
A common failure is a current loop that oscillates only after a fault case is added. Logs then show a one-step mismatch between sampled currents and applied PWM, so the controller reacts late. Another failure is a coupling sign error that looks like negative damping at one rotor angle. Each issue has a clear fix once timing, polarity, and fault response are tested in isolation.
Treat validation as a checklist you will defend to a lab lead after a late-night failure. Leave compute headroom, since extra scopes and fault logic cost time at run time. OPAL-RT fits well here when you need deterministic execution plus repeatable I/O timing. A stable model that answers tough fault questions will beat a fancy model that misses a single step.
EXata CPS has been specifically designed for real-time performance to allow studies of cyberattacks on power systems through the Communication Network layer of any size and connecting to any number of equipment for HIL and PHIL simulations. This is a discrete event simulation toolkit that considers all the inherent physics-based properties that will affect how the network (either wired or wireless) behaves.


