Simulink Desktop Real-Time parallel simulations and communicate between simulations

3 次查看(过去 30 天)
I know that parsim command could be used to run parallel simulations in Simulink. However, I want to run simulations real-time. Therefore, does anyone have any experience using parsim to run parallel simulations (hardware in the loop) real-time? Can I use Simulink Desktop Real-Time for this? Please note that I want to run simulations on a single computer, and I want to communicate signals between simulations.

采纳的回答

Jan Houska
Jan Houska 2022-7-26
Hi Abdülhamit,
it is not possible to run parallel simulations using Simulink Desktop Real-Time using parsim or any similar approach. Simulink Desktop Real-Time uses built-in real-time scheduler that is responsible for scheduling individual real-time tasks so that real-time criteria are met.
Instead of trying to run several simulations in parallel, you can try to run all the models together using model referencing. That is, you create an empty top model, reference all the models that should be run from this top model, then run the top model in real time. This also solves the issue of communication between the models - you can connect the input and output signals of the submodels at the top model level.
Good Luck, Jan
  3 个评论
Jan Houska
Jan Houska 2022-7-28
Hi Abdülhamit,
it is currently not possible to have the I/O device blocks inside the referenced submodels. The recommended way is to have these blocks in the top-level model and to communicate the signals to the submodels using the inport/outport blocks.
Good Luck, Jan

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Real-Time Simulation 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by