> 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/power-converters/single-phase-pwm-inverter.md).

# Single-Phase PWM Inverter

This example shows the operation of a single-phase PWM inverter.

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

## Description

The system consists of two independent circuits illustrating single-phase PWM voltage-sourced inverters.

The Half-Bridge Converter block and the Full-Bridge converter block model simplified IGBT/Diode pairs where the forward voltages of the forced-commutated device and diode are ignored.

The converters are controlled in open loop with the PWM Generator blocks. The two circuits use the same DC voltage (Vdc = 400 V), carrier frequency (1620 Hz) and modulation index (m = 0.8).

Signals displayed on the Scope block are stored in a variable named *ScopeDataForFFT* in structure-with-time format to allow further signal processing.

## Simulation

{% stepper %}
{% step %}

### Run the simulation

Run the simulation and observe:

* The currents into the loads.
* The voltages generated by the PWM inverters.
  {% endstep %}

{% step %}

### Perform FFT analysis

Once the simulation completes:

1. Open the Powergui and select FFT Analysis to display the 0–5000 Hz frequency spectrum of signals saved in the ScopeDataForFFT structure.
2. Configure the FFT to use a 2-cycle window starting at t = 0.07 - 2/60 (last 2 cycles of recording).
3. Click Display and observe the frequency spectrum of the last 2 cycles.
   {% endstep %}

{% step %}

### Compare results

* The fundamental component of the inverter voltage is displayed above the spectrum window. Compare its magnitude with the theoretical values given in the circuit.

* Compare the harmonic contents in the inverter voltage.
  {% endstep %}
  {% endstepper %}

* The **half-bridge inverter** generates a bipolar voltage (-200 V or +200 V). Harmonics occur around the carrier frequency (1620 Hz ± k\*60 Hz), with a maximum of 103% at 1620 Hz.

* The **full-bridge inverter** generates a monopolar voltage varying between 0 and +400 V for one half cycle and then between 0 and -400 V for the next half cycle. For the same DC voltage and modulation index, the fundamental component magnitude is twice the half-bridge value.

* Harmonics generated by the full-bridge are lower and appear at twice the carrier frequency (maximum of 40% at 2\*1620 ± 60 Hz). As a result, the current obtained with the full-bridge is smoother.

## Command

Example model name: power\_OnePhasePWMInverter

{% code lineNumbers="true" %}

```matlab
open('power_OnePhasePWMInverter')
```

{% 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/power-converters/single-phase-pwm-inverter.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.
