> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/machines/blocks/machines-control/ac-drives/brushless-dc-motor-drive.md).

# Brushless DC Motor Drive

## Description <a href="#description" id="description"></a>

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-0afc58ff8564ca0d583d0183eb2de7894c6e3794%2FAC7_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Brushless DC Motor Drive** block, located in the **OPAL-RT SPS Software/Electrical Machines/Control/AC Drives** library, commonly called the **AC7 motor drive**, models a brushless DC motor drive using Permanent Magnet Synchronous Motor (PMSM) with trapezoidal back electromotive force (BEMF) This drive features closed-loop speed control through stator current control, using Hall sensors. The speed control loop outputs the reference electromagnetic torque of the machine. The reference stator phase currents corresponding to the commanded torque are derived based on the machine torque constant and the Hall sensor signals. The reference phase currents are then used to obtain the required gate signals for the inverter through a hysteresis-band current controller.

The main advantage of this drive compared to voltage-controlled, PWM inverter BLDC drives, is its smooth dynamic response. This drive provides inherent current/torque-limiting capability during motor startup and acceleration. However, to operate properly, the drive requires a close-loop torque control based on machine currents signals.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-34ce5b7fce7c424794655ab151e31f4a5815ec10%2FAC8_model_diagram.png?alt=media" alt=""><figcaption></figcaption></figure>

The Brushless DC Motor Drive block uses these blocks from the Electric Drives / Fundamental Drive Blocks library:

* Speed Controller (AC)
* Current Controller (Brushless DC)
* DC Bus
* Inverter (Three-Phase)

The model is discrete. Good simulation results have been obtained with a 2 *µ*s time step. To simulate a digital controller device, the control system has two different sampling times:

* Speed controller sampling time
* Current controller sampling time

The speed controller sampling time has to be a multiple of the current controller sampling time. The latter sampling time has to be a multiple of the simulation time step. The average-value inverter allows the use of bigger simulation time steps since it does not generate small time constants (due to the RC snubbers) inherent to the detailed converter. For a current controller sampling time of 40 *µ*s, good simulation results have been obtained for a simulation time step of 40 *µ*s. The simulation time step cannot be higher than the current controller time step.

### Model Specifications <a href="#model-specifications" id="model-specifications"></a>

The library contains a 3-hp drive parameter set. The specifications of the 3-hp drive are shown in the following table.

**3 HP Drive Specifications**

|                          | 3 HP Drive                                              |
| ------------------------ | ------------------------------------------------------- |
| **Drive Input Voltage**  | <p>Amplitude: 220 V<br>Frequency: 60 Hz</p>             |
| **Motor Nominal Values** | <p>Power: 3 hp<br>Speed: 1650 rpm<br>Voltage: 300 V</p> |

## Parameters <a href="#parameters" id="parameters"></a>

### General <a href="#general" id="general"></a>

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Output bus mode</strong></td><td>Select how the output variables are organized.<br>If you select <strong>Multiple output buses</strong> (default), the block has three separate output buses for motor, converter, and controller variables.<br>If you select <strong>Single output bus</strong>, all variables output on a single bus.</td></tr><tr><td><strong>Model detail level</strong></td><td>Select between the detailed and the average-value inverter. Default is Detailed.</td></tr><tr><td><strong>Mechanical input</strong></td><td><p>Select between the load torque, the motor speed and the mechanical rotational port as mechanical input. Default is Torque Tm.</p><p>If you select and apply a <strong>load torque</strong>, the output is the motor speed according to the following differential equation that describes the mechanical system dynamics:</p><p>This mechanical system is included in the motor model.</p><p>If you select the <strong>motor speed</strong> as mechanical input, then you get the electromagnetic torque as output, allowing you to represent externally the mechanical system dynamics. The internal mechanical system is not used with this mechanical input selection and the inertia and viscous friction parameters are not displayed.</p><p>For the <strong>mechanical rotational port</strong>, the connection port S counts for the mechanical input and output. It allows a direct connection to the Simscape environment. The mechanical system of the motor is also included in the drive and is based on the same differential equation.</p><p>See <a href="https://www.opal-rt.com/docs/smart-power-simulation-software-sps/library-specific-guides/motor-drives/mechanical-coupling-of-two-motor-drives.md">Mechanical Coupling of Two Motor Drives.</a></p></td></tr><tr><td><strong>Use bus as labels</strong></td><td><p>When you select this check box, the <strong>Motor</strong>, <strong>Conv</strong>, and <strong>Ctrl</strong> measurement outputs use the signal names to identify the bus labels. Select this option for applications that require bus signal labels to have only alphanumeric characters.</p><p>When this check box is cleared (default), the measurement output uses the signal definition to identify the bus labels. The labels contain nonalphanumeric characters that are incompatible with some Simulink® applications.</p></td></tr><tr><td><strong>Set sensorless</strong></td><td><p>When you select this check box, the motor speed and position are estimated from terminal voltages and currents using a back-emf observer. The commutations signals (equivalent to hall effect signals) are generated from the rotor position every 60 electrical degrees. The <strong>Sensorless</strong> tab contains the observer gains parameters.</p><p>When this check box is cleared, the motor speed is measured by an internal speed sensor, and the <strong>Sensorless</strong> tab is not displayed on the mask of the block.</p></td></tr></tbody></table>

