Air-to-Ground Transmission and Near Real-Time Visualization of FBG Sensor Data via Cloud Database

During the last decades, innovative aircraft health management systems have been receiving increasing interest from original equipment manufacturers (OEMs) and aircraft operators. Their implementation could lead to substantial benefits: drastic cuts in turnaround time, operation costs, and life cycle costs (LCCs) as well as sharp increases in system availability, safety, and reliability. An interconnectivity step-up is, hence, needed to guarantee a seamless data transfer. In this article, an integrated open-source solution for reliable data transmission and near real-time graphical visualization is proposed. After a comprehensive calibration and verification campaign performed on a test stand, the overall system has been successfully validated on structural data measured using a network of fiber Bragg gratings (FBGs) mounted on a radio-controlled model aircraft. The result is an effective and robust system able to monitor near real-time critical parameters and health status of structures. With this system, the temperature and displacements of the structure can be displayed on a heat map arranged on a 3-D model and visualized through a computer application on the ground. The proposed methodology can be applied to heterogeneous scenarios, ranging from maintenance planning activities to performance checks, providing an all-in-one solution for flight data management as well as other applications in the structural monitoring domain.

aircraft operations both in the air and on the ground. In the last decades, air-to-ground (A2G) communications have been subject to massive research efforts, endeavoring to accomplish seamless and effective data transmission.
The work presented in this article is, hence, focused on the development of a cloud-based system for transmitting and visualizing in near real-time aircraft data, leveraging proven and dependable technologies and state-of-the-art communication methods. To the best of our knowledge, it is the first and only system of this type to be released as open source. This work, which is the result of years of development, can be intended as a concrete and innovative step forward indeed, as the complete code of the programs discussed in the article has been released for free and can be edited by anyone. To demonstrate the feasibility of the data management system, it was applied to actual structural data obtained from a composite-based radio-controlled aircraft model. This choice is due to the rising interest in prognostic and health management (PHM) strategies that leverage maintenance data to analyze the overall health status of the aircraft [1], [2]. The latest developments in this field involve the aircraft communications addressing and reporting system (ACARS). Its real-time data-link transmission of performance-related data on the ground enables the identification and planning of targeted aircraft maintenance activities because of automatically exchanged maintenance reports. In this way, continuing airworthiness management organizations (CAMOs) can plan maintenance checks and verify line replaceable units (LRUs) availability before the arrival of the aircraft at the maintenance facility [3]. This could lead to a complete revolution in integrated logistics support (ILS) with higher availability and lower life cycle costs (LCCs) [4], [5].
Among various maintenance and performance data, the authors selected wing structural data collected by fiber Bragg gratings (FBGs) sensors. This choice is perfectly in line with recent trends, which aim at integrating sensors in smart structures [6], [7]. Such aircraft structures, especially if compositebased, have safety issues. Often, their failure modes are not evident [8], [9], [10], and checking their health status requires complex and time-consuming procedures [11]. In this regard, the deployment of FBG sensors as structural and thermal probes is gaining more and more momentum because of their advantages with respect to traditional sensors [12] (see Section II). Recent studies use this technology for the application of real-time strategies on aircraft structures and the monitoring of critical parameters [13], [14].
To test the proposed system in a realistic environment, a model aircraft, named Anubi and developed at the Politecnico di Torino, Turin, Italy, is used as a test platform. A network of FBG optical sensors is embedded along its wing.
In this work, FBGs are used to calculate structural stresses in critical wing locations. Because of the purpose-built system, data are then transmitted in near real time to the ground control center.
This article is structured as follows. Section II describes the most recent advancements on FBGs, whereas the methodology is presented in Sections III and III-A. Section III-B describes software applications developed. Sections IV-A and IV-B report, respectively, one of the experimental tests performed in the laboratory and one of the flight tests. The conclusions and some proposals for future improvement are presented in Section V.

