Worst-Case Execution Time Analysis of a Real-Time System based on Arduino in CAN Network

Authors

  • Ammar Merazga Artificial Intelligence and Autonomous Things Laboratory, University of Oum El Bouaghi, Algeria
  • Djamel Rahem Laboratory of Materials and Structure of Electromechanical Systems and Their Reliability, University of Oum El Bouaghi, Algeria
  • Fateh Moulahcene Artificial Intelligence and Autonomous Things Laboratory, University of Oum El Bouaghi, Algeria
  • Djemai Kebbal Traces stands for Research Group on Architecture and Compilation for Embedded Systems, University Paul Sabatier, France
  • Rostom Khelaf Department of Electronics, Telecommunications and Spatial Telecommunications Engineering, University of Oum El Bouaghi, Algeria
  • Imad Benacer Artificial Intelligence and Autonomous Things Laboratory, University of Oum El Bouaghi, Algeria
Volume: 15 | Issue: 3 | Pages: 23467-23478 | June 2025 | https://doi.org/10.48084/etasr.10990

Abstract

Real-time systems need communication networks, as they often operate across multiple physical nodes. CAN-BUS is a common field bus used in these systems. Such systems require a time-based analysis to meet key deadlines and ensure system safety. This study designs and implements a distributed embedded motor control system using FreeRTOS over CAN-BUS for real-time operation. A prototype was built with low-cost components such as Arduino, L298N, and an MCP2515 module. A WCET analysis was performed on the system. The system has two CAN nodes connected to a PC via PCAN-USB for testing and analyzing using Busmaster software. The first CAN node controls the DC motor speed using a real-time PID controller, and the other manages the motor speed through CAN. The experimental results of the PID controller showed a low steady-state error of less than 0.3%. As the speed increases, there is less overshoot. The settling time ( ) is also short, proving the stability of the system. Πerformance was verified by comparing it with the signals from the Busmaster software. The WCET analysis used the Bound-T tool on the AVR2560 microprocessor (16 MHz without cache or pipeline). The calculated WCETs for three tasks were 1228.88 µs, 210.19 µs, and 2786.25 µs. This work verifies the schedulability of tasks for applications on a FreeRTOS real-time embedded platform. Bound-T is an open-source tool for WCET static analysis that has shown strong potential and can be used to perform precise and reliable temporal analyses.

Keywords:

Arduino, CAN-BUS, DC motor, FreeRTOS, MCP2515, PID controller, real-time, WCET analysis

Downloads

Download data is not yet available.

References

M. Ammar, R. Djamel, M. Fateh, and K. Djemai, "Analyzing real-time communication: Arduino-based Controller Area Network (CAN) in electric vehicle," Studies in Engineering and Exact Sciences, vol. 5, no. 2, Dec. 2024, Art. no. e11618.

M. Li, K. Xiao, Y. Zhou, and D. Huang, "WCET Analysis Based on Micro-Architecture Modeling for Embedded System Security," Applied Sciences, vol. 14, no. 16, Jan. 2024, Art. no. 7277.

R. Wilhelm et al., "The worst-case execution-time problem—overview of methods and survey of tools," ACM Transactions on Embedded Computing Systems, vol. 7, no. 3, pp. 1–53, Apr. 2008.

A. Berisa et al., "Comparative Evaluation of Various Generations of Controller Area Network Based on Timing Analysis," in 2023 IEEE 28th International Conference on Emerging Technologies and Factory Automation (ETFA), Sinaia, Romania, Sep. 2023, pp. 1–8.

"CAN knowledge." https://www.can-cia.org/can-knowledge.

R. Cantoro, S. Sartoni, and M. S. Reorda, "In-field Functional Test of CAN Bus Controllers," in 2020 IEEE 38th VLSI Test Symposium (VTS), San Diego, CA, USA, Apr. 2020, pp. 1–6.

H. M. Boland, M. I. Burgett, A. J. Etienne, and R. M. Stwalley Iii, "An Overview of CAN-BUS Development, Utilization, and Future Potential in Serial Network Messaging for Off-Road Mobile Equipment," in Technology in Agriculture, F. Ahmad and M. Sultan, Eds. IntechOpen, 2021.

"Vision Systems GmbH - Data Communication,Network Device Server,Industrial PC-Systems und Panel PCs - Norderstedt." https://www.visionsystems.de/news20121112.htm.