### Permanent Magnet Synchronous Machine Tab <a href="#permanent-magnet-synchronous-machine-tab" id="permanent-magnet-synchronous-machine-tab"></a>

The **Permanent Magnet Synchronous Machine** tab displays the parameters of the Permanent Magnet Synchronous Machine block of the Fundamental Blocks (sps\_lib) library.

### Converters and DC Bus Tab <a href="#converters-and-dc-bus-tab" id="converters-and-dc-bus-tab"></a>

**Rectifier Section**

The **Rectifier** section of the **Converters and DC Bus** tab displays the parameters of the Universal Bridge block of the Fundamental Blocks (sps\_lib) library. For more information on the Universal Bridge parameters, refer to the [Universal Bridge](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/power-converters/switches/universal-bridge.md) block page.

#### **DC Bus Section**

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Capacitance</strong></td><td>The DC bus capacitance (F). Default is <code>2000e-6</code>.</td></tr></tbody></table>

#### **Braking Chopper Section**

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Resistance</strong></td><td>The braking chopper resistance used to avoid bus over-voltage during motor deceleration or when the load torque tends to accelerate the motor (ohms). Default is 8.</td></tr><tr><td><strong>Chopper frequency</strong></td><td>The braking chopper frequency (Hz). Default is 4000.</td></tr><tr><td><strong>Activation voltage</strong></td><td>The dynamic braking is activated when the bus voltage reaches the upper limit of the hysteresis band. The following figure illustrates the braking chopper hysteresis logic. Default is 320.</td></tr><tr><td><strong>Shutdown voltage</strong></td><td><p>The dynamic braking is shut down when the bus voltage reaches the lower limit of the hysteresis band. Default is 310.<br>The chopper hysteresis logic is shown in the following figure.</p><p><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-32b69cc9d0cb29cbe503a85e82d4c5c3abfe1ced%2FAC3_shutdownvoltage.png?alt=media" alt="" data-size="original"></p></td></tr></tbody></table>

#### **Inverter Section**

The **Inverter** section of the **Converters and DC Bus** tab displays the parameters of the Universal Bridge block of the Fundamental Blocks (powerlib) library. For more information on the Universal Bridge parameters, refer to the [Universal Bridge](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/power-converters/switches/universal-bridge.md) block page.

The average-value inverter uses the following parameter.

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>On-state resistance</strong></td><td>The on-state resistance of the inverter switches (ohms). Default is 1e-3.</td></tr></tbody></table>

### Controller Tab <a href="#controller-tab" id="controller-tab"></a>

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Regulation type</strong></td><td>This pop-up menu allows you to choose between speed and torque regulation. Default is Speed regulation.</td></tr><tr><td><strong>Schematic</strong></td><td>When you click this button, a diagram illustrating the speed and current controllers schematics appears.</td></tr></tbody></table>