II. RELATED WORK A. Optical Fiber
Optical fiber is a glassy material able to transmit light signals. It is made up of two concentric transparent layers (core and cladding) with differing refractive indices. The fiber is an ideal optical waveguide and, as such, has very low attenuation. Furthermore, it is possible to embed different sensor types inside its core. Because of these properties, optical fibers and optical sensors usage has increased in a wide range of industrial domains, including communications, medical diagnostics, and manufacturing. Several studies [15] and test campaigns [16] have demonstrated the possibility of using optical sensors to monitor mechanical-and thermal-induced strains [17], [18] in both aeronautical [19] and space [20], [21]  applications. Information about temperature and deformation of structural elements are essential for conducting diagnostic and prognostic activities [22], [23]. Such operations are critical for enhancing the safety and reliability properties of aerospace systems. Currently, these measurements are performed using typical electronic sensors; however, the benefits guaranteed by optical fibers (e.g., weight reduction, immunity to RF disturbances, and harsh environment suitability) explain the interest in research toward innovative optical solutions.

B. On the Wireless Connections Improvement
Recent advancements in cellular network connectivity have led to its widespread use even in fields and situations that were unimaginable only 30 years ago. In this regard, the third generation (3G) connection, released at the beginning of the current millennium, was a big step forward compared with its predecessor [24]. It allowed mobile phones to do much more than call and send short message service (SMS) and multimedia messaging service (MMS) and paved the way for the release of smartphones. The continuous improvement of cellular networks led first to the release of 4G and then to its most recent evolution: 5G [25]. As a new generation of wireless communication technology systems appears roughly every ten years, the direct successor of 5G, unimaginatively called 6G, is expected to be released around 2030 [26].

C. Wireless Connectivity for Aircrafts
The provision of the Internet connection to aircraft passengers and its systems can normally be achieved in two ways: 1) satellite communication (SATCOM); 2) direct A2G communication (DA2GC). The latter type of communication is receiving increasing attention. Unlike SATCOM, DA2GC works the same way as normal terrestrial connections, as in Fig. 1. Leveraging on pre-built infrastructure could help reducing costs and increasing connection speed. The main drawback of the DA2GC is that, unlike the installation of antennas on the ground, their deployment on the sea could be a problem and would lead to an increase in costs and maintenance [27].
In 2017, simulating an aircraft flying at 13 km of altitude, with a distance between DA2GC eNodeBs (DA2G-eNBs) sites of between 40 and 200 km, and a number of low earth orbit (LEO) satellites between 20 and 200, it was estimated that, through a 5G connection, the onboard speed via DA2GC could reach up to 130 Mb/s, about 90 Mb/s more than the SATCOM [27]. With a 4G connection, on the other hand, a significantly reduced connection speed was estimated due to interference problems.
More recently, in 2019, under similar conditions, it was estimated that a new system, also based on 5G, could reach an onboard connection speed of 257 Mb/s via DA2GC [28].

D. Wireless Connection in Novel Urban Contexts
Urban air mobility (UAM) offers a potential solution to urban congestion. This, together with the construction of increasingly tall buildings, requires careful analysis not only in terms of horizontal but also vertical radio coverage. Researchers are, therefore, focusing on improving wireless networks (e.g., from 4G to 5G), signal transmission antennas, and adaptive distribution algorithms [29], [30]. Regarding the use of unmanned aerial vehicles (UAVs) for applications that differ from the aforementioned mobility applications and in novel contexts, a recent example concerns their use in coastal monitoring applications [31], [32].

E. Preface to the Next Sections
For this work, the authors will use normal terrestrial antennas. This is due to the fact that model aircrafts normally fly at low altitudes. It is, therefore, not necessary to use SATCOM or DA2GC: normal urban connections are considered sufficient for the purpose of the research.

