Towards Adjoint and Directional Derivatives in FMI utilizing ADOL-C within OpenModelica

Willi Braun
FH Bielefeld University of Applied Science, Germany

Kshitij Kulshreshtha
Universität Paderborn, Germany

Rüdiger Franke
ABB AG, Mannheim, Germany

Andrea Walther
Universität Paderborn, Germany

Bernhard Bachmann
FH Bielefeld University of Applied Science, Germany

Ladda ner artikelhttp://dx.doi.org/10.3384/ecp17132363

Ingår i: Proceedings of the 12th International Modelica Conference, Prague, Czech Republic, May 15-17, 2017

Linköping Electronic Conference Proceedings 132:40, s. 363-366

Visa mer +

Publicerad: 2017-07-04

ISBN: 978-91-7685-575-1

ISSN: 1650-3686 (tryckt), 1650-3740 (online)


Algorithmic differentiation has proven to be an efficient method for evaluating derivative information for implementations of mathematical functions. In the context of the Functional Mockup Interface (FMI) the reverse mode of algorithmic differentiation shows immense promise.

FMI is increasingly used for model-based applications, such as parameter estimation or optimal control. The paper motivates the exploitation of algorithmic differentiation and proposes an extension of FMI for the evaluation of adjoint directional derivatives.

Attempts to interface algorithmic differentiation libraries with Modelica tools have been made. Instead of generating code for the target language which is instrumented with algorithmic differentiation library API and then compiled, in this new approach the intermediate representation used by the library is generated directly. This avoids compilation of the target language that often takes a large fraction of the overall simulation time. It also avoids model execution in order to create such an internal representation at runtime. The initial results are presented here.


OpenModelica ADOL-C Derivatives Jacobian


F. Casella. Simulation of large-scale models in Modelica: State of the art and future perspectives. In P. Fritzson and H. Elmqvist, editors, Proceedings 11th International Modelica Conference, pages 459–468, Versailles, France, Sep 21–23 2015. The Modelica Association. doi: https://doi.org/10.3384/ecp15118459.

R. Franke, M. Walther, N. Worschech, W. Braun, and B. Bachmann. Model-based control with FMI and a C++ runtime for Modelica. In Proceedings of the 11th International Modelica Conference. Modelica Association, Paris, France, Sep. 2015.

P. Fritzson, P. Aronsson, H. Lundvall, K. Nyström, A. Pop, L. Saldamli, and D. Broman. Openmodelica - a free open-source environment for system modeling, simulation, and teaching. In Computer Aided Control System Design, 2006 IEEE International Conference on Control Applications, 2006 IEEE International Symposium on Intelligent Control, 2006 IEEE, pages 1588 –1595, oct. 2006. doi: https://doi.org/10.1109/CACSD-CCA-ISIC.2006.4776878.

A. Griewank and A. Walther. Principles and Techniques of Algorithmic Differentiation, Second Edition. SIAM, 2008.

A. Griewank, K. Kulshreshtha, and A. Walther. On the numerical stability of algorithmic differentiation. Computing, 94 (2-4):125–149, 2012.

V. Ruge, W. Braun, B. Bachmann, A. Walther, and K. Kulshreshtha. Efficient implementation of collocation methods for optimization using openmodelica and ADOL-C. In H. Tummescheit and K.-E. Årzén, editors, Proceedings of the 10th Modelica Conference, pages 1017–1025, Lund, Sweden, 2014. Modelica Assiciation and Lund University Electronic Press. doi: https://doi.org/10.3384/ECP140961017.

A. Walther and A. Griewank. Getting started with ADOL-C. In U. Naumann and O. Schenk, editors, Combinatorial Scientific Computing, pages 181–202. Chapman-Hall, 2012.

Citeringar i Crossref