Field-Oriented Control (FOC) Brushless DC (BLDC) Motor Algorithms

Last modified by Microchip on 2026/05/11 15:58

Introduction

Field‑Oriented Control (FOC) is a powerful motor‑control technique that enables Brushless DC (BLDC) and Permanent Magnet Synchronous Motors (PMSM) to achieve high efficiency, smooth torque and precise speed control. While traditional six‑step (trapezoidal) control is simple and effective for basic applications, FOC goes further by mathematically controlling the motor’s magnetic fields. This lesson explains why FOC is used, what physical quantities it controls, how reference‑frame transformations make the problem manageable and how sensorless and sensored implementations are applied in real systems.

Why Field‑Oriented Control is Used

A three‑phase motor is naturally a time‑ and speed‑dependent system. From the stator terminals, all voltages and currents appear as sinusoidal waveforms whose amplitude and frequency vary with operating conditions. These signals are difficult to regulate directly, especially when using conventional control techniques such as Proportional‑Integral‑Derivative (PID) compensators.

FOC addresses this problem by transforming the three‑phase system into a two‑dimensional rotating coordinate system. In this reference frame, the key motor quantities—torque‑producing and flux‑producing components—become time invariant under steady‑state conditions. This allows the motor to be controlled much like a DC motor, where torque is directly proportional to current.

To achieve this, the controller must measure and calculate all three stator phase currents. In FOC, the controlled variable is not voltage but current, because torque is directly related to current interacting with the rotor’s magnetic field.

What FOC Controls Physically

Brushless DC Motor Field-Oriented Control Diagram

In a PMSM or sinusoidally driven BLDC motor, the stator windings are excited with three sinusoidal currents spaced 120 electrical degrees apart. These currents create a rotating magnetic field in the stator. The rotor contains permanent magnets whose magnetic field interacts with the stator field to produce torque.

For maximum torque production, the stator magnetic field must be kept orthogonal (90 electrical degrees) to the rotor magnetic field. Torque is proportional to the sine of the angle between these fields and the sine function reaches its maximum at 90 degrees. FOC uses electronic control to maintain this quadrature relationship continuously, regardless of speed or load.

Reference Frames and the Illusion of DC Quantities

In a stationary reference frame, the three‑phase stator currents can be combined into a single rotating current vector that changes continuously with time. If, however, the reference frame itself is rotated synchronously with the rotor, the same AC quantities appear mathematically as DC values in steady state.

Brushless DC Clarke and Park Transformation Graphics

FOC uses two key mathematical transformations to achieve this:

The Clarke transformation converts the three‑phase currents into two orthogonal components in a stationary reference frame (α‑β). These two components form a vector that represents the instantaneous magnitude and direction of the stator magnetic field.

The Park transformation then rotates this vector into a reference frame aligned with the rotor’s magnetic field, producing the direct axis (d‑axis) and quadrature axis (q‑axis) components. In this rotating reference frame, the d‑axis aligns with the rotor flux, and the q‑axis is perpendicular to it.

By setting the d‑axis current to zero, the controller avoids unnecessary flux production and magnetic saturation. The q‑axis current is then used exclusively to control torque. Because these d‑q values are time invariant in steady state, standard Proportional‑Integral (PI) controllers can regulate them efficiently.

Back to Top

Space Vectors and Wave Space Distribution

Brushless DC Motor Space Vectors and Wave Space Distribution Diagram

Animation Source: Prof. M. Riaz, University of Minnesota

The spatial distribution of the stator magnetic field is often described using the concept of wave space distribution. At any instant, the three stator currents combine to form a single resultant magnetic field vector in the stator plane. This vector is called a space vector.

Brushless DC Space Vectors Diagram

Animation Source: Prof. M. Riaz, University of Minnesota

A space vector is a two‑dimensional mathematical representation of the combined effect of the three‑phase currents or voltages. In FOC, the space vector rotates smoothly in the stator plane, producing continuous torque with minimal ripple. This smooth rotation is the reason FOC delivers quiet operation, low vibration and high efficiency.

Back to Top

Motor Types and Control Approaches

FOC is primarily used with PMSM motors, but is also applicable to BLDC motors when sinusoidal current excitation is desired. Variants include sensored FOC, which uses encoders, resolvers or Hall sensors for rotor position feedback and sensorless FOC, which estimates rotor position from electrical signals.

Crude Vector Controller

Brushless DC Motor Crude Vector Controller

In contrast, crude BLDC control refers to basic six‑step commutation. It energizes two phases at a time without sinusoidal modulation or reference‑frame transformations. While simple and cost‑effective, crude control suffers from torque ripple, lower efficiency and limited performance. PI controller gains also vary with speed, making precise control difficult.

FOC overcomes these limitations by decoupling torque and flux control and maintaining optimal current alignment across a wide speed range.

Back to Top

Rotor Position Determination and Sensorless FOC

Brushless DC Motor Rotor Position Determination and Sensorless Field-Oriented Control Diagram

FOC requires knowledge of the rotor flux angle. This can be obtained using physical sensors such as encoders or resolvers, or through sensorless estimation.

Sensorless FOC Controller

In sensorless BLDC control, rotor position is often inferred by detecting zero crossings of back-Electromotive Force (back-EMF) in the floating phase. In PMSM sensorless FOC, more advanced observer algorithms are used, such as back‑EMF observers, sliding‑mode observers, or Phase‑Locked Loop (PLL) estimators.

These algorithms estimate the rotor angle from measured phase voltages and currents, allowing FOC to operate without mechanical sensors. At very low speeds, where back‑EMF is weak, special startup and alignment routines are required.

Microchip Technology provides extensive support for both sensored and sensorless FOC. dsPIC® Digital Signal Controllers (DSCs) and dsPIC33CK devices include high‑speed Analog‑to‑Digital Converters (ADCs), advanced Pulse Width Modulation (PWM) modules and Digital Signal Processing (DSP) engines optimized for Clarke and Park transformations. Microchip application notes such as "Sensorless Field Oriented Control (FOC) for a Permanent Magnet Synchronous Motor (PMSM) Using a PLL Estimator and Equation-based Flux Weakening (FW)" provide complete reference implementations.

Back to Top

Advantages and Tradeoffs of FOC

FOC delivers high efficiency through Maximum Torque Per Ampere (MTPA) operation, smooth and quiet motion, and excellent torque control over a wide speed range, including field‑weakening at high speeds. These advantages make it ideal for electric vehicles, drones, robotics, industrial automation and premium appliances.

The tradeoff is increased complexity. FOC requires accurate current sensing, fast processors, precise timing, and advanced algorithms. Hardware and development costs are higher than for crude BLDC control, but the performance benefits are often decisive.

Back to Top

Summary

FOC transforms a complex, time‑varying three‑phase motor system into a simple, DC‑like control problem by using rotating reference frames and vector mathematics. By independently controlling torque and flux and maintaining a 90‑degree relationship between stator and rotor magnetic fields, FOC achieves superior efficiency, smoothness and performance. Sensorless variants further reduce system cost and improve reliability. Microchip Technology’s dsPIC DSCs, motor‑control libraries and reference designs provide a practical and proven platform for implementing both sensored and sensorless FOC in BLDC and PMSM motor applications.

Back to Top

Learn More