Introduction

Bridge Structural Health Monitoring System (SHMS) is an important system for identifying the deformation of bridge structures that are influenced by the environment and the heavy vehicles passing through the bridge. The SHMS performs early detection of bridge damage; thus, it ensures safety and reduces bridge maintenance costs [1]. Currently, most of the bridge SHMS perform manual data processing. The historical monitoring data is typically carried out only for certain period which is insufficient for further condition monitoring analysis.

Bridge damage detection and identification study is challenging in the data collection stage. An example of a recently reported study presented in [2] employed data from bridge benchmark dataset presented in [3] for multiclass damage detection. This is because collecting the data on the bridge is an easy task as the sensor and Data Acquisition (DAQ) is cable-based and needs electrical power. Another reason, it might be unsafe to collect the data due to the hazardous location. Approval from related authorities needs also to be granted in order to make sure that the data collection protocol is zero hazards. This condition caused the monitoring process to be carried out in a short period so that complete data histories were not obtained. A Wireless Sensor Network (WSN) offers a potential solution for these limitations.

The bridge SHMS based on WSN technology offers an advantage compared to the existing methods [4]. Improving the SHMS based WSN technology with machine learning approaches is an interesting research topic, especially related to enhancing SHMS capability to identify damage and its location. The existing bridge SHMS using a condition assessment system and load rating using dynamic responses [5] can be enhanced with an automated and advance system. This existing system still transmits raw data to a server, causing inefficient use of bandwidth, and raw data is then processed manually using Microsoft Excel.

One proven approach to assess bridge conditions is based on bridge vibration monitoring and analysis. It is because the microstructure changes of the bridge due to environment condition and applied load can be captured with the accelerometer with certain frequency band and sensitivity. The bridge vibration data, or vibration acceleration data are typically acquired in the time domain which is then transformed into the frequency domain using the Fast Fourier Transform (FFT) to obtain the bridge’s fundamental frequency and amplitude. Finite Element Analysis (FEA) is used to identify the ideal condition of the bridge, using the Abaqus software. In this study, the bridge vibration data is collected using wireless sensor nodes. The fundamental frequency calculated through FEA is then compared with the data collected from the sensor nodes.

Review papers related to bridge health monitoring and damage prediction have been presented recently [6,7,8]. Rizzo and Enshaeian [6] described integrated systems that contain different sensors that are needed for the following measurement and monitoring such as stiffness loss, time and temperature-dependent factors, fatigue evaluation, corrosion evaluation, scour, and impact effects. These measurements should be supported by wireless sensor technologies and sensor drift. A comprehensive review of bridge structure under progressive collapse is presented in [7]. The types of progressive collapse include (1) pancake type, (2) zipper type, (3) domino type, (4) instability type, and (5) mixed type were explained. In addition, the paper also presents a case study on types of bridges under progressive collapse and its numerical studies. Another recent review paper related to the application of mobile sensing of bridges using moving vehicles was presented in [8]. Mobile sensing refers to the sensors installed on moving vehicles that have been extensively used for condition monitoring and structural assessment of bridges in recent years.

A study that used WSNs to improve the bridge condition assessment systems using dynamic response is presented in [9]. This system calculates the level of the bridge health and displays the mode shape for a dominant fundamental frequency automatically. However, the work does not provide bridge damage detection and localization. Works related to the detection and localization of bridge damage, especially using a combined method of WSN and machine learning, are still rare. A study which presented a damage detection and localization in a building using a Support Vector Machine (SVM) [10] has inspired the present study to implement it in a bridge environment. Differ to [10], the first three fundamental frequencies identified by the sensor node are used as the machine learning feature of the Multilayer Perceptron (MLP) and SVM.

This paper presents an improvement of bridge vibration measurement and analysis methods to identify bridge damage and its location based on embedded ML algorithm in the network namely in-network data processing. Here, cluster-based WSN topology is proposed and the programmable wireless sensor nodes are introduced. The bridge SHMS based on WSN detects the damage and its location based on machine learning methods. The MLP and SVM are used to classify bridge areas that show anomaly behavior and automatic data acquisition, processing, and distribution.

The scientific interest of this work is collaborating civil engineering, electronics engineering, and computer science in the field of structural health monitoring systems, called civionics engineering. The main objectives of the works includes investigation of the proper input parameter for classifying bridge damage and localization; and the application of the suitable ML method for the implementation of the cluster-based WSN topology for classifying bridge damage and localization.

The objective of the study can be highlighted in three points, i.e., (1) to determine the proper input parameter for classifying bridge damage and localization; (2) to study a suitable ML method for bridge damage and localization that will be implemented in WSN; and (3) to implement the cluster-based WSN topology for classifying bridge damage and localization.

