Main Content

Troubleshoot Unsatisfactory Real-Time Performance

I want some recommended methods to improve unsatisfactory real-time application performance.

What This Issue Means

Run-time performance and reduce the task execution time (TET) of a model depend on model design, target computer capacity, and target computer utilization.

Try This Workaround

You can improve run-time performance and reduce the task execution time (TET) of a model with these methods.

Run Performance Tools

Use these performance tools:

  • To profile execution of a real-time application , use the startProfiler command.

  • To run the profiler and plot the results, use the plot function.

For more information, see Execution Profiling for Real-Time Applications.

Use a Multicore Target Computer

You can improve run-time performance by configuring your model to take advantage of your multicore target computer:

  1. Partition the model into subsystems according to the physical requirements of the system that you are modeling. Set the block sample rates within each subsystem to the slowest rate that meets the physical requirements of the system.

  2. In the Configuration Parameters dialog box, on the Solver pane, select the check box for Treat each discrete rate as a separate task.

  3. Click Configure Tasks, and then select the Enable explicit model partitioning for concurrent behavior check box.

  4. Create tasks and triggers, and then explicitly assign subsystem partitions to the tasks. See Partition Your Model Using Explicit Partitioning and Multicore Programming with Simulink.

  5. Run the real-time application.


Do not use MATLAB System blocks in the top level of Simulink Real-Time models in which task execution is explicitly partitioned. These blocks generate a TLC error when building the real-time application, for example:

"Unable to find TLCBlockSID within the Block scope"

Minimize the Model

You can improve run-time performance by minimizing your model to make more memory and CPU cycles available for the real-time application:

  1. On the Solver pane, increase Fixed-step size (fundamental sample time). Executing with a short sample time can overload the CPU.

  2. Use polling mode. See Execution Modes.

  3. Reduce the number of I/O channels in the model.

Contact Technical Support

For additional guidance, refer to these sources:

For Speedgoat hardware issues, contact Speedgoat Tech Support:

Related Examples

More About

External Websites