Use of Simulink Signal Logging and SimScape Logs with Parallel
Show older comments
Hi,
I've recently started using the Parallel Computing Toolbox for running parallel simulations in Simulink (including SimScape). Previously I was utilising the Simulink signal logging option and SimScape logging option to log simulation data to two log objects (nominally logsout for Simulink and simlog for SimScape). The examples, including a demo model, for parallel simulations in Simulink only seem to show how to extract the model output and time trace ( yout and tout) from the workers. I cannot figure out how to extract the simulations logs from the workers. I imagine there is a way to route all signal data to the model output, and extract the data from there, however my model is multi-domain with a significant amount of physical modelling blocks (SimHydraulics) and I would like to be able to access the Simulink and SimScape logs from parallel runs.
Can anybody help me with this issue?
Regards,
Jack
Accepted Answer
More Answers (1)
K E
on 10 Apr 2012
0 votes
I am sure there is a better approach, but a workaround would be to save a mat file containing each simulation's results. This could be done using a Matlab script to run the set of simulations; outputting desired simulation results to the Workspace using the To Workspace block; choosing a distinct mat file name within the Matlab script; and saving the mat file. A post-processing script could load all the mat files, for example to plot engine temperature vs. motor constant (if that was what was varying across the simulations). As a cheat with no Parallel toolbox, prior to each simulation create the uniquely named mat file that will contain the results, for example saving some dummy information. Then do not run the simulation if the file already exists. This allows several concurrent sessions of matlab/simulation to work through the set of simulations.
Categories
Find more on Data Logging in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!