FOC Reference 03 The machine

Torque and MTPA

Every page so far has commanded and moved on. That is the right default and it is worth understanding why — and then understanding precisely where it stops being right, because on some machines the cost of leaving it there is large.

The magnet torque branch, linear in iq, and the reluctance branch, quadratic and requiring current on both axes. linear in current quadratic in current needs negative d-axis both axes i q torque-producing i d flux-producing magnet torque (3/2)·p·λ m ·i q reluctance torque (3/2)·p·(L d L q )·i d ·i q + shaft torque what MTPA maximises
Two mechanisms, different in kind. The magnet branch needs only iq; the reluctance branch needs both axes and only helps when id is negative.

Two ways to make torque

The magnet term is the one everybody pictures: rotor field, stator field, they pull on each other. It is linear in current and needs only .

The reluctance term is different in kind. It has nothing to do with the magnets. A rotor whose iron path is easier in one direction than another will twist to align its easy axis with the stator field, exactly as an unmagnetised piece of steel jumps to a magnet. It needs current on both axes, so it is quadratic in current.

That difference in order decides everything on this page. Magnet torque grows linearly with current; reluctance torque grows as the square. At low current reluctance is negligible. At high current it can dominate.

The sign, which is the part people get wrong

For an interior-magnet machine , so is negative. The reluctance term is therefore positive only when is negative.

Useful reluctance torque always needs negative d-axis current. Positive does not merely waste current — it actively subtracts torque. The optimum lives in the second quadrant of the current plane and never the first.

On the bench Two numbers tell you whether any of this applies to your machine. The saliency ratio is 1.0 for a surface-magnet motor, 1.5–3 for an interior-magnet one. The characteristic current is the current scale at which the reluctance term becomes comparable to the magnet term — 71 A for the reference machine. If you run at a small fraction of it, MTPA is not worth the code.

The current plane

Draw horizontally and vertically and every question becomes geometric.

  • Constant-torque contours are hyperbolas, because — for a given torque, each demands a particular . On a non-salient machine the bracket has no in it, so the contours are horizontal lines.
  • The current limit is a circle. It is what the inverter and the machine’s thermal rating allow.
  • MTPA is the locus of points where a torque contour is tangent to a current circle: the least current for that torque, or equivalently the most torque for that current.
Machine
Operating point
Drag the point, or use the arrow keys.
Drag the operating point. The grey hyperbolas are constant torque, the circle is the current limit, and the blue curve is the MTPA locus. The two markers on the circle are id = 0 and the true optimum — the gap between them is what the default strategy costs.

Set the saliency to 1.00 and the contours flatten into horizontal lines, the MTPA locus collapses onto the axis, and the gain goes to zero. That is the proof that is exactly optimal on a surface-magnet machine — not a convention, a result.

Then raise the saliency and watch the locus bend left.

How much is actually on the table

For the reference machine (, characteristic current 71 A):

CurrentOptimum angle βTorque at Torque at MTPAGain
5 A4.0°−0.35 A255 mN·m256 mN·m0.2%
10 A7.8°−1.36 A510 mN·m515 mN·m1.0%
20 A14.3°−4.95 A1020 mN·m1057 mN·m3.7%
40 A23.1°−15.66 A2040 mN·m2292 mN·m12.4%
60 A28.1°−28.27 A3060 mN·m3776 mN·m23.4%
80 A31.3°−41.57 A4080 mN·m5532 mN·m35.6%

Below about a tenth of the characteristic current the gain is under 1% and not worth the complexity. Approaching it, the gain is a third. MTPA is a peak-torque feature, which is why it tends to matter for traction and power tools and not for fans.

And the benefit scales strongly with saliency. At a fixed 30 A:

Characteristic currentMTPA gain
1.000%
1.20202 A1.1%
1.5771 A7.6%
2.0040 A19.1%
3.0020 A51.6%

A machine designed around reluctance torque does not merely benefit from MTPA — it is unusable without it.

The closed form, and a trap

Maximising torque on a circle of fixed radius gives an exact solution. Writing :

No iteration, no lookup table. Cheap enough to evaluate every control period.

On the bench The form you will more often see quoted is

which is the same optimum parameterised by current magnitude, not by . The two are not interchangeable. Substituting into the magnitude form gives an answer that is wrong by a few milliamps — small enough to look right, large enough to be wrong, and invisible unless something independent checks it.

The site’s implementation carries both, and a test drives them from consistent inputs and asserts they land on the same point. That test exists because the first version of this page had exactly that bug.

Both reduce to when , as they must.

Where it fits in the loop

MTPA replaces the constant with a function of :

/* Torque request -> current references. */
float iq_ref = torque_ref / kt;             /* first cut, magnet term only */
float id_ref = mtpa_id(iq_ref);             /* the closed form above */

/* Enforce the current limit on the VECTOR, not each axis. */
const float mag = sqrtf(id_ref*id_ref + iq_ref*iq_ref);
if (mag > i_limit) { id_ref *= i_limit/mag; iq_ref *= i_limit/mag; }

The current loop underneath does not change at all. That is the payoff of the structure the site has been building: MTPA is a change to the references, and everything downstream — the PI loops, the modulator, the bridge — is untouched.

On the bench Note the limit is applied to the vector. Clamping and separately allows times the intended current through the machine on the diagonal — the same mistake, in the same place, as the anti-windup bug on the current loop page. Whenever two axes share one physical budget, the limit belongs on the magnitude.

What it costs

MTPA is not free, and the honest list is short but real.

It depends on parameters you do not know precisely. falls with temperature, and , both fall with current as the iron saturates. A formula fed nominal values drifts away from the true optimum at exactly the high currents where MTPA matters most. Production drives use a two-dimensional lookup table measured on a dynamometer, not the closed form.

The torque constant stops being a constant. With , torque is and that is the end of it. On the MTPA locus torque is quadratic in current, so any outer loop that assumes a linear torque constant now has a gain that varies with operating point.

It uses up voltage. Negative produces the same flux-weakening effect that field weakening uses deliberately — which is a benefit at high speed, and at low speed simply means a larger current vector for the same torque.

What to take away

  • Torque has a magnet term (linear, needs only ) and a reluctance term (quadratic, needs both axes). Only the second one makes MTPA a question.
  • Reluctance torque requires negative on a machine with . Positive subtracts torque.
  • is exactly optimal on a surface-magnet machine — a result, not a convention.
  • The gain scales with current and with saliency: 1% at 10 A on the reference machine, 12% at 40 A, and over 50% on a strongly salient machine.
  • Check before writing any of it. Running well below the characteristic current means there is nothing to win.
  • Apply the current limit to the vector magnitude, never per axis.

Next: what happens when the back-EMF reaches the DC link and negative stops being an optimisation and becomes a necessity.