> 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/power-converters/converters/three-level-npc-converter.md).

# Three Level NPC Converter

## Description

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

The **Three Level NPC Converter** bloc&#x6B;**,** located in the **OPAL-RT SPS Software/Power Electronics** library, implements a three-phase, three-level neutral-point clamped power converter.

You can choose from four model types:

* **Switching devices** — The converter is modeled with IGBT/diode pairs controlled by firing pulses produced by a PWM generator. This model provides the most accurate simulation results.
* **Switching function** — The converter is modeled by a switching-function model. The switches are replaced with two voltage sources and two diodes on the AC side and with two current sources on the DC side. The converter is controlled by firing pulses produced by a PWM generator (0/1 signals) or by firing pulses averaged over a specified period (PWM averaging: signals between 0 and 1). Both modes of operation produce harmonics normally generated by a PWM-controlled converter and also correctly simulate rectifying operation as well as blanking time. This model type is well-suited for real-time simulation.
* **Average model (Uref-controlled)** — The converter is modeled using a switching-function model directly controlled by the reference voltage signals (Uref). A PWM generator is not required. It does not model neutral point voltage balancing.
* **Average model (No rectifier mode)** — The block uses the voltage source directly controlled by the reference voltage to model the converter. The model does not require a PWM generator and does not simulate the rectifier mode. This setting provides the fastest simulations. When doing real-time simulation, use the Switching function setting with the firing pulses averaged, or the Average model (Uref-controlled) or Average model (No rectifier mode) settings.

## Ports

### Input

<table data-header-hidden><thead><tr><th width="212.39996337890625"></th><th></th></tr></thead><tbody><tr><td><strong>g</strong> — Gating signal to control converter<br>Vector of 12 elements</td><td>Vectorized gating signal to control the converter. The gating signal contains 12 firing pulses. The first four pulses control the Q1a to Q4a switching devices (phase A of the converter), pulses five to eight control the Q1b to Q4b switching devices (phase B of the converter), and the last four pulses control the Q1c to Q4c switching devices (phase C of the converter).<strong>Dependencies</strong> To enable this port, set <strong>Model type</strong> to Switching devices or Switching function.</td></tr><tr><td><strong>Uref</strong> — Signal to control converter<br>Vector of three elements in the range [-1,1]</td><td><p>Vectorized signal to control the converter. The signal contains three reference modulating signals (one for each phase).</p><p><strong>Dependencies</strong> To enable this port, set <strong>Model type</strong> to Average model (Uref-controlled) or Average model (No rectifier mode).</p></td></tr><tr><td><strong>BL</strong> — Input to block firing pulses<br>Scalar</td><td>Input port to block all firing pulses to the converter. To block all firing pulses to the converter, apply a signal value of 1 to this port.</td></tr></tbody></table>

### Conserving

<table data-header-hidden><thead><tr><th width="197.20001220703125"></th><th></th></tr></thead><tbody><tr><td><strong>A</strong> — Phase A terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the phase A terminal.</td></tr><tr><td><strong>B</strong> — Phase B terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the phase B terminal.</td></tr><tr><td><strong>C</strong> — Phase C terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the phase C terminal.</td></tr><tr><td><strong>N</strong> — Neutral terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the neutral terminal.</td></tr><tr><td><strong>+</strong> — Positive terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the positive terminal.</td></tr><tr><td><strong>-</strong> — Negative terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the negative terminal.</td></tr></tbody></table>

## Parameters

To edit block parameters interactively, use the Property Inspector. From the Simulink<sup>®</sup> Toolstrip, on the **Simulation** tab, in the **Prepare** gallery, select **Property Inspector**.

<table data-header-hidden><thead><tr><th width="297.20001220703125"></th><th></th></tr></thead><tbody><tr><td><strong>Model type</strong> — Model type<br>Switching devices (default) | Switching function | Average model (Uref-controlled) | Average model (No rectifier mode)</td><td><p>Select one of these values:</p><ul><li>Switching devices — The converter is modeled with IGBT/diode pairs controlled by firing pulses produced by a PWM generator.</li><li>Switching function — The converter is modeled by a switching-function model. The switches are replaced with two voltage sources and two diodes on the AC side and with two current sources on the DC side.</li><li>Average model (Uref-controlled) — The converter is modeled using a switching-function model directly controlled by the reference voltage signals (Uref). A PWM generator is not required. It does not model neutral point voltage balancing.</li><li>Average model (No rectifier mode) — The block uses the voltage source directly controlled by the reference voltage to model the converter. The model does not require a PWM generator and does not simulate the rectifier mode.</li></ul></td></tr><tr><td><strong>Device on-state resistance (Ohms)</strong> — Internal resistance of switching devices<br>1e-3 (default) | positive scalar</td><td><p>Internal resistance of the switching devices, in ohms.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching devices.</p></td></tr><tr><td><strong>Snubber resistance (Ohms)</strong> — Snubber resistance<br>1e6 (default) | positive scalar</td><td><p>Snubber resistance, in ohms. Set the snubber resistance to inf to eliminate the snubbers.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching devices.</p></td></tr><tr><td><strong>Snubber capacitance (F)</strong> — Snubber capacitance<br>inf (default) | nonnegative scalar</td><td><p>Snubber capacitance, in farads. Set the snubber capacitance to 0 to eliminate the snubbers.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching devices.</p></td></tr><tr><td><strong>Diode on-state resistance (Ohms)</strong> — Internal resistance of diodes<br>1e-3 (default) | positive scalar</td><td><p>Internal resistance of the diodes, in ohms.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching function or Average model (Uref-controlled).</p></td></tr><tr><td><strong>Diode snubber resistance (Ohms)</strong> — Snubber resistance of diodes<br>1e6 (default) | positive scalar</td><td><p>Snubber resistance of the diodes, in ohms. Set the snubber resistance to inf to eliminate the snubbers.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching function or Average model (Uref-controlled).</p></td></tr><tr><td><strong>Diode snubber capacitance (F)</strong> — Snubber capacitance of diodes<br>inf (default) | nonnegative scalar</td><td><p>Snubber capacitance of the diodes, in farads. Set the snubber capacitance to 0 to eliminate the snubbers.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching function or Average model (Uref-controlled).</p></td></tr><tr><td><strong>Diode forward voltage (V)</strong> — Forward voltage across diode<br>1e-3 (default) | nonnegative scalar</td><td><p>Forward voltage, in volts, across the diode when it is conducting.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching function or Average model (Uref-controlled).</p></td></tr><tr><td><strong>DC side snubber resistance (Ohms)</strong> — Snubber resistance across current sources<br>inf (default) | positive scalar</td><td><p>Snubber resistance across the two current sources, in ohms. Set the snubber resistance to inf to eliminate the snubbers.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Switching function, Average model (Uref-controlled), or Average model (No rectifier mode).</p></td></tr><tr><td><strong>AC side source resistance (Ohms)</strong> — Source resistance on AC side<br>1e-3 (default) | positive scalar</td><td><p>Source resistance on the AC side, in ohms. Set the snubber resistance to inf to eliminate the snubbers.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Model type</strong> to Average model (No rectifier mode).</p></td></tr></tbody></table>


---

# 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/power-converters/converters/three-level-npc-converter.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.
