000010730 001__ 10730 000010730 005__ 20240627123530.0 000010730 0247_ $$2doi$$a10.24868/10730 000010730 245__ $$aA Model-in-the-Loop Technique for Digital Twin Simulations (MIL-DT): A Generalized Approach for Simulating Embedded Software 000010730 269__ $$a2022-08-23 000010730 336__ $$aConference Proceedings 000010730 520__ $$aIn this article we propose a new Model-in-the-Loop approach to Digital Twin Simulations (MIL-DT) for cases where autocode generation or high-level software modelling is not possible, due to complexity or toolchain restrictions. A high fidelity “twin” of the hardware / software interaction is instead created by parsing a portion of the embedded source code into a Matlab / Simulink graphical diagram. The result is then simulated against a hand-coded model of the underlying hardware, also in Matlab / Simulink. This modelling approach presented here is an alternative to more common methods such as autocode generation, which also enables a high fidelity model of hardware / software interaction. In autocode generation, a hand coded feedback control diagram is parsed to create embedded software with the intent that this software is used with minimal modification for a unit under test. This is typically done with the assistance of a commercial toolchain such as Matlab. The MIL-DT model proposed here model consists of three main parts: a software application layer, a software support layer, and a physics based model of plant hardware. To create such a model the target codebase is divided into two parts (i.e. the software application layer and support layer, separated by an application programming interface (API)). The application layer is imported or compiled in an automated process and represents a very high fidelity model of the software itself. The support layer is written to emulate (or “stub”) any functional calls or operations needed by the application layer. The API enforces a structured interaction of data communication and functional calls. Finally, the physics based hardware model could be as high or as low fidelity as necessary to enable risk reduction in the end application. The MIL-DT approach will be illustrated using a simplified example of a DC-DC power converter. The division of the software into application and support layers will also be illustrated, with a simple C file being parsed into a Simulink diagram, which will make up the application layer. The support layer is provided by built in Simulink blocks. The physics of the DC-DC converter is modelled as a full switching model, with the goal of qualitatively improving convergence rates of a provided regulator. 000010730 542__ $$fCC-BY 000010730 6531_ $$aDigital Twin 000010730 6531_ $$aModel in the Loop 000010730 6531_ $$aSoftware Automation 000010730 6531_ $$aSimulation 000010730 6531_ $$aPower Conversion 000010730 7001_ $$aMorris, B$$uL3Harris 000010730 7001_ $$aCheng, T$$uL3Harris 000010730 7001_ $$aKoontz, C$$uBPMI 000010730 773__ $$tConference Proceedings of iSCSS 000010730 773__ $$jiSCSS 2022 000010730 85641 $$uhttps://www.imarest.org/events/category/categories/imarest-event/international-ship-control-systems-symposium-2022$$yConference website 000010730 8564_ $$9eaf79765-efad-49a8-bbc2-a967fbcb322a$$s1095570$$uhttps://library.imarest.org/record/10730/files/10730.pdf 000010730 980__ $$aConference Proceedings