Measuring Execution Time of Simulink Model or part of it

In Real-time applications, a knowledge of the execution time requirement of the code is necessary for many reasons. This guide will help
262 download
Aggiornato 7 mag 2020

Visualizza la licenza

It is occasionally desired to measure how long it takes for a certain embedded code to execute on given target hardware. For example, real-time applications need to execute in a time period that doesn’t exceed the periodic time (program cycle time), otherwise, a timer-over run error is generated. Another reason why we need to know the execution time is to compare the computational load of different algorithms that perform the same task to know their advantage with respect to computational load and execution speed.
For those who use a Model-based approach and specifically use Simulink for programming real-time application and need a simple way to follow, this short guide is given. Because the Simulink coder keeps them relatively apart from generating the code, they may face difficulties in such measurement while those who code directly with C in code composer studio may not face this difficulty!
To avoid loss of generality and make this guide useful, the specific names of the model and of the block (or subsystem) used in this guide whose execution time knowledge is desired will be edited with the red-colored font to highlight them so as to replace them with your specific names when you repeat the example for your own model/block.

Cita come

Usama Mohamed (2025). Measuring Execution Time of Simulink Model or part of it (https://it.mathworks.com/matlabcentral/fileexchange/75388-measuring-execution-time-of-simulink-model-or-part-of-it), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2018a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Tag Aggiungi tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0