III. SYSTEM
The system introduced in this article is composed of two main parts: 1) the physical system, which is made up of sensors mounted on an aircraft model and the acquisition and telemetry system; 2) the software applications, which deal with the transmission, storage, and intuitive visualization of the data coming from the sensors. A block diagram of the physical system and software applications is reported in Fig. 2 together with the connections between the different hardware components. Moreover, a detailed top view of the model aircraft with a comment on the various components present is shown in Fig. 3. Sections III-A and III-B will discuss these two parts in detail.

A. Physical System
The discussion on the physical system can be divided in three subparts: FBGs sensors, model aircraft, and acquisition and telemetry system. They will be discussed in detail in the following lines.
1) FBGs Sensors: They are one of the most used types of optical sensors. The physical phenomenon exploited by said sensors is Fresnel reflection. In particular, the peculiarity of FBGs is their ability to reflect a very tight wavelength band of light traveling through the grating.
In essence, FBGs are strain gauges, altering the peak reflected wavelength (also called Bragg wavelength) depending on the mechanical strain and/or temperature variations. However, since FBGs are inscribed inside an optical fiber, it is possible to sensitize the fiber coating in order to create different types of sensors, e.g., chemical sensors [33], [34], [35].
In this particular work, FBGs are used as strain sensors, sensing the deformation of various points among the wing box structure. It is possible to read their value in real time through the use of a device called interrogator. It operates by sending a light signal into the fibers and detecting the reflected wavelengths: data are then processed and sent to 2) Aircraft Model: FBGs were placed into an aircraft model called Anubi, which was built by the Politecnico di Torino students team ICARUS in 2017. The model has been designed and built for participating in the Air Cargo Challenge competition, held in Zagreb (HR). It features electric propulsion, 20-kg maximum takeoff weight (MTOW), and a 6-m wingspan. Three lines of optical fiber have been placed on one half-wing of the model aircraft. More details are given as follows.
1) The first is placed on the top surface of the wing, which is compressed during the flight.
2) The second is installed on the bottom surface of the wing, which is under traction during normal operations.
3) The third, containing only one FBG sensor, provides thermal compensation. 3) Acquisition and Telemetry System: It is composed of the following components.
1) A SmartScan FBG interrogator, used to read the measurements of the network of sensors installed on the composite airframe of Anubi. 2) A 9-V lithium-ion polymer (LiPo) dedicated battery, necessary for powering the interrogator. 3) An Internet-enabled Raspberry Pi 1 3 Model B+ board through the use of an Alcatel 1 IK40V 4G Internet Link Key, having a maximum transmission speed of 150 Mb/s. This board, through an Ethernet connection with the interrogator and the use of a software, which will be discussed later, called Middleware, was used to receive and forward the data to the subsequent blocks of the system. 4) An USB power bank, needed to power the Raspberry Pi. As shown in Table I, the whole system adds to the model aircraft up to a weight of 1955 g.

