Discrete-time Brushless DC Motor current PI controller
Simscape / Electrical / Control / BLDC Control
The BLDC Current Controller block uses this algorithm to control current in a DC brushless motor.
The BLDC Current Controller produces the duty cycle for a BLDC block by implementing proportional-integral (PI) current control using this equation.
D is the duty cycle.
Kp is the proportional gain.
Ki is the integral gain.
Ts is the time period.
Is_ref is the reference current.
Is is the measured current.
Gzc is the zero cancellation polynomial.
The closed-loop transfer function for the PI control algorithm yields a zero that can be cancelled by using zero-cancellation in the feedforward path. The zero-cancellation transfer function in discrete-time is:
The block obtains control signals for the three phases by multiplying the duty cycle by the commutation signals. The resulting three control signals are normalized over the interval [-1, 1].
IsRef— Reference current
Reference current for control.
Is— Measured current
Reset— External reset
External reset signal (rising edge) for the integrator.
Hall— Hall sensor
Hall sensor data.
Direction— Motor direction
Direction of motor rotation.
vabcRef— Reference voltage
Reference voltage for the a-, b-, and c-phases.
Proportional gain— Controller proportional gain, Kp
1(default) | positive scalar
Proportional gain, Kp, of the controller.
Integral gain— Integral gain, Ki
5(default) | positive scalar
Integral gain, Ki, of the controller.
Anti-windup gain— Anti-windup gain, Kaw
1(default) | positive scalar
Anti-windup gain, Kaw, of the controller.
Sample time (-1 for inherited)— Block sample time
-1(default) | positive scalar
Time, in s, between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.
If this block is inside a triggered subsystem, inherit the
sample time by setting this parameter to
-1. If this block is in a
continuous variable-step model, specify the sample time explicitly using a positive
If you set Sample time (-1 for inherited) to
-1 and select the Enable zero
cancellation option, the Discretization sample
time parameter becomes visible.
Discretization sample time— Sample time for discretization
0.001(default) | positive scalar
Time, in s, between consecutive discretizations. Discretization is required for zero cancellation.
This parameter is only visible when both these conditions are met:
Sample time is set to
Enable zero cancellation is selected.
Enable zero cancellation— Feedforward zero cancellation
Option to use zero cancellation on the feedforward path.
If you select the Enable zero cancellation option and set
Sample time (-1 for inherited) to
the Discretization sample time parameter becomes
 Stirban, A., I. Boldea, and G. D. Andreescu. "Motion-Sensorless Control of BLDC-PM Motor With Offline FEM-Information-Assisted Position and Speed Observer." IEEE Transactions on Industry Applications. 48, no. 6 (2012): 1950-1958.