#### **Speed Controller Section**

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Speed ramps — Acceleration</strong></td><td>The maximum change of speed allowed during motor acceleration (rpm/s). An excessively large positive value can cause DC bus under-voltage. This parameter is used in speed regulation mode only. Default is 1000.</td></tr><tr><td><strong>Speed ramps — Deceleration</strong></td><td>The maximum change of speed allowed during motor deceleration (rpm/s). An excessively large negative value can cause DC bus overvoltage. This parameter is used in speed regulation mode only. Default is -1000.</td></tr><tr><td><strong>Speed cutoff frequency</strong></td><td>The speed measurement first-order low-pass filter cutoff frequency (Hz). This parameter is used in speed regulation mode only. Default is 100.</td></tr><tr><td><strong>Speed controller sampling time</strong></td><td>The speed controller sampling time (s). The sampling time must be a multiple of the simulation time step. Default is 7*20e-6.</td></tr><tr><td><strong>PI regulator — Proportional gain</strong></td><td>The speed controller proportional gain. This parameter is used in speed regulation mode only. Default is 5.</td></tr><tr><td><strong>PI regulator — Integral gain</strong></td><td>The speed controller integral gain. This parameter is used in speed regulation mode only. Default is 100.</td></tr><tr><td><strong>Torque output limits — Negative</strong></td><td>The maximum negative demanded torque applied to the motor by the current controller (N.m). Default is -17.8.</td></tr><tr><td><strong>Torque output limits — Positive</strong></td><td>The maximum positive demanded torque applied to the motor by the current controller (N.m). Default is 17.8.</td></tr></tbody></table>

#### **Current Controller Section**

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Sampling time</strong></td><td>The current controller sampling time (s). The sampling time must be a multiple of the simulation time step. Default is 20e-6.</td></tr><tr><td><strong>Current controller hysteresis band</strong></td><td><p>The current hysteresis bandwidth. This value is the total bandwidth distributed symmetrically around the current set point (A). The following figure illustrates a case where the current set point is Is* and the current hysteresis bandwidth is set to dx. Default is 0.01.</p><p>This parameter is not used when using the average-value inverter.</p><p><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-65f778df8279ac91a2a691d00e4198b8ba6d87d2%2FAC3_current_controller.png?alt=media" alt="" data-size="original"></p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This bandwidth can be exceeded because a fixed-step simulation is used. A rate transition block is required to transfer data between different sampling rates. This block causes a delay in the gates signals, so the current may exceed the hysteresis band.</p></div></td></tr><tr><td><strong>Maximum switching frequency</strong></td><td>The maximum inverter switching frequency (Hz). This parameter is not used when using the average-value inverter. Default is <code>20e3</code>.</td></tr><tr><td><strong>Show/Hide Autotuning Control</strong></td><td>Click to show or hide the parameters of the Autotuning Control tool.</td></tr></tbody></table>

#### **Autotuning of PI loops Section**

<table data-header-hidden><thead><tr><th width="220.2222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Desired damping [zeta]</strong></td><td><p>Specify the damping factor used for the calculation of the Kp and Ki gains of the Speed Controller (AC) block. The damping factor is defined as</p><p><span class="math">\xi=\frac{\omega_n K_p}{2K_i} \\[4pt]</span></p><p>The natural frequency is determined by the following empirical equations:</p><p>If ζ &#x3C; 0.69</p><p><span class="math">\omega_n=\frac{-1}{\xi T_{rd}} log (0.05+\sqrt{(1-\xi^2)} )\\[4pt]</span></p><p>If ζ ≥ 0.69</p><p><span class="math">\omega_n=\frac{0.9257}{T_{rd}}e^{1.6341 \xi}\\[4pt]</span></p><p>In the equation, <em>T</em><sub><em>rd</em></sub> corresponds to the <strong>Desired response time @ 5%</strong> parameter. Default is 0.99.</p></td></tr><tr><td><strong>Desired response time @ 5% [Trd (sec)]</strong></td><td>Specify the desired settling time of the Speed Controller (AC) block. This is time required for the controller response to reach and stay within a 5 percent range of the target value. Default is <code>0.13/5</code>.</td></tr><tr><td><strong>Calculate PI regulator gains</strong></td><td>Compute the <strong>Proportional gain</strong> and <strong>Integral gain</strong> parameters of the Speed Controller (AC) block based on the <strong>Desired damping [zeta]</strong> and <strong>Desired response time @ 5%</strong> parameters. The computed values are displayed in the mask of the Drive block. Click <strong>Apply</strong> or <strong>OK</strong> to confirm them.</td></tr></tbody></table>

