Execution time prediction for Simulink models
3 views (last 30 days)
Show older comments
Hi,
Is there a method to predict if a simulink model A consumes more time than a Simulink model B?
In my case, I have many models generated by RTW. I am running these models in many threads. Before starting the simulation, I am trying to predict which model will consume more CPU and then affect it to a special thread.
If we can prove that state variables and zero-crossing events of model A are superior than those of model B, can we say that model A will consume more time than model B? I am not sure that is true...
Another solution is to use the WCET technique (Worst Case Execution Time), but I am searching for a simpler technique.
Thank you,
Best Reguards, Hassen
0 Comments
Accepted Answer
Andreas Goser
on 14 Feb 2012
That is a very interesting question and I hope many others contribute to it. My first idea is to simulate a model for a brief period and then extrapolate the time.
Example: Model simulation time is 1000s. Simulate the model for the first 10s and multiply the execution time by 100 for a prediction.
Pro: Simple :-)
Cons: Would only be reasonable for fixed-step. Need to estimate the overhead for startingg a simulation. Does not take into account complex behaviour after the "presimulated" time like Stateflow state machines, enabled subsystems etc.
0 Comments
More Answers (2)
See Also
Categories
Find more on Manual Performance Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!