# Brushless motor control by reverse emf signals - understanding of the process

Published on February 16, 2016

# Brushless motor control by reverse emf signals - understanding of the process

When I began to develop a control unit for a brushless motor (motor-wheel), there were many questions about how to compare a real motor with an abstract circuit of three windings and magnets, on which, as a rule, everyone explains the principle of control of brushless motors.

When I implemented control by Hall sensors, I still did not really understand what was going on in the engine beyond the abstract three windings and two poles: why it was 120 degrees and why the control algorithm is just like that.

Everything fell into place when I began to understand the idea of ​​sensorless control of a brushless motor - understanding the process taking place in a real piece of iron helped to develop the hardware and understand the control algorithm.

Below I will try to paint my way to understanding the principle of controlling a brushless DC motor.

For the operation of a brushless motor, it is necessary that the constant magnetic field of the rotor is carried away behind the rotating electromagnetic field of the stator, as in a conventional DPT.

The rotation of the magnetic field of the stator is carried out by switching the windings using an electronic control unit.
The design of a brushless motor is similar to the design of a synchronous motor, if you connect a brushless motor to a three-phase AC network that satisfies the electrical parameters of the motor, it will work.

A certain commutation of the windings of a brushless motor allows you to control it from a constant current source. To understand how to make a commutation table of a brushless motor, you need to consider the control of a synchronous AC machine.

Synchronous machine
The synchronous machine is controlled by a three-phase AC network. The engine has 3 electric windings, offset by 120 electrical degrees.

Starting the three-phase motor in the generator mode, the EMF will be induced by a constant magnetic field on each of the motor windings, the motor windings will be distributed evenly, a sinusoidal voltage will be induced on each of the phases and these signals will be offset by 1/3 of the time (Figure 1). The shape of the EMF changes according to a sinusoidal law, the period of the sinusoid is 2P (360), since we are dealing with electrical quantities (EMF, voltage, current) we will call this electrical degrees and we will measure the period in them.

When a three-phase voltage is applied to the motor at each moment of time, each winding will have a certain current value.

Figure 1. Signal view of a three-phase AC source.

Each winding forms a magnetic field vector proportional to the current on the winding. Adding 3 vectors, you can get the resulting magnetic field vector. Since over time the current on the motor windings changes according to a sinusoidal law, the magnitude of the magnetic field vector of each winding changes, and the resulting total vector changes the angle of rotation, while the magnitude of this vector remains constant.

Figure 2. One electrical period of a three-phase motor.

Figure 2 shows one electric period of a three-phase motor, 3 arbitrary moments are indicated on this period, in order to construct a magnetic field vector in each of these moments, we postpone this period, 360 electrical degrees, on the circle. We place 3 motor windings shifted by 120 electrical degrees relative to each other (Figure 3).

Figure 3. Moment 1. The magnetic field vector of each winding (left) and the resulting magnetic field vector (right).

A magnetic field vector is created along each phase, created by the motor winding. The direction of the vector is determined by the direction of the direct current in the winding, if the voltage applied to the winding is positive, then the vector is directed in the opposite direction from the winding, if negative, then along the winding. The magnitude of the vector is proportional to the magnitude of the phase voltage at the given moment.
To obtain the resulting magnetic field vector, it is necessary to add the vector data according to the law of addition of vectors.
Similarly, the construction for the second and third points in time.

Figure 4. Moment 2. The magnetic field vector of each winding (left) and the resulting magnetic field vector (right).

So, over time, the resulting vector gradually changes its direction, Figure 5 shows the resulting vectors and shows the complete rotation of the stator magnetic field in one electric period.

Figure 5. View of the rotating magnetic field generated by the windings on the motor stator.

Behind this vector of the electric magnetic field, the magnetic field of the permanent rotor magnets is carried away at each moment of time (Figure 6).

Figure 6. A permanent magnet (rotor) follows the direction of the magnetic field generated by the stator.

This is how a synchronous AC machine works.

Having a direct current source, it is necessary to independently form one electric period with a change in the current directions on the three motor windings. Since the brushless motor is the same as the synchronous one in the generator mode and has identical parameters, it is necessary to proceed from Figure 5, which shows the generated rotating magnetic field.

Constant pressure
The DC source has only 2 wires “plus power” and “minus power”, which means that it is possible to supply voltage to only two of the three windings. It is necessary to approximate Figure 5 and select all the moments at which it is possible to commute 2 phases out of three.

