> 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/mmc-valve-hb-cells-avg.md).

# MMC Valve (HB Cells, Avg)

## Description

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

The **MMC valve with half-bridge submodules** block, located in the **Network Voltage Source Converters** library, implements a switching-function model of a modular multilevel converter (MMC) valve composed of series-connected half-bridge submodules (HBSMs) and an arm inductor. Unlike the detailed switch model (MMC Valve (HB Cells)), this switching-function model uses two voltage sources and two diodes on the AC side, and two current sources on the DC side.

The block can be driven by a PWM generator (discrete 0/1 signals) or by a PWM averaging value (continuous signals between 0 and 1). With PWM averaging, the model can achieve accuracy comparable to the detailed model while significantly reducing computation effort, enabling real-time simulation.

## Mask parameters

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

<table><thead><tr><th width="280.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Number of submodules in valve</strong></td><td>Number of submodules in the valve, NbSM.</td></tr><tr><td><strong>Open state resistance</strong></td><td>IGBT resistance when the switch is open (MΩ), Ropen.</td></tr><tr><td><strong>Closed state resistance</strong></td><td>IGBT resistance when the switch is closed (Ω), Rclose.</td></tr><tr><td><strong>Snubber resistance</strong></td><td>Snubber resistance (MΩ), Rsnub.</td></tr><tr><td><strong>Snubber capacitance</strong></td><td>Snubber capacitance (F), Csnub.</td></tr><tr><td><strong>Arm resistance</strong></td><td>Arm resistance (Ω), Rarm.</td></tr><tr><td><strong>Arm inductance</strong></td><td>Arm inductance (H) Larm.</td></tr><tr><td><strong>DC storage capacitance</strong></td><td>Capacitance of the submodule (F), C.</td></tr><tr><td><strong>Voltage source serial resistance</strong></td><td>Resistance connected in series with the voltage source (Ω), Rsrc.</td></tr></tbody></table>

{% hint style="info" %}
To appropriately simulate the blocked state (diode mode), enable **Activate iterative method** in **Simulation Settings**.
{% endhint %}

## Conserving ports

<table><thead><tr><th width="280.39996337890625">Port</th><th>Description</th></tr></thead><tbody><tr><td><strong>+</strong></td><td>Positive terminal of the valve.</td></tr><tr><td><strong>_</strong></td><td>Negative terminal of the valve.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="279.5999755859375">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Discharge</strong></td><td>Reset capacitor voltages to 0 V.</td></tr><tr><td><strong>Nblk</strong></td><td>Number of blocked submodules.</td></tr><tr><td><strong>Non</strong></td><td>Number of submodules in the ON state.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="280.39996337890625">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Iarm</strong></td><td>Arm current.</td></tr><tr><td><strong>Vc</strong></td><td>Average capacitor voltage.</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.

Additional signals are also available and are listed below with their descriptions.

<table><thead><tr><th width="280.39996337890625">Signal</th><th>Description</th></tr></thead><tbody><tr><td><strong>Icap</strong></td><td>Capacitor current (A).</td></tr><tr><td><strong>Vsrc_p</strong></td><td>Parallel voltage source representing blocked submodules (V).</td></tr><tr><td><strong>Vsrc_s</strong></td><td>Series voltage source representing submodules in the ON state (V).</td></tr></tbody></table>

## References

<mark style="background-color:yellow;"><https://www.mathworks.com/help/physmod/sps/powersys/ref/halfbridgeconverter.html></mark>


---

# 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/mmc-valve-hb-cells-avg.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.
