Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models
Equation-based object-oriented (EOO) modeling languages such as Modelica provide a convenient, declarative method for describing models of cyber-physical systems. Because of the ease of use of EOO languages, large and complex models can be built with limited effort. However, current state-of-the-art...
Main Author: | |
---|---|
Format: | Doctoral Thesis |
Language: | English |
Published: |
Linköpings universitet, Programvara och system
2015
|
Subjects: | |
Online Access: | http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-116346 http://nbn-resolving.de/urn:isbn:978-91-7519-071-6 (print) |
id |
ndltd-UPSALLA1-oai-DiVA.org-liu-116346 |
---|---|
record_format |
oai_dc |
spelling |
ndltd-UPSALLA1-oai-DiVA.org-liu-1163462015-05-13T05:05:09ZTools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based ModelsengSjölund, MartinLinköpings universitet, Programvara och systemLinköpings universitet, Tekniska högskolanLinköping2015SimulationmodelingdebuggingprofilingoptimizationparallelismModelicaEquation-based object-oriented (EOO) modeling languages such as Modelica provide a convenient, declarative method for describing models of cyber-physical systems. Because of the ease of use of EOO languages, large and complex models can be built with limited effort. However, current state-of-the-art tools do not provide the user with enough information when errors appear or simulation results are wrong. It is of paramount importance that such tools should give the user enough information to correct errors or understand where the problems that lead to wrong simulation results are located. However, understanding the model translation process of an EOO compiler is a daunting task that not only requires knowledge of the numerical algorithms that the tool executes during simulation, but also the complex symbolic transformations being performed. As part of this work, methods have been developed and explored where the EOO tool, an enhanced Modelica compiler, records the transformations during the translation process in order to provide better diagnostics, explanations, and analysis. This information is used to generate better error-messages during translation. It is also used to provide better debugging for a simulation that produces unexpected results or where numerical methods fail. Meeting deadlines is particularly important for real-time applications. It is usually essential to identify possible bottlenecks and either simplify the model or give hints to the compiler that enable it to generate faster code. When profiling and measuring execution times of parts of the model the recorded information can also be used to find out why a particular system model executes slowly. Combined with debugging information, it is possible to find out why this system of equations is slow to solve, which helps understanding what can be done to simplify the model. A tool with a graphical user interface has been developed to make debugging and performance profiling easier. Both debugging and profiling have been combined into a single view so that performance metrics are mapped to equations, which are mapped to debugging information. The algorithmic part of Modelica was extended with meta-modeling constructs (MetaModelica) for language modeling. In this context a quite general approach to debugging and compilation from (extended) Modelica to C code was developed. That makes it possible to use the same executable format for simulation executables as for compiler bootstrapping when the compiler written in MetaModelica compiles itself. Finally, a method and tool prototype suitable for speeding up simulations has been developed. It works by partitioning the model at appropriate places and compiling a simulation executable for a suitable parallel platform. Doctoral thesis, monographinfo:eu-repo/semantics/doctoralThesistexthttp://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-116346urn:isbn:978-91-7519-071-6 (print)doi:10.3384/diss.diva-116346Linköping Studies in Science and Technology. Dissertations, 0345-7524 ; 1664application/pdfinfo:eu-repo/semantics/openAccess |
collection |
NDLTD |
language |
English |
format |
Doctoral Thesis |
sources |
NDLTD |
topic |
Simulation modeling debugging profiling optimization parallelism Modelica |
spellingShingle |
Simulation modeling debugging profiling optimization parallelism Modelica Sjölund, Martin Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models |
description |
Equation-based object-oriented (EOO) modeling languages such as Modelica provide a convenient, declarative method for describing models of cyber-physical systems. Because of the ease of use of EOO languages, large and complex models can be built with limited effort. However, current state-of-the-art tools do not provide the user with enough information when errors appear or simulation results are wrong. It is of paramount importance that such tools should give the user enough information to correct errors or understand where the problems that lead to wrong simulation results are located. However, understanding the model translation process of an EOO compiler is a daunting task that not only requires knowledge of the numerical algorithms that the tool executes during simulation, but also the complex symbolic transformations being performed. As part of this work, methods have been developed and explored where the EOO tool, an enhanced Modelica compiler, records the transformations during the translation process in order to provide better diagnostics, explanations, and analysis. This information is used to generate better error-messages during translation. It is also used to provide better debugging for a simulation that produces unexpected results or where numerical methods fail. Meeting deadlines is particularly important for real-time applications. It is usually essential to identify possible bottlenecks and either simplify the model or give hints to the compiler that enable it to generate faster code. When profiling and measuring execution times of parts of the model the recorded information can also be used to find out why a particular system model executes slowly. Combined with debugging information, it is possible to find out why this system of equations is slow to solve, which helps understanding what can be done to simplify the model. A tool with a graphical user interface has been developed to make debugging and performance profiling easier. Both debugging and profiling have been combined into a single view so that performance metrics are mapped to equations, which are mapped to debugging information. The algorithmic part of Modelica was extended with meta-modeling constructs (MetaModelica) for language modeling. In this context a quite general approach to debugging and compilation from (extended) Modelica to C code was developed. That makes it possible to use the same executable format for simulation executables as for compiler bootstrapping when the compiler written in MetaModelica compiles itself. Finally, a method and tool prototype suitable for speeding up simulations has been developed. It works by partitioning the model at appropriate places and compiling a simulation executable for a suitable parallel platform. |
author |
Sjölund, Martin |
author_facet |
Sjölund, Martin |
author_sort |
Sjölund, Martin |
title |
Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models |
title_short |
Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models |
title_full |
Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models |
title_fullStr |
Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models |
title_full_unstemmed |
Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models |
title_sort |
tools and methods for analysis, debugging, and performance improvement of equation-based models |
publisher |
Linköpings universitet, Programvara och system |
publishDate |
2015 |
url |
http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-116346 http://nbn-resolving.de/urn:isbn:978-91-7519-071-6 (print) |
work_keys_str_mv |
AT sjolundmartin toolsandmethodsforanalysisdebuggingandperformanceimprovementofequationbasedmodels |
_version_ |
1716803672599429120 |