Simulink algebraic loop error when using parsim
19 次查看(过去 30 天)
显示 更早的评论
I have a model that runs fine in MATLAB R2020b with parsim, and with sim in 2021b. But when using parsim, I get the following error in R2021b:
simOut(1).ErrorMessage
ans =
'Error due to multiple causes.
Caused by:
'.../Engine_Actuators/Function' or the model referenced by it contains blocks that updates persistent or state variables while computing outputs and is not supported in an algebraic loop. The parent subsystem '.../Engine_Actuators' is in an algebraic loop with the following blocks.
'.../Engine_MARS_Core/Function' or the model referenced by it contains blocks that updates persistent or state variables while computing outputs and is not supported in an algebraic loop. The parent subsystem '.../Engine_MARS_Core' is in an algebraic loop with the following blocks.
'.../Engine_Sensors/Function' or the model referenced by it contains blocks that updates persistent or state variables while computing outputs and is not supported in an algebraic loop. The parent subsystem '.../Engine_Sensors' is in an algebraic loop with the following blocks.
Input ports (5) of '.../Engine_Actuators' are involved in the loop.
Input ports (3) of '.../Engine_MARS_Core' are involved in the loop.
Input ports (1) of '.../Engine_Sensors' are involved in the loop.
Input ports (1) of '.../Sensor_Latency' are involved in the loop.'
It's complaining about this part of the model. The 'Sensor Latency' contains unit delays for all signals. So not sure why the error is appearing, and why only when using parsim in R2021b
0 个评论
回答(1 个)
Swaraj
2023-12-26
Hi Afzal,
Model References might have affected the execution order in this case. Model references act as nonvirtual blocks. The below link discusses how to display and control the execution order in a model:
To remove the algebraic loop, the below link is very helpful:
Hope it helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!