Info

This question is closed. Reopen it to edit or answer.

Simulink Profiler results vary for the same model

1 view (last 30 days)
Omkar Karve
Omkar Karve on 4 Sep 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
I have a complicated model with many sub functions and referenced functions inside the main outer model. I was trying to get an idea of what each of the sub function on level 2 (main outer block splits into 4 sub function blocks) consumes in terms of runtime per loop. I am running the model at a 10ms loop time. The simulation is being built for running on a laptop but eventually will be deployed on a production ECU. I wanted to understand difference that can be made to runtime due to a change to a level 3 or 4. The input to the simulation on two versions of the model is exactly the same.
I did set_param('modelname','Profile','on') and ran the simulation on both the versions. I do see a difference. But then I ran the same version of the model 3 times and I get wildly varying results. I am running this on a Windows 10 laptop. While running the simulations I tried it in both "normal" and "accelerator" mode. But the results for the same sim still vary.
Why is there this variability in the runtimes (self time and time) as reported by the profiler? What needs to be done to correctly run the model on a laptop and get consistent results from the profiler?
I ensured that no other programs are running (even in the background). Only simulink/Matlab was running.
Thanks
  1 Comment
stozaki
stozaki on 9 Sep 2020
Hello Omkar,
What MATLAB version are you using?
Features that reduce build and run times are MATLAB version dependent.
Regards,
stozaki

Answers (0)

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!