> 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/hypersim/library-blocks-reference/network-voltage-source-converters/3-level-npc-converter-switching-function.md).

# 3-Level NPC Converter (Switching Function)

## Description

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-ff4e842664be930fa61e7c99a7ed62b0b5599dbd%2Fimage%20(476).png?alt=media" alt=""><figcaption></figcaption></figure>

The **Three-Level NPC Converter (Switching Function)** block, located in the **Network Voltage Source Converters** library, models a three-level Neutral-Point Clamped (NPC) voltage source converter using a switching-function approach. The NPC topology reduces harmonics, switching losses, and output current ripple. The switching-function method preserves the harmonic content of power electronic switching while offering real-time performance comparable to an average model.

{% hint style="danger" %}
Use with [PWM Average Generator for 3-Level Converter (Switching Function)](https://opal-rt.atlassian.net/wiki/spaces/Documentat/pages/1671561365/PWM+Average+Generator+for+3-Level+Converter+Switching+Function) in Control Sources library of HYPERSIM or with an input FPGA module.
{% endhint %}

The converter is modeled by a switching function. The converter’s switching devices are represented by two voltage sources and two diodes per AC phase, and by two current sources on the DC side.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-4d36b08ac0aa02662e65d8861133d50be4f49639%2Fimage%20(478).png?alt=media" alt=""><figcaption></figcaption></figure>

The converter can be driven by PWM firing pulses or by pulses averaged over the simulation time step (1/Ts) with values between 0 and 1. The PWM average generator outputs a 12-element gating vector: indices 1–4 control Q1–Q4 (phase A), 5–8 control Q5–Q8 (phase B), and 9–12 control Q9–Q12 (phase C).

{% hint style="danger" %}
This model does not participate in the load flow solution.
{% endhint %}

## Mask parameters

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-8648600e0ef027f7c6cd90305e7dbb12faa012e2%2Fimage%20(477).png?alt=media" alt="" width="440"><figcaption></figcaption></figure>

<table><thead><tr><th width="259.60003662109375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>User-defined text for documenting the block.</td></tr><tr><td><strong>Diode on-state resistance</strong></td><td>Internal diode resistance (Ohm), Rclose; range [1e-12, 1e12].</td></tr><tr><td><strong>Diode snubber resistance</strong></td><td>Diode snubber resistance (Ohm), Rsnubber; range [1e-12, 1e12].</td></tr></tbody></table>

{% hint style="info" %}
For accurate results, enable **Activate iterative method** and **Solve control inputs before solving power** in **Simulation Settings**.
{% endhint %}

## Conserving ports

<table><thead><tr><th width="260.4000244140625">Port</th><th>Description</th></tr></thead><tbody><tr><td><strong>net_1</strong></td><td>AC-side network connector (3-phase only).</td></tr><tr><td><strong>DCplus</strong></td><td>Positive DC-link connector (1-phase only).</td></tr><tr><td><strong>DCminus</strong></td><td>Negative DC-link connector (1-phase only).</td></tr><tr><td><strong>DCneutral</strong></td><td>DC neutral connector (1-phase only).</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="260.4000244140625" valign="top">Input</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><strong>P</strong></td><td><p>Vector signal containing twelve firing pulses to control the converter:<br>P1 Gating signal controlling Q1<br>P2 Gating signal controlling Q2</p><p>P3 Gating signal controlling Q3</p><p>P4 Gating signal controlling Q4</p><p>P5 Gating signal controlling Q5</p><p>P6 Gating signal controlling Q6</p><p>P7 Gating signal controlling Q7</p><p>P8 Gating signal controlling Q8</p><p>P9 Gating signal controlling Q9</p><p>P10 Gating signal controlling Q10</p><p>P11 Gating signal controlling Q11</p><p>P12 Gating signal controlling Q12</p></td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="259.5999755859375">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>V</strong></td><td>Vector voltage signal with AC phase-to-ground voltages (Va, Vb, Vc) and DC-link voltage (Vdc).</td></tr><tr><td><strong>I</strong></td><td>Vector current signal with AC phase currents (Ia, Ib, Ic) and DC-link current (Idc).</td></tr></tbody></table>

## Signals available for monitoring and external I/O connections (via sensors form)

All block inputs and outputs are available as signals for monitoring and for external I/O connections.

## References

<mark style="background-color:yellow;">MathWorks,</mark> *<mark style="background-color:yellow;">Three-Level NPC Converter</mark>*[<mark style="background-color:yellow;">https://www.mathworks.com/help/physmod/sps/powersys/ref/threelevelnpcconverter.html</mark>](https://www.mathworks.com/help/physmod/sps/powersys/ref/threelevelnpcconverter.html)

M. H. Rashid,*Power electronics handbook*, 4<sup>th</sup> ed. Butterworth-Heinemann, 2017


---

# 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/hypersim/library-blocks-reference/network-voltage-source-converters/3-level-npc-converter-switching-function.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.
