Sensorless control: How an observer estimates the motor's position

Many controllers can operate a motor without any position sensors; this is known as "sensorless" control. The controller then continuously calculates the position of the rotor based on its measurements. This calculation is called an "observer." This guide explains its principle, its strengths, and its limitations.

The essentials

  • When turning, a permanent magnet motor generates a voltage, and the direction of this voltage indicates the position of the rotor.
  • The observer recalculates the voltage based on the applied voltage and the measured current, by subtracting the power consumed by the resistance and inductance of the windings.
  • It requires accurate values for the motor's resistance, inductance, and flux – and that's what the detection process provides.
  • At a standstill and at very low speeds, there's very little that can be measured; this is a major limitation of sensorless systems.

The principle: listen to the generator

A rotating permanent magnet motor acts as a generator: it produces a voltage, known as the back electromotive force (back EMF), which is proportional to its speed and oriented according to the position of the magnets. If we know this voltage, we can determine the angle of the rotor.

The controller cannot measure this directly, as it is supplying power to the motor itself. However, it knows the voltage it is applying and measures the current. The applied voltage is distributed across three components:

  • the drop in resistance of the windings, which is proportional to the current;
  • The portion absorbed by the inductance is proportional to the variations in current;
  • The back EMF (electromotive force), which is what we are looking for.

By subtracting the first two values from the applied voltage, the third value remains. That's the entire task of the observer.

The current monitor

A common method focuses on magnetic flux rather than voltage. By integrating the applied voltage over time, and subtracting the voltage drop across the resistance, we obtain the total magnetic flux seen by the windings. By subtracting the portion attributable to the current (the inductance multiplied by the current), we are left with the magnetic flux from the magnets, the direction of which indicates the angle of the rotor.

The integration process has a flaw: even the smallest error accumulates and affects the result. Modern observers correct this by constantly enforcing that the amplitude of the estimated flux remains equal to the known flux of the magnets. That's why the motor detection measures this flux.

A second stage, often a phase-locked loop (PLL), smooths the obtained angle and derives the speed from it.

What deceives him

  • Resistance that changes with heat: Hot copper offers more resistance. An unknown resistance value can skew the estimation, especially at low speeds where the back-EMF force is weak. See our guide on motor overheating.
  • Incorrectly measured inductance: The error increases with current and the rate of change of current.
  • Weakening magnets when they heat up: the actual magnetic flux deviates from the known flux.
  • Inaccurate measurements: Current sensor offset, actual applied voltage differs from the setpoint due to dead time.

The braking limit

When the motor is stationary, it produces no voltage: there is nothing for the observer to detect. At very low speeds, the signal is so weak that errors become dominant. This is why a sensorless motor can hesitate or vibrate when starting under load, while it runs perfectly smoothly once it's up to speed.

Three solutions are available:

  • Open-loop startup: The controller spins the motor blindly until the motor reaches a speed at which the observer takes over
  • High-frequency injection: The controller adds a small, fast signal and observes how the motor's inductance changes with the angle. This works when the vehicle is stationary, especially on motors with strong saliency, such as interior permanent magnet (IPM) motors;
  • Hall sensors at startup, then switching to the observer mode while riding: this is the most common solution on electric scooters. See our guide on position sensors.

Why is sensorless technology so popular?

  • No sensors to install, wire, or protect from water and heat.
  • An estimate that is often more precise than Hall sensors, especially once the motor is running.
  • A backup solution in case a sensor fails while riding.

Frequently Asked Questions

Why does the VESC firmware offer multiple observer options?

Because no single option is perfect in every situation. Some are more tolerant of parameter errors, while others handle rapid changes better or operate more effectively at lower speeds. The choice depends on the motor and the intended use, and the results are always verified through real-world testing.

Can a motor that was initially detected correctly malfunction without a sensor after prolonged use?

Yes: When heated, the resistance of the windings increases, and the magnets weaken slightly. The difference between values measured when cold can negatively affect the estimation at low speeds. Some controllers compensate for the resistance based on the motor temperature.

Is a sensorless system suitable for an electric scooter?

When riding, it works very well. However, when starting from a standstill, especially on inclines or with a heavier rider, the Hall sensors remain valuable. Combining both methods is the best option.