Back to blog

BLDC motor control fundamentals with simulation examples

Power Electronics

09 / 17 / 2026

BLDC motor control fundamentals with simulation examples

Key Takeaways

  • Six step trapezoidal commutation keeps the switching mechanism visible, which makes it the right first drive for anyone learning motor control properly.
  • Torque ripple in a six step drive comes from current overlap at each of the six commutation instants rather than from poor controller tuning.
  • Hall sensor and sensorless back EMF methods diverge mainly at startup, and that single difference decides the sensor choice in most production powertrains.

A brushless DC drive switches current between windings at the right rotor angle, and every design choice follows from how well that switching lines up.

Electric motor systems account for 53% of global electricity consumption, so the switching logic inside a three phase inverter isn’t a niche concern. Six step trapezoidal control is where that logic is easiest to see, because each commutation is a discrete event you can point at on a scope trace.

Torque ripple isn’t a flaw you tune out of a six step drive later. It’s the arithmetic result of finite current rise and fall times at each of the six switching instants, and a simulation bench is the only place to measure it before touching a dynamometer.

What BLDC motor control means and how commutation works

BLDC motor control is electronic commutation. A three phase inverter energizes two of the three stator windings at any moment and switches which pair carries current as the rotor turns, holding the stator field roughly 90 electrical degrees ahead of the rotor so torque stays near maximum.

The hardware is six switches in three half bridges. Six valid conduction states cover one electrical revolution, each held for 60 electrical degrees. A 4 pole motor turns through two electrical revolutions per mechanical turn, so a 3000 rpm shaft asks the inverter for 600 commutation events per second.

Two phase conduction works because of the back EMF shape. A BLDC machine is wound so its back electromotive force is trapezoidal with a flat top near 120 electrical degrees, and constant current across that region gives constant torque. Machines wound for sinusoidal back EMF don’t behave that way, hence the BLDC or PMSM label.

How the six step trapezoidal commutation sequence drives the inverter

The controller steps through six switch pairs in a fixed order for one direction of rotation. Each state ties one winding to the positive rail and another to the negative rail while the third floats, and the sequence advances one state every 60 electrical degrees of rotor travel.

Speed control rides on top of that sequence. The high side switch is pulse width modulated at 10 to 20 kHz while the low side switch of the conducting pair stays on, so average winding voltage tracks the duty cycle, and one current regulator closes around a DC bus shunt reading. Reverse the order and the shaft spins backwards. Skip a state through a missed position edge and the motor stalls with two windings fighting, which is why a fault appearing only above 2000 rpm is almost always a timing problem rather than a sequence problem.

How Hall sensor commutation reads rotor position in 6 sectors

Three Hall effect sensors spaced 120 electrical degrees apart produce a 3 bit code that changes six times per electrical revolution. Each valid code maps to exactly one inverter state through a lookup table, so the controller needs no angle calculation.

That lookup table is the entire position estimator. Codes 101, 100, 110, 010, 011 and 001 appear in a fixed order, while 000 and 111 mean a failed sensor or wrong cabling. Mounting the sensor board 5 mechanical degrees out of alignment shifts every commutation instant by the same electrical error, and the cost shows up as higher current for the same output.

Resolution is the honest limit. Six edges per electrical cycle means position is known to within 60 degrees and nothing finer, so speed from edge timing gets noisy below a few hundred rpm. Adding a fourth sensor doesn’t help. Labs needing finer position move to an encoder or a resolver.

“That lookup table is the entire position estimator.”

Sensorless back EMF commutation trades sensors for startup complexity

Sensorless commutation reads back EMF on the floating winding, detects the instant it crosses the neutral voltage, then waits 30 electrical degrees before switching to the next state. The unconnected phase acts as its own position sensor, so the Hall board and its cabling disappear.

Zero crossing detection is rarely clean. PWM chopping on the conducting phases injects noise into the floating winding, so implementations sample only during the PWM off time or apply a blanking window of tens of microseconds after each commutation.

