Deformation Detection Method of Mine Tunnel Based on Mobile Detection System

Subway structure safety detection is an important method to ensure the safe operation of trains. Efficient, high-precision, and automatic tunnel clearance detection is the key to ensure safe operations. This study introduces a mobile tunnel scanning system that integrates a scanner, an inertial measurement unit (IMU), and a rail car. Global Navigation Satellite System (GNSS) time and system hardware calibration are used to synchronize time and space information of the system; the attitude and speed are corrected using the control points from the tunnel to improve the accuracy of absolute positioning. The section coordinate system is converted using the control points and system calibration parameters to complete the tunnel clearance inspection, and the distance between the nearest point of the section and the clear height of the vault is given. Taking Fengxi Road’s Bashan tunnel section of Chongqing Metro Line 5 as an example, the overall system accuracy was tested. The accuracy of chord line measurements was within 1 mm, the internal coincidence accuracy of repeated measurements of the vault clear height was 1.1 mm, the internal coincidence accuracy of repeated measurements of the closest gauge point was 4.8 mm, and the system calibration accuracy was approximately 2 mm. Compared with the existing scheme, the system combines absolute measurement and relative measurement mode to judge the structural safety of tunnel section from multiple angles, high precision, and high efficiency.


Introduction
China has undergone rapid development in urban rail transit; in 1965, the first subway was built in Beijing and, by the end of 2019, the nation's urban rail transit lines reached 6736.2 km, including 5180.6 km of metro lines (76.9%). In 2019, the length of newly added operation lines was 974.8 km, with a total daily passenger traffic volume of 66.371 million persons; the average daily passenger traffic volume of Beijing and Shanghai numbered more than 10 million persons. However, according to incomplete statistics, 1416 delay events of 5 min or more occurred in 2019 [1]. Because of the influences of geology, stress, and groundwater changes, internal deformation will inevitably occur in tunnels at different degrees. Therefore, to ensure normal subway operations and ensure the safety of people's lives and property, it is especially important to monitor the deformation of the lining ring in a tunnel. Tunnel clearance detection is a part of tunnel deformation monitoring. To ensure that the pipeline and other accessories in a tunnel do not intrude the vehicle gauge, the normal operation of vehicles can be judged for being disturbed or damaged by the positional relationship between the gauge and objects, such as pipeline equipment in the tunnel. the accuracy of tunnel structure data cannot be guaranteed and the lack of light in tunnels will also have a certain impact on data acquisition.
In the above research on tunnel clearance detection methods, owing to the low detection efficiency of total stations and other equipment, the postprocessing workflows of station scanner data are excessively complex. However, the working mode, software, and hardware cost of the tunnel detection system developed by Amberg company and Leica company, as well as its applicability to the Chinese market, must be improved. There is a lack of relevant research on tunnel deformation detection using the mining method. Therefore, an efficient, high-precision, cost-effective tunnel detection system is increasingly necessary. This study introduces a tunnel detection system that focuses on the detection of tunnel section deformation using the mining method. The system integrates a laser scanner, inertial measurement unit, and GNSS antenna, and is mounted on a rail car that can travel at a uniform speed. Outdoors, the GNSS time received by GNSS antenna is synchronized with the time system of the scanner and IMU through a Pulse Per Second (PPS) signal. Combined with setting control points, the system attitude angle and car speed are calibrated. Through the control points and system calibration parameters to calculate the track center, the point cloud data and inertial navigation data are combined to calculate the tunnel clearance to determine whether there is deformation inside the tunnel.

Materials and Methods-Design and Implementation of Tunnel Mobile Scanning System
This study introduces a type of tunnel moving scanning system that can be applied to shield tunnel and mine tunnel clearance convergence detections.

Hardware Integration and System Synchronization
The tunnel mobile scanning system is mainly composed of Leica scanner P16, the NovAtel inertial navigation system, a rail car, notebook computer, and other parts. The Leica P16 scanner has a range accuracy of 1.2 mm + 10 parts per million (ppm), an angle accuracy of 8 ", and a field-of-view angle of 360 • in the horizontal direction and 290 • in the vertical direction. The scanning mode adopts cross-section scanning. The SPAN-FSAS inertial navigation system mainly includes a GNSS antenna, a NovAtel receiver card, and an inertial measurement unit and battery. The inertial measurement unit adopts a closed-loop fiber optic gyroscope with an acquisition frequency of 200 Hz. The rail car contains an electric motor and odometer that can run constantly on the track at five different speeds: 0.05 m/s, 0.20 m/s, 0.5 m/s, 1.0 m/s and 1.5 m/s. The system synchronization mainly includes time synchronization and space synchronization. To ensure that the scanner and IMU in the system are consistent in the time system, the scanner, IMU, and rail car are consistent in the space coordinate system. Therefore, it is necessary to unify the time and space coordinate system of each sensor in the system.
In terms of time synchronization, the system unifies the time of scanner and IMU through the satellite signal received by GNSS. As shown in Figure 1, with the propak-v3 receiver as the center, the GNSS antenna transmits the received satellite ephemeris data and original observation data to the receiver in real time through the GNSS port, and SPAN-FSAS transmits the original observation data of inertial navigation system to the receiver in real time through the Component Object Model three (COM3); concurrently, the receiver transmits time synchronization information to the scanner and IMU through the COM2 and COM3 ports; the input/output (I/O) port is responsible for sending the PPS signal to IMU and the scanner to determine the accurate time, and then the receiver transmits the time stamp of this accurate time to IMU and scanner through COM2 and COM3 at a frequency of 1 Hz. Finally, the receiver transmits the satellite original observation data and IMU original observation data to the computer through the COM1 port.
In space synchronization, this study used the method of system calibration to unify the spatial coordinate system. By calibrating the scanner, the scanner coordinate system and the vehicle body coordinate system are unified; by calibrating the inertial navigation system, the vehicle body coordinate system is unified with both the rail surface coordinate system and the IMU coordinate system. The system uses a constant-speed rail car, calculates the mileage through the car speed, and can directly generate three-dimensional relative point cloud without a scanner calibration and inertial navigation calibration.