B. Software Applications
The discussion of software applications can be divided into three subparts: Middleware, Cloud Database, and 3-D Viewer. They will be discussed in detail in the following lines. 1) Middleware: It can be seen as the information technology (IT) heart of the project. It is a C/C++ Linux application that connects to the interrogator via Ethernet in such a way that it receives sensor data, and then, it sends them to the Cloud Database by using a 4G/5G connection [44], [45]. These data are also associated with other information received from the interrogator itself, such as sensor number and timestamp. This allows the last block of the pipeline, the 3-D Viewer, to retrieve and display them more understandably and immediately.
An image of the Middleware in function can be seen in Fig. 4. It also has a logging function, which turns out to be particularly useful in the event of a lack of Internet connection. This way there is no risk of losing data, since after the flight, it is possible to compare data stored in the log with the data stored in the database, to check for any data losses that might have occurred during the flight itself. Data that failed to arrive at the destination will not be sent again, as being not updated. This is done for two reasons: they can create confusion during visualization; their transmission could saturate the internet connection, which is instead necessary for sending the most recent data.
Since the Middleware is open source, its complete code is available on GitHub under the GNU's Not Unix (GNU) General Public License v3.0 [46]. This allows researchers and other professionals to have free access to the software code to use and modify it as they wish.
2) Cloud Database: The project requires a fast storing and reading of the sensor data on a Cloud Database. For this reason, it was decided to use a no structured query language (NoSQL) database, which, because of its ability to handle unstructured data, does not need to verify the incoming data, allowing faster write operations [44], [45].
After a careful comparison of the different NoSQL databases available today, MongoDB 2 was selected. Among the various features of interest were the use of collections and the integration of Change Stream technology. In the MongoDB 2 nomenclature, the collection term indicates where to store similar data records. On the other hand, Change Stream is a technology that allows applications to subscribe to all data changes that may occur on a collection, in order to be able to react dynamically based on the values received. This feature was used for communication with the next block of the pipeline, the 3-D Viewer. In this configuration, sensor data are sent as soon as they are received by the Middleware.
When connecting to the Cloud Database, the Middleware creates a collection. The name of the newly created collection will be defined as SMARTSCAN_<timestamp>. Always referring to the MongoDB 2 nomenclature, every single record data coming from Middleware can be defined as a document. It will be placed inside the previously created collection and will be saved in a format called Binary JSON (BSON) [47]. This binary format was created to address the three main problems of the JSON format, which are particularly relevant if used in a database.
1) It is text-based, human readable, which also means that the following. a) Parsing is particularly slow. b) Use of space is inefficient. 2) A limited number of base data types are supported.

3) 3-D Viewer:
It is the final block of the pipeline, and it was built with Unity and C# with the aim of running on common PCs [48]. Its main purpose is to represent sensor data acquired by the interrogator by using the following.
1) A graph, which shows the difference between the nominal peak reflected wavelength of the FBGs and their actual value which, as seen in Section II, can change due to mechanical strains and temperature variations. This value is usually referred to as λ. 2) An innovative heat mapped model aircraft visualization, which allows showing the sensor data through a variation of hue and intensity of the area in which the sensors are located. The higher the measured λ, the more these vary from the basic hue and intensity. Both of these representations allow human-readable monitoring of the model aircraft state and immediate changes to its attitude following emergency conditions, each with its own pros and cons. The heat map visualization provides more intuitive and easy-to-read information than the graph, despite being less accurate. Users are free to load any 3-D model into the program. This allows obtaining a visualization of the heat map for different model aircrafts or even in situations altogether different from the one of interest in this article. Unlike the graph implementation, the usage of the heat map on a 3-D model posed technical challenges, which were solved through the use of shaders. Shaders are programs that run on the graphics processing unit (GPU) pipeline with the purpose of altering the normal processing flow of polygons and images. They were implemented in the 3-D Viewer using ShaderLab, a declarative language similar to high-level shader language (HLSL) and C for graphics (CG) created by Unity to define its structure. The written code is subsequently converted by Unity into native languages, such as HLSL, OpenGL shading language (GLSL), Metal, Vulkan, and others. This allows to write shaders with a higher level of abstraction (1) marks the climatic chamber, whose behavior was monitored via two screens (2). A laptop with the 3-D Viewer in execution is highlighted with (3), while (4) displays the interrogator. The Raspberry Pi 1 is highlighted by (5), and its operations can be monitored by screen (6). Finally, (7) indicates the monitored test sample with the FBG sensor.
than that of the single GPU manufacturer, allowing portability between different vendors.
The 3-D Viewer can be connected to the Cloud Database via a wired or wireless Internet connection. Tests described later in Section IV were carried out exploiting a 4G connection, as the intended in-field use of the system. Once connected to the Cloud Database, the 3-D Viewer will automatically receive the configuration of the model aircraft sensors. This allows it to recognize the number of sensors present on the model aircraft itself. These are displayed as red spheres and can be repositioned on the model by the user via a simple drag and drop procedure. In this way, it is possible to replicate, as precisely as possible, the actual positioning of the sensors on the model aircraft. This operation should be done with accuracy, as it will affect the visualization of the heat map. Once this procedure is completed, it is possible to start the visualization of the sensor data.
Similar to the Middleware, also the complete code of the 3-D Viewer is available on GitHub under the GNU General Public License v3.0 [49].

