Pipeline inertial measurement mileage correction method based on pipeline junction detection

A pipeline measurement robot(PMR) is an important tool for pipeline shape measurement and disease detection. Flexible pipelines in the horizontal plane inside dams are used for internal deformation monitoring, which is characterized by small caliber, no ground marking assistance, and higher accuracy requirements, so the accuracy of the data fusion algorithm needs to be improved. In this paper, we propose a pipeline inertial measurement odometry correction method based on pipeline junction detection, which establishes a reference model of pipeline junction locations, detects pipeline junction gap locations along the measurement route using k-mean clustering, corrects odometer data based on the difference between the detected and reference locations, fuses IMU and odometer data and evaluates the internal compliance accuracy. The proposed method is validated using the measured data of the internal pipeline of Tianchi Dam, and the results show that the method proposed in this paper reduces the root-mean-square error (RMSE) by about 46% compared with the results without detection correction and direct fusion. Therefore, the method has good results and practical applications.


Introduction
Pipelines have an irreplaceable role in energy transportation, such as oil and gas transportation.The use of pipeline measurement robot (PMR) for trenchless and contact measurement of underground small diameter pipelines is an important pipeline shape measurement and disease detection technology [1,2] , which is of great significance for the safe operation of pipelines.PMR is based on a strapdown inertial navigation system (SINS), which can complete the measurement of the whole pipeline without relying on other information and other energies, and is characterized by autonomy, continuity and high local relative accuracy.Therefore, more and more research for PMR has appeared in the field of pipeline inspection, which has become a popular research direction.
The measurement of the PMR is accomplished by the inertial measurement unit (IMU), which is used to measure the angular velocity and acceleration of the motion, thus calculating the attitude angle, velocity and position of the PMR by recursion.Since recursion leads to the accumulation of IMU errors, it is also necessary to integrate additional navigation sensors or set up external auxiliary localization information on the PMR, and then calculate the position and motion routes of the PMR by means of a data fusion algorithm based on Kalman filtering [3,4] .
In recent years, some scholars have utilized flexible small-caliber pipelines to conduct research on deformation detection and safe operation and maintenance of large-scale infrastructures, such as the measurement of settlement deformation inside dams.Li et al. [5][6][7] buried flexible pipes in the horizontal plane inside the dam, and measured the shape change of the flexible pipes by PMR (Figure 1) with an integrated odometer, so as to obtain the vertical and horizontal deformation inside the dam.Unlike general urban underground pipelines and energy pipelines, where the measurement accuracy is about 0.2% to 0.03% of the length of the pipeline, the measurement accuracy of the pipeline for monitoring the internal deformation of the dam is much higher, and the accuracy of the pipeline for a length of 100 meters needs to reach the millimeter level, i.e., no more than 0.01% of the length of the pipeline.At the same time, limited by the internal diameter of the pipeline, the size of the PMR itself cannot be increased indefinitely, which makes it difficult to integrate IMUs with higher accuracy but larger size, and it is difficult to use auxiliary devices external to the pipeline to improve the positioning accuracy, such as above ground markers (AGMs).Therefore, it is necessary to dig deeper into the characteristics of the flexible pipeline inside the dam and the connection with the data obtained from the PMR to improve the accuracy of the data fusion algorithm, in order to provide a more reliable and accurate positioning method for the PMR.There are many research results on methods to improve the accuracy of pipeline inertial measurement data fusion algorithms.The pipeline junction (PJ), such as weld, bend pipe, valve, flange, etc., is regarded as a class of motion constraints [8] , which can be used as the position constraint information of PMR.At present, many researchers have explored how to obtain and utilize the position of pipeline junctions [9][10][11][12] .The specific methods include detecting the peak of IMU acceleration through wavelet decomposition to obtain the position of pipeline junctions, and adding the position of pipeline junctions as an observation to the Kalman filter, which ultimately improves the accuracy of the PMR localization.However, there are some shortcomings in this method.The peak detection needs to traverse all the IMU data, which leads to a complicated process and large data computation.Adding constraints at the pipeline connections in Kalman filtering will lead to a rise in the complexity of the algorithm, resulting in a reduction in the efficiency of data analysis.The selection of parameters for wavelet decomposition, such as the analytic formula of the mother wavelet and the number of decomposition layers, is also a problem that has not been solved quantitatively and depends on the experience of researchers.
In order to solve the above deficiencies and improve the accuracy and efficiency of inertial measurement of flexible pipelines in the horizontal plane inside dams, this paper proposes a mileage correction method for pipeline inertial measurement based on pipeline junction detection.First, based on the pipeline construction information and unit pipeline length, k-mean clustering of IMU acceleration is performed to detect the peak mileage location when PMR passes through the pipeline junction.Then, the odometer speeds between neighboring pipeline junctions are adjusted so as to constrain the same pipeline junctions in different measurements to the same mileage position.Finally, data fusion was performed using Kalman filtering to evaluate the internal accuracy of multiple measurements.
In Section 2 of this paper, we illustrate the information about the pipeline junctions.In Section 3, we explain the peak detection algorithm and the method of odometer speed adjustment.In Section 4, we demonstrate the effectiveness of the detection-correction method proposed in this paper by evaluating and validating it with measured data.

