> 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/simulink-blocks-reference/artemis-library/ssn-oltc-2-winding-transformer-with-saturation.md).

# SSN OLTC 2 winding Transformer with Saturation

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-db5e874cabbc3149a9e4b68c804981e9cea24820%2FArtemis_SSN_OLTC_2winding_transformer_sat_block.png?alt=media" alt="" width="485"><figcaption><p>SSN OLTC xfo and revisions</p></figcaption></figure>

The **SSN OLTC** block, located in the **ARTEMiS/SSN/SSN OLTC** library, implements a two-winding transformer with a continuously variable turn ratio in SSN, including magnetic saturation. The secondary winding is on the side marked TAP (physical modeling ports b and d). The tapped winding resistance and inductance are provided as input signals because they typically vary with the turn ratio. Saturation is modeled using a two-slope magnetization inductance with unsaturated and saturated regions.

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

$$
\begin{bmatrix}
L\_p & 0 & 1\\
0 & L\_s & n\\
0 & 0 & 1
\end{bmatrix}
\hat{\begin{bmatrix}
i\_1\\
i\_2\\
\psi
\end{bmatrix}}= \begin{bmatrix}
R\_p & 0 & 0\\
0 & - R\_s & 0\\
R\_m & n R\_m & - R\_m/L\_m
\end{bmatrix}
\begin{bmatrix}
i\_1\\
i\_2\\
\psi
\end{bmatrix}+\begin{bmatrix}
1 & 0 & -1 & 0 & 0\\
0 & 1 & 0 & -1 & 0\\
0 & 0 & 0 & 0 & R\_m/L\_m
\end{bmatrix}
\begin{bmatrix}
v\_1\\
v\_2\\
v\_3\\
v\_4\\
\psi\_0
\end{bmatrix}
\\\[8pt]
$$

$$
i\_{Lm} = \frac{(\psi - \psi\_0)}{L\_{\text{saturated}}}
\quad \text{if } \psi > \psi\_{sat}
\\\[8pt]
i\_{Lm} = \frac{\psi}{L\_{\text{unsaturated}}}
\quad \text{if } \psi < \psi\_{sat}
\\\[8pt]
$$

With $$\psi$$, the flux in the core inductance $$L\_m$$

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

{% hint style="danger" %}
This block requires a valid RT-LAB license on the simulator with the feature ARTEMiS enabled. Refer to[ ARTEMiS Requirements](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/power-systems-with-artemis/artemis-requirements.md) for details.
{% endhint %}

## Mask parameters

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

<table data-search="false"><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Connection type</strong></td><td>Select a 4-terminal transformer, a 3-terminal transformer (with either the primary or secondary tapped winding grounded), or a 2-terminal transformer (both windings grounded on one side).</td></tr><tr><td><strong>Primary winding resistance and inductance (Ohms, H)</strong></td><td>Initial version and rev 2 :<br>Primary series resistance and inductance.</td></tr><tr><td><strong>Primary winding voltage, resistance and inductance ([V Ohms H])</strong></td><td>rev 3 only<br>Primary series voltage, resistance and inductance.</td></tr><tr><td><strong>Secondary winding voltage, resistance and inductance ([V Ohms H])</strong></td><td>rev 3 only<br>Secondary series voltage, resistance and inductance.</td></tr><tr><td><strong>Core resistance (Ohms)</strong></td><td>Core resistance as seen from the primary.</td></tr><tr><td><strong>Enable saturation</strong></td><td>Enable or disable the magnetic saturation model.</td></tr><tr><td><strong>Unsaturated magnetization inductance (H)</strong></td><td>Magnetization inductance in the unsaturated region, as seen from the primary.</td></tr><tr><td><strong>Saturated magnetization inductance (H)</strong></td><td>If Enable saturation is selected, this is the magnetization inductance in the saturated region (flux above the Flux Saturation Threshold), as seen from the primary.</td></tr><tr><td><strong>Flux Saturation Threshold (Wb)</strong></td><td>Core flux magnitude above which the transformer enters saturation.</td></tr><tr><td><strong>Sample Time (s)</strong></td><td>Model sample time in seconds.</td></tr><tr><td><strong>Generate internal S-function code (Required once)</strong></td><td>Only for the initial version.<br>Compile and generate the C code of the S-function builder SSN Custom User Code.</td></tr></tbody></table>

## Conserving ports

<table><thead><tr><th width="230">Port</th><th>Description</th></tr></thead><tbody><tr><td><strong>a,b,c,d</strong></td><td><p>a,c: primary connection points.</p><p>b,d: secondary connection points (with TAP on the block).</p></td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="230">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>params</strong></td><td><ul><li>1st signal: secondary winding resistance (Ohms)</li><li>2nd signal: secondary winding inductance (H)</li><li>3rd signal: transformer turn ratio n (V_secondary_tapped=n*V_primary)</li><li>4th signal: when set to 1, uses the Backward Euler method for solver. This can be used dynamically during simulation for example to damp numerical oscillations after switching events or after tap changes.</li></ul></td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="225.20001220703125">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>meas</strong></td><td>Primary and secondary winding currents (A) and transformer core flux (Wb).</td></tr></tbody></table>

## Example <a href="#example" id="example"></a>

ssn\_oltc.mdl is an example that uses the SSN OLTC transformer in a current transformer application. Note the very low core inductance in this type of application. The model is designed to compare the SSN OLTC to an equivalent one made in SPS using switches. Typical real-life OLTC can have hundreds of switches attached to them and the method used by SPS cannot be extended in general. By opposition, the SSN OLTC is not composed of real switches as it simply recompute its equations according to the change in inductances and turn-ratio. It can therefore be used in real-time applications without any losses in computing performances.

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

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

1. Dufour, J. Mahseredjian , J. Bélanger, “A Combined State-Space Nodal Method for the Simulation of Power System Transients”, IEEE Transactions on Power Delivery, Vol. 26, no. 2, April 2011 (ISSN 0885-8977), pp. 928-935


---

# 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/simulink-blocks-reference/artemis-library/ssn-oltc-2-winding-transformer-with-saturation.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.
