Simulink stalls on RaspberryPi after a certain aount of cycles

2 次查看(过去 30 天)
I am running Simulink on raspberryPI for predictive control of Air handling unit in a building. The Simulink model contains Adaptive MPC and LPV toollboxes with sample time of 1. But because in my calculations the time unit is one minute, for real time execeution I increase the sample time to 60 seconds.(Also for mpc object and mpcobj.Plant.Model and LPV object)
In normal mode it runs on the PC with no problem with sample time =60. On the PI it stalls after a certain number of cycles (say 10 to 15 cycles (10-15 minutes)). CPU and memory usage and PI temperature are quite normal. Pi is not hanging and I can still run same program again on it when this happens but I can not kill the process of the stalled session on the PI.
If I reduce the sample time (for example to 10s) it does not happen any more and runs with no problem for ever.

回答(1 个)

Srija Kethiri
Srija Kethiri 2022-10-27
Hi Hossein,
I understand that in normal mode, your model runs on the PC with no problem with sample time of 60s, but stalls on the PI after a certain number of cycles.
The reason for this issue might be any of the signals are not working as expected. So, log all the signals and run the model with sample time of 10s and 60s to check whether all the signals are working as expected.
If all the signals are working as expected, to better assist you please share the model and reproduction steps
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Run on Target Hardware 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by