Manual Performance Optimization - MATLAB & Simulink (original) (raw)
Optimize model settings manually, identify and resolve performance bottlenecks
Achieve faster simulation with your models by manually optimizing the model using one or more of these techniques. For more information, see How Optimization Techniques Improve Performance and Accuracy.
Tools
Simulink Profiler | Analyze distribution of simulation execution time among model components |
---|
Functions
generateReport | Create report of data from profiling simulation run using Simulink Profiler (Since R2023a) |
---|---|
sldiagnostics | Display diagnostic information of Simulink system |
Objects
Simulink.profiler.Data | Access profiling information created using Simulink Profiler |
---|
Model Settings
Model Configuration Parameters: Simulation Target
Topics
- Troubleshoot and Speed Up Simulation Performance
Troubleshoot models and simulation settings to diagnose performance issues and speed up simulations. - Speed Up Simulation
Techniques for improving simulation speed. - Check and Improve Simulation Accuracy
How to interpret simulation accuracy and incorrect simulations. - How Simulink Profiler Captures Performance Data
How the Simulink Profiler identifies parts of your model that slow down simulation. - How Optimization Techniques Improve Performance and Accuracy
Use optimization techniques to understand model behavior and modify model settings to improve performance and accuracy. - Modeling Techniques That Improve Performance
Approaches for improving model performance. - Running Multiple Simulations
Run multiple simulations from theparsim
andbatchsim
commands, and the Multiple Simulations panel in Simulink® Editor. - Understanding Total Time and Self Time in Profiler Reports
The Simulink Profiler displays the performance of the components of your model and their simulation phases.
Featured Examples
Model Advisor
The capabilities of the Model Advisor to check a model or subsystem for conditions and configuration settings that can result in inaccurate or inefficient simulation of the system represented by the model or generation of inefficient code from the model. The Model Advisor produces a report that lists all the suboptimal conditions or settings that it finds, suggesting better model configuration settings where appropriate.
Analyze Simulation Execution Using Simulink Profiler
Identify issues that can contribute to poor simulation performance.
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.
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
.