Standstill is the real constraint. A stationary rotor produces no back EMF, so the drive aligns the rotor with a fixed current vector and ramps commutation frequency open loop until the signal is strong enough to close the loop, usually near 5% to 10% of rated speed. Pumps and fans tolerate that blind startup. A traction drive making full torque from zero speed under load does not, which explains most of the sensor choices you’ll find in production powertrains.

Where torque ripple comes from at each commutation instant

Commutation torque ripple appears because the outgoing phase current does not fall at the same rate the incoming phase current rises. During that overlap the three winding currents stop producing flat torque, and the shaft sees a dip or a spike six times per electrical revolution.

Rise and fall rates are set by the voltage available across the winding inductance, and the two rates match only when DC bus voltage sits near 4 times the phase back EMF. Below that speed the incoming current rises more slowly than the outgoing current falls and torque dips. Above it the outgoing current lingers and torque spikes instead. Cogging torque and sensor misalignment stack on to that baseline, so separating the sources takes a model where each can be switched off independently.

“Commutation torque ripple appears because the outgoing phase current does not fall at the same rate the incoming phase current rises.”

How six step control compares with field oriented control

The main difference between six step control and field oriented control is how finely each knows the rotor angle. Six step resolves position into 60 degree sectors and switches in discrete jumps, while field oriented control regulates current continuously in a rotor aligned frame.

Comparison point Six step trapezoidal control Field oriented control
Rotor position Six 60 degree sectors pick the next switch pair. A continuous rotor angle is needed every interrupt.
Current regulation One regulator acts on DC bus current since one pair conducts. Two regulators act on torque and flux currents.
Torque ripple Ripple appears six times per electrical revolution. Ripple stays low since winding current is continuous.
Processor load A lookup table and one PI loop suit an 8 bit microcontroller. Frame conversions and two PI loops want a 32 bit core.
Where it fits Fans, pumps and cost sensitive drives that start unloaded. Servos, traction drives and anything where acoustic noise matters.

Six step control wins on cost and on how quickly a student traces a fault to a switch, while field oriented control wins on ripple and acoustic noise at the price of a faster processor and a finer position source.

Simulation examples a teaching lab can actually run this term

Simulation examples a teaching lab can actually run this term

A useful BLDC lab sequence starts with an ideal inverter model and adds one non-ideality at a time. Students run commutation open loop, add Hall feedback, add current regulation, then measure torque ripple against the switching instants on the same time axis.

  • Open loop six step commutation at fixed duty cycle, confirming switching order and timing.
  • Hall feedback with a deliberate 5 degree mounting error, showing how misalignment wastes current.
  • Sensorless back EMF detection with a blanking window and an open loop startup ramp.
  • Commutation torque ripple at three speeds around the point where bus voltage equals 4 times the back EMF.
  • One fault injection such as an open winding or a stuck Hall code.

Electric powertrain testing has moved from specialist groups into ordinary coursework, and electric car sales exceeded 17 million in 2024. Running these exercises at hardware in the loop rates changes what students notice, because an OPAL-RT OP4512 executing an RT-LAB model at sub microsecond FPGA time steps resolves PWM edges, so the current overlap causing torque ripple appears as a waveform instead of an average.

What disciplined commutation work builds in a control engineer

Engineers who have built a six step drive from the switching table upward read every later control problem faster. They know what a commutation instant looks like, what a missed position edge does to the shaft, and why a torque ripple figure quoted without a speed attached tells you almost nothing.

The habit that carries forward is measuring before tuning. A student who blames the current regulator for rough running, when the Hall board sits a few degrees off, learns more from one measurement than from an afternoon of gain adjustment.

Teaching labs that put the model, the inverter and the machine on one time base give students results they trust, which is what OPAL-RT builds for powertrain groups. The mathematics of field oriented control lands better on someone who already knows what those six steps were doing and why the shaft never felt perfectly smooth.