> 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/model-and-simulation/power-systems-with-artemis/model-optimization/decouple-model-topology-with-artemis-dpl.md).

# Decouple Model Topology with ARTEMiS Transmission Lines

ARTEMiS precomputes and discretizes State-Space (SS) matrices for all combinations of switch topologies **before execution**, whether offline or in real-time. These matrices are stored in cache memory and RAM, allowing them to be retrieved instantly during simulation rather than computed on the fly, which reduces overruns. However, for large systems with many switches, the memory required to store these matrices can exceed the capacity of the simulator.

To reduce memory usage, ARTEMiS provides **decoupling tools** that split large electrical systems into smaller subcircuits, thereby reducing the total size of the SS matrices. **ARTEMiS line blocks** are key decoupling tools available to users. When used, they effectively separates the electrical model into multiple state-space systems, each containing topologically connected elements.

ARTEMiS line blocks include **DPL**, **Wideband**, **Marti (FD)** lines, and others. Detailed information about these blocks can be found in the **Simulink Blocks Reference /** [**ARTEMiS Library**](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/artemis-library.md) section.

The approach to using these lines is demonstrated below using the **ARTEMiS DPL** as an example.

## Use ARTEMiS lines to decouple large electrical systems

{% stepper %}
{% step %}

### Verify the length of the transmission lines

By default, SPS DPL blocks are automatically converted to **ARTEMiS DPLs** when the **ARTEMiS Guide** block is added to the model. Decoupling is enabled by the **natural propagation delay** of transmission lines: A line can be decoupled if its propagation delay is **greater than the model’s sample time**.

Example:

* Length of a transmission line in this model: 100 km
* Propagation speed of electricity: 300,000 km/s
* Resulting delay: 333 μs
* As long as the model's sample time is smaller than the natural propagation delay, 333 μs in this example, an ARTEMiS DPL can be use to decouple the electric system.

{% hint style="info" %}
If the transmission lines are too short for ARTEMiS lines decoupling, refer to the next sections for additional decoupling tools.
{% endhint %}

{% hint style="info" %}
In the **Advanced** tab of the **ARTEMIS Guide** block, the **Distributed Parameter Line model type** is set to **ARTEMiS DPL** by default. If changed to **Regular SPS DPL**, the lines will remain as, or be converted back to, regular SPS DPLs.

<img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-7c969c91d8e28a85eeacb016ff592d50029e666d%2Fartemis-guideblock-setparam.png?alt=media" alt="" data-size="original">
{% endhint %}
{% endstep %}

{% step %}

### Add ARTEMiS lines as needed

Open the Simulink **Library Browser**, navigate to **Artemis > ARTEMIS**, and drag the **Distributed Parameters Line** block into the model.
{% endstep %}

{% step %}

### Leverage multiple ARTEMiS cores

Subcircuits can be assigned to separate computation subsystems to take advantage of parallel computation on multiple cores. The **ARTEMiS DPL** is one of the few blocks that can be placed **outside a computation subsystems**.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-0b96a22e831d3f5160769c7c893cb3c78f3233b8%2Fartemis-use-subcircuits.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

1. Select all blocks located on one side of the ARTEMiS DPL and press **Ctrl-G** to create a new subsystem. Follow RT-LAB naming conventions: one subsystem must be named sm\_\<descriptive\_name>.
2. Select all blocks located on the other side of the ARTEMiS DPL and press **Ctrl-G** to create a second subsystem. Name it according to RT-LAB naming conventions: ss\_\<descriptive\_name>.
3. Add **OpComm** blocks to **each** subsystem, leaving them **unconnected**. Set the **Number of Inports** to **0**, since electrical data-type signals do not need to be connected to OpComm blocks. Only double-type signals can be connected to OpComm blocks.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-00706b96b1d422965e7ff8577ade5910fb2a5fa3%2Fset-artemis-multiple-cores.png?alt=media" alt="" width="349"><figcaption></figcaption></figure>

{% hint style="danger" %}
Your simulator license must include one core for each computation subsystem. To verify availability, [check the value of *ARTEMIS\_NUM\_CORES* in your license](https://www.opal-rt.com/docs/rt-lab/licensing-reference/simulator-license.md).
{% endhint %}
{% endstep %}
{% endstepper %}


---

# 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/model-and-simulation/power-systems-with-artemis/model-optimization/decouple-model-topology-with-artemis-dpl.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.
