> 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/ehs/3.7/model-in-schematic-editor/library-blocks-reference/passive-blocks/variable-rc.md).

# Variable Parallel RC

## Description

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-a9947e90df20ad611300d4a9310bbf3bc5db6e97%2FSE_variableRC.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Variable Parallel RC** block models a controlled voltage source in series with an RL snubber. The value of the generated voltage is determined by the current measured through it, the resistance, and the capacitance, the latter are send as input.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-81372eedf7976c24b7a1f2f0f0b27640604dd313%2FSE_variableRC_circuiteq.png?alt=media" alt="" width="113"><figcaption></figcaption></figure>

{% hint style="info" %}
This block is only available in the eHS library.
{% endhint %}

### Model equations <a href="#model-formulation" id="model-formulation"></a>

The current through a parallel variable RC element is the sum of the resistive current (Ohm’s law) and the rate of change of charge in the capacitor, expressed by the equation:

$$
I\_{input}(t) = \frac{V\_c(t)}{R(t)} + \frac{dq}{dt}(t)
$$

Since the capacitance $$C$$ is the ratio between charge and the voltage:

$$
q(t)=C(t)V\_c(t)
$$

thus,

$$
\begin{aligned}
I\_{input}(t) = \frac{V\_C(t)}{R(t)} + \frac{d}{dt}\big\[C(t), V\_C(t)\big] \\\[8pt]
\= \frac{V\_C(t)}{R(t)} + C(t), \frac{dV\_C}{dt}(t) + \frac{dC}{dt}(t), V\_C(t)
\end{aligned}
$$

It is considered that the current due to the change of the capacitance $$\frac{dC}{dt}(t)V\_C(t)$$ is negligible as compared with the change of the voltage.

$$
I\_{input}(t)== \frac{V\_C(t)}{R(t)} + C(t), \frac{dV\_C}{dt}(t)
$$

The discretization of equation above results:

$$
I\_{input}\[k] = \frac{V\_C\[k]}{R\[k]} + C\[k], \frac{V\_C\[k+1] - V\_C\[k]}{T\_S}
$$

Finally,

$$
V\_C\[k+1] = \frac{T\_S}{C\[k]}, I\_{input}\[k] + \left(1 - \frac{T\_S}{R\[k], C\[k]}\right) V\_C\[k]
$$

The voltage across the capacitance $$V\_C$$ is the state variable and its initial value $$V\_C\[0]$$ is a parameter of the block, the Initial voltage (V<sub>0</sub>).

### Limitations <a href="#limitations" id="limitations"></a>

For the model to be stable, the following condition must be satisfied on the resistance and capacitance values:

<p align="center"><span class="math">R[k]\, C[k] = \tau \ge \frac{T_S}{2}</span></p>

## Parameters

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-a45bde0a75ec02def5b159b5d79605329ec60571%2FSE_varaibleRC_param.png?alt=media" alt=""><figcaption></figcaption></figure>

| Parameter                                       | Description                              | Sets feature | I/O & Monitoring |
| ----------------------------------------------- | ---------------------------------------- | ------------ | ---------------- |
| **Resistance (R)**                              | Units of resistance, in ohms             | Yes          | From model       |
| **Inductance (L)**                              | Inductance, in henries (L)               | Yes          | From model       |
| **Initial Voltage (V**<sub>**0**</sub>**)**     | Initial voltage in volts (V)             | No           | N/A              |
| **Maximum Voltage (V**<sub>**max**</sub>**)**   | Maximum saturation voltage in volts (V)  | No           | N/A              |
| **Snubber resistance (R**<sub>**sn**</sub>**)** | Snubber resistance value in ohm (Ω).     | No           | N/A              |
| **Snubber Inductance (L**<sub>**sn**</sub>**)** | Snubber inductance value in henries (H). | No           | N/A              |

## Conserving ports

| Port   | Description   |
| ------ | ------------- |
| **p1** | Positive port |
| **n1** | Negative port |


---

# 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/ehs/3.7/model-in-schematic-editor/library-blocks-reference/passive-blocks/variable-rc.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.