The number of permutations from the set 3 is 6, therefore, there are 6 options for connecting the windings.
We will depict the possible switching options and select a sequence in which the vector will be rotated step by step further until it reaches the end of the period and starts over.

We will count the electric period from the first vector.

Figure 7. View of six magnetic field vectors that can be created from a DC source by switching two of the three windings.

Figure 5 shows that when controlling a three-phase sinusoidal voltage, there are many vectors that rotate smoothly over time, and when switching with direct current it is possible to obtain a rotating field of only 6 vectors, that is, switching to the next step should occur every 60 electrical degrees.
The results from Figure 7 are summarized in Table 1.

Table 1. The resulting sequence of switching motor windings.
 Plus power Minus power Winding not connected W U V W V U U V W U W V V W U V U W

The type of the resulting control signal in accordance with table 1 is shown in Figure 8. Where is -V switching to minus power supply (GND), and + V switching to plus power supply.

Figure 8. View of control signals from a DC source for a brushless motor. Yellow - phase W, blue - U, red - V.

However, the real picture from the motor phases will be similar to the sinusoidal signal from Figure 1. The signal has a trapezoidal shape, because at times when the motor winding is not connected, the rotor permanent magnets induce her EMF (Figure 9).

Figure 9. The type of signal from the windings of a brushless motor in operating mode.

On an oscilloscope, it looks like this:

Figure 10. Window view of the oscilloscope when measuring one phase of the motor.

Design features
As mentioned earlier, over 6 switching windings, one electric period of 360 electrical degrees is formed.
It is necessary to connect this period with the real angle of rotation of the rotor. Motors with one pair of poles and a trident stator are used extremely rarely; motors have N pairs of poles.
Figure 11 shows motor models with one pair of poles and with two pairs of poles.

but. b.
Figure 11. Motor model with one (a) and two (b) pole pairs.

The motor with two pairs of poles has 6 windings, each of the windings is paired, each group of 3 windings is offset by 120 electrical degrees. Figure 12b. one period for 6 windings is delayed. The windings U1-U2, V1-V2, W1-W2 are interconnected and in the design represent 3 phase output wires. For simplicity of the picture, no connections are displayed, but remember that U1-U2, V1-V2, W1-W2 are one and the same.

Figure 12, based on the data in table 1, shows the vectors for one and two pairs of poles.

but. b.
Figure 12. Diagram of magnetic field vectors for a motor with one (a) and two (b) pole pairs.

Figure 13 shows the vectors created by 6 commutations of the motor windings with one pair of poles. The rotor consists of permanent magnets, in 6 steps the rotor will rotate 360 ​​mechanical degrees.
The figure shows the end positions of the rotor, in the intervals between two adjacent positions, the rotor rotates from the previous to the next commutated state. When the rotor reaches this end position, the next switch should occur and the rotor will tend to a new preset position so that its magnetic field vector becomes aligned with the stator electromagnetic field vector.

Figure 13. The final position of the rotor with a six-speed commutation of a brushless motor with one pair of poles.

In motors with N pole pairs, it is necessary to go through N electrical periods for a complete mechanical revolution.
A motor with two pairs of poles will have two magnets with poles S and N, and 6 windings (Figure 14). Each group of 3 windings are offset from each other by 120 electrical degrees.

Figure 14. The final position of the rotor during a six-speed commutation of a brushless motor with two pairs of poles.

Determining the position of the rotor of a brushless motor
As mentioned earlier, for the motor to operate, it is necessary to connect the voltage to the necessary stator windings at the right time. It is necessary to apply voltage to the motor windings depending on the position of the rotor, so that the magnetic field of the stator is always ahead of the magnetic field of the rotor. To determine the position of the motor rotor and switching the windings, an electronic control unit is used.
Tracking the position of the rotor is possible in several ways:
1. By Hall sensors
2. By reverse EMF
As a rule, manufacturers equip the Hall sensors with the engine at release, so this is the most common control method.
Switching the windings in accordance with the signals of the back EMF allows you to abandon the sensors built into the motor and use as a sensor the analysis of the free phase of the motor, which will be induced by the magnetic field of the counter-EMF.

