Why does an algebraic loop appear in my Simulink model?

我的T_cabin是从amesim中返回的数据,我运行amesim完全是没问题的,但是我不知道为什么在simulink会出现这样的代数环,而且当我调小求解器的相对容差之后就可以正常运行了,这是为什么?
Google Translate:
The `T_cabin` data comes from AMESim. The AMESim model itself runs perfectly, but for some reason, an algebraic loop occurs when it is integrated into Simulink. Interestingly, the simulation runs correctly once I reduce the relative tolerance of the solver. Why does this happen?

Answers (1)

Hello @靖璋,
The Simulink part in the snapshot you showed has no integrable state. In the eyes of Simulink, the whole AMEsim model is likely treated as one algebraic block with no states either. So, if the rightmost signal goes to the AMEsim model, this actually forms an algebraic loop by definition. More info: https://www.mathworks.com/help/simulink/ug/algebraic-loops.html.
You can try to add a transfer function in the loop, with a reasonable time constant. That's usually the easies way to break an algebraic loop and you can usually justify the first order delay as sensor delay. See this post: https://blogs.mathworks.com/simulink/2015/07/18/why-you-should-never-break-an-algebraic-loop-with-with-a-memory-block/
Hope this helps.

Categories

Find more on General Applications in Help Center and File Exchange

Products

Asked:

on 27 Oct 2026 at 5:26

Edited:

on 28 Oct 2026 at 5:44

Community Treasure Hunt

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

Start Hunting!