> 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/optimize-the-ehs-circuit/select-and-tune-the-blocking-method.md).

# Select & Tune the Blocking Method

## Blocking method

When configuring a [switch with interpolation](https://www.opal-rt.com/docs/ehs/3.7/model-in-schematic-editor/library-blocks-reference/switches-with-interpolation-blocks.md) with **Gen 5 firmware**, a **blocking method** must be selected.

A blocking state occurs when no switch receives a gate signal. In this condition, the model must determine whether current is blocked or allowed to flow through the converter diodes. The selected blocking method affects diode conduction sensitivity and model stability during blocking conditions. Its impact is typically negligible when switches are continuously gated with little or no dead time.

The following blocking methods are available:

* **Snubber capacitor** method is recommended for converters driving electric machines, such as synchronous or induction machines.
* **Quasi-supra** method is the recommended approach for power electronic converters of any frequency.

## Snubber capacitance method

The Snubber capacitance method emulates a capacitor connected across the switch. During blocking conditions, the blocking voltage is generated by integrating the current flowing through the switches.

As the blocking voltage increases, it opposes the current until the current reaches zero.

This mechanism can also be viewed as an integral controller whose objective is zero current. Any nonzero current causes the controller to increase the blocking voltage until the blocking condition is satisfied.

The proportionality constant between the integrated current and the generated blocking voltage is called the **blocking capacitance**. Typical values are in the range of a few tens of nanofarads.

Selecting the blocking capacitance requires balancing stability and accuracy:

* A value that is **too high** may cause oscillatory or unstable behavior.
* A value that is **too low** may require many time steps to establish the blocking voltage, resulting in increased leakage current.

The table below provides typical blocking capacitance values based on converter characteristics, including rated RMS voltage and output power:

| Rating voltage \[Vrms] | 1 kW  | 10 kW | 100 kW | 1 MW  |
| ---------------------- | ----- | ----- | ------ | ----- |
| **400**                | 30 nF | 10 nF | 10 nF  |       |
| **690**                |       |       | 10 nF  |       |
| **3300**               |       |       |        | 10 nF |
| **6600**               |       |       |        | 10 nF |
| **11000**              |       |       |        | 10 nF |

## Quasi-Supra method

In eHS Gen5, switches with interpolation introduce a latency between switch-state computation and the measurements used by the switching model. Depending on the selected solver strategy, this latency can be one or two time steps.

To compensate for this delay, the Quasi-Supra method uses:

* **Prediction**, which estimates future measurements.
* **Relaxation**, which reduces the coupling strength between switches and the electrical network to improve numerical stability.

Proper tuning of these parameters is required to achieve a balance between stability and accuracy.

{% hint style="info" %}
For **switching frequencies below 100 kHz**, set the **Prediction** and **Relaxation** parameters to the minimum recommended values described below.
{% endhint %}

### Prediction

The **Prediction** parameter defines the number of time steps used to predict future measurements and compensate for solver latency.

* When the **Solver Strategy** is set to **High Performance – Smallest Time Step**, the latency between switch computation and eHS measurements is two time steps. Therefore, the recommended prediction horizon is **2 to 3 time steps**.
* When the **Solver Strategy** is set to **High Performance – Lowest Latency**, the latency is reduced to one time step, although the eHS time step is typically larger. Therefore, the recommended prediction horizon is **1 to 2 time steps**.

Increasing the prediction horizon generally improves the ability of the model to regulate current to zero during blocking. However, excessive prediction may introduce oscillations and overshoot.

### Relaxation <a href="#relaxation" id="relaxation"></a>

The **Relaxation** parameter controls how strongly the switching model reacts to predicted measurements. It is highly dependent on the circuit topology, and time constant.

When the **AC side is connected to a voltage source in series with an inductance** — a common situation in power converters such as the *boost*, *buck*, and most related topologies — the value should be set to **1**.\
If a different value is used in this configuration, a leakage current may appear on the AC side while the switches are supposed to be blocking.

When the **AC side is connected to the AC side of another Switch with Interpolation** — as in resonant converters and Dual Active Bridge topologies — the value typically ranges between **1** and **3**. When blocking, a voltage is applied on the AC-side to regulate the AC current to zero. Increasing the relaxation slow down the time it takes to reach steady state. This reduces the stiffness of the model, increase stability. This gain on numerical stability has a drawback of producing reactive power that should not have been present otherwise.

### Relationship between Prediction and Relaxation

**Prediction** and **Relaxation** can be viewed as parameters of a current-regulation controller that drives the AC current toward zero during blocking conditions.

* Increasing **Prediction** behaves similarly to increasing the integral gain of a PID controller. Excessive values can cause overshoot and oscillations.
* Increasing **Relaxation** behaves similarly to reducing the proportional and derivative gains. This improves stability but slows the response to blocking conditions.

A suitable combination of Prediction and Relaxation should provide stable operation while minimizing leakage current, oscillations, and unwanted reactive power.


---

# 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/optimize-the-ehs-circuit/select-and-tune-the-blocking-method.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.