### Sensorless Tab <a href="#sensorless-tab" id="sensorless-tab"></a>

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>K1 - Observer gain matrix K1</strong></td><td><p>The <em>d</em>-axis gain of the observer gain matrix.</p><p>Default is 3000.</p></td></tr><tr><td><strong>K2 - Observer gain matrix K2</strong></td><td><p>The <em>q</em>-axis gain of the observer gain matrix.</p><p>Default is -49500.</p></td></tr></tbody></table>

## Inputs <a href="#block-inputs-and-outputs" id="block-inputs-and-outputs"></a>

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>SP</strong></td><td>The speed or torque set point. The speed set point can be a step function, but the speed change rate will follow the acceleration / deceleration ramps. If the load torque and the speed have opposite signs, the accelerating torque will be the sum of the electromagnetic and load torques.</td></tr><tr><td><strong>Tm</strong> or <strong>Wm</strong></td><td>The mechanical input: load torque (Tm) or motor speed (Wm). For the mechanical rotational port (S), this input is deleted.</td></tr><tr><td><strong>A, B, C</strong></td><td>The three phase terminals of the motor drive.</td></tr></tbody></table>

## Outputs <a href="#block-inputs-and-outputs" id="block-inputs-and-outputs"></a>

<table data-header-hidden><thead><tr><th width="220.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Wm</strong>, <strong>Te</strong> or <strong>S</strong></td><td>The mechanical output: motor speed (Wm), electromagnetic torque (Te) or mechanical rotational port (S).</td></tr><tr><td><strong>Motor*</strong></td><td>If <strong>Output bus mode</strong> parameter is set to <strong>Multiple output buses</strong><br>The motor measurement vector. This vector allows you to observe the motor’s variables using the Bus Selector block.</td></tr><tr><td><strong>Conv*</strong></td><td><p>If <strong>Output bus mode</strong> parameter is set to <strong>Multiple output buses</strong><br>The three-phase converters measurement vector. This vector contains:</p><ul><li>The DC bus voltage</li><li>The rectifier output current</li><li>The inverter input current</li></ul><p>All current and voltage values of the bridges can be visualized with the Multimeter block.</p></td></tr><tr><td><strong>Ctrl*</strong></td><td><p>If <strong>Output bus mode</strong> parameter is set to <strong>Multiple output buses</strong><br>The controller measurement vector. This vector contains:</p><ul><li>The torque reference</li><li>The speed error (difference between the speed reference ramp and actual speed)</li><li>The speed reference ramp or torque reference</li></ul></td></tr></tbody></table>

**\*** When the **Output bus mode** parameter is set to **Single output bus**, the block groups the Motor, Conv, and Ctrl outputs into a single bus output.

## Examples <a href="#examples" id="examples"></a>

The [AC7 - Brushless DC Motor Drive During Speed Regulation](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/motor-drives/ac-drives/ac7-brushless-dc-motor-drive-during-speed-regulation.md) (ac7\_example) example illustrates an AC7 motor drive simulation with standard load condition.

## References <a href="#references" id="references"></a>

\[1] Bose, B. K. *Modern Power Electronics and AC Drives*. Upper Saddle River, NJ: Prentice-Hall, 2002.

\[2] Krause, P. C. *Analysis of Electric Machinery*. New York: McGraw-Hill, 1986.

\[3] Tremblay, O. *Modélisation, simulation et commande de la machine synchrone à aimants à force contre-électromotrice trapézoïdale*. Montreal, Canada: École de Technologie Supérieure, 2006.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/machines/blocks/machines-control/ac-drives/brushless-dc-motor-drive.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