IV. TESTS
This section describes several test sessions carried out at the laboratories of the Department of Mechanical and Aerospace Engineering (DIMEAS), Politecnico di Torino, to verify the effectiveness of Middleware, Cloud Database, and 3-D Viewer, as well as a flight test campaign to validate the performance of the overall system in the field.

A. Laboratory Tests
The laboratory tests targeted the ability of the Middleware to receive data from the Interrogator and to send it to the Cloud Database in order to be retrieved and displayed by the 3-D Viewer in near real time. To do this, the system was connected to an FBG sensor placed in an environment with variable conditions, represented by a climatic chamber. Fig. 5 shows the configuration used to test the software applications. It consisted of the abovementioned climatic chamber (1), whose operation was monitored by two screens (2). A third laptop, visible in the background (3), was used to run the 3-D Viewer. The interrogator (4) was connected to the Raspberry Pi 1 (5) on which the Middleware was running. Its execution was supervised by using a monitor (6). The optical fiber test sample (7), consisting of an FBG sensor applied to a multilayer carbon fiber-reinforced polymer (CFRP) plate, was finally connected to the interrogator.
Considering the nature of FBG sensors, the reflected wavelengths are proportional to the environmental temperature value [22]. Fig. 6 shows a preliminary test conducted by inserting an FBG sensor and a thermometric probe into the climate chamber and performing a thermal cycle. It is immediate to see a direct correlation between the two measurements: a drop in temperature leads to a corresponding decrease in wavelength, while a rise in temperature leads to a corresponding increase in wavelength. The whole test was carried out using two different 4G networks.
1) The former was used for the transmission of the sensor data by using the aforementioned 4G Internet Key. 2) The latter was used for their reception. It was carried out by using an Apple 2 mobile phone as a hotspot, to which the laptop running the 3-D Viewer was connected via Wi-Fi. The climatic chamber with the optical fiber test sample inside was preheated to 50 • C, leaving it the time necessary for the fiber to expand and became stable. Subsequently, the temperature was linearly decreased from 50 • C to 10 • C in about 180 s. As expected, the Bragg wavelength varied linearly over the data acquisition period. As shown in Fig. 7, the curve displayed by the 3-D Viewer accurately matches the data trend saved in the cloud. The latency recorded between the reception of the data by the Middleware and its subsequent display by the 3-D Viewer was variable and ranged between 300 and 800 ms.

