# Cloud-Based Internet-of-Things System for Long-Term Bridge Bearing Monitoring Using Computer Vision
## 3 Experimental Validation
### Data Analysis
#### 3.3.2 Anomaly Detection  
The static response of the bearing is influenced by environmental and operational conditions. To eliminate such data dependencies and focus on the desired response, GPR was employed [41]. GPR is used to model dependencies, such as temperature, and to minimize noise in the data prior to evaluation to identify anomalous behavior. GPR can handle multi-dimensional inputs, account for noise, map nonlinear features into linear data in higher-dimensional spaces, and provide confidence intervals for predictions, aiding in the analysing of behavior. The GPR model was constructed using 9 months of measured 3D displacement and temperature data. In this study, approximately 1500 data samples were collected from a real structure over nine months, allowing for both seasonal and random variations to be captured. Although different training ratios could have been considered, 50% of the data were selected for training the GPR model. This proportion was found to enable effective learning from a diverse set of conditions while minimizing the risk of overfitting. When a higher percentage was used for training, it was observed in preliminary tests that the model became overly fit to these long-term trends and performed less reliably on new data. Conversely, the use of fewer than 50% of the samples for training reduced the model's ability to capture the full range of seasonal and random behaviors. Thus, a 50% training ratio was judged to provide a balanced approach, ensuring robust anomaly detection without compromising generalization. The input variable is set as temperature, while the independent variables are defined as three-axis displacement data. To handle multidimensional input data in the future, the automatic relevance determination (ARD) squared exponential kernel is selected. For outlier detection, the statistical process control (SPC) method is adopted [42]. The SPC method is used to monitor abnormalities in a process by comparing the baseline statistical characteristics and variations in the data. Specifically, the moving range (MR) chart, which represents the mean and moving range, is utilized. The MR chart helps detect abnormal patterns between temperature and 3D displacement by identifying changes in the mean and variance of the residual data. The sample \(\varepsilon\), evaluated for statistical control, represents the difference between the measured and predicted values. This sample is standardized to have a mean of 0 and a variance of 1 to eliminate differences in the data scale. \(\varepsilon\) which is  
Figure 11: Comparison with temperature results: (**a**) \(x\)-axis displacement vs. temperature; (**b**) \(y\)-axis displacement vs. temperature; (**c**) \(z\)-axis displacement vs. temperature. the difference between the observed and predicted values and the MR described earlier is calculated as follows:  
\[ \begin{array}{l}\varepsilon_{i}=\mathrm{Y}_{i}-\hat{\mathrm{Y}}_{i}\\ MR_{i}=|\varepsilon_{i}-\varepsilon_{i+1}|\end{array}  \tag{9}\]  
where \(i\) is the sample index, \(\mathrm{Y}\) is the observed data, and \(\hat{\mathrm{Y}}\) is the GPR predicted data that consider the effect of the input variable. The MR value of two consecutive sample observations (\(n=2\)) is frequently used as a measure of variability in control charts [43]. Control charts for residual and MR are established based on the mean value, the upper control limit (UCL), the lower control limit (LCL), and the standard \(\pm 3\sigma\) range. The parameters of the control chart are defined as follows:  
\[ \begin{array}{l}\mathrm{UCL}=\overline{\varepsilon}+3\frac{\overline{\mathrm{ MR}}}{d_{2}}\\ \mathrm{LCL}=\overline{\varepsilon}-3\frac{\overline{\mathrm{MR}}}{d_{2}} \end{array}  \tag{10}\]  
where \(\overline{\varepsilon}\) is the mean value of the residuals, and \(\overline{\mathrm{MR}}\) is the mean of the MR values. The parameters of the MR control chart are defined as follows:  
\[ \begin{array}{l}\mathrm{UCL}=D_{4}\cdot\overline{\mathrm{MR}}\\ \mathrm{LCL}=D_{3}\cdot\overline{\mathrm{MR}}\end{array}