Export Simscape components to FMU
이전 댓글 표시
Hi,
I am currently trying to export single Simscape components as FMUs.
How do i create an interface to e.g. the physical water flow inside a pipe? I can only interface to Simulink signals, which can be converted to Simscape physical signals, but this doesn't help me. I need to create an interface directly to the specific Simscape domain, e.g. water, current, air,....
If i create PMC ports on root level, no interface is created for those in the FMU. There is barely any documentation on how to export Simscape models to FMU, especially single components.
I am aware I can export a whole Simscape model that later works as a black box and only interfaces via Simulink signals, but this doesn't help.
Best regards,
Christian
답변 (1개)
Karan Singh
2023년 9월 4일
0 개 추천
Hi Christian,
When exporting single Simscape components as FMUs, the interface is typically created through Simulink signals. However, if you need to create an interface directly to the specific Simscape domain, such as water flow in a pipe, you can use the Simscape “Connector” blocks.
The Simscape “Connector” blocks allow you to create custom interfaces for Simscape components. These blocks can be used to connect Simscape physical signals directly to the component, providing a more domain-specific interface.
You can follow the steps below to create an interface to the physical water flow inside a pipe using Simscape “Connector” blocks:
- Open your Simscape model and locate the pipe component you want to export as an FMU.
- Add a Simscape “Connector” block to the model. This block will serve as the interface for the water flow.
- Connect the Simscape “Connector” block to the appropriate ports of the pipe component. The specific connections will depend on the structure of your model and the desired interface.
- Configure the Simscape “Connector” block to match the physical domain and units of the water flow. You can set the port labels, units, and other properties in the block's dialog box.
Once you have created the desired interfaces using Simscape “Connector" blocks, you can export the Simscape component as an “FMU” using the “exportToFMU2CS” function.
Attached below are some documentation links that you may find helpful:
- Simscape Documentation (mathworks.com)
- Connectors and References - MATLAB & Simulink (mathworks.com)
- Export Simulink Model to Standalone FMU - MATLAB & Simulink (mathworks.com)
Hope this helps!
댓글 수: 1
Venkatesh Venkadasamy
2024년 4월 25일
I could fingure our the simscape connector block. Could you send me sample model?
카테고리
도움말 센터 및 File Exchange에서 Create Standalone FMU에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!