## 2 Materials and Methods
### Tunnel Point Cloud Displacement Detection
#### 2.3.1 Point Cloud Alignment Using the ICP Approach  
Aligning the tunnel point cloud dataset after denoising allowed displacement monitoring by comparing the two point clouds from different periods saved into LAS format. This process was executed in Python 11.0 programming using a Jupyter editor in the virtual environment. The datasets consist of 3D coordinates \((x,y,z)\) that define the surface of the tunnel. The ICP algorithm was used to align the source dataset, \(P_{0}\), first to the tunnel design dataset and then to the target dataset, \(P_{i}\), using the superposition technique. The algorithm iteratively minimizes the distance between corresponding points in the two datasets by applying a transformation (rotation and translation). This transformation aligns the source points to the target points. The process continues until convergence, defined by the tolerance threshold for the mean square error between iterations. The datasets \(P_{0}\) and \(P_{i}\) are represented as collections of 3D points: \(P_{0}=\{(x_{1},y_{1},z_{1}),\ldots,\)\((x_{n},y_{n},z_{n})\}\), \(P_{i}=\{(x_{1}\text{'},y_{1}\text{'},z_{1}\text{'}),\ldots,(x_{n}\text{'},y_{n} \text{'},z_{n}\text{'})\}\). Here, each point in \(P_{0}\) and \(P_{i}\) represents the coordinates of the tunnel surface in 3D space. A rough alignment is performed between \(P_{0}\) and \(P_{i}\). This helps bring the measured data close to the tunnel design model. The ICP algorithm works by iteratively transforming \(P_{0}\) to minimize the distance to \(P_{i}\). Based on the matched pairs of points \(p_{0}\in P_{0}\) and \(p_{i}\in P_{i}\), the optimal transformation is estimated by minimizing the total distance between the corresponding points. The standard literature [13; 36] provides a more detailed description of the mathematical representation of the ICP. Equation (4) defines the transformation of a point \(p_{0}\) from \(P_{0}\). Each point is rotated by the rotation matrix, \(R\), and translated by the translation vector, \(t\), resulting in the transformed point, \(p_{i}^{n}\). \[p_{i}^{n}=Rp_{0}+t \tag{4}\]  
Equation (5) represents the objective function to minimize the sum of squared distances between the transformed points, \(p_{i}^{n}\), and their corresponding points, \(p_{i}\) in \(P_{i}\). \[\sum_{i=1}^{N}\left\|Rp_{0}+t-p_{i}\right\|^{2} \tag{5}\]  
This minimization process finds the optimal rotation, \(R\), and translation, \(t\), that best align the two datasets. After computing the transformation, \(P_{0}\) is transformed closer to \(P_{i}\), continuing until the algorithm converges and the successive transformations become sufficiently small or fall below a predefined threshold. The difference in the mean square error between successive iterations measures convergence. Once the algorithm converges, the final transformation (\(R\),\(t\)) represents the optimal alignment of \(P_{0}\) to \(P_{i}\). The aligned point clouds are then used to measure tunnel cross-section and shield ring displacement. The ICP algorithm is central to the alignment of tunnel point clouds from different epochs, enabling accurate detection of deformations [37]. The algorithm iteratively minimizes the distance between corresponding points by estimating the optimal rotation and translation parameters. This process involves both rough and fine alignment steps. The rough alignment reduces initial misalignment, while the fine alignment ensures a high level of accuracy in aligning the point cloud with the reference, as illustrated in Figure 3.  
To address positional variance in nearby areas, the algorithm evaluates residual errors after each iteration, providing a quantitative measure of alignment accuracy and identifying potential outliers caused by noise or misalignment. This approach is particularly effective for deformation monitoring, where precise alignment is essential for detecting deviations and shifts in tunnel structures over time. By avera  
Figure 3: Example of two shield ring point clouds covering the same region. (**a**) Before alignment.