I have a model to simulate a control system, and it includes a control subsystem and a physical model (plant) subsystem. I am using Simscape blocks in my physical model subsystem. I would like to use a Stateflow chart in my control subsystem, but once I add the Stateflow chart, I am getting the following algebraic loop error. How can I resolve this error?
Error:'Model/Control Subsystem/Chart' updates persistent or state variables while computing outputs, therefore it cannot be used in an algebraic loop. However, it is in a loop with the following blocks. For more information, see Algebraic Loops with MATLAB Function and Stateflow Blocks.
Best Answer