> 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/rt-lab/example-models/mmc-example-models/bipole-hvdc-point-to-point.md).

# Bipole HVDC Point-to-Point

## Description <a href="#location" id="location"></a>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-f62fe61a37db027387dd180f4e82e20f649ac2f1%2Fmmc-bipole-ex.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Bipole HVDC Point-to-Point** example can be created by starting a new RT‑LAB project. From the menu bar, select **File > New > RT‑LAB Project**. Enter a name and location for your project, then click **Next**. From the available templates list, navigate to **MMC** and select **MMC\_HVDC\_Bipole**, then click **Finish**.

### Model overview

The demo is organized into three main subsystems, each representing a key functional part of the bipole MMC‑HVDC system:

#### Computation subsystems

**SM\_Control1:**\
This subsystem contains the **high‑level control** for both converter stations. It implements coordinated control while also managing each MMC individually (positive‑pole MMC and negative‑pole MMC) at both stations.

**SS\_MMC1:**\
This subsystem contains the complete model of the first converter station. It includes all electrical components such as the transformer, AC grid, and breakers. It also contains the **MMCValves** blocks that implement the detailed MMC models—one for the positive pole and one for the negative pole. The **MMCValvesLowLvlCtrl** block provides the switching‑level control for each of these MMCs.

**SS\_MMC2:**\
This subsystem contains the model of the second converter station and follows the same structure as **SS\_MMC1**, including its electrical components, MMC Valves blocks (positive and negative pole), and the associated low‑level valve control.

#### Console subsystem

**SC\_Console:**\
This subsystem serves as the operator console. It includes the data scopes, the **DEMOModelConfig** block for selecting CPU or FPGA implementation, and the **MMC\_Bipole Console** block used to set controller references, operate the breakers, and enable or disable the converters. Within this console block, the user will also find the **MMC Valves parameter blocks**, which provide the configuration settings for each MMC.

### Test system and parameters <a href="#testsystemandparameters" id="testsystemandparameters"></a>

This demo simulates a Bipolar HVDC link.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-f2f4c73302c4078cff84672a48427cea007ce27b%2Fmmc-bipole-ex2.png?alt=media" alt=""><figcaption></figcaption></figure>

The test system and MMC parameters are:

| Description of Parameters                | Value                 |
| ---------------------------------------- | --------------------- |
| Grid voltage and frequency at terminal 1 | 220 kV and 50 Hz      |
| Grid voltage and frequency at terminal 2 | 220 kV and 50 Hz      |
| Transformer power rating                 | 1500 MVA              |
| Transformer ratio at terminal 1          | 220 kV / 250 kV       |
| Transformer ratio at terminal 2          | 220 kV / 250 kV       |
| Transformer impedance                    | 10%                   |
| Arm inductance Larm                      | 50 mH                 |
| MMC power rating                         | 1500 MVA              |
| Number of SMs per valve on each MMC      | 50\*                  |
| SM capacitance                           | 3.6 mF\*\* for 50 SMs |
| DC pole-to-ground Voltage                | 500 kV                |

\*The demo is set to **50** submodules (SMs) per valve (can be adjusted in the initialization file **`init_MMC_Bipole.m`**, located in the Simulink model directory).

{% hint style="info" %}
**Performance note:** For >50 SMs per valve, use FPGA. On CPU, multiple MMC blocks can be stacked to exceed 50 SMs/valve, but with real‑time performance limitations.
{% endhint %}

This implementation can run on either the **CPU** or the **FPGA**, and the execution mode is selected using the **DEMOModelConfig** block in the **SC\_Console** subsystem.

* On the **CPU**, both the **Switching Function (SWF)** detailed model and the **Average Value Model (AVM)** are available.
* On the **FPGA**, only the detailed **SWF** model is supported.

To continue:

* For **CPU implementation**, refer to the **CPU implementation** tab on this page.
* For **FPGA implementation**, refer to the **FPGA implementation** tab on this page.

## Requirements <a href="#requirements" id="requirements"></a>

{% tabs %}
{% tab title="CPU implementation" %}

#### Simulator license

