> 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/rt-lab/model-and-simulation/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/include-fmu-components/integrate-fmus/model-built-with-excel.md).

# Model Built with Excel

## Integrate Single Controller FMUs

{% stepper %}
{% step %}

### Add the FMU Type

Open the Excel configuration file and add the FMU name to the **Type** list of the corresponding component worksheet. For example, an exciter FMU named `AC7B` should be added to the **Exciter** worksheet's **Type** list.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-095ce23f8494cccb61617e38c7f1fa22327fb15b%2Feph-integrate-fmu-excel-exciter.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure the the FMU parameters

At the bottom of the worksheet, create a new FMU definition block after the native component data. Leave **one empty row** between consecutive blocks.

In the FMU block:

* Enter the **exact FMU name** in the first cell of the block.
* Create a header row beginning with `ID` and `Machine ID`.
* Add all FMU parameter names after `Machine ID`.
* Parameter names must match the names defined in the Modelica model **exactly** and must not include suffixes such as `_ex`, `_pss`, or `_tg`.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-6142b91e29d2d2b7f95e16677b4010387a4edad5%2Feph-integrate-fmu-excel-parameters.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add additional FMU types (if applicable)

Multiple FMU types can be defined within the same worksheet by creating additional FMU blocks. For example, several FMU-based exciters can be added to the **Exciter** worksheet.

FMUs representing other component categories, such as **Power System Stabilizers** or **Turbine-Governors**, must be added to their corresponding worksheets.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-eec521643d2ba3a04f0bd61880b309e11677f806%2Feph-integrate-fmu-excel.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Validate the configuration

* Ensure all `ID` values are **unique**.
* Verify that parameter names exactly match the FMU Modelica parameters.
* Comment out a data row by placing `//` in the leftmost cell.
* The number of FMU instances is limited only by available system memory.
  {% endstep %}
  {% endstepper %}

## Integrate a GenUnit FMU

{% stepper %}
{% step %}

### Create a GenUnit worksheet

Open the Excel configuration file and create a new worksheet with **exactly the same name** as the GenUnit FMU. Each worksheet represents a single GenUnit type and can contain multiple instances of that GenUnit.

For example, separate worksheets named `GENROU` and `GENROU_EXST1` can be used to define instances of two different GenUnit FMUs.

Within a worksheet, each row defines a unique instance of that GenUnit type. For example, the `GENROU` worksheet may contain multiple `GENROU` instances, each identified by a unique name.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-8aa191eeb9a44c612f8dd94c169d376bb8a553eb%2Feph-fmu-genunit-excel.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Define the worksheet header

The first row of the worksheet defines the FMU configuration. The **header must begin** with `name`, then `bus0`, then follow with all GenUnit parameter names.

If the GenUnit has multiple Power Pins, the header must begin with `name`, `bus0`, `bus1`, ..., `busN` and follow with the remaining parameters.

Parameter names must exactly match the parameter names defined in the Modelica model.
{% endstep %}

{% step %}

### Add GenUnit instances

Each row below the header defines a GenUnit instance.

For each instance:

* `name` specifies the unique instance identifier. Must be unique for each instance.
* `bus0` specifies the network bus connected to the GenUnit's `bus0` Power Pin.
* Additional `bus` columns specify connections for additional Power Pins.
* Remaining columns define the parameter values for that instance.
  {% endstep %}

{% step %}

### Verify the configuration

* The worksheet name exactly matches the FMU name.
* Parameter names exactly match the Modelica parameter names.
* All instance names are unique.
* All required Power Pin connections are specified.
* The number of GenUnit instances is limited only by available system memory.

If an FMU has the same name as an existing Native Library component, the FMU automatically overrides that component during netlist generation.
{% endstep %}
{% endstepper %}

#### Step 4: Verify the Configuration

Before generating the model, verify that:

* The worksheet name exactly matches the FMU name.
* Parameter names exactly match the Modelica parameter names.
* All instance names are unique.
* All required Power Pin connections are specified.

If an FMU has the same name as an existing Native Library component, the FMU automatically overrides that component during netlist generation.

There is no limit to the number of GenUnit instances other than available system memory.


---

# 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/rt-lab/model-and-simulation/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/include-fmu-components/integrate-fmus/model-built-with-excel.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.
