Effacer les filtres
Effacer les filtres

Simulink algebraic loop error when using parsim

23 vues (au cours des 30 derniers jours)
Afzal
Afzal le 18 Déc 2023
Réponse apportée : Swaraj le 26 Déc 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

Réponses (1)

Swaraj
Swaraj le 26 Déc 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!

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by