Design and Evaluation of a Real-Time Sensor Monitor System on Raspberry Pi using Xenomai

Detta är en Master-uppsats från KTH/Skolan för elektroteknik och datavetenskap (EECS)

Författare: David Rene Gonzalez; [2019]

Nyckelord: ;

Sammanfattning: A real-time system computes information before a deadline in a deterministic fashion.Xenomai is a real-time framework to port real-time industrial applications to Linux. Ithas a dual-kernel architecture, with one kernel dedicated to handling real-time tasksexclusively. This co-kernel operates along with the Linux kernel in the same memoryspace.MIND Music Labs is a Stockholm-based music technology company that specializes inreal-time operating systems (RTOS) for audio applications. Its flagship product, the ELKOS, uses Xenomai to achieve real-time performance.The purpose of this research project is to design a real-time system with a Raspberry Pi 3Model B running Xenomai to monitor and control sensors connected to its Serial PeripheralInterface (SPI). To this end, a Xenomai system was configured to run on a RaspberryPi. Afterward, a Real-Time Driver Model (RTDM) SPI driver was tested. Several softwarelayers were built on top of it so that a large-scale C++ application could use the RTDM SPIdriver. An AVR microcontroller was connected to the Raspberry Pi through a General-Purpose Input/Output (GPIO) extension shield to emulate multiple sensor devices. Thisapplication is designed to provide flexible user control over these devices, without it beingnecessary to know the low-level details of the SPI interface or Xenomai. An evaluationapplication was written to test the system’s response times to external stimuli. These observationswere benchmarked against a standard Linux system.The results observed during this research project suggest that a Raspberry Pi runningXenomai may offer hard real-time guarantees to communicate data over SPI for frequenciesof up to 1 kHz, even when the system is under a heavy workload.Keywords: Real-time, Raspberry Pi, Xenomai, Real-time driver model, Serial peripheralinterface, General-purpose input/output pins.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)