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 the Simulink Performance Advisor. This mode includes several checks specific to physical
models. For example, the Simulink Performance Advisor identifies Simscape™
Solver Configuration blocks with settings that are suboptimal for real-time
simulation. For optimal results, Solver Configuration blocks should have the
Use local solver and Use fixed-cost runtime consistency
iterations options selected.
The checks are organized into folders. You can use the checks in the Simscape checks folder for all physical models. Subfolders contain checks that target blocks from Simscape Electrical™ and other add-on products such as Simscape Driveline™ and Simscape Multibody™.
To run the Simulink Real-Time Performance Advisor Checks:
In the Simulink Editor menu bar, select Debug > Performance Advisor.
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 top-level Simscape checks and the Simscape Electrical checks. If your model contains blocks from other add-on products, also run the checks in the subfolder corresponding to that product.