> 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-sps-rt-lab-only/include-machines-in-an-sps-circuit.md).

# Include Machines in an SPS Circuit

## Overview

Machine models require a special workflow when used with the legacy eHS with SPS workflow. Unlike other SPS components, machines are **not placed directly inside the eHS circuit**. Instead, the FPGA uses separate solver resources:

* The **eHS solver** simulates the power electronics circuit (switches, passive components, sources, and measurements)
* A dedicated **Machine Model core** simulates the electrical machine

The drive circuit and machine are coupled through the exchange of interface signals between these two FPGA solver cores. As a result, the machine boundary must be represented in the SPS circuit using dedicated interface elements rather than by placing the machine directly in the eHS circuit.

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

## Drive–machine interface

Machine integration is one of the most complex aspects of the legacy eHS with SPS workflow. The required interface implementation depends on the machine type and may require machine-specific measurements, sources, coupling elements, and parameter configuration.

Because this process varies across machine types and applications, it is recommended to start from an RT-LAB example model that already includes a working drive–machine interface.

For new developments, the **Schematic Editor workflow** is recommended, as it significantly simplifies machine integration compared to the legacy SPS workflow.

To couple a drive circuit with a machine, the circuit model must include an interface between the eHS solver and the machine solver. This interface typically consists of:

* **Measurements** of the phase voltages produced by the drive circuit and provided to the machine model
* **Sources** used to inject the phase currents produced by the machine model back into the drive circuit
* **RC snubbers** used to compensate for the decoupling between the eHS solver and the machine solver

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

## Start from an example model

Legacy eHS with SPS workflow **machine model examples** can be created by starting a new RT‑LAB project.

1. From the menu bar, select **File > New > RT‑LAB Project**. Enter a name and location for your project, then click **Next**.
2. From the available templates list, navigate to **eFPGASIM > SimPowerSystems\_Worklfow > Machines Models** and select the desired model, then click **Finish**.

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

Each example includes a dedicated documentation describing the implementation and configuration requirements.


---

# 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-sps-rt-lab-only/include-machines-in-an-sps-circuit.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.
