Parallel Computing in Simulink - MATLAB & Simulink (original) (raw)
Accelerate Simulink® simulations with parallel computing
For workflows that involve multiple parallel simulations and logging of large amounts of data, you can use parallel computing to accelerate Simulink simulations. This approach is useful in scenarios like model testing, experiment design, Monte Carlo analysis, and model optimization.
Tools
Topics
Run Simulations
- Running Multiple Simulations (Simulink)
Run multiple simulations from theparsim
andbatchsim
commands, and the Multiple Simulations panel in Simulink Editor. - Run Parallel Simulations (Simulink)
Programmatically run model simulations in parallel. - Run Parallel Simulations for a Thermal Model of a House Using parsim (Simulink)
Use aSimulink.SimulationInput
object to run multiple parallel simulations command line workflow. - Configure and Run Simulations with Multiple Simulations Panel (Simulink)
Learn about the Multiple Simulations panel in the Simulink Editor. - Comparison Between Multiple Simulation Workflows (Simulink)
Understand the similarities and differences betweenparsim
,parsim
withRunInBackground
, andbatchsim
. - Analyze Results Using Simulation Manager (Simulink)
Use the Simulation Manager to visualize simulation data, analyze simulation results and trends. - Reduce Update Time for Referenced Models by Using Parallel Builds (Simulink)
Reduce diagram update time for large model reference hierarchies by using parallel builds.
Generate Code
- Reduce Build Time for Referenced Models by Using Parallel Builds (Simulink Coder)
Apply parallel builds to reduce build time for large model reference hierarchies.
Featured Examples
Parallel Simulations Using Parsim: Parameter Sweep in Normal Mode
Run multiple simulations of a Monte Carlo study in parallel by using Parallel Computing Toolbox™. Parallel execution leverages the multiple cores of your host machine to run many simulations more quickly. These simulations could also be run in parallel on computer clusters using the MATLAB® Parallel Server™. This example will work even if the Parallel Computing Toolbox™ or the MATLAB Parallel Server is not available, but the simulations will run in serial.
(Simulink)
Parallel Simulations Using Parsim: Parameter Sweep in Rapid Accelerator Mode
Run multiple simulations of a Monte Carlo study in parallel by using Parallel Computing Toolbox™. Parallel execution leverages the multiple cores of your host machine to run many simulations more quickly. These simulations could also be run in parallel on computer clusters using the MATLAB® Parallel Server™. This example will work even if the Parallel Computing Toolbox™ or the MATLAB Parallel Server is not available, but the simulations will run in serial.
(Simulink)
Parallel Simulations Using Parsim: Test-Case Sweep
Run multiple Simulink® simulations corresponding to different test cases in the Signal Editor block using SimulationInput objects and the parsim
command. The parsim command uses Parallel Computing Toolbox™, if it is available, to run simulations in parallel, otherwise the simulations are run in serial.
(Simulink)
Multiple Simulations Workflow Tips
The goal of this example is to provide helpful tips for running multiple simulations using parallel simulation tools. This example will work even if the Parallel Computing Toolbox™ is not available, but the simulations will run in serial. We will be using the model sldemo_suspn_3dof
.
(Simulink)