[Verify that an active RT-LAB license](https://www.opal-rt.com/docs/rt-lab/licensing-reference/simulator-license.md) with the following features is installed on the simulator to run this example model:

<table><thead><tr><th width="259.63629150390625">Feature Name</th><th width="109.5455322265625">Required Status</th><th>Description</th></tr></thead><tbody><tr><td>RTLAB_NUM_CORES</td><td>3 enabled (or more)</td><td>Activated cores for real-time simulation</td></tr><tr><td>ARTEMIS_RT</td><td>enabled</td><td>Real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_NUM_CORES</td><td>3 enabled (or more)</td><td>Activated cores for real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_NBSTATE</td><td>56 enabled (or more)</td><td>Activated electrical states for real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_SSN</td><td>enabled</td><td>SSN add-on blockset to ARTEMiS for optimizing electrical system models using an advanced decoupling technique</td></tr><tr><td>ARTEMIS_MMC_CONTROLLER</td><td>enabled</td><td>MMC high-level control blocks on CPU</td></tr></tbody></table>
{% endtab %}

{% tab title="FPGA implementation" %}

#### FPGA

This example model is designed for simulators and/or expansion units equipped with **VC707** FPGA boards. Refer to your **System Description Document** for details specific to the FPGA board used in your system.

#### Simulator license

[Verify that an active RT-LAB license](https://www.opal-rt.com/docs/rt-lab/licensing-reference/simulator-license.md) with the following features is installed on the simulator to run this example model:

<table><thead><tr><th width="259.63629150390625">Feature Name</th><th width="109.5455322265625">Required Status</th><th>Description</th></tr></thead><tbody><tr><td>RTLAB_NUM_CORES</td><td>3 enabled (or more)</td><td>Activated cores for real-time simulation</td></tr><tr><td>ARTEMIS_RT</td><td>enabled</td><td>Real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_NUM_CORES</td><td>3 enabled (or more)</td><td>Activated cores for real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_NBSTATE</td><td>56 enabled (or more)</td><td>Activated electrical states for real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_SSN</td><td>enabled</td><td>SSN add-on blockset to ARTEMiS for optimizing electrical system models using an advanced decoupling technique</td></tr><tr><td>ARTEMIS_MMC_CONTROLLER</td><td>enabled</td><td>MMC high-level control blocks on CPU</td></tr><tr><td>XSG_MMC_VALVES</td><td>24 (or more)</td><td>Activated MMC valves on FPGA</td></tr><tr><td>XSG_MMC_VALVES_CONTROLLERS</td><td>24 (or more)</td><td>Activated MMC valve controllers on FPGA</td></tr><tr><td>XSG_MMC_CELLS_PER_VALVE</td><td>512<strong>*</strong> (or more)</td><td>Activated MMC cells per valve on FPGA</td></tr></tbody></table>

**\***&#x43;orresponds to the limit set in the file **`init_MMC_Bipole.m`**, located in the Simulink model directory. You may open this file and set the variable **`lib_nb_cells`** equal to **50**. In this case, **`XSG_MMC_CELLS_PER_VALVE`** must be **50 or greater**.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-829f710a09c5547a2fbba26368c3fa1c6193e9c9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Detailed explanation <a href="#detailedexplanation" id="detailedexplanation"></a>

{% tabs %}
{% tab title="CPU implementation" %}

#### Steps to run the model <a href="#modeloverviewandselection" id="modeloverviewandselection"></a>

1. **Adjust the initialization file**\
   Open the file **`init_MMC_Bipole.m`** located in the Simulink model directory. Modify parameters as needed (it may also be used as‑is). Save your changes.
2. **Adapt the Simulink model**\
   Open the Simulink model and navigate to the **SC\_Console** subsytem, then double‑click the **DEMOModelConfig** block; select the desired **Model Type** for **MMC1**, **MMC2**, **MMC3** and **MMC4**, ensuring that they are all set to **CPU**, and finally click **Configurate Model** to apply the settings.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-d5fdbbf760d2a70b267825c4800964c0fadd4df3%2Fmmc-bipole-ex3.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Build the model in RT‑LAB**\
   Save changes in Simulink. Then, build the model in RT-LAB.
4. **Set the execution mode**\
   For real‑time operation in RT‑LAB, set **Real‑Time mode** to **Software synchronized**.
5. **Load and execute the model**\
   In RT‑LAB, **Load** and **Execute** the model.
6. **Control and monitor the system**\
   Use the **console subsystem** to interact with the model and observe simulation results.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-fe7a7c219f6644fbfa12783d460863a271ca7ae8%2Fmmc-bipole-ex4.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-935480350436d04c7c857fa72f9530f5e7a8b7be%2Fmmc-bipole-ex5.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Controls**

* **P1, P3, P4:**\
  Active‑power references (p.u.) for Terminals 1, 3, and 4; adjustable from **−1.0 to 1.0 p.u.**
* **Q1, Q2, Q3, Q4:**\
  Reactive‑power references (p.u.) for Terminals 1–4; adjustable from **−0.3 to 0.3 p.u.**
* **MMC parameters:**\
  Parameters for each MMC station, set according to the selected **model type**.\
  (See MMC Valves Parameter documentation for details.)
* **Enable Pulses:**\
  Enable/disable gating signals for all four MMC converters (via the MTDC Grid Console).
* **DataLog:**\
  **1** enables data logging, **0** disables it.\
  Stores scope data to a `.mat` file during real‑time simulation for offline analysis.
* **DC Breakers (1–4):**\
  Status of each DC breaker (**1 = closed**, **0 = open**).
* **AC Breakers (1–4):**\
  Status of each AC breaker (**1 = closed**, **0 = open**).

**Monitoring**

* **VImmcT12, VLmmcT34:**\
  MMC‑side measurements for all terminals, including:
  * DC voltages and currents
  * MMC arm voltages
  * Valve currents
  * Average SM‑capacitor voltages
  * Reference voltages from high‑level control
* **VIacT1234:**\
  AC‑side measurements for all terminals, including:
  * 3‑phase voltages
  * 3‑phase currents
  * 3‑phase active and reactive power
    {% endtab %}

{% tab title="FPGA implementation" %}
{% hint style="info" %}
In FPGA mode, the number of SMs per valve is limited by the license; the **standard firmware supports up to 511 SMs per valve** (higher counts available upon request).
{% endhint %}

**Steps to Run the Model**

1. **Adjust the initialization file**\
   Open the file **`init_MMC_Bipole.m`** located in the Simulink model directory. Modify parameters as needed (it may also be used as‑is). Save your changes.
2. **Adapt the Simulink model**\
   Open the Simulink model and navigate to the **SC\_Console** subsytem, then double‑click the **DEMOModelConfig** block; select the desired **Model Type** for **MMC1**, **MMC2**, **MMC3** and **MMC4**, ensuring that at least one of them is set to **FPGA**, and finally click **Configurate Model** to apply the settings.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-d5fdbbf760d2a70b267825c4800964c0fadd4df3%2Fmmc-bipole-ex3.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Build the model in RT‑LAB**\
   Save changes in Simulink. Then, build the model in RT-LAB.
4. **Configure real‑time execution mode**\
   For real‑time execution, set RT‑LAB’s **Real‑Time mode** to **Hardware synchronized**.
5. **Load and execute the model**\
   In RT‑LAB, **Load** and **Execute** the model.
6. **Control and monitor the system**\
   Use the **console subsystem** to interact with the model and observe simulation results.

   <figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-fe7a7c219f6644fbfa12783d460863a271ca7ae8%2Fmmc-bipole-ex4.png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-935480350436d04c7c857fa72f9530f5e7a8b7be%2Fmmc-bipole-ex5.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Controls**

* **P1, P3, P4:**\
  Active‑power references (p.u.) for Terminals 1, 3, and 4; adjustable from **−1.0 to 1.0 p.u.**
* **Q1, Q2, Q3, Q4:**\
  Reactive‑power references (p.u.) for Terminals 1–4; adjustable from **−0.3 to 0.3 p.u.**
* **MMC parameters:**\
  Parameters for each MMC station, set according to the selected **model type**.\
  (See MMC Valves Parameter documentation for details.)
* **Enable Pulses:**\
  Enable/disable gating signals for all four MMC converters (via the MTDC Grid Console).
* **DataLog:**\
  **1** enables data logging, **0** disables it.\
  Stores scope data to a `.mat` file during real‑time simulation for offline analysis.
* **DC Breakers (1–4):**\
  Status of each DC breaker (**1 = closed**, **0 = open**).
* **AC Breakers (1–4):**\
  Status of each AC breaker (**1 = closed**, **0 = open**).

**Monitoring**

* **VImmcT12, VLmmcT34:**\
  MMC‑side measurements for all terminals, including:
  * DC voltages and currents
  * MMC arm voltages
  * Valve currents
  * Average SM‑capacitor voltages
  * Reference voltages from high‑level control
* **VIacT1234:**\
  AC‑side measurements for all terminals, including:
  * 3‑phase voltages
  * 3‑phase currents
  * 3‑phase active and reactive power
    {% endtab %}
    {% endtabs %}

### Operating Procedure (typical) <a href="#operatingprocedure" id="operatingprocedure"></a>

1. **Pre‑charge:**\
   All AC/DC breakers open; pulses disabled; capacitors pre‑charge to \~0.6 p.u.
2. **Close AC breakers:**\
   DC voltage rises to \~0.7 p.u.
3. **Enable pulses:**\
   DC voltage at all terminals rises to \~1.0 p.u.
4. **Close DC breakers:**\
   Verify DC voltages at all terminals.
5. **Apply P/Q references:**\
   Terminals track the set active and reactive power values.

## Simulation and results <a href="#simulationandresults" id="simulationandresults"></a>

## References <a href="#references" id="references"></a>

1. W. Li et J. Belanger, “An equivalent circuit method for modelling and simulation of modular multilevel converters in real-time HIL test bench,” IEEE Transactions on Power Delivery, vol. 31, no. 15, pp. 240—2409, 2016.
2. W. Li, L. -A. Grégoire and J. Bélanger, "A Modular Multilevel Converter Pulse Generation and Capacitor Voltage Balance Method Optimized for FPGA Implementation," in IEEE Transactions on Industrial Electronics, vol. 62, no. 5, pp. 2859-2867, May 2015, doi: 10.1109/TIE.2014.2362879.


---

# 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/rt-lab/example-models/mmc-example-models/bipole-hvdc-point-to-point.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.
