Saturday , March 2 2024

A Domain-specific Language for Real-time Dynamical Systems Emulation on a Microcontroller

Francisco-David HERNANDEZ1*, Domingo CORTES1, Marco A. RAMIREZ-SALINAS2, Jorge RESA1
1 Instituto Politécnico Nacional, ESIME Culhuacán, Av. Santa Ana 1000 Ciudad de México, 04440, México (*Corresponding author),,
2 Instituto Politécnico Nacional, CIC, Av. Juan de Dios Bátiz S/N, Ciudad de México, 07738, México

Abstract: Translating a control law to code so that it can be executed in real time by a microcontroller is time-consuming and requires knowledge in diverse areas. There are powerful tools like Matlab and DSpace, that can ease the process, however, these tools are expensive and hide the way the translation is actually made. These two factors greatly diminish the use of these tools in education and small business. This paper presents SystDynam, a high-level language designed for describing static and dynamical systems and hence, controllers. The language was purposely created to be easy to process in order to obtain a C code by using free software tools. Therefore, a senior student or a control engineer with a short training in language processors can understand how the translation is made. The necessary code for translation is described here and is freely available. Having the controller described by C code, it can be compiled to be executed as the main task in a real-time operating systems, thereby obtaining the real-time controller. The complete process can also be used for emulating dynamical systems, thereby enabling the use of hardware in the loop simulations and low-cost rapid prototyping and providing an auxiliary tool for teaching some engineering courses.

Keywords: Control applications, Controllers, Rapid prototyping, Embedded systems, Control languages.


Francisco-David HERNANDEZ, Domingo CORTES, Marco A. RAMIREZ-SALINAS, Jorge RESAA Domain-specific Language for Real-time Dynamical Systems Emulation on a Microcontroller, Studies in Informatics and Control, ISSN 1220-1766, vol. 28(4), pp. 453-462, 2019.