> 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/model-in-schematic-editor/optimize-the-ehs-circuit/improve-performance-with-hscs/understand-hscs-circuit-limits.md).

# Understand HSCS Circuit Limits

## Overview

The maximum supported size of an HSCS circuit depends on:

* Circuit topology
* Number of states
* Number of switches
* FPGA memory usage
* Solver optimizations

As a result, there is no single fixed component limit. Circuit compatibility must be validated by the HSCS solver.

In some cases, modifying the circuit topology or moving selected components outside the HSCS circuit can significantly reduce resource usage and improve compatibility.

## Effective switch cost

HSCS resources are primarily consumed by switching elements. The solver therefore uses an **Effective Switch Cost** metric rather than simply counting physical switches.

Some blocks are internally optimized and consume fewer resources than their physical implementation would suggest.

Examples:

| Block                | Physical Switches | Effective Switch Cost |
| -------------------- | ----------------: | --------------------: |
| Bidirectional Switch |                 2 |                     1 |
| 3-Level NPC Arm      |                 4 |                     3 |
| 3-Level ANPC Arm     |                 6 |                     3 |
| 3-Level T-Type Arm   |                 4 |                     3 |

Whenever possible, use these optimized blocks instead of constructing equivalent topologies from individual switches.

## Consider long time-constant components

HSCS is designed to simulate circuits at very short time steps. Components whose dynamics evolve over much longer time scales may not be represented as efficiently or accurately inside HSCS.

Examples include:

* Large DC-link capacitors (typically greater than **1 mF**)
* Large inductors
* Large filter networks

As a general guideline, components with time constants greater than approximately **100 ms** should be considered for simulation in the parent eHS circuit rather than inside HSCS.

### Move slow components to the parent eHS circuit

Large capacitors and inductors can be moved outside the HSCS circuit using:

* **Single-Phase Capacitive Decoupling**
* **Single-Phase Inductive Decoupling**

These blocks partition the model so that:

* Fast converter dynamics remain in HSCS
* Slow energy-storage components are simulated by the parent eHS circuit

This approach often improves both circuit compatibility and FPGA resource utilization.

### Understand HSCS decoupling behavior

When exchanging signals between HSCS and the parent eHS circuit, the decoupling interface applies anti-aliasing filtering.

Instead of transferring only the final value computed during an HSCS time step, the interface computes an averaged value before transferring the signal to the parent circuit.

This helps preserve high-frequency behavior while reducing information loss caused by the different simulation time scales.

## Recommendations

To reduce resource usage and improve HSCS compatibility:

* Use optimized HSCS blocks whenever possible
* Minimize unnecessary switching elements
* Keep circuit topologies as simple as possible
* Move large capacitors, inductors, and filter networks to the parent eHS circuit when appropriate
* Use decoupling blocks to separate fast and slow dynamics
* Use multiple HSCS instances only when required

The HSCS solver automatically validates circuit compatibility whenever the eHS circuit model is loaded.


---

# 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/model-in-schematic-editor/optimize-the-ehs-circuit/improve-performance-with-hscs/understand-hscs-circuit-limits.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.
