Clear Filters
Clear Filters

Reference Model and Algebraic loops

25 views (last 30 days)
leonidas86 on 15 Sep 2020
Answered: Deepak Meena on 25 Sep 2020
I've a main model including several reference models. If I try to run the simulation I get the error 'Algebraic loops are not supported in referenced models'. How can I solve this error? I need the reference models to test every model seperately without running the main model every time.
Where is the difference between Atomic subsystem, variant subsystem, subsystem reference and referenced model?
Thanks for your help!

Answers (1)

Deepak Meena
Deepak Meena on 25 Sep 2020
Hi leonidas,
Basically, algebraic loops occur when an input port with direct feedthrough is driven by the output of the same block, either directly, or by a feedback path through other blocks which have direct feedthrough.
For ex :
Here y(t) = u(t) - y(t).
As you can see, the block can't just solve its output as it needs to compute it. Simulink detects instances such as these (i.e. algebraic loops) and solves them using an iterative loop. Simulink will compute the correct result in the above example, which is:
y(t) = u(t) / 2
But if the equation is like this y(t) = u(t) + y(t) , Simulink won't be able to solve this eequation and will throw error. One alternative is to use delay block which will store previous value.
-> Atomic Subsystem :Treat the subsystem as a unit when determining the execution order of block methods. For example, when it needs to compute the output of the subsystem, Simulink invokes the output methods of all the blocks in the subsystem before invoking the output methods of other blocks at the same level as the Subsystem block.




Community Treasure Hunt

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

Start Hunting!