Pig receiving and sending barrel fast alignment parameter optimization method and device
By using non-contact 3D scanning and dynamic calculation with optimization algorithms, the positional adjustment of the pig and the launching/receiving tube is optimized, solving the problem of insufficient alignment accuracy in existing technologies and realizing an efficient and reliable automated alignment process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENYANG WENSHENG INSTR EQUIP CO LTD
- Filing Date
- 2026-01-20
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, the alignment process of the pig launching and receiving cylinders of pipeline pigs relies on preset mechanical parameters, resulting in insufficient alignment accuracy, low operating efficiency, and poor adaptability to working conditions. It cannot effectively address practical problems such as manufacturing tolerances, wear and deformation, and installation deviations of pipeline pigs.
Non-contact 3D scanning is used to acquire point cloud data of the pig and launch/receiver tubes. Feature extraction and deviation quantification are performed through the central processing and optimization module. The optimal six-degree-of-freedom pose adjustment matrix is dynamically calculated using a constrained particle swarm optimization algorithm. Physical pose adjustment is achieved through a high-precision six-degree-of-freedom platform. Closed-loop verification is combined to ensure alignment accuracy.
It achieves high-precision, automated alignment between the pig and the launch/receiver tubes, eliminating quality fluctuations in traditional methods, improving core alignment indicators, and forming a complete automated alignment system encompassing perception, decision-making, and execution.
Smart Images