The paper is organized as follows: Sect. “A Brief Review of the Bridge Monitoring Features, Artificial Intelligence Methods, and Wireless Sensor Network” describes the state of the art, Sect. “Methods” presents the proposed method, Sect. “Experimental Setup” explains the experimental results and analysis, Sects. “Machine Learning Results” and “Discussion” present results and discussion, respectively, and finally, Sect. “Conclusions” provides the conclusion.

A Brief Review of the Bridge Monitoring Features, Artificial Intelligence Methods, and Wireless Sensor Network

In vibration analysis of bridge SHMS based WSN, the raw vibration data was processed and extracted to obtain representative vibration features regarding the condition of the bridge. This feature extraction methods are generally divided into two types: (1) time-domain features and (2) frequency-domain features [11]. In addition, Caesarendra et al. [12] present the feature extraction methods of vibration signal were divided into 5 categories i.e. (1) time-domain features extraction, (2) frequency-domain features extraction, (3) time–frequency representation, (4) phase-space dissimilarity measurement, and (5) complexity measurement. The feature extraction methods are necessary and important as they will be used further as inputs for damage classification and localization in the machine learning methods.

Among other feature extractions methods, time-domain features are commonly used because its simplicity. Time-domain analysis processes the time series data collected from sensor nodes for modal parameter extraction. A part of easy implementation, the advantage of the time-domain analysis is it offers insight into transient phenomena but major disadvantage of the time domain features is when it is use in the signal with high-level of non-stationary properties. Although time-domain analysis has a benefit in certain applications but it requires large time-domain data samples for a slightly damped system [13].

A well-known time-domain method is the Auto-Regressive Moving Average (ARMA) which uses statistical modeling to represent the relationship between excitation patterns and structural response under damaged and undamaged conditions. The ARMA technique is proposed to detect damage effectively [14], however, the model fails to detect small damage and requires the installation of many sensors. Another time-domain method for detection technique is a covariance-based subspace. It is based on state-space models that can be used to represent vibrational structures [15] and [16]. The state-space model represents a structure vibration consisting of a state transition matrix, an input matrix, and an output matrix. The damage detection covariance matrix was used on the accelerated response covariance matrix [17], which has proven to be a more effective technique than traditional damage detection techniques like the mode shape comparison method. The drawback of subspace-based damage detection techniques is that they are affected by unknown variations of ambient stimuli, leading to erroneous damage detection [18].

In the frequency domain method, the time series data collected from the sensor node are transformed into the frequency domain, for example using FFT. The advantage of the frequency domain method compared with the time domain method is the capability of noise reduction because the FFT works based on periodicity that will cancel out the noise which has the characteristic of short-term fluctuations. However, in the FFT operation, there is a shortcoming such as a leakage. Although the leakage effect can be reduced by using the windowing function, the effect cannot be eliminated [13].

The most widely used frequency-domain method is the Peak Picking (PP) method, which is the simplest modal parameter extraction method. This method transforms the acceleration data collected by sensor nodes using FFT. Here, The Eigen Frequency at the peak of the frequency response is identified. Eigen frequency is used in fundamental frequency extraction, damping ratio, and mode shape. Although the PP method is simple, it is difficult to apply the PP method where the peak frequency response is not well defined, and the attenuation ratio is not low [19]. The Hilbert-Huang transformation is an alternative method in damage detection [20] and [21]. This technique proposes an algorithm that combines Empirical Modal Decomposition (EMD), random decrement technique, and Hilbert-Huang transformation. This technique can be applied in a circumstance where the structure generates significant noise and rapid frequency changes. However, this technique cannot separate very close frequencies [22] and [23].

A study of time–frequency analysis such as Short-Time Fourier Transform (STFT) and Wavelet Package Decomposition (WPD) for bridge SHMS has been presented in [24] and [25], respectively. Ahmadi et al. [24] used STFT to identify the damages and diagnosed their location. The calculated time–frequency matrices are determined using a damage index based on Levenberg–Marquardt algorithm and Chebyshev distance. Surindra et al. [25] presented an investigation study of the dynamic characteristics of an underpass bridge using vibration signal and WPD method. The WPD method successfully revealed the first fundamental frequency of the underpass bridge.

The bridge SHMS should be designed to detect damage that occurs in structures. Once structural damage has been detected, it is necessary to determine where the damage is located. This process is called damage localization, which requires installing several sensors to cover areas where anomaly behavior will occur in the bridge’s structure. Insufficient coverage of sensor installation may result in inaccurate detection and localization. There are several damage localization methods, for example, the frequency-based method and the mode-shape method. The implementation of frequency-based and mode-shape-based damage localization techniques was proposed and shows that the frequency-based method has a small error, and the mode-shape-based method has almost no error [26]. However, the frequency-based methods can produce uncertainty frequency estimation when the temperature of the bridge environment changes significantly [27]. Exploiting mode shape for damage classification may not be effective because the damage is local and probably may not identify lower mode shape [26] and [28].

