Where is the algebraic loop coming from?
이전 댓글 표시
Dear all,
I faced an issue with algebraic loop in simulink (see the model attached).
When I update the model it says "Algebraic loop error", even though there seem to be no algebraic loop at all.
The issue is resolved if I combine these two subsystems into a one.
Could you please explain where the algebraic loop is coming from?
Thank you!
채택된 답변
추가 답변 (1개)
Hi @Sergei
Unmasking the 'FIFO' and 'toRAM_interface' blocks allows you to observe the signal dependence and identify the algebraic loop issue. The StreamFIFO block requires a feedback signal (ready_signal) that appears to originate from the Bus Object registered in both the toRAMctrl and fromRAMctrl ports. By default, Simulink's data type propagation for input and output ports uses the "Inherit: Auto" setting.
If you merely want to test the functions of the three SoC blocks, you can temporarily replace the toRAMctrl and fromRAMctrl ports with the Terminator and Ground blocks, respectively.
[data signal, valid_signal, ~] = StreamFIFO(data_in, valid_in, ready_signal)
toRAMctrl = SoCBusCreator(0, 0, valid_signal)
[ready_signal, ~, ~] = SoCBusSelector(fromRAMctrl)
Unmasked SoC subsystem

Workaround

댓글 수: 3
Sam Chak
2025년 10월 1일
Hi @Sergei
In the actual scenario, this SoC subsystem is probably connected to a much larger system via the RAM Controller for signal processing tasks, through multiple Simulink blocks that may be static (where signals are transmitted instantaneously) or dynamic (where a delay occurs as data travels from a sending point to a receiving point on a network).
If the blocks on the RAM side of the system are all static, a circular dependency will arise. Conversely, if the RAM side of the system includes some dynamic blocks with properly specified initial conditions, a circular loop will still exist, but it will not depend algebraically.
Note: If you cannot view the "Workaround" block diagram, click the attached image in this post.
Sergei
2025년 10월 1일
카테고리
도움말 센터 및 File Exchange에서 Schedule Model Components에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!