A TrueTime Extension for Instruction-level Timing and Multi-stack Support

Andreas Naderlinger, Michael Moser · 2019

This paper presents an extension to TrueTime, a widely used toolbox for co-simulation of networked real-time control systems in the block-oriented modeling and simulation environment MATLAB/Simulink. TrueTime provides an implementation of a real-time kernel as a Simulink block, which is able to execute a set of tasks and interrupt handlers under various scheduling schemes. By annotating the controller code with platform-specific timing information, it thereby allows to observe the temporal behavior and scheduling effects arising from the actual controller implementation in closed loop with the plant. This goes beyond traditional development approaches within the synchronous (reactive) block-diagram formalism of Simulink, which typically ignores execution times and jitter. However, TrueTime is said not to be suited for industrial (legacy) applications, mainly due to its structural requirements on the controller code. We propose an alternative execution mechanism that overcomes this limitation and fits with typical controller code as, for example, generated by the Simulink/Embedded Coder. Optionally, tasks may have individual execution stacks and may also execute as individual threads, even allowing for accelerated simulation on multi-core simulation hosts. Furthermore, this introduces support for instruction level timing and deeply branched function call graphs, without distorting the code structure. A case study demonstrates the applicability of our approach.

Read the paper · More papers on PaperTik