Skip to main content

An FMI-Based Initialization Plugin for INTO-CPS Maestro 2

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12524))

Abstract

The accuracy of the result of a co-simulation is dependent on the correct initialization of all the simulation units. In this work, we consider co-simulation where the simulation units are described as Functional Mock-up Units (FMU). The Functional Mock-up Interface (FMI) specification specifies constraints to the initialization of variables in the scope of a single FMU. However, it does not consider the initialization of interconnected variables between instances of FMUs. Such interconnected variables place particular constraints on the initialization order of the FMUs.

The approach taken to calculate a correct initialization order is based on predicates from the FMI specification and the topological ordering of both internal connections and interconnected variables. The approach supports the initialization of co-simulation scenarios containing algebraic loops using fixed point iteration. The approach has been realized as a plugin for the open-source INTO-CPS Maestro 2 Co-simulation framework. It has been tested for various scenarios and compared to an existing Initializer that has been validated through academic and industrial application.

We are grateful to the Poul Due Jensen Foundation, which has supported the establishment of a new Centre for Digital Twin Technology at Aarhus University. Finally, we thank the reviewers for the thorough feedback.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    Currently in alpha https://github.com/INTO-CPS-Association/maestro/tree/2.0.0-alpha.

  2. 2.

    5 iterations is the default in our approach. This number is based on experience.

  3. 3.

    https://github.com/SimplisticCode/QuarterCarCaseStudy.

  4. 4.

    http://msdl.cs.mcgill.ca/people/claudio/projs/PrologCosimGeneration.zip.

