Skip to main content

Co-simulation Between Trnsys and Simulink Based on Type155

  • Conference paper
  • First Online:

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

Abstract

The interface between Trnsys and Matlab based on Type155 of Trnsys’ standard library is used to construct a co-simulation between Trnsys and Simulink. The high flexibility of this interface is demonstrated, which includes its ability to provide a communication in strong and loose coupling schemes. A simplified use case including a compact thermal energy storage is considered to discuss accuracy and computational demands for various settings of the co-simulation. Loose coupling with constant and linear extrapolation of the input variables is presented, as well as an application of the strong coupling scheme to estimate the inaccuracies of the loose coupling co-simulation.

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

References

  • Arnold, M., Clauss, C., Schierz, T.: Error analysis and error estimates for co-simulation in FMI for model exchange and co-simulation V2.0. Arch. Mech. Eng. LX, 75–94 (2013)

    Article  MATH  Google Scholar 

  • Atam, E.: Current software barriers to advanced model-based control design for energy-efficient buildings. Renew. Sustain. Energy Rev. 73(August 2016), 1031–1040 (2017)

    Article  Google Scholar 

  • Bandhauer, T.M.: A critical review of thermal issues in lithium-ion batteries. J. Electrochem. Soc. 158(3), R1 (2011)

    Article  Google Scholar 

  • Blochwitz, T., Otter, M., Arnold, M., Bausch, C., Clauß, C., Elmqvist, H., Junghanns, A., Mauss, J., Monteiro, M., Neidhold, T., Neumerkel, D., Olsson, H., Peetz, J.V., Wolf, S.: The functional mockup interface for tool independent exchange of simulation models. In: 8th International Modelica Conference 2011, pp. 173–184 (2009)

    Google Scholar 

  • Dubinin, M.M.: Adsorption in micropores. J. Colloid Interface Sci. 23(4), 487–499 (1967)

    Article  Google Scholar 

  • Engel, G., Asenbeck, S., Köll, R., Kerskes, H., Wagner, W., van Helden, W.: Simulation of a seasonal, solar-driven sorption storage heating system. J. Energy Storage 13, 40–47 (2017a)

    Article  Google Scholar 

  • Engel, G., Chakkaravarthy, A., Schweiger, G.: A methodology to compare different co-simulation interfaces: a thermal engineering case study. In: Proceedings of the 7th International Conference on Simulation and Modeling Methodologies, Technologies and Applications, SIMULTECH 2017 (2017b)

    Google Scholar 

  • Engel, G., Kohl, B., Girstmair, J., Hinteregger, M.: Sorption thermal energy storage for cooling the battery of a hybrid vehicle. In: International Conference on Renewable Energy Storage (2017c)

    Google Scholar 

  • Glueckauf, E.: Theory of chromatography. Part 10. - Formulae for diffusion into spheres and their application to chromatography. Trans. Faraday Soc. 51, 1540–1551 (1955)

    Article  Google Scholar 

  • Gomes, C., Thule, C., Broman, D., Larsen, P.G., Vangheluwe, H.: Co-simulation: state of the art. CoRR, abs/1702.0 (2017)

    Google Scholar 

  • Hafner, I., Heinzl, B., Rössler, M.: An investigation on loose coupling co-simulation with the BCVTB. Simul. Notes Eur. 23(1), 45–50 (2013)

    Google Scholar 

  • Hoepfer, M.: Towards a comprehensive framework for co-simulation of dynamic models with an emphasis on time stepping. Ph.D. thesis (2011)

    Google Scholar 

  • Klein, S.A., Beckman, W.A., Duffie, J.A.: TRNSYS: A Transient Simulation Program (1976)

    Google Scholar 

  • Lund, P.D., Lindgren, J., Mikkola, J., Salpakari, J.: Review of energy system flexibility measures to enable high levels of variable renewable electricity. Renew. Sustain. Energy Rev. 45, 785–807 (2015)

    Article  Google Scholar 

  • Mathias, O., Gerrit, W., Leon, U.: Life cycle simulation for a process plant based on a two-dimensional co-simulation approach. In: Computer Aided Chemical Engineering, vol. 37 (2015)

    Google Scholar 

  • MathWorks (2017). https://de.mathworks.com/products/simulink.html

  • Modelon: FMI Toolbox for MATLAB/Simulink (2017)

    Google Scholar 

  • Riederer, P., Keilholz, W., Ducreux, V., Antipolis Cedex, F.: Coupling of TRNSYS with SIMULINK - a method to automatically export and use TRNSYS models within SIMULINK and vice versa. In: Eleventh International IBPSA Conference Glasgow Scotland, pp. 1628–1633 (2009)

    Google Scholar 

  • Schmoll, R., Schweizer, B.: Convergence study of explicit co-simulation approaches with respect to subsystem solver settings. In: Proceedings in Applied Mathematics and Mechanics, vol. 82, pp. 81–82 (2012)

    Google Scholar 

  • Schweiger, G., Larsson, P.-O., Magnusson, F., Lauenburg, P., Velut, S.: District heating and cooling systems - framework for Modelica-based simulation and dynamic optimization. Energy (2017a, in press). https://doi.org/10.1016/j.energy.2017.05.115

  • Schweiger, G., Rantzer, J., Ericsson, K., Lauenburg, P.: The potential of power-to-heat in Swedish district heating systems. Energy (2017b, in press). https://doi.org/10.1016/j.energy.2017.02.075

  • Trcka, M., Hensen, J.L.M., Wetter, M.: Co-simulation of innovative integrated HVAC systems in buildings. J. Build. Perform. Simul. 2(3), 209–230 (2009)

    Article  Google Scholar 

  • Trcka, M.: Co-simulation for performance prediction of innovative integrated mechanical energy systems in buildings. Ph.D. thesis (2008)

    Google Scholar 

  • Wetter, M.: Co-simulation of building energy and control systems with the building controls virtual test bed. J. Build. Perform. Simul. 4(3), 185–203 (2011)

    Article  Google Scholar 

  • Wetter, M., Fuchs, M., Nouidui, T.S.: Design choices for thermofluid flow components and systems that are exported as functional mockup units. In: 11th International Modelica Conference, no. iv, pp. 31–41 (2015)

    Google Scholar 

  • Widl, E.: TRNSYS FMU Export Utility (2015). https://sourceforge.net/projects/trnsys-fmu/

