> 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/smart-power-simulation-software-sps/blocks-functions-tools/basics/passives/variable-inductor.md).

# Variable Inductor

## Description

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-1a9c8a29137d9fa26efd7df9bfa3b16a81fafd39%2Fvariable_inductor_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Variable Inductor** block, located in the **OPAL-RT SPS Software/Passives** library, represents a linear time-varying inductor. It implements a discrete variable inductor as a current source. The impedance is specified by the Simulink® input signal. The inductance value can be negative.

When you use a Variable Inductor block in your model, set the powergui block **Simulation type** to Discrete and select the **Automatically handle Discrete solver and Advanced tab solver settings of blocks** parameter in the **Preferences** tab. The robust discrete solver is used to discretize the electrical model. Simulink signals an error if the robust discrete solver is not used.

### Equations

The block uses the following equations for the relationship between the voltage, *v*, across the device and the current through the inductor, *i*. The block input specifies the value of the inductance. The flux linkage of the inductor is equal to the specified inductance multiplied by the inductor current:

$$
v=\frac{d\phi}{dt},  \space \phi=L\*i
$$

## Ports

#### Input

<table data-header-hidden><thead><tr><th width="195.20001220703125"></th><th></th></tr></thead><tbody><tr><td><strong>L</strong> — Inductance<br>Simulink signal</td><td>Input port associated with the inductance. The inductance can be negative and must be finite.</td></tr></tbody></table>

#### Conserving

<table data-header-hidden><thead><tr><th width="194"></th><th></th></tr></thead><tbody><tr><td><strong>+</strong> — Positive terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the inductor positive voltage.</td></tr><tr><td><strong>-</strong> — Negative terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the inductor negative voltage.</td></tr></tbody></table>

## Parameters

<table data-header-hidden><thead><tr><th width="208.5999755859375"></th><th></th></tr></thead><tbody><tr><td><strong>Discrete Solver</strong> — Solver type<br>Backward Euler (default) | Trapezoidal</td><td>Robust integration method used by the block. The discrete solver method is automatically set to Trapezoidal when, in the powergui block, in the <strong>Preferences</strong> settings, you select <strong>Automatically handle discrete solver and Advanced tab solver settings of blocks</strong>. The Trapezoidal robust solver is slightly more accurate than the Backward Euler robust solver, especially when the model is simulated at larger sample times. The Trapezoidal robust solver may produce slight damped numerical oscillations on machine voltage in no-load conditions, while the Backward Euler robust solver prevents oscillations and maintains good accuracy.</td></tr><tr><td><strong>Minimal inductance absolute value (H)</strong> — Minimal inductance<br>1e-6 (default) | nonnegative scalar</td><td>Lower limit on the absolute value of the signal at port <strong>L</strong>. This limit prevents the signal from reaching a value that has no physical meaning. The value of this parameter must be greater than 0.</td></tr></tbody></table>


---

# 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/smart-power-simulation-software-sps/blocks-functions-tools/basics/passives/variable-inductor.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.
