Troubleshooting Real-Time Simulation Issues

Avoid Computer Overloads and Unacceptable Simulation Results

A model is not real-time capable if, during simulation on real-time target hardware, it overloads the CPU or produces results that do not match your theoretical calculations or experimental data. To make your model real-time capable, use the workflows in Real-Time Model Preparation Workflow and Real-Time Simulation Workflow. For examples that show how to:

If you cannot find a combination of solver settings and model fidelity that makes your model real-time capable, consider one of these options:

  • Execute your real-time application on a faster target machine.

  • Configure the networks in your model so that they are independent of each other, and then partition them for parallel simulation on individual target computers. For information, see Multicore Programming with Simulink

Optimize Real-Time Application Execution Using Simscape Checks

If you have a Simulink® Real-Time™ license, you can optimize your model for real-time execution using the Execute real-time application activity mode in Performance Advisor. This mode includes several checks specific to physical models. Use Simulink Performance Advisor to identify:

  • Simscape™ Solver Configuration blocks with settings that are suboptimal for real-time simulation. For optimal results, Solver Configuration blocks should have the following options selected: Use local solver and Use fixed-cost runtime consistency iterations.

  • Simscape blocks that have a Fluid dynamic compressibility option that is suboptimal for real-time simulation. For optimal results, the Fluid dynamic compressibility option should be set to Off.

To access the checks, in the Performance Advisor window, under Activity, select Execute real-time application. In the left pane, expand the Real-Time folder, and then the Simscape checks folder. Run the Simscape checks.

For more information, see Use Performance Advisor to Improve Simulation Efficiency.

Related Topics