System Calibration
In the actual measurement, to reduce the error caused by multi-sensor fusion, scanner calibration, inertial navigation calibration, and rail car speed calibration can be performed beforehand.

Scanner Calibration Principle
The scanner calibration is used to calculate the conversion parameters between the scanner coordinate system and the vehicle body coordinate system with the aid of the total station and reflector. First, four reflectors are pasted on the same section of the tunnel wall, and three reflectors are pasted on the rail car. The coordinates of the centers of the seven reflectors are measured by the total station, and the scanner begins to scan the tunnel.
In the calculation of calibration parameters, we defined the vehicle coordinate system (VC), scanner coordinate system (LC), and total station coordinate system (TC). First, the conversion parameters between the TC and the LC were calculated through the four reflector center points on the tunnel wall [35]. Second, the conversion parameters between TC and VC were calculated through three common points on the vehicle body. Finally, the conversion parameters between the LC and VC were obtained through two translations and rotations. Subsequently, the point cloud in LC was converted to VC.

Static Calibration of IMU Attitude Angle
In this subsection, we define the inertial navigation coordinate system as IC. As shown in Figure  2, owing to the influence of the actual installation error, the IC and VC cannot completely coincide, so the attitude angle of IMU must be calibrated statically.

System Calibration
In the actual measurement, to reduce the error caused by multi-sensor fusion, scanner calibration, inertial navigation calibration, and rail car speed calibration can be performed beforehand.

Scanner Calibration Principle
The scanner calibration is used to calculate the conversion parameters between the scanner coordinate system and the vehicle body coordinate system with the aid of the total station and reflector. First, four reflectors are pasted on the same section of the tunnel wall, and three reflectors are pasted on the rail car. The coordinates of the centers of the seven reflectors are measured by the total station, and the scanner begins to scan the tunnel.
In the calculation of calibration parameters, we defined the vehicle coordinate system (VC), scanner coordinate system (LC), and total station coordinate system (TC). First, the conversion parameters between the TC and the LC were calculated through the four reflector center points on the tunnel wall [35]. Second, the conversion parameters between TC and VC were calculated through three common points on the vehicle body. Finally, the conversion parameters between the LC and VC were obtained through two translations and rotations. Subsequently, the point cloud in LC was converted to VC.

Static Calibration of IMU Attitude Angle
In this subsection, we define the inertial navigation coordinate system as IC. As shown in Figure 2, owing to the influence of the actual installation error, the IC and VC cannot completely coincide, so the attitude angle of IMU must be calibrated statically. In this study, the IMU attitude angle static calibration used the total station to measure the coordinates of tunnel engineering coordinate systems of A, B, C on the rail car body. According to Equations (1)-(3), the attitude angle of the car at that time can be obtained. Then, compared with the attitude angle observed by IMU, the difference of the three-axis attitude angle between the IC coordinate system and the VC coordinate can be obtained. The average value is taken as the final result of IMU attitude angle static calibration, so the IMU coordinate system can be placed into the VC.

Calibration of Rail Surface Inclination
In the actual tunnel environment, the plane of the rail car body cannot be completely parallel to the track surface, i.e., there is an angle between the rail surface coordinate system and the VC that causes a certain degree of system error for the later clearance detection. Therefore, the included angle should be calibrated before the actual operation.
Back-and-forth measurements are used to calibrate the inclination of the rail surface. As shown in Figures 3 and 4, α is the angle between the car body coordinate system and the rail surface coordinate system, and β is the actual inclination angle of the track. Before the actual tunnel operation, the IMU roll angle measurement is carried out every interval of a certain distance, and the car is rotated 180° to re-observe the roll angle at these five positions. Let the direct measured roll angle be = −( + ) and the reversed measured roll angle be = ( − ); subsequently, the correct inclination angle is β = ( − ) 2 ⁄ and the included angle of coordinate system is = β − . Therefore, we obtain the angle α between the car body coordinate system and the rail surface coordinate system to ensure that the point cloud under the car body coordinate system can be unified into the rail surface coordinate system.   In this study, the IMU attitude angle static calibration used the total station to measure the coordinates of tunnel engineering coordinate systems of A, B, C on the rail car body. According to Equations (1)-(3), the attitude angle of the car at that time can be obtained. Then, compared with the attitude angle observed by IMU, the difference of the three-axis attitude angle between the IC coordinate system and the VC coordinate can be obtained. The average value is taken as the final result of IMU attitude angle static calibration, so the IMU coordinate system can be placed into the VC.

