Provide Feedback

BLDC Motor Control Algorithms: From Six-Step to Sensorless FOC

Raghumanth A
BLDS_Motor_Control_Blog

A BLDC motor is mechanically very simple. It has a permanent magnet rotor and a wound stator, and there are no brushes to wear out. All the intelligence is in the controller. The job of the controller is to decide when to push current into which winding. This decision is made thousands of times a second, and this is what decides whether the motor runs smoothly and efficiently, or with noise, torque ripple and wasted power.

There is not just one way to make this decision. Over the years the industry has developed a series of control algorithms, each one smoother and more efficient than the previous, and each one needing a more capable controller. In this post I will go through the three main ones – six-step, sinusoidal and FOC. After that I will come to a question which is common to all of them: how does the controller know where the rotor is? This brings us to sensorless control, where the position is estimated instead of measured, and why sensorless FOC in particular takes so much firmware effort.

 

The basic problem: commutation

Since a BLDC motor has no brushes, the electronic controller must energize the stator windings in the correct sequence to keep the rotor turning. This is called commutation. If commutation is done in step with the rotor, the torque is smooth. If it is done early, late or coarsely, the result is torque ripple, acoustic noise and loss of efficiency. Each algorithm below is basically a different answer to the question: how precisely do we commutate, and what does it cost in complexity?

 

Six-step (trapezoidal) commutation

This is the simplest method. At any point of time, current flows through two of the three phases and the third phase floats. There are six valid combinations, so the controller steps through six states per electrical revolution – one state every 60 electrical degrees. This is also called block or trapezoidal commutation, and it suits true BLDC motors whose back-EMF is trapezoidal.

The big advantage is simplicity. It needs only coarse position – six states – and three Hall sensors give this directly. The computation cost is almost nothing. The disadvantage is smoothness. The current cannot jump instantly, and the torque dips at every 60 degree boundary, so there is noticeable torque ripple and audible noise. For a low cost pump where noise is not important, this trade-off is fine.

 

Sinusoidal commutation

The next step is to drive all three phases at the same time with sinusoidal currents spaced 120 degrees apart, instead of switching abruptly between blocks. The operation becomes much smoother, and the torque ripple and commutation noise of six-step mostly disappear.

But this smoothness comes with two new costs. First, a sinusoidal drive needs continuous rotor position, not just six coarse states, so the sensing requirement goes up. Second, it controls the phase currents in the stationary (stator) frame, where these currents are actual AC quantities. As the speed increases, the current control loop has to track a higher and higher frequency sinusoid. A phase lag develops between the commanded and actual current, and both efficiency and performance drop at the top of the speed range. Also, sinusoidal control does not separate the current that produces torque from the current that only builds flux, so some efficiency is left on the table.

 

Field-Oriented Control (FOC)

FOC, also called vector control, is the current state of the art for smooth and efficient brushless drives. It fixes the high speed weakness of sinusoidal control by a clever change of reference frame.

 

Using the Clarke and Park transforms, FOC projects the three phase currents onto a coordinate system that rotates along with the rotor. In this frame the currents become two DC-like quantities: a direct-axis component (Id) aligned with the rotor magnetic field, and a quadrature-axis component (Iq) which actually produces the torque. The controller regulates Iq to command torque, and drives Id towards zero (for a surface magnet rotor). The two are fully decoupled. Since the controlled quantities are now basically DC, the current loops do not suffer from the frequency-dependent phase lag which hurts sinusoidal control. So FOC keeps its efficiency and smoothness over the whole speed range, and can even go beyond base speed with field weakening.

 

This performance is not free. FOC needs an accurate and continuous rotor angle, clean phase current measurement, and real computation in every control cycle: the forward transforms, two PI current loops, the inverse transforms, and space vector modulation (SVM) to synthesize the output. SVM deserves a separate mention – it uses the DC bus voltage more effectively than plain sinusoidal PWM, which extends the usable speed range. All this needs a capable microcontroller or dedicated control hardware.

(For completeness: Direct Torque Control, or DTC, is an alternative which controls torque and flux directly using hysteresis comparators and a switching table. It gives very fast dynamic response, but higher ripple and a variable switching frequency, and it is less common in cost sensitive BLDC applications.)

 

Comparing the three

 

Six-step

Sinusoidal

FOC

Position needed

Coarse (6 states)

Continuous

Continuous and accurate

Torque ripple

High

Low

Lowest

Efficiency

Moderate

Good (drops at high speed)

Best over full range

Acoustic noise

Higher

Low

Lowest

Compute cost

Very low

Moderate

Highest

The pattern is consistent. Every step up buys smoothness and efficiency, and pays for it in position accuracy and processing power.

 

 

The question under all of them: where is the rotor?

Note that every algorithm above depends on knowing the rotor position – coarsely for six-step, and precisely for sinusoidal and FOC. There are two ways to get it.

 

