Resolving Algebraic Loops in SIMULINK models

2 ビュー (過去 30 日間)
RANJAN PAL
RANJAN PAL 2019 年 11 月 27 日
回答済み: Jonas 2019 年 11 月 28 日
Problem Faced:
I have a SIMULINK model that has got two algebraic loops. In order to overcome this I have set the model configuration properties as "warning". The model runs well and has got the expected dynamics as shown in below image.
1_Normal Simulation.png
Now I need to convert this model to .exe which will be accessed by a GUI. In order to do so I have to break this algebraic loop by using a unit delay block else the build process does not execute EVEN IF the configuration properties of the simulation model has been set to "none/warning". But in the process of using a unit delay block, entire dynamics of the solution changes which shows that its a numerical error as shown in below image..
2_Unit delay.png
I request, somebody please suggest a suitable solution in dissolving this algebraic loop error without changing the dynamics of the model.

回答 (2 件)

Nicolas B.
Nicolas B. 2019 年 11 月 27 日
編集済み: Nicolas B. 2019 年 11 月 27 日
From my knowledge, the only way to solve an algebraic loop without affecting at all the model is to change your model to remove the loop. It would require some mathematic analyses and it is not always possible.
Otherwise, to get a model which is simplier to solver and does not pop'up an algebraic loop warning, I would recommand 2 different solutions:
  1. for time-continuous models (which looks like to be your case), use the Transport Delay block with a very short delay (I usually take 1/10 of the system time constant)
  2. for time-discrete models, adds a Delay block with
Sorry, but there are no better solution from what I know. Except using Simscape if you have it because it solves algebraic loops in a different way.
  2 件のコメント
RANJAN PAL
RANJAN PAL 2019 年 11 月 27 日
編集済み: RANJAN PAL 2019 年 11 月 27 日
Thanks a lot for your reply.
You have correctly mentioned about the Transport Delay block. It works well with continuous system.
However, my model in time-discrete. If at all I use Transport Delay block in my "time-discrete" model, then I am unable to build the exe file.
And if I use Delay block with z^-1, then dynamics of the model changes.
Is there any such alternate to "Transport Delay block" in discrete system ?
Is there any documentation where I can check out the Simscape part and how to resolve algebraic loops with it?
Nicolas B.
Nicolas B. 2019 年 11 月 27 日
So I guess, you have to live with the algebraic loops. They are not a real problem. You just have to know that it slows down computation.
For simscape, take a look at its webpage.

サインインしてコメントする。


Jonas
Jonas 2019 年 11 月 28 日
You can use an ODE solver to solve the differential algebraic equations an algebraic loop generates. However, this is not possible when you generate code, which is what happens when you compile an .exe.

カテゴリ

Help Center および File ExchangeSimulation Setup についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by