> 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/control-and-measurements/pulse-and-signal-generators/svpwm-generator-3-level.md).

# SVPWM Generator (3-Level)

## Description

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

The **SVPWM Generator (3-Level)** block, located in the **OPAL-RT SPS Software/Sources / Signal Generator Sources** library, generates pulses for three-phase three-level Neutral-Point-Clamped (NPC) converters. The block generates twelve pulses using the space vector pulse width modulation (SVPWM) technique.

The neutral-point voltage deviation is controlled by a proportional regulator using two DC voltages, as well as the DC current flowing in or out of the DC link. The defining equation is

$$
V\_{out}=m \times\frac{V\_{dc}}{\sqrt{2}}
$$

where:

* *V*<sub>*out*</sub> is the line-to-line rms voltage generated by the NPC.
* *m* is the modulation index and 0 < *m* < 1.
* *V*<sub>*dc*</sub> is the DC current flowing in or out of the DC link.

## Ports

### Input

<table data-header-hidden><thead><tr><th width="249.88897705078125"></th><th></th></tr></thead><tbody><tr><td><strong>Vabc_ref</strong> — Three-phase sinusoidal reference signal<br>Vector</td><td><p>Reference voltage in terms of sinusoidal voltages. Specify three voltages, one per phase, that you want the attached converter to output.</p><p><strong>Dependencies</strong> Setting the <strong>Voltage reference (Vref)</strong> parameter to Three-phase signals exposes this parameter.</p><p><strong>Data Types:</strong> single | double</p></td></tr><tr><td><strong>|Vref|∠Vref</strong> — Reference voltage magnitude and angle<br>Vector</td><td><p>Reference voltage in terms of magnitude and angle, in rad. Specify the magnitude and angle of the voltage that you want the attached converter to output.</p><p><strong>Dependencies</strong> Setting the <strong>Voltage reference (Vref)</strong> parameter to Magnitude-Angle (rad) exposes this parameter.</p><p><strong>Data Types:</strong> single | double</p></td></tr><tr><td><strong>Vα Vβ ref</strong> — Reference voltage alpha and beta components<br>Vector</td><td><p>Reference voltage in terms of alpha and beta components. Specify the alpha and beta components of the voltage that you want the attached converter to output.</p><p><strong>Dependencies</strong> Setting the <strong>Voltage reference (Vref)</strong> parameter to alpha-beta components exposes this parameter.</p><p><strong>Data Types:</strong> single | double</p></td></tr><tr><td><strong>X (internal)</strong> — No input<br>null</td><td><p>When the block generates the reference voltage internally, no reference signal is input.</p><p><strong>Dependencies</strong> Setting the <strong>Voltage reference (Vref)</strong> parameter to Internally generated exposes this parameter.</p></td></tr><tr><td><strong>Vc_P0</strong> — Three-level NPC converter positive-to-neutral voltage<br>Scalar</td><td><p>Voltage between the <strong>+</strong> and <strong>N</strong> terminals of the three-level NPC converter block that is controlled by the SVPWM Generator (3-Level) block.</p><p><strong>Data Types:</strong> single | double</p></td></tr><tr><td><strong>Vc_0N</strong> — Three-level NPC converter neutral-to-negative voltage<br>Scalar</td><td><p>Voltage between the <strong>N</strong> and <strong>-</strong> terminals of the three-level NPC converter block that is controlled by the SVPWM Generator (3-Level) block.</p><p><strong>Data Types:</strong> single | double</p></td></tr><tr><td><strong>Idc</strong> — DC link current<br>Scalar</td><td><p>Current of the DC link flowing out the three-level NPC converter block that is controlled by the SVPWM Generator (3-Level) block</p><p><strong>Data Types:</strong> single | double</p></td></tr></tbody></table>

### Output

<table data-header-hidden><thead><tr><th width="249.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>P</strong> — Gate control<br>Scalar</td><td><p>12-pulse waveforms that determine switching behavior in the attached power converter.</p><p><strong>Data Types:</strong> single | double</p></td></tr><tr><td><strong>NP_Ctrl_Out</strong> — Internal control voltage<br>Scalar</td><td><p>Neutral-point deviation voltage of the generator control system.</p><p><strong>Data Types:</strong> single | double</p></td></tr></tbody></table>

