Simulink algebraic loop error when using parsim

17 visualizaciones (últimos 30 días)
Afzal
Afzal el 18 de Dic. de 2023
Respondida: Swaraj el 26 de Dic. de 2023
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

Respuestas (1)

Swaraj
Swaraj el 26 de Dic. de 2023
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!

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by