> 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/first-steps/choose-the-ehs-firmware/introduction-to-standard-ehs-firmware/op4300/ehsx16-gen4.md).

# Power Electronics

## Firmware specifications

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

* Solver eHS x16 Gen4
* 2x PMSM VdQ / BLDC with
  * 1x Resolver and 1x encoder reserved per machine
  * Double excitation PMSM resolvers
* SFP inter-FPGA link
* FPGA Scope
* Power Measurement (RT-LAB S-Function workflow only)
* Internal PWM Generator

### FPGA ports mapping table

<details>

<summary>I/O mapping details table</summary>

| Port Number | LoadIn                      | DataIn                       | DataOut                 |
| ----------- | --------------------------- | ---------------------------- | ----------------------- |
| 1           | Config eHS                  | Inputs eHS                   | eHS Averaged            |
| 2           | Scenario / Rst eHS = Status |                              | eHS DownSample          |
| 3           |                             |                              | Digital In P2 - 0 to 7  |
| 4           | PWM P5 - 0 to 7             |                              | Digital In P2 - 8 to 15 |
| 5           | PWM P5 - 8 to 15            |                              | Digital In P3 - 0 to 7  |
| 6           | PWM P6 - 0 to 7             |                              | Digital In P3 - 8 to 15 |
| 7           | PWM P6 - 8 to 15            |                              | Analog In P1 - 0 to 7   |
| 8           |                             |                              | Analog In P1 - 8 to 15  |
| 9           |                             |                              | PMSM VDQ 1/2            |
| 10          |                             |                              | Quadrature Encoder      |
| 11          |                             | Digital Out P5 - SDO 0 to 7  | Quadrature Encoder      |
| 12          | Config AOMR P4              | Digital Out P5 - SDO 8 to 15 |                         |
| 13          | eHS PWM 1 - eHS 0 to 7      | Digital Out P6 - SDO 0 to 7  |                         |
| 14          | eHS PWM 2 - eHS 8 to 15     | Digital Out P6 - SDO 8 to 15 |                         |
| 15          |                             |                              |                         |
| 16          |                             |                              |                         |
| 17          |                             |                              |                         |
| 18          | PMSM VDQ 1/2                |                              |                         |
| 19          |                             | Analog Out P4 - 0 to 7       |                         |
| 20          |                             | Analog Out P4 - 8 to 15      |                         |
| 21          |                             |                              |                         |
| 22          |                             |                              |                         |
| 23          |                             | eHS PWM 1 - 0 to 7           |                         |
| 24          |                             | eHS PWM 2 - 8 to 15          |                         |
| 25          |                             |                              |                         |
| 26          |                             |                              |                         |
| 27          |                             | eHS SWG                      |                         |
| 28          |                             | PMSM VDQ 1/2                 |                         |

</details>

## I/O module mapping and configuration (RT-LAB)

This section applies when using the **recommended S‑Function workflow** in **RT‑LAB**.

For I/O module mapping and configuration when using the **OPAL‑RT Board workflow**, refer to **I/O module mapping and configuration (HYPERSIM)**. The information provided there is also applicable when working with RT‑LAB.

### OpCtrl block configuration

Reference: [**OpCtrl**](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/rt-lab-i-o-library/opctrl) block in RT-LAB

### Group 1A - Digital inputs/outputs

| Parameter               | CH00-07 | CH08-15 | CH16-23 | CH24-31 |
| ----------------------- | ------- | ------- | ------- | ------- |
| **DataOut port number** | 3       | 4       | 5       | 6       |

| Parameter              | CH00-07 | CH08-15 | CH16-23 | CH24-31 |
| ---------------------- | ------- | ------- | ------- | ------- |
| **DataIn port number** | 11      | 12      | 13      | 14      |

### Group 1B and Group 2B - Analog outputs

| Parameter                                                               | CH00-07 | CH08-15 |
| ----------------------------------------------------------------------- | ------- | ------- |
| <p><strong>Group 1B</strong><br><strong>DataIn Port Number</strong></p> | 19      | 20      |

| Parameter                                                               | CH00-07 | CH08-15 |
| ----------------------------------------------------------------------- | ------- | ------- |
| <p><strong>Group 2B</strong><br><strong>DataIn Port Number</strong></p> | 21      | 22      |

### Group 2A - Analog inputs

| Parameter               | CH00-07 | CH08-15 |
| ----------------------- | ------- | ------- |
| **DataOut Port Number** | 12      | 13      |

### SFP module

| Parameter              | SFP CH00 |
| ---------------------- | -------- |
| **DataIn Port Number** |          |

### Power measurement <a href="#power-calculation-module" id="power-calculation-module"></a>

To get RMS and power calculation from the eHS electric circuit, the [**Power Measurement Controller**](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/efpgasim-library/power-measurement-controller) block must be used in the RT-LAB model.

#### Power Measurement Controller block configuration

| Parameter               | Value |
| ----------------------- | ----- |
| **LoadIn Port Number**  | 23    |
| **DataOut Port Number** | 36    |


---

# 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/first-steps/choose-the-ehs-firmware/introduction-to-standard-ehs-firmware/op4300/ehsx16-gen4.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.
