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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
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)
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)
Bandhauer, T.M.: A critical review of thermal issues in lithium-ion batteries. J. Electrochem. Soc. 158(3), R1 (2011)
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)
Dubinin, M.M.: Adsorption in micropores. J. Colloid Interface Sci. 23(4), 487–499 (1967)
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)
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)
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)
Glueckauf, E.: Theory of chromatography. Part 10. - Formulae for diffusion into spheres and their application to chromatography. Trans. Faraday Soc. 51, 1540–1551 (1955)
Gomes, C., Thule, C., Broman, D., Larsen, P.G., Vangheluwe, H.: Co-simulation: state of the art. CoRR, abs/1702.0 (2017)
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)
Hoepfer, M.: Towards a comprehensive framework for co-simulation of dynamic models with an emphasis on time stepping. Ph.D. thesis (2011)
Klein, S.A., Beckman, W.A., Duffie, J.A.: TRNSYS: A Transient Simulation Program (1976)
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)
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)
MathWorks (2017). https://de.mathworks.com/products/simulink.html
Modelon: FMI Toolbox for MATLAB/Simulink (2017)
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)
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)
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)
Trcka, M.: Co-simulation for performance prediction of innovative integrated mechanical energy systems in buildings. Ph.D. thesis (2008)
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)
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)
Widl, E.: TRNSYS FMU Export Utility (2015). https://sourceforge.net/projects/trnsys-fmu/
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
Corresponding author
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.
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
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)