> 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/example-models/motor-drives/ac-drives/ac6-100-kw-interior-permanent-magnet-synchronous-motor-drive.md).

# AC6 - 100 kW Interior Permanent Magnet Synchronous Motor Drive

This example shows Vector Control for an interior Permanent Magnet Synchronous Motor (PMSM) during torque regulation.

In the ac6\_example model, it was assumed that the PMSM had its permanent magnets mounted on the surface of the rotor. This type of PMSM has therefore a uniform air gap and no saliency, hence Ld = Lq. It is assumed that the PMSM has an interior permanent magnets rotor. The impact of the buried-magnet configuration is rotor saliency that makes Lq > Ld and introduces a reluctance torque term into the PMSM torque equation. To take advantage of the reluctance torque, the Id current component is no longer set to zero has it is for the PMSM with surface mounted permanent magnets.

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

Olivier Tremblay, Louis-A. Dessaint (Ecole de Technologie Superieure, Montreal).

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

This circuit uses a modified version of the AC6 block of the SPS electric drives library. It models a flux weakening vector control for a 100 kW, 12500 rpm, salient pole PMSM powered by a 288 Vdc source. The mechanical system is represented externally. That's why the input of the motor is the speed and the output is the electromagnetic torque.

The **PM Synchronous Motor Drive** is composed of four main parts: The electrical motor, the Three-phase Inverter, the VECT controller and the Speed Controller.

* The electrical motor is a 288 Vdc, 100 kW PMSM. This motor has 8 pole and the magnets are buried (salient rotor's type).
* The Three-phase Inverter is a voltage source inverter, controlled by PWM. This block is built using the Universal Bridge Block.
* The VECT controller block computes the three reference motor line currents corresponding to the flux and torque references and then generates a corresponding PWM using a three-phase current regulator. When the nominal flux is required, an optimal control is used in order to minimize the line current amplitude for the required torque. When a flux weakening is needed, the amplitude and the phase of the current are changed to extend the torque-speed operating range.
* The Speed Controller is used in torque regulation mode. The normalized flux value is computed with the speed of the machine in order to perform a flux weakening control.

The Torque limitation block is used to prevent the limitation due to the torque-speed characteristic of this motor for a 288 Vdc source. When the internal machine's voltage reaches the inverter voltage (because the desired torque is too high for the motor's speed), the inverter becomes in saturation mode (the desired current cannot flow anymore into motor). After this point, there will be a loss of current tracking which will decrease the motor current. This block is used to reduce the reference torque as a function of the motor's speed and the torque-speed characteristic in order to never operate in inverter saturation mode.

Motor torque, speed, power, currents and voltages signals are available at the output of the block.

## Simulation <a href="#simulation" id="simulation"></a>

Start the simulation. You can observe the motor torque (electromagnetic and reference), the rotor speed, the mechanical power (electromagnetic and reference), the stator currents (magnitude, Iq and Id), and the stator voltages (magnitude, Vq and Vd)

* At t = 0 s, the torque set point is set to 256 Nm (the nominal torque of the motor). The electromagnetic torque reaches rapidly the reference.
* At t = 0.104 s, the rotor speed exceeds the nominal speed of 3000 rpm. Hence, a flux weakening is performed in order to limit the back electromotive force (BEMF) of the motor; therefore the Id current component is increased (negatively). Also the reference torque is limited (due to the torque-speed characteristic of the motor) to prevent inverter saturation, causing a decrease in the Iq current component. Note that the magnitude of the current is constant; only the angle changes.

Now change the **Reference Torque** to 100 Nm and observe the results:

* At t = 0 s, the torque set point is set to 100 Nm. The current amplitude is optimal for this torque.
* At t = 0.28 s, the rotor speed exceeds the nominal speed of 3000 rpm. Hence, a flux weakening is performed in order to limit the back electromotive force (BEMF) of the motor; therefore the Id current component is increased (negatively).
* At t = 1.06 s, the reference torque is limited (due to the torque-speed characteristic of the motor) to prevent inverter saturation, causing a decrease in the Iq current component. The magnitude of the current is maintained at a constant value, but the phase of current changes.

Note that the electromagnetic torque follows precisely the reference torque even in the flux weakening region.

#### Notes <a href="#notes" id="notes"></a>

1. The power system has been discretized with a 2 us time step. The speed controller uses a 140 us sample and the vector controller uses a 20 us sample time in order to simulate a micro-controller control device. See also [AC6 - PM Synchronous 3HP Motor Drive](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/motor-drives/ac-drives/ac6-pm-synchronous-3hp-motor-drive.md)

## Command <a href="#command" id="command"></a>

Example model name: ac6\_IPMSM

{% code lineNumbers="true" expandable="true" %}

```matlab
open('ac6_IPMSM')
```

{% endcode %}


---

# 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/example-models/motor-drives/ac-drives/ac6-100-kw-interior-permanent-magnet-synchronous-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.
