Configure and Run Simulations with Multiple Simulations Panel
The Multiple Simulations panel allows you to set up multiple simulations for a block parameter that you want to vary, for example, for a parameter sweep or Monte-Carlo simulations. You can pick a block parameter of interest from the model canvas and specify values that you want to use for the simulations. With the Multiple Simulations panel, you can provide configurations such as Use Parallel to run your simulations in parallel. To run the simulations that you have set up, first, select the design study, then click Run All button on Simulation tab on the Simulink® toolstrip. Once the simulations are complete, you can view and manage the results in Simulation Manager.
Workflow for Multiple Simulations Panel
To configure and run multiple simulations from the Simulink Editor:
First, check that you have made all the desired changes to your model.
The Multiple Simulations panel allows you to perform similar operations as the
parsimcommand line API, but through the Simulink Editor. To open the Multiple Simulations panel, navigate to the Prepare section on the Simulink toolstrip. In the Inputs & Parameter Tuning section, click Multiple Simulations .
The Multiple Simulations panel appears docked on the right side of the Simulink canvas.
In the panel, click the right most button to create a new design study. A design study is an object that allows you to set up simulations. The name of the new design study is automatically populated as
DesignStudy. To change the name, double-click on the name and enter your preferred name. Once you configure and enter the values for the simulations, select the design study and click Run All on the Simulink toolstrip to run the simulations.
Now, you can add a block parameter to the created design study. Click to add a new block parameter to the design study. You can enter the block path or use a picker to select a block from the model canvas, or you can enter the block parameter name. Once you have added the block parameter, specify its values. If the block is a Signal Editor block, you can choose your specification from the list of scenarios. By default, all scenarios will be selected.
You can also add variables for your simulations by clicking . In the Details: Design Study section, the Run Options tab, you can also specify the option to run in parallel.
Now that you entered specifications, select the scenarios and the design study that you want to run. Once you select the design study, the Run button on the Simulink toolstrip changes to Run All. Click Run All to run the simulations.
Once the simulations complete, you can view and manage the results in the Simulation Manager . To open the Simulation Manager, click Open Simulation Manager on the status bar at the bottom of the canvas.
Click the save button in the Multiple Simulations panel to save the design study that you have set up. The design study is saved in
.mldatxformat. To reuse the design study, open the Multiple Simulations panel, click the open button, and select the design study file from the file browser.
You can also save the Simulation Manager session information, which includes simulation data all the plot configurations. To save the Simulation Manager session, use the save button on the Simulation Manager toolstrip.