Implementation of an edge-fog-cloud computing IoT architecture in aircraft components

This paper presents a deployment of an IoT architecture in aircraft wings based on a physical asset, three IoT platforms, MATLAB® on a personal computer and ThingSpeak as a cloud. The IoT architecture was designed considering five layers and implemented using a simple wireless sensor network. Temperature, humidity, air quality and air pressure were collected, pre-processed and visualised in real-time to improve the reliability of aircraft components. The results show that embedding sensory capability into wing components can create a smart ecosystem that will support different IoT-enabled services in-flight, and it can also be used for predictive maintenance purposes.


Introduction
In today's industries, the aerospace sector is impacted by Industry 4.0 technologies to support design, maintenance and in-flight structural health. [1] Aircraft manufacturers and operators have been trying to enhance performance through connected systems-to-systems using the Internet of Things (IoT) paradigm. In particular, the Internet of Things for Aerospace (IoTA) allows aircraft systems with in-built computing devices to communicate with other devices through a secure network that works on a centralised and decentralised model. [2] Traditionally, commercial aircraft systems consist of complex subsystems like wings that generate lift and control systems that provide flight monitoring and control. Nowadays, the maintenance of such systems becomes complex when the aircraft needs to be in service on a 24 × 7 basis, and it requires more resources concerning time and costs. With the latest technologies, real-time health monitoring of these aircraft systems is feasible, and they can be continuously supervised to take preventive actions before a system failure occurs. [3] Current research is focused on designing fog computing architectures in unmanned aerial vehicles (UAVs) to improve power consumption, latency and efficiency for meeting time constraints when acquiring, processing and storing data at different levels, but commercial aircrafts still remains an unexplored field. [4] In Ref. 5 it is mentioned that the aerospace company Bombardier used the fog computing paradigm for real-time analysis of its aircraft engines' data. In addition, there is no established architecture design considering the paradigm IoT-fog-edge-cloud computing in aircrafts. [6] Therefore, there is a need to continuously explore ways of designing and integrating IoT architectures in aircraft components in order to improve the performance and reliability of aircrafts.
The structural performance of an aircraft can be improved by integrating intelligent sensors, actuators and microprocessors. [7] Considering Industry 4.0 technologies, it is possible to embed IoT sensors into structures that allow the collection of life cycle data. These sensors can be used to move away from a condition-based preventive maintenance system to a datadriven predictive maintenance-based system. [8] In general, a smart asset can be developed by means of [9] : sensors embedded in the physical component to gather data, an IoT device to link the physical object to the Internet and to send gathered data, analysis capabilities for converting data into information and making predictions, and hardware for visualising information.
The RSL10 sensor development kit was used in this project since it is a node-to-cloud IoT platform to develop IoT applications with Bluetooth Low Energy (BLE) system-on-chip (SoC). This platform includes the NOA1305, an ambient light sensor; the BME680 environmental sensor that measures temperature, humidity, pressure and air quality (0: clean air, 500: heavily polluted air); the BHI160, a 3-axis accelerometer and gyroscope sensor; and the BMM150, a magnetometer. The RSL10 is also equipped with a flexible near-field communication (NFC) antenna, and the firmware can be flashed via a 10-pin needle adapter. Figure 1 shows the RSL10 and its main components. This work considered the application of three RSL10 platforms and a small prototype.
Data collection from the RSL10 platform can be achieved through single-board computers (SBC). To integrate the physical assets with the IoT, current researchers are working on designing and deploying edge-fog-cloud architectures. [10] Cloud computing is one of the IoT applications that receives all data given from the sensors and stores it. The concepts of edge computing and fog computing are implemented to prevent massive streaming data from being sent and stored in the cloud.
In edge computing, an edge device connects to the sensors and sends data to the cloud, i.e., the edge device serves as a bridge between the physical and virtual layers. Fog computing is an additional layer between the edge and cloud layers that acts as a computing layer and pre-processes data before sending it to the cloud. Thus, the fog layer allows the cloud to receive only the relevant data useful for the specific purpose. [11][12][13] In this work, MATLAB® was used as an edge server for data collection, processing and storage instead of sending all collected data to the cloud. In addition, edge computing was considered since data processing helps reduce the amount of data sent to the cloud. While in cloud computing mode data is not pre-processed, in edge computing mode MATLAB® processes input data and sends the most relevant data to the cloud. [14] This research considered MATLAB® as an edge device in the edge computing layer, and in the fog computing layer a MATLAB® script was written to pre-process sensor data before sending it to the cloud. Researchers commonly use MATLAB® to program since it is easy to learn and flexible, [15] and it is usually chosen for client-server communication. [16] The client is a process that connects to a message bus, whilst the server is a process that listens for and accepts connections. Once the connection between both assets has been established, there is no distinction between a client and a server. [17] In this research, MATLAB® was used as a client, while the three RSL10 platforms were the server.
Nowadays, BLE devices are employed to design and implement wireless sensor networks. [18] A wireless sensor network (WSN) can be defined as a network of devices that can transmit the information collected from a monitored application through a wireless connection. Data from each device may be forwarded through multiple nodes, which can be linked to other networks through a gateway. A sensor node can sense, detect events and control local actuators. A WSN can thus remotely monitor physical and environmental magnitudes, like temperature and pressure, and co-operatively pass data through the network to a sink location. [19] A WSN can be divided into different groups consisting of parent and children nodes. While children nodes send data to the parent, the parent sends the information to the sink location within an established sampling rate. [18] Researchers have shown a simple WSN implemented in MATLAB® consisting of three sensors that send collected data to a multiport switch to select it alternatively and send it to a receiver using a specific sample time. [20] In order to send data to the cloud, the platform ThingSpeak -owned by the MathWorks foundation, the parent enterprise of MATLAB®-was chosen since it is a free IoT platform that allows the collection of real-time data streams, and then their visualisation and analysis. The three main steps that Thing-Speak follows are (a) data collection, (b) data analysis, and (c) acting by causing a response. [21] In this research, the RSL10 platforms were used to collect environmental data, and MAT-LAB® was applied to process sensory data and send it from the sensors to ThingSpeak. In Ref. 22 the ThingSpeak platform was used to visualise temperature and humidity. Other researchers worked with ThingSpeak to visualise air quality data by plotting graphs of pollutants concentration values. [23,24] The main scope of this work reported here has been to investigate and implement IoT capability on a wing rib prototype used for academic purposes. The purpose of this work was to answer the

