Main Content

Simulink Profiler

Identify sources of simulation slowdowns


Use the Simulink® Profiler to examine model and block execution and identify issues that can contribute to poor simulation performance.

Open the Simulink Profiler

  1. Open a model.

  2. On the Debug tab, select Performance Advisor > Simulink Profiler.

  3. On the Profile tab, click Profile.

When simulation is complete, the Profiler Report pane opens and displays the simulation profile for the model.


expand all

This example shows how to use the Simulink Profiler to track down the source of a simulation slowdown in your model.

This example uses a modified version of the sldemo_fuelsys_dd model, or the Modeling a Fault-Tolerant Fuel Control System example model with a slowdown artificially inserted.

Open the profiler for your model from the Debug tab by selecting Performance Advisor > Simulink Profiler.

Click Profile to profile the model. When simulation completes, the Profiler Report pane opens.

Observe that the Engine Gas Dynamics block takes a large portion of the top model's total profiling time (177.759s out of 231.443s). This is a good place to start looking for the problematic block in the model.

Recursively expand the block hierarchy view. By default, the profiler sorts the blocks at the same level of the model in descending order of Total Time(s).

Observe that the For Iterator subsystem accounts for approximately 98% of the execution time of the EGO Sensor subsystem. It is highly probable that this is the source of the slow performance of the model.

Delete the block, reconnect the broken signal and profile the model again. You should see significantly faster simulation times.

To compare the results between the two runs, click Add Report Panel and select the previous run from the Run dropdown.

See Also

Understanding Total Time and Self Time in Profiler Reports

Introduced in R2007b