Profiling of Modelica Real-Time Models
CHRISTIAN HANSJOACHIM SCHULZE, Michaela Huhn, Martin Schüler · Equation-Based Object-Oriented Modeling Languages and Tools · 2010
Modeling and simulation of physical systems have become a substantial part in the development of mechatronic systems. A number of usage scenarios for such models like Rapid Control Prototyping and Hardware-in-the-Loop testing require simulation in real-time. To enable model execution on a hard real-time target, a number of adaptations are usually performed on the model and the solver. However, a profiling facility is needed to direct the developer to performance bottlenecks. We present the concepts and a prototypical implementation of a profiler for the specific analysis of Modelica models running on Scale-RT, a Linux-based real-time kernel. The profiler measures the number of calls and execution times of simulation specific functions calls. Interpreting these results, the developer can directly deduce which components of a simulation model are most promising for optimization. Profiling results and their impact on model optimization are discussed on two case studies from the area of thermodynamic automotive systems.