FOC
How it works
On every cycle (typically a few to tens of kHz) the FOC loop runs these steps: 1) measure the stator phase currents (two of three phases suffice); 2) Clarke transform — convert (a, b, c) currents to a two-axis stationary frame (α, β); 3) read the rotor angle θ from an encoder/resolver/Hall sensors or a sensorless estimator; 4) Park transform — rotate (α, β) into the rotor-synchronous (d, q) frame, where the quantities become quasi-constant; 5) two PI controllers compare the measured id and iq currents against their references and compute the ud, uq voltages; 6) an inverse Park transform (d, q → α, β) and space-vector modulation SVPWM (or PWM) set the inverter transistor states. The d component is usually held at zero below base speed (for PMSM) and made negative for field weakening; the q component controls torque. Two variants exist: direct (DFOC, feedback) and indirect (IFOC, feedforward), with IFOC more common across the full speed range.
Problem solved
Simple scalar (V/f) control of AC motors gives poor torque at low and zero speeds and a slow, oscillatory dynamic response. Brushed DC motors are easy to control but wear out mechanically and need maintenance. FOC resolves this conflict: it lets brushless AC motors match the dynamics and control precision of a DC motor while keeping the reliability and power density of a brushless drive.
Components
Projects the three-phase stator currents (a, b, c) onto a two-axis stationary frame (α, β), reducing three signals to two orthogonal ones.
Rotates quantities from the (α, β) frame into the rotor-synchronous (d, q) frame using angle θ, turning AC signals into quasi-DC ones — which makes control with simple PI controllers possible.
Two independent PI controllers hold the measured id (flux) and iq (torque) currents at their references, producing the ud, uq voltages.
Converts the (d, q) voltage references back to three phases and sets the inverter transistor switching states via space-vector modulation (SVPWM).
Provides the rotor angle θ required by the Park transform — from an encoder, resolver or Hall sensors, or from a sensorless estimator computing θ from currents and voltages.
Official
Implementation
An incorrect encoder offset or angle (θ) measurement error misaligns the (d, q) frame, breaking flux/torque decoupling and reducing efficiency.
Torque accuracy depends on parameters (Rs, Ld, Lq, rotor constant) that drift with temperature and magnetic saturation.
A mistimed current-sampling window relative to the PWM and transistor dead-time introduce distortion and torque ripple.
Evolution
K. Hasse of TU Darmstadt formulates the concept of indirect field-oriented control of induction motors.
Felix Blaschke of Siemens publishes the principle of field orientation and direct control (DFOC), giving the method a formal industrial basis.
Werner Leonhard (TU Braunschweig) systematizes field-oriented drive theory; affordable microprocessors and DSPs enable practical implementations.
Cheap MCUs and open-source projects (e.g. ODrive, SimpleFOC) bring FOC into robot servo drives and actuators, including humanoids.
Hyperparameters (configurable axes)
Current-loop gains set the control bandwidth and the stability of torque regulation.
A higher frequency yields smoother current and quieter operation at the cost of inverter switching losses.
How often the full FOC cycle runs; it bounds the achievable torque dynamics.
Strategy for the d-axis current reference: zero below base speed, negative for field weakening, or MTPA for maximum torque per ampere.
Hardware requirements
An FPGA can run the Clarke/Park transforms and current loops with very low, deterministic latency at high switching frequencies.