Full text
Received 27 July 2023, accepted 9 August 2023, date of publication 21 August 2023, date of current version 28 August 2023. Digital Object Identifier 10.1109/ACCESS.2023.3306958 On Anomaly-Aware Structural Health Monitoring at the Extreme Edge DAVID ARNAIZ 1,2, EDUARD ALARCÓN 1,3, (Member, IEEE), FRANCESC MOLL 1, (Senior Member, IEEE), AND XAVIER VILAJOSANA 2,4, (Senior Member, IEEE) 1Department of Electronic Engineering, Universitat Politécnica de Catalunya (UPC), 08034 Barcelona, Spain 2Worldsensing, 08014 Barcelona, Spain 3NaNoNetworking Center in Catalonia, Universitat Politécnica de Catalunya (UPC), 08034 Barcelona, Spain 4Wireless Networks Research Laboratory (WiNe), Universitat Oberta de Catalunya (UOC), 08018 Barcelona, Spain Corresponding author: David Arnaiz ([email protected]) This work was supported in part by the Industrial Doctorate Plan of the Department of Research and Universities of the Generalitat de Catalunya. The work of David Arnaiz was supported by Agència de Gestió d’Ajuts Universitaris de Recerca under Grant AGAUR 2019 DI 075. ABSTRACT Self-awareness has been successfully utilized to create adaptive behaviors in wireless sensor nodes. However, its adoption can be daunting in scenarios, such as structural health monitoring, where the monitored environment is too complex for it to be accurately modeled by a sensor node. This article addresses this challenge by proposing a novel and lightweight anomaly-aware monitoring method for structural health monitoring that can be directly executed by a sensor node. Instead of modeling the complete structure, the proposed anomaly-aware monitoring method uses the vibration measurements of the sensor node to identify local deviations in the dynamic response of the monitored structure. The self-awareness module can then use this information to guide the dynamic behavior of the sensor node, replacing more resource-intensive structural models. We use data from multiple public benchmark structures to evaluate different features and propose an unsupervised feature selection method. Additionally, we evaluate different anomaly detection algorithms comparing their ability to detect local structural damages, also taking into account their memory and energy cost. The proposed method has been implemented in a commercial sensor node, and deployed in a scaled structure where various damage scenarios were simulated to validate the proposed method, where it was able to successfully detect the presence of damages in over 88% of the cases. Finally, we showcase how the proposed method can enhance self-awareness through the use of a simulation, where the proposed monitoring method was able to extend the battery life of the sensor node by over 59%, without impacting the node’s ability to swiftly detect damages in the structure. INDEX TERMS Internet of Things (IoT), wireless sensor networks (WSN), anomaly detection, structural health monitoring, self-awareness, structural monitoring. I. INTRODUCTION Civil structures play a critical role in modern society, as many of us rely on bridges, tunnels, railways, and buildings, among others, for our everyday affairs. Consequently, correctly maintaining these structures is not only critical to prevent unplanned downtime, but also because failures in these structures may suppose a safety hazard for its users. Despite this, many structures are not correctly maintained or are even The associate editor coordinating the review of this manuscript and approving it for publication was Renato Ferrero . known to be in unhealthy states. The American Society of Civil Infrastructure (ASCE) Report Card from 2021 reported that 7.5% of the bridges in the US are considered structurally deficient and the US has a backlog of $ 125 billion in repairs [1]. Even in cases where the damaged bridges are identified, they are not correctly maintained because of the limited budget of the organizations responsible for these structures. Reducing the maintenance cost of the structures requires shifting from reactive to proactive maintenance, detecting and repairing potential problems early before they turn into VOLUME 11, 2023 This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License. For more information, see https://creativecommons.org/licenses/by-nc-nd/4.0/ 90227
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 1. Overview of the proposed anomaly-aware monitoring method. costly damages. To this end, in the past decade, significant effort has been devoted to the development of Wireless Sensor Networks (WSN) [2],[3] and Structural Health Monitoring (SHM) [4],[5]. WSNs facilitate the collection of data from the monitored structure in a reliable, autonomous, simple to install, and inexpensive way [6]; while SHM provides the analytic capabilities to model the state or ‘health’ of the structure using the collected data. The combination of these two technologies enables the evaluation of the state of the monitored structure in real-time, minimizing the need for manual inspections, and reducing the repair costs by detecting failures early or even before they actually take place, increasing the safety and lifetime of the structure [7]. Despite the progress made in these two technologies, their adaption to civil structures is still limited. One of the biggest challenges for the widespread adoption of wireless sensors is their limited resource availability, particularly their battery life. This becomes particularly problematic in data-intensive applications such as vibration monitoring, typically used for SHM [8]. The problem of how to optimally allocate resources in wireless sensors has attracted significant attention from the research community since the inception of this technology. Nevertheless, as the optimal configuration of the sensor nodes is highly dependent on the environment being monitored, sensor nodes need to dynamically adjust their behavior based on their operating conditions. Over the years countless dynamic energy management methods have been proposed to address this problem [9],[10], and have proven to be able to reduce the energy consumption of the sensor nodes while maintaining their Quality of Service (QoS). The main drawback of these methods is the loss of predictability on the sensor node’s behavior, since it becomes environment dependent. Maintaining predictability is paramount in safetycritical applications to prevent the loss of data. In recent years the notion of Self-Awareness [11] has been used to address this problem, by allowing the node to adjust to the monitoring environment while being able to retain some predictability in the form of operational goals. Introducing self-awareness at the sensor node level for SHM is particularly challenging due to the size and complexity of the monitored structures. Modeling the health condition of the structure requires collecting data from multiple distributed sensor nodes, and aggregating it using resourceintensive models. A single sensor node only has access to its local environment and lacks the resources to run such models, thus, is unable to model the monitored structure in a reliable way. This hinders the implementation of selfawareness at the sensor node level, as it removes the ability to react to changes in the monitored environment. Alternatively, the cloud application can relay this information back to the nodes [12]. However, this approach is only adequate to model slow changes in the condition of the structure, not for realtime decision-making, since there will be some delay from when the node performs the measurement and when it gets an update on the state of the structure from the cloud. A vibration-based SHM application collects the vibration data from multiple points of the structure to analyze the dynamic response of the structure. If the structure gets damaged, its dynamic response varies, allowing the SHM application to detect and identify such damage. An individual sensor node does not have access to this information, as it can only access its local measurements. However, it can generate a model of its local vibration patterns, and identify any deviation that may take place. Any local damage will introduce changes in the vibration patterns measured by the sensor node, allowing it to detect local damages. The node may not have enough information to assess the source of the damage, or even if the observed deviation has been caused by the presence of damages, but it has enough information to detect that some previously unseen event is taking place and has to be studied in detail. Even in cases where the deviations in the observed vibration patterns are not introduced by the presence of damages (for example if the structure was loaded by a previously unseen wind direction) collecting detailed information about these anomalous events is more useful to the SHM application than the data collected when the structure is in a known state, 90228 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge as the latter is already accounted for by the model. Therefore, the sensor node should increase its monitoring efforts when the data is considered to be more anomalous, and it can compensate for this increment by reducing the monitoring efforts when the data is closer to nominal. The proposed anomaly-aware monitoring method uses an anomaly detection algorithm to model the local dynamic response of the healthy structure using the vibration data collected by the sensor node. Then, it uses this model to assign an anomaly or novelty score to the monitoring data, indicating the extent to which it has deviated from the nominal, or healthy, state. This score is utilized by the self-awareness module of the sensor node to manage the resource allocation based on the perceived usefulness of the measured data. This article, evaluates the use of a lightweight anomaly detection algorithm at the sensor node level for SHM applications to compute the anomaly score of the data, and evaluates potential use to guide the node’s behavior. Figure 1pro- vides an overview of the proposed anomaly-aware monitoring method, which will be thoroughly discussed and explained in detail. The main contributions can be summarized as follows. •We propose a novel, lightweight anomaly-aware monitoring method for SHM that identifies deviations in the dynamic behavior of the monitored structure to dynamically adjust the node’s behavior. •We use public SHM benchmarks to propose an unsupervised feature selection method based on the achieved feature performance. Additionally, we compare common anomaly detection algorithms, evaluating their performance, computational and memory cost. •We validate the proposed monitoring method with a commercial node and a scaled structure, simulating damage conditions on the structure. •Finally, we showcase how the proposed monitoring method can be used to enhance self-awareness at the sensor node level through a simulation. The rest of this paper is structured as follows. Section II, reviews the background and related works on self-awareness, damage detection in SHM, and ML for embedded systems. Section III continues by presenting a high-level description of the proposed anomaly-aware monitoring method. Section IV introduces the feature selection method and evaluates common, lightweight, anomaly detection algorithms. The setup and results of the validation test are commented on in Section V. Section VI showcases how the anomaly-aware monitoring method can be used to implement self-awareness at the sensor node level through the use of a simulation. Finally, the conclusions and future work are summarized in Section VII. II. BACKGROUND AND RELATED WORK This work was motivated by the need of introducing selfawareness at the sensor node level in the context of SHM, where modeling the environment is not viable. The notion of self-awareness is introduced in subsection II-A. Then, subsection II-B evaluates the existing examples of self-awareness in the context of wireless sensor nodes. Subsection II-C brings the focus back to SHM by reviewing the relevant works in damage detection methods. Finally, subsection II-D evaluates the relevant works in anomaly detection methods for resource-constrained systems. A. SELF-AWARENESS Self-awareness [13],[14], changes the paradigm of how systems are managed in dynamic environments. Computer systems are expected to operate reliably and efficiently under a wide range of operating conditions, and thus, their behavior needs to be adjusted accordingly. Traditionally, to adjust the system behavior, the system designers had to analyze all the system behavior under all possible operating conditions and define the low-level adaptive policies that the system should follow based on the perceived environment. This approach is problematic as the operating conditions and their effects on the system may not be a priori known, and defining the low-level policies necessitates a deep understanding of the system’s inner workings and its operating environment. Selfawareness provides a promising solution, by giving devices the ability to self-manage. Instead of following a set of predefined low-level policies, a self-aware system is able to autonomously define and perform adaptive actions at runtime based on its high-level operational goals, which can be defined without knowledge about the system’s inner workings or its operating environment. A computing system can be considered as being selfaware if it is capable of monitoring itself and its environment, and autonomously adjusting its behavior at runtime in order to achieve its goals in an efficient way. To achieve self-awareness, a self-aware system needs sensors to collect information about its internal parameters (e.g. CPU load, power consumption) and environmental parameters (e.g. atmospheric temperature, risk factor), which is then used to generate and maintain models. These models allow the system to observe its current state, its goals, its potential actions, and its environmental conditions. Additionally, a self-aware system needs to be able to use its models to predict the effect of its current operating conditions on its ability to achieve its goals and decide the best adaptive actions to take in response, taking into account the predicted effect of these actions on itself and its environment. Finally, a self-aware system needs to be able to execute the defined adaptive plan. The main traits of a self-aware system are summarized in Figure 2. Generally, all this functionality is organized in the form of an Observe- Decide-Act (ODA) loop [15]. B. SELF-AWARENESS IN WIRELESS SENSOR NODES The self-managing nature of self-awareness has attracted the attention of researchers in different research fields such as resource-constrained cyber-physical systems [16], system on chip [17], computer networks [18], among many others. VOLUME 11, 2023 90229
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 2. Main traits of a self-aware system. In this section, we review the relevant work in self-aware wireless sensor nodes. The principles of self-awareness have been applied to different aspects of sensor nodes. In the network, Zhuang et al. [19] applied the principles of self-awareness for congestion control in multi-hop wireless sensor networks. Each sensor in the network is able to monitor, and affect its transmission bandwidth using lossy compression, at the cost of introducing distortion to the data. The congestion control method proposed by Zhuang et al. allowed the sensor nodes in the network to autonomously allocate the distortion budget between them to prevent network congestion, while minimizing the introduced distortion. Regarding data processing in sensor nodes, Forooghifar et al. [20] applied self-awareness to an epileptic seizure detection classifier. The proposed approach uses multiple hierarchical classifiers with increasing complexity. Self-awareness is used to select the appropriate classifier for the data to maintain the required accuracy level, while minimizing the energy consumption of the classification. The self-aware classifier proposed by Forooghifar et al. only takes into account one parameter, the expected accuracy of the classifiers for the given data, to guide the selection. Other self-aware patient monitoring systems are able to improve the performance by also taking into account the risk factor of the patient [21], [22], although this requires having access to information from additional sensors and increased processing, which is not viable to implement in a singular sensor node. Self-awareness has also been applied to the data acquisition function of wireless sensor nodes. Arnaiz et al. [23] proposed a data acquisition method using the principles of self-awareness. Given a target battery lifetime for the sensor node, the proposed method is able to dynamically adjust the sampling period to achieve the target battery life while maximizing the Quality of Service (QoS) of the wireless sensor. The QoS of the sensor node is improved by increasing the sampling rate when the signal is considered more ‘‘relevant’’ and compensating for this increment during periods when the signal is deemed less important. To model the data relevance, the authors use a synthetic metric (i.e. the mean deviance of the measured data). The Mean deviance does not model the state of the environment, but provides statistical information about the collected data. Using this metric, the proposed method was able to outperform equivalent naive sampling methods, thus, showing that modeling the collected data is also advantageous. The self-aware-based methods presented in this section have one main difference from the more conventional dynamic energy management methods in that they are able to not only adjust to the operating conditions, but are also able to comply with their given operational targets. In all the presented examples, the sensor nodes are able to monitor at least one internal parameter and have some kind of model of their environmental context. Modeling the complete environment can be complex and resource intensive in applications such as SHM, hindering the use of self-awareness in these cases. Instead of modeling the complete structure, the anomalyaware monitoring method presented in this paper models the vibration measurements of the sensor node, allowing the sensor to react to the changes in the measured data. C. DAMAGE DETECTION IN SHM SHM is the area of research focused on answering the question of what is the condition (or health) of a given structure through non-destructive means. It is distinguishable from the more traditional structure maintenance processes in that SHM is performed automatically on near real-time bases, instead of relying on periodic inspections. One of the main aspects of SHM is structural damage identification. In this context, structural damage can be defined as ‘‘changes introduced into a system that adversely affect its current or future performance’’ [24]. There are a myriad of methods for SHM, however, they are usually classified as model-driven, if they use an analytical model of the monitored structure; or as data-driven, if they use statistical analysis of the data collected from the structure, to detect, locate and identify the presence of damages [25]. Typically, analytical models are Finite Element Models (FEM) of the monitored structure. Simulating FEM models is a resource-intensive task, which is usually performed by cloud servers. Consequently, in this subsection, we will focus on reviewing relevant lightweight data-driven methods. Data-driven models can be further classified depending on the tools used to analyze the data, as time domain such as Autoregressive Moving Average (ARMA) [26] and Bayesian probabilistic methods [27], or as frequency domain such as Wavelet Packet Decomposition (WPD) or Fourier-based tools. Han et al. [28] used WPD to compute a damage index based on the spectral energy distribution with promising results. WPD is commonly used over the traditional Fourier transform for SHM as it has better properties for nonstationary signals, which are common in this domain. These 90230 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge data-driven methods perform statistical analysis of the data to detect when the structure deviates from its nominal operation. These models are significantly more lightweight than other approaches and have shown interesting results. However, due to their simplicity, these models are commonly less robust to changes in environmental conditions and sensor noise. More advanced ML methods have also been used for SHM, Malekloo et al. [25] reviewed the existing literature about the use of ML for SHM. One challenge of using ML models for SHM is that typically, there is only data available of the structure in its healthy state, and thus, novelty/anomaly detection models are more widely used than supervised learning models. As an example, Sarmadi and Karamodin [29] proposed an adaptive Mahalanobis squared distance and oneclass KNN-based algorithm for SHM, trained exclusively from healthy data, which was able to detect damages under varying environmental conditions. ML models are generally more computationally expensive and require extensive training. Nevertheless, they have been shown to be able to operate under varying environmental conditions. Most of the efforts in SHM focus on the accuracy of the proposed methods and their ability to operate under varying temperature conditions. However, little effort has been done into evaluating the cost of running such models in terms of computational power and memory usage, since such models are not aimed at resource-constrained systems. This article evaluates different lightweight anomaly detection algorithms in terms of performance, computational cost, and memory usage to understand the tradeoffs and decide the best candidate to be used in resource-constrained wireless sensors. D. ANOMALY DETECTION METHODS FOR RESOURCE-CONSTRAINED EMBEDDED SYSTEMS The advancements in microelectronic manufacturing, have allowed for the development of more capable and powerefficient embedded systems. The performance improvements of embedded systems, combined with the recent progress in optimizing ML models, have made it possible to deploy these models directly on edge devices. This area of research is known as TinyML [30]. Processing part of the data locally, instead of outsourcing the computation to the cloud has some advantages: it reduces the latency, improves privacy and security, reduces bandwidth, and in wireless sensors allows reducing the energy consumption required to transmit the data. Nevertheless, local processing also has some drawbacks, as it increases the processor and memory usage, and due to its lightweight nature, it will be generally less accurate than its resource-intensive counterpart. For the purpose of this paper, we focus on lightweight anomaly detection methods. Domingues et al. [31] made a comparison between the fourteen most prevalent anomaly detection methods using multiple datasets, evaluating their accuracy, robustness, processing time and memory usage. As a result of their evaluation, the authors favored the isolation forest (or I-Forest) algorithm for its scalability and accuracy with large datasets; and One-Class Support Vector Machine (OCSVM) for its performance with smaller datasets. Similarly, McKinnon et al. [32] compared the accuracy between Elliptic Envelope (EE), I-Forest, and OCSVM; using a dataset extracted from a wind turbine gearbox data. The test showed that the I-Forest and OCSVM algorithms obtained similar results and outperformed the EE algorithm. This shows a clear preference for these two algorithms I-Forest and OCSVM. Similarly, this article evaluates four different anomaly detection algorithms, I-Forest, OCSVM, Gaussian Mixture Model with Mahalanobis Distance (GMM-MD), and Z-score. Unlike the existing literature, it uses data from four public SHM datasets, evaluating the model’s ability to identify light and severe damages in the structure. Additionally, during the evaluations, the inference is executed directly in a sensor node to accurately measure the memory usage and computation cost of each algorithm. III. ANOMALY-AWARE MONITORING Vibration monitoring is the most widely used method for SHM [33], as it is able to detect superficial and internal damages. In wireless sensor nodes, vibrations are commonly measured using Micro-Electro-Mechanical System (MEMS) accelerometers, due to their small size and low energy consumption [34]. The typical operation of a wireless sensor for vibration monitoring is shown in Figure 3 (a). To save energy, sensor nodes remain in sleep mode most of the time, only waking up periodically to start a monitoring event before returning to sleep mode. Monitoring events can be started periodically with a predefined periodicity, or be triggered by external factors. In vibration monitoring, monitoring events are commonly triggered based on the vibration level of the structure. Commonly, in vibration monitoring, the monitoring events are triggered when the vibration intensity surpasses the threshold value. Having a high enough vibration level is critical for the accuracy of the measurements as it is directly related to the Signal-to-Noise Ratio (SNR) of the measurements. Therefore, sensor nodes designed for vibration monitoring remain in sleep mode maintaining the MEMS accelerometer active, waiting for the vibration level of the signal to exceed a predefined threshold to start a new monitoring event. Unlike static measurements, such as temperature, humidity, or inclination, where a single data point contains enough information to characterize the monitored parameter; the dynamic response of the structure is characterized by the temporal changes in the accelerometer data over a period of time. Therefore, in vibration monitoring, sensor nodes have to acquire a series of acceleration measurements for a window of time. The duration of the acceleration measurement window can range between a few seconds to several minutes, sampled at a rate of 0.1 to 4kHz depending on the structure being monitored and the available memory in the sensor node. Transmitting the complete window of data using VOLUME 11, 2023 90231
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 3. Vibration monitoring flow, (a) standard and (b) additions for anomaly-aware monitoring. the node’s wireless interface is not usually a viable option due to the bandwidth restrictions of the most commonly used Low Power Wide Area Networks (LPWANs), such as LoRaWAN [35]. Instead, sensor nodes have to preprocess the accelerometer data locally to extract a set of relevant features that reflect the main characteristics of the collected signal in a compact form. With the proposed anomaly-aware monitoring method, when the nodes are first deployed in the structure, they have no prior knowledge or model of the dynamic response of the structure. Sensor nodes start in learning mode, performing the standard processing flow from Figure 3 (a), collecting a window of accelerometer data, computing a set of features, and transmitting those features using their wireless interface. Sensor nodes remain in learning mode while collecting enough data to train the anomaly detection model. It is important that during this phase, the sensor nodes collect data from the structure in different operating conditions (e.g. different load distributions, or excitation sources) and environmental conditions (e.g. different temperatures or humidity levels), so as to correctly model the behavior of the model. Once a sensor node has gathered enough data, the data collected by the sensor node is used to generate a model of the structure using an anomaly detection algorithm. The generated model is transmitted to the sensor node, ending the training phase and switching the node to inference mode. In inference mode, the sensor node performs the additional operations from Figure 3 (b). During each monitoring event, the anomaly detection model processes the features extracted in the current monitoring event, calculating an anomaly score, which is then used to guide the behavior of the node. The anomaly score value provides information on how different are the current feature values from the ones used to train the model. If the dynamic response of the system has not changed, the anomaly scores obtained will remain low. If the structure’s response changes due to the presence of damages or is operating under previously unseen conditions, the anomaly scores will increase. It should be noted that the actual anomaly score value does not provide any information on its own, as the actual score depends on the model and the training data used. However, two measurements can be compared using their anomaly score value to determine the most anomalous one. If the anomaly score value obtained during a monitoring event is high, it may be an indication FIGURE 4. Anomaly score for increasingly more severe damage test cases. that the structure is damaged or has changed in some way, and thus, it should be prioritized over others. The anomaly score value can be used by the self-awareness module to implement different adaptive policies. One such policy is to only transmit the data with the highest anomaly scores. By only transmitting the anomalous data, the sensor node can significantly increase its battery life, without impacting its ability to detect if the structure is damaged, as the presence of damages will increase the anomaly score of the measurement, so they would be transmitted. Figure 4 shows the anomaly scores obtained with the Qatar University Grandstand Simulator benchmark data [36],[37],[38] (see Section IV-A4) with increasingly more severe damage conditions. Each marker in the graph shows the score of a single monitoring event; the horizontal green dashed line shows the anomaly detection threshold set to the 90th percentile of the training data. As can be seen, as the damage in the structure increases, so does the calculated anomaly score, for the two most severe damage test cases all of the monitored events are correctly identified. In this case, the anomaly-aware monitoring method would be able to save energy by only sending 10% of the data, without having a significant impact on the ability of the SHM application to detect damages. Structures progressively degrade over time, until they eventually get damaged. To minimize the maintenance cost and improve the safety of the structure is important to identify and repair these damages early—before they grow into more severe and costly structural failures—. However, when the structure is only slightly damaged, it will not experience large changes in its dynamic response, and thus, it will not cause large increments in the anomaly score value calculated by the sensor node. In these cases, the anomaly detection model may not correctly label all the monitoring events as damaged due to the weak change in the structure’s response. Nevertheless, even if not all the cases are correctly labeled, the overall scores calculated by the node while the structure is slightly 90232 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge damaged will be larger than the scores obtained when the structure was completely healthy. In such cases, analyzing the temporal evolution of the anomaly score can provide a useful insight to identify slight, but gradual changes in the monitored structure. These changes can be characterized using the moving percentile of the anomaly scores, which is calculated using Algorithm 1. Where αcontrols the weight of previous values, and 0 < α < 1; pis the percentile value; score is the current score value; m0is the moving percentile value of the previous iteration; and mis the updated moving percentile value. An example of how the moving percentile of the anomaly score value provides information about the state of the monitored structure is shown in Figure 5. The data in the graph is from the SMC Cable Stayed Bridge benchmark [39] (see Section IV-A2). The graph shows the evolution of the anomaly score as the bridge degrades. The data used to train the anomaly detection model is shown in green, the data used to evaluate the model is shown in orange, and the horizontal dashed green line represents the anomaly detection threshold set as the 90th percentile of the training data. Two separate damages take place in the benchmark structure while it was being monitored. The date when these damages took place is not known as they were identified on a later date, during a routine inspection, however, the anomaly scores clearly show two points in time where the anomaly score increased. These dates are marked by the vertical red dashed lines. In this dataset, the effect of the damages is weak, particularly for the first event, and thus, most of the monitoring events are not correctly classified as anomalies. However, it can be seen that the moving 90th percentile of the scores does react to the damage, thus allowing the sensor node to identify the two damage cases. Overall, the proposed anomaly score monitoring method presented in this paper extends the conventional sensor nodes’ vibration monitoring flow, allowing them to calculate an anomaly score of their measurement as an indication of how much has the structure deviated from its nominal state. The anomaly score of a single monitoring event can be used to detect severe damages, enabling the SHM application to generate early responses, or it can use the moving percentile of anomaly scores to identify the effect of slight damages over a period of time. While the presence of damage produces changes in the dynamic response of the structure, resulting in larger anomaly scores, it is important to note that an increase in the anomaly score does not necessarily indicate the presence of damage. The sensor node does not have a model of the structure to evaluate the possible cause of the damage and discard any changes due to the structure operating in previously unseen conditions. Nonetheless, increasing the monitoring effort in such conditions also provides valuable insights for the SHM application. Therefore, the anomalyaware monitoring method presented in this paper is intended as an efficient data collection method rather than a standalone alarm generation system. Algorithm 1 Moving Percentile Calculation Parameters: initialized,α 1: procedure MovingPercentile(p,score,m0) 2: q←(p/100) 3: if initialized then 4: initialized ←True 5: m←score 6: else if score <m0then 7: m←m0−α/q 8: else if score >m0then 9: m←m0+α/(1 −q) 10: else 11: m←m0 return m FIGURE 5. Temporal evolution of the moving percentile of the anomaly score. IV. BENCHMARK EVALUATIONS We assess various features, feature selection methods, and anomaly detection algorithms to determine the optimal strategy to implement the anomaly-aware monitoring method presented in this paper. For the evaluation, we utilized data from four distinct public SHM benchmarks, which were collected from different structures experiencing different damage conditions. The varied range of conditions of the different benchmarks allows us to identify how the proposed solution will behave in a generic SHM application, and thus, provide a general solution, instead of one focused on a given structure or damage condition. A. SHM BENCHMARKS The benchmarks used for the evaluation are publicly available benchmarks commonly used in the literature to evaluate SHM damage detection methods. In this subsection, we provide a brief overview of the different benchmark structures, the damage conditions evaluated, and the data collection settings for each of the benchmarks. The benchmarks consist of data collected from multiple sensors distributed across VOLUME 11, 2023 90233
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge the structure and include various test cases with different levels of structural damage. To simplify the evaluation process, from each benchmark we only considered data from one of the sensors, and only from three different test cases. The first test case we selected was used as a reference for the healthy, undamaged state of the structure. The second test case was selected to represent the structure with severe damage, referred to as damage condition 1, which gives an example where the damage can be easily detected. Finally, the last test case, which is referred to as damage test case 2, was selected to represent a case where the structure is slightly damaged, making this test the hardest to identify. The data of the benchmarks are presented as a continuous time series of the accelerometer measurements sampled over the duration of each test case. To generate multiple monitoring events from these data, we divided the data into windows of 1000 acceleration samples. Each window represents the data collected in a single monitoring event of a sensor node. The length of 1000 samples is mainly limited by the memory capacity of the commercial sensor node used to evaluate the algorithms. The data on some benchmarks is very limited, so we applied some overlapping between consecutive windows to increase the number of windows available for the test. The degree of overlapping was adjusted based on the data available on each benchmark. To prepare the data before the evaluation we performed some preprocessing. Each data window was preprocessed independently as if it corresponded to a monitoring event from a sensor node. The preprocessing consisted of first a first-order detrending, so as to remove the offset and drift that was observed in some of the benchmark data. After the detrending, we normalized the energy of the vibration signals, by dividing the acceleration samples by their Root Mean Square (RMS) value. The energy normalization process eliminates the temporal variability in the vibration level, making sure that changes in the vibration source between the undamaged and damaged test cases are not used to identify these cases. In addition to this, some benchmarks required additional preprocessing. In these cases, benchmark-specific preprocessing is introduced in conjunction with the benchmark description in the remaining part of this subsection. 1) BENCHMARK 1: IASC-ASCE SHM TASK GROUP BENCHMARK STRUCTURE On August 2002 the IASC-ASCE SHM Task Group performed experimental studies on a test structure simulating damages by removing bracing or loosening bolts [40]. The test structure is a four-story, two-bay by two-bay steel frame scaled-model structure with a scaling factor of 1 to 3. The structure was monitored using fifteen accelerometers, three per floor including the base of the structure. The accelerometers were placed on the center column, east wall, and west wall of each floor of the structure. The test structure was studied under nine different test conditions, which are detailed in Table 1. In each of the test cases, the response of the structure was studied under four different sources of excitation: ambient, shaker performing a sine sweep, shaker with random vibration, and hammer. For the simulation tests presented in this paper, only the data collected when the structure was loaded with the shaker in random mode were used, so as to make sure there is enough vibration energy in the data to extract useful information, and because of its similarity with the sources used for other benchmarks. From the fifteen accelerometers used to collect the benchmark data, only the data from the accelerometer on the fourth floor, the east face was used, since it is located directly where most of the damage is introduced in the test cases. From all the available test cases, case 1 is used as the reference, undamaged case; case 9 is used as the severe damage condition; and case 5 is used as the slightly damaged case. In test case 5, since all the east face braces are removed, the response of the structure becomes similar to the undamaged case, making it more complex to detect than the rest of the test cases. The acceleration measurements of the benchmark were sampled at 250 Hz for at least 2.5 minutes per test case. Because of the little amount of data available for some of the test cases, for this benchmark, the window length was reduced to 500 samples and set the overlapping between windows to 60%. 2) BENCHMARK 2: SMC CABLE-STAYED BRIDGE The Center of Structural Monitoring and Control (SMC) at the Harbin Institute of Technology [39] published the data collected by the SHM system from an actual cable-stayed bridge. The bridge is a three-span concrete bridge with a total length of 510 m and a width of 11 m. The SHM monitoring data is composed of the measurements of fifteen accelerometer sensors collected with a sampling rate of 100 Hz to monitor the dynamic response of the bridge, in conjunction with temperature and wind sensors to monitor the environmental conditions of the bridge. The accelerometer data is available since the 1st of January 2008. Then, during an inspection carried out on August 2008, two damaged patterns were detected, and the bridge was eventually closed to traffic. It is believed that the bridge gradually degraded due to overloading, but the exact date when the two damages occurred is unknown. The resonance frequencies of the bridge are at very low frequencies, so to remove unnecessary data,the original data was filtered using a fourth-order low pass Butterworth filter with a cut-off frequency of 25 Hz, and we downsampled it by a factor of two. When the data was recorded, the bridge was not subjected to any active excitation sources, as the other benchmarks. Instead, the vibration of the bridge is caused by external sources, such as traffic and wind. Therefore, any acceleration window with an RMS value below 0.02 m/s2was discarded, so as to ensure the energy of the used data was sufficiently high. The utilized threshold was defined so that no background vibration was considered while keeping all the traffic-induced events. For this benchmark, 90234 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge TABLE 1. Test cases for the IASC-ASCE SHM Group experimental tests. TABLE 2. Selected test cases for the SMC bridge benchmark. since there was more than enough data for the tests, no overlapping was applied. The monitored bridge in this benchmark gradually degraded, thus, there are no clearly distinctive test cases. Huang et al. [41] analyzed the data from the benchmark using a Kalman filter-based method and observed that larger variations in the dynamic response of the bridge took place around May and larger changes towards the end of June. The dates used to determine the test conditions used for the evaluations are detailed in Table 2. Only the data recorded using sensor 1 was used for the evaluations, as it is located the closest to where both damaged patterns were identified during the August inspection. 3) BENCHMARK 3: K.U. LEUVEN Z24 BRIDGE The Z24 bridge was a Swiss concrete two-cell box-girder bridge with a main span of 30 m and two side spans of 14 m. In 1998, prior to its demolition, the KU Leuven Structural Mechanics Section introduced artificial damages to the bridge, while monitoring its dynamic response of the bridge under different test conditions. The instrumentation and the test conditions of the bridge are explained in the original publication by De Roeck et al. [42], the follow-up publications [43],[44], and the K.U. Leuven webpage [45]. The damage tests were divided into two parts, during the first part simulated damages in the pier settlement, simulated by lowering the pier; then, during the second part the pier was left in its original position and different damage conditions were simulated. For the evaluations presented in this paper, only the pier settlement cases were used, as they provide progressively more severe test cases. The test cases for the first part of the Z24 benchmark can be seen in Table 3. Case 2 is used as the undamaged condition, to avoid mistakenly identifying TABLE 3. Initial test cases of the Z24 bridge benchmark. the pier settlement equipment as a damage, case 3 is used as the slight damage test condition, and case 6 as the severe damage condition. The KU Leuven Structural Mechanics Section monitored the dynamic response of the bridge using 62 accelerometers under ambient and forced vibration. Only the data measured using sensor 209 was used for the test, as it experienced the most change when the damages were applied, and only the measurements from the forced vibration tests, as they have more energy. The original data from the benchmark was collected with a sampling rate of 100 Hz, using an antialiasing filter with a cut-off frequency of 30Hz. To generate enough data windows for the evaluations, the overlapping between windows was fixed to 40%. 4) BENCHMARK 4: QATAR UNIVERSITY GRANDSTAND SIMULATOR The Qatar University Grandstand Simulator (QUGS) structure [36],[37],[38] is a 4.2 m x 4.2 m hot-rolled steel frame, consisting of 30 joints. The frame was designed to carry a total of 30 spectators. The vibrations on the structure were monitored by an accelerometer located at each joint of the frame, with a sampling rate of 1024 Hz, and each event was recorded for 256 s. During the tests, the structure was excited using a shaker, which generated vibration at random frequencies. The QUGS structure was tested under 31 different test cases, one undamaged, and the rest with the bolts loosened in each of the joints. The test cases were repeated two times, generating two different datasets, which are available at Qatar University website [46]. The evaluation only considers the data from the sensor located at the first joint. The undamaged test case was used as VOLUME 11, 2023 90235
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 10. Memory usage of the anomaly detection models. inference, with for the evaluation node is 22.3mA; and tis the execution time. Q=It (9) FIGURE 11. Inference charge usage of the anomaly detection algorithms. All algorithms are shown on the top, and the bottom image focuses on the algorithms with the lowest charge. 3) MODEL ACCURACY The accuracy of an anomaly detection algorithm is given by its ability to correctly identify if the structure’s state is damaged or undamaged. There are several metrics to quantify the performance of these algorithms. The most commonly used performance metrics in ML are precision, which measures the rate of all the data points where the structure is detected as damaged that have been correctly identified and is given by Equation 10; recall or sensitivity, given by Equation 11 is the rate of data points from the damaged test case that have been correctly classified; F-score, which is a combination of the recall and precision metrics and is given by Equation 12; specificity is the rate of data points from the undamaged test case that have been correctly classified, and is given by Equation 13. Precision =TP TP +FP (10) Recall =TP TP +FN (11) FScore =2Precision ·Recall Precision +Recall (12) Specificity =TN TN +FP (13) 90242 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge where: •True positive (TP) are the data points from the damage test case that have been correctly identified. •False positive (FP) are the data points from the undamaged test case, that have been incorrectly classified as coming from a damaged structure. •True negative (TN) are the data points from the undamaged test case that have been correctly identified. •False negative (FN) are the data points from the damaged test case that have been incorrectly classified as coming from an undamaged structure. To limit the number of graphs shown in this section, the results shown in the graphs are the averaged results obtained for the evaluated algorithms across the different benchmarks. The average precision metric is shown in Figure 12. It can be seen that for the severe damage case, damage test case 1, the OCSVM algorithm, except for the case with the RBF kernel, outperforms the rest. It is followed by the GMM-MD and Z-score algorithms. It can be seen that for the OCSVM, GMM-MD and Z-score algorithm, the precision reaches a plateau as the length of the feature vector increases, meaning the further increments in the length of the feature vector do not increase the precision in a significant way. The OCSVM algorithm reaches the plateau with only 10 features, while the GMM-MD and Zscore algorithms require 20 features to reach the plateau. The I-forest algorithm obtained the worst performance, since its performance decreased when more than 15 features are considered due to overfitting. On the slight damage test case, damage test case 2, the GMM-MD algorithm has the highest precision, followed by the Z-Score algorithm. Unlike the results obtained for the severe damage test case, where the precision stabilized for long feature vectors; in the slight damage test case, the precision continues to increase with the dimension of the feature vector. Therefore, showing that the models can benefit from adding even more features. This contrasts the results obtained for the OCSVM and I-Forest algorithms, which stabilize their performance at 15 features. A noticeable effect is that increasing the number of clusters in the GMM-MD algorithm has a negative impact on its performance, since it may be suffering from overfitting. In cases where the structure may be subjected to different stresses or loaded in different ways, adding more clusters can help to discriminate between these cases. Tools such as the Bayesian Information Criterion [61] are commonly used to determine the optimal number of clusters for a given application. Similar results have been obtained for the average recall metric, Figure 13. It can be seen that for damage test case 2, the recall is mostly below 50% showing that the algorithms have a hard time identifying slight damage cases. This is to be expected as the slight damage cases produce small changes in the response of the structure, thus making them hard to classify. Consequently, the anomaly score value of a single monitoring event is not a good indicator when the structure is slightly damaged. FIGURE 12. Average precision, damage test case 1 on the top, damage test case 2 on the bottom. FIGURE 13. Average recall, damage test case 1 on the top, damage test case 2 on the bottom. The average F-score metric, shown in Figure 14, confirms the initial observations that the OCSVM algorithm VOLUME 11, 2023 90243
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 14. Average F-score, damage test case 1 on the top, damage test case 2 on the bottom. outperforms the rest in the severe damage case; while the GMM-MD algorithm takes the lead for the slight damage test case. The specificity value only considers how the data points from the undamaged test case are classified. The specificity value is controlled by the percentile parameter used to adjust the anomaly score threshold, which was fixed to 90% for the evaluation. Since the threshold is set using training data, this metric identifies how well the algorithms are able to hold the specificity value for previously unseen data points. Figure 15, shows the average specificity for the evaluated models. It can be seen that in all cases, the value is only slightly lower than 90% regardless of the number of features. On top of the performance metrics, we also calculated their variability, since each configuration was tested 500 times. As an example of this variability, the standard deviation of the F-score for the damage test case 2 is shown in Figure16. The I-Forest algorithm and the GMM-MD algorithm with multiple clusters had the highest standard deviation. The next algorithm in terms of standard deviation was the GMM-MD with only one cluster, followed by the Z-score algorithm. The OCSVM algorithm had the lowest variability. Taking into account the variance, the F-Score value obtained with the GMM-MD algorithm on the damage test case 2 with 25 features, is higher than 0.461 in over 98% of the cases. Despite its low memory and processing requirements, the Z-score algorithm has shown promising results. Making it FIGURE 15. Average model specificity. FIGURE 16. Average model F-score standard deviation. an interesting alternative in cases where the sensor nodes do not have enough resources for the GMM-MD algorithm. From another point of view, given the memory and energy constraints for a sensor node, using the Z-score allows us to use more features, compared to the other algorithms. We evaluated this case by extending the simulations for the Z-score algorithm increasing the number of features. The average F-score for the Z-score algorithm with the extended feature is shown in Figure 17. In this case, only the results for Damage test case 2 are shown, as Figure 14 already showed that the F-score for the severe damage test case reached a plateau at 20 features. The extended simulation shows that increasing the number of features above 25 was actually detrimental to the Z-score algorithm, as the performance peak is reached with 25 features. The evaluation results per benchmark are shown in Table 7. To limit the size of the table, it only shows the results obtained with 25 features, and from the best-performing hyperparameter for each evaluated algorithm. The results obtained with benchmark 2 (i.e. the SMC bridge benchmark) were significantly worse than for the rest of the benchmarks. The SMC structure is a large and complex structure, which was 90244 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 17. Extended feature evaluation for the Z-score algorithm. subjected to multiple different operating conditions (e.g. wind and traffic) and environmental conditions (e.g. temperature, rain, and humidity) while the benchmark data was recorded. On top of this, the damage conditions were less severe than the cases from the other benchmarks. Consequently, for this benchmark, the anomaly score of a single monitoring event is not a good indicator of the presence of damage in the structure. In these cases, where the changes in the dynamic response of the structure are small, the running percentile of the anomaly scores is a more robust indicator to detect damage. To test the ability of the anomaly monitoring method of identifying slight damages using the moving percentile of the anomaly scores, we calculated the average relative increment of the 90th percentile of the anomaly scores obtained for the damage test cases with respect to the 90th percentile obtained for the anomaly scores of the undamaged test case. Figure 18, shows the achieved increment in the 90th percentile obtained by the evaluated anomaly detection algorithms. As can be seen, the GMM-MD algorithm outperforms the other algorithms in the severe and the slight damage test cases. For the OCSVM, the polynomial kernel outperforms the other kernels. Unlike the other metrics, such as the F-score value, the polynomial kernels with higher orders obtained a larger increment. For the GMM-MD algorithm with one cluster and 25 features, the relative increments for benchmark 2 is 51.076% and 26.15% for damage test cases 1 and 2, respectively; and their standard deviation of 11.832% and 8.453%. The standard deviation in the undamaged test case was 7.707%. In other words, the increment in the moving 90th percentile of the anomaly scores for the slight damage test case with benchmark 2 is higher than three standard deviations with respect to the 90th percentile value of the undamaged test case. This shows that the moving percentile metric is a good indicator to identify when the structure is damaged even when the change in the structure’s response is weak. FIGURE 18. Relative increment of the 90th percentile of the anomaly score with respect to the undamaged test case. 4) CONCLUSION OF THE MODEL EVALUATION Civil structures slowly degrade over time. The goal of an SHM system is to detect the presence of damages as soon as possible, i.e. when the dynamic response of the structure is only slightly altered. This scenario matches the conditions of the damage test case 2, for which the GMM-MD algorithm yielded the best performance, obtaining an average F-score of 0.66 with 25 features. The main drawback of the GMMMD algorithm is its limited scalability with the number of features. The complexity of the inference is Omn2, and the number of elements in its model m(n2+n) for mclusters and nfeatures. For the severe damage test case, the algorithms achieved a plateau, beyond which adding additional features did not improve the performance of the algorithms, and thus, the models to identify severe damage can use shorter feature vectors, without sacrificing performance. However, this is not the case for the slight damage test case, as the performance of the GMM-MD algorithm continued to improve as the length of the feature vector is increased. To identify slight damages having a large feature space is beneficial, which significantly impacts the energy and memory efficiency of the GMM-MD algorithm. On the other side, our evaluation results show that using a single cluster gave the best results, which mitigates the energy and memory cost of the GMM-MD algorithm, particularly when the feature vector is large. The battery charge required to perform a single inference with the GMM-MD algorithm with 25 features is VOLUME 11, 2023 90245
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge TABLE 7. Results of the anomaly detection algorithms with the best-performing hyperparameters by benchmark. approximately 8nAh, making this algorithm energy-efficient, at least when compared with the energy used for the collection of the accelerometer data window, which is more than two orders of magnitude higher, in the range of 3µAh. Overall, the GMM-MD algorithm showed the best performance, while still being lightweight enough to be implemented in a wireless sensor node, followed by the OCSVM algorithm with a second-order polynomial kernel if the structure is expected to be severely damaged. The results also show that the Z-score algorithm also provides a good tradeoff between energy and memory usage, and the achieved performance, thus making it an interesting alternative for heavily constrained sensor nodes. V. EXPERIMENTAL EVALUATION IN THE UPC BENCHMARK STRUCTURE The benchmark evaluation tests used the data from public benchmarks to test different aspects of the anomaly-aware monitoring method presented in this paper. Even though during the evaluations the feature extraction and inference were performed by a sensor node, the data collection and preprocessing were done externally. In this section, we present the experimental evaluation carried out to validate the results from the benchmark evaluations and assess the anomalyaware monitoring method in a benchmark structure. For the experimental evaluation, the complete anomaly-aware monitoring method from Figure 1, except for the last step, is implemented in the sensor node, which was deployed in a benchmark structure and tested under several damaged and undamaged conditions. The benchmark structure is a steel frame, reduced-scale model structure, developed and maintained by the Department of Civil and Environmental Engineering at the Polytechnic University of Catalonia (UPC) [62],[63]. The structure has a four-story, two-bay by one-bay configuration, with a height of 2m and a base of 1.45 ×0.77m, as shown in Figure 19. The horizontal beams of the structure have 4.5kg lead blocks located at the center point of the beam, representing the permanent loads of the structure. This benchmark structure has been used in prior publications to validate structural damage detection methods. Caselles et al. [63] tested a PCA (Principal Component Analysis)-based method, and validated their proposed damage detection method using the same benchmark structure. For their experimental evaluation, Caselles et al. simulated different damage scenarios by releasing the bolts of different junctions. In our experimental setup, we positioned two sensor nodes attached to the top beam of the front, and back facades of the structure, as close to the center as possible, but slightly to the left as the lead blocks were on the way. The sensor nodes are the same modified commercial nodes by Wordsensing used for the benchmark evaluation tests. Each node weighs approximately 300g and was placed on opposite sides of the structure to avoid unbalancing of the structure. In Figure 19 the position of the sensor nodes is highlighted with a red circle, and the orientation of the accelerometer axes is shown in cyan. The sensor nodes were configured to sample acceleration data at a rate of 1000Hz, and to collect a 2000 sample window for each monitoring event. The internal accelerometer has a band-pass filter with −3dB corner frequencies of 2.38 mHz and 250Hz respectively. Even though the accelerometer data is collected along the three axes, the anomaly-aware monitoring method is only implemented for the Y-axis data. The monitoring events are generated by striking the base of the structure with a 2.5kg medicine ball, which is swung to the structure from a constant height, so as to induce similar vibration levels to the structure in each monitoring event. The medicine ball striking the structure can be seen in Figure 20 (a), and the strike location is highlighted with a green 16-point star in Figure19. This excitation method is 90246 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 19. UPC benchmark structure. Side view on the left, front view on the right. FIGURE 20. The top image (a) shows the medicine ball striking the structure, the center image (b) shows the node attached to the structure, and the bottom image (c) shows the simulated damage on a junction. the same as the one used by Caselles et al. for their evaluation, showing it does generate enough energy to measure the dynamic response of the structure. When the ball strikes the TABLE 8. Test scenarios of the experimental evaluation. structure, the sensor nodes are wakened up by their internal accelerometer to start a monitoring event. To eliminate the transitory effects caused by the strike, the sensor nodes were configured to discard the first 500 samples (i.e. waiting half a second) after the strike before starting the data collection process for the monitoring event. Additionally, we waited several seconds between each consecutive strike to ensure that the vibration had stopped before starting a new monitoring event. The anomaly-aware monitoring method was tested under three different damage scenarios, with incremental damage to the structure. The damage scenarios consisted in removing the junction bolts between the horizontal beams along the Y- axis and the column at different locations of the structure. The locations of the junctions where the damages were introduced are highlighted with dashed orange circles in Figure 19, and an image of a damaged junction can be seen in Figure 20 (c). The test scenarios evaluated are summarized in Table 8. The data collected during the experimental setup is made public in [64]. The dataset is composed of 275 different monitoring events from each sensor node. For each monitoring event, we recorded the raw 3d-accelerometer data in m/s2, the feature vector calculated by the node, and the anomaly score and prediction value calculated with the anomaly detection model. The first 75 monitoring events, the sensor nodes remained in training mode, and thus, for these events, the VOLUME 11, 2023 90247
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge TABLE 9. Results from the experimental evaluation. feature vector contains the complete feature set, and no inference data was recorded (as the model was yet to be trained). Once the first 75 monitoring events were recorded, we used this data to perform the feature selection and train the anomaly detection model for each node independently. Following the conclusions from the benchmark evaluation tests, the number of features was set to 20, which was the maximum that could be fit in memory, and we used the GMM-MD algorithm with one cluster to train the model. 75% of the training data was used to train the model, and the other 25% was used to set the anomaly detection threshold. To compare with the results from the benchmark evaluation tests, we fixed the threshold to the 90th percentile of the anomaly scores calculated for the threshold training data. The training was done in a PC and then communicated to the sensor nodes, transitioning them to inference mode. In inference mode, the sensor nodes can run the full anomalyaware monitoring flow obtaining the anomaly scores and deciding if the data is considered anomalous or not. The results obtained for each test case on each of the nodes are detailed in Table 9. The anomaly scores of the different monitoring events are shown in Figure 21. Each marker represents the anomaly score of a single monitoring event, and the horizontal dashed, red line shows the fixed anomaly detection threshold. It should be noted that the anomaly scores for the training data were obtained later in a PC using the trained model, and not in the sensor node, as the models were not trained at the moment the data was collected. Also, two monitoring events for test case 3 had an anomaly score greater than 10, these values have been cropped out to improve the readability of the image. The results show that both sensor nodes successfully identified the presence of damage in over 75% of the cases, obtaining an F-score of 0.826 and 0.931 depending on the test case. Overall, the Experimental test show that the anomaly-aware monitoring method is lightweight enough to be executed in a commercial sensor node, using its internal MEMS-based accelerometer, and be able to identify when the structure is damaged. VI. ANOMALY-AWARE MONITORING FOR SELF-AWARENESS The fourth and last step of the anomaly-aware monitoring workflow presented in Figure 1is using the anomaly score values to guide the adaptive actions of the sensor node and FIGURE 21. Anomaly scores obtained for each monitoring event of the dataset. The results from node 1 are shown on the top, and the results from node 2 are shown on the bottom. support the implementation of self-awareness at the sensor node level. The anomaly score value enables the node to react to changes in the monitored structure, without requiring costly and slow communications with the central server. The anomaly score value can be combined with other internal metrics of the node (e.g. its remaining battery life or its energy consumption, etc.) to support the implementation of self-aware behaviors on the sensor node. This section showcases how the anomaly score value can be used to support self-awareness in the context of SHM through an example simulation. The self-aware monitoring method proposed by Arnaiz et al. [23] dynamically adjusts the power consumption of the sensor node to comply with its defined battery lifetime target; while allocating the energy budget more efficiently by taking into account changes in the temporal correlation of the monitored data. Temporal correlation is a useful parameter to model the perceived utility of the signal for simple measurements, such as temperature, humidity, or wind speed. 90248 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge However, this metric cannot be used for more complex data such as vibration data in SHM. Instead, we use the anomaly score value to model the perceived utility of the data. Rather than having to transmit all the measurements to the central server, the sensor node can process the data locally, using the anomaly detection model, and only transmit a predefined percentage of values using its radio interface. This way the node can save energy, as it does not have to transmit every monitoring event to the central server, and still be able to detect the presence of local damages in the monitoring structure by analyzing its local anomaly score values. In the simulation, the node implements the complete anomaly-aware monitoring workflow proposed in this paper. The node remains most of the time in low power mode with just the accelerometer active waiting for vibration peaks to start a monitoring event. These vibration peaks are generated by external factors (e.g. traffic, hammer strikes, trains, etc.) and the node has no control over how often these peaks are generated. But can adjust how often it relays these data to the central server. Once a vibration peak is detected, the node starts a monitoring event, where it collects a window of raw accelerometer measurements, builds the feature vector, and calculates the anomaly score value for the event. The anomaly score value is used to determine if the event data is transmitted, using additional energy, or it is discarded. The self-awareness module needs to dynamically adjust the anomaly score threshold, to control the energy consumption of the sensor node and comply with the battery life target. To simulate the measurements from the node we used the data from the SMC bridge, or benchmark 2 [39] (Section IV-A2) as it is the more realistic test case from all the benchmarks and contains the time series data from an extended period of time. The benchmark data were preprocessed as described in Section IV; shuffled, so the training period contains data taken at different times with different environmental conditions; and re-timed, introducing random intervals between consecutive samples to simulate the random nature of the monitoring events. To evaluate the response of the sensor node to the presence of damage, we added two groups of 1000 accelerometer windows using data from the periods where the structure is considered to be damaged, from damage test case 2 and damage test case 1, respectively, as defined in Section IV-A2. The charge consumption of the sensor node is given by Equation 14, where Cevent is the battery charge consumption of the node since the last monitoring event, Iidle is the current consumption of the sensor node in idle mode in mAh, 1Tis the time in hours since the last monitoring event, Csp is the charge required the sample and process the data; and Ctr is the charge required to transmit the data, which is set to zero if the measurement is not transmitted in the end. Cevent =Iidle1T+Csp +Ctr (14) As the monitoring events are generated using the acceleration trigger and not a fixed monitoring period, the time between events is not known. Consequently, the sensor node FIGURE 22. Battery discharge rate of a sensor node with the proposed anomaly-aware monitoring method and the naive monitoring method. TABLE 10. Simulation data for the sensor node. cannot directly model its power consumption and predict its remaining battery life. For simplicity, in the simulation, the sensor node models the average time between events, to estimate the expected number of events until the battery lifetime target is reached. The average time between events is calculated using the Exponential Moving Average (EMA) from Equation 15, where αis the smoothing coefficient of the EMA, d 1Teventxis the mean time between events at time x, and 1Tis the time since the last monitoring event took place. d 1Teventi=α1T+(1−α)d 1Teventi−1(15) Equation 16 is used to calculate the percentage of monitoring events that can be transmitted to the central server while complying with the battery lifetime target. Where Cbat is the remaining battery charge, Tbat is the time remaining until the battery lifetime target is accomplished, d 1Tevent is the mean time between events, and the rest of the parameters are detailed in Table 10. The percentage of monitoring events to be transmitted is used to adjust the anomaly score threshold used to determine if a given monitoring event is transmitted or not. The threshold value is calculated as the moving percentile of the anomaly score values following Algorithm 1. Trans%=Cbat −Tbat Iidle +Csp d 1Tevent Ctr Tbat d 1Tevent (16) VOLUME 11, 2023 90249
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge FIGURE 23. Anomaly scores with the anomaly score threshold and the 90th percentile. Figure 22 shows the sensor node’s battery charge over time in the continuous blue line. For the first 1000 monitoring events, the sensor node starts in training mode. The end of the training period is marked with a dashed red vertical line. During the training period, the sensor node transmits the data from all the monitoring events, so they can be used to train the anomaly detection model. For the simulations, we used the GMM-MD model with a single cluster, which is configured in the node once the training period ends. In inference mode, the sensor node computes the anomaly score for each monitoring event to decide if the data is transmitted or not. By not transmitting the information of each monitoring event, the sensor node is able to adjust its energy consumption. As can be seen in Figure 22, after the training is completed, the sensor node reduces its battery discharge rate so it is able to reach the battery lifetime target. For comparison, the discharge rate of a sensor node using a naive monitoring method is shown as a brown dotted line. For the naive monitoring method, the sensor node transmits the data from all the monitoring events, so its energy consumption does not change once the training ends. The simulation results are detailed in Table 11. The battery life of the node in the simulation is over six months with a mean time between events of eight minutes. The selfawareness module is able to successfully adjust the energy consumption of the sensor node and achieve a battery life within a few hours of its predefined target. Furthermore, by only transmitting the most anomalous monitoring events, the sensor node is able to extend the battery life of the node by 77 days or by 59% compared with the naive monitoring method. The anomaly scores for the different monitoring events can be seen in Figure 23, along with the 90th percentile of the scores represented as a blue line, and the anomaly score threshold as a continuous black line. All the events with an TABLE 11. Simulation results. Dates as (DD/MM/YYYY hh:mm:ss). anomaly score value larger than the anomaly score threshold are transmitted. The monitoring events extracted from when the data is considered to be damaged are shown in brown. As it can be seen when both groups of monitoring events from the damaged structure are being processed, the 90th percentile of the anomaly score increases significantly, allowing the node to identify that the structure is potentially damaged, as it can be seen by the damage detection signal, which transitions from zero to one when the node detects the presence of damage. When the node suspects that the structure is potentially damaged, it transmits the information of all the captured monitoring events regardless of its battery life target, as can be seen during this period the anomaly score threshold is set to zero. In the simulation, once the damage period ends the node resumes its regular operation, having to re-adjust its operation to compensate for energy excess consumed during the period where the structure was considered to be damaged. Overall, the example self-aware application is able to dynamically adjust the percentage of transmitted monitoring events, so as to comply with its target battery life. The anomaly score is leveraged to model which monitoring events are considered more interesting and prioritize the transmission of these events. Moreover, anomaly scores are also used 90250 VOLUME 11, 2023
D. Arnaiz et al.: On Anomaly-Aware Structural Health Monitoring at the Extreme Edge to detect the presence of structural damage without having to communicate with the central server. Thus, allowing the sensor node to operate with a low percentage of transmitted monitoring events, without impacting the damage detection delay in a significant way. VII. CONCLUSIONS AND FUTURE WORK This article proposes a lightweight SHM monitoring method that employs an anomaly detection model to identify variations in the dynamic response of the monitored structure, which may indicate the presence of damages. This article starts evaluating a wide range of commonly used features for SHM using publicly available SHM benchmarks, showing that the Wavelet Packet Component Energy bands outperformed the other features in all cases. Based on the analytic results an unsupervised feature selection method is proposed. The result shows that when the feature vector is large, with 20 or more features, the score of the proposed method is 70% that of the ideal supervised feature selection method. The anomaly detection model is a critical aspect of the proposed monitoring method. This article evaluates the four most common lightweight anomaly detection algorithms using the data from the SHM benchmarks. The result shows that the GMM-MD algorithm with only one cluster has the best performance in cases where the structure is slightly damaged, while having a relatively small memory footprint and energy cost. For nodes where the resources are heavily constrained, the Z-score algorithm offered a good algorithm, reducing the memory and energy cost by more than 85%, and only reducing the F-score by 20%. The benchmark evaluation also showed that the anomaly score obtained for an individual monitoring event provides a good indication of the presence of severe damage, but is not robust when the structure is slightly damaged. However, using the running percentile of the anomaly score value in consecutive monitoring events, does provide a robust indication even when the damage has very little effect on the dynamic response of the structure. The evaluation results successfully validated the proposed anomaly-aware monitoring method using a commercial node deployed in a benchmark structure. The results obtained for the evaluation test, running the complete anomaly-aware monitoring method in the sensor nodes, were similar to the results obtained with the public benchmark data, validating that running the algorithm in the node is viable. Furthermore, this article also showcases how the anomaly scores can be used to support self-awareness in a test simulation where the anomaly score values were successfully leveraged to guide the behavior of the sensor node, allowing the sensor node to comply with a specified battery lifetime goal, without impacting the system’s ability to identify damages in the structure. Future research directions will focus on two directions. One research direction is to evaluate the performance of the anomaly detection algorithm in a real structure, under varying environmental conditions. Additionally, the use of environmental measurements (e.g. temperature and humidity) as features also needs to be considered, evaluating their effect on the robustness of the anomaly detection model. The other research direction centers on the implementation of more sophisticated self-aware behaviors at the sensor node level. The self-aware behavior presented in the article is a first approximation, only taking into account one goal (the battery life), two monitored parameters (i.e. remaining battery and anomaly scores), and one control variable (i.e. the transmission rate) to guide the node’s behavior. Future self-aware methods should evaluate the use of multiple, competing, goals and multiple control and monitored parameters. ACKNOWLEDGMENT The authors wish to thank the Department of Civil and Environmental Engineering at the Polytechnic University of Catalonia (UPC), and in particular Oriol Caselles for granting us access to the UPC benchmark structure to perform the experimental evaluation. REFERENCES [1] Structurally Deficient Bridges |Bridge Infrastructure |ASCE’s 2021 Infrastructure Report Card, ASCE, Reston, VA, UA, 2021. [2] J. Yick, B. Mukherjee, and D. Ghosal, ‘‘Wireless sensor network survey,’’ Comput. Netw., vol. 52, no. 12, pp. 2292–2330, Aug. 2008. [3] I. F. Akyildiz and M. C. Vuran, Wireless Sensor Networks. Hoboken, NJ, USA: Wiley, 2010. [4] M. Abdulkarem, K. Samsudin, F. Z. Rokhani, and M. F. A. Rasid, ‘‘Wireless sensor network for structural health monitoring: A contemporary review of technologies, challenges, and future direction,’’ Struct. Health Monitor., vol. 19, no. 3, pp. 693–735, May 2020. [5] A. Sofi, J. Jane Regita, B. Rane, and H. H. Lau, ‘‘Structural health monitoring using wireless smart sensor network—An overview,’’ Mech. Syst. Signal Process., vol. 163, Jan. 2022, Art. no. 108113. [6] S. Kim, S. Pakzad, D. Culler, J. Demmel, G. Fenves, S. Glaser, and M. Turon, ‘‘Health monitoring of civil infrastructures using wireless sensor networks,’’ in Proc. 6th Int. Symp. Inf. Process. Sensor Netw., Apr. 2007, pp. 254–263. [7] M. Abner, P. K.-Y. Wong, and J. C. P. Cheng, ‘‘Battery lifespan enhancement strategies for edge computing-enabled wireless Bluetooth mesh sensor network for structural health monitoring,’’ Autom. Construct., vol. 140, Aug. 2022, Art. no. 104355. [8] A. B. Noel, A. Abdaoui, T. Elfouly, M. H. Ahmed, A. Badawy, and M. S. Shehata, ‘‘Structural health monitoring using wireless sensor networks: A comprehensive survey,’’ IEEE Commun. Surveys Tuts., vol. 19, no. 3, pp. 1403–1423, 3rd Quart., 2017. [9] G. Anastasi, M. Conti, M. Di Francesco, and A. Passarella, ‘‘Energy conservation in wireless sensor networks: A survey,’’ Ad Hoc Netw., vol. 7, no. 3, pp. 537–568, May 2009. [10] J. Singh, R. Kaur, and D. Singh, ‘‘A survey and taxonomy on energy management schemes in wireless sensor networks,’’ J. Syst. Archit., vol. 111, Dec. 2020, Art. no. 101782. [11] P. R. Lewis, M. Platzner, B. Rinner, J. Trresen, and X. Yao, Self- Aware Computing Systems: An Engineering Approach, 1st ed. Springer, Aug. 2016, p. 354. [12] J. Zhou and D. De Roure, ‘‘FloodNet: Coupling adaptive sampling with energy aware routing in a flood warning system,’’ J. Comput. Sci. Technol., vol. 22, no. 1, pp. 121–130, Jan. 2007. [13] A. Agarwal, J. Miller, J. Eastep, D. Wentziaff, and H. Kasture, ‘‘Selfaware computing,’’ Massachusetts Inst. Technol., Cambridge, MA, USA, Tech. Rep. ADA501367, 2009. [14] S. Kounev et al., ‘‘The notion of self-aware computing,’’ in Self-Aware Computing Systems. Cham, Switzerland: Springer, 2017, pp. 3–16, doi: 10.1007/978-3-319-47474-8_1. [15] M. Götzinger, D. Juhász, N. Taherinejad, E. Willegger, B. Tutzer, P. Liljeberg, A. Jantsch, and A. M. Rahmani, ‘‘RoSA: A framework for modeling self-awareness in cyber-physical systems,’’ IEEE Access, vol. 8, pp. 141373–141394, 2020. VOLUME 11, 2023 90251