Nicolai Pedersen
Technical University of Denmark, Embedded Systems Engineering, Denmark / MAN Diesel & Turbo, Denmark
Tom Bojsen
MAN Diesel & Turbo, Copenhagen, Denmark
Jan Madsen
Technical University of Denmark, Embedded Systems Engineering, Denmark
Morten Vejlgaard-Laursen
MAN Diesel & Turbo, Copenhagen, Denmark
Download articlehttp://dx.doi.org/10.3384/ecp1612470Published in: The First Japanese Modelica Conferences, May 23-24, Tokyo, Japan
Linköping Electronic Conference Proceedings 124:10, p. 70-77
Published: 2016-05-18
ISBN: 978-91-7685-749-6
ISSN: 1650-3686 (print), 1650-3740 (online)
Increased complexity of cyber-physical systems within the maritime industry demands closer cooperation between engineering disciplines. The functional mockup interface (FMI) is an initiative aiding cross-discipline interaction by providing, a widely accepted, standard for model exchange and co-simulation. The standard is supported by a number of modelling tools. However, to implement it on an existing platform requires adaptation.
This paper investigates how to adapt the software of an embedded control system to comply with the FMI for co-simulation standard. In particular, we suggest a way of advancing the clock of a real time operating system (RTOS), by overwriting the idle thread and waiting for a signal to start execution until return to idle. This approach ensures a deterministic and temporal execution of the simulation across multiple nodes. As proof of concept, a co-simulation is conducted, showing that the control system of an SCR (selective catalyst reduction) emission reduction system can be packed in a functional mockup unit (FMU) and co-simulated with a physical model, built in Ptolemy II. Results show that FMI can be used for co-simulation of an embedded SCR control software and for control software development. Keywords: Co-Simulation, RTOS, FMI, FMU, Embedded Systems
Industry applications of Modelica and FMI, FMI in Modelica and non-Modelica applications and tools
Andreas Abel, Torsten Blochwitz, Alexander Eichberger, Peter Hamann, and Udo Rein. Functional mock-up interface in mechatronic gearshift simulation for commercial vehicles. 9th Int. Model. Conf., pages 775–780, 2012. doi: 10.3384/ecp12076775.
Jens Bastian, Christoph Clauß, Susann Wolf, and Peter Schneider. Master for Co-Simulation Using FMI. 8th Int. Model. Conf. 2011, pages 115–120, 2011.
doi: 10.3384/ecp11063115.
Christian Bertsch, Jonathan Neudorfer, Elmar Ahle, Siva Sankar Arumugham, Karthikeyan Ramachandran, and Andreas Thuy. FMI for Physical Models on Automotive Embedded Targets. Proc. 11th Int. Model. Conf., pages 43–50, 2015. doi: 10.3384/ecp1511843.
T Blochwitz, M Otter, M Arnold, C Bausch, C Clauß, H Elmqvist, A Junghanns, J Mauss, M Monteiro, T Neidhold, D Neumerkel, H Olsson, J V Peetz, and S Wolf. The Functional Mockup Interface for Tool independent Exchange of Simulation Models. In 8th Int. Model. Conf. 2011, pages 173–184, 2009. doi: 10.3384/ecp12076173.
David Broman, Christopher Brooks, Lev Greenberg, Edward A. Lee, Michael Masin, Stavros Tripakis, and Michael Wetter. Determinate composition of FMUs for cosimulation. 2013 Proc. Int. Conf. Embed. Software, EMSOFT 2013, 2013. doi: 10.1109/EMSOFT.2013.6658580.
Christopher Brooks, Edward A Lee, and Stavros Tripakis. Exploring Models of Computation with Ptolemy II. 10 Proc. eighth IEEE/ACM/IFIP Int. Conf. Hardware/software codesign Syst. Synth., pages 331–332, 2010.
Atiyah Elsheikh, Muhammed Usman Awais, Edmund Widl, and Peter Palensky. Modelica-enabled rapid prototyping of cyber-physical energy systems via the functional mockup interface. 2013 Work. Model. Simul. Cyber-Physical Energy Syst. MSCPES 2013, pages 1–6, 2013. doi: 10.1109/MSCPES.2013.6623315.
IMO. MARPOL : Annex VI and NTC 2008 with guidelines for implementation. Technical report, 2008.
Edward A. Lee, Mehrdad Niknami, Thierry S. Nouidui, and Micheal Wetter. Modeling and Simulating Cyber-Physical Systems. 2015 Int. Conf. Embed. Softw., pages 115–124, 2015. :doi: 10.1109/EMSOFT.2015.7318266.
Jie Liu, Xiaojun Liu, and Edward A Lee. Modeling Distributed Hybrid Systems in Ptolemy II. Proc. 2001 Am. Control Conf., 6:4984–4985, 2001. doi: 10.1109/ACC.2001.945773.
Modelon. FMI Library. URL http://www.jmodelica. org/FMILibrary.
Thierry Nouidui, Michael Wetter, and Wangda Zuo. Functional mock-up unit for co-simulation import in Energy-Plus. J. Build. Perform. Simul., 7(3):192–202, 2014.
doi: 10.1080/19401493.2013.808265.
Nicolai Pedersen, Jan Madsen, and Morten Vejlgaard-Laursen. Co-Simulation of Distributed Engine Control System and Network Model using FMI and SCNSL. 10th IFAC Conf. Manoeuvring Control Mar. Cr. MCMC 2015, 48(16):261–266, 2015. doi: 10.1016/j.ifacol.2015.10.290.
QTronic. FMU SDK. URL https://www.qtronic.de/en/fmusdk.html.
Christoph Stoermer and Ghizlane Tibba. Powertrain Co-Simulation using AUTOSAR and the Functional Mockup Interface standard. Proc. 51st Annu. Des. Autom. Conf. Des. Autom. Conf. - DAC ’14, (March):1–1, 2014. doi: 10.1145/2593069.2602975.
Luigi Vanfretti, Tetiana Bogodorova, and Maxime Baudette. Power system model identification exploiting the Modelica language and FMI technologies. 2014 IEEE Int. Conf. Intell. Energy Power Syst. IEPS 2014 - Conf. Proc., pages 127–132, 2014. doi: 10.1109/IEPS.2014.6874164.
Edmund Widl, Wolfgang Muller, Atiyah Elsheikh, Matthias Hortenhuber, and Peter Palensky. The FMI++ library: A high-level utility package for FMI for model exchange. 2013 Work. Model. Simul. Cyber-Physical Energy Syst. MSCPES 2013, 2013. doi: 10.1109/MSCPES.2013.6623316.