Robots Atlas>ROBOTS ATLAS
Robotics

FOC

ActivePublished: 21 October 2026Updated: 21 October 2026Published
Key innovation
Decomposes the AC motor's stator current into two orthogonal components — flux (d-axis) and torque (q-axis) — so an AC motor can be controlled as precisely and dynamically as a separately-excited DC motor.
Category
Robotics
Abstraction level
Pattern
Operation level
Robot control
Use cases
Servo drives and joint actuators of humanoid robotsWheel drives and traction control of mobile robotsBrushless-motor ESC controllers in dronesElectric-vehicle (EV) tractionIndustrial servo drives and CNC spindlesE-bike and electric-scooter drives

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

Clarke transformCoordinate transform

Projects the three-phase stator currents (a, b, c) onto a two-axis stationary frame (α, β), reducing three signals to two orthogonal ones.

Park transformRotor-frame projection

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.

d/q PI current controllersCurrent control loop

Two independent PI controllers hold the measured id (flux) and iq (torque) currents at their references, producing the ud, uq voltages.

Inverse Park and SVPWM modulator / inverterModulation and power stage

Converts the (d, q) voltage references back to three phases and sets the inverter transistor switching states via space-vector modulation (SVPWM).

Rotor position and speed feedbackAngle sensing

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

Implementation pitfalls
Rotor angle calibration errorHigh

An incorrect encoder offset or angle (θ) measurement error misaligns the (d, q) frame, breaking flux/torque decoupling and reducing efficiency.

Fix:Run an encoder-offset calibration routine at startup and verify alignment under load.
Dependence on motor parametersMedium

Torque accuracy depends on parameters (Rs, Ld, Lq, rotor constant) that drift with temperature and magnetic saturation.

Fix:Use online parameter estimation/adaptation or temperature compensation.
Current sampling timing and inverter dead-timeMedium

A mistimed current-sampling window relative to the PWM and transistor dead-time introduce distortion and torque ripple.

Fix:Sample current at the center of the PWM zero vector and apply dead-time compensation.

Evolution

Original paper · 1972 · Siemens Review · Felix Blaschke
The principle of field orientation, the basis for the TRANSVEKTOR control of rotating-field machines
Felix Blaschke
1968
Hasse proposes indirect field orientation (IFOC)
Inflection point

K. Hasse of TU Darmstadt formulates the concept of indirect field-oriented control of induction motors.

1972
Blaschke: direct control and TRANSVEKTOR (Siemens)
Inflection point

Felix Blaschke of Siemens publishes the principle of field orientation and direct control (DFOC), giving the method a formal industrial basis.

1985
Systematization and microprocessor implementations

Werner Leonhard (TU Braunschweig) systematizes field-oriented drive theory; affordable microprocessors and DSPs enable practical implementations.

2015
FOC in robotics and open-source projects

Cheap MCUs and open-source projects (e.g. ODrive, SimpleFOC) bring FOC into robot servo drives and actuators, including humanoids.

Hyperparameters (configurable axes)

Current PI controller gains (Kp, Ki)High

Current-loop gains set the control bandwidth and the stability of torque regulation.

PWM switching frequencyHigh

A higher frequency yields smoother current and quieter operation at the cost of inverter switching losses.

Current control loop rateHigh

How often the full FOC cycle runs; it bounds the achievable torque dynamics.

d-axis current reference (field weakening / MTPA)Medium

Strategy for the d-axis current reference: zero below base speed, negative for field weakening, or MTPA for maximum torque per ampere.

Hardware requirements

Good fit

An FPGA can run the Clarke/Park transforms and current loops with very low, deterministic latency at high switching frequencies.