### How to control a brushless DC motor?

Image source for this article: Portescap

"High power brushless motors must be controlled by PWM and require a microcontroller to provide startup and control functions. Do you understand the role of PWM in brushless DC motor control?"

Motion control system designers are often faced with challenges when selecting or developing electronics that use pulse-width modulation (PWM) to drive brushless DC motors. Paying attention to some basic physics can avoid unexpected performance problems. This article provides general guidelines for using PWM drives with brushless DC motors.

** Commutation of brushless DC motors**

Unlike brushed DC motors, which use mechanical commutation, brushless DC motors use electronic commutation. This means that the phases of the motor, in turn, are energized and de-energized according to the position of the rotor relative to the stator. For a three-phase brushless DC motor, the driver consists of six electronic switches (usually transistors), commonly referred to as a three-phase H-bridge (Figure 1). This configuration allows three bidirectional outputs to energize the three phases of the motor.

▎Figure 1: A three-phase motor H-bridge composed of six transistors is connected to three motor phases.

The transistors are turned on and off in a specific sequence to energize each phase of the motor to ensure that the magnetic fields induced by the stator and rotor magnets maintain optimal orientation (Figure 2).

▎Figure 2: Schematic cross-section of a slotless brushless DC motor. The blue area is the rotor with two pole permanent magnets. The magnetic field produced by the magnet is represented by the blue arrow. The orange area is the three-phase winding. A magnetic field is created when current flows from phase A to phase C, represented by orange arrows for simplicity. When the two arrows are aligned, the rotor will rotate. The drive reverses the phase (rotating the stator field, orange arrows) to ensure that the stator and rotor fields are kept as close as possible to 90 degrees (maximum torque is produced).

The motor can be driven with the widely used six-step trapezoidal commutation (Figure 3), or it can be operated to achieve a more advanced vector control, also known as Field Oriented Control (FOC), depending on the complexity of the electronics (Figure 4) .

▎Figure 3: Six-step commutation phase current and Hall sensor status.

Figure 4: Phase current using FOC amplifier.

**PWM regulation of brushless DC motors**

In brushed or brushless DC motors, the operating point (speed and torque) of the application may vary. The role of the amplifier is to vary the supply voltage or current, or both, to achieve the desired motion output (Figure 5).

▎Figure 5: Comparison of motion control architectures between brushed DC motors and brushless DC motors.

There are usually two different ways to change the voltage or current:

·Linear amplifier;

· Chopper amplifier.

Linear amplifiers adjust the power delivered to the motor by varying either voltage or current. Power not delivered to the motor is dissipated (Figure 6). Therefore, a large heat sink is required to dissipate the power, increasing the size of the amplifier and making it more difficult to integrate into the application.

▎Figure 6: Example of a linear amplifier powering a motor.

A chopper amplifier regulates voltage (and current) by turning power transistors on and off. Its main advantage is that it saves power when the transistor is turned off. This helps save battery life in applications, reduces heat generated by electronics, and allows the use of smaller electronics. In most cases, chopper amplifiers use the PWM method.

The PWM method involves varying the duty cycle (Figure 7) at a fixed frequency to adjust the voltage or current to within the desired target value. Note that one advantage of PWM chopping current compared to other methods is that the switching frequency is a fixed parameter. This makes it easier for electronic designers to filter electromagnetic noise. When the PWM transistor duty cycle is 100%, the voltage applied to the motor is the bus voltage. When the transistor duty cycle is 50%, the average voltage applied to the motor is half the bus voltage. When the transistor duty cycle is 0%, no voltage is applied to the motor.

▎Figure 7: Different PWM duty cycle. The frequency is the same for all operating conditions, and the average voltage (dashed line) is proportional to the duty cycle.

**Inductive Effects of Brushless DC Motors**