Calibration of Rail Surface Inclination
In the actual tunnel environment, the plane of the rail car body cannot be completely parallel to the track surface, i.e., there is an angle between the rail surface coordinate system and the VC that causes a certain degree of system error for the later clearance detection. Therefore, the included angle should be calibrated before the actual operation.
Back-and-forth measurements are used to calibrate the inclination of the rail surface. As shown in Figures 3 and 4, α is the angle between the car body coordinate system and the rail surface coordinate system, and β is the actual inclination angle of the track. Before the actual tunnel operation, the IMU roll angle measurement is carried out every interval of a certain distance, and the car is rotated 180 • to re-observe the roll angle at these five positions. Let the direct measured roll angle be A 1 = −(α + β) and the reversed measured roll angle be A 2 = (β − α); subsequently, the correct inclination angle is β = (A 2 − A 1 )/2 and the included angle of coordinate system is α = β − A 2 . Therefore, we obtain the angle α between the car body coordinate system and the rail surface coordinate system to ensure that the point cloud under the car body coordinate system can be unified into the rail surface coordinate system. car is rotated 180° to re-observe the roll angle at these five positions. Let the direct measured roll angle be = −( + ) and the reversed measured roll angle be = ( − ); subsequently, the correct inclination angle is β = ( − ) 2 ⁄ and the included angle of coordinate system is = β − . Therefore, we obtain the angle α between the car body coordinate system and the rail surface coordinate system to ensure that the point cloud under the car body coordinate system can be unified into the rail surface coordinate system.

Speed Calibration
To reduce the impact of the accumulated error of mileage on the accuracy of point cloud fusion, it is necessary to calibrate speed. Although the rail car is driven by an electric motor at a constant speed, there is a gap between the nominal value and the real value because of the influence of nominal error and actual track conditions.
In this study, the speed calibration was divided into two parts: Field calibration and postprocessing. The field calibration was used to provide multiple calculations for the speed of the car by measuring the distance and the corresponding travel time. The average value of multiple observations is taken as the real speed value of the car to determine the speed of the rail car in the actual operation process. In the postprocessing part, the speed was corrected through the known control points in the tunnel. The specific content is described in detail in Section 4.1.

Generation Principle of 3D Relative Point Cloud
After the time synchronization between the scanner and IMU the 2D cross-section point cloud collected by the scanner, the attitude angle of IMU, and the mileage calculated by velocity and time can be fused together to generate a 3D relative point cloud with the same coordinate system. Next, we introduce the integrated navigation algorithm of the attitude angle and mileage in a 3D relative point cloud fusion.
In general, the scanner in the mobile scanner system adopts a section scanning mode, and each section point cloud is a relatively independent coordinate system. To unify the coordinate system of all section point clouds and restore the true line shape of the tunnel, we used the method of attitude angle and mileage to calculate the coordinate system transformation parameters of each section relative to the section at the starting position; this was done to convert the coordinates of the point cloud of each section to the coordinate system of the starting position section and, thus, generate the relative point cloud.
In this study, the tunnel mobile scanning system relied on GNSS time to unify the time system of inertial navigation and the scanner. To further unify the time tag of the point cloud section and IMU attitude angle, the interpolation method is usually used to calculate a continuous function according to the known discrete data and, thus, estimate the function value of other positions. The Lagrange interpolation method was used to calculate the corresponding attitude angle under the time label based on the time stamp of each section point cloud to ensure that we provided each section the attitude angle at the corresponding time.
After completing the attitude angle interpolation, we combined the scanner point cloud data, IMU attitude angle, and mileage value to generate a 3D point cloud with a relatively uniform coordinate system. First, the time of the starting section was recorded as t1 and the time of the current section was recorded as t2. The difference of heading angle, pitch angle. and roll angle between t2 and t1 was β Horizontal plane Orbit plane Vehicle plane IMU

Speed Calibration
To reduce the impact of the accumulated error of mileage on the accuracy of point cloud fusion, it is necessary to calibrate speed. Although the rail car is driven by an electric motor at a constant speed, there is a gap between the nominal value and the real value because of the influence of nominal error and actual track conditions.
In this study, the speed calibration was divided into two parts: Field calibration and postprocessing. The field calibration was used to provide multiple calculations for the speed of the car by measuring the distance and the corresponding travel time. The average value of multiple observations is taken as the real speed value of the car to determine the speed of the rail car in the actual operation process. In the postprocessing part, the speed was corrected through the known control points in the tunnel. The specific content is described in detail in Section 4.1.