Management of a brushless motor with Hall sensors
To switch the windings at the right time, it is necessary to monitor the position of the rotor in electrical degrees. For this, Hall sensors are used.
Since there are 6 states of the magnetic field vector, 3 Hall sensors are needed, which will represent one absolute position sensor with a three-bit output. Hall sensors are also installed as windings, offset by 120 electrical degrees. This allows the use of rotor magnets as an acting element of the sensor.

Figure 15. Signals from Hall sensors for one electric revolution of the engine.

To rotate the motor, it is necessary that the stator magnetic field is ahead of the rotor magnetic field, the position when the rotor magnetic field vector is aligned with the stator magnetic field vector is final for this commutation, it is at this moment that the switching to the next combination must take place to prevent the rotor from hanging in a stationary position.
Let us compare the signals from the Hall sensors with the combination of phases that need to be switched (table 2)

Table 2. Comparison of the signals from the Hall sensors with the switching of the motor phases.
 Engine position HU (1) HV (2) HW (3) U V W 0 0 0 one 0 - + one 0 one + - 0 one 0 0 + 0 - one one 0 0 + - 0 one 0 - + 0 360 / N 0 one one - 0 +

With uniform rotation of the engine, a signal displaced by 1/6 of a period of 60 electrical degrees comes from the sensors (Figure 16).

Figure 16. View of the signal from the Hall sensors.

EMF control
There are brushless motors without position sensors. The position of the rotor is determined by analyzing the EMF signal in the free phase of the motor. At each moment of time, a “+” is connected to one of the phases to another “-” power supply, one of the phases remains free. Rotating, the magnetic field of the rotor induces an EMF in a free winding. As it rotates, the voltage in the free phase changes (Figure 17).

Figure 17. Change in voltage at the motor phase.

The signal from the motor winding is divided into 4 points:
1. The winding is connected to 0
2. The winding is not connected (free phase)
3. The winding is connected to the supply voltage
4. The winding is not connected (free phase)
Comparing the signal from the phases with the control signal, we see that the moment of transition to the next state can be detected by the intersection of the midpoint (half of the supply voltage) with the phase that is not currently connected (Figure 18).

Figure 18. Comparison of the control signal with the signal on the phases of the motor.

After detecting the intersection, pause and enable the next state. According to this figure, an algorithm for switching the state of the windings is compiled (table 3).

Table 3. Motor winding switching algorithm
 Current state U V W Next state one - Waiting for the midpoint to cross from + to - + 2 2 Waiting for the midpoint to cross from - to + - + 3 3 + - Waiting for the midpoint to cross from + to - four four + Waiting for the midpoint to cross from - to + - five five Waiting for the midpoint to cross from + to - + - 6 6 - + Waiting for the midpoint to cross from - to + one

The intersection of the midpoint is easiest to detect with a comparator, the midpoint voltage is applied to one input of the comparator, and the current phase voltage is applied to the second.

Figure 19. Midpoint detection by comparator.

The comparator is triggered when the voltage passes through the midpoint and generates a signal for the microcontroller.

Processing the signal from the motor phases
However, the signal from the phases when regulating the PWM speed differs in appearance and has a pulsed nature (Figure 21), in such a signal it is impossible to detect the intersection with the midpoint.

Figure 20. Phase signal view when adjusting the PWM speed.

Therefore, this signal should be filtered by an RC filter to obtain an envelope, as well as divided according to the requirements of the comparator. As the duty cycle increases, the signal will increase in amplitude (Figure 22).

Figure 21. Diagram of a signal divider and filter from the motor phase.

Figure 22. The envelope of the signal when changing the duty cycle of the PWM.

Midpoint scheme

Figure 23. The view of the virtual midpoint. The picture was taken from avislab.com/

The signals are removed from the phases through current-limiting resistors and combined, so we get the following picture:

Figure 24. View of the voltage waveform of the virtual midpoint.

Due to PWM, the midpoint voltage is not constant, the signal also needs to be filtered. The voltage of the midpoint after smoothing will be quite large (in the region of the supply voltage of the motor), it must be divided by a voltage divider to half the supply voltage.

After the signal passes through the filter, the oscillations are smoothed out and an even voltage is obtained with respect to which the intersection of the back emf can be detected.

Figure 26. Voltage after divider and low pass filter.

The midpoint will change its value depending on the voltage (PWM duty cycle), as well as the envelope of the signal.

The received signals from the comparators are fed to the microcontroller, which processes them according to the algorithm above.
That's all for now.