The DC motor is characterized by the inductance L, the resistance R and the back EMF E connected in series. Back EMF is the voltage produced by magnetic induction (Faraday-Lenz's law of induction), which is opposite to the applied voltage and is proportional to the motor speed. Figure 8 shows the motor with PWM on and PWM off.

▎Figure 8: Simplified equivalent circuit diagram of a DC motor with PWM on (left) and off (right). For simplicity, the circuit on the right corresponds to slow decay mode (current recirculation in the motor).

Now, for simplicity, we don't consider back EMF. The inductor will block the change in current when voltage is applied to the RL circuit or when the voltage is cut off. Applying a voltage U to the RL circuit, the current will follow a first-order exponential rise, the dynamics of which depend on the electrical time constant τ determined by the L/R ratio (Figure 9). After 5 times the time constant, it will gradually reach the steady state value, which is 99.7% U/R.

▎Figure 9: The current in the RL circuit rises exponentially.

The same exponential behavior will be observed when the RL circuit is discharged. In fact, the BLDC amplifier has a fairly high PWM frequency, and the current does not easily reach steady state. This frequency is usually higher than 50 kHz, so there are enough cycles to properly modulate the current during each commutation step. For a PWM frequency of 50kHz, the cycle time to turn the transistor off and on is equal to 20μs. Considering six-step commutation, one commutation time for a unipolar pair motor running at 40,000 rpm (667 Hz) takes 250 μs. Thus, during one-step commutation, there are at least 250/20=12.5 PWM cycles.

The electrical time constant τ of a brushless DC motor is several hundred microseconds. Therefore, during each PWM cycle, the current will have time to react. However, the mechanical time constant is in the range of a few milliseconds, so the factor between the mechanical time constant and the electrical time constant is 10. Therefore, the motor rotor itself does not have enough time to respond when the voltage is switched at a typical PWM frequency. Low PWM frequencies of several thousand Hz can cause rotor vibration and audible noise. It is recommended to use spectrum above audible frequencies, i.e. at least above 20 kHz.

**Limitations of BLDC Motor PWM**

PWM will cause the current to rise and fall every cycle. The change between the current minimum and maximum value is called current ripple. High current ripple can cause problems. It is recommended to keep it as low as possible. Motor torque needs to take into account the average current. The average current depends on the duty cycle and is independent of current ripple.

Unlike brushed DC motors, brushless DC motors do not have brushes. High current ripple has no effect on life itself. Current fluctuations can have a large effect on motor losses, generating unnecessary heat. There are two types of losses due to current ripple:

Joule loss. The current ripple will increase the root mean square (RMS) current value, which is considered in the Joule loss calculation. Ripple will generate additional heat, but will not increase the average current and therefore torque. Note that it is the square of the change in the RMS current function.

Iron loss. According to Faraday's Law of Electromagnetic Induction, a change in the magnetic field in a conducting material will generate a voltage, which then creates a current loop known as an eddy current. Iron losses are proportional to the square of the motor speed and the square of the motor current. According to actual measurements, when the current ripple is larger, the resulting additional iron losses increase significantly. Therefore, it is very important to keep the current ripple as low as possible.

**Recommendations for Minimizing Current Ripple**

We can formulate some recommendations to minimize ripple:

Reduce or adjust the power supply voltage. The current ripple is proportional to the supply voltage. High voltage to help reach extreme operating points where high speed or higher power is required. However, if the application does not require high speed or high power, a lower supply voltage will be beneficial to reduce current ripple. At the same load point, operating at a lower voltage will also increase the duty cycle, which will further reduce the current ripple. Be sure to keep the PWM duty cycle as close to 50% as possible, this is the worst case.

Increase the PWM frequency. The higher the frequency, the shorter the period of the PWM; therefore, the time for the current to rise is shorter. It is recommended that the PWM frequency of the brushless DC motor should not be lower than 50 kHz. PWM frequencies of 80 kHz or higher are more suitable for motors with very small electrical time constants.

Increase inductance. The inductance value of a brushless DC motor is very small. Adding external inductances is a good idea, as they slow the rise and fall of the current, reducing current ripple. In addition, the specified inductor value is given for a PWM frequency of 1 kHz. Since the motor inductance varies with the PWM frequency, at a typical PWM frequency of 50 kHz, the inductance may drop to 70% of the specified value.

The optimum value of the inductance is usually determined experimentally. Additional inductance needs to be added, as shown in Figure 10. While this solution can address current ripple issues, integrating additional inductors may not be easy, especially if space is limited. Therefore, it is usually wise to explore the other two options first.

▎Figure 10: Brushless motor with additional line inductance.

PWM has many advantages and is the most widely used solution in brushless DC motors. Setting the proper PWM voltage and using a higher PWM frequency will help reduce the ripple and avoid the use of extra inductors. Thanks to today's lower cost of electronic components, the use of high PWM frequencies is an easy solution.

When it comes to the size and weight of an electronic device (such as a portable device with embedded electronics), or when battery life is a key metric (extra energy dissipated by Joule losses in the internal resistance of an additional inductor), electrical designers are developing a movement These parameters should be considered when controlling the system.

Key Concepts:

■ Review PWM regulation of brushless DC motors.

■ Understand the limitations of BLDC motor PWM.

think for a while:

Are you addressing the challenges of selecting or developing electronics that use PWM to drive brushless DC motors?