G. S. Sumith, R. Bhatt, L. Shrinivasan, Y. Bagri, and S. V. Shrinivas, "Digital Dashboard for Electric Vehicles," in 2022 IEEE 4th International Conference on Cybernetics, Cognition and Machine Learning Applications (ICCCMLA), Goa, India, Oct. 2022, pp. 413–418.

R. Kirner and P. Puschner, "Classification of WCET Analysis Techniques," in Eighth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC’05), Seattle, WA, USA, 2005, pp. 190–199.

S. Byhlin, A. Ermedahl, J. Gustafsson, and B. Lisper, "Applying Static WCET Analysis to Automotive Communication Software," in 17th Euromicro Conference on Real-Time Systems (ECRTS’05), Palma de Mallorca, Spain, 2005, pp. 249–258.

"Bound-T time and stack analyser." http://www.bound-t.com/.

M. Platzer and P. Puschner, "A Real-Time Application with Fully Predictable Task Timing," in 2020 IEEE 23rd International Symposium on Real-Time Distributed Computing (ISORC), Nashville, TN, USA, May 2020, pp. 43–46.

S. Petersson, A. Ermedahl, A. Pettersson, D. Sundmark, and N. Holsti, "Using a WCET Analysis Tool in Real-Time Systems Education," OASIcs, Volume 1, WCET 2005, vol. 1, pp. 29–32, 2007.

E. J. Maroun et al., "The Platin Multi-Target Worst-Case Analysis Tool," OASIcs, Volume 121, WCET 2024, vol. 121, 2024, Art. no. 2.

AVR® Instruction Set Manual. Microchip Technology Inc., 2021.

H. Falk et al., "TACLeBench: A Benchmark Collection to Support Worst-Case Execution Time Research," OASIcs, Volume 55, WCET 2016, vol. 55, 2016.

"MCP2515," Microchip Technology. https://www.microchip.com/en-us/product/mcp2515.

Y. Wang, "Design of Electric Drive System of Electric Vehicle Based on CAN Bus," Journal of Physics: Conference Series, vol. 1982, no. 1, Jul. 2021, Art. no. 012131.

A. A. Sase, Y. K. Bhateshvar, and K. C. Vora, "Electric Vehicle Control System by using Controller Area Network Communication," International Journal of Engineering Sciences, vol. 15, no. 2, 2022.

F. Moulahcene, R. Khalef, I. Benacer, A. Merazga, H. Laib, and S. Hanfoug, "Real-Time Speed Control of DC Gear-Motor Using PID Controller and Sliding Mode Control for Robotics," in 2024 1st International Conference on Electrical, Computer, Telecommunication and Energy Technologies (ECTE-Tech), Oum El Bouaghi, Algeria, Dec. 2024, pp. 1–6.

A. W. Nasir, I. Kasireddy, and A. K. Singh, "Real Time Speed Control of a DC Motor Based on its Integer and Non-Integer Models Using PWM Signal," Engineering, Technology & Applied Science Research, vol. 7, no. 5, pp. 1974–1979, Oct. 2017.

"PCAN-USB: PEAK-System." https://www.peak-system.com/PCAN-USB.199.0.html?L=1.

"FreeRTOSTM - FreeRTOSTM." https://freertos.org.

P. Peerzada, W. H. Larik, and A. A. Mahar, "DC Motor Speed Control Through Arduino and L298N Motor Driver Using PID Controller," International Journal of Electrical Engineering & Emerging Technology, vol. 4, no. 2, pp. 21–24, Dec. 2021.

S. Chakraborty and P. S. Aithal, "Conveyor Belt Speed Control Through CAN BUS in CoppeliaSim using Arduino Mega2560," International Journal of Case Studies in Business, IT, and Education, pp. 194–201, Apr. 2022.

H. Kashif, G. Bahig, and S. Hammad, "CAN bus analyzer and emulator," in 2009 4th International Design and Test Workshop (IDT), Riyadh, Saudi Arabia, Nov. 2009, pp. 1–4.

Downloads

How to Cite

[1]
Merazga, A., Rahem, D., Moulahcene, F., Kebbal, D., Khelaf, R. and Benacer, I. 2025. Worst-Case Execution Time Analysis of a Real-Time System based on Arduino in CAN Network. Engineering, Technology & Applied Science Research. 15, 3 (Jun. 2025), 23467–23478. DOI:https://doi.org/10.48084/etasr.10990.

Metrics

Abstract Views: 27
PDF Downloads: 44

Metrics Information