Simulate Models with Faults by Using the Multiple Simulations Panel
After adding faults to your model, you can analyze the effects of faults on model behavior through simulation. You may decide that you want to configure many scenarios with combinations of enabled faults. Simulink® Fault Analyzer™ integrates with the Multiple Simulations panel to run simulations that vary the combinations of enabled faults. For more information, see Configure and Run Simulations with Multiple Simulations Panel.
Set up and Run a Design Study
To open the Multiple Simulations panel, in to the Fault Analyzer tab, in the Simulate section, click Multiple Simulations. Before you can select the faults you want to include in the simulations, you need to create a design study. To create the design study in the Multiple Simulations panel, click the Add a new design study button . By default, the Multiple Simulations panel allows you to run multiple simulations by adjusting parameters or variables. If you have Simulink Fault Analyzer, the Multiple Simulations panel displays the Add a set of faults to the design study button .
When you click the button, you create a list of the faults in your model called a fault set. You select the faults in the fault set that you want to enable during simulation.
You can create multiple simulations that include fault sets, adjustments to parameters, and adjustments to variables in a single design study. Depending on the number of simulations and complexity of your model, your design study might be computationally expensive. If you have Parallel Computing Toolbox™, you can improve simulation speed by enabling parallel simulations. In the Run Options tab, enable Use Parallel.
Fault Combination Considerations
The Multiple Simulations panel determines the number of simulations automatically based on the faults you select in each fault set. If your design study has one fault set, the Multiple Simulations panel prepares a list of simulations where each simulation activates one of the selected faults. If you add additional fault sets, the Multiple Simulations panel prepares the simulations as an exhaustive combination of the selected faults across the fault sets.
When preparing a design study with more than one fault set, the Multiple Simulations panel simulates with errors when these circumstances occur:
The same fault is activated.
More than one fault on the same model element is activated.
For example, if you create two fault sets for a model with three faults on the same model element, the Multiple Simulations panel prepares only three simulations. If you create two fault sets for a model with three faults, the Multiple Simulations panel prepares nine simulations. This image illustrates the total combinations of simulations that the Multiple Simulations panel prepares, where each line indicates a simulation.
Consequentially, at least three of the simulations do not simulate because the same fault is activated more than once. This limitation also means that you cannot add fault sets to the same sequential combination parameter set.
Run the Design Study
After you configure your fault sets, select the design study or studies you want to run by clicking the box next to the design study name in the Run column. The Run button on the Simulink toolstrip changes to Run All. Click Run All to run the simulations. You can watch to simulation progress in the Simulation Manager in the Simulations tab. To open the Simulation Manager, in the Simulation tab, in the Review Results section, click Simulation Manager. After simulation, you can also explore the data with the Simulation Manager or Simulation Data Inspector. To view the simulation results in the Simulation Data Inspector, select one of the simulations in the Simulation Manager and in the Inspect section, click Show Results.
See Also
Simulation Manager | Simulation Data Inspector