When connecting FMUs in co-simulation mode in a loop an algebraic loop errors occurs, which causes termination of simulation. Therefore, I assume Simulink identifies the FMU-blocks as direct feedthrough. In the FMI 3.0 specification it is stated, that there cannot be a direct feedthough in Co-Simulation, as the step-size has to be greater that 0. Why does Simulink handle FMUs in co-simulation mode as direct feedthrough (and not like integrator blocks instead)?
Unfortunately I could not find anything regarding how the C-API functions of the FMUs are called by the Simulink discrete fixed-step solver.

답변 (1개)

Ashutosh Thakur
Ashutosh Thakur 2024년 6월 17일

2 개 추천

Hi Julian,
In Simulink, FMU blocks are treated as standalone entities, so they do not contain all the information related to the states from the original model from which they were created. The use of feedback signals can result in an Algebraic Loop during simulation.
Introducing Unit Delay blocks in the Simulink model can resolve the Algebraic Loop. However, the introduction of Unit Delay blocks can affect the system's dynamics and potentially distort the results. You can refer to the following documentation link for assistance in resolving issues related to Algebraic Loops: https://www.mathworks.com/help/simulink/ug/algebraic-loops.html.
I hope this information helps you.

댓글 수: 3

Julian
Julian 2024년 6월 17일
Hi Ashutosh,
Thanks for your reply!
I have found that the solver is not applicable to FMU blocks as it seems that the algebraic loop solver is not able to call the fmiXstep or any other function that actually results in a calculation. So the algebraic loop solver is not able to interact with the model contained in the FMUs. Therefore, I do not know why it was implemented this way, instead of ignoring loops with FMU blocks following an explicit orchestration algorithm scheme.
@MatlabStaff in the Simulink User Guide p.53-44 describes the update phase: "The FMU block computes states at the current time step [...]. This method calls fmi3SetXXX for input". States at the current time step cannot be calculated using FMI. How is this to be understood?
Ashutosh Thakur
Ashutosh Thakur 2024년 6월 20일
Hi Julian,
Can you share the link for the Simulink User Guide?
Thanks
Julian
Julian 2024년 6월 21일
Sure! Here can You find the User's Guide: https://de.mathworks.com/help/pdf_doc/simulink/simulink_ug.pdf

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2023b

질문:

2024년 4월 8일

댓글:

2024년 6월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by