Information about pipeline junctions
The layout of the pipeline in the internal horizontal plane of the dam is shown in Figure 2, with (a) a three-dimensional view and (b) a vertical section view.After the dam is constructed to a certain elevation, the pipeline burial trench is excavated in the top horizontal plane, the flexible pipeline is put in, and the entrances and exits at both ends of the pipeline are led to the existing observation room.The slope of the pipeline is controlled to be no more than 1%, which means that the elevation of the whole pipeline is generally no more than one meter in elevation rise and fall.The connection method of the flexible pipe is shown in Figure 3.The whole pipe is connected by unit pipes (Figure 3 In practice, neighboring unit pipes do not connect perfectly, but there is always a gap, known as a pipe junction seam.The PMR will vibrate suddenly when passing through the pipe junction, and since the sensor of the IMU is sensitive enough, it will produce a sudden and obvious acceleration peak.For example, Figure 4 shows the accelerometer output data of PMR after moving through a horizontal pipe inside a dam, in which periodic and regular spikes appear in the graph and occur simultaneously in all three directions.When the pipeline is constructed, only the unit pipes are interconnected without cutting, so the mileage location where each spike occurs is known, i.e.,  =  *  ,  = 1,2, … ,  − 1.Where  is the mileage location of the th peak acceleration spike,  is the length of the unit pipe, and  is the number of unit pipes contained in the overall pipe.After multiple traversals of the same pipe using PMR, the measured routes from each traverse should have peak acceleration spikes at the same mileage locations.This information is used as a constraint in terms of mileage.

Pipeline junction detection method
The PMR performs one full movement from beginning to end or from end to beginning inside the pipeline and collects relevant data, which is called one complete measurement.When the PMR takes a complete measurement inside the pipeline, due to the small elevation fluctuation of the pipeline on the horizontal plane inside the dam, the overall fluctuation range of the acceleration data acquired by the IMU is not large, and basically fluctuates above and below the zero value after eliminating the zero bias error.However, the vibration generated when passing through the seam at the pipeline junction will produce significant acceleration peaks.When the overall acceleration is sorted from largest to smallest, these peaks occupy only a small portion of the front of the sorting table.On the other hand, compared to the overall length of the pipeline, the length of the seam at the pipeline junction is very small, and the resulting acceleration peaks have a very short duration and account for a very small percentage of the total acceleration data.As a result, the acceleration peaks to be detected show a strong tendency of clustering, in the direction of mileage they will be clustered to the location of the pipeline junction seam, while in the direction of acceleration, they will be clustered to the location with the largest value.Since the location of the seam at the pipeline junction is known, we can grasp the two clustering directions of the acceleration peaks to be detected.
Based on the above analysis, we propose to use the k-mean clustering [13] algorithm to detect the location of pipeline junctions.First, the measured route accelerations are sorted by numerical magnitude and the top 1% of the sorted table is intercepted.Then k-mean clustering is performed on this top 1% maximum acceleration data, where the number of clusters is equal to  − 1 and the initial center of mass of each cluster is  , so as to obtain the point clusters of the gaps at each pipe connection.Finally, the mileage corresponding to the point with the largest acceleration in each point clustering is selected as the position of the pipeline junction in the route of this measurement, thus completing the detection of the pipeline junction.

Mileage correction method
Because the mileage wheel can skid or slide as it moves, the distance increments measured by the odometer do not match the distance increments actually moved by the PMR.This can lead to an error in the mileage location of the peak acceleration of the seam at the pipeline junction in each measurement route, which does not appear at the same location on each trip.As shown in Figure 5(a), the red straight lines in the figure are the mileage axis and the reference spike mileage location  , the blue and green curves are the acceleration data obtained from the two measurements, and the circles are the detected pipeline junction locations.
In order to eliminate the mileage location error, the output data of the odometer needs to be corrected.Firstly, it is necessary to calculate the mileage difference between the acceleration peak locations and the corresponding reference spike locations  .Then the output data of the odometer between the acceleration peak at that location and the previous peak or starting point is adjusted.If the cumulative distance of the odometer is greater than the actual distance, the output data of the odometer is cut, and if the cumulative distance of the odometer is less than the actual distance, the output data of the odometer is compensated.The effect of the correction is shown in Figure 5(b), where the same pipeline junction seams are calibrated to the same locations in different measurement routes, thus improving the accuracy of the odometer output data.

Accuracy evaluation method
Internal accuracy is of practical significance for assessing the reliability and stability of pipeline measurement robots, and is identified as the basis for evaluating the impact of measurement methodology on the accuracy of results [14,15] .After mileage correction, we use Kalman filtering to fuse the acceleration and angular velocity acquired by the IMU and the distance increment acquired by the odometer to obtain the shape of the flexible pipeline in the horizontal plane inside the dam, i.e., the mileage-elevation curve, which is described in reference [16][17][18] .
Each complete measurement obtains a mileage-elevation curve ℎ = ( ) for the pipeline once, ℎ and  are the elevation and mileage of the th sampling point,  = 1,2, …  respectively, the subscript  represents different locations of the same pipeline, and  is the total number of sampling points.We let one operation make  complete measurements of the monitoring pipeline, and get  mileageelevation curves ℎ = ( ),  = 1,2, … , , with the superscript  representing different measurements of the same operation.The internal accuracy of this operation is expressed by the root mean square error (RMSE) .The mean value is used as the reference estimator, and  is calculated as shown in Equation (1) and Equation (2).Obviously, the smaller the value of  is, the higher the internal accuracy is.

Results
The application experiment site is located in Tianchi Dam in Nanyang City, Henan Province, which is a panel rockfill dam with a maximum height of 118 meters.The monitoring pipeline layout of Tianchi Dam is shown in Figure 6

Results of pipeline junction detection
The 1010 s pipeline consists of 29 unit pipes connected with a length of 9 m, so the reference spike mileage location is  = 9,  = 1,2, … ,28.As an example, for September 2021 data from the 1010 s pipeline, three measurements of the monitoring pipeline were conducted in this period, and the PMR made three round trips during each measurement, for a total of 18 complete measurements, which took a total of 105 minutes.The detection results are shown in Figure 7.As can be seen from the figure, the pipeline junction detection method proposed in this paper has detected a total of 504 acceleration peak points, which are consistent with the values of the reference spikes to be detected, and they are all located in the pipeline junction seams, which indicates that the pipeline junction detection method has a very good effect.

Results of internal accuracy analysis
Fusion calculations were performed on the September 2021 data for the 1010 s pipeline.Figure 8 and Figure 9 show the mile-relative elevation graph (a) and the mile-elevation residual graph (b) relative to the mean for each of the routes, where Figure 8 has not been mileage corrected and  =7.02 mm, and Figure 9  As can be seen from the figure, after the mileage correction, the route of multiple measurements of the same pipeline is more centralized, the standard deviation of the whole route at almost every position is reduced, and the  of this period is also reduced from 7.02 mm to 3.75 mm, which is reduced by 46.58%, thus indicating that the mileage correction is able to effectively improve the internal accuracy of PMR.

Conclusion
The main objective of the work carried out in this paper is to improve the accuracy of inertial measurements of flexible pipelines in the horizontal plane inside dams.We first build a reference model of the location of the pipeline junctions, use it as the center of mass for k-mean clustering of the IMU acceleration measurements, and detect the location of the pipeline junction seams in each route of the PMR measurement.Then the odometer measurements are corrected according to the bias of the locations.Finally, the IMU and odometer data are fused and the internal compliance accuracy is calculated.The newly developed detection-correction algorithm also reduces the amount of data analysis and the complexity of the data fusion algorithm, thus improving calculation efficiency.The algorithm of this paper was validated using the internal horizontal pipeline of Tianchi Dam as a data sample.The results show that the new method can improve the concentration of multiple measurement routes, reduce the RMSE by 46.58%, and improve the internal accuracy of pipeline inertial measurement with good practical results.

Figure 2 .Figure 3 .
Figure 3. Connection of flexible pipelines.In practice, neighboring unit pipes do not connect perfectly, but there is always a gap, known as a pipe junction seam.The PMR will vibrate suddenly when passing through the pipe junction, and since the sensor of the IMU is sensitive enough, it will produce a sudden and obvious acceleration peak.For example, Figure4shows the accelerometer output data of PMR after moving through a horizontal pipe inside a dam, in which periodic and regular spikes appear in the graph and occur simultaneously in all three directions.

Figure 5 .
Seam locations of pipeline junctions for multiple routes before and after correction.

Figure 6 .
. Three monitoring pipelines, named 1010 s (short), 1010 l (long) and 1037, with lengths of 261 m, 369 m and 261 m, respectively, are connected by unit pipes with lengths of 9 m on two horizontal surfaces with elevations of 1010 m (Figure 6(a)) and 1037 m (Figure 6(b)).The inspection results and internal accuracy of the pipe junction were analyzed using the 1010 s pipe as an example.Map of Tianchi Dam monitoring pipelines at 1010 m and 1037 m height plans.

Figure 7 .
Figure 7. Detection results of the locations of 1010 s pipeline junctions.As can be seen from the figure, the pipeline junction detection method proposed in this paper has detected a total of 504 acceleration peak points, which are consistent with the values of the reference spikes to be detected, and they are all located in the pipeline junction seams, which indicates that the pipeline junction detection method has a very good effect.

Figure 8 .Figure 9
has been mileage corrected and  =3.75 mm.In Part (a) of both Figures, the images of the same area have been zoomed in so that it is easy to see the degree of clustering of multiple survey routes at that location.Graph of pipeline's route before mileage correction.Graph of pipeline's route after mileage correction.