The flexible approach to localizing the damage is using a structural flexibility matrix. Damage localization requires a flexibility matrix of the undamaged structure and an estimated current structure flexibility matrix. However, accurate models for undamaged structures are the main disadvantage of this technique [29]. The SVM is a promising alternative damage localization technique. This machine learning technique is relatively new in the damage localization application. The SVM can be utilized to classify structural damage patterns in SHM systems with a minimum number of sensor usage [10]. This technique was used in a building damage simulation that implements just one sensor on the roof and one sensor on each floor. The damage on a specific floor was successfully localized. This result inspired us to develop SVM in the bridge environment.

Recently, machine learning methods have been attractively applied in bridge SHMS [30,31,32]. A few of the examples were presented in [33,34,35]. The application of artificial neural networks (ANN) on bridge temperature data was presented in [31]. Multi-linear regression is used to calculate the weight of the features. The ANN is specifically used to examine the relationship between the air temperature and the bridge temperature. The application of ANN for bridge damage detection is also presented in [32]. The ANN was used to classify two conditions i.e., healthy and damaged conditions. The study comprises three stages: (1) retrieving the original time waveform, (2) modal identification procedures, and (3) ANN classification. The features used for ANN were obtained from modal identification. Uni-axial accelerometers and multiple environmental sensors such as humidity, temperature, and wind were utilized to generate the data input for the ANN algorithm. Neves et al. [33] integrate vibration-based damage detection with machine-learning approaches. The ANN was selected in the study as a machine learning method. The vibration data was processed with a low-pass (LP) and a high-pass (HP) filter. The result of LP and HP will be used as the vibration features and therefore utilized in ANN training. The prediction target was the damage index (DI) which is adapted from the calculation of root mean square error (RMSE) and Mahalanobis distance (MD).

The application of a support vector machine (SVM) to classify and predict the rust image of the bridge is presented in [34]. The objective of the proposed method, namely support vector machine-based rust assessment (SVMRA) was to detect and quantify the rust that existed on the bridge image. This is because the existence of rust is associated with the bridge condition. Prior to the SVM image classification and prediction, the input images were processed with the Fourier transform and low-pass filter. The SVMRA method was also compared to the simplified K-means algorithm (SKMA) and adaptive neuro-fuzzy inference system (ANFIS). The result shows that the SVMRA outperformed the other two comparable methods.

The combination of the SVM method with the genetic algorithm (GA) for damage detection of the bridge is presented in [35]. As it is known that the SVM method needs the kernel parameters to perform the classification and prediction, therefore, the GA method was used in the study. The proposed method, namely the GA-SVM was compared to other methods i.e. radial basis function (RBF) and back propagation neural networks optimized by GA so-called GA-BP. The input variables of SVM are the mode shape ratio and frequency rate which were obtained from numerical study. The result shows that the GA-SVM produced a smaller maximal relative error compared to RBF and GA-BP and therefore it is superior to the other two comparable methods. Other recent machine learning applications for bridge condition detection and prediction were presented in [36, 37].

According to the brief literature study above, machine learning methods have attracted researchers in bridge condition monitoring and damage detection. Machine learning methods have been applied to the condition monitoring data including rust, temperature, humidity, modal analysis, and acceleration. In bridge health monitoring, the vibration analysis of the bridge is one of the main factors in bridge damage detection. In the last decades, the application of machine learning to bridge vibration has increased gradually and potentially be applied to improve the existing and traditional methods. However, due to the condition of the bridge during the data experiment, a safer and more reliable data collection wireless sensor network (WSN) is necessary [38]. A review study of machine learning algorithms for wireless sensor networks is presented in [39]. The WSN for acoustic data and AI is presented in [38]. The application of machine learning for wireless sensor networks (WSN) is presented in [39]. The advantages and disadvantages of each machine learning algorithms that was used in the WSNs are evaluated based on the case studies.

The present study combines the application of machine learning methods for vibration data or acceleration data acquired using a wireless sensor network. This research area is still developing as only limited literature found in recent years that combine the application of WSN and machine learning methods for the application of bridge SHMS.

Methods

