University of Twente Student Theses


Design of a real-time network channel in LUNA

Wijnholt, R. (2017) Design of a real-time network channel in LUNA.

Abstract:LUNA is a real-time framework that uses CSP to pass messages from process to process. When communication between two LUNA applications on different hosts is required, no communication method is available that is able to deliver real-time guarantees whilst keeping the CSP methodology in mind. In this thesis a new network component in LUNA (referred to asNetwork Channel) has been designed and realized that is capable of connecting two real-time LUNA applications. OpenDDS has been used as the communication protocol, which is an open source implementation of DataDistribution System (DDS). Rendezvouscommunication has been implemented, because this way ofmessage passing is also used in CSP (execution engine of LUNA). OpenDDS provides QoS settings and can perform real-time communication. An interface for reading and writing to OpenDDS has been realized and has been implemented by the Network Channel to implement functionality. The OpenDDS interface is constructed to support bundling of data with the same endpoint. Bundling of data results in better performance as writing to OpenDDS is an expensive operation on the RaMstix (1.34ms per write). A more resource rich platform is faster, and also scheduling the threads with a not real time scheduler on a RAMstix results in faster writes to OpenDDS. Probably mode switches occur on the RaMstix with the Xenomai scheduler and causes higher writer times. The Network Channel implements publish-subscribe, and rendezvous communication. The DDSReactor is responsible for sending and receivingmessages. A disadvantage is that the loop time of one iteration introduces an extra latency. For the publish-subscribe communication a maximum transmission frequency of 250Hz for 10 channels is obtained where a theoretical maximum sending speed of 400Hz was expected. This is not achieved, as not all data is available in one data bundle, resulting in more than one iteration before all readers are unblocked. For rendezvous communication a trade-off has been made to only notify the reader’s state to minimize the round-trip time of one data exchange. It has been observed that the data sequences do not necessarily contain the data for all readers, and therefore a waiting functionality has been implemented. Waiting for the data of all writers results in the unblocking of the readers at the subscriber side in one iteration, instead of two or maximum three iterations. However at sending rates higher than 200Hz the waiting functionality fails, resulting in incomplete packets and therefore more than one iteration before unblocking. The maximum rendezvous communication with functioning wait functionality has been obtained at 230Hz. TERRA generates executable code with the LUNA framework from CSP models. A hardware port is added to the TERRA application such that the Network Channel can be initialized by the user using the GUI provided by TERRA. A demo has been realized that controls the youBot base from a RaMstix using an EtherCAT interface and controller in LUNA. An Ubuntu machine is used to execute a LUNA application to send values from a joystick to the RaMstix using the Network Channel. It has been observed that periodicity is caused by the SOEM EtherCAT master on the RaMstix, and not necessarily due to Xenomai. It is recommended to update the waiting functionality to check explicitly for the availability of the subtopic names in a bundle, resulting in bundles that are always complete and therefore faster data exchange for publish-subscribe and rendezvous communication can be achieved. Also by presenting the callback function to the OpenDDS interface and writing as soon as the data is available the loops can possibly be omitted resulting in no extra latency caused by the loops.
Item Type:Essay (Master)
Faculty:EEMCS: Electrical Engineering, Mathematics and Computer Science
Subject:50 technical science in general, 54 computer science
Programme:Electrical Engineering MSc (60353)
Link to this item:
Export this item as:BibTeX
HTML Citation
Reference Manager


Repository Staff Only: item control page