MATLAB Answers

Algebraic loop in Simscape?

21 views (last 30 days)
Hi everybody, I have a model that work very slow, but until i now it give me logical (i mean into the desired values) outputs, but somebody that saw my model told me, that i should no use neigther unit delay nor memory blocks, because the Simscape negates the use of these blocks, because according him:
"Memory or delay blocks are used to break algebraic loops in regular Simulink models, but Simscape negates the need to do this as it models the differential algebraic equations directly. Actually, in Simscape it is harmful to use delay blocks as it makes it very, very hard for the solver to find an equilibrium"
But that person does not give me other alternatives for sustitute those blocks that i use for break an algebraic loop that is need in my model because i have to make it in real time the measure such as tension and current.
Can someone give me ideas based in your knowledge because it could help me to increase speed and accuracy in my model?

Accepted Answer

Kushagr Gupta
Kushagr Gupta on 7 Nov 2016
I understand the question is regarding how to avoid algebraic loops in a simscape model. As the model is not provided, I am going to assume the following scenario:
There is a simulink model and a simscape network exists within it, then the Simscape physical network should not exist within a Simulink algebraic loop. This means that you should not directly connect an output of a PS-Simulink Converter block to an input of a Simulink-PS Converter block of the same physical network.
The following link discusses this scenario in detail and how the situation of an algebraic loop can be avoided:
Moreover, if there is just a simscape physical network, one does not need to worry about algebraic loops within the network as everything happens simultaneously and there is no dependency unless the output is taken to simulink and fed back in, which has been discussed in the link provided above.
Hope this helps!

More Answers (2)


Tony Castillo
Tony Castillo on 8 Nov 2016
Here you can see the model where i use a Unit Delay to break the feedback.
  1 Comment
Walter Roberson
Walter Roberson on 8 Nov 2016
That is unreadable. You should attach the model itself.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!