Integration of MATLAB/Simulink DLL into DIgSILENT PowerFactory

80 visualizaciones (últimos 30 días)
Víctor Sánchez Suárez
Víctor Sánchez Suárez el 5 de Jun. de 2023
Comentada: Ramon el 15 de En. de 2025
Dear Sir or Madam,
I am interested in create a dynamic model of a power converter in DIgSILENT PowerFactory which I already have modelled in MATLAB/Simulink. For that purpose I would like to use DLL files instead of model the converter from scratch.
Is there any tutorial/user manual/ in order to know how to properly export a DLL file from MATLAB/Simulink such that PowerFactory can read it correctly?
Thank you very much in advance.
Best regards,
VÍCTOR SÁNCHEZ SUÁREZ

Respuestas (2)

Yash Sharma
Yash Sharma el 29 de Ag. de 2023
I understand that you have a MATLAB/Simulink model which needs to be exported to PowerFactory, you can do this by generating DLL file or by exporting via FMU (Functional Mock-up Units).
  • To generate DLLs from M files you can use the MATLAB Coder App.
  1. From the Apps toolbar select MATLAB Coder.
  2. Select the File which you want to convert.
  3. Define the input Type for your MATLAB Function.
  4. Check For Runtime issue and click next.
  5. Click on the drop-down arrow besides "Generate"
  6. Select Built type: Dynamic Link Library
  7. Click through all the next steps and generate the DLL.
Refer to the documentation below to get more information on using MATLAB coder app.
For Simulink, you can use ert_shrlib.tlc if you have the Embedded Coder product to generate generic DLLs from your Simulink model.
Refer to the documentation attached below for more information
Package generated code as shared libraries:
Here is the link to a similar question on MATLAB answers.
  • Another method is to consider exporting through co-simulation format, FMU (Functional Mock-up Units). Simulink model can be saved as FMU. DIgsilent provides direct support for FMUs.
Please find attached relevant documentation for exporting MATLAB/Simulink model as FMU.

Víctor Sánchez Suárez
Víctor Sánchez Suárez el 7 de Sept. de 2023
Dear Yash Sharma,
Thank you very much for your really useful answers.
Best regards,
VÍCTOR SÁNCHEZ SUÁREZ
  1 comentario
Ramon
Ramon el 15 de En. de 2025
Editada: Ramon el 15 de En. de 2025
It is possible to export a digsilent project to Matlab/Simulink?

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by