Conference article
Making Modelica Models Available for Analysis in Python Control Systems Library
Anushka Perera
Telemark University College, Porsgrunn, Norway
Carlos Pfeiffer
Telemark University College, Porsgrunn, Norway
Bernt Lie
Telemark University College, Porsgrunn, Norway
Tor Anders Hauge
Glencore Nikkelverk, Kristiansand, Norway
Download article![](/images/PDF_24.png)
Published in: Proceedings of the 55th Conference on Simulation and Modelling (SIMS 55), Modelling, Simulation and Optimization, 21-22 October 2014, Aalborg, Denmark
Linköping Electronic Conference Proceedings 108:12, p. 138-148
Show more +
Published: 2014-12-09
ISBN: 978-91-7519-376-2
ISSN: 1650-3686 (print), 1650-3740 (online)
Abstract
Modelica-based simulation environments are primarily targeted on model simulation, therefore they generally lack support for advanced analysis and synthesis needed for general control systems design and particularly for optimal control problems (OCPs), although a Modelica language extension (Optimica) exists to support general optimization problems. On the other hand, MATLAB has a rich set of control analysis and synthesis tools based on linear models. Similarly, Python has increasing support for such tools e.g. the "Python Control System Library" developed in Caltech. In this paper, we consider the possibility of automating the process of extracting linear approximations of Modelica models, and exporting these models to a tool with good support for linear analysis and design. The cost of software is an important aspect in our development. Two widly used free Modelica tools are OpenModelica and JModelica.org. Python is also freely available, and is thus a suitable tool for analysis and design in combination with the "Python Control System Library" package. In this work we choose to use JModelica.org as the Modelica tool because of its better integration with Python and CasADi, a CAS (Computer Algebra System) tool that can be used to linearize Modelica models. The methods that we discuss can in principle also be adapted for other Modelica tools. In this paper we present methods for automatically extracting a linear approximation of a dynamic model encoded in Modelica, evaluated at a given operating point, and making this linear approximation available in Python. The developed methods are illustrated by linearizing the dynamic model of a four tank level system, and showing examples of analysis and design based on the linear model. The industrial application of these methods to the Copper production plant at Glencore Nikkelverk AS, Kristiansand, Norway, is also discussed as current work.
Keywords
Modelica; JModelica.org; Python; CasADi; Symbolic/Numeric Linearization; Linear Analysis; python-control
References
Citations in Crossref