# New Quality Control Algorithm Based on GNSS Sensing Data for a Bridge Health Monitoring System
## 2 Quality Control Algorithm and Quality Measures
### Least Squares Estimation and Outliers  
For detecting and eliminating outliers, a quality control algorithm, specifically, the Detection, Identification and Adaptation (DIA) technique, was deployed in this investigation. [PERSON] at Delft University systemized DIA [2; 3]. The definitions or concepts of statistics terms used in this study follow the theory of [PERSON], who first proposed this algorithm [4]. Prior to the description of the DIA technique, the relationship between the least squares estimation and outliers is briefly examined. The linearized Gauss-Markov model using dual frequency data can be expressed as follows:  
\[L\,=\,Ax\,+\,v \tag{1}\]  
The adjusted unknown parameters (\(\hat{x}\)) are obtained through least squares estimation as follows:  
\[\hat{x}=(A^{T}PA)^{-1}A^{T}Pl \tag{2}\]  
where \(A\) denotes the design matrix, \(P\) represents the weight matrix, and \(L\) is the measurement matrix, and \(v\) is the residual, and:  
\[C_{x}=\sigma^{2}(A^{T}PA)^{-1}=(A^{T}C_{l}^{-1}A)^{-1} \tag{3}\]  
where \(C_{x}\) is the covariance matrix of unknown parameters. From this, the residuals are estimated as:  
\[v=A\hat{x}+l\,with\,P=\sigma_{0}^{2}C_{l}^{-1} \tag{4}\]  
\[\hat{v}=(I-A(A^{T}PA)^{-1}A^{T}P)=J\cdot l \tag{5}\]\[J=I-A(A^{T}PA)^{-1}A^{T}P \tag{6}\]  
The covariance matrix of residuals \(C_{\texttt{P}}\) is singular:  
\[C_{\texttt{P}}=\sigma_{0}^{2}(P^{-1}-A(A^{T}PA)^{-1}A^{T})=\sigma_{0}^{2}\cdot J \cdot P^{-1} \tag{7}\]  
From Equation (7), the adjusted parameter can be derived:  
\[C_{\texttt{f}}=\sigma_{0}^{2}(A(A^{T}PA)^{-1}A^{T}) \tag{8}\]  
From Equations (7) and (8), \(C_{\texttt{P}}\) is rearranged:  
\[C_{\texttt{P}}=C_{\texttt{f}}-C_{\texttt{f}} \tag{9}\]  
Equation (6) is then rearranged:  
\[J=\frac{1}{\sigma_{0}^{2}}C_{\texttt{P}}P=Q_{\texttt{P}}P \tag{10}\]  
where \(C_{\texttt{P}}\) is the covariance matrix of covariance. Thus, the posteriori variance is:  
\[\hat{x}=(A^{T}PA)^{-1}A^{T}Pl \tag{2}\]0  
where v is the vector of n residuals, and m is the number of unknown parameters. At this point, an explanation regarding Equation (9) is warranted. Matrix \(C_{\texttt{f}}\) has only diagonal elements, which means that measurements are uncorrelated but residuals are correlated. In other words, a variation of one measurement affects only one unknown parameter and the corresponding residual. At this stage, the relationship between residuals and outliers is required for further consideration. First, true error \(\varepsilon\) and residual v can be defined as:  
\[\hat{x}=(A^{T}PA)^{-1}A^{T}Pl \tag{2}\]1  
where it is assumed that each measurement true error \(\varepsilon_{i}\) consists of one random error. \(\varepsilon_{r_{i}}\) and one outlier, \(\
abla l_{i}\):  
\[\hat{x}=(A^{T}PA)^{-1}A^{T}Pl \tag{2}\]2  
\[\hat{x}=(A^{T}PA)^{-1}A^{T}Pl \tag{2}\]3  
where:  
\(v_{r}=Q_{\texttt{P}}P\varepsilon_{r}\) is only influenced by the random error of residuals, and  
\(\
abla v=Q_{\texttt{P}}P\
abla l\) is affected by outliers of residuals. Through this expression, it can be argued that residuals can affect the random error and outlier. The least squares estimation cannot distinguish either of them. Consequently, after conducting the adjustment process, outlier detection is very difficult to perform through the evaluation of the residuals. The stochastic model used for the least squares process is simple; only the variation of estimated coordinates is attained through the model [5]. If the covariance matrix can be obtained from the residuals, it can then be inverted; accordingly, the observational error can be directly calculated. Unfortunately, the J matrix is singular; therefore, the most realistic way to detect the presence of outliers is to test derived quantities, which are functions of them. Details are introduced in the following sub-sections. The main point is that the residuals do not reflect the quality of the measurements; they are not consistently good indicators of outliers. To address this problem, the commonly used DIA technique is applied.