---
title: "FMU models"
description: "Run an exported FMU as the behavior of an ECU"
source: https://developer.remotivelabs.com/docs/get-started/examples/fmu
last_updated: 2026-11-24
---

# FMU models

- Goal: Simulate
- From: [RemotiveCar v0.9.0](https://github.com/remotivelabs/remotivelabs-remotive-car/tree/v0.9.0)
- Protocols: CAN
- Vehicle domains: Lighting

## Run it

```bash
git clone https://github.com/remotivelabs/remotivelabs-remotive-car.git
cd remotivelabs-remotive-car

remotive topology build \
  -f instances/fmu/main.instance.yaml \
  -f settings/can_over_udp.settings.instance.yaml \
  build

docker compose -f build/remotive_car_fmu/docker-compose.yml up --build
```

Using Functional Mock-up Units (FMUs) allows you to integrate standardized simulation models as ECU behavior. This is
useful when the model of an ECU already exists as an FMU, for instance exported from a modelling tool, and you want to
run it against the real communication of the rest of the platform.

RemotiveTopology maps network signals onto the input variables of the FMU, steps the FMU, and publishes its output variables
back onto the bus. The model itself needs no knowledge of the platform.

- Part of the [RemotiveCar example](https://github.com/remotivelabs/remotivelabs-remotive-car/blob/v0.9.0/DOCS.md)
- Instance: [RemotiveCar FMU instance](https://github.com/remotivelabs/remotivelabs-remotive-car/tree/v0.9.0/instances/fmu)
- FMU model: [bcm/fmu](https://github.com/remotivelabs/remotivelabs-remotive-car/tree/v0.9.0/models/bcm/fmu/bcm)
- Instance file: [BCM/fmu.instance.yaml](https://github.com/remotivelabs/remotivelabs-remotive-car/blob/v0.9.0/instances/ecus/BCM/fmu.instance.yaml)

The `BCM` of the RemotiveCar example has two interchangeable implementations, a
[python behavioral model](https://github.com/remotivelabs/remotivelabs-remotive-car/tree/v0.9.0/models/bcm/python/bcm) and an [FMU](https://github.com/remotivelabs/remotivelabs-remotive-car/tree/v0.9.0/models/bcm/fmu/bcm). Both
are driven by the same signals and verified by the same tests, so the two instances are a direct comparison of the two
approaches.

Notice:
- FMU support is an optional dependency of the library, install it as `remotivelabs-topology[fmu]`.
- The FMU declares its own step size, and RemotiveTopology steps it at that rate. The `BCM` FMU uses 50 ms.
- Which signal feeds which FMU variable is declared as data, in the `INPUT_MAPPING` of the model. Only the outputs need
  a few lines of code, to publish them on the restbus.

## Where it lives in the repo

- [instances/ecus/BCM/fmu.instance.yaml](https://github.com/remotivelabs/remotivelabs-remotive-car/blob/v0.9.0/instances/ecus/BCM/fmu.instance.yaml)
- [instances/fmu/main.instance.yaml](https://github.com/remotivelabs/remotivelabs-remotive-car/blob/v0.9.0/instances/fmu/main.instance.yaml)
- [models/bcm/fmu/bcm/](https://github.com/remotivelabs/remotivelabs-remotive-car/tree/v0.9.0/models/bcm/fmu/bcm)

[Read this use case on GitHub](https://github.com/remotivelabs/remotivelabs-remotive-car/blob/v0.9.0/usecases/FMU_MODELS.md)

## Works well with

- [Python behavioral models](https://developer.remotivelabs.com/docs/get-started/examples/python-models.md): Model ECUs that don't exist yet, in a few lines of Python
- [Test cases with pytest](https://developer.remotivelabs.com/docs/get-started/examples/pytest.md): Integration tests as Python code, run as part of the topology