Generation Principle of 3D Relative Point Cloud
After the time synchronization between the scanner and IMU the 2D cross-section point cloud collected by the scanner, the attitude angle of IMU, and the mileage calculated by velocity and time can be fused together to generate a 3D relative point cloud with the same coordinate system. Next, we introduce the integrated navigation algorithm of the attitude angle and mileage in a 3D relative point cloud fusion.
In general, the scanner in the mobile scanner system adopts a section scanning mode, and each section point cloud is a relatively independent coordinate system. To unify the coordinate system of all section point clouds and restore the true line shape of the tunnel, we used the method of attitude angle and mileage to calculate the coordinate system transformation parameters of each section relative to the section at the starting position; this was done to convert the coordinates of the point cloud of each section to the coordinate system of the starting position section and, thus, generate the relative point cloud.
In this study, the tunnel mobile scanning system relied on GNSS time to unify the time system of inertial navigation and the scanner. To further unify the time tag of the point cloud section and IMU attitude angle, the interpolation method is usually used to calculate a continuous function according to the known discrete data and, thus, estimate the function value of other positions. The Lagrange interpolation method was used to calculate the corresponding attitude angle under the time label based on the time stamp of each section point cloud to ensure that we provided each section the attitude angle at the corresponding time.
After completing the attitude angle interpolation, we combined the scanner point cloud data, IMU attitude angle, and mileage value to generate a 3D point cloud with a relatively uniform coordinate system. First, the time of the starting section was recorded as t1 and the time of the current section was recorded as t2. The difference of heading angle, pitch angle. and roll angle between t2 and t1 was calculated to ensure that each section had an attitude angle difference relative to the starting section.
Subsequently, the translation parameters of coordinate transformation were calculated according to mileage difference, heading angle difference, and pitch angle difference as shown in Figure 5. The translation matrix T t2 t1 of each section relative to the starting section can be calculated according to Equations (4)- (9).
Sensors 2020, 20, x FOR PEER REVIEW 7 of 20 According to the three attitude angle differences of each section, the rotation matrix between the current section and the starting section can be obtained by Equation (10).
Finally, according to Equation (11), each two-dimensional section was unified into the coordinate system of the starting section through translation and rotation, thus generating a 3D relative point cloud based on the starting section coordinate system. According to the three attitude angle differences of each section, the rotation matrix R t2 t1 between the current section and the starting section can be obtained by Equation (10).
Finally, according to Equation (11), each two-dimensional section was unified into the coordinate system of the starting section through translation and rotation, thus generating a 3D relative point cloud based on the starting section coordinate system.

Materials and Methods-Clearance Detection
Both in the mining method tunnel and the shield tunnel, the structural safety detection in the tunnel section has always been a considerably important problem during subway operations. This study evaluated the safety of the internal structure of the tunnel from three aspects: Chord line measurement, clearance detection, and arch crown clear height.

Chord Measurement
A line segment connecting any two points on a circle is usually called a chord. In the tunnel, because the tunnel lining is circular, we refer to the line segment formed by any two points in the tunnel section as the chord line. The chord line measurement method selects two points on both sides of the waist of the tunnel section to lay reflectors. Through the measurement and calculation of the tunnel mobile scanning system, the three-dimensional relative point cloud was obtained, the relative three-dimensional coordinates of the four reflectors were extracted, and each distance between the four points was calculated. A comparison of multi-stage, repeated detection data reflects whether the lining deformation occurred in the cross-sectional direction of the tunnel.
To evaluate accuracy, we used the total station to measure the three-dimensional coordinates of the four points in the tunnel and calculate the distance of the corresponding chord line. A comparison of the total station data was then used to determine the accuracy.

Gauge Detection
Clearance is a graph used to ensure the safe operation of subways, limit the size of vehicle sections, limit the installation size of equipment along the line, and determine the effective size of a building structure. According to different functional requirements, metro clearance is divided into vehicle clearance, equipment clearance, and construction clearance as shown in Figure 6. To evaluate accuracy, we used the total station to measure the three-dimensional coordinates of the four points in the tunnel and calculate the distance of the corresponding chord line. A comparison of the total station data was then used to determine the accuracy.

Gauge Detection
Clearance is a graph used to ensure the safe operation of subways, limit the size of vehicle sections, limit the installation size of equipment along the line, and determine the effective size of a building structure. According to different functional requirements, metro clearance is divided into vehicle clearance, equipment clearance, and construction clearance as shown in Figure 6.
The maximum dynamic envelope of the vehicle under normal operation is a straight-line section. "Normal operation" refers to the primary suspension and secondary suspension being within the normal elastic range, and the wearing of vulnerable parts is beyond the limit. The vehicle gauge of elevated or ground line is easily affected by the wind load, which must be considered in a calculation.
An equipment gauge is the dynamic envelope line when the primary suspension or secondary suspension fails during vehicle operation and is used to restrict the installation equipment from invasion.
The construction gauge is the minimum effective section after considering the installation size of equipment and pipeline based on the equipment gauge. Construction clearance does not include the measurement error, construction error, structural settlement, displacement deformation, and other factors.
In the operation phase of subway detection, mainly for vehicle clearance detection, detecting the presence of equipment or other objects in the vehicle contour line can ensure the safety of subway operations. Three types of vehicles (A, B1, B2) are defined in the metro design code. This paper considers type A vehicles as an example to explore the method of clearance detection. Figure 6. Metro vehicle gauge standard [36]. Figure 6. Metro vehicle gauge standard [36].
The maximum dynamic envelope of the vehicle under normal operation is a straight-line section. "Normal operation" refers to the primary suspension and secondary suspension being within the normal Sensors 2020, 20, 5400 9 of 20 elastic range, and the wearing of vulnerable parts is beyond the limit. The vehicle gauge of elevated or ground line is easily affected by the wind load, which must be considered in a calculation.
An equipment gauge is the dynamic envelope line when the primary suspension or secondary suspension fails during vehicle operation and is used to restrict the installation equipment from invasion.
The construction gauge is the minimum effective section after considering the installation size of equipment and pipeline based on the equipment gauge. Construction clearance does not include the measurement error, construction error, structural settlement, displacement deformation, and other factors.
In the operation phase of subway detection, mainly for vehicle clearance detection, detecting the presence of equipment or other objects in the vehicle contour line can ensure the safety of subway operations. Three types of vehicles (A, B1, B2) are defined in the metro design code. This paper considers type A vehicles as an example to explore the method of clearance detection.

Calculation of Coordinate Transformation Parameters
To convert the section and point cloud from the VC to the rail surface coordinate system as well as unify the vehicle contour coordinates and the section point cloud coordinates, it is necessary to calculate the rotation and translation parameters.
According to the static calibration of inertial navigation attitude angle in Section 2.2.2, we can obtain the difference of three attitude angles between the IMU coordinate system and vehicle body coordinate system and correct the attitude angle of IMU. According to the content of the rail surface inclination calibration mentioned in Section 2.2.3, we can obtain the included angle α between the rail car and the rail surface; α is the rotation angle between the car body coordinate system and the rail surface coordinate system of the cross-section point cloud in the two-dimensional plane, and the two-dimensional rotation matrix is calculated according to equation R = cosα sinα −sinα cosα .
To obtain the translation transformation parameters between the car body coordinate system and the rail surface coordinate system, it was necessary to determine the relative position of the track center point in the section point cloud coordinate system. However, owing to the object occlusion on both sides of the rail car, the rail data could not be collected, so we used the control point correction method to determine the coordinates of the track center point.
First, we measured the vertical distance from the origin of the vehicle coordinate system to the lowest point of the wheel of the rail car. Because the height between the origin of the vehicle coordinate system and the contact surface between the wheel and the rail is fixed, the elevation coordinate Z0 of the track center point in the vehicle coordinate system can be determined. Then, the point cloud data of the same control point are collected through round-trip observations in the tunnel. By comparing the Y value of the control point with the Y value of the reversed survey control point, the forward measurement is assumed to be Y1 and the back measurement is Y2.
The y-axis coordinate value Y0 of the orbit center point can be obtained using equation Y0 = (Y1 + Y2)/2. We, thus, determined the coordinates of the track center point in the vehicle coordinate system (Y0, Z0). The translation matrix T was determined according to equation T = −Y0 Z0 .
According to equation Point G = R·Point V + T, the section point cloud can be transformed from the vehicle coordinate system to the rail surface coordinate system, thus unifying the coordinate system of the section point cloud and the vehicle contour line.

Gauge Detection Principle
According to the method mentioned in Section 3.2.1, we converted the section point cloud to the rail surface coordinate system; according to the metro design specifications [37], the coordinates of the vehicle contour line can be obtained, and the origin of the coordinate system should coincide with the center point of the track. Thus, the vehicle contour in the same two-dimensional coordinate system and the tunnel point cloud of the section are obtained. Next, we must judge the relationship between each point in the section point cloud and the vehicle contour.
The limit detection method in the text mainly adopts the ray discrimination method [38]. To judge whether a point is in the polygon, a horizontal ray is emitted from this point as shown in Figure 7. If the number of intersection points between the ray and the polygon is an odd number, the point is within the polygon; if it is even, then the point is outside the polygon. Thus, the positional relationship between each point in the section and the vehicle contour line can be judged point by point and, thus, determine whether the wall of the tunnel and its appendages have invaded. If there is no invasion, the nearest point in the section to the vehicle contour line is calculated.

Calculation of Vault Clear Height
The clear height of a vault refers to the vertical height from the highest point in the tunnel to the track center point. By comparing the multi-stage repeated measurement data, the detection of the clear height of the arch crown can determine whether deformation of the top of the tunnel lining occurs.
In Section 3.2, we transformed the section point cloud to the rail surface coordinate system with the track center point as the origin. Then, according to the time label, the roll angle of each section at the corresponding time was added to the section coordinate system for correction, and the real attitude of the tunnel section was restored.
Assuming that the roll angle of the current section is α, the rotation matrix R is calculated by equation = and the section point cloud under the rail surface coordinate system is rotated to the coordinate system in which the real roll angle attitude is restored, as shown in equation = × . The two-dimensional coordinate system takes the center point of the rail surface as the origin, and its Z axis is parallel to the Z axis of the tunnel engineering coordinate system, which can reflect the relative real elevation of each point in the section. Because the pitch angle is exceedingly small and does not affect the relative relationship of elevation, the pitch angle correction is not added.
In the point cloud of the tunnel section after restoring the real attitude, the point where the Z value is the maximum is the calculation point of the vault net height. However, owing to the influence of noise in the tunnel point cloud, it is necessary to denoise the cross-section point cloud. The fitting circle method and a given threshold are used to judge the noise points and unlined ring points in the top area. The circle fitting adopts the method of least squares and robust estimation to find the highest point of the tunnel lining ring [39,40], and the elevation value of this point is the clear height of arch crown. The deformation of tunnel top lining can be judged through a comparison of the multi-period repeated data.

Method Validation-Experimental Verification and Precision Analysis
This study takes the subway route from Bashan station to Fengxi Road Station of Chongqing Metro Line 5 as the test site, as shown in Figure 8. The tunnel part has been constructed by the mining method. The total length of the test area is approximately 60 m, is mainly a curve, and has known control points. The scanner calibration, inertial navigation calibration, and speed calibration were carried out in the field. The scanner data and inertial navigation data in the test area were collected by round-trip measurements, and reflectors were arranged on the site for attitude angle optimization, correction, and system calibration.

Calculation of Vault Clear Height
The clear height of a vault refers to the vertical height from the highest point in the tunnel to the track center point. By comparing the multi-stage repeated measurement data, the detection of the clear height of the arch crown can determine whether deformation of the top of the tunnel lining occurs.
In Section 3.2, we transformed the section point cloud to the rail surface coordinate system with the track center point as the origin. Then, according to the time label, the roll angle of each section at the corresponding time was added to the section coordinate system for correction, and the real attitude of the tunnel section was restored.
Assuming that the roll angle of the current section is α, the rotation matrix R is calculated by equation R = cosα sinα −sinα cosα and the section point cloud under the rail surface coordinate system is rotated to the coordinate system in which the real roll angle attitude is restored, as shown in equation The two-dimensional coordinate system takes the center point of the rail surface as the origin, and its Z axis is parallel to the Z axis of the tunnel engineering coordinate system, which can reflect the relative real elevation of each point in the section. Because the pitch angle is exceedingly small and does not affect the relative relationship of elevation, the pitch angle correction is not added.
In the point cloud of the tunnel section after restoring the real attitude, the point where the Z value is the maximum is the calculation point of the vault net height. However, owing to the influence of noise in the tunnel point cloud, it is necessary to denoise the cross-section point cloud. The fitting circle method and a given threshold are used to judge the noise points and unlined ring points in the top area. The circle fitting adopts the method of least squares and robust estimation to find the highest point of the tunnel lining ring [39,40], and the elevation value of this point is the clear height of arch crown. The deformation of tunnel top lining can be judged through a comparison of the multi-period repeated data.

Method Validation-Experimental Verification and Precision Analysis
This study takes the subway route from Bashan station to Fengxi Road Station of Chongqing Metro Line 5 as the test site, as shown in Figure 8. The tunnel part has been constructed by the mining method. The total length of the test area is approximately 60 m, is mainly a curve, and has known control points. The scanner calibration, inertial navigation calibration, and speed calibration were carried out in the field. The scanner data and inertial navigation data in the test area were collected by round-trip measurements, and reflectors were arranged on the site for attitude angle optimization, correction, and system calibration.

Attitude Angle Optimization and Velocity Correction
In the actual tunnel measurement, because the SPAN-FSAS integrated navigation system is in the satellite signal losing lock state for a lengthy period, its position accuracy, velocity accuracy, and attitude measurement accuracy have different degrees of decline. To improve the absolute positioning accuracy of the three-dimensional point cloud, the IMU attitude angle data should be optimized in the later data processing procedure.

Attitude Angle Optimization
Attitude angle optimization is mainly divided into two parts: Filtering and correction. The moving average filter is used to filter the three attitude angles. Figures 9-11 show the comparison curves of the pitch angle, roll angle, and heading angle before and after moving average filter, which shows that the attitude angle after filtering is more smooth and stable. Figure 12a,b shows the point cloud results obtained from the point cloud fusion of the two attitude angles before and after filtering at the same position. The more serious periodic point cloud change in Figure 12a can also be seen in Figure 12b; this change can eliminate the point cloud deformation caused by the random attitude angle error and the periodic system error caused by GNSS signal losing lock over a long period and restore the real structural information in the tunnel.

Attitude Angle Optimization and Velocity Correction
In the actual tunnel measurement, because the SPAN-FSAS integrated navigation system is in the satellite signal losing lock state for a lengthy period, its position accuracy, velocity accuracy, and attitude measurement accuracy have different degrees of decline. To improve the absolute positioning accuracy of the three-dimensional point cloud, the IMU attitude angle data should be optimized in the later data processing procedure.

Attitude Angle Optimization
Attitude angle optimization is mainly divided into two parts: Filtering and correction. The moving average filter is used to filter the three attitude angles. Figures 9-11 show the comparison curves of the pitch angle, roll angle, and heading angle before and after moving average filter, which shows that the attitude angle after filtering is more smooth and stable. Figure 12a,b shows the point cloud results obtained from the point cloud fusion of the two attitude angles before and after filtering at the same position. The more serious periodic point cloud change in Figure 12a can also be seen in Figure 12b; this change can eliminate the point cloud deformation caused by the random attitude angle error and the periodic system error caused by GNSS signal losing lock over a long period and restore the real structural information in the tunnel.         . Heading before and after moving the average filter. Figure 11. Heading before and after moving the average filter.

Attitude Angle and Velocity Correction
In the process of tunnel operation, the attitude angle collected by IMU has a certain system error caused by the GNSS signal losing its lock state in the integrated navigation system, and an accumulated error in mileage will also be caused by the track car in the lengthy process of uniform driving. The reflector correction method is used to correct the attitude angle of integrated navigation and velocity by measuring the reflector coordinates on the starting and ending sections via the total station.
First, two sections were selected from the starting point and the end point of the test section in the tunnel. Four reflectors were arranged at the same position in each section, and the reflectors were evenly distributed on both sides of the tunnel wall. Second, the three-dimensional coordinates of eight reflectors in the two sections under the tunnel engineering coordinate system were collected using the total station. Then the mobile laser scanning system was started to collect the data of the test section.
The plane distance and coordinate azimuth between the corresponding points in the two sections were calculated. By comparing the total station data with the measured data of the scanner, four approximately equal angle differences and length differences were obtained. The average coordinate azimuth angle difference was 0.45° and the average distance difference was 21 cm. According to the average distance difference and the time difference between the starting and ending sections, a more accurate speed value of the rail car was calculated, and the heading angle was corrected according to the average angle difference and empirical estimation.
From the fusion formula of the relative point cloud, the influence of the pitch angle on plane line shape is relatively small. Figure 13 also shows that the pitch angle is approximately 0.4° to 0.5°, so the influence of the pitch angle on the plane line shape can be ignored in this experiment. The test section is located at the corner of the tunnel. The horizontal alignment is mainly a curve and the super elevation is relatively stable. Figure 14 shows that the roll angle fluctuates around −4.8°. To reduce the impact of periodic fluctuation, the fluctuation range of all roll angles in the test section was reduced 10 times, and the orange curve, as shown in Figure 14, was obtained. As shown in Figure 15, the heading angle deviation was corrected according to the average coordinate azimuth angle difference calculated above. The average angle difference of twice was evenly distributed to each heading angle in the test section, and the orange curve was obtained, as shown in Figure 15. The pitch angle had negligible influence on the plane line type, but its influence on the elevation was substantive. Therefore, the elevation angle was corrected according to the elevation difference between the starting and ending section reflectors. As shown in Figure 13, the orange curve is the corrected pitch angle.
At this point of the experiment, the three attitude angles and velocity corrections were computed. The three-dimensional relative point cloud was fused again with the corrected attitude angle and velocity and compared with the total station data; the absolute plane point position error of the reflector was reduced to less than 5 cm, and the elevation error to less than 2 cm. The smoothness and absolute coordinate accuracy of point cloud fusion show that the optimization and correction of attitude angle played a significant role.

Attitude Angle and Velocity Correction
In the process of tunnel operation, the attitude angle collected by IMU has a certain system error caused by the GNSS signal losing its lock state in the integrated navigation system, and an accumulated error in mileage will also be caused by the track car in the lengthy process of uniform driving. The reflector correction method is used to correct the attitude angle of integrated navigation and velocity by measuring the reflector coordinates on the starting and ending sections via the total station.
First, two sections were selected from the starting point and the end point of the test section in the tunnel. Four reflectors were arranged at the same position in each section, and the reflectors were evenly distributed on both sides of the tunnel wall. Second, the three-dimensional coordinates of eight reflectors in the two sections under the tunnel engineering coordinate system were collected using the total station. Then the mobile laser scanning system was started to collect the data of the test section.
The plane distance and coordinate azimuth between the corresponding points in the two sections were calculated. By comparing the total station data with the measured data of the scanner, four approximately equal angle differences and length differences were obtained. The average coordinate azimuth angle difference was 0.45 • and the average distance difference was 21 cm. According to the average distance difference and the time difference between the starting and ending sections, a more accurate speed value of the rail car was calculated, and the heading angle was corrected according to the average angle difference and empirical estimation.
From the fusion formula of the relative point cloud, the influence of the pitch angle on plane line shape is relatively small. Figure 13 also shows that the pitch angle is approximately 0.4 • to 0.5 • , so the influence of the pitch angle on the plane line shape can be ignored in this experiment. The test section is located at the corner of the tunnel. The horizontal alignment is mainly a curve and the super elevation is relatively stable. Figure 14 shows that the roll angle fluctuates around −4.8 • . To reduce the impact of periodic fluctuation, the fluctuation range of all roll angles in the test section was reduced 10 times, and the orange curve, as shown in Figure 14, was obtained. As shown in Figure 15, the heading angle deviation was corrected according to the average coordinate azimuth angle difference calculated above. The average angle difference of twice was evenly distributed to each heading angle in the test section, and the orange curve was obtained, as shown in Figure 15. The pitch angle had negligible influence on the plane line type, but its influence on the elevation was substantive. Therefore, the elevation angle was corrected according to the elevation difference between the starting and ending section reflectors. As shown in Figure 13, the orange curve is the corrected pitch angle.
At this point of the experiment, the three attitude angles and velocity corrections were computed. The three-dimensional relative point cloud was fused again with the corrected attitude angle and velocity and compared with the total station data; the absolute plane point position error of the reflector was reduced to less than 5 cm, and the elevation error to less than 2 cm. The smoothness and absolute coordinate accuracy of point cloud fusion show that the optimization and correction of attitude angle played a significant role. Sensors 2020, 20, x FOR PEER REVIEW 14 of 20 Figure 13. Pitch before and after optimization and correction.

Point Cloud Accuracy Analysis
This study analyzed and verified the reliability of the mobile laser scanning system in clearance detection from four aspects: System integration accuracy, chord line accuracy, arch crown clear height internal coincidence accuracy, and clearance detection internal coincidence accuracy.

Point Cloud Accuracy Analysis
This study analyzed and verified the reliability of the mobile laser scanning system in clearance detection from four aspects: System integration accuracy, chord line accuracy, arch crown clear height internal coincidence accuracy, and clearance detection internal coincidence accuracy.

Point Cloud Accuracy Analysis
This study analyzed and verified the reliability of the mobile laser scanning system in clearance detection from four aspects: System integration accuracy, chord line accuracy, arch crown clear height internal coincidence accuracy, and clearance detection internal coincidence accuracy.