This section describes the proposed a WSN architecture and classification algorithm for damage detection and localization. The overall system is illustrated in Fig. 1. There are three sub-systems used in the experiment: (1) sensor nodes, (2) sink nodes, and (3) base station. Sensor nodes is the step where the accelerometer sensors are deployed. The task of this nodes are to collect and to send the acceleration data of the bridge’s vibration from the bridges to the sink nodes. Sink nodes are responsible for processing the acceleration data transmitted from sensor nodes using FFT, and then transmitting them to the base station. The process in the sink nodes is described by algorithm 1 presented in Fig. 2a. A base station is a single-board computer that receives data from sink nodes and treats them as a data set. Data from sink nodes are consolidated for a further process called feature extraction that will be used in based station. In the next step, the features of the bridge condition is then classified using two machine learning methods called The Multilayer Perceptron (MLP) and Support Vector Machine (SVM) as presented in Fig. 2b. The input data for machine learning includes three fundamental frequencies and their corresponding amplitudes that have been calculated when vibration acceleration data are received from sink nodes.

Fig. 1
figure 1

Wireless sensor network architecture

Fig. 2
figure 2

(a) Pseudo-code; (b) The alternative processes that will be executed in the base station

There are several methods for performing damage detection, such as Non-Destructive Testing (NDT) methods, vibration-based damage detection methods, and consideration of uncertainties [40]. The focus of this paper is on the use of a damage detection method called vibration-based damage detection methods that identifies damage through the changes in vibration patterns. This method has been developed on the general premise of measuring the vibration quantities, such as response time history and global vibration characteristics. The measurement parameters include the physical properties of the structure (mass, attenuation, boundary conditions, and stiffness) and the frequency change after a time period. The electrical impedance measurement of the piezoelectric-based Electromechanical Impedance (EMI) method is proposed for structural damage detection [41] comparing between transient-state measurements and steady-state measurements. However, this method is not practical due to its installation inside the structure.

Damage detection methods are used for detecting damage to structures that consist of time domain-based (time domain analysis) and frequency domain-based (frequency domain analysis). In the time domain, time series data are processed to extract modal parameters. Common techniques used in time domain analysis are auto-regressive moving average, Ibrahim time domain method, data-driven subspace identification, and covariance matrix [42]. In frequency domain analysis, the time series data are transformed to the frequency domain by using the FFT or Wavelet Transform (WT). Common techniques used in frequency domain analysis are peak picking, complex mode identification function, rational fraction polynomial, or Hilbert-Huang transform-based [42]. This paper focuses on the frequency domain analysis through FFT and peak picking [43].

Multilayer Perceptron (MLP)

Multilayer perceptron (MLP) is a common network architecture for the Artificial Neural Network (ANN). MLP is widely used in classification and regression processes due to its accuracy in making predictions. MLP has parametric properties that form a model in terms of weights and biases. The MLP structure consists of an input layer, a hidden layer, and an output layer. This work examines the MLP method with Adam’s optimization functions and gradient descent. Adam optimization provides faster training speed. However, the solution is not always better than gradient descent [44]. Gradient descent is a famous method in terms of artificial neural network optimization although in practice it is a slow process. A new sequence dt, known as momentum, is added to the gradient descent to improve process speed, especially in the training process [45].

MLP is a supervised ML to solve non-linear separable problems consisting of input, hidden, and output layers. The hidden layer will process the input, in the form of numerical data, by determining the strength of each input and adding a bias. A similar process will be undertaken by the output layers acting as the final score which is not limited by only a single value. To achieve the nonlinearity in the model, activation functions are used such as ReLU [46] that take only the positive incoming signal.

Each neuron k at layer l for the input x can be derived using Eq. (1). The weight vector learned at each mini-batch is denoted as W while the bias for each neuron is denoted as b. Each input value will be passed to the non-linear activation function denoted as g, which is in our case, the ReLU activation function.

$$h_{k}^{l} (x) = g(h^{(l - 1)} (x)W_{k}^{l} + b),$$
(1)

The training process will be undertaken by using an optimization technique called gradient descent [47] which processes the score from the loss function. The learning mechanism for parameter w is based on the gradient of the loss function L that is shown in Eq. (2). The time for updating the parameter is denoted by t while the learning rate that controls the influence from the gradient is denoted by α. The biased learning also proceeds with a similar process by taking the gradient from the loss function L.

$$w^{t} = w^{t - 1} - \alpha . \frac{{\partial L^{t - 1} }}{{\partial w^{t - 1} }},$$
(2)

In this study, an MLP algorithm using Adam and stochastic gradient descent (SGD) optimizer is used. These optimizers will be examined to determine the best one for MLP prediction. The total input data for the MLP method was 180 datasets from four classes. Each class contributes 45 datasets. The total datasets were then divided into 75% (135 datasets) for training and 25% (45 datasets) for testing.

