> 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/multi-terminal-hvdc-mtdc-grid.md).

# Multi-Terminal HVDC (MTDC) Grid

## 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-30219a8fa6d0a56b92cdbc8be689316f947b7064%2Fmmc-mtdc-ex.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Multi-Terminal HVDC (MTDC) Grid** 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\_MTDC**, then click **Finish**.

This demo simulates a Multi‑Terminal HVDC (MTDC) grid with four MMC stations. Each MMC model can be executed either on the **CPU** or on the **FPGA**. In the CPU implementation, the MMC can be represented using either the detailed **Switching Function (SWF)** model or the **Average Value Model (AVM)**, whereas in the FPGA implementation only the detailed **SWF** model is supported. All parameters are initialized through the provided initialization file **`init_MMC_MTDC.m`**.

The MMCs in this demo are modeled using the provided [**MMCValves**](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/mmc-library/mmcvalves.md) block which can be used for half-bridge, full-bridge, and clamp double MMC submodules (SMs) for both CPU and FPGA modes of operation. Please also take a look at other MMC demo models. These demos show that the CPU model can be simulated either in offline mode with a much faster simulation speed than other offline simulation software or in real-time. This demo demonstrates the MMC using Half-Bridge HB Sub-Module (HBSM) but the model be configured to model other SM types, say FBSM and CDSM. However, in the actual demo, the control is adapted only for HBSM and FBSM implementations.

Each MMC block models up to a maximum of 50 individual MMC SMs per valve in the CPU SWF implementation. Multiple MMC blocks can be piled up to model an MMC valve of more than 50 SMs. However, this will limit the real-time performance; thus, for models with more than 50 SMs per valve, it is recommended to use the FPGA implementation. In the FPGA mode of operation, the number of SMs is limited by the user license. In the standard firmware, the FPGA model supports up to 511 SMs per valve; more can be added upon request. For CPU AVM implementation there is no limit in the number of SMs.

Moreover, the MMC block has the following features:

* The values of cell capacitance and the discharge resistance can be adjusted during simulation.
* There is a dead time between each pair of upper and lower gates.
* Temporary or permanent short circuits of SM capacitors in any SM can be simulated.
* There are normal and debugging modes. In the debugging mode, the capacitor voltages can be set to an average value (to replace voltage balance control temporarily) or a fixed value.

### Model overview

The model simulates a **four‑terminal MTDC grid**, composed of four MMC stations and organized into three major subsystem groups.

#### Computation subsystems

**SM\_Control:**\
Contains the **high‑level control** for all four MMC stations. This includes supervisory control functions, power and voltage regulation, and MTDC‑level coordination.

**SS\_MMC1, SS\_MMC2, SS\_MMC3, SS\_MMC4:**\
Each of these subsystems contains the complete **MMC station model**, including:

* Transformer, breakers, and the connected AC grid
* The **MMC Valves** block implementing the detailed submodule‑level model
* The corresponding **MMC Valves Low‑Level Control** block, responsible for valve‑level gating and balancing

Together, these four subsystems represent the physical and low‑level control behavior of all MMC stations in the MTDC grid.

#### Console subsystem

**SC\_Console:**\
This is the **operator interface** subsystem. It includes the displays, the **DemoModelConfig** block, the MTDC Grid Console for setting power and voltage references, and the parameter blocks for configuring each MMC station. It also contains scopes for viewing key simulation waveforms.\
The SC\_Console provides a convenient interface for interacting with the model during simulation.

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

This example shows how to simulate a four terminal DC grid power system with four MMC converters. The number of SMs per arms is moderate in this demo (=50). For cases with much higher number of SMs, up to 512 per arm, it is recommended to model the MMC on FPGA.

The model has a similar grid configuration as Benchmark Model, say BM1 in CIGRE B4-72. The dc voltage is controlled by Terminal2 (MMC\_T2 as shown in below figure). The other terminals are operating in constant PQ control. See \[1] for further details. The MMC HVDC demo is studied in a test system as shown below.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-bbe90cd1b88bac25490a3910e7991727e7cd99ad%2Fmmc-mtdc-ex2.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-960288a203e9b175dc526f7e4abc0fb78627f276%2Fmmc-mtdc-ex3.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 and 3 | 220 kV and 50 Hz                               |
| Grid voltage and frequency at terminal 2 and 4 | 750 kV and 50 Hz                               |
| Transformer power rating                       | 4200 MVA                                       |
| Transformer ratio                              | 220 kV or 750 kV (Primary)/ 250 kV (Secondary) |
| Transformer impedance                          | 10%                                            |
| Arm inductance Larm                            | 26 mH                                          |
| MMC power rating of each station               | 3000 MVA                                       |
| Number of SMs per valve on each MMC            | 50\*                                           |
| SM capacitance                                 | 0.015 F                                        |
| DC side Voltage                                | ± 500 kV                                       |

