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.