The first design of MLP implements Adam optimizer. The hyperparameter is calculated initially to obtain the best model. The parameter consists of a learning rate of 0.001, an activation function used for hidden layers called ReLu, an activation function used for output layers called softmax, and a loss function called binary cross-entropy. After calibration and process validation, the best model is obtained. The architecture of MLP consists of five layers. The five layers are the input layer with 4 nodes, the first hidden layer with 128 nodes, the second hidden layer with 64 nodes, the third hidden layer with 32 nodes, and the output layer with 4 nodes is the best one. Node and layer quantity are obtained through systematic trials starting from relatively small numbers of layers and nodes until the best model for the data set is obtained [48]. After obtaining the best structure model from the training process along with the optimal hyperparameter setting, the next step is the MLP algorithm test using the Adam optimizer to obtain a prediction with the highest accuracy.

The second design of the MLP algorithm implements the SGD optimizer. The hyperparameter consists of a learning rate of 0.1, a momentum value of 0.9, an activation function for hidden layers called ReLu, an activation function for output layers called softmax, and a loss function called binary cross-entropy. After calibration and validation, the best model is obtained which consists of 4 layers containing (1) the input layer with 4 nodes; (2) the first hidden layer with 128 nodes; (3) the second hidden layer with 64 nodes; and (4) the output layer with 4 nodes. The next step is the MLP algorithm test using SGD optimizer to obtain a prediction result with the highest accuracy.

Support Vector Machine (SVM)

SVM is an alternative technique for classification and regression. This technique finds the optimal classifier function that separates two data sets from two different classes [48]. SVM was developed to solve classification problems due to its capability to generalize data [49]. The SVM method works based on the hyperplane to differentiate the classes [50]. The hyperplane is calculated using the kernel function. The kernel function is used to construct linear through non-linear transformation or mapping to determine the best class for the output target. This algorithm applies that the non-linearly input vector mapped to a high-dimensional feature space. For example, the input data is \({{\text{x}}}_{{\text{i}}} \left(i=\mathrm{1,2},\dots ,M\right)M\) is the number of samples or input features. If there are two classes, namely the positive and the negative class, they are defined by \({y}_{i}=1\) the positive one, and \({y}_{i}=-1\) for another class. The hyperplane function of \(f\left(x\right)=0\) separating the input data can be calculated from (3).

$$f\left( x \right) = {\text{w}}^{{\text{T}}} {\text{x}} + b = { }\mathop \sum \limits_{i = 1}^{M} w_{i} x_{i} + b = 0$$
(3)

Dimensional –\(M\), vector \(w,\) and scalar \(b\) are used to determine the position of the separating hyperplane. Identifying both classes can be done by the decision function or the sign \(f(x)\). The constraint for separating the hyperplane is calculated using (4).

$$y_{i} { }f\left( {x_{i} } \right) = { }y_{i} \left( {{\text{w}}^{{\text{T}}} x_{i} + b} \right) \ge 1\quad {\text{for}}\quad i = 1,2, \ldots ,M$$
(4)

The hyperplane separation will be obvious if the distance between the plane and the closest data is maximum.

In the SVM, two kernel functions are used the linear kernel and the Radial Basis Function (RBF). The linear kernel is the simplest kernel function that is used when the analyzed data are linearly separated.

The RBF is a kernel function commonly used in analysis when the data are not linearly separated. The RBF kernel has two parameters called Gamma and Cost. The Cost parameter is a parameter in SVM optimization that avoids misclassification of each sample in data set training. While the Gamma parameter determines how far the distance between one sample training data set is with a low value (“far”) and a high value (“close”). With a low gamma, the points that are far from a reasonable separating line will be considered for the separating line. When the gamma is high, the points around a reasonable line are considered for the separating line [51].

In this study, the bridge damage classification implements three different feature extraction methods: i.e. (1) Features based on the first three fundamental frequencies with the highest amplitudes; (2) Features based on amplitude patterns of the FFT result in which the features are selected by finding locations having different patterns; and (3) Features from the combination of the first and the second feature categories. These all features are selected to detect and localize damage on the bridge. The SVM algorithm modeling and testing using linear and RBF kernels are also proposed. Both kernels are tested to find the best result. Here, 180 test data from 4 classes (45 data from each class) are used. Training data uses 75% of total data (135 data) and testing data uses 25% (45 data).

The first SVM algorithm uses a linear kernel function. It implements C parameter optimization or is called cost function. The C parameter optimization is conducted via trial and error [52]. From the C parameter, which will be used for the prediction process, a C value of 1 (one) is obtained. The next step is making a prediction using specified features. The second SVM algorithm uses RBF kernel, which utilizes Cost parameter (C) and gamma (γ) optimization. C and γ are calculated using the same process as the linear kernel function. The trial-and-error method is conducted to determine the best parameter of the RBF kernel. In this work, a C value of 1 (one) and γ value of 1 (one) are obtained. The next step is making a prediction in which magnitude, frequency, and the combination of magnitude and frequency are its features.

