Ground Embedded KO Subscribe

3D Labs

PMSM and Field-Oriented Control

See the current vector made by three phase currents and the rotor's d and q axes in 3D, and how iq, id and encoder angle error affect torque.

FOC targets

Phase currents ia · ib · ic

Rotating frame id · iq

Results

Electrical angle θ
Speed
Torque
Current magnitude |is|
Torque efficiency
Pole pairs
4

FOC views the three phase currents in a frame that rotates with the rotor. There the sine waves become steady values (id, iq) that a PI controller can track easily.

Try this

  1. Raise the iq target. The yellow current vector lies on the light-blue q axis and torque grows. The phase currents in the upper graph are sine waves, but in the d-q graph below they are steady values. That is the heart of FOC.
  2. Set the encoder angle error to 30°, 60°, 90°. The controller believes it is putting current on the q axis, but the real vector is off, so torque falls by cos(error). At 90° the same current gives zero torque. This is why initial angle alignment matters.
  3. Give id a negative target and the vector tilts against the d axis, weakening the magnet flux (field weakening). It reduces back-EMF so the motor can spin faster.
  4. Turn on slow motion to watch the current vector turn together with the rotor.

Coordinate transforms

Clarke:  iα = ia,  iβ = (ia + 2·ib) / √3
Park:    id =  iα·cosθ + iβ·sinθ
         iq = −iα·sinθ + iβ·cosθ
Torque = 1.5 · pole pairs · flux · iq   (surface-magnet motor)
FREE PDFGet the 3 free ebooksIf you want what you just ran written down: BLDC motor control, serial communication and sensors at book length. PDFs are in Korean.Get them free →

This lab is also available in Korean. More labs: all 3D labs.