IoT architecture
In order to get the environmental data, an IoT architecture divided into four layers was implemented. The physical sensing layer is on the bottom and consists of the physical objects: wing rib and the three RSL10 IoT platforms. In this work, four magnitudes were collected: temperature, humidity, air quality and air pressure. In the edge computing layer, data from the sensors is collected by MATLAB® installed on a personal computer through a Bluetooth connection. In this application, MATLAB® serves therefore as the IoT gateway between the physical layer and the cloud. Before sending data to the cloud, a MATLAB® script was written for pre-processing the collected data in the fog computing layer. Cloud computing is on the top and it receives data previously pre-processed. In the cloud, data visualisation is done on the IoT platform ThingSpeak. Figure 2 shows this IoT architecture.

Case study
The IoT architecture was implemented using an aircraft wing rib prototype as a physical asset. The sensor locations (SLs) were designed according to the IoT platform RSL10. Integrating sensors into the wing ribs allows the collection of life-cycle data in harsh environmental conditions. Monitoring real-time data can enhance efficiency and improve the performance of the entire aircraft wing. In this case, connectivity means realtime access to critical information, better decision-making and outcomes.
The deployment of the proposed IoT architecture on the wing rib was done by inserting three RSL10 IoT platforms on their respective SLs. This IoT architecture is composed of five layers: the physical sensing layer that contains the three IoT sensor platforms, the edge computing layer corresponding to the personal computer that establishes a connection with the IoT platforms through MATLAB®, a virtual sink layer that selects data alternatively from the sensors to form a WSN, a fog computing layer that pre-processes data before sending it to the ThingSpeak. The data flow through the five layers is shown in Fig. 3.

Implementation steps
In order to implement the IoT architecture using the physical assets aircraft wing rib and the RSL 10 platforms, the following steps were realised:

Connection establishment between the RSL10 platforms and MATLAB® on the personal computer
In order to set up a connection with the IoT platforms, the MATLAB® function ble was used in a for loop whose input is the address of each IoT platform. The function ble creates three BLE objects, one for each IoT platform. The try/catch executes the ble function and displays information about whether the connection was established or not. A warning message is displayed if the connection attempt is unsuccessful and the code stops. Algorithm 1 executes the connection between physical sensing and edge computing layers. Once the three IoT platforms get connected, the command window shows the following messages:

RSL10 data access with MATLAB®
Algorithm 2 was written to extract the characteristics from the IoT platforms. The MATLAB® function characteristic was used to create an object representing a characteristic on each peripheral device b (the BLE object). This function has three inputs: the ble object, the characteristic universally unique identifier (UUID) of the service and the UUID of the characteristic. These UUIDs can be extracted from the ble objects created with Algorithm 1, and they were used to make available the data-receiving and the data-sending ends, named rxc and txc, respectively. The MATLAB® function subscribe was employed to start receiving notifications from the IoT platforms, and to extract data from them, another function named displayData was coded. Algorithm 3 was written to request environmental data with a switching rate of 250 ms and a capture time of 3 s. Temperature, humidity, air quality and air pressure, previously calculated in the function display-Data, are displayed in the command window. In this work, the temperature and timestamps for each IoT platform were stored in the workspace.