Experimental Setup

Test-Bed Bridge Model

In this study, a laboratory-scaled test-bed bridge is constructed. A Single Degree of Freedom (SDOF) bridge model with a scale of 1:20 is used in the experiment. The bridge is designed with an identical behavior to its real bridge (full-scale bridge). The test-bed bridge is 5 m in total length (2 m bridge length with 3 m extension road) and 0.6 m in width as presented in Fig. 3. The test-bed bridge is designed to simulate bridge damage conditions in different areas. In this study, a miniature remote control (RC) truck, with a scale of 1:14, is utilized for simulation. This miniature truck passes over the bridge with different load configurations (eight packets of load, one kg each).

Fig. 3
figure 3

(a) Lab experiment shows a test-bed bridge; (b) miniature of truck RC; and (c) loads of the miniature truck

All wireless sensor nodes use Java Virtual Machine, and the proposed algorithm is written in Java and run on Java program environment. Wireless sensor nodes consist of a 3-axis accelerometer sensor, temperature sensor, light sensor, eight colorful LEDs, two switches, five digital I/O pins, six analog inputs, four digital outputs, and a rechargeable lithium battery. The hardware specification of wireless sensor nodes is ARM920T with a 4 MB flash memory, 512 KB RAM, and a 2.4 GHz IEEE 802.15.4 radio transceiver. Eight sensor nodes are used and installed on the test-bed bridge where their placement is illustrated in Fig. 4.

Fig. 4
figure 4

Wireless sensor nodes placement (a) schematic diagram (b) photograph at one side of the bridge

The bridge damage data are divided into three areas according to the bridge damage scenario as presented in Fig. 4. The bridge has three different spring locations, called spring 1, spring 2, and spring 3. These springs are adjusted to simulate bridge damage scenarios. These three areas of bridge damage locations are used later as the bridge damage locations classification. The bridge damage scenarios are adjusted according to the number of springs on the bridge. The damage variation scenario settings are shown in Table 1.

Table 1 Damage variation on the test-bed bridge

There are checkmarks (✓)to indicate that the long drat is installed, while the cross marks (✗) indicate that the long drat is removed. When bridge area 1 is set as the damaged area, spring 1 is removed and springs 2 and 3 are still installed. Then, areas 2 and 3 are set as damaged areas respectively. An example of the damage condition in area 3 is presented in Fig. 5.

Fig. 5
figure 5

The long-drat setting for damaged area 3

Experimental Results

Data collection was carried out at each different damage location. There are two bridge conditions when data is collected. The first data is collected from the undamaged bridge when it is traversed by a miniature truck with three different load configurations, empty load, half load (4 kg), and full load (8 kg). The second data is gathered from three bridge damage conditions in different locations: Damage Area 1, Damage Area 2, and Damage Area 3. The second data is also collected when the miniature truck passes through the test-bed bridge with the same load configurations.

The Vibration Data Acquisition

The bridge vibration data are acquired when the bridge is in normal and damaged conditions with three load configurations i.e. (1) an empty load, (2) a half load, and (3) a full load. Bridge vibration data are collected by eight wireless sensor nodes deployed on the test-bed bridge. The examples of bridge vibration data with three different load configurations are presented in Figs. 6 and 7 for sensor node 3 in area 1; Figs. 8 and 9 for sensor node 5 in area 2; and Figs. 10 and 11 for sensor node 7 in area 3.

Fig. 6
figure 6

The example of bridge vibration data on area 1 normal condition 1 from sensor 3 when the bridge is passed by a truck with (a) an empty load; (b) a half load; and (c) a full load

Fig. 7
figure 7

The example of bridge vibration data on area 1 damage condition from sensor 3 when the bridge is passed by a truck with (a) an empty load; (b) a half load; and (c) a full load

Fig. 8
figure 8

The example of bridge vibration data on area 2 normal condition from sensor 5 when the bridge is passed by a truck with (a) an empty load; (b) a half load; and (c) a full load

Fig. 9
figure 9

The example of bridge vibration data on area 2 damage condition from sensor 5 when the bridge is passed by a truck with (a) an empty load; (b) a half load; and (c) a full load

Fig. 10
figure 10

The example of bridge vibration data on area 3 normal condition from sensor 7 when the bridge is passed by a truck with (a) an empty load, (b) a half load; and (c) a full load

Fig. 11
figure 11

The example of bridge vibration data on area 3 damage condition from sensor 7 when the bridge is passed by a truck with (a) an empty load; (b) a half load; and (c) a full load