Download references

Acknowledgements

The research leading to these results has received funding from the Austrian FFG Programme Energieforschung under grant agreement no. 845020, and the Research Studio Austria no. 844732. The authors acknowledge valuable discussions with W. Glatzl, H. Schranzhofer, G. Lechner, I. Hafner and E. Widl.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Georg Engel .

Editor information

Editors and Affiliations

Appendix: Detailed Settings and Results

Appendix: Detailed Settings and Results

The essential solver parameters used in this study are given in Table 1. In all cases discussed here, the Trnsys solver is the successive one (modified Euler) with a relaxation factor of 1. Table 1 also gives a comparison of the performance of the different co-simulation setups in terms of accuracy and computational costs.

Table 1. The parameter settings for the different simulations as well as performance indicators for the (co-)simulations for accuracy and computational demands are given. “Ref.” denotes the reference simulation, “Monolithic” a Trnsys simulation without co-simulation, “default” the default parameter setting (\(t_\mathrm{step}\) = 1 s and tol. = \(10^{-6}\)), “lin. extrapol.” the loose coupling with linear extrapolation of the input variables, “relaxed” the relaxed solver parameters (to match the accuracy of the BCVTB/FMI based co-simulation). \(t_\mathrm{step}\) denotes the Trnsys time step; “call.Mode” abbreviates “callingMode”, which is the parameter of the Type155 governing the commuication pattern; and “tol.” gives the relative tolerance. \(\varDelta T_b\), \(\varDelta T_s\), \(\varDelta T_\mathrm{s,out}\) and \(\varDelta T_\mathrm{s,in}\) refer to the respective maximum deviation of these variables in units of Kelvin, and “comp.” denotes the computational demand of the respective simulation. The simulations were executed on an Intel Xeon E5 6C/12T 2.2 GHz with 96 GB RAM.

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Engel, G., Chakkaravarthy, A.S., Schweiger, G. (2018). Co-simulation Between Trnsys and Simulink Based on Type155. In: Cerone, A., Roveri, M. (eds) Software Engineering and Formal Methods. SEFM 2017. Lecture Notes in Computer Science(), vol 10729. Springer, Cham. https://doi.org/10.1007/978-3-319-74781-1_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-74781-1_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-74780-4

  • Online ISBN: 978-3-319-74781-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics