> 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/ac5-comparison-between-detailed-and-simplified-models.md).

# AC5 - Comparison Between Detailed and Simplified Models

This example shows the AC5 detailed model and the AC5 average model during speed regulation. The comparison is performed for normal condition and for inverter-rectifier saturation condition.

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

O. Tremblay, L.-A. Dessaint (Ecole de technologie supérieure, Montreal)

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

This circuit uses two AC5 blocks of SPS electric drives library. The AC5 block models a self-controlled synchronous motor drive with active front-end rectifier for a 200 HP motor.

The first AC5 block is set to average value model and the second AC5 block is set to detailed model.

For the detailed model, the synchronous motor is fed by a PWM voltage source inverter, which is built using a Universal Bridge Block. The average value model uses ideal voltages and currents sources to feed the synchronous motor. The speed control loop uses a PI regulator to produce the flux and current references for the vector controller block. The vector controller computes the three reference motor line currents corresponding to the torque reference and feeds the motor with these currents using a three-phase current regulator. The vector controller also computes the flux estimate and compares it with the desired value in order to generate the field excitation voltage.

Since the field flux dynamics of the synchronous machine are relatively slow, it is advisable to establish first the field flux to its nominal value before feeding the stator with three-phase currents. In this example, a high magnetization voltage of 600V is applied to the rotor field during the first 0.2 s of the simulation in order to speed up the rotor field increase. Once the field flux has reached its nominal value of 1.0 weber, the three-phase current regulator associated to the motor stator is switched on.

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

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

Start the simulation. You can observe the motor stator current, the rotor speed, the electromagnetic torque and the magnitude of the rotor flux on the first scope. The speed set point and the torque set point are also shown. On the second scope, the dq currents and voltages are displayed. Finally, on the third scope, the DC bus voltage, the rectifier current and the inverter current are shown. Note that all signals are multiplexed to compare the two models.

At time t = 1.5 s, the speed set point is 1750 rpm. Observe that the speed follows precisely the acceleration ramp and that the stator current amplitude and frequency increase gradually.

At t = 3.0 s, a resistive torque of -792 N.m is applied to the motor shaft while the motor speed is still ramping. Observe the rectifier saturation on the third scope.

At t = 3.5 s, the inverter is saturated due to the limited DC bus voltage. You can observe loss of current tracking which decreases the motor torque.

At t = 5 s, the speed set point is changed to -1750 rpm.

At t = 6 s, the deceleration ramp reaches the motor speed. The inverter and the rectifier come back to normal mode.

At t = 6.5 s, the mechanical load passes from -792 Nm to 792 Nm.

At t = 9.5 s, observe on the third scope the rectifier saturation.

At t = 10.5 s, the inverter is saturated due to the limited DC bus voltage. You can observe loss of current tracking which decreases the motor torque.

Finally, note how the simplified model reacts well compared to the detailed model.

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

To evaluate the speed gain of the average value model, see **ac5\_example\_simplified** and compare the simulation speed with **ac5\_example**.

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

Example model name: ac5\_example\_comparison'

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

```matlab
open('ac5_example_comparison')
```

{% 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/ac5-comparison-between-detailed-and-simplified-models.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.
