Determining Commutation Table of Sensored BLDC Motors


AuthorMark Angelo Tarvina
Emailmttarvina@gmail.com
CategoryMotor Control
Article Number1
Date Published22.Oct.2023
Date Updated03.Jan.2024

I. Overview

This tutorial describes a method on how to derive the commutation table of a Y-connected, sensored BLDC motor without access to the motor datasheet. In this method, we are going to look at the back-EMF of each motor phase and see how it corresponds to each hall sensor output. The idea here is that the back-EMF represents the voltage that should be applied by the motor driver/inverter to each phase of the motor during the commutation process. This is useful when controlling BLDC motors in sensored mode especially in motor control algorithms that fully utilize the hall sensor outputs (e.g. Six Step Commutation). Note that this method works regardless of the number of poles of the motor. Note also that in this method, you can arbitrarily assign the phase number/letter to each of the motor phase and hall sensor output. Once you labelled the motor phases and hall sensor outputs, you should stick to that configuration since that's where our generated commutation table will be applicable.

II. Prerequisites

This method requires the following tools/equipment/components:

III. Methodology

III.A. Setup

The diagram below shows the schematic of the test setup. An external 5V source is required to power the hall sensors of the motor. A 4.7kOhm resistor is used as a pullup for each hall sensor. Each phase of the motor is then loaded with a 100kOhm resistor, with the common node (equivalent to the internal neutral node of motor) connected to the oscilloscope and external supply's ground. A 4-channel oscilloscope will capture the waveforms of each hall sensor outputs (CH1-CH3) as well as the phase to neutral voltage of the motor (CH4).

setup

III.B. Procedure

  1. Connect your oscilloscope probes as shown in Section III.A. Make sure that you already labelled each motor phase and each hall sensor outputs arbitrarily. Usually the wire color of each motor phase corresponds to the same wire color on each hall sensor output. So if one phase of the motor is colored yellow, then there usually is a corresponding hall sensor wire of the same color. an example motor is shown below:

    MotorWireLabels

  2. Mount your motor in a stable platform and find ways for you to spin the shaft/rotor mechanically. You can attach the rotor shaft to a hand drill or you can wrap a knot around the shaft a few times so that when you pull the knot, it will spin the rotor shaft. Our goal here is to generate the back emf waveforms of the motor and capture the hall sensor outputs at the same time.

    MotorMount

  3. Adjust your scope view to capture at least one cycle of each hall sensor output. Take note of this pattern and make sure to capture this same pattern as we move along each phase of the motor.

  4. Spin the rotor shaft while probing Phase A of the motor. Make sure to spin it only in one direction. You can arbitrarily assign this spin direction as either clockwise or counter-clockwise depending on your preferred orientation. Capture the waveform and make sure that each hall sensor output displays at least one cycle.

  5. Repeat step #4 for Phases B and C.

  6. The shape of the back emf waveform will indicate what time of motor you are using. If it is trapezoidal, then your motor is a BLDC. If it is sinusoidal, then your motor is a PMSM (Permanent Magnet Synchronous Motor).

IV. Waveforms

IV.A. Phase A to Neutral (GND)

NewFile1

CH1: Hall A; CH2: Hall B; CH3: Hall C; CH4: Phase A - Neutral

IV.B. Phase B to Neutral (GND)

NewFile2

CH1: Hall A; CH2: Hall B; CH3: Hall C; CH4: Phase B - Neutral

IV.C. Phase C to Neutral (GND)

NewFile3

CH1: Hall A; CH2: Hall B; CH3: Hall C; CH4: Phase C - Neutral

IV.D. Decoding BEMF Pattern

Once the three waveforms have been captured, we can dissect it into 6 sections corresponding to each unique hall sensor state combination. We then look at the polarity of the back-emf for each phase. We assigned logic 1 when the hall sensor waveform is HIGH and logic 0 when the hall sensor waveform is LOW. Lastly, we label each waveform as follows:

commutation_sequence

V. Derived Commutation Table

Looking at the waveforms from the previous section, we now arrive at the commutation table shown below. Note that this commutation table will rotate the motor to a specific direction that you indicated in part III.B.4. This will be your forward commutation. Notice that in each commutation sector, one phase will always be positive (+), one phase will be negative (-), and one phase will be zero (0), and no two phases will have the same state.

Sector123456
Electrical Degrees60120180240300360
HALLA111000
HALLB001110
HALLC100011
VA--0++0
VB+0--0+
VC0++0--

Since the motor driver/inverter is usually powered from a single DC supply, we cannot provide a negative voltage similar to the back-EMF waveform but rather, we can assign the following states for each inverter phase:

Inverter StateHigh Side SwitchLow Side SwitchPhase Voltage
HIGHONOFFV_supply
HIZOFFOFFFloating
LOWOFFON0V

With this, we can now complete the commutation table with the corresponding drive state for each inverter phase. We can also include an integer equivalent of the hall sensor states with the output of HALLC as Bit0, HALLB as Bit1, and HALLA as Bit2 (most significant bit). This is useful later on when programming the motor control code in a microcontroller.

Sector123456
Electrical Degrees60120180240300360
HALLA111000
HALLB001110
HALLC100011
VA--0++0
VB+0--0+
VC0++0--
DRIVE ALOWLOWHIZHIGHHIGHHIZ
DRIVE BHIGHHIZLOWLOWHIZHIGH
DRIVE CHIZHIGHHIGHHIZLOWLOW
HALL State (Hall A = MSB)546231

Lastly, motor control heavily utilizes PWM to modulate the voltage applied to each motor phase. The table above can be modified for each specific PWM modulation scheme. For example: for high side PWM modulation, the resulting commutation results to (replacing HIGH state with PWM):

Sector123456
Electrical Degrees60120180240300360
HALLA111000
HALLB001110
HALLC100011
VA--0++0
VB+0--0+
VC0++0--
DRIVE ALOWLOWHIZPWMPWMHIZ
DRIVE BPWMHIZLOWLOWHIZPWM
DRIVE CHIZPWMPWMHIZLOWLOW
HALL State (Hall A = MSB)546231

VI. Reverse Commutation

The derived commutation table that we created will only rotate the motor in one specific spin direction (forward commutation). If you want to derive the reverse commutation of the same motor, there is no need to repeat the earlier steps. Using the derived commutation table in Part V, just swap out the inverter drive states as follows:

The resulting reverse commutation will now be:

Sector123456
Electrical Degrees60120180240300360
HALLA111000
HALLB001110
HALLC100011
VA--0++0
VB+0--0+
VC0++0--
DRIVE APWMPWMHIZLOWLOWHIZ
DRIVE BLOWHIZPWMPWMHIZLOW
DRIVE CHIZLOWLOWHIZPWMPWM
HALL State (Hall A = MSB)546231