I want some recommended methods to improve unsatisfactory real-time application performance.
Run-time performance and reduce the task execution time (TET) of a model depend on model design, target computer capacity, and target computer utilization.
You can improve run-time performance and reduce the task execution time (TET) of a model with these methods.
Use these performance tools:
Run Performance Advisor from the Simulink® Analysis > Performance Tools menu and apply the advice that it provides. See Improve Performance of Multirate Model and Sample Time and Throughput in Real-Time Applications.
Configure a real-time application for profiling, run it, and call
profile_slrt to retrieve the
results. Evaluate the results for potential improvements in the task and
core distribution of the model. See Execution Profiling for Real-Time Applications.
You can improve run-time performance by configuring your model to take advantage of your multicore target computer:
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.
In the Configuration Parameters dialog box, on the Solver pane, select the check box for Treat each discrete rate as a separate task.
Allow tasks to execute concurrently on
target check box.
Click Configure Tasks, and then select the Enable explicit model partitioning for concurrent behavior check box.
Create tasks and triggers, and then explicitly assign subsystem partitions to the tasks. See Partition Your Model Using Explicit Partitioning (Simulink) and Multicore Programming with Simulink (Simulink).
In Simulink Real-Time™ Explorer, on the Target settings pane, check that you selected the Multicore CPU check box.
Run the real-time application.
You can improve run-time performance by minimizing your model to make more memory and CPU cycles available for the real-time application:
If the model contains many states (for example, more than 20 states), clear the States check box in the Configuration Parameters dialog box, on the Data Import/Export pane. You have now disabled state logging, making more memory available for the real-time application.
On the Data Import/Export pane, clear the Time, States, Output, Final states, and Signal logging parameters. You have now turned off data logging, making more CPU cycles available for calculating the model.
On the Simulink Real-Time Options pane, clear the Monitor Task Execution Time check box. You have now disabled TET logging for the real-time application.
On the Solver pane, increase Fixed-step size (fundamental sample time). Executing with a short sample time can overload the CPU.
Use polling mode. See Polling Mode.
In Simulink Real-Time Explorer, on the Target settings pane, clear the Graphics mode check box to disable the target scope display.
Remove scopes from the model.
Eliminate or minimize target computer disk I/O in your model.
Reduce the number of I/O channels in the model.
For additional guidance, refer to these sources:
MathWorks® Tech Support:
For Speedgoat hardware issues, contact Speedgoat Tech Support: