Disclosure of Invention
The invention provides a pipe cleaner tracking and positioning method based on distributed optical fiber vibration sensing, which can realize real-time high-precision tracking and positioning of a pipe cleaner, provides real-time position information of the pipe cleaner for a user, is simple and convenient to operate, does not need to deploy equipment outdoors, and is described in detail as follows:
a pig tracking and positioning method based on distributed optical fiber vibration sensing comprises the following steps:
1) taking a communication optical cable laid in the same ditch with the oil and gas pipeline as a distributed vibration sensor, selecting a redundant fiber core in the communication optical cable, and accessing the redundant fiber core into a phase-sensitive optical time domain reflectometer;
2) the phase-sensitive optical time domain reflectometer transmits detection pulses to the communication optical cable at a certain repetition frequency;
3) carrying out batch band-pass filtering on the two-dimensional space-time matrix along the time axis direction, filtering low-frequency disturbance and high-frequency noise in an original time sequence, and displaying the filtered two-dimensional space-time matrix in an image mode to form a space-time diagram;
4) the vibration of the pipeline wall is transmitted to the sensing optical cable, and the Rayleigh backscattering signal in the optical cable is subjected to phase modulation;
5) when the leather cup collides with a pipeline welding seam each time, two parallel approximate inverted V shapes appear on a corresponding space-time diagram, the horizontal coordinate of the vertex of each inverted V shape reflects the position of the leather cup colliding with the pipeline welding seam, the vertical coordinate of the vertex of each inverted V shape reflects the time of collision between the leather cup and the pipeline welding seam, the slopes of two sides of each inverted V shape reflect the speed of vibration propagating along the pipeline wall, and the projection length of the side of each inverted V shape on the horizontal axis reflects the conduction distance of the vibration;
6) and automatically extracting the position of the inverted V shape from the space-time diagram, thereby realizing the automatic positioning of the pipe cleaner.
Wherein, draw the position of the shape of falling V automatically from the space-time diagram to the automatic positioning that realizes the pig specifically is:
1) sequentially or concurrently performing band-pass filtering on the time domain signals of each space point along the direction of a space axis on the original space-time diagram, and meanwhile normalizing the time domain signals according to the relative energy ratio of high-frequency components of a specific frequency band in the time domain signals, so that the sensitivity difference of different point positions caused by coherent fading is eliminated;
2) 4:1 down-sampling is carried out on the time domain signals of each space point of the time-space diagram, so that the number of pixel points of the time axis of the image is reduced to 1/4;
3) binarizing the image by using a threshold value Tr; performing line removing operation on the image by using threshold values Tx and Ty, and removing horizontal lines and vertical lines in the image;
4) performing expansion operation on the binary space-time diagram of the structural element after the line is removed; the expanded space-time diagram is processed by 10: 1, carrying out equal-proportion down-sampling to reduce the number of image pixel points to 1/10, and obtaining a binary space-time diagram;
5) manufacturing an inverted V mask according to an inverted V pattern in the historical time-space diagram data set; performing convolution calculation on the obtained binarization space-time diagram by using an inverted V mask to obtain a binarization convolution result R;
6) extracting pixel points with the pixel value of 1 in the convolution result R to form a target point set P; and calculating the average value of the abscissa of all pixel points in the target point set P to obtain the positioning result of the pipe cleaner.
Further, the line removing operation is performed on the image again by using the thresholds Tx and Ty, and the horizontal lines and the vertical lines in the image are removed as follows:
respectively calculating the sum of pixels of each row and each column of the binary space-time diagram along a space axis and a time axis, if the sum of the pixels of a certain row is greater than Tx, setting the element of the row to zero, otherwise, not performing any operation; if the sum of the pixels of a certain column is larger than Ty, setting the elements of the column to be zero, otherwise, not performing any operation.
Wherein, the manufacture of the reverse V mask specifically comprises the following steps:
setting a square outer contour capable of wrapping the inverted V pattern according to the size of the inverted V pattern, wherein the background pixel value is set to be 0, and the foreground pixel value is set to be 1;
the V-shaped main body part of the inverted V-shaped pattern is a foreground area, and the other areas are background areas.
The technical scheme provided by the invention has the beneficial effects that:
1. the invention uses the communication optical cable laid in the same ditch with the pipeline as a sensor to collect the vibration generated by the impact of the pipe cleaner with the pipe wall and the welding seam when the pipe cleaner runs in the pipeline;
2. the invention realizes the tracking and positioning of the pipe cleaner by processing and analyzing the vibration signal in real time, and can carry out high-density tracking and positioning on the pipe cleaner because of distributed sensing and each point on the optical cable is a sensor.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in further detail below.
Example 1
A pig tracking and positioning method based on distributed optical fiber vibration sensing comprises the following steps:
1) taking a communication optical cable laid in the same ditch with the oil and gas pipeline as a distributed vibration sensor, selecting a redundant fiber core in the communication optical cable, and accessing the redundant fiber core into a phase-sensitive optical time domain reflectometer;
namely, the phase-sensitive optical time domain reflectometer is used for collecting vibration data along the pipeline to be measured.
2) The phase-sensitive optical time domain reflectometer transmits detection pulses to the communication optical cable at a certain repetition frequency;
wherein, every time a detection pulse is transmitted, a Rayleigh scattering curve can be obtained. The Rayleigh scattering curve carries vibration information along the pipeline. And (3) longitudinally arranging the N Rayleigh scattering curves obtained within 1 second according to the time sequence to obtain a two-dimensional space-time matrix. The horizontal axis of the two-dimensional space-time matrix represents space, the vertical axis represents time, the row vector is a Rayleigh scattering curve, and the column vector is a vibration time sequence at a certain position of the optical cable. The vibration time series reflects the original vibration waveform of the corresponding position.
3) Carrying out batch band-pass filtering on the two-dimensional space-time matrix along the direction of a longitudinal axis (time axis), filtering low-frequency disturbance and high-frequency noise in an original time sequence, and displaying the filtered two-dimensional space-time matrix in an image mode to form a space-time diagram;
4) the horizontal axis of the space-time diagram represents space, the vertical axis represents time, and color represents intensity;
wherein, a space-time diagram reflects the vibration condition of the whole communication optical cable along a certain period of time.
5) The vibrations are conducted in the form of guided waves along the wall of the pipe upstream and downstream of the pipe. The vibration of the pipeline wall is further conducted to the sensing optical cable through soil, and the Rayleigh backscattering signal in the optical cable is subjected to phase modulation;
when the pipe cleaner advances in the oil gas pipeline, the leather cups at the front end and the rear end of the pipe cleaner can generate friction with the inner wall of the pipeline and collide with the welding seam of the pipeline. The leather cup and the welding seam impact can generate stronger vibration which is conducted to the upstream and the downstream of the pipeline along the pipeline wall in a wave guide mode. The vibration of the pipeline wall is further conducted to the sensing optical cable through the soil, and the Rayleigh backscattering signals in the optical cable form phase modulation.
Wherein, when the leather cup collides with the pipeline welding seam each time, two parallel approximate inverted V shapes appear on the corresponding space-time diagram. The inverted V-shape is the trace left on the space-time diagram by the vibrations conducted along the pipe wall. The abscissa of the inverted V-shaped peak reflects the source of vibration generation, namely the position where the leather cup collides with the pipeline welding seam, and the ordinate of the inverted V-shaped peak reflects the time of collision between the leather cup and the pipeline welding seam. The slopes of the two sides of the inverted V shape reflect the speed of vibration propagating along the pipeline wall, and the projection length of the sides of the inverted V shape on the horizontal axis reflects the conduction distance of vibration.
From the above analysis, the abscissa of the apex of the inverted V shape reflects the current position of the pig. Therefore, an algorithm needs to be designed, and the coordinates of the vertexes of the inverted V-shape are automatically extracted from the space-time diagram, so that the automatic positioning of the pipeline pig is realized. The invention provides an image convolution algorithm, which can automatically extract the position of an inverted V shape from a space-time diagram, thereby realizing the automatic positioning of a pipe cleaner. The steps and implementation method of the algorithm are as follows:
1) sequentially or concurrently performing band-pass filtering on the time domain signals of each space point along the direction of a space axis on the original space-time diagram, and meanwhile normalizing the time domain signals according to the relative energy ratio of high-frequency components of a specific frequency band in the time domain signals, so that the sensitivity difference of different point positions caused by coherent fading is eliminated;
2) 4:1 down-sampling is carried out on the time domain signals of each space point of the time-space diagram, so that the number of pixel points of the time axis of the image is reduced to 1/4;
3) binarizing the image by using a threshold value Tr;
4) the image is subjected to a line-removing operation with the thresholds Tx and Ty, and horizontal and vertical lines in the image are removed.
Specifically, the sum of the pixels of each row and each column of the binarized space-time map is calculated along the spatial axis and the temporal axis, respectively. If the sum of the pixels of a certain row is greater than Tx, the row element is set to zero, otherwise, no operation is performed. If the sum of the pixels of a certain column is larger than Ty, setting the elements of the column to be zero, otherwise, not performing any operation.
The thresholds Tr, Tx, and Ty are set according to the needs of practical applications, which is not described in detail in the embodiments of the present invention.
5) Expanding the binary space-time diagram after the line is removed by using SE (structural element);
the dilation operation is a standard digital image processing technique, and is not described in detail in the embodiments of the present invention.
6) The expanded space-time diagram is processed by 10: 1, carrying out equal-proportion down-sampling to reduce the number of image pixel points to 1/10, and obtaining a binary space-time diagram;
7) manufacturing an inverted V mask according to an inverted V pattern in the historical time-space diagram data set;
the specific method comprises the following steps: and setting a square outer contour capable of just wrapping the inverted V-shaped pattern according to the size of the inverted V-shaped pattern. The background pixel value is set to 0 and the foreground pixel value is set to 1.
The V-shaped main body part of the inverted V-shaped pattern is a foreground area, and the other areas are background areas. The N multiplied by N square binary matrix manufactured by the method is the inverted V mask.
8) Performing convolution calculation on the binarization space-time diagram obtained in the step 6) by using an inverted V mask to obtain a binarization convolution result R;
9) extracting pixel points with the pixel value of 1 in the convolution result R to form a target point set P;
10) and calculating the average value of the abscissa of all pixel points in the target point set P to obtain the positioning result of the pipe cleaner.
Example 2
The scheme of example 1 is further described below in conjunction with specific fig. 2-8, described in detail below:
the original space-time diagram is shown in fig. 2. Due to the existence of low-frequency interference and high-frequency noise, and different response functions, static offsets and sensitivities of all spatial point positions, a signal pattern with definite significance is difficult to observe in an original space-time diagram. And sequentially or concurrently performing band-pass filtering and normalization on the time domain signals of each space point in the direction of the space axis in fig. 1, and performing 4-time down-sampling on the time domain signals to obtain the processed space-time diagram shown in fig. 3. The space-time diagram shown in fig. 3 is still a grayscale image. The image is binarized with Tr as a threshold value to obtain a binarized space-time diagram, as shown in fig. 4. The next operation is to go out of the line in fig. 4. Respectively taking Tx and Ty as thresholds, screening out the positions and moments when the sum of pixel points in the horizontal direction and the vertical direction exceeds the threshold, and setting one row or one column of pixel points at the corresponding positions and moments to zero. The resulting time-space diagram after the wire-out operation is shown in fig. 5. Comparing fig. 5 and fig. 4, it can be seen that the line-removing operation can remove the original horizontal and vertical lines in the space-time diagram, and avoid the disturbance lines from interfering with the subsequent convolution calculation. With a 4 × 4 matrix of all 1 as morphological elements SE, the expansion calculation is performed on the time-space diagram after the line is removed, and the calculation result is down-sampled by 10 times, and the obtained result is shown in fig. 6.
A mask is made according to the shape and size of the inverted V pattern in the historical space-time diagram data set, and the mask image is shown in FIG. 8. The mask image was used to convolve with the space-time diagram shown in fig. 6, and the convolution results are shown in fig. 7. In FIG. 7, 2 white dots with sizes from top to bottom can be observed on the abscissa of 280 to 300. The two white dots show the positions of the vertices of the two inverted V-shaped patterns in the original image, the pixel values of the two white dots are 1, and the pixel values of the other positions are zero. The points with the screened pixel value of 1 constitute a target point set. And calculating the average value of the abscissa of all pixel points in the target point set as the positioning result of the pipe cleaner.
In the embodiment of the present invention, except for the specific description of the model of each device, the model of other devices is not limited, as long as the device can perform the above functions.
Those skilled in the art will appreciate that the drawings are only schematic illustrations of preferred embodiments, and the above-described embodiments of the present invention are merely provided for description and do not represent the merits of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.