Files

Abstract

In 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.

Details

PDF

Statistics

from
to
Export
Download Full History