Skip to main content

Do-it-Yourself FMU Generation

  • Conference paper
  • First Online:
Software Engineering and Formal Methods. SEFM 2022 Collocated Workshops (SEFM 2022)

Abstract

While many modeling and simulation environments provide tools for the generation of FMI-compliant FMUs, developers often have to design an FMU from scratch in order to co-simulate their own code or code from a third-party framework. This paper reports on the authors’ experience in FMU development and presents some simple guidelines based on that experience. In particular, FMU generation is discussed in the context of a model predictive control framework using a robot arm as running example.

This work has been partially supported by the Italian Ministry of Education and Research (MIUR) in the framework of the CrossLab project (Department of Excellence) and by the HiEFFICIENT (Highly EFFICIENT and reliable electric drivetrains based on modular, intelligent and highly integrated wide bandgap power electronics modules) project, ECSEL Joint Undertaking (JU), under grant agreement no. 101007281.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.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

Institutional subscriptions

References

  1. Bernardeschi, C., et al.: Co-simulation of a model predictive control system for automotive applications. In: Bernardeschi, C., et al. (eds.) Software Engineering and Formal Methods. Lecture Notes in Computer Science, pp. 204–220. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-12429-7_15

    Chapter  Google Scholar 

  2. Bernardeschi, C., et al.: Cross-level co-simulation and verification of an automatic transmission control on embedded processor. In: Cleophas, L., Massink, M. (eds.) SEFM 2020. LNCS, vol. 12524, pp. 263–279. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-67220-1_20

    Chapter  Google Scholar 

  3. Bernardeschi, C., Dini, P., Domenici, A., Palmieri, M., Saponara, S.: Formal verification and co-simulation in the design of a synchronous motor control algorithm. Energies 13(16), 4057 (2020). https://doi.org/10.3390/en13164057

    Article  Google Scholar 

  4. Bernardeschi, C., Domenici, A., Masci, P.: A PVS-simulink integrated environment for model-based analysis of cyber-physical systems. IEEE Trans. Software Eng. 44(6), 512–533 (2018). https://doi.org/10.1109/TSE.2017.2694423

    Article  Google Scholar 

  5. Blochwitz, T., et al.: Functional mockup interface 2.0: the standard for tool independent exchange of simulation models. In: Proceedings of the 9th International MODELICA Conference, Munich, Germany, 3–5 September 2012, pp. 173–184. no. 76 in Linköping Electronic Conference Proceedings, Linköping University Electronic Press (2012). https://doi.org/10.3384/ecp12076173

  6. Charif, A., Busnot, G., Mameesh, R.H., Sassolas, T., Ventroux, N.: Fast virtual prototyping for embedded computing systems design and exploration. In: Chillet, D. (ed.) Proceedings of the Rapid Simulation and Performance Evaluation: Methods and Tools, RAPIDO 2019, Valencia, Spain, 21-23 January 2019, pp. 3:1–3:8. ACM (2019). https://doi.org/10.1145/3300189.3300192

  7. Dini, P., Saponara, S.: Model-based design of an improved electric drive controller for high-precision applications based on feedback linearization technique. Electronics 10(23) (2021). https://doi.org/10.3390/electronics10232954, https://www.mdpi.com/2079-9292/10/23/2954

  8. Dini, P., Saponara, S.: Processor-in-the-loop validation of a gradient descent-based model predictive control for assisted driving and obstacles avoidance applications. IEEE Access 10, 67958–67975 (2022). https://doi.org/10.1109/ACCESS.2022.3186020

    Article  Google Scholar 

  9. Documentation, S.: Simulation and model-based design (2020). https://www.mathworks.com/products/simulink.html

  10. Domenici, A., Fagiolini, A., Palmieri, M.: Integrated simulation and formal verification of a simple autonomous vehicle. In: Cerone, A., Roveri, M. (eds.) SEFM 2017. LNCS, vol. 10729, pp. 300–314. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-74781-1_21

    Chapter  Google Scholar 

  11. Functional Mock-up Interface Specification, version 3.0, 2022-05-10 . https://fmi-standard.org/docs/3.0/ (2022)

  12. Functional Mock-up Interface for Model Exchange and Co-Simulation. Technical report, Modelica Association (2020). http://fmi-standard.org/

  13. Fritzson, P., et al.: The openmodelica modeling, simulation, and development environment. In: 46th Conference on Simulation and Modelling of the Scandinavian Simulation Society (SIMS2005) (2005)

    Google Scholar 

  14. Gomes, C., et al.: Application of model-based testing to dynamic evaluation of functional mockup units. In: Proceedings of the American Modelica Conference 2020, no. 16, pp. 149–158 (2020). https://doi.org/10.3384/ecp20169149

  15. Gomes, C., Thule, C., Broman, D., Larsen, P.G., Vangheluwe, H.: Co-simulation: a survey. ACM Comput. Surv. (CSUR) 51(3), 1–33 (2018)

    Article  Google Scholar 

  16. GrĂĽne, L., Pannek, J.: Nonlinear Model Predictive Control. CCE, Springer, Cham (2017). https://doi.org/10.1007/978-3-319-46024-6

    Book  MATH  Google Scholar 

  17. He, W., Gao, H., Zhou, C., Yang, C., Li, Z.: Reinforcement learning control of a flexible two-link manipulator: an experimental investigation. IEEE Trans. Syst. Man Cybernet. Syst. 51, 7326–7336 (2020). https://doi.org/10.1109/TSMC.2020.2975232

    Article  Google Scholar 

  18. Käpernick, B., Graichen, K.: The gradient based nonlinear model predictive control software grampc. In: Proceedings 2014 European Control Conference (ECC), pp. 1170–1175 (2014). https://doi.org/10.1109/ECC.2014.6862353

  19. Larsen, P.G., et al.: Integrated tool chain for model-based design of cyber-physical systems: the INTO-CPS project. In: 2016 2nd International Workshop on Modelling, Analysis, and Control of Complex CPS (CPS Data), pp. 1–6, April 2016. https://doi.org/10.1109/CPSData.2016.7496424

  20. Lee, D., Lim, M.C., Negash, L., Choi, H.L.: EPPY based building co-simulation for model predictive control of HVAC optimization. In: 2018 18th International Conference on Control, Automation and Systems (ICCAS), pp. 1051–1055 (2018)

    Google Scholar 

  21. Legaard, C., Tola, D., Schranz, T., Macedo, H., Larsen, P.: A universal mechanism for implementing functional mock-up units. In: SIMULTECH, pp. 121–129 (2021). https://doi.org/10.5220/0010577601210129

  22. Mardan, A.: Template engines: pug and handlebars. In: Practical Node.js, pp. 113–163. Apress, Berkeley, CA (2018). https://doi.org/10.1007/978-1-4842-3039-8_4

    Chapter  Google Scholar 

  23. Palmieri, M., Bernardeschi, C., Masci, P.: Co-simulation of semi-autonomous systems: the line follower robot case study. In: Cerone, A., Roveri, M. (eds.) SEFM 2017. LNCS, vol. 10729, pp. 423–437. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-74781-1_29

    Chapter  Google Scholar 

  24. Palmieri, M., Bernardeschi, C., Masci, P.: A framework for FMI-based co-simulation of human–machine interfaces. Softw. Syst. Model. 19(3), 601–623 (2019). https://doi.org/10.1007/s10270-019-00754-9

    Article  Google Scholar 

  25. Palmieri, M., Macedo, H.D.: Automatic generation of functional mock-up units from formal specifications. In: Camara, J., Steffen, M. (eds.) SEFM 2019. LNCS, vol. 12226, pp. 27–33. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-57506-9_3

    Chapter  Google Scholar 

  26. Thule, C., Lausdahl, K., Larsen, P.G.: Overture FMU: export VDM-RT models as tool-wrapper FMUs. In: Proceedings of the 16th overture workshop, School of Computing Science Technical report Series, vol. 1524, pp. 23–38 (2018)

    Google Scholar 

  27. Von Wissel, D., Talon, V., Thomas, V., Grangier, B., Lansky, L., Uchanski, M.: Linking model predictive control (MPC) and system simulation tools to support automotive system architecture choices. In: 8th European Congress on Embedded Real Time Software and Systems (ERTS 2016). TOULOUSE, France, Jan 2016. https://hal.archives-ouvertes.fr/hal-01289503

  28. Yakub, F., Mori, Y.: Model predictive control for car vehicle dynamics system - comparative study. In: 2013 IEEE Third International Conference on Information Science and Technology (ICIST), pp. 172–177 (2013). https://doi.org/10.1109/ICIST.2013.6747530

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Maurizio Palmieri .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Bernardeschi, C., Dini, P., Domenici, A., Palmieri, M., Saponara, S. (2023). Do-it-Yourself FMU Generation. In: Masci, P., Bernardeschi, C., Graziani, P., Koddenbrock, M., Palmieri, M. (eds) Software Engineering and Formal Methods. SEFM 2022 Collocated Workshops. SEFM 2022. Lecture Notes in Computer Science, vol 13765. Springer, Cham. https://doi.org/10.1007/978-3-031-26236-4_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-26236-4_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-26235-7

  • Online ISBN: 978-3-031-26236-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics