> 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/use-iterative-methods.md).

# Use Iterative Methods

Global iterations enable real-time simulation of **Surge Arresters (MOVs)** and **switches** with iterative convergence, improving the overall accuracy of power system models. Unlike the local iterations performed within each SSN group, **global iterations** allow updates in one group (e.g., a change in a segment or operating point) to trigger consistency checks across all iterative groups.

Two specific methods use this feature:

* **iMOV** — for surge arresters using dedicated ARTEMiS MOV blocks
* **iSWITCH** — for switches connected through a specific NIB configuration

## iSWITCH

The **iSWITCH** method uses standard SPS switch blocks. Whether SSN applies the iSWITCH method depends on the connection topology.

For SSN to detect and treat a switch as an iSWITCH:

* The switch must be **isolated in its own SSN group**
* It must be **connected via a V-type NIB**
* It must have **no internal snubber capacitor or inductance** (i.e., no L–C state)

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-2d7ca35b597eb307a01d501b43b61a33d074070f%2Fuse-iterative-switch.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

When detected correctly, the MATLAB prompt identifies the switch groups as *iterative switch groups*:

```
SSN group info
Group 1 : 2 states, 2 inputs, 4 outputs, 0 switches.
Group 2 : 9 states, 6 inputs, 9 outputs, 0 switches.
Group 3 : 0 states, 4 inputs, 3 outputs, 1 switches.(SSN Iterative switch group)
Group 4 : 0 states, 4 inputs, 3 outputs, 1 switches.(SSN Iterative switch group)
...
```

## iMOV

The **iMOV** method is used for surge arrester modeling.

To enable the iMOV method:

* Use the **iMOV block** from the ARTEMiS library
* Connect the iMOV block **directly to an X-type NIB** anywhere in the model
* In the **ARTEMiS Guide** block, set the parameter **Maximum number of iterations (iMOV and iSWITCH)** to a suitable value (typically 5)

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-7a730649725e8e3f3a52f110a67aa2a34a427ad3%2Fuse-imov-block.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

When properly configured, MATLAB confirms that the iMOV method is active:

```
Third-Party Rule block detected: SSN_iMOV_power_surgnetwork/ARTEMiS Guide1
ARTEMiS-SSN: approx. memory required: 0.017752 Mb (including nodal matrix)
SSN group info
Group 1 : 12 states, 9 inputs, 9 outputs, 2 switches.
Group 2 : 0 states, 4 inputs, 2 outputs, 0 switches.(SSN Iterative MOV)
Group 3 : 0 states, 3 inputs, 2 outputs, 0 switches.(SSN Iterative MOV
```


---

# 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/use-iterative-methods.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.
