- https://www.mathworks.com/help/simulink/slref/simulinkprofiler.html
- https://www.mathworks.com/help/simulink/ug/understanding-total-time-and-self-time-in-profiler-reports.html
- https://in.mathworks.com/help/ti-c2000/ug/real-time-profiling.html
Obtaining Simulink Model execution loop rate with Simulink Profiler
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Khalid Hersafril
il 6 Feb 2024
Risposto: Sachin Lodhi
il 13 Feb 2024
I was wondering what might be the best way to obtain the execution loop rate of my simulink model?
The method I am currently doing is by using Simulink profiler and then utilizing the Total time divided by the number of callbacks to get an approximation to my loop rate.
For instance, in the above profiling session, ALUA_sim is the top level model, and using the above formula:
20.861/60971=0.00034214626s
I obtained 0.34ms loop rate (~3kHz). Would this be a reasonable approach?
0 Commenti
Risposta accettata
Sachin Lodhi
il 13 Feb 2024
Yes, this is a common way to get a rough estimate of the execution loop rate. The Simulink Profiler adds some overheads in the background to the functions or models being profiled. Since it gives the detailed execution time for each function during simulation, it is the “best” way to judge the distribution of simulation execution time among model components.
However, keep in mind that this is an average value. The actual time per loop might vary depending on what's being executed in each callback and other system loads that could affect the timing. If you need more precise measurements or if the loop rate is critical for your application, you might need to consider a more detailed analysis or real-time execution profiling.
Some useful links –
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su General Applications in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!