Integration of MATLAB/Simulink DLL into DIgSILENT PowerFactory

101 次查看(过去 30 天)
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

回答(2 个)

Yash Sharma
Yash Sharma 2023-8-29
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
Dear Yash Sharma,
Thank you very much for your really useful answers.
Best regards,
VÍCTOR SÁNCHEZ SUÁREZ

类别

Help CenterFile Exchange 中查找有关 Create Standalone FMU 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by