B. Flight Tests
After the results observed in the laboratory tests, a flight test campaign with the Anubi model aircraft was conducted  to validate the full project. This part of the work represents the application of the developed system to a real complex engineering problem, represented by the analysis of the loads acting on a model aircraft wing. The scope of the flights was to verify the coherence of data recorded with the physical situation under observation. The activity was carried out at the Tetti Neirotti runway, located near Turin. Three different flight tests were conducted, lasting between 2 and 10 min. Fig. 8 shows the experimental setup used to perform them, based on the diagrams shown previously in Figs. 2 and 3.
The tests confirmed that the system was able to measure and display in near real-time data arriving from the model aircraft. Flights data are shown in Fig. 9: in order to avoid cluttering of the graphs, only six sensors are plotted; three placed on the top surface and three on the bottom surface of the wing (i.e., the closest to the wing root).
For each of them, three different phases are distinguishable: 1) the initial taxiing, with vibrations from the aircraft rolling on the ground; 2) the flight phase, where a marked variation of the reflected wavelength is visible; 3) the landing. Before describing the curves in more detail, it is important to underline how each FBG sensor outputs a reflected wavelength value. To easily compare the results, all sensor data were normalized using the overall mean value detected by the sensors themselves where λ ig is the i th measure reported in the graph, λ i is the i th measure taken directly by the data acquisition system, and λ m is the mean value recorded by the specific FBG sensor during the overall flight. As a result of aerodynamic loads, during the flight, the top surface of the wing is subjected to compression, while the bottom surface is in traction. This is clearly visible from the curves that show the dual trend between the sensor in traction, with an increase in the value of the wavelength, and the corresponding sensor in compression, with an opposite decrease. The trends reported by the FBG are perfectly in adherence with the stress undergone by the wing. Moreover, some specific aspects of the flight can be analyzed in detail. First, in each graph, it is possible to identify the taxiing phase at the beginning of the curves. Here, the data are stable or at most have slight vibrations induced by the slow movement of the aircraft. In this phase, the wing is only under the effect of its weight. As a result, the sensors on the top surface of the wing register a traction load, while the other line, located on the bottom surface, is compressed. This is clearly understandable by noticing how the first three sensors have a normalized value higher than 1, while for the others, it is lower.
From Fig. 10, which shows a detail of Flight Test 3, it is possible to notice that, at the moment of takeoff, the wing of the model aircraft is deflected oppositely due to the aerodynamic loads. Consequently, the sensors of the first channel (ch1), which are mounted on the top surface, read the compression loads, while those of the third channel (ch3), which are instead mounted on the bottom surface, read the traction loads. Curves with a value tending to be greater than 1, therefore, become smaller than this value and vice versa. The same process is repeated during the landing maneuver.  In the central part of the graphs shown in Fig. 9, the effects of contingent aerodynamic loads are visible. Each peak is attributable to a specific maneuver performed by the remote pilot. Furthermore, data are particularly interesting, because this kind of sensors can detect both wing vibrations and maneuver loads.
To conclude and complete the current analysis, from Fig. 11, which reports yet another detail of Flight Test 3, it is interesting to note that the level of induced strain measured by the FBGs placed on the same line is not the same. This is correct as the sensors are mounted at different distances starting from the root of the wing, and denotes the great sensitivity of the developed system. This data analysis, although more focused on aeronautical aspects, is fundamental to verify the good technical quality of the data acquired by the developed system.
Moving on to aspects that concern the IT side of the system, it is important to note that the latency of the system recorded during the flight tests was higher than in the laboratory tests, with values between 800 and 2000 ms. The increase can be explained by the rapid and continuous variation of position, attitude, and velocity of Anubi and by the suboptimal network signal strength. On the other hand, the laboratory tests were performed on a stationary bench with very good network signal strength, therefore, in what can be considered optimal conditions. Once on the ground, the flight log data were checked in order to monitor for any data loss. For all cases, a 100% data submission success rate was found.
To conclude, the flight tests demonstrated the correct functioning of the software applications. Fig. 12 shows one of the moments of flight as seen through the 3-D Viewer. The stress of the sensors is represented through the heat map, which gives an intuitive visual indication of the force of the strain applied to them. The additional graph shows the Bragg wavelength variation for all sensors.

V. CONCLUSION
This article discussed the implementation of an open-source system capable of transmitting, storing, and displaying model aircraft data in near real time. The core of the system is a Raspberry Pi 1 3 Model B+, which reads data from an onboard FBG interrogator and transmits them to a MongoDB 2 database, using a 4G link; after retrieval from server to client, a 3-D Viewer program is used to create user-friendly visualization of the data. This system can also be used to monitor multiple model aircraft at the same time even if, from a human point of view, the increase in the number of sensors to be monitored could lead to difficulties in interpreting their values.
While this system works, it can be improved, and its functions can be extended. Indeed, the possibility of having a near real-time aircraft monitoring could result crucial to implement innovative optical sensors network for prognostics and diagnostics scopes. For this reason, the authors of this article are currently working on measuring and displaying other useful information, such as that derived from an inertial measurement unit (IMU) and the global positioning system (GPS). These will allow the matching of the response of the FBGs with both mechanical deformation and relative aerodynamic load. They are also working on creating an augmented reality (AR) version of the 3-D Viewer in order to allow a pilot or copilot to view flight data in a nonobstructive way.