Point Cloud Accuracy Analysis
This study analyzed and verified the reliability of the mobile laser scanning system in clearance detection from four aspects: System integration accuracy, chord line accuracy, arch crown clear height internal coincidence accuracy, and clearance detection internal coincidence accuracy. Table 1 shows the scanner calibration parameters and their accuracy. The scanner calibration calculates the conversion parameters between the scanner and the vehicle coordinate system by taking the coordinates of the total station as the transit coordinate system. The accuracy reflects the installation error of the scanner. The table shows that the mean square error of the conversion parameters was within 2 mm.  Table 2 shows the results of attitude angle calibration parameters. In the table, the difference between the inertial navigation attitude angle and the vehicle body attitude angle was calculated by comparing the total station data with the IMU data, so the IMU coordinate system was integrated into the vehicle coordinate system.  Table 3 shows the calibration parameter results of the rail surface inclination angle. The included angle between the track surface and car body plane was calculated by comparing the change of the roll angle in the round-trip measurement.

Chord Accuracy
As shown in Table 4, chord lines 1-4 represent the chord length between reflectors 1 and 4 in the same section; for example, 1.1-4 represents the chord length between reflectors 1 and 4 in the first section. In comparing the data collected by total station and the data of point cloud fusion, we concluded that the accuracy of chord line was within 1 mm.

Clear Height Accuracy of Arch Crown
The accuracy of the crown clear height is shown in Table 5. In the experimental range, 10 sections with different mileages were selected. In comparing the changes of the vault clear height at the same position in the round-trip measurement, we concluded that the internal coincidence accuracy of the vault clear height measurement was 1.1 mm.

Gauge Detection Accuracy
The gauge detection precision is shown in Table 6. In the experimental region, 10 sections with different mileages were selected to calculate the distance of the closest point to the vehicle contour. By comparing the difference of the detection distance between the nearest point of round-trip measurement, we concluded that the internal coincidence accuracy of clearance detection was 4.8 mm.

Results
A detection method of tunnel deformation via the mining method, as based on a mobile scanning system, was proposed. The system integrates two kinds of sensors: Scanner and inertial navigation. The time system of scanner and IMU was unified by GNSS time. The spatial coordinate system was unified by calibrating the system, calibrating inertial navigation, calibrating the rails, and calibrating speed. The mileage of each section was calculated by constant-speed driving characteristics. It can be seen from Table 1 that the system integration accuracy was within 2 mm. Secondly, the optimization algorithm of 3D relative point cloud generation in mobile scanning system was introduced, and the attitude angle of IMU was filtered. It can be seen from Figures 9-11 that the curve of pitch angle, roll angle, and heading angle with mileage before and after filtering tended to be smooth and stable. It can be seen from Figure 12a that the tunnel point cloud before attitude angle filtering had obvious spatial distortion and fluctuation, while, in Figure 12b, it can be seen that the tunnel point cloud after attitude angle filtering restored the real tunnel spatial structure. Finally, three kinds of clearance detection methods, including chord line measurement, vault clear height detection, and clearance closest point detection, were proposed to evaluate the structural safety of the tunnel from different perspectives, and the integration accuracy and clearance detection accuracy of the system were verified in Chongqing Metro Line 5 subway tunnel. Among them, eight groups of chord lengths were tested on site in the chord line measurement part, and the average values of these groups for the contrast chord length difference were taken as the evaluation precision. Table 4 shows that the accuracy was within 1 mm. Ten groups of vault clear heights at different positions were tested on site, and the average values of 10 groups of round-trip observation difference were taken as the final evaluation accuracy. Table 5 shows that the accuracy was approximately 1.1 mm. The distance of the nearest point in the section was tested at 10 different positions in the gauge detection part, and the average values of the differences between the 10 groups of round-trip observation were taken as the evaluation accuracy of the clearance detection. Table 6 shows that the accuracy was approximately 4.8 mm.

Discussion and Conclusions
According to the field test data, the value of the tunnel scanning system can be discussed from the following aspects. First of all, from the way of work, Leica's SiTrack:One is integrated with scanners, inertial navigation, and odometer while Amberg's IMS5000 not only integrates scanners, inertial navigation, and odometer, but also adds range finder and inclinometer, and the car is designed by hand. The tunnel scanning system mentioned in this paper uses the characteristics of electric car to drive at constant speed instead of odometer. The whole system only includes scanner and inertial navigation system, which can improve the efficiency and simplify the operation process, and the point cloud data generated by the electric vehicle is more uniform and stable. Secondly, from the perspective of measurement accuracy, the Leica SiTrack:One relative measurement accuracy was 3-5 mm, while the gauge measurement accuracy of Amberg IMS5000 was 5 mm and the section fitting accuracy was and the three-dimensional point cloud information of the deformation position was given, combining with the inertial navigation data. Due to the uniform speed of the rail car and the design features without odometer, the operation time and personnel can be reduced. Given that the detection times of skylights in the subway are increasingly shortening, our proposed method can improve the operation efficiency and save on manpower and material resources. At present, because the inertial navigation system and the rail car are powered separately, the overall equipment is excessively heavy and complicated, and it is difficult to travel up and down the tunnel in the process of field operations. The inertial navigation system can be packaged in the track car to reduce the unnecessary repetitive equipment. In addition, owing to the influence of attitude angle accuracy decline caused by the GNSS signal losing its lock over a long time and the cumulative error of mileage increasing with distance, the absolute coordinate accuracy of point cloud fusion in a tunnel still cannot meet the requirements of completion inspection. In the future, we will continue to study the correction of attitude angle and mileage by setting control point targets at equal distances to improve the absolute positioning accuracy of the entire point cloud.