According to Figs. 6 and 7, the vibration signal amplitude on the area 1 damage condition is higher than the vibration signal amplitude on the area 1 normal condition. The result shows that the vibration signal amplitude for an empty load (Fig. 7a), a half load (Fig. 7b), and a full load (Fig. 7c) of the area 1 damage condition is higher than the vibration signal amplitude for an empty load (Fig. 6a), a half load (Fig. 6b), and a full load (Fig. 6c) of area 1 normal condition. A similar trend can also be seen in Fig. 9 compared to Fig. 8, and Fig. 11 compared to Fig. 10.

4.2.2. FFT Analysis

The first process is vibration acceleration data collection conducted in each WSN sensor node. The total number of vibration data must follow 2n samples [53]. The vibration data was collected with a frequency sampling of 100 Hz. The frequency and magnitude data of the bridge are then transmitted to the base station that treats them as machine learning features. An example of FFT of the bridge vibration signal is presented in Figs. 12 and 13. Figure 12 shows the FFT of the vibration signal of area 3 where it is in normal condition, and Fig. 12 shows the FFT of the vibration signal of area 3 in damaged condition.

Fig. 12
figure 12

(a) The example of vibration data; and (b) FFT when area 3 is in normal condition

Fig. 13
figure 13

(a) The example of vibration data; and (b) FFT when area 3 is damaged

Machine Learning Results

Two machine learning methods i.e., MLP, and SVM are proposed in this work. Both algorithms are tested using magnitude, frequency, and combination magnitude and frequency features. The MLP prediction for these three tested features is presented in Tables 2 and 3, which show metric prediction and confusion matrix. Adam optimizer is used for damage location prediction tests with 15 times experiments. The prediction accuracy reaches 93%, 56%, and 53% when using the bridge magnitude, frequency, and the combination of magnitude and frequency features respectively.

Table 2 Adam’s prediction using magnitude, frequency, and feature combination
Table 3 Confusion matrix of Adam prediction result

SGD optimizer is used for MLP prediction as in Tables 4 and 5. Damage location detection accuracy reaches 98%, 58%, and 62% when using the bridge magnitude, frequency, and the combination magnitude and frequency feature, respectively.

Table 4 SGD using magnitude, frequency, and combined features
Table 5 Confusion matrix of SGD prediction result

The SVM algorithm with linear kernel function for bridge damage detection and localization shows the accuracy of 96%, 62%, and 64% for magnitude, frequency, and the combination of magnitude and frequency features, respectively. The predicted results are presented in Tables 6 and 7.

Table 6 Linear Kernel prediction result using magnitude, frequency, and combined features
Table 7 Confusion matrix of Linier Kernel prediction result

The proposed SVM algorithm uses RBF kernel for bridge damage detection and localization is presented in Tables 8 and 9. The accuracy of SVM with RBF kernel for bridge magnitude, frequency, and the combination of magnitude and frequency features achieved 98%, 67%, and 67% when using the bridge magnitude, respectively.

Table 8 RBF Kernel using magnitude, frequency, and combined features
Table 9 Confusion matrix of RBF Kernel prediction result

Figure 14 shows the test results of accuracy, precision, recall, and F1-score for MLP and SVM. Both MLP and SVM reach a better result when using only the magnitude feature as a machine learning features with accuracy between 94 and 97% compare to the frequency features and combined magnitude and frequency features. The principle of classification specifies that accuracy values are divided into groups such as excellent classification (from 90 to 100%), good classification (from 80 to 90%), decent classification (from 70 to 80%), poor classification (from 60 to 70%), and incorrect classification (from 50 to 60%) [54].

Fig. 14
figure 14

The average accuracy of MLP and SVM

Typically, the accuracy of the machine learning performance decrease when the length of the data input for each class is not similar. In another word, the accuracy will decrease if the training is not evenly distributed. This phenomena can be quantified by using the F1-score. The F1-score calculation is used in the present study due to the imbalance in data quantity. F1-score determines the better model in classification using imbalanced data although the model has low accuracy. Figure 15 shows the difference in precision, recall, and F1-score for each method and feature.

Fig. 15
figure 15

The average precision, recall, and f1-score value graph

Both MLP and SVM achieve excellent results when using the magnitude feature. It reaches 94 to 96% accuracy for precision, 95 to 97% for recall, and 94 to 96% for the F1-score. The frequency feature achieves an accuracy of 61% to 66% for precision, 61% to 69% for recall, and 59% to 64% for F1-score. Finally, the feature combination reaches precision, recall, and F1-score accuracy of 60% to 65%, 61% to 68%, and 58% to 64% respectively.

Discussion