## Parameters

<table data-header-hidden><thead><tr><th width="250.333251953125"></th><th></th></tr></thead><tbody><tr><td><strong>Voltage reference (Vref)</strong> — Parameterization method<br>Three-phase signals (default) | Magnitude-Angle (rad) | alpha-beta components | Internally generated</td><td><p>Reference-voltage parameterization method.</p><p><strong>Dependencies</strong> Setting this parameter to:</p><ul><li>Three-phase signals exposes the <strong>Vabc_ref</strong> port, hides the <strong>Reference vector [ Mag (0&#x3C;m&#x3C;1), Phase (degrees), Freq (Hz) ]</strong> parameter, and hides the <strong>|Vref|∠Vref</strong>, <strong>Vα Vβ ref</strong>, and <strong>X (internal)</strong> ports.</li><li>Magnitude-Angle (rad) exposes the <strong>|Vref|∠Vref</strong> port, hides the <strong>Reference vector [ Mag (0&#x3C;m&#x3C;1), Phase (degrees), Freq (Hz) ]</strong> parameter, and hides the <strong>Vabc_ref</strong>, <strong>Vα Vβ ref</strong>, and <strong>X (internal)</strong> ports.</li><li>alpha-beta components exposes the <strong>Vα Vβ ref</strong> port, hides the <strong>Reference vector [ Mag (0&#x3C;m&#x3C;1), Phase (degrees), Freq (Hz) ]</strong> parameter, and hides the <strong>Vabc_ref</strong>, <strong>|Vref|∠Vref</strong>, and <strong>X (internal)</strong> ports.</li><li>Internally generated exposes the <strong>Reference vector [ Mag (0&#x3C;m&#x3C;1), Phase (degrees), Freq (Hz) ]</strong> parameter and the <strong>X (internal)</strong> port and hides the <strong>Vabc_ref</strong>, <strong>|Vref|∠Vref</strong>, and <strong>Vα Vβ ref</strong> ports.</li></ul></td></tr><tr><td><strong>Proportional gain</strong> — Proportional gain<br>0.04 (default) | scalar</td><td>Constant for proportional gain.</td></tr><tr><td><strong>Idc filter cut-off frequency (Hz)</strong> — Cut-off frequency<br>30 (default) | positive scalar</td><td><em>I</em><sub><em>dc</em></sub> filter cut-off frequency, in Hz.</td></tr><tr><td><strong>PWM switching frequency (Hz)</strong> — Switching frequency<br>1620 (default) | positive scalar</td><td>PWM switching frequency, in Hz.</td></tr><tr><td><strong>Reference vector [ Mag (0&#x3C;m&#x3C;1), Phase (degrees), Freq (Hz) ]</strong> — Reference vector<br>[0.8 -30 60] (default) | vector</td><td><p>Three-element reference vector of magnitude, in m, phase, in degrees, and frequency, in Hz.</p><p><strong>Dependencies</strong> Setting the <strong>Voltage reference (Vref)</strong> parameter to Internally generated exposes this parameter.</p></td></tr><tr><td><strong>Sample time</strong> — Block sample time<br>0 (default) | scalar</td><td><p>Time between consecutive block executions.</p><p>During execution, the block produces outputs and, if appropriate, updates its internal state.</p></td></tr></tbody></table>

## Model Examples

[Three-Level NPC Inverter Using Space-Vector PWM with Neutral-Point Voltage Control](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/power-converters/three-level-npc-inverter-using-space-vector-pwm-with-neutral-point-voltage-control.md)

The operation of a 2-MVA, 3-Level NPC inverter using Space-Vector Pulse-Width-Modulation (SVPWM) technique with neutral-point voltage control.


---

# 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/control-and-measurements/pulse-and-signal-generators/svpwm-generator-3-level.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.