References

  1. Amálio, N., Payne, R., Cavalcanti, A., Woodcock, J.: Checking SysML models for co-simulation. In: Ogata, K., Lawford, M., Liu, S. (eds.) ICFEM 2016. LNCS, vol. 10009, pp. 450–465. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-47846-3_28

    Chapter  Google Scholar 

  2. Arnold, M., Clauß, C., Schierz, T.: Error analysis and error estimates for co-simulation in FMI for model exchange and co-simulation v2.0. In: Schöps, S., Bartel, A., Günther, M., ter Maten, E.J.W., Müller, P.C. (eds.) Progress in Differential-Algebraic Equations. DEF, pp. 107–125. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44926-4_6

    Chapter  MATH  Google Scholar 

  3. Bastian, J., Clauß, C., Wolf, S., Schneider, P.: Master for co-simulation using FMI. In: 8th International Modelica Conference, pp. 115–120. Linköping University Electronic Press, Linköpings universitet (2011). https://doi.org/10.3384/ecp11063115

  4. Blockwitz, T., et al.: Functional mockup interface 2.0: the standard for tool independent exchange of simulation models. In: 9th International Modelica Conference, pp. 173–184. Linköping University Electronic Press (2012). https://doi.org/10.3384/ecp12076173

  5. Broman, D., et al.: Composition of FMUs for Co-Simulation. Technical report, University of California, Berkeley (2013). http://www.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-153.html

  6. Évora Gómez, J., Hernández Cabrera, J.J., Tavella, J.P., Vialle, S., Kremers, E., Frayssinet, L.: Daccosim NG: co-simulation made simpler and faster. In: The 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019, pp. 785–794, February 2019. https://doi.org/10.3384/ecp19157785

  7. FMI.: Functional Mock-up Interface for Model Exchange and Co-Simulation (2014). https://fmi-standard.org/downloads/

  8. Gomes, C., Denil, J., Vangheluwe, H.: Causal-block diagrams: a family of languages for causal modelling of cyber-physical systems. Foundations of Multi-Paradigm Modelling for Cyber-Physical Systems, pp. 97–125. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-43946-0_4

    Chapter  Google Scholar 

  9. Gomes, C., Lucio, L., Vangheluwe, H.: Semantics of co-simulation algorithms with simulator contracts. In: 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C) (2019). https://doi.org/10.1109/models-c.2019.00124

  10. Gomes, C., Thule, C., Lúcio, L., Vangheluwe, H., Larsen, P.G.: Generation of co-simulation algorithms subject to simulator contracts. In: Camara, J., Steffen, M. (eds.) SEFM 2019. LNCS, vol. 12226, pp. 34–49. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-57506-9_4

    Chapter  Google Scholar 

  11. Gomes, C., et al.: HintCO - hint-based configuration of co-simulations. In: International Conference on Simulation and Modeling Methodologies, Technologies and Applications, pp. 57–68 (2019). https://doi.org/10.5220/0007830000570068

  12. Gomes, C., Thule, C., Broman, D., Larsen, P.G., Vangheluwe, H.: Co-simulation: a survey. ACM Comput. Surv. 51(3), 1–33, Article 49 (2018). https://doi.org/10.1145/3179993

  13. JIProlog: JIProlog, October 2016. http://www.jiprolog.com. Accessed 20 Aug 2020

  14. Kübler, R., Schiehlen, W.: Two methods of simulator coupling. Math. Comput. Model. Dyn. Syst. 6(2), 93–113 (2000). https://doi.org/10.1076/1387-3954(200006)6:2;1-M;FT093

    Article  MATH  Google Scholar 

  15. Miyazawa, U.Y.A., Woodcock, U.J.: Integrated tool chain for model-based design of CPSs foundations of the SysML profile for CPS modelling (2016). https://www.semanticscholar.org/paper/INtegrated-TOol-chain-for-model-based-design-of-of-Miyazawa-Woodcock/3042572251aba18ab21ced9cc2fb49223dea2a2c. Accessed 13 Nov 2020

  16. Palensky, P., Van Der Meer, A.A., Lopez, C.D., Joseph, A., Pan, K.: Cosimulation of intelligent power systems: fundamentals, software architecture, numerics, and coupling. IEEE Ind. Electron. Mag. 11(1), 34–50 (2017). https://doi.org/10.1109/MIE.2016.2639825

    Article  Google Scholar 

  17. Robby Hatcliff, J., Belt, J.: Model-based development for high-assurance embedded systems. In: Margaria, T., Steffen, B. (eds.) Leveraging Applications of Formal Methods, Verification and Validation. Modeling, pp. 539–545. Lecture Notes in Computer Science, Springer International Publishing (2018). https://doi.org/10.1007/978-3-030-03418-4_32

  18. Scala: The Scala Programming Language, August 2020. https://www.scala-lang.org. Accessed 19 Aug 2020

  19. Schramm, D., Hiller, M., Bardini, R.: Force components. Vehicle Dynamics, pp. 207–224. Springer, Heidelberg (2018). https://doi.org/10.1007/978-3-662-54483-9_9

    Chapter  MATH  Google Scholar 

  20. Tarjan, R.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972). https://doi.org/10.1137/0201010

    Article  MathSciNet  MATH  Google Scholar 

  21. Thule, C., Lausdahl, K., Gomes, C., Meisl, G., Larsen, P.: Maestro: the INTO-CPS co-simulation framework. Simul. Model. Pract. Theor. 92, 45–61 (2019). https://doi.org/10.1016/j.simpat.2018.12.005

    Article  Google Scholar 

  22. Thule, C., et al.: Towards reuse of synchronization algorithms in co-simulation frameworks. In: Camara, J., Steffen, M. (eds.) SEFM 2019. LNCS, vol. 12226, pp. 50–66. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-57506-9_5

    Chapter  Google Scholar 

  23. Z3prover: z3, September 2020). https://github.com/Z3Prover/z3/wiki. Accessed 13 Sept 2020

Download references

Acknowledgements

We would like to thank Stefan Hallerstede, Christian Møldrup Legaard, and Peter Gorm Larsen for providing valuable input to this paper and the developed plugin.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Simon Thrane Hansen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hansen, S.T., Thule, C., Gomes, C. (2021). An FMI-Based Initialization Plugin for INTO-CPS Maestro 2. In: Cleophas, L., Massink, M. (eds) Software Engineering and Formal Methods. SEFM 2020 Collocated Workshops. SEFM 2020. Lecture Notes in Computer Science(), vol 12524. Springer, Cham. https://doi.org/10.1007/978-3-030-67220-1_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-67220-1_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-67219-5

  • Online ISBN: 978-3-030-67220-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics