How to Generate an FMU from MATLAB and PowerFactory for Co-Simulation?

Illustration
support - 2026-07-24T11:23:44+05:30
Question: How to Generate an FMU from MATLAB and PowerFactory for Co-Simulation?

How to export a MATLAB Simulink model as a Functional Mock-up Unit (FMU) using FMI standard for co-simulation with DIgSILENT PowerFactory?

Expert Answer

Profile picture of John Williams John Williams answered . 2026-07-24

To export a Simulink model as an FMU 2.0 Co-Simulation unit:

  1. Install Simulink Compiler and FMI Kit for Simulink.
  2. Open your model and configure input/output ports using In1 and Out1 blocks.
  3. In MATLAB Command Window, execute export command:
    exportToFMU('my_simulink_model', 'FMUType', 'CoSimulation', 'FMIModuleVersion', '2.0');
    
  4. In DIgSILENT PowerFactory, open DSL / FMI Model Definition, import the generated my_simulink_model.fmu file, and map grid signals.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!