Algebraic Loop (Data Dependencies) Handling With Function Calls

2 views (last 30 days)
Hi
While changing execution order through Function calls, i am observing Simulink is automatically adding delays to signals where-ever it estimates there is a loop(without throwing any warning/error even when the diagnostics are turned on).
Is it normal for Simulink to do this? [The model is attached in the answer ]
I see on changing execution order through function call, different signals gets desynchronized in time, which will be fine, but for the fact that Simulink is automatically deciding how to do it. If I cant understand how it works , then I have no control of where the delays are actually added in the end. For a very big model, with multiple dependency loops, if the dependencies are not properly handles, then We loose control over how The algorithm will behave.
Anyone facing similar issues?
Regards
Mohit

Answers (1)

Mohit Yadav
Mohit Yadav on 22 Jul 2015
Edited: Mohit Yadav on 22 Jul 2015
I figured out the problem.
Mathworks should document somewhere that if no Initial value is provided for the output blocks of an Atomic Subsystem , they are initialized with 0 as initial value.
That's how the algebraic loops were being solved !! by assigning automatically initial value as 0 for all outports.
You can have a look at the attached model . (Change the scheduler attached and you can see the difference).

Categories

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!