\*This demo uses **half‑bridge submodules (HBSM)**, and the provided controls are adapted for both HBSM and FBSM. The number of submodules per valve is set to **50**, configurable via the initialization file **`init_MMC_MTDC.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>5 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>5 enabled (or more)</td><td>Activated cores for real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_NBSTATE</td><td>28 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>5 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>5 enabled (or more)</td><td>Activated cores for real-time simulation with ARTEMiS toolbox</td></tr><tr><td>ARTEMIS_NBSTATE</td><td>28 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_MTDC.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_MTDC.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-9f3c95c95ba307ac2f3d73408a23dc6b5e7334f0%2Fmmc-mtdc-ex4.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-aca81baaa6217534e2cb9f133024a456240fb241%2Fmmc-mtdc-ex5.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-458a21e3ca0bde058c6571f3e7a4540d9a2783ba%2Fmmc-mtdc-ex6.png?alt=media" alt="" width="480"><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_MTDC.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-9f3c95c95ba307ac2f3d73408a23dc6b5e7334f0%2Fmmc-mtdc-ex4.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-aca81baaa6217534e2cb9f133024a456240fb241%2Fmmc-mtdc-ex5.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-458a21e3ca0bde058c6571f3e7a4540d9a2783ba%2Fmmc-mtdc-ex6.png?alt=media" alt="" width="480"><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>

The results demonstrate the transients and steady-state dynamics of MTDC grid during active power and reactive power set-points changes. Further, it also shows the starting procedure of the MTDC grid. In this scenario all terminals are operating in CPU-AVM model type at simulation time step (Ts) of 35 usec.

After following the above discussed operating procedure by closing AC breakers at t=0.2 sec, enabling pulses at t=0.41 sec, ensured the DC voltages in DC grid reached to 0.7 p.u., and then after closing DC circuit breakers after the DC voltage in DC grid is reached to 1 p.u. at t=1 sec. At t=1.5 sec, set active and reactive references are applied by using MTDC grid console, i.e., P1=0.6, P2(slack), P3=-0.4, and P4=-0.3, and Q at all the terminals are zero, whose references are also followed by the model as shown in below figures 1, 3, and 5, and respective zoomed in wave forms are shown in figures 2, 4, and 6.

Further, a change in set-points has been applied at t=2.5 secs, i.e., P1=-0.8, P2(slack), P3=0.7, and P4=0.5 and for reactive power Q1=Q3=-0.2 and Q2=Q4=0.2, respectively. The response of these change in set-points also seen in Figure 1, 2, and 3.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-2f8fef3e2c4d37158acbd7e1e10664581451a65d%2Fmmc-mtdc-ex7.png?alt=media" alt=""><figcaption><p>Figure 1: Overall response of the Voltage and Currents of MMC Terminals 1 and 2.</p></figcaption></figure>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-1332798894061d897c6dc58381d2fa2e0a1239a7%2Fmmc-mtdc-ex8.png?alt=media" alt=""><figcaption><p>Figure 2: Zoomed in Voltage and Currents of MMC Terminals 1 and 2.</p></figcaption></figure>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-f4c9af688a192dddec0cbf654fe07a201c1db927%2Fmmc-mtdc-ex9.png?alt=media" alt=""><figcaption><p>Figure 3: Overall response of the Voltage and Currents of MMC Terminals 3 and 4.</p></figcaption></figure>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-108c4527088d04e39d1da0c46f1d6d211733dc41%2Fmmc-mtdc-ex10.png?alt=media" alt=""><figcaption><p>Figure 4: Zoomed in Voltage and Currents of MMC Terminals 3 and 4.</p></figcaption></figure>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-af0f4453484bf340d8ad396bb4aa39a64ad66784%2Fmmc-mtdc-ex11.png?alt=media" alt=""><figcaption><p>Figure 5: Overall response of the AC Voltage, Currents, and Powers at Terminals 1, 2, 3 and 4.</p></figcaption></figure>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-16b457e448dfed9ff79cf0d106bd9ba03fe4f03f%2Fmmc-mtdc-ex11.png?alt=media" alt=""><figcaption><p>Figure 6: Zoomed in AC Voltage, Currents, and Powers at Terminals 1, 2, 3 and 4.</p></figcaption></figure>

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

1. C. Dufour, W. Li, X. Xiao, J.-N. Paquin, J. Belanger, "Fault studies of MMC-HVDC links using FPGA and CPU on a real-time simulator with iteration capability", 11th International Conference on Compatibility, Power Electronics and Power Engineering (IEEE CPE-POWERENG 2017), Cadiz, Spain, April 4-6, 2017.
2. 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.
3. 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/multi-terminal-hvdc-mtdc-grid.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.
