problem with unit delay
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I trained three models using the regression learner MATLAB app and then exported the trained functions to Simulink. When I run the Simulink model below, I get the following error:

error:
"Cannot solve algebraic loop because it consists of blocks that cannot be assigned algebraic variables, such as blocks with discrete-valued outputs, blocks with non-double or complex outputs, Stateflow blocks, or nonvirtual subsystems. Consider breaking the algebraic loop. For example, add a delay or a memory block to the loop"
When I add unit delays as shown below, there is no error, but the trained models predict incorrect values. The unit delay appears to be the cause, as it alters the true output value and feeds the incorrect output as an input.

I'd like to ask you about the issues I'm having with unit delay:
-Is there another technique to solve an algebraic loop? Another problem that I have with unit delay is that it outputs discrete-time values while I want to get continuous-time output.
Thank you in advance for your help.
0 件のコメント
回答 (1 件)
ag
2025 年 1 月 29 日 16:14
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.
I am attaching the following MATLAB answers post which explains the algebraic loops in detail, and how they can be solved: https://www.mathworks.com/matlabcentral/answers/95310-what-are-algebraic-loops-in-simulink-and-how-do-i-solve-them
Hope this helps!
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!