Permanent magnet synchronous motors (PMSMs) are electric motors consisting of permanent magnets situated on the rotor and windings of the stator.

Their main difference from a Brushless DC motor (BLDC) is the shape of the back-EMF: trapezoidal for BLDC motors and sinusoidal for PMSMs, which have a very low torque ripple and little audible noise at the expense of a more complex control algorithm, requiring higher range MCUs.

The most common control technique for PMSMs is called a Field Oriented Control or FOC. For cost sensitive applications, a sensorless approach is often used, meaning only variables that need to be measured are the rotor currents.

Based on these inputs, the FOC algorithm computes the position of the rotor (position reconstruction), and generates the appropriate output signals.  This operation is mathematically intense compared to the simpler trapezoidal control.

Many microcontroller manufacturers offer specialised motor control solutions with supporting software and demo projects to reduce development time.

Recently we’ve worked on an electric bike project where a sensorless control was required, with a focus on efficiency and audible noise reduction. We used a STM32F103 MCU with the ST FOC library as a template to implement our own control strategy.