Feasibility Study for a Python-Based Embedded Real-Time Control System

Authors
Cho, Se YeonDelgado, RaimariusChoi, Byoung Wook
Issue Date
2023-03
Publisher
MDPI AG
Citation
Electronics (Basel), v.12, no.6
Abstract
Because of its simplicity and the support of numerous useful libraries, Python has become one of the most popular programming languages for application development, even in embedded systems. However, in existing control systems where specific tasks must meet specific temporal deadlines and support schedulability with proper priority assignments, the Python interpreter may not satisfy real-time requirements, owing to features such as the global interpreter lock and garbage collector. This paper addresses these constraints with an approach that executes periodic real-time tasks under the fixed-priority preemptible scheduler of RT-Preempt. First, we implemented a Python real-time module that allows users to create and execute periodic tasks with fixed priorities based on Python. Then, we conducted experiments on an open embedded system, in this case, a Raspberry Pi 4. We evaluated the real-time performance, focusing on test metrics for control systems, such as task periodicity, responsiveness, and interrupt response. The results were then compared to those of conventional real-time tasks developed using the C language to validate the feasibility of the proposed method. Finally, we performed experimental validation by tracking the position of EtherCAT servo motors to demonstrate the feasibility of a Python-based real-time control system in a practical application.
Keywords
IMPLEMENTATION; DESIGN; Python; embedded systems; real-time; RT-Preempt; EtherCAT
ISSN
2079-9292
URI
https://pubs.kist.re.kr/handle/201004/113919
DOI
10.3390/electronics12061426
Appears in Collections:
KIST Article > 2023
Files in This Item:
There are no files associated with this item.
Export
RIS (EndNote)
XLS (Excel)
XML

qrcode

Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.

BROWSE