# GNSS-Based Monitoring Methods for Mining Headframes
## 3 Monitoring Data Processing and Analysis
### Monitoring Data Cleaning  
Monitoring data cleaning includes interpolation, outlier removal, and filtering treatments, aiming to smooth the discrete point data as much as possible for subsequent modeling studies and to conduct scientific assessments of the headframe deformation. Interpolation of deformation data uses the values of known points to estimate the values of other points on the basis of [PERSON]'s hypothesis. Points closer to the estimated point contribute more, and points farther away contribute less, thus interpolating unknown points. In this study on GNSS headframe monitoring, the received signal values exhibit continuous trajectories. Cubic spline interpolation, which fits data using piecewise cubic polynomials, is chosen for its ability to accurately approximate the original data trends. This method also has a local property, meaning the interpolation results depend only on nearby data points and are not affected by distant ones. This makes it well-suited for handling local fluctuations or noise in GNSS data. Therefore, cubic spline interpolation, known for its high computational accuracy, good convergence, and smoothing effect, is adopted for interpolating data from the eight monitoring stations on the upper and lower sheaves of the headframe, which has high computational accuracy, good convergence, and a smooth effect [29]. The basic principle is to divide the known multiple data points into n intervals, construct a cubic function for each interval, and ensure smooth connection. The implementation steps are as follows. In n intervals, the cubic function for each interval is expressed as follows:  
\[S_{i}(x)=a_{i}+b_{i}(x-x_{i})+c_{i}(x-x_{i})^{2}+d_{i}(x-x_{i})^{3},i=0,1,\ldots,n-1. \tag{1}\]  
The expression for the cubic function \(S(x)\) corresponding to n intervals is expressed as follows:  
\[S(x)=\left\{ \begin{array}{rl}S_{0}(x)=a_{0}+b_{0}(x-x_{0})+c_{0}(x-x_{0})^{2} +d_{0}(x-x_{0})^{3};&\text{if }:x_{0}\leq x\leq x_{1}\\ S_{1}(x)=a_{1}+b_{1}(x-x_{1})+c_{1}(x-x_{1})^{2}+d_{1}(x-x_{1})^{3};&\text{if }:x_{1}\leq x\leq x_{2}\\ \vdots\\ S_{n-1}(x)=a_{n-1}+b_{n-1}(x-x_{n-1})+c_{n-1}(x-x_{n-1})^{2}+d_{n-1}(x-x_{n-1}) ^{3};&\text{if }:x_{n-1}\leq x\leq x_{n}\\ \\ S(x_{i})=y_{i},i=0,1,\ldots,n.\end{array} \right. \tag{2}\]  
In the formula, \(S(x)\) is a cubic spline function (unit: mm), and \(a,b,c\), and \(d\) are fitting coefficients. Thanks to the stability of the GNSS receivers used in this project, no data loss occurred, so the interpolation algorithm was not required. However, GNSS signal reception is highly susceptible to environmental factors, which can lead to signal loss. Therefore, this study employs cubic spline interpolation as the first step in data preprocessing to ensure the integrity of the monitoring data. Although cubic spline interpolation can smooth out noise, in practical situations, various unpredictable factors will always cause a few outliers that deviate from the normal values, requiring further cleaning of outliers in the experiment. Generalized extreme studentized deviate (GESD) is used for anomaly detection, in which a threshold factor of one is set to establish a threshold analysis system for cleaning outliers to ensure high-quality control, the missing data after cleaning are supplemented by the aforementioned cubic spline interpolation method, and Gaussian filtering is used for noise reduction of the data. GESD is a statistical method used to detect outliers in univariate datasets, particularly suitable for datasets that follow an approximate normal distribution [30]. The calculation formula R for the test statistic of GESD is as follows:  
\[R=\frac{\max_{1\leq i\leq k}\lvert x_{i}-\overline{x}\rvert}{s} \tag{4}\]  
where s the i-th observation value, is the sample mean, is the sample standard deviation, and is the sample size.