# Six Step Commutation

Generate switching sequence for six-step commutation of brushless DC (BLDC) motor

Since R2020b

Libraries:
Motor Control Blockset / Controls / Control Reference

## Description

The Six Step Commutation block uses a 120-degree conduction mode to generate a switching sequence to implement six-step commutation (or trapezoidal commutation) on a three-phase BLDC motor. You can use the switching signals to operate switches and control the stator currents, and therefore, control motor speed and direction of rotation.

The block accepts the Hall sequence number or rotor position (from a position sensor such as a Hall or a quadrature encoder sensor) and the direction of torque as inputs. It uses the Hall sequence or position input to determine the sector where the rotor is present. The block computes the switching sequence such that it energizes the corresponding phases to maintain the torque angle (angle between rotor d-axis and stator magnetic field) of 90 degrees (with a deviation of 30 degrees). For example, as shown in the below figure, for hall state 5, phase A and phase C are triggered to spin the motor.

This figure is an example that shows the stator magnetic field phasors along with their default Hall sequence. It is recommended that you use Hall Sensor Sequence Calibration of BLDC Motor to obtain hall sequence and use this hall sequence with the block to achieve the six step commutation.

The block uses a commutation logic based on the Hall sequence to generate switching sequences.

Hall State (Hall a, Hall b, Hall c)Switching Sequence (AA' BB' CC')
AA'BB'CC'
4 (100)001001
6 (110)011000
2 (010)010010
3 (011)000110
1 (001)100100
5 (101)100001

This figure shows the stator magnetic field phasors along with the possible sectors (determined from the input rotor position).

The block uses a commutation logic based on the position sensor signals to generate switching sequences.

Position (θ)SectorSwitching Sequence (AA' BB' CC')
AA'BB'CC'
(-30°, 30°]1001001
(30°, 90°]2011000
(90°, 150°]3010010
(150°, 210°]4000110
(210°, 270°]5100100
(270°, 330°]6100001

## Ports

### Input

expand all

The Hall sensor sequence. If the Hall sensors are placed `120` degrees apart, the sequence number is between `1` to `6`. For a custom Hall sensor sequence (when the Hall sensors are placed `60` degrees apart), the sequence number is between `0` to `7`.

Note

If you provide an invalid Hall sequence to this port, the block sets the output port Ctrl to zero.

#### Dependencies

To enable this port, set Input type to `Hall`.

Data Types: `single` | `double` | `fixed point`

Position detected by either the Hall or quadrature encoder sensor in radians (`0` to `2π`), degrees (`0` to `360`), or per unit (`0` to `1`).

#### Dependencies

To enable this port, set Input type to `Position`.

Data Types: `single` | `double` | `fixed point`

Torque sign (+1 or -1) indicating the direction of rotation of the BLDC motor.

Data Types: `single` | `double` | `int8` | `int16` | `int32`

### Output

expand all

Switching sequence signals to implement six-step commutation (or trapezoidal commutation) on the BLDC motor.

Data Types: `single` | `double` | `fixed point`

## Parameters

expand all

Type of position sensor feedback connected to the block input.

Unit of position feedback input.

#### Dependencies

To enable this parameter, set Input type to `Position`.

Customized Hall sequence.

If the Hall sensors are placed 120 degrees apart, the sequence number is between 1 to 6. If the Hall sensors are placed 60 degrees apart, the sequence number is between 0 to 7.

#### Dependencies

To enable this parameter, set Input type to `Hall`.

Select this parameter for the block to enable the Commutation switching parameter.

#### Dependencies

To enable this parameter, set Input type to `Hall`.

Customized switching sequence for commutation of the BLDC motor.

#### Dependencies

To enable this parameter, set Input type to `Hall` and select Enable custom commutation parameter.

## Version History

Introduced in R2020b