The brief
Two machines, opposite directions. The first already existed: a 1.5 kW, six-pole interior permanent-magnet synchronous machine — the WONDER IPMSM — sitting in a lab at KTH with a nameplate and nothing else. The task was to rebuild it in software from its geometry alone and recover the electrical parameters the nameplate only summarizes. The second machine didn’t exist at all: a 1.5 kW, four-pole squirrel-cage induction motor to be designed from base specifications, geometry and equivalent circuit synthesized from scratch.
One is inference — take a real machine apart and explain it. The other is synthesis — start from a torque target and a voltage and build a machine that hits them. Doing both, in the same term, is what made the course worth writing up.
Reverse-engineering the IPMSM
Before any simulation, the machine had to be measured. The rotor and stator were sectioned so their cross-sections could be dimensioned directly — slot heights, tooth widths, the buried-magnet pocket geometry, the bridges that hold the magnets against centrifugal load.


A simulation is only as honest as the geometry underneath it. Measuring the real laminations first — not trusting a datasheet drawing — is what let the extracted parameters land on the nameplate later.
From those measurements the machine was rebuilt in FEMM: 36 stator slots, six poles, two slots per pole per phase, a 65 mm active length, and the full buried-magnet rotor pocket with its wings and bridges. The stator winding was laid in as a two-layer, short-pitched three-phase distribution.
The first parameter fell out analytically. Phase DC resistance was computed from the total conductor length per phase — active length plus the end-turn arcs and stick-out beyond the core — giving 93.229 m of conductor and, at 20 °C, a phase resistance of 2.3600 Ω. That matched the laboratory measurement exactly, which was the first sign the geometry was right.
Automating FEMM
Everything past resistance needs a field solution, and not one solution — hundreds. Extracting flux linkage means stepping the rotor through a full electrical period. Extracting the d-q inductance maps means sweeping a rectangular grid of d- and q-axis currents. Finding the maximum-torque-per-ampere point means sweeping current angle at fixed magnitude. Each point is a fresh magnetostatic solve.
So the whole thing was driven from MATLAB through FEMM’s Lua interface: set the currents, solve, integrate, store, advance. A single run automates on the order of 500 magnetostatic solves without a hand touching the GUI. The heavy lifting is done by FEMM’s block-integral and line-integral commands — area-averaged magnetic vector potential over each slot for flux linkage, and Maxwell stress tensor over an air-gap contour for torque.
Getting the field quantities out correctly was the real work. Per-phase flux linkage came from
the area-averaged vector potential A_z over each slot cross-section, weighted by the winding
distribution — a ratio of two FEMM block integrals that already folds in the active length. A
finer mesh was forced across the air gap specifically to keep the Maxwell-stress torque
integration accurate, since that contour integral is where numerical noise shows up first.
The Park transforms were the part I refused to trust. Because every solve was expensive, a bug in the abc-to-dq mapping would have quietly poisoned a hundred data points before anyone noticed. So the transforms got their own test battery — round-trip abc→dq→abc, balanced-current sum-to-zero, amplitude invariance, and a check that the offset angle actually rotated the geometry — before a single current was injected.
Results
With the currents zeroed and the rotor stepped through an electrical period, the magnets are the only field source, and the per-phase flux linkage traces three clean balanced sinusoids.

Differentiating that flux linkage against rotor speed gives the back-EMF. Cross-checked three ways — an L2-norm RMS in the time domain, an FFT fundamental, and the mean-square — the line-to-line back-EMF came to 289.25 V RMS (289.06 V from the FFT fundamental), validating the 288 V nameplate. The spectrum is almost pure fundamental.

Sweeping the full d-q current grid produces the flux-linkage maps that hold the machine’s saliency. The q-axis links more flux and saturates harder than the d-axis — the signature of an interior-magnet machine.

From the torque map, sweeping current angle at the nominal current magnitude locates the maximum-torque-per-ampere point: a current angle of 13.9°, drawing on reluctance torque that the nameplate never advertised.

Running the optimal MTPA currents synchronously against the rotor gives the torque quality — and separately, with the windings off, the cogging torque from the magnets interacting with the slot openings.

The closing check was independence: the same average torque, computed a second way from the d-q flux-linkage maps via the analytical dq torque equation, came to 9.69 Nm against the Maxwell-stress FEA value of 10.17 Nm — agreement within 4.6%. Two methods that share no intermediate results agreeing to within 5% is what confirms the Park transforms and the field integration are both sound.
Designing the induction motor
The second machine ran the process backwards. No hardware, no nameplate to recover — just a target: 1.5 kW, 400 V, 50 Hz, four poles, with an 85% efficiency floor and a 0.78 power-factor target. Following Lipo’s deterministic sizing algorithm, the job was to synthesize a full physical geometry and its T-model equivalent circuit from those specifications alone. The required electromagnetic torque set the anchor at 9.55 Nm.
The design didn’t converge on the first pass, and the reason it didn’t is the interesting part. Coupling the air-gap flux density straight to the stator-tooth density drove the air gap to about 0.875 T — deeply saturated. That saturation inflated the magnetizing current, suppressed the series turn count, collapsed the magnetizing reactance, and wrecked the power factor.
The fix was to stop treating one flux density as a slave of the other. Decoupling the air-gap flux density and pinning it at 0.75 T let the torque-producing current dominate, raised the turn count to 228, and pulled the magnetizing reactance back up to 127 Ω — which is what actually bought the power factor. The lesson is that the constraint you assume for convenience is often the one holding the whole design hostage.
From there a parametric sweep of volumetric current density fixed the stator split ratio and aspect ratio inside NEMA thermal bounds, landing a 105.4 mm bore in a 155 mm outer diameter, a 112.3 mm effective length, and 36 stator slots. The rotor was harder: the bar width was locked first by the rotor-iron flux-density limits, then a fixed-point iteration converged the bar depth, the stator-referred rotor resistance, and the rotor leakage reactance simultaneously — each one changing the others until they stopped moving. It settled on a 12.63 mm × 4.61 mm bar.
The finalized design meets every primary target, with nominal torque landing on the target within the precision carried in the calculation:
| Metric | Target | Calculated |
|---|---|---|
| Nominal torque | 9.55 Nm | 9.55 Nm (error below 0.005%) |
| Output power | 1500 W | 1442 W (−3.84%) |
| Efficiency | 85.3% | 90.96% (+6.64%) |
| Power factor | 0.780 | 0.783 (+0.33%) |
Lessons
The two halves teach the same thing from opposite ends. Reverse-engineering the IPMSM, the discipline was distrust — expensive solves meant a silent bug in a transform could waste a hundred data points, so the transforms got tested before they got used, and every headline number got cross-checked a second way. Designing the induction motor, the discipline was noticing which assumption was doing the damage — the whole power-factor problem dissolved the moment the air-gap flux density stopped being coupled to the tooth density.
Both machines came down to the same habit: don’t trust the number until something independent agrees with it.
Further reading
The two texts this work leaned on for machine geometry, winding design, and the induction-motor sizing algorithm:
- Pyrhönen, Jokinen & Hrabovcová, Design of Rotating Electrical Machines (Wiley) — the reference for laminations, windings, and magnetic circuit design.
- Lipo, Introduction to AC Machine Design (Wiley-IEEE) — the deterministic sizing algorithm the induction motor was synthesized from.

