Generate your own commutation table: Trapezoidal control 3-phase BLDC motors using hall sensors

Other Parts Discussed in Post: DRV8350, DRV8320, DRV8306

A couple decades back, if you asked motor control engineers which type of motor they prefer the answer without hesitation would have been a brushed DC motor. That’s because brushed DC motors are the simplest to control. You just apply DC voltage to its terminal and they start rotating!

Another great feature of the brushed DC motor is that the commutator and brushes maintain 90deg angle between armature current vector and stator magnetic field producing maximum torque.  On the other hand, a disadvantage is that they run noisy and come with extra weight due to the commutators.

Trends are changing though thanks to recent advancement in semiconductor technology and availability of highly integrated motor drivers and pre-drivers in a single chip, such as the DRV8323R, DRV8353R, DRV8313 and the DRV8332.  Three-phase permanent magnet BLDC motors are gaining popularity in applications where traditionally brushed DC motors were used. The advantage of BLDC motors is that they do not have mechanical commutator/brushes and therefore provide higher efficiency, higher torque to weight ratio and run quieter. So if you decide to use 3-phase BLDC motor over brushed DC motor you have made the right choice.  Now you must be aware that these motors need electronic commutators instead of mechanical ones. The purpose of this blog is to provide procedures on how to derive a commutation table to properly control 3-phase BLDC motors.

To control BLDC motors, 6-step, or 120 degrees trapezoidal control based on hall-sensors offers a very elegant and cost-effective solution. Figure 1 shows the block diagram of this scheme in which the motor is driven by a 3-phase H-bridge inverter. The commutation table block provides logic sequence to drive 6-switches of inverters and plays a very important role in the 6-step commutation control.

 Figure 1: Block diagram of BLDC motor control using hall-sensors

The 6-step commutation or 120 degrees trapezoidal control is characterized by a two-phase ON operation to control the 3-phase inverter. In this control scheme, torque production follows the principle that current should flow in two of the three phases at the same time and that the angle between the stator magnetic field and the rotor flux is kept close to 90 degrees to get the maximum generated torque. Figure 2 describes the electrical waveforms of motor voltage, current and hall-sensor signals with respect to rotor angle of BLDC motor. Typically most of BLDC motors are supplied with 3 integrated hall-sensors placed 120 degrees from each other. This provides the required digital signals (high/low) for the controller to determine the rotor position in intervals of 60 electrical degrees. The 120 degrees hall placement is the most popular configuration because in normal conditions it never generates the codes in which all three hall-sensors signal are high or low simultaneously. This means binary codes 111 or 000 are invalid and this allows for an easier fault detection mechanism.  

The information given in figure 2 can be easily deducted in the form of six state commutation table for 3-phase inverter, as shown in table 1.  This table provides the proper sequence of excitation of motor phases with respect to binary code generated from 3-hall sensors. The correct commutation table is fundamental for a 6-step commutation algorithm to rotate the motor efficiently and to make sure that current is injected to proper phase at right time duration when its back-emf is in the flat-top region. For clarity of symbol convention, + sign in table1 means that back-emf in particular phase is positive and a positive current must be injected in phase, and –sign means back-emf is negative and negative current must be injected in the phase. Positive direction of current is assumed to be entering the motor phase terminal and negative current direction means leaving out of motor phase terminal. OFF means current is zero in the phase.

 

 Figure 2: Phase voltage, current and hall-sensor waveforms with respect to rotor electrical angle

                  Hall Sensors

                            Motor Phases

HA

HB

HC

PH_A

PH_B

PH_C

1

1

0

OFF

+

-

0

1

0

-

+

OFF

0

1

1

-

OFF

+

0

0

1

OFF

-

+

1

0

1

+

-

OFF

1

0

0

+

OFF

-

Table 1: Six state commutation table

If you’re able to get the above diagram of motor phases voltages with respect to hall-sensors from the datasheet or motor manufacturer, you can easily deduct the commutation table for a 3-phase inverter. However, it is found that there is significant inconsistency in the information provided by the manufacturer. There are several standards for labeling the motor phases: A,B,C or U,V,W or R, Y B. Likewise the hall-effect sensor connections are named and labeled: HALL A, B, C or Hall 1,2,3.  In these circumstances, it becomes difficult for the end user to determine the right commutation table.

The good thing among all these inconsistencies is that hall sensors are always consistent if they are placed 120 degrees apart.  This means that in between two consecutive commutation sequences only one hall-effect signal changes the logic either from high to low or from low to high, as evident in figure 2 and table 1.

By the way, some new Brushless-DC drivers integrate the six-step commutation table entirely! Devices that feature 1xPWM mode (for example DRV8320, DRV8350) have the option to take Hall-Effect Sensor inputs and do commutation for you. Other devices are more specifically designed to only operate in six-step, like the DRV8306. This topic is discussed further in the application note, “Brushless-DC Made Simple – Sensored Motor Control.”

Stay tuned for part 2 where we’ll discuss the steps to generate a commutation table for a given BLDC motor using a DC lab power supply on the actual motor sample without depending upon manufacturer’s data.

Anonymous
  • Hello Rajne!

    I am Mohamed  and I am doing my Automation Engineering. First of all thank you for the post. I went through your post and I clearly understood about the commutation table and its working. Currently I am doing a project on CONTROL OF BLDC MOTOR IN MATLAB .

    Now I am able to design the commutation table for the working of three phase H Bridge Inverter based on the signal of hall sensor.

    I have a  few queries on designing current controller. Usually  we need to calculate the error signal which will be fed into the current controller. I need to know  how this error signal is calculated because  we get the reference signal from the output of speed controller but what about the feedback signal for calculating the error signal since there are 3 phases we will have 3 feedback right? In other words  from where the feedback signal is taken to calculate the error for current controller?...  From here I have 2 questions

    1) Is the voltage which is fed for the 3 phase bridge inverter constant? If not then how should it be supplied from the current controller since the bridge inverter have only one source. But as I asked you earlier we have 3phases so three errors are calculated and how it will be given to the inverter.

    2) If it is a constant supply voltage to inverter then what is the purpose of the current controller and how does it work... I mean what will be the output of the current controller? And also if its a constant supply then how there will be change in speed....

    If my understanding is wrong about the controller please bare with me and try to clear my doubt... Waiting for your answer.... Thank you...

  • Hi,

    Is part 2 already posted? If yes please provide the link.

    I need to know how to generate the commutation table on our own exactly.

    Regards,

    Gurumoorthy

  • Avilash Mukherjee,

    Refer to DRV8332 PWm logic. I think, your PWM logic input to DRV8332 is not correct.

    Best RegardsMilan

  • Sir, I am working on DRV8332, but instead of getting  + - 0 in my outputs at a time, I am getting + + 0 in the outputs.Due to this motors do not seem to run at all,Can you shed some light on this ?