Measure it. Hall-effect sensors are cheap and give position of rotor. This is perfect for six-step, but too coarse for sinusoidal and FOC, which have to interpolate between the Hall edges. Encoders and resolvers give fine continuous position, but they are costly and bulky. Either way, a position sensor means extra wires, extra connectors, and one more failure point sitting inside a hot and vibrating motor – plus BOM cost on every unit shipped.

 

Estimate it. Sensorless control removes the position sensor and reconstructs the rotor angle from the motor’s own electrical signals – mainly the back-EMF which the spinning rotor induces in the windings. Two clarifications here, because “sensorless” is often misunderstood. One, it means no position sensor – current sensing (usually a single shunt) is still needed to run any of these algorithms. Two, smoothness is a property of the algorithm and not of being sensorless. Sensored FOC is just as smooth. Going sensorless removes a component, it does not add quietness.

 

Sensorless, algorithm by algorithm

 

For six-step, sensorless commutation is relatively easy. Since one phase is always floating, you can watch that phase for the back-EMF zero crossing, and commutate 30 electrical degrees after it. This is cheap and popular – but it works only because a phase is idle, and it fails at low speed where the back-EMF is too small to detect.

 

For sinusoidal and FOC, every phase is driven all the time, so there is no floating phase to observe. Instead you run an observer or estimator – a sliding mode observer, a Luenberger or Kalman type estimator, a flux observer – which reconstructs the angle and speed from the measured voltages and currents.

 

Why sensorless FOC is genuinely hard

 

Here is the catch which shows up in every observer based scheme: back-EMF is proportional to speed. At zero speed there is no back-EMF and nothing to observe. The estimator goes blind exactly when you need it the most – at startup. This gives two classic failure modes:

  • Zero speed startup. You cannot close the loop with no position signal, so position has to be established first. Either align the rotor to a known angle by injecting current, or actively probe it (initial position detection), and then ramp the motor open-loop until the back-EMF is strong enough to hand over control to the observer. Motors with rotor saliency can also be started with high frequency signal injection, which works down to standstill.
  • Windmilling. If the motor is already spinning at power-up – a fan coasting in a draft, or a pump under flow – you must detect that it is moving, find its speed and direction, and catch it smoothly. Catching a rotor which is spinning backwards without a jerk is a small engineering problem by itself.

Building the observer, the single shunt current reconstruction, the startup sequencer, and the state machine which takes the motor through standby, align, open-loop ramp and closed-loop drive – and then tuning all of it for one specific motor – is why sensorless FOC is often quoted in months of firmware effort.

 

The turnkey end: code-free sensorless FOC

The trend in the industry is that this hard-won algorithm keeps moving into silicon. Fully integrated, code-free sensorless FOC controllers now put the whole stack on-chip – the observer, the current loop, space vector modulation, and the startup state machine. Instead of writing control firmware, you write your motor parameters into the nonvolatile memory of the part and let the built-in algorithm run.

 

Allegro’s A89333 is a concrete example. It is a three-phase sensorless BLDC/PMSM controller which integrates single-shunt FOC, a position observer, and a startup state machine that handles the stationary, forward-windmill and reverse-windmill cases (windmill check, then IPD or align, then open-loop ramp-up, then closed-loop drive). You configure it over I2C – motor voltages and currents, speed limits, startup profile, control mode and read back speed and fault status on the same bus. It also has an integrated gate driver, a buck regulator, SVM with supply compensation, EMI slew rate control, and the usual protections (overcurrent, lock, thermal, plus power-loss and fault-mode braking). It targets low voltage drives (the 48 V A89333 family).

 

One useful thing for learning the sensorless startup behaviour described above: you can drive a real evaluation board remotely. The part is available on LiveBench, where you can watch the windmill-detect-and-catch and align-ramp-drive sequences play out on an actual motor, without building any hardware first. It is a convenient way to see the theory in this post working in practice.

 

Choosing where to land

There is no single “best” algorithm – only the right trade-off for the application. Six-step is cheap and adequate where noise does not matter. Sinusoidal buys smoothness for a moderate cost. FOC is the choice when efficiency and acoustics matter across the speed range, and sensorless FOC removes the position sensor on top of that – at the price of the startup and windmilling problems above. The direction of travel is clear: as silicon absorbs the algorithm, FOC-quality control which once needed months of specialist firmware increasingly comes as something you just configure and run.

 

Terminology note: “sensorless” refers to the absence of a position/speed sensor. Current sensing is still part of the system in every algorithm discussed here.

Share the Use Case:
  • Raghumanth A

    As an R&D Hardware Engineer at TenXer Labs, Raghu specializes in designing and optimizing DC-DC converter topologies, leveraging extensive expertise in power electronics design and its practical applications. His focus lies in advancing Motor Drive systems, Solar Energy harvesting, and standalone DC grid solutions to push the boundaries of technological innovation.

3D Hall-effect Sensor & 2D Angle Sensor on LiveBench
Table of Contents

Was the content on this page helpful?