Figure CN121541494B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automation control technology, specifically to a method and apparatus for rapidly optimizing the alignment parameters of a pig launching and receiving cylinder. Background Technology
[0002] In critical industrial sectors such as oil and gas transportation and chemical material transport, long-distance pipelines serve as core infrastructure, and the maintenance and inspection of their internal condition are crucial for ensuring safe production and operational efficiency. Pipeline pigging technology, which utilizes pigs to clean, inspect, or isolate the interior of pipelines, is an indispensable technical means to ensure the long-term stable operation of pipeline systems. In this technical system, the pig launcher / receiver barrel serves as the key interface device for the pig to enter and exit the pipeline system. The reliability, efficiency, and level of automation of its operation directly determine the success and economics of the entire pigging operation. In the initial stage of the pig launch operation, one of the core tasks is to ensure that the pig can accurately and stably transition from the loading section of the launcher / receiver barrel to the smaller diameter pipeline inlet.
[0003] Patent CN110834016B discloses a stabilizing device for a pig in a launcher / receiver tube. Through a mechanical combination of a base, a booster block, and a limiting clamp, it aims to solve the problem of the pig rolling or moving freely within the launcher tube due to gravity or external disturbances. Specifically, by manually adjusting the position of the limiting clamp, pigs of different outer diameters can be stably restrained near the central axis of the launcher tube, providing a basic static position guarantee for their subsequent entry into the diameter-changing section. This effectively solves the initial positioning problem after the pig is loaded, reducing the risk of launch failure due to improper positioning.
[0004] Another invention patent, CN112178354B, discloses a pig booster device, focusing on the pig's driving process. The solution designs a linkage mechanism including a support, a rotating device, and a movable rod. It uses a circular contact surface to gently push the pig, avoiding damage to the pig's seals or main structure that might be caused by the traditional, forceful push method. This improves the smoothness and controllability of the driving process, indirectly increasing pigging efficiency.
[0005] As pipeline operations continue to evolve towards refinement and intelligence, and as more stringent requirements are placed on operational efficiency and equipment compatibility, the aforementioned technical solutions based on purely mechanical constraints or single-drive modes are gradually revealing their limitations in addressing new challenges due to some inherent characteristics at the principle level. Treating the alignment process of the pipeline pig as a static, unidirectional mechanical positioning problem ignores its inherent complexity as a dynamic, multi-parameter coupled system.
[0006] Whether using a limit clamp for static clamping or a booster device for uniform pushing, both are based on an open-loop control strategy with preset parameters. Existing technology presupposes an idealized alignment model, meaning that as long as the mechanical structure is positioned accurately, the pig will inevitably achieve precise alignment.
[0007] However, in actual operating environments, the pig itself may have manufacturing tolerances or wear and deformation, and the installation of the pig launcher and receiver may also have slight coaxiality deviations. The combination of these non-ideal factors often results in an unpredictable deviation between the preset mechanical positioning parameters and the real-time optimal alignment parameters. In static limit schemes, this deviation manifests as insufficient alignment accuracy or excessive stress on the pig, while in boost schemes, it may cause the pig to deflect at the moment it enters the diameter change section, leading to the risk of jamming or accelerated wear of the seals. Summary of the Invention
[0008] The purpose of this invention is to provide a method and device for optimizing the alignment parameters of the pig launching and receiving cylinders of a pipeline cleaning machine. This method can solve the technical problems in the prior art, such as insufficient alignment accuracy, low operating efficiency, and poor adaptability to working conditions, which are caused by relying on preset mechanical parameters and adopting open-loop control strategies.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0010] The method for quickly calibrating the parameters of the pig launching and receiving cylinders of a pipeline pig includes the following steps:
[0011] Step 1: Data acquisition. A data acquisition module is used to perform a three-dimensional scan on the tail end of the pig mounted on a positioning execution module and the inlet of the variable diameter section of a pig receiving and launching tube. The first original point cloud data representing the actual three-dimensional shape of the tail end of the pig and the second original point cloud data representing the actual three-dimensional shape of the inlet of the variable diameter section of the pig receiving and launching tube are obtained in a non-contact manner.
[0012] Step 2: Feature extraction and deviation quantization. The first and second raw point cloud data are transmitted to a central processing and optimization module. The central processing and optimization module processes the point cloud data to extract key geometric features such as the initial center axis vector of the pig and the reference center axis vector of the launcher and receiver. Based on the comparison of the key geometric features, the initial pose deviation of the pig relative to the launcher and receiver is quantified and calculated.
[0013] Step 3: Parameter optimization. Based on the quantified initial pose deviation, the central processing and optimization module starts an optimization algorithm to perform iterative optimization calculations in the digital twin model to obtain an optimal six-degree-of-freedom pose adjustment matrix for correcting the initial pose deviation.
[0014] Step 4: Servo execution. The central processing and optimization module converts the optimal six-degree-of-freedom pose adjustment matrix into low-level control instructions for the positioning execution module and sends them to the positioning execution module to drive the pig to complete a spatial composite motion so as to adjust the physical pose to be consistent with the optimal target pose calculated by the optimization algorithm.
[0015] Step 5: Verification Feedback. After the positioning execution module completes the pose adjustment, Step 1 and Step 2 are repeated to obtain the corrected residual pose deviation. The calculated residual coaxiality deviation, axis parallelism deviation, and end face perpendicularity deviation are compared with their respective preset acceptable tolerance thresholds. If any residual pose deviation is greater than its corresponding tolerance threshold, the residual pose deviation is used as a new initial deviation and returned to Step 3 to form a closed-loop feedback control until all residual pose deviations are less than or equal to their corresponding acceptable tolerance thresholds.
[0016] In one specific embodiment of the present invention, a system initialization and coordinate reference construction step is included before step one:
[0017] The positioning execution module has the ability to perform six degrees of freedom adjustments in three-dimensional space;
[0018] The data acquisition module includes a first three-dimensional scanning unit fixedly installed inside the launcher and receiver tube, and a second three-dimensional scanning unit installed on a movable guide rail for scanning the tail of the pig.
[0019] The first original point cloud data and the second original point cloud data are used to establish a unified world coordinate system based on the central axis of the launch and receiver tube using preset target points. This ensures that all three-dimensional spatial data collected by the first and second three-dimensional scanning units are represented and processed in this unified world coordinate system.
[0020] In one specific embodiment of the present invention, both the first three-dimensional scanning unit and the second three-dimensional scanning unit adopt non-contact optical measurement technology, specifically blue light structured light scanning technology, with a center wavelength of 450nm and a measurement accuracy of 0.05mm; the second three-dimensional scanning unit moves along the movable guide rail and scans the tail of the pig from multiple different perspectives to obtain complete, high-density first raw point cloud data.
[0021] In a specific embodiment of the present invention, the feature extraction process in step two specifically includes:
[0022] Point cloud preprocessing: The central processing and optimization module first performs outlier removal and noise reduction on the first and second original point cloud data, and uses a statistical filter to filter out noise points caused by ambient light or surface scattering.
[0023] Features of the pig: The first point cloud data after processing is analyzed, and the coordinates of the center point and the normal vector of the end face of the pig are fitted by the random sampling consensus algorithm. Based on this, the initial central axis vector of the pig is calculated.
[0024] Feature extraction of the launcher / receiver tube: The processed second point cloud data is analyzed, and the spatial equation of the contour circle of the variable diameter section inlet of the launcher / receiver tube is accurately fitted by the random sampling consensus algorithm, thereby determining its center coordinates, normal vector and precise inlet inner diameter, and calibrating the reference center axis vector of the launcher / receiver tube accordingly.
[0025] In one specific embodiment of the present invention, a coordinate system registration sub-step is included before the point cloud preprocessing:
[0026] By utilizing fixed target points pre-placed on the inner wall of the launcher / receiver tube and the base of the positioning execution module, the local coordinate systems of the first and second three-dimensional scanning units are accurately transformed to the world coordinate system using photogrammetry principles, thereby ensuring that all subsequently extracted geometric features have a unified spatial reference.
[0027] In one specific embodiment of the present invention, a digital twin model construction step is included before step three:
[0028] Based on the key geometric features extracted in step two, the central processing and optimization module constructs a high-fidelity digital twin in the world coordinate system, which includes a pig tail model and a pig launcher / receiver inlet model.
[0029] The quantification calculation of the initial pose deviation is performed in the digital twin model, specifically including:
[0030] The initial axis parallelism deviation and coaxiality deviation are calculated by comparing the initial center axis vector of the pig with the reference center axis vector of the pig receiving and launching cylinder; and the initial end face perpendicularity deviation is calculated by comparing the normal vector of the tail end face of the pig with the reference center axis vector of the pig receiving and launching cylinder.
[0031] In one specific embodiment of the present invention, the optimization algorithm used in step three is a constrained particle swarm optimization algorithm;
[0032] The objective function of the algorithm is designed as a multi-objective weighted aggregation function F(P), whose mathematical expression is:
[0033] ;
[0034] in, This represents a set of candidate six-DOF pose adjustment parameters, including three translational components (Δx, Δy, Δz) and three rotational components (Δα, Δβ, Δγ).
[0035] These are preset weighting coefficients, summing to 1. These correspond to the optimization priorities for coaxiality, perpendicularity, and radial clearance uniformity, respectively.
[0036] Used to quantify the predicted coaxiality error between the pig's central axis and the pipeline inlet's central axis after pose adjustment P;
[0037] This is used to calculate the predicted perpendicularity error between the normal vector of the tail end face of the pig and the central axis of the pipeline inlet after quantitative adjustment. The error value is the cosine of the angle between the two, and the value range is [0,1].
[0038] The variance of the radial clearance between the outer edge contour of the pig and the inner edge contour of the pipeline inlet after adjustment is used to calculate the variance. It is obtained by uniformly sampling multiple points along the outer edge contour of the pig sealing plate. The smaller the value, the better the uniformity of the clearance.
[0039] In one specific embodiment of the present invention, the constraints of the constrained particle swarm optimization algorithm are set as the physical motion limits of the positioning execution module, specifically including the maximum extension stroke, maximum motion speed and maximum motion acceleration of the six drive rods of the positioning execution module, as well as the workspace boundary determined by its platform geometry; during the iteration process of the algorithm, any candidate solution that exceeds the physical motion limit will be judged as an infeasible solution and given a very large penalty fitness value.
[0040] In a specific embodiment of the present invention, the servo execution process in step four is specifically as follows:
[0041] When the positioning execution module is a six-legged parallel platform, the central processing and optimization module uses an inverse kinematics model to precisely decompose the optimal six-degree-of-freedom pose adjustment matrix into the specific length variables that each of the six parallel drive rods needs to extend or retract. These length variables are sent as control commands to the servo controller of the positioning execution module. The servo controller drives six high-precision servo motors to precisely control the rotation of the ball screw, thereby achieving synchronous and precise changes in the length of the six drive rods, and finally driving the working platform carrying the pig to complete the spatial composite motion.
[0042] In one specific embodiment of the present invention, the six drive rods of the positioning execution module adopt a high-precision ball screw transmission mechanism with built-in preload and are driven by AC servo motors. Each motor integrates a 24-bit absolute encoder to ensure that the position information can still be maintained after power failure and to achieve high-precision closed-loop position control. The working platform is designed with a standardized quick clamping interface to be compatible with pigs of different outer diameters and lengths.
[0043] In a specific embodiment of the present invention, the qualified tolerance threshold in step five includes a coaxiality deviation threshold, an axis parallelism deviation threshold, and an end face perpendicularity deviation threshold; if the residual pose deviation is less than or equal to the tolerance threshold, the system determines that the alignment is successful and sends an alignment completion signal to the main control system; the first original point cloud data, the second original point cloud data, and a human-computer interaction module display the digital twin model, key alignment parameters, and system operating status in real time, and can visually demonstrate the virtual adjustment process of the pig's posture and the convergence curve of the objective function value of the optimization algorithm.
[0044] In addition, this invention also discloses a device for quickly optimizing the alignment parameters of a pig launching and receiving cylinder, comprising:
[0045] The data acquisition module integrates at least one fixed first three-dimensional scanning unit and one mobile second three-dimensional scanning unit. The scanning units all adopt the structured light three-dimensional imaging principle and are responsible for non-contact acquisition of three-dimensional point cloud data of the tail of the pig and the inlet of the variable diameter section of the pig launcher and receiver.
[0046] The positioning execution module is a six-degree-of-freedom parallel positioning platform, which is used to carry and perform precise spatial position and attitude adjustment of the pig according to control commands.
[0047] The central processing and optimization module, in hardware form of an industrial control computer, communicates with the data acquisition module and the positioning execution module. The central processing and optimization module is configured as follows:
[0048] Receive and process point cloud data from the data acquisition module to extract key geometric features of the pig and the launcher / receiver tube, and quantify the initial pose deviation.
[0049] Based on the initial pose deviation, an optimal six-degree-of-freedom pose adjustment matrix for correcting the initial pose deviation is calculated by running a constrained multi-objective optimization algorithm.
[0050] The optimal six-degree-of-freedom pose adjustment matrix is converted into control commands and sent to the positioning execution module to drive it to perform pose adjustment;
[0051] Furthermore, after the pose adjustment is completed, the data acquisition module is controlled to perform a verification scan, calculate the residual pose deviation, and decide whether to end the alignment process or start a new round of optimization and fine-tuning based on the comparison result of the residual pose deviation and the preset tolerance, so as to achieve closed-loop control.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] This invention fundamentally breaks through the open-loop control mode of traditional mechanical positioning, which relies on preset parameters and human experience. By constructing a technology chain of real-time measurement, intelligent calculation, precise execution, and closed-loop verification, this invention creates a deterministic control system capable of autonomously handling actual geometric deviations. It accurately captures the true spatial relationship between the pig and the pipeline using non-contact 3D scanning, dynamically generates optimal alignment parameters in a digital twin model through optimization algorithms, achieves precise mapping of physical space using a high-precision six-degree-of-freedom platform, and finally ensures that the alignment result continuously approaches the theoretical optimal value through verification scanning. This invention's solution eliminates the quality fluctuations caused by relying on experience-based trial and error in traditional methods, enabling a leapfrog improvement in core indicators of pig alignment operations. Ultimately, it forms a complete automated alignment system covering perception, decision-making, and execution, providing a reliable technical foundation for the oil and gas pipeline maintenance field. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.
[0055] Figure 1 This is a flowchart illustrating the method of the present invention. Detailed Implementation
[0056] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0057] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0058] Example 1: See Figure 1 This embodiment discloses a method for optimizing the rapid alignment parameters of the pig launcher and receiver tubes. Through a highly integrated closed-loop control system, precise and automated alignment of the pig with the variable-diameter inlet of the launcher and receiver tubes is achieved before launch.
[0059] The method for optimizing the rapid alignment parameters of the pig launching and receiving tubes is based on a rapid alignment parameter optimization device for the pig launching and receiving tubes. This device mainly consists of a data acquisition module, a positioning execution module, a central processing and optimization module, and a human-machine interface module. These modules communicate at high speed and deterministically via an EtherCAT industrial Ethernet bus, with the central processing and optimization module acting as the master station for unified coordination.
[0060] The specific method includes the following steps:
[0061] Step 1: Data Acquisition. A data acquisition module is used to perform a three-dimensional scan on the tail end of the pig mounted on a positioning execution module and the inlet of the variable diameter section of a pig launcher and receiver tube. The first original point cloud data representing the actual three-dimensional shape of the tail end of the pig and the second original point cloud data representing the actual three-dimensional shape of the inlet of the variable diameter section of the pig launcher and receiver tube are obtained in a non-contact manner.
[0062] System initialization and construction of three-dimensional spatial coordinate reference.
[0063] The operator first securely mounts a pig to be launched, such as a polyurethane pig with an outer diameter of 600 mm, onto the working platform of the positioning execution module. The positioning execution module physically utilizes a high-rigidity six-legged parallel platform. Its six drive rods employ C3-grade high-precision ball screws with built-in preload, driven by six AC servo motors with a peak torque of 2.5 N·m. Each motor integrates an absolute encoder with a resolution of up to 2^24, ensuring a repeatability of positioning accuracy better than 0.01 mm for the platform's six degrees of freedom (translation along the X, Y, and Z axes and rotation around these axes, i.e., pitch, yaw, and roll) in three-dimensional space, and also features a power-off position memory function. Both the platform base and the worktable are made of high-strength aerospace-grade 7075-T6 aluminum alloy, precision-machined and anodized to ensure sufficient structural rigidity and environmental resistance.
[0064] Upon startup, the central processing and optimization module first activates the data acquisition module. The data acquisition module contains two core 3D scanning units. The first 3D scanning unit is fixedly installed inside the launcher / receiver tube, positioned to ensure that its wide-angle lens can completely cover the variable-diameter section inlet of the launcher / receiver tube and its surrounding inner wall area.
[0065] The second 3D scanning unit is mounted on a 1.5-meter-long precision linear guide rail, which is parallel to the central axis of the launcher and receiver tube, allowing the second 3D scanning unit to move axially and thus completely scan the tail end face of the pig. Both scanning units use blue light structured light scanning technology and integrate a digital light processing (DLP) projection module, which can project an encoded blue light stripe pattern with a center wavelength of 450 nanometers. Two 5-megapixel industrial CMOS cameras simultaneously acquire the modulated stripe image of the surface of the object being measured. Blue light was chosen because of its short wavelength, strong resistance to ambient light interference, and ability to achieve a higher signal-to-noise ratio and finer details when processing highly reflective metal surfaces.
[0066] Before any measurement, a global coordinate system calibration procedure must be performed. Multiple high-precision spherical target points are pre-positioned on the inner wall of the launcher / receiver tube and on the fixed base of the positioning execution module. Two scanning units scan these target points respectively, and using global optimization algorithms from photogrammetry (such as Bundle Adjustment), calculate the precise transformation matrix of each scanning unit's local coordinate system relative to a unified world coordinate system. The world coordinate system is defined as follows: its origin is located at the theoretical center of the inlet of the variable-diameter section of the launcher / receiver tube, the Z-axis points along the theoretical central axis of the launcher / receiver tube towards the launch direction, the X-axis is horizontal, and the Y-axis is vertically upward, forming a right-handed Cartesian coordinate system. This ensures that all subsequently acquired 3D point cloud data can be accurately placed under the same spatial reference for analysis and calculation, which is the fundamental prerequisite for achieving high-precision alignment.
[0067] High-precision acquisition of real-time geometric data.
[0068] The central processing and optimization module issues commands to drive the slide table, equipped with the second 3D scanning unit, to move uniformly along the linear guide at a speed of 50 mm / s, scanning the tail of the pig from multiple different axial positions. This multi-view scanning strategy effectively overcomes geometric occlusion that may occur with a single viewpoint, ensuring the acquisition of complete 3D information on the pig's tail end face, sealing disc edge, and outer contour of the cylinder. During the scanning process, the scanning unit acquires data at a rate of 15 frames per second, ultimately generating the first raw point cloud data containing approximately 5 million data points.
[0069] Simultaneously, the fixed first 3D scanning unit also performed a static scan of the variable-diameter section inlet and surrounding area of the launcher / receiver tube, acquiring a second raw point cloud data containing approximately 3 million data points. The entire data acquisition process took no more than 30 seconds, and the average point spacing of the acquired point cloud data was less than 0.1 mm, with a single-point measurement accuracy of 0.05 mm.
[0070] The massive amount of raw point cloud data collected is immediately transmitted to the central processing and optimization module via the EtherCAT bus. Geometric features are fitted using the RANSAC algorithm, and random errors are effectively reduced by utilizing the statistical averaging principle, making the feature extraction accuracy better than the single-point measurement accuracy (0.05 mm), reaching the 0.01 mm level.
[0071] Step 2: Feature extraction and deviation quantization. The first and second raw point cloud data are transmitted to a central processing and optimization module. The central processing and optimization module processes the point cloud data to extract the key geometric features of the initial center axis vector of the pig and the reference center axis vector of the launcher and receiver. Based on the comparison of the key geometric features, the initial pose deviation of the pig relative to the launcher and receiver is quantified and calculated.
[0072] Point cloud data processing and key geometric feature extraction.
[0073] The central processing and optimization module is configured as a high-performance industrial control computer, equipped with an Intel Core i7-10700K processor, 64GB DDR4 memory, and an NVIDIA Quadro RTX 4000 professional graphics card for parallel acceleration of point cloud processing algorithms.
[0074] The point cloud preprocessing unit within the module performs outlier removal on the first and second raw point cloud data. A statistical filter is employed to perform statistical analysis on the neighborhood of each point, calculating the average distance to other points within that neighborhood. If this average distance exceeds a standard deviation threshold determined by the global point cloud distance distribution (e.g., greater than the global average distance plus 2.5 times the standard deviation), the point is identified as noise and removed. This effectively filters out artifacts caused by airborne dust reflection or surface multiple scattering.
[0075] After noise reduction, for the first point cloud data representing the tail of the pig, the Random Sample Consensus (RANSAC) algorithm is used to robustly fit the spatial plane equation of its tail end face. The algorithm randomly selects three points to form a candidate plane, then calculates the distance from all other points in the point cloud to this plane, and marks points with a distance less than a preset threshold (e.g., 0.2 mm) as inliers. Through repeated iterations (e.g., 500 times), the plane with the most inliers is selected as the best-fit plane. Based on the equation of this plane, the normal vector of the end face can be accurately calculated.
[0076] Geometric center calculations are performed on all interior points to obtain the three-dimensional coordinates of the end face center point. The initial center axis vector of the pig is defined as a vector passing through this center point and parallel to the end face normal vector. Similarly, for the second point cloud data of the pig launcher inlet, the RANSAC algorithm is also used, but this time a spatial circle is fitted. Three points are randomly selected to determine a candidate circle, and the distances from other points to the circumference of this circle are calculated. Finally, the spatial circle with the most interior points is found. The spatial equation of this circle directly gives its center coordinates, the normal vector of the plane it lies in (i.e., the reference center axis vector of the launcher and receiver), and the precise inlet inner diameter.
[0077] Construction of high-fidelity digital twin model and initial deviation quantification.
[0078] The central processing and optimization module, within its internal virtual environment, uses the extracted center point and normal vector of the pig tail end face, as well as the center, normal vector, and radius of the launching and receiving tube inlet, to construct a mathematical model that corresponds to the physical world in real time—a digital twin.
[0079] In this digital twin model, deviation quantification calculations are performed. The initial axis parallelism deviation is quantified as the angle between the initial center axis vector of the pig and the reference center axis vector of the pig launcher / receiver. The initial coaxiality deviation is quantified as the shortest spatial distance between the two axes. The initial end face perpendicularity deviation is quantified as the angle between the normal vector of the pig's tail end face and the reference center axis vector of the pig launcher / receiver. These deviation values together constitute an initial deviation state vector. For example, the calculated initial coaxiality deviation is 15.2 mm, the axis parallelism deviation is 1.2 degrees, and the end face perpendicularity deviation is 1.5 degrees.
[0080] Among them, axis parallelism deviation refers to the angular deviation between the central axis of the pig and the central axis of the launching and receiving tube, and end face perpendicularity deviation refers to the angular deviation between the normal vector of the tail end face of the pig and the central axis of the launching and receiving tube. Step 3: Parameter optimization. Based on the quantified initial pose deviation, the central processing and optimization module starts the optimization algorithm and performs iterative optimization calculations in the digital twin model to obtain an optimal six-degree-of-freedom pose adjustment matrix for correcting the initial pose deviation.
[0081] Multi-objective positive parameter optimization calculation.
[0082] The alignment parameter optimization unit within the central processing and optimization module is activated. The core of this unit is an improved constrained particle swarm optimization (CPSO) algorithm. The algorithm aims to search for an optimal six-DOF pose adjustment matrix, composed of three translational components Δx, Δy, Δz and three rotational components Δα, Δβ, Δγ, applied to the current pose of the pig to achieve an ideal alignment state. Here, Δx, Δy, Δz represent the translation amounts (in millimeters) along the X, Y, and Z axes of the world coordinate system, respectively, and Δα, Δβ, Δγ represent the rotation angles (in radians or degrees) around the X, Y, and Z axes, respectively. The fitness function F(P) of this algorithm is carefully designed as a multi-objective weighted aggregation function, expressed as:
[0083] ;
[0084] Specifically, P represents a candidate set of six-DOF pose adjustment parameters.
[0085] It is a penalty function used to quantify the predicted coaxiality error between the central axis of the pig and the central axis of the pig receiving and launching tube after applying pose adjustment P to the pig in the digital twin model. Specifically, it is calculated as the shortest spatial distance (in millimeters) between the two axes. The smaller the error, the smaller the function value.
[0086] It is a penalty function used to quantify the predicted perpendicularity error between the normal vector of the tail end face of the pig and the central axis of the launching and receiving tube after adjustment. Specifically, it is calculated as the cosine value of the angle between the two (dimensionless). The smaller the error, the smaller the function value.
[0087] To assess the uniformity of the clearance after alignment, it performs uniform multi-point sampling (at least 8 points) along the outer edge contour of the pig sealing disc in a digital twin model, calculates the shortest radial distance from each sampling point to the inner edge contour of the pig launcher / receiver inlet, and then calculates the variance (unit: mm²) of these distance values. The smaller the variance, the more uniform the clearance, and the smaller the function value.
[0088] The weighting coefficients, calibrated through extensive experiments, are set in the preferred embodiment to w1=0.5, w2=0.3, and w3=0.2. This reflects that in alignment tasks, coaxiality is the primary objective, followed by perpendicularity, and finally, the uniformity of the gap. In practical applications, the weighting coefficients can be adjusted according to specific working conditions.
[0089] The CPSO algorithm uses a particle swarm size of 100 particles, each representing a six-dimensional pose adjustment scheme. The algorithm iteratively optimizes within a digital twin model, with a maximum of 200 iterations. In each iteration, each particle updates its velocity and position based on its historical best position and the global best position of the entire particle swarm. The algorithm is constraint-based, with constraints derived from the physical motion limits of the positioning execution module, including the maximum extension / retraction of the six drive rods (e.g., ±150 mm), maximum movement speed (e.g., 20 mm / s), and the complex workspace boundaries determined by the platform geometry. Any particle causing the pig's movement to exceed these physical constraints is penalized with a large fitness value and is thus naturally eliminated by the algorithm. After approximately 5 seconds of computation, the CPSO algorithm converges, finding the optimal six-DOF pose adjustment matrix that minimizes the objective function F(P).
[0090] Step 4: Servo execution. The central processing and optimization module converts the optimal six-degree-of-freedom pose adjustment matrix into low-level control instructions for the positioning execution module and sends them to the positioning execution module to drive the pig to complete a spatial composite motion so as to adjust the physical pose to be consistent with the optimal target pose calculated by the optimization algorithm.
[0091] Pose correction command generation and servo execution.
[0092] The central processing and optimization module calculates the optimal six-DOF pose adjustment matrix and, through a precise inverse kinematics model, solves it in real time into the target length variables ΔL1, ΔL2, ..., ΔL6 required for the extension and retraction of each of the six parallel drive rods. These target length variables are encapsulated as control commands and sent to the servo controller of the positioning execution module via the EtherCAT bus at 1-millisecond intervals. Upon receiving the commands, the servo controller immediately drives the six servo motors, precisely controlling the rotation of the ball screws through its internal position, speed, and current three-loop control, thereby achieving synchronous, smooth, and precise changes in the length of the six drive rods. Ultimately, this drives the working platform carrying the pig, completing a smooth, shock-free spatial composite motion, precisely adjusting the physical pose of the pig to be completely consistent with the optimal target pose calculated by the optimization algorithm.
[0093] Step 5: Verification Feedback. After the positioning execution module completes the pose adjustment, Step 1 and Step 2 are repeated to obtain the corrected residual pose deviation. The calculated residual coaxiality deviation, axis parallelism deviation, and end face perpendicularity deviation are compared with their respective preset acceptable tolerance thresholds. If any residual pose deviation is greater than the corresponding tolerance threshold, the residual pose deviation is used as a new initial deviation and returned to Step 3 to form a closed-loop feedback control until all residual pose deviations are less than or equal to the corresponding acceptable tolerance thresholds.
[0094] Verification of positive results and closed-loop feedback.
[0095] After the positioning execution module completes the pose adjustment and stabilizes, the central processing and optimization module triggers the data acquisition module to perform a rapid verification scan. This process completely repeats steps one and two, namely, re-acquiring point cloud data from the pig and launch / receiver inlets and re-extracting key geometric features. Based on the new geometric data, the corrected residual pose deviation is calculated.
[0096] A set of acceptable tolerance thresholds is preset; for example, coaxiality deviation must be less than 0.1 mm, and axis parallelism deviation must be less than 0.1 degrees. The calculated residual coaxiality deviation, axis parallelism deviation, and end face perpendicularity deviation are compared with their respective preset acceptable tolerance thresholds. If all residual pose deviations are within the tolerance range, the central processing and optimization module determines that the alignment is successful and displays a green "alignment complete" status indicator through the human-machine interface module, and sends a signal to the upper-level main control system to prepare for launch. If any residual pose deviation exceeds the tolerance threshold, possibly caused by minor mechanical backlash or environmental vibration, this residual pose deviation is automatically used as a new initial deviation, and the process returns to step three to start a new round of fine-tuning optimization calculations and servo execution with less computational load. The closed-loop feedback mechanism ensures the reliability and high accuracy of the final alignment result until the engineering requirements are met.
[0097] As a preferred implementation, the human-machine interface module employs a 15.6-inch industrial-grade resistive touchscreen. The interface can display a digital twin model in real-time 3D visualization, allowing operators to intuitively observe the virtual adjustment process of the pig from its initial pose to the target pose. Simultaneously, the interface also displays key alignment parameters in real-time, in the form of dashboards and numbers, such as the current coaxiality and parallelism deviation values, as well as the convergence curve of the objective function value during the CPSO algorithm optimization process, greatly facilitating on-site operation and monitoring.
[0098] To facilitate a better understanding of the present invention by those skilled in the art, the present invention will be further described below in conjunction with specific embodiments.
[0099] The test subject was a natural gas pipeline launcher and receiver tube with an inner diameter of 610 mm (24 inches), and the pig to be launched was a test pig with three sets of polyurethane sealing discs.
[0100] First, the alignment operation is performed according to the method described in this embodiment. The pig is placed on the positioning execution module, and there is a significant human placement error in the initial pose. After the system starts, the entire process described above is executed automatically.
[0101] The data acquisition module obtained high-density point clouds at the tail end of the pig and the inlet of the pipeline.
[0102] The central processing and optimization module quantifies the initial deviations through algorithm analysis as follows: coaxiality deviation of 18.5 mm, axis parallelism deviation of 1.8 degrees, and end face perpendicularity deviation of 2.1 degrees.
[0103] The CPSO optimization algorithm was initiated with 100 particles, 200 iterations, and weight coefficients w1=0.5, w2=0.3, and w3=0.2. After 6.2 seconds of computation, the optimal pose adjustment matrix was obtained.
[0104] The positioning and execution module drives the pig to complete the spatial pose adjustment based on the calculated instructions, which takes 15.8 seconds.
[0105] The system performed verification scanning and calculations, obtaining the corrected residual pose deviations as follows: coaxiality deviation 0.08 mm, and axis parallelism deviation 0.05 degrees. All indicators were less than the preset tolerance thresholds (coaxiality < 0.1 mm, parallelism < 0.1°), and the system determined that the alignment was successful. The total time from scanning startup to successful alignment was 58 seconds.
[0106] Comparative Example 1: For comparison, the same pig and pig launcher / receiver were operated using a traditional alignment method. This method relies on two skilled technicians manually adjusting the equipment using a laser alignment instrument, an angle gauge, and a mechanical jack.
[0107] The workers first set up a laser alignment instrument on the flange of the pig launcher and receiver, emitting a laser beam as a reference center line. Then, they observed the position of the laser spot at the center of the pig's tail end, and repeatedly adjusted the position of the pig by operating two hydraulic jacks that control vertical and horizontal movement respectively, striving to make the laser spot coincide with the center of the pig in order to correct the coaxiality.
[0108] Next, a large-size digital protractor was used to measure the parallelism between the tail end face of the pig and the pipe flange face, and the angular deviation was corrected by adjusting the jacks or inserting shims of different thicknesses. The entire process required repeated measurements and adjustments, was tedious, and highly dependent on the worker's experience and sense of responsibility. After several attempts, taking a total of 35 minutes, the worker considered the optimal alignment to be achieved. The verification scanning function of this invention was used to measure this alignment result, and the actual positional deviations were: coaxiality deviation 1.2 mm, and axis parallelism deviation 0.8 degrees.
[0109] The data comparison is as follows:
[0110] To more intuitively demonstrate the technical advantages of the method of the present invention, the key performance indicators of Example 1 and Comparative Example 1 are quantitatively compared, and the results are shown in Table 1 below:
[0111] Table 1:
[0112]
[0113] The radial clearance uniformity in Table 1 is obtained through... The result, obtained through function calculation, reflects the uniformity of the gap distribution between the pig and the pipeline inlet after alignment.
[0114] As can be seen from the above-described Example 1, Comparative Example 1, and data comparison, the rapid alignment parameter optimization method for pig launching and receiving cylinders provided by this invention demonstrates a fundamental improvement in alignment accuracy, operational efficiency, and the degree of standardization and automation compared to existing technologies. Through a closed-loop "perception-decision-execution" model, it transforms the previously uncertain alignment process, which relied on manual experience, into a precise, fast, and reliable automated process. This effectively avoids serious problems such as pig jamming and abnormal wear of seals that may result from poor alignment, significantly improving the safety and economic benefits of pipeline cleaning operations.
[0115] This invention achieves a fundamental breakthrough over traditional manual alignment methods by constructing a complete closed-loop control system encompassing perception, decision-making, execution, and verification. Firstly, it combines non-contact 3D scanning technology with a digital twin model to achieve precise perception and digital modeling of the spatial pose relationship between the pig and the launch / receiver cylinder. Secondly, it employs a constrained particle swarm optimization control algorithm to dynamically solve for the optimal six-degree-of-freedom pose control parameters while considering physical motion limits, overcoming the insufficient adaptability of traditional preset parameter methods. Finally, through the synergistic effect of the servo control system and the verification feedback mechanism, a complete adaptive control loop is formed, ensuring that the final alignment accuracy significantly surpasses the limits of manual operation.
[0116] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0117] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for optimizing the rapid alignment parameters of a pig launching and receiving cylinder, characterized in that, Includes the following steps: Step 1: Data acquisition. A data acquisition module is used to perform a three-dimensional scan on the tail end of the pig mounted on a positioning execution module and the inlet of the variable diameter section of a pig receiving and launching tube. The first original point cloud data representing the actual three-dimensional shape of the tail end of the pig and the second original point cloud data representing the actual three-dimensional shape of the inlet of the variable diameter section of the pig receiving and launching tube are obtained in a non-contact manner. Step 2: Feature extraction and deviation quantization. The first and second raw point cloud data are transmitted to a central processing and optimization module. The central processing and optimization module processes the point cloud data to extract the key geometric features of the initial center axis vector of the pig and the reference center axis vector of the launcher and receiver. Based on the comparison of the key geometric features, the initial pose deviation of the pig relative to the launcher and receiver is quantified and calculated. Step 3: Parameter optimization. Based on the quantified initial pose deviation, the central processing and optimization module starts the optimization algorithm and performs iterative optimization calculations in the digital twin model to obtain an optimal six-degree-of-freedom pose adjustment matrix for correcting the initial pose deviation. Step 4: Servo execution. The central processing and optimization module converts the optimal six-degree-of-freedom pose adjustment matrix into low-level control instructions for the positioning execution module and sends them to the positioning execution module to drive the pig to complete a spatial composite motion so as to adjust the physical pose to be consistent with the optimal target pose calculated by the optimization algorithm. Step 5: Verification Feedback. After the positioning execution module completes the pose adjustment, Step 1 and Step 2 are repeated to obtain the corrected residual pose deviation. The calculated residual coaxiality deviation, axis parallelism deviation, and end face perpendicularity deviation are compared with their respective preset acceptable tolerance thresholds. If any residual pose deviation is greater than the corresponding tolerance threshold, the residual pose deviation is used as a new initial deviation and returned to Step 3 to form a closed-loop feedback control until all residual pose deviations are less than or equal to the corresponding acceptable tolerance thresholds.
2. The method for rapid alignment parameter optimization of the pig launching and receiving cylinders according to claim 1, characterized in that, Before step one, there is also a system initialization and coordinate reference construction step: The positioning execution module has the ability to perform six degrees of freedom adjustments in three-dimensional space; The data acquisition module includes a first three-dimensional scanning unit fixedly installed inside the launcher and receiver tube, and a second three-dimensional scanning unit installed on a movable guide rail for scanning the tail of the pig. The calibration program for the first and second raw point cloud data uses preset target points to establish a unified world coordinate system based on the central axis of the launch and receiver tube, ensuring that all three-dimensional spatial data collected by the first and second three-dimensional scanning units are represented and processed in the unified world coordinate system.
3. The method for rapid alignment parameter optimization of the pig launching and receiving cylinders according to claim 2, characterized in that, Both the first three-dimensional scanning unit and the second three-dimensional scanning unit adopt non-contact optical measurement technology, specifically blue light structured light scanning technology, with a center wavelength of 450nm and a measurement accuracy of 0.05mm; the second three-dimensional scanning unit moves along the movable guide rail and scans the tail of the pig from multiple different perspectives to obtain complete, high-density first raw point cloud data.
4. The method for rapid alignment parameter optimization of the pig launching and receiving cylinders according to claim 3, characterized in that, The feature extraction process in step two specifically includes: Point cloud preprocessing: The central processing and optimization module first performs outlier removal and noise reduction on the first and second original point cloud data, and uses a statistical filter to filter out noise points caused by ambient light or surface scattering. Features of the pig: The first point cloud data after processing is analyzed, and the coordinates of the center point and the normal vector of the end face of the pig are fitted by the random sampling consensus algorithm. Based on this, the initial central axis vector of the pig is calculated. Feature extraction of the launcher / receiver tube: The processed second point cloud data is analyzed, and the spatial equation of the contour circle of the variable diameter section inlet of the launcher / receiver tube is accurately fitted by the random sampling consensus algorithm, thereby determining its center coordinates, normal vector and precise inlet inner diameter, and calibrating the reference center axis vector of the launcher / receiver tube accordingly.
5. The method for rapid alignment parameter optimization of the pig launching and receiving cylinders according to claim 4, characterized in that, Prior to the point cloud preprocessing, a coordinate system registration sub-step is also included: By utilizing fixed target points pre-placed on the inner wall of the launcher / receiver tube and the base of the positioning execution module, the local coordinate systems of the first and second three-dimensional scanning units are accurately transformed to the world coordinate system using photogrammetry principles, thereby ensuring that all subsequently extracted geometric features have a unified spatial reference.
6. The method for rapid alignment parameter optimization of the pig launching and receiving cylinder according to claim 2, characterized in that, Before step three, there is also a digital twin model construction step: Based on the key geometric features extracted in step two, the central processing and optimization module constructs a high-fidelity digital twin in the world coordinate system, which includes a pig tail model and a pig launcher / receiver inlet model. The quantification calculation of the initial pose deviation is performed in the digital twin model, specifically including: By comparing the initial center axis vector of the pig with the reference center axis vector of the launching and receiving tube, the initial axis parallelism deviation and coaxiality deviation are calculated. And by comparing the normal vector of the tail end face of the pig with the reference center axis vector of the launching and receiving tube, the initial end face perpendicularity deviation is calculated.
7. The method for rapid alignment parameter optimization of the pig launching and receiving cylinder according to claim 6, characterized in that, The optimization algorithm used in step three is a constrained particle swarm optimization algorithm. The objective function of the algorithm is designed as a multi-objective weighted aggregation function F(P), mathematically expressed as: ; in, This represents a set of candidate six-DOF pose adjustment parameters, including three translational components (Δx, Δy, Δz) and three rotational components (Δα, Δβ, Δγ). Where Δx, Δy, and Δz represent the translation along the X, Y, and Z axes of the world coordinate system, respectively, in millimeters; and Δα, Δβ, and Δγ represent the rotation angles about the X, Y, and Z axes, respectively, in radians or degrees. , , These are preset weighting coefficients, summing to 1. These correspond to the optimization priorities for coaxiality, perpendicularity, and radial clearance uniformity, respectively. Used to quantify the predicted coaxiality error between the pig's central axis and the pipeline inlet's central axis after pose adjustment P; Used to quantify the predicted perpendicularity error between the normal vector of the tail end face of the pig and the central axis of the pipeline inlet. The predicted perpendicularity error is the cosine of the angle between the two, with a value range of [0,1]. The variance of the radial clearance between the outer edge contour of the pig and the inner edge contour of the pipeline inlet after adjustment is used to calculate the variance. It is obtained by uniformly sampling multiple points along the outer edge contour of the pig sealing plate. The smaller the value, the better the uniformity of the clearance.
8. The method for rapid alignment parameter optimization of the pig launching and receiving cylinder according to claim 7, characterized in that, The constraints of the constrained particle swarm optimization algorithm are set as the physical motion limits of the positioning execution module, specifically including the maximum extension stroke, maximum motion speed and maximum motion acceleration of the six drive rods of the positioning execution module, as well as the workspace boundary determined by its platform geometry. During the iteration process of the algorithm, any candidate solution that exceeds the physical motion limits will be judged as an infeasible solution and given a very large penalty fitness value.
9. The method for rapid alignment parameter optimization of the pig launching and receiving cylinders according to claim 1, characterized in that, The specific servo execution process in step four is as follows: When the positioning execution module is a six-legged parallel platform, the central processing and optimization module uses an inverse kinematics model to precisely decompose the optimal six-degree-of-freedom pose adjustment matrix into the specific length variables that each of the six parallel drive rods needs to extend or retract. These length variables are sent as control commands to the servo controller of the positioning execution module. The servo controller drives six high-precision servo motors to precisely control the rotation of the ball screw, thereby achieving synchronous and precise changes in the length of the six drive rods, and finally driving the working platform carrying the pig to complete the spatial composite motion.
10. A rapid alignment parameter optimization device for a pig launching and receiving cylinder, characterized in that, include: The data acquisition module integrates at least one fixed first three-dimensional scanning unit and one mobile second three-dimensional scanning unit. The scanning units all adopt the structured light three-dimensional imaging principle and are responsible for non-contact acquisition of three-dimensional point cloud data of the tail of the pig and the inlet of the variable diameter section of the pig launcher and receiver. The positioning execution module is a six-degree-of-freedom parallel positioning platform, which is used to carry and perform precise spatial position and attitude adjustment of the pig according to control commands. The central processing and optimization module, in hardware form of an industrial control computer, communicates with the data acquisition module and the positioning execution module. The central processing and optimization module is configured as follows: Receive and process point cloud data from the data acquisition module to extract key geometric features of the pig and the launcher / receiver tube, and quantify the initial pose deviation. Based on the initial pose deviation, an optimal six-degree-of-freedom pose adjustment matrix for correcting the initial pose deviation is calculated by running a constrained multi-objective optimization algorithm. The optimal six-degree-of-freedom pose adjustment matrix is converted into control commands and sent to the positioning execution module to drive the pose adjustment. Furthermore, after the pose adjustment is completed, the data acquisition module is controlled to perform a verification scan, calculate the residual pose deviation, and decide whether to end the alignment process or start a new round of optimization and fine-tuning based on the comparison result of the residual pose deviation and the preset tolerance, so as to achieve closed-loop control.