Data to information conversion
To convert data to information algorithm 4 was coded and it represents the virtual sink where raw data is collected and information is obtained. To display data, in this case, temperature, humidity, air quality and air pressure, the data collected by each platform is read. The functions char and split were used to convert data for being recognised as requested information.

Information pre-processing
Before sending information to the ThingSpeak cloud, a preprocessing algorithm (Algorithm 5) for the temperature was written so that temperatures below 20°C would not be sent to the cloud and the neglected information could be stored in the workspace.

Information transfer to the cloud
To transmit the pre-processed data to ThingSpeak, Algorithm 6 was written using the function thingSpeakWrite. Its inputs are the channelID, the data, the WriteKey command, and the channel write API key. In addition, a pause of 15 s between measurements was introduced to avoid the limited update frequency of ThingSpeak, which is dependent on the license type.

Data visualisation on cloud
The ThingSpeak channel was previously set up with four field charts to display temperature, humidity, air quality and air pressure. The results will be discussed in the next section.
The algorithms are given in Online Resource as additional information.

Results and discussion
In order to prove the functionality of the WSN, some trials were done by sending the temperature of the three RSL10 platforms to ThingSpeak. The three IoT platforms were placed in three different environmental conditions during these trials. The pre-processing was deactivated in these trials to show how the real-time data was transmitted. Figure 4 shows the temperature from each RSL10 collected through MATLAB®. The samples were sent alternatively to Thing-Speak following the sequence RSL10 A -RSL10 B -RSL10 C. This sequence could also be verified in ThingSpeak. When running the MATLAB® code, the command window displays the data acquisition parameters. For the first three samples, the following information is shown:  Considering the pause of 15 s, the information of each sample is alternatively sent to ThingSpeak. Once the WSN was successfully verified, other trials were performed to check the pre-processing stage by setting in MATLAB® a threshold value for the temperature. In this case, the threshold temperature was set so that only temperature values above 20°C would be transmitted to ThingSpeak. Figure 4 shows that the temperature collected from the RSL10 C was 14.9°C, which was not sent to ThingSpeak. When running the MATLAB® code, the command window displays the data acquisition parameters. For the first three samples, the following information is shown: When applying the pre-processing algorithm, the temperature below the threshold, in this trial 20°C, was not sent to the ThingSpeak cloud. Compared to the case without threshold, the amount of transmitted temperature data to ThingSpeak was reduced by 33%. The pre-processing was not applied for the other environmental parameters, and all real-time information was sent to the cloud.
In order to answer the research questions addressed in the introduction section, the IoT architecture was designed and tested on a wing rib prototype. The interaction between physical and virtual layers was achieved using three IoT platforms and MATLAB®. The transmission of the collected data from the IoT platforms was physically implemented.
The pre-processing algorithm was written to filter data before being sent to the ThingSpeak cloud for visualisation.

Conclusions and future work
In order to answer the addressed research questions in this article, an IoT architecture on complex aircraft wing components was designed and implemented to collect real-time environmental data using a wing rib prototype as case study. This implementation considered a physical prototype, three IoT platforms, MATLAB® on a personal computer and ThingSpeak as a cloud. The IoT architecture was designed based on five layers that allow data flow to the cloud and it was also deployed using MATLAB® as a programming tool with a pre-processing algorithm. The results showed that a simple WSN could give a big picture of the environmental conditions within the aircraft wing box. During this work, temperature, humidity, air quality and air pressure were collected and visualised in real-time to improve aircraft components' reliability. The temperature data was pre-processed before being sent to the cloud and the amount of transmitted data was reduced by 33%. In this work, an IoT architecture was designed and tested on a wing rib prototype, the interaction between physical and virtual layers was achieved through the use of three IoT platforms and MATLAB®, the data transmission from the IoT platforms was physically implemented, and a pre-processing algorithm was employed to filter data before being sent to the ThingSpeak cloud for visualisation.
The outcomes of this research confirm that the aircraft wing rib can be integrated into an Industry 4.0 ecosystem by means of IoT technologies that allow the collection of life cycle data in complex aircraft wing components for health monitoring and predictive maintenance purposes. Furthermore, data sent to the cloud helps aircraft manufactures move away from a condition-based preventive maintenance system to a data-driven predictive maintenance-based system. As future work, it is recommended to extend this research by investigating the implementation of machine learning algorithms into aircraft wings for making predictions on the structural performance of the wing box components.