The design of a bridge structural health monitoring system has been carried out by [36] who designed a bridge condition assessment system and bridge load rating based on its dynamic response using WSN. Based on the results, the bridge condition assessment was carried out using the acceleration response of the bridge in its latest condition and compared with dynamic simulations of the Finite Element Analysis (FEA) model. Acceleration data in the time domain is transformed into the frequency domain using the FFT to determine the peak amplitude and fundamental frequency of the bridge current conditions. The results show that 37% of the fundamental frequency declines during its 25-year service life. Furthermore, there is also a work conducted by [9] that developed a more intelligent bridge condition assessment system using dynamic responses with a wireless sensor network. The result shows that the system immediately calculates the health level of the bridge and displays the mode shape for the dominant natural frequencies.

In a separated study, damage detection and localization in multi-story buildings has been carried out using the Support Vector Machine (SVM) method [10]. In this study, the features of the three first natural frequencies with a single number of sensors on the building roof and building floor were utilized. This shows that the SVM method with the first 3 natural frequency features can detect and localize damage to structures.

The study presented in [10] inspired the present study to also use the fundamental frequency of the bridge vibration data. In present study, a short-span bridge that has a fundamental frequency value between 0–10 Hz was observed. The level of damage and location of damage will have unique characteristics which can be discovered further with a machine learning approach. In this work, cluster-based WSNs complemented with frequency analysis and machine learning method is proposed. Sensor nodes are grouped into clusters and each cluster has a cluster-head node. In a cluster, all nodes can only communicate with the cluster node. A cluster node can communicate with all nodes in its cluster and other cluster heads. Clustering increases scalability, simplifies routing, extends network lifetime, and saves bandwidth.

In-network data processing is an important consideration in WSN for SHMS. There are three data processing systems can be used in WSN for SHMS i.e., (1) centralized processing, (2) local processing, and (3) cluster-based processing. In centralized data processing, data is transmitted from the sensor node to a designated sink node. The sink node processes the data and calculates the health level of the bridge structure. In local processing, data is processed locally and decisions about the health level of the bridge structure are made locally. The decisions are then transmitted from a sensor node to a sink node. In cluster-based processing, some processing is performed locally, further processes are at the cluster head, and decisions are made at the sink node.

The proposed method is also compared to another method presented in [2]. The authors used the Deep Neural Network (DNN) method based on time–frequency signal representation for bridge damage identification [2]. The different backbone architectures of DNN were ResNet50, DenseNet121, and MobileNet v1. Among DNN architectures used, the ResNet50 has the highest accuracy of 97.08%. This result is similar to the accuracy of the proposed method i.e. RBF combined with SVM as presented in Fig. 14. However, the proposed method has advantages in terms of the complexity of the algorithm and time computation. It is known that machine learning (e.g. SVM) has less complexity and time computation compared to DNN-based ResNet50 architecture. Another comparison is that the ML method does not require GPU to process the data and provide the classification result.

Conclusions

The improvement of network data processing in wireless sensor networks by leveraging SVM and comparing its performance with NN has been proposed. Two machine learning algorithms were examined, compared and implemented in the WSN environment for the damage detection, classification, and localization study. This study also presented the simulation of the cluster-based wireless sensor network topology that is implemented on the designed scale down bridge. In addition, some experiments were performed using programmable wireless sensor nodes.

The novelty of this work is the development of a method for bridge damage classification where SVM was used to support of the sink node capabilities of wireless sensor networks to perform bridge damage classification. The feature were processed of in-network data processing.

The results show that the proposed machine learning with magnitude feature for damage detection and localization obtains excellent accuracy, precision, recall, and f1-score. The MLP with Adam optimizer has an accuracy of 94% and with SGD optimizer achieves an accuracy of 96%. The SVM obtains an accuracy of 96% and 97% when using linear kernel and RBF kernel, respectively. It can be concluded that both kernels are excellent methods for bridge damage detection and localization.

The precision value obtained by the MLP method using the Adam optimizer is 94% and it is increased to 96% when the SGD optimizer is utilized. The SVM with linear kernel and RBF reaches 96% precision. The precision values obtained by the Adam optimizer, SGD optimizer, linear kernel, and RBF are 96%, 96%, 96%, and 97%, respectively. F1-score values for the MLP accuracy utilizing Adam and SGD optimizer are 94% and 95%, respectively. For the f1-score value of the SVM method using linear kernel and RBF kernel is 95% and 96%, respectively.

Frequency and the combination of amplitude and frequency features have relatively low accuracy from 60 to 67%, precision ranging from 60 to 66%, recall ranging from 61 to 69%, and f1-score ranging from 58 to 64%. It can be concluded that these features are not suitable for the machine learning input in detecting and localizing bridge structural damage. This condition is caused by random frequency values from every class in the normal, area 1 bridge damage, area 2 bridge damage, and area 3 bridge damage. Based on the test result, the recommended method for bridge damage detection and localization is the SVM with RBF kernel in which the amplitude is its feature.