Eliminate algebraic loop without using memory block

조회 수: 6 (최근 30일)
Boru Wang
Boru Wang 2019년 8월 14일
댓글: Boru Wang 2019년 8월 15일
I was wondering if there is a way to eliminate the algebraic loop in Simulink model without using memory or delay blocks. These blocks tend to add slight overheads in the generated code associated with the creation and use of "state" variables.

답변 (2개)

Robert U
Robert U 2019년 8월 14일
Hi Boru Wang,
there is an article about "Remove Algebraic Loops" in the Matlab documentation: https://de.mathworks.com/help/simulink/ug/remove-algebraic-loops.html
Without knowing the actual problem our help is more generic.
Kind regards,
Robert
  댓글 수: 3
Robert U
Robert U 2019년 8월 15일
Is there a possibility that the algebraic loop is caused by the C-code you posted? How do you initialize your static variable "learnDone"?
Boru Wang
Boru Wang 2019년 8월 15일
Hi Robert. There would be a loop/data dependency issue if I had NOT insert this delay block. I initialized the static variable to zero.

댓글을 달려면 로그인하십시오.


Jim Riggs
Jim Riggs 2019년 8월 14일
편집: Jim Riggs 2019년 8월 14일
Here is an interesting article on algebraic loops and memory blocks. (pertaining to continuous time models)

Community Treasure Hunt

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

Start Hunting!

Translated by