Magnetic track pipeline robot control method and system based on machine vision
By integrating machine vision and magnetic tracking technology into pipeline robots, efficient and accurate detection of internal defects of pipelines is achieved, and the problems of low efficiency and high cost of traditional inspection methods are solved, and a safer and more reliable pipeline maintenance solution is provided.
Patent Information
- Application Number
- CN202510256016.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-06-10
AI Technical Summary
The prior art is difficult to detect defects inside pipes efficiently and accurately, especially in complex and harsh working environments, where traditional methods are costly, inefficient and have a great impact on production.
The robot control method of magnetic track pipe based on machine vision is adopted, and the pipe cross-sectional profile is scanned in real time through ultrasonic modules to dynamically adjust the magnetic suction strength of the track; when encountering bent pipes, the curvature radius of bent pipes is obtained and the robot's torque control strategy is formulated; the binocular camera is used to collect the inner wall images of the pipeline, and combined with lightweight convolutional neural networks and multi-scale feature fusion analysis, to achieve accurate detection and recording of internal defects of the pipeline.
Automatic detection, positioning and recording of internal defects of pipelines is realized, the efficiency and accuracy of inspection are improved, the inspection costs and impact on production are reduced, and effective technical means are provided for the safe operation and maintenance of pipelines.
Smart Images

Figure CN120122532A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline robots, and in particular to a control method and system of a magnetic crawler pipeline robot based on machine vision. Background Art
[0002] As energy demand continues to rise, the importance of power plants has become increasingly prominent. Among them, thermal power plants, as one of the main ways of generating electricity, accounted for 69.96% of the country's total power generation that year. In thermal power plants, the safe and stable operation of various pipeline systems plays a key role in ensuring power generation efficiency and reliability. However, during the long-term operation of pipelines, they are often in a complex and harsh working environment. This makes it easy for many problems to occur inside the pipeline, such as corrosion caused by chemical erosion, scaling caused by the deposition of impurities in the water, and cracks caused by factors such as pressure and temperature changes. If these problems are not detected and properly handled in a timely manner, they are likely to cause serious safety accidents and forced production interruptions. This will not only bring huge economic losses to the company, but may also cause serious pollution and damage to the surrounding environment.
[0003] In order to ensure the safe operation of pipelines, it is urgent to develop an efficient and accurate pipeline internal condition detection technology, which has extremely important practical significance and application value. Traditional pipeline detection methods usually require the dismantling of the pipeline, which is not only costly, but also has a long maintenance cycle, which will have a great impact on production. Some existing non-destructive testing technologies, such as ultrasonic testing and radiographic testing, can detect pipeline defects to a certain extent, but they are mainly tested from the outside of the pipeline. For the internal conditions of the pipeline, especially some minor defects and problems, the detection effect is not ideal.
[0004] In this context, a new type of robot inspection technology has emerged. This technology allows the robot to carry the inspection equipment into the pipeline and use machine vision and image recognition technology to conduct autonomous inspection of the inside of the pipeline. With its unique magnetic track design, the magnetic track pipeline robot can stably walk inside the pipeline and collect image information inside the pipeline through the camera and other equipment installed on the robot. Then, using advanced image recognition algorithms, these images are analyzed and processed to determine whether there are abnormal points in the pipeline, such as corrosion, scaling, cracks, etc. Once an abnormal point is found, the robot will automatically record its location to provide an accurate basis for subsequent maintenance and processing. This new inspection technology not only improves the efficiency and accuracy of inspection, but also reduces the inspection cost and the impact on production, providing a new and effective solution to ensure the safe operation of the pipeline. Summary of the invention
[0005] The present invention overcomes the deficiencies of the prior art and provides a control method and system for a magnetic crawler pipeline robot based on machine vision.
[0006] The technical solution adopted by the present invention to achieve the above object is as follows:
[0007] The first aspect of the present invention discloses a control method for a magnetic crawler pipeline robot based on machine vision, including the following steps:
[0008] Based on the ultrasonic module, the cross-sectional profile of the pipeline is scanned in real time, and the magnetic suction force intensity of the crawler is dynamically adjusted to adapt to the change of the pipe diameter.
[0009] When encountering a bent pipe, obtain the curvature radius of the bent pipe, and formulate a torque control strategy for the robot according to the curvature radius of the bent pipe.
[0010] During the movement process, the inner wall images of the pipeline are synchronously collected by the binocular camera at a fixed frame rate, and a lightweight convolutional neural network is used to perform a global defect rough screening on the inner wall images of the pipeline to obtain the abnormal area.
[0011] Perform multi-scale feature fusion analysis on the abnormal area, and combine the morphological differences of each defect to accurately identify the defects in the abnormal area and obtain the defect types in the abnormal area.
[0012] Bind the defect types, geometric parameters of the abnormal area with the current robot pose, and generate a record of the defect position and type including the pipeline coordinate system.
[0013] Preferably, based on the ultrasonic module, the cross-sectional profile of the pipeline is scanned in real time, and the magnetic suction force intensity of the crawler is dynamically adjusted to adapt to the change of the pipe diameter. Specifically:
[0014] High-frequency acoustic wave signals are synchronously emitted in a circular distribution manner through multi-angle ultrasonic sensors, and the echo data reflected from the inner wall of the pipeline are received in real time.
[0015] According to the echo data, calculate the echo time difference and intensity distribution in each direction, reconstruct the three-dimensional point cloud data of the pipeline cross-section according to the echo time difference and intensity distribution in each direction, fit the local surface through the three-dimensional point cloud data of the pipeline cross-section, and obtain the surface characteristics of the pipeline cross-section.
[0016] Perform polynomial interpolation on the surface characteristics, obtain the curve of the surface characteristic change of the pipeline cross-section, obtain the first derivative of the curve of the surface characteristic change, obtain the pipe diameter change gradient value of the current pipeline area, and obtain the absolute value of the gradient of the pipe diameter change gradient value of the current pipeline area.
[0017] If the absolute value of the gradient is less than the preset threshold, the current intensity of the electromagnet current is adjusted in real time based on the linear interpolation model.
[0018] If the absolute value of the gradient is greater than a preset threshold, a dynamic compensation mode is triggered, and a feedforward-feedback composite control structure is used to adjust the magnetic suction force output.
[0019] Preferably, if the absolute value of the gradient is less than a preset threshold, the current intensity of the electromagnet is adjusted in real time based on a linear interpolation model, specifically:
[0020] Call the preset curvature-current mapping table and obtain the second derivative of the surface feature change curve to obtain the pipe wall curvature data;
[0021] Input the currently extracted pipe wall curvature data into the mapping table, match the interval by the bisection method, construct a linear interpolation function based on the curvature values at the interval endpoints and their corresponding reference current values, and calculate the theoretical current intensity corresponding to the current curvature;
[0022] At the same time, introduce a real-time magnetic suction force feedback mechanism, collect the actual adsorption force distribution between each magnetic track unit and the pipe wall through an annularly distributed Hall sensor array, input the theoretical current value into the dynamic compensation controller, and combine the adsorption force deviation and the curvature change rate to correct the current output value;
[0023] Subsequently, activate the current segmented gradient module, judge the increasing or decreasing trend of the magnetic suction force according to the curvature gradient direction. If the curvature increases, the current intensity is gradually increased step by step according to an exponential decay curve. Otherwise, a stepped descent strategy is adopted to avoid track slippage caused by sudden current changes;
[0024] Finally, update the reference current values at the endpoints of the interpolation interval based on historical adjustment data, screen the current-curvature relationship data in the recent stable adsorption state through a sliding window algorithm, dynamically optimize the mapping table parameters, and form an adaptive closed-loop adjustment system to ensure the smooth transition of the magnetic suction force with the pipe wall curvature.
[0025] Preferably, if the absolute value of the gradient is greater than a preset threshold, a dynamic compensation mode is triggered, and a feedforward-feedback composite control structure is used to adjust the magnetic suction force output, specifically:
[0026] Call the preset pipe diameter change rate-compensation current mapping table, divide the compensation interval according to the positive or negative sign and amplitude of the pipe diameter change gradient value, calculate the pre-compensation current base value using a piecewise linear interpolation algorithm, and superimpose the inertial compensation factor corresponding to the real-time movement speed of the robot to generate a feedforward current command;
[0027] At the same time, start the feedback control loop, collect the real-time magnetic suction force distribution of each magnetic track unit through an annularly distributed Hall sensor array, and construct a deviation matrix between the average magnetic suction force and the target value;
[0028] Use a fuzzy PID algorithm to perform multi-dimensional membership analysis on the deviation matrix, dynamically adjust the weight of the integral term to suppress overshoot, and output a feedback correction current command;
[0029] Input the feedforward current command and the feedback correction current command into the hybrid controller to generate the final current control parameter command;
[0030] Synchronously execute the magnetic suction force dynamic equilibrium strategy, and perform spatial redistribution on the final current control parameter command according to the contact pressure distribution of each crawler unit to enhance the magnetic suction force on the pipe diameter contraction side;
[0031] Finally, record the actual pipe diameter change through the online learning module, update the Kalman filter parameters using the recursive least squares method, achieve adaptive optimization, and form a closed-loop disturbance rejection control architecture.
[0032] Preferably, when encountering a bent pipe, obtain the curvature radius of the bent pipe, and formulate the torque control strategy of the robot according to the curvature radius of the bent pipe. Specifically:
[0033] When the leading articulated probe of the robot detects a bent pipe, collect the geometric feature point cloud data in the axial and radial directions at the inlet of the bent pipe, reconstruct the center line trajectory of the bent pipe according to the geometric feature point cloud data and combined with the cubic spline interpolation algorithm, and calculate the curvature radius R of the bent pipe according to the center line trajectory of the bent pipe and combined with the least squares method;
[0034] If R is less than the preset safety threshold, trigger the emergency torque compensation mode. If R is greater than the preset safety threshold, keep the current control strategy unchanged;
[0035] In the trajectory planning stage, establish the pose mapping relationship between the bent pipe coordinate system and the robot body. Taking R as the constraint condition, generate a feasible passing trajectory that satisfies the minimum centrifugal force constraint through the dynamic window method, and calculate the theoretical contact angle of each crawler unit;
[0036] Based on the feasible passing trajectory and the theoretical contact angle, obtain the maximum torque value of each drive motor through the torque balance equation; at the same time, obtain the real-time torque value of each drive motor; calculate the difference between the real-time torque value and the maximum torque value to obtain the torque deviation value;
[0037] When the torque deviation value exceeds the safety threshold, dynamically adjust the real-time torque value of each drive motor using the fuzzy rule base, and preferentially increase the inner crawler drive torque to offset the centrifugal effect; when the torque deviation value does not exceed the safety threshold, keep the current control strategy unchanged.
[0038] Preferably, use a lightweight convolutional neural network to perform a global defect rough screening on the inner wall image of the pipeline to obtain the abnormal area. Specifically:
[0039] Divide the inner wall image of the pipeline into sliding windows of 256×256 pixels, and set the step size to 128 pixels; if the bending radius R of the elbow is less than 5 times the pipe diameter, switch to a 192×192 window and reduce the step size to 64 pixels to adapt to the arc surface deformation;
[0040] Before inputting each window into the lightweight convolutional neural network, first extract multi-scale context features through the spatial pyramid pooling layer. When the edge density within the window is lower than the preset threshold, skip this window to reduce redundant calculations;
[0041] Use the Sigmoid function to generate an anomaly probability heat map in the range of [0,1], and initialize the global threshold to 0.7; obtain the anomaly probability of each window through the anomaly probability heat map;
[0042] If the standard deviation of the anomaly probabilities of 10 consecutive windows is less than 0.05, it is determined that the current pipeline segment is a defect-free area; when it is detected that the probability values are densely distributed in the range of 0.6 - 0.7, activate the region growing algorithm to merge adjacent low-probability anomaly windows;
[0043] For windows with an anomaly probability exceeding 0.7, use the non-maximum suppression algorithm to remove overlapping regions with an overlap rate greater than the preset overlap rate, and retain the window with the maximum probability as the center of the region of interest;
[0044] When the center of a region of interest is detected in three consecutive frames of images, map its bounding box coordinates to the global coordinate system of the pipeline and attach an initial confidence label to obtain the anomaly region.
[0045] Preferably, perform multi-scale feature fusion analysis on the anomaly region, combine the morphological differences of each defect, and accurately discriminate the defects in the anomaly region to obtain the defect type of the anomaly region. Specifically:
[0046] Perform Gaussian pyramid downsampling on the anomaly region image, calculate the multi-directional morphological gradient at each scale layer, and extract the edge intensity map; when the detection target is a crack, select pixels with a 45° direction gradient response value > 120 as the initial edge point set;
[0047] Calculate the fractal dimension FD of the anomaly region; if FD > 1.6 and the proportion of linear edges in the region > 70%, it is determined as a crack candidate area; if FD < 1.2 and the gray level variance of the region > 800, it is marked as a suspected fouling area;
[0048] Extract the saturation channel in the HSV color space, apply the LBP operator to generate a texture map, and generate a corrosion feature mark when the LBP variance of the peeling area > 2 times the original pipe wall texture variance;
[0049] The morphological gradient amplitude, fractal dimension, and texture variance of three scale layers are combined to form a feature vector. Principal component analysis is used to reduce the dimension of the feature vector to obtain the correlation coefficient between features. When the correlation coefficient between features > 0.8, the first 6 principal components are retained as the input vector of the support vector machine; otherwise, the first 10 principal components are retained as the input vector of the support vector machine. The output vector of the support vector machine is obtained.
[0050] If an output vector is in the color gradient direction and the texture peeling score > 0.8, it is classified as corrosion; if an output vector is in the gray-scale mutation intensity and the protrusion height > 2 mm, it is determined as fouling; the remaining output vectors are discriminated as cracks through the quadratic discriminant of the fractal dimension and edge linearity.
[0051] It also includes: performing Platt calibration on the classification probability of the support vector machine. When the corrosion class probability > 0.9 and the difference from the fouling class probability > 0.4, the final class is directly output; if the difference between the two class probabilities ≤ 0.2, it returns to the feature fusion stage, appends the hyperspectral data of the local area for spectral reflectance matching, and recalculates the classification weights.
[0052] Preferably, the defect type, geometric parameters of the abnormal area are bound to the current robot pose to generate a record of the defect position and type including the pipeline coordinate system, specifically:
[0053] The odometer displacement is obtained through the encoder, and dead reckoning is performed in combination with the angular velocity data of the IMU to construct a real-time six-degree-of-freedom pose estimation of the robot.
[0054] At the same time, the visual SLAM thread is started, SURF feature points in the binocular image are extracted for stereo matching. When the number of feature point matches exceeds the preset number, the visual observation and inertial data are aligned to generate a local pose with sub-centimeter accuracy.
[0055] If the displacement deviation between the IMU and visual positioning is greater than the preset deviation, the dynamic calibration mode is triggered: the movement is paused and rotated 360° to re-scan the environmental features, and the sensor error parameters are optimized by the least squares method.
[0056] When an abnormal area is detected, the timestamp of the current binocular camera frame is synchronously recorded, and the three-dimensional coordinates and attitude angles of the center point of the pipeline in the pipeline coordinate system at this moment are obtained from the positioning module.
[0057] According to the geometric parameters of the camera installation, the three-dimensional offset of the defect center point relative to the robot body is calculated, and the three-dimensional offset of the defect center point relative to the robot body is converted into the pipeline global coordinate through the homogeneous coordinate transformation matrix.
[0058] The pipeline global coordinate is recorded, and the pipeline global coordinate is bound to the defect type of the corresponding abnormal area to obtain a record of the defect position and type including the pipeline coordinate system.
[0059] In a second aspect of the present invention, a control system for a magnetic tracked pipeline robot based on machine vision is disclosed. The magnetic tracked pipeline robot control system includes a memory and a processor. A program for the control method of the magnetic tracked pipeline robot is stored in the memory. When the program for the control method of the magnetic tracked pipeline robot is executed by the processor, the steps of any one of the control methods of the magnetic tracked pipeline robot are implemented.
[0060] The present invention solves the technical defects existing in the background art and has the following beneficial effects: Based on the ultrasonic module, the cross-sectional profile of the pipeline is scanned in real time, and the magnetic suction force intensity of the track is dynamically adjusted to adapt to the change of the pipe diameter; when encountering a bent pipe, the curvature radius of the bent pipe is obtained, and a torque control strategy for the robot is formulated according to the curvature radius of the bent pipe; during the movement process, the inner wall images of the pipeline are synchronously collected by the binocular camera at a fixed frame rate, and a lightweight convolutional neural network is used to perform a global defect rough screening on the inner wall images of the pipeline to obtain the abnormal area; multi-scale feature fusion analysis is performed on the abnormal area, and combined with the morphological differences of each defect, the defects in the abnormal area are accurately discriminated to obtain the defect types in the abnormal area; the defect types, geometric parameters in the abnormal area are bound to the current robot pose to generate a record of the defect position and type including the pipeline coordinate system. The present invention realizes the automatic detection, positioning and recording of internal pipeline defects, improves the efficiency and accuracy of pipeline detection, and provides an effective technical means for the safe operation and maintenance of pipelines. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.
[0062] Figure 1 It is an overall method flow chart of a control method for a magnetic tracked pipeline robot based on machine vision;
[0063] Figure 2 It is a partial method flow chart of a control method for a magnetic tracked pipeline robot based on machine vision;
[0064] Figure 3 It is a system block diagram of a control system for a magnetic tracked pipeline robot based on machine vision. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.
[0066] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0067] As Figure 1 shown, the first aspect of the present invention discloses a control method for a magnetic tracked pipeline robot based on machine vision, including the following steps:
[0068] S102. Based on the ultrasonic module, scan the cross-sectional profile of the pipeline in real time, and dynamically adjust the magnetic suction force of the track to adapt to the change of the pipe diameter;
[0069] S104. When encountering a bent pipe, obtain the curvature radius of the bent pipe, and formulate a torque control strategy for the robot according to the curvature radius of the bent pipe;
[0070] S106. During the movement process, synchronously collect the inner wall images of the pipeline at a fixed frame rate through a binocular camera, and use a lightweight convolutional neural network to perform a global defect rough screening on the inner wall images of the pipeline to obtain abnormal areas;
[0071] S108. Perform multi-scale feature fusion analysis on the abnormal areas, and combine the morphological differences of each defect to accurately identify the defects in the abnormal areas and obtain the defect types of the abnormal areas;
[0072] S110. Bind the defect types, geometric parameters of the abnormal areas with the current robot pose, and generate a record of the defect positions and types including the pipeline coordinate system.
[0073] It should be noted that the present invention combines technologies such as ultrasonic scanning, image recognition and machine vision to realize the automatic detection, positioning and recording of internal pipeline defects, improve the efficiency and accuracy of pipeline detection, and provide an effective technical means for the safe operation and maintenance of pipelines.
[0074] Preferably, based on the ultrasonic module, scan the cross-sectional profile of the pipeline in real time, and dynamically adjust the magnetic suction force of the track to adapt to the change of the pipe diameter, as Figure 2 shown, specifically:
[0075] S202. Synchronously transmit high-frequency acoustic signals in a circular distribution manner through multi-angle ultrasonic sensors, and receive the echo data reflected by the inner wall of the pipeline in real time;
[0076] It should be noted that the ultrasonic sensor can be selected according to the actual detection requirements. The higher the frequency, the shorter the detection distance and the finer the resolution.
[0077] S204. Calculate the echo time differences and intensity distributions in each direction based on the echo data, reconstruct the three-dimensional point cloud data of the pipeline cross-section according to the echo time differences and intensity distributions in each direction, fit a local surface through the three-dimensional point cloud data of the pipeline cross-section, and obtain the surface characteristics of the pipeline cross-section;
[0078] S206. Perform polynomial interpolation on the surface characteristics to obtain the curve of the surface characteristic changes of the pipeline cross-section, obtain the first derivative of the curve of the surface characteristic changes, obtain the pipe diameter change gradient value of the current pipeline area, and obtain the absolute value of the gradient of the pipe diameter change gradient value of the current pipeline area;
[0079] S208. If the absolute value of the gradient is less than the preset threshold, adjust the electromagnetic current intensity in real time based on the linear interpolation model;
[0080] S210. If the absolute value of the gradient is greater than the preset threshold, trigger the dynamic compensation mode and adjust the magnetic suction output using a feedforward-feedback composite control structure.
[0081] Through this method, the robot can achieve adaptive walking in a complex pipeline environment. By scanning the pipeline cross-section contour in real time and dynamically adjusting the magnetic suction intensity of the crawler, it ensures that the robot can be stably adsorbed and move in pipelines with different pipe diameters, improving the adaptability and stability of the robot in a complex pipeline environment and providing a strong guarantee for the smooth progress of pipeline detection tasks.
[0082] Preferably, if the absolute value of the gradient is less than the preset threshold, adjust the electromagnetic current intensity in real time based on the linear interpolation model, specifically:
[0083] Call the preset curvature-current mapping table and obtain the second derivative of the curve of the surface characteristic changes to obtain the pipe wall curvature data;
[0084] It should be noted that the curvature-current mapping table divides a number of linear interpolation intervals based on the pipe wall curvature range, and each interval corresponds to an electromagnetic reference current value and a slope coefficient; the preset curvature-current mapping table is a table predefined by relevant technical personnel, which corresponds the curvature range of the pipeline inner wall to the current intensity of the electromagnet, so as to dynamically adjust the current output of the electromagnet according to the real-time measured curvature data, thereby maintaining the stable adsorption of the robot to the pipeline inner wall.
[0085] Input the currently extracted pipe wall curvature data into the mapping table, match the interval where it is located by the bisection method, construct a linear interpolation function based on the interval endpoint curvature values and their corresponding reference current values, and calculate the theoretical current intensity corresponding to the current curvature;
[0086] It should be noted that after the currently extracted pipe wall curvature data is input into the mapping table, the binary search algorithm is used to determine the interval where the current curvature data is located. The binary search divides the search interval into two equal parts, gradually narrowing the search range until the interval containing the current curvature data is found. Then, based on the curvature values of the interval endpoints and their corresponding reference current values, a linear interpolation function is constructed. The linear interpolation function forms a straight line by connecting the interval endpoints and is used to calculate the theoretical current intensity corresponding to the current curvature. Finally, the current curvature data is substituted into the constructed linear interpolation function to calculate the theoretical current intensity corresponding to the current curvature.
[0087] Meanwhile, a real-time magnetic suction force feedback mechanism is introduced. The actual adsorption force distribution between each magnetic track unit and the pipe wall is collected through an annularly distributed Hall sensor array. The theoretical current value is input into the dynamic compensation controller, and the current output value is corrected by combining the adsorption force deviation and the curvature change rate.
[0088] It should be noted that the Hall sensor array monitors the adsorption force distribution between each magnetic track unit and the pipe wall in real time and transmits the data to the dynamic compensation controller. The controller calculates the deviation between the actual adsorption force and the theoretical adsorption force and analyzes the change rate of the pipe wall curvature. Using the proportional-integral algorithm, the adsorption force deviation and the curvature change rate are used as inputs to calculate the corrected current output value. According to the corrected current output value, the dynamic compensation controller adjusts the current output of the electromagnet to achieve real-time adjustment of the magnetic suction force. Among them, the formula for correcting the current output value by the proportional-integral (PI) algorithm is:
[0089]
[0090] In the formula, I t is the corrected current output value; I S is the theoretical current reference value calculated by curvature interpolation; K p and k i are the proportional gain coefficient and the integral gain coefficient respectively, which are used to adjust the speed and steady-state accuracy of the control response; ΔF(t) is the deviation between the actual adsorption force measured by the Hall sensor and the target value, reflecting the instantaneous error of the adsorption state; is the change rate of the pipe curvature over time, which is used to predict the dynamic impact of future curvature changes on the adsorption force; α is the weight ratio coefficient of the curvature change rate and the adsorption force deviation, which is used to balance the contributions of both to the current adjustment; t is the time variable; d τ is the differential representing the integral variable.
[0091] Subsequently, activate the current segmented gradient module, and judge the increasing or decreasing trend of the magnetic suction force according to the curvature gradient direction. If the curvature increases, the current intensity is increased step by step according to the exponential decay curve; otherwise, a stepped-down strategy is adopted to avoid track slippage caused by sudden current changes.
[0092] It should be noted that, according to the first derivative of the curvature change curve, judge the curvature gradient direction, that is, whether the curvature increases or decreases. According to the curvature gradient direction, select the corresponding current intensity adjustment strategy. If the curvature increases, select to increase the current intensity step by step according to the exponential decay curve; if the curvature decreases, select to adopt the stepped-down strategy. If the curvature increases, according to the preset exponential decay curve parameters, the current intensity is increased step by step, and the increase amount of each step gradually decreases to achieve a smooth transition and avoid track slippage caused by sudden current changes. If the curvature decreases, according to the preset stepped-down parameters, the current intensity is decreased step by step, and the decrease amount of each step remains constant to achieve a smooth transition and avoid track slippage caused by sudden current changes.
[0093] Finally, update the reference current value of the interpolation interval endpoint based on the historical adjustment data. Screen the current-curvature relationship data in the recent stable adsorption state through the sliding window algorithm, dynamically optimize the mapping table parameters, and form an adaptive closed-loop adjustment system to ensure the smooth transition of the magnetic suction force with the pipe wall curvature.
[0094] It should be noted that collect and store the historical adjustment data, including the current intensity and adsorption force data under different curvatures. Use the sliding window algorithm to screen out the current-curvature relationship data in the recent stable adsorption state from the historical adjustment data. The sliding window algorithm analyzes the data within the window by setting a fixed-size window and gradually sliding the window position. Conduct statistical analysis on the screened current-curvature relationship data, calculate the average current intensity and adsorption force under different curvatures, and the linear relationship between the current intensity and the curvature. According to the statistical analysis results, update the reference current value of the interpolation interval endpoint. Take the average current intensity as the new reference current value and adjust the slope coefficient to maintain the linear relationship. By updating the reference current value of the interpolation interval endpoint, dynamically optimize the mapping table parameters and form an adaptive closed-loop adjustment system. This system can dynamically adjust the current output according to the real-time measured curvature data combined with the historical adjustment data to ensure the smooth transition of the magnetic suction force with the pipe wall curvature.
[0095] In summary, through this method, the robot can be stably adsorbed and moved in pipes with different diameters. By adjusting the electromagnet current intensity in real time, it ensures the smooth transition of the magnetic suction force with the pipe wall curvature, and improves the adaptability and stability of the robot in complex pipe environments.
[0096] Preferably, if the absolute value of the gradient is greater than the preset threshold, trigger the dynamic compensation mode, and adjust the magnetic suction force output by using a feedforward-feedback composite control structure. Specifically:
[0097] Call the pre-set mapping table of pipe diameter change rate - compensation current, divide the compensation interval according to the positive / negative sign and amplitude of the pipe diameter change gradient value, use the piecewise linear interpolation algorithm to calculate the base value of the pre-compensation current, and superimpose the inertia compensation factor corresponding to the real-time movement speed of the robot to generate the feedforward current command;
[0098] Among them, the pre-set mapping table of pipe diameter change rate - compensation current is a table predefined by relevant technical personnel, which corresponds the pipe diameter change rate of the inner wall of the pipe to the compensation current intensity of the electromagnet, so as to dynamically adjust the compensation current output of the electromagnet according to the real-time measured pipe diameter change rate, so as to maintain the stable adsorption of the robot on the inner wall of the pipe.
[0099] It should be noted that, first of all, according to the positive / negative sign and amplitude of the pipe diameter change gradient value, the pipe diameter change rate is divided into different compensation intervals, and each interval corresponds to a base value of the pre-compensation current. Then, use the piecewise linear interpolation algorithm to calculate the base value of the pre-compensation current according to the interval where the current pipe diameter change gradient value is located. Next, according to the real-time movement speed of the robot, calculate the corresponding inertia compensation factor and superimpose it on the base value of the pre-compensation current to generate the feedforward current command.
[0100] At the same time, start the feedback control loop, collect the real-time magnetic suction force distribution of each magnetic track unit through the annularly distributed Hall sensor array, and construct a deviation matrix between the average magnetic suction force and the target value;
[0101] It should be noted that the Hall sensor array monitors the magnetic suction force between each magnetic track unit and the pipe wall in real time and transmits the data to the feedback control loop. Then, calculate the average value of the magnetic suction forces of all magnetic track units and compare it with the preset target magnetic suction force value, so as to construct a deviation matrix between the average magnetic suction force and the target value.
[0102] Use the fuzzy PID algorithm to perform multi-dimensional membership analysis on the deviation matrix, dynamically adjust the weight of the integral term to suppress overshoot, and output the feedback correction current command;
[0103] It should be noted that, first of all, input the deviation matrix into the fuzzy PID controller, and the controller performs membership analysis according to each dimension of the deviation matrix to determine the fuzzy subset of the deviation matrix. Then, according to the membership degree of the fuzzy subset, dynamically adjust the weight of the integral term of the PID controller to suppress the overshoot phenomenon. Finally, according to the adjusted PID controller parameters, output the feedback correction current command.
[0104] Input the feedforward current command and the feedback correction current command into the hybrid controller to generate the final current control parameter command;
[0105] Synchronously execute the magnetic suction dynamic balance strategy. According to the contact pressure distribution of each track unit, perform spatial reallocation on the final current control parameter command to enhance the magnetic suction on the pipe diameter contraction side;
[0106] It should be noted that, first, according to the contact pressure data of each track unit collected by the Hall sensor array, calculate the pressure distribution of each unit. Then, according to the pressure distribution, perform spatial reallocation on the final current control parameter command, and allocate more current to the track units on the pipe diameter contraction side to enhance the magnetic suction on that side. Among them, the current spatial reallocation formula of the above magnetic suction dynamic balance strategy is:
[0107]
[0108] In the formula, I i is the final allocated current value of the i-th track unit; I f is the total current command after the combination of feedforward and feedback; P i is the measured contact pressure value of the i-th track unit (from the Hall sensor); γ is the magnetic suction enhancement coefficient on the pipe diameter contraction side; S i is the position identifier of the contraction side; n is the total number of magnetically distributed track units in a circular distribution; i is the index number of the magnetically distributed track units in a circular distribution, indicating the specific position of the currently calculated track unit in the circular array.
[0109] Finally, the online learning module records the actual pipe diameter change, and uses the recursive least squares method to update the Kalman filter parameters to achieve adaptive optimization and form a closed-loop disturbance rejection control architecture.
[0110] It should be noted that the online learning module records the actual pipe diameter change data in real time, and uses the recursive least squares method to update the parameters of the Kalman filter to adapt to the pipe diameter change. By continuously updating the filter parameters, adaptive optimization is achieved, the robustness and disturbance rejection ability of the control system are improved, and a closed-loop disturbance rejection control architecture is formed.
[0111] In summary, through the feedforward-feedback composite control structure, the magnetic suction output can be adjusted in real time to adapt to the rapid change of the pipe diameter. Through the dynamic compensation mode, combining the feedforward current command and the feedback correction current command, precise control of the magnetic suction is achieved. At the same time, the magnetic suction dynamic balance strategy can perform spatial reallocation on the current control parameters according to the contact pressure distribution of each track unit, and enhance the magnetic suction on the pipe diameter contraction side. The application of the online learning module and the Kalman filter realizes adaptive optimization and closed-loop disturbance rejection control, and improves the adaptability and stability of the robot in a complex pipeline environment.
[0112] Preferably, when encountering a bent pipe, obtain the curvature radius of the bent pipe, and formulate a torque control strategy for the robot according to the curvature radius of the bent pipe, specifically:
[0113] When the leading articulated probe of the robot detects a bent pipe, the geometric feature point cloud data in the axial and radial directions at the inlet of the bent pipe is collected. According to the geometric feature point cloud data and combined with the cubic spline interpolation algorithm, the center line trajectory of the bent pipe is reconstructed. According to the center line trajectory of the bent pipe and combined with the least squares method, the curvature radius R of the bent pipe is calculated;
[0114] It should be noted that when the leading articulated probe of the robot detects a bent pipe, the data acquisition module is immediately activated, and the axial and radial geometric feature point cloud data at the inlet of the bent pipe is obtained through the laser scanner on the probe. Subsequently, the cubic spline interpolation algorithm is used to smooth the collected point cloud data and reconstruct the center line trajectory of the bent pipe. Finally, based on the reconstructed center line trajectory, the least squares method is used to fit and calculate the curvature radius R of the bent pipe, and its calculation formula is:
[0115]
[0116] where R is the curvature radius of the bent pipe; a and b are the coordinates of the center of the fitting circle; C is the fitting parameter.
[0117] If R is less than the preset safety threshold, an emergency torque compensation mode is triggered. If R is greater than the preset safety threshold, the current control strategy remains unchanged;
[0118] In the trajectory planning stage, the pose mapping relationship between the bent pipe coordinate system and the robot body is established. With R as the constraint condition, a feasible passing trajectory that satisfies the minimum centrifugal force constraint is generated by the dynamic window method, and the theoretical contact angle of each track unit is calculated;
[0119] It should be noted that in the trajectory planning stage, first, the pose mapping relationship between the bent pipe coordinate system and the robot body is established to ensure that the robot can be accurately positioned in the bent pipe coordinate system. Then, with the curvature radius R of the bent pipe as the constraint condition, the dynamic window method is used to generate a feasible passing trajectory that satisfies the minimum centrifugal force constraint. Finally, according to the generated feasible passing trajectory, the theoretical contact angle of each track unit is calculated, and its calculation formula is:
[0120]
[0121] In the formula, θ i is the theoretical contact angle (relative to the normal direction of the center line of the bent pipe) of the i-th track unit; d i is the distance from the track unit to the geometric center of the robot; a i is the azimuth angle (robot coordinate system) of the track unit in the circular distribution; R is the curvature radius of the bent pipe.
[0122] Based on the feasible passing trajectory and the theoretical contact angle, obtain the maximum torque value of each drive motor through the torque balance equation; at the same time, obtain the real-time torque value of each drive motor; calculate the difference between the real-time torque value and the maximum torque value to obtain the torque deviation value;
[0123] When the torque deviation value exceeds the safety threshold, use the fuzzy rule base to dynamically adjust the real-time torque value of each drive motor, and preferentially increase the inner track drive torque to offset the centrifugal effect; when the torque deviation value does not exceed the safety threshold, then maintain the current control strategy unchanged.
[0124] It should be noted that, first, evaluate the current torque deviation situation according to the rules in the fuzzy rule base, and preferentially increase the torque value of the inner track drive motor to offset the centrifugal effect. Then, monitor the torque output of each drive motor in real time and adjust the torque value according to the feedback to ensure that the robot travels stably in the elbow pipe.
[0125] In summary, through this method, the robot can stably pass through the elbow pipe. By obtaining the curvature radius of the elbow pipe in real time and formulating the corresponding torque control strategy, the safety and stability of the robot at the elbow pipe are ensured. The feasible passing trajectory is generated by the dynamic window method, and the theoretical contact angle of each track unit is calculated to achieve precise control of the torque. At the same time, the torque value is dynamically adjusted through the fuzzy rule base, and the inner track drive torque is preferentially increased to offset the centrifugal effect, improving the adaptability and stability of the robot at the elbow pipe.
[0126] Preferably, a lightweight convolutional neural network is used to perform a global defect rough screening on the inner wall image of the pipeline to obtain the abnormal area, specifically:
[0127] Divide the inner wall image of the pipeline into sliding windows of 256×256 pixels, and set the step size to 128 pixels; if the curvature radius R of the elbow pipe is less than 5 times the pipe diameter, switch to a 192×192 window and reduce the step size to 64 pixels to adapt to the arc surface deformation;
[0128] Before each window is input into the lightweight convolutional neural network, first extract multi-scale context features through the spatial pyramid pooling layer. When the edge density within the window is lower than the preset threshold, skip this window to reduce redundant calculations;
[0129] It should be noted that, first, each window of 256×256 pixels is input into the spatial pyramid pooling layer to extract multi-scale context features. Then, calculate the edge density within the window. When the edge density is lower than the preset threshold, skip this window to reduce unnecessary calculations, thereby reducing the redundant calculation amount.
[0130] Use the Sigmoid function to generate an abnormal probability heat map in the [0,1] interval, initialize the global threshold to 0.7; obtain the abnormal probability of each window through the abnormal probability heat map;
[0131] If the standard deviation of the abnormal probability of 10 consecutive windows is less than 0.05, it is determined that the current pipeline segment is a defect-free area; when it is detected that the probability values are densely distributed in the range of 0.6 - 0.7, the region growing algorithm is activated to merge adjacent low-probability abnormal windows;
[0132] It should be noted that the output of the fully connected layer of the lightweight convolutional neural network is mapped to a probability value in the range of [0, 1] through the Sigmoid activation function, and an abnormal probability heat map is generated pixel by pixel, where each pixel value represents the abnormal probability of the corresponding area; subsequently, the global threshold is initialized to 0.7, and all sliding windows of the heat map are traversed, and the mean value of the pixel probability values in each window is calculated as the abnormal probability of the window; if the window probability mean exceeds the threshold, it is marked as a candidate abnormal window, and at the same time, the discreteness of the continuous window probability distribution is statistically analyzed: when the probability standard deviation of 10 consecutive windows is less than 0.05, it is determined that this section is a normal area and the subsequent detection is skipped; finally, according to the probability distribution characteristics of the heat map, the local threshold is dynamically adjusted to optimize the detection sensitivity to ensure that high-probability abnormal areas are accurately captured.
[0133] For windows with an abnormal probability exceeding 0.7, the non-maximum suppression algorithm is used to remove overlapping regions with an overlap ratio greater than the preset overlap ratio, and the window with the maximum probability is retained as the center of the region of interest;
[0134] When the center of a region of interest is detected in three consecutive frames of images, its bounding box coordinates are mapped to the global coordinate system of the pipeline, and an initial confidence label is attached to obtain the abnormal area.
[0135] It should be noted that first, all candidate windows are sorted in descending order of window abnormal probability, and each window is traversed in turn to calculate its intersection over union (IoU) with subsequent windows; when the IoU of a window with the current window with the highest probability exceeds the preset overlap ratio threshold (such as 60%), then this low-probability window is suppressed; this process is repeated until all windows are screened, and the highest-probability window that is not suppressed is retained as the center of the region of interest. Subsequently, the time consistency check is started: when the center of a region of interest is detected in three consecutive frames of images, through the depth information of the binocular camera and the real-time pose data of the robot, the pixel coordinates of the bounding box are mapped to the global coordinate system with the pipeline entrance as the origin by using the coordinate transformation matrix to generate three-dimensional space coordinates; at the same time, an initial confidence label (weighted calculation based on the number of consecutive detections and historical accuracy) is attached, and finally, an abnormal area record including spatial position, size, and confidence is output.
[0136] In summary, this method globally screens the inner wall image of the pipeline for defects through sliding windows and a lightweight convolutional neural network, and can efficiently detect abnormal areas (i.e., defect areas inside the pipeline).
[0137] Preferably, perform multi-scale feature fusion analysis on the abnormal area, combine the morphological differences of each defect, accurately discriminate the defects in the abnormal area, and obtain the defect types in the abnormal area, specifically as follows:
[0138] Obtain the image of the abnormal area, perform Gaussian pyramid downsampling on the image of the abnormal area (scaling factor 0.8, 3 layers), calculate the multi-directional morphological gradient (structural elements in four directions of 0°, 45°, 90°, and 135°, size = 5×5) at each scale layer, and extract the edge intensity map; when the detection target is a crack, select the pixels with a 45° direction gradient response value > 120 as the initial edge point set;
[0139] Calculate the fractal dimension FD of the abnormal area; if FD > 1.6 and the proportion of linear edges in the area > 70%, it is determined as a crack candidate area; if FD < 1.2 and the gray variance of the area > 800, it is marked as a suspected fouling area;
[0140] It should be noted that the image of the abnormal area is subjected to Gaussian pyramid downsampling to obtain image layers of different scales; then, at each scale layer, the gradient response values in four directions of 0°, 45°, 90°, and 135° are calculated using the morphological gradient operator (structural element size is 5×5), and the edge intensity map is extracted; then, fractal analysis is performed on the edge intensity map of each scale layer, and the box counting method is used to calculate the fractal dimension FD; finally, the FD values of different scale layers are weighted and averaged to obtain the final fractal dimension FD of the abnormal area.
[0141] Extract the saturation channel in the HSV color space, apply the LBP (Local Binary Pattern) operator to generate a texture map, and generate a corrosion feature mark when the LBP variance of the peeling area > 2 times the original pipe wall texture variance;
[0142] Form a feature vector from the morphological gradient amplitudes, fractal dimensions, and texture variances of the three scale layers, use principal component analysis to reduce the dimension of the feature vector, and obtain the correlation coefficient between features; when the correlation coefficient between features > 0.8, retain the first 6 principal components as the input vector of the support vector machine; otherwise, retain the first 10 principal components as the input vector of the support vector machine; obtain the output vector of the support vector machine;
[0143] If an output vector is in the color gradient direction (HSV - H channel histogram offset > 30) and the texture peeling score > 0.8, it is classified as the corrosion type; if an output vector is in the gray level mutation intensity (adjacent pixel difference > 60) and the protrusion height (stereo vision measurement) > 2 mm, it is determined as fouling; the remaining output vectors are discriminated whether they are cracks through the fractal dimension and edge linearity for the second time.
[0144] It should be noted that first, the saturation channel is extracted in the HSV color space. The circular neighborhood LBP operator (radius = 3 pixels, sampling points = 8) is used to calculate the texture coding value of each pixel. After generating the full-frame LBP map, the LBP variances of the original pipe wall area (taking the average value of the first 100 normal frames) and the current peeling area are respectively statistically analyzed. When the variance of the detection area satisfies that the variance of the peeling area > 2 times the original variance, the corrosion feature marking is triggered and the coordinates of this area are stored in the candidate queue. Then, the morphological gradient amplitude (using the Sobel operator), fractal dimension (based on the box-counting method), and texture variance (calculated in the local window of the LBP map) are respectively extracted from the three scale layers of the Gaussian pyramid (scaling factors 0.5 / 1.0 / 2.0). The three are spliced into an 18-dimensional feature vector in the scale order, and then principal component analysis (PCA) is performed: calculate the Pearson correlation coefficient matrix between the features. If the correlation coefficient between any two-dimensional features > 0.8, then the first 6 principal components (cumulative contribution rate ≥ 90%) are selected, otherwise the first 10 principal components are retained, and the dimension-reduced feature vector is input into the support vector machine (SVM). In the classification decision stage, if the peak shift of the HSV-H channel histogram of the output vector corresponding to the sample > 30 (relative to the reference pipe wall) and the texture peeling score (LBP variance ratio) > 0.8, it is determined to be of the corrosion type; if the gray mutation intensity of the sample (average gray difference between adjacent pixels > 60) and the protrusion height of the binocular stereo vision reconstruction > 2 mm, it is classified as fouling; the remaining samples are secondarily discriminated through the fractal dimension threshold (FD > 1.5) and edge linearity (residual of the Hough transform line fitting < 0.1). If the conditions are met, they are marked as cracks, otherwise, it returns to the feature re-extraction process.
[0145] In summary, through this method, different types of pipeline defects can be effectively identified and distinguished, improving the accuracy and reliability of detection.
[0146] It also includes: performing Platt calibration on the classification probability of the support vector machine. When the corrosion class probability > 0.9 and the difference from the fouling class probability > 0.4, the final class is directly output; if the difference between the two class probabilities ≤ 0.2, it returns to the feature fusion stage, adding the hyperspectral data (band range 450 - 900 nm) of the local area for spectral reflectance matching, and recalculating the classification weights.
[0147] Preferably, the defect type, geometric parameters of the abnormal area are bound to the current robot pose, generating a record of the defect position and type including the pipeline coordinate system, specifically:
[0148] The odometer displacement is obtained through the encoder, and dead reckoning is performed by combining the angular velocity data of the IMU to real-time construct the six-degree-of-freedom pose estimation of the robot;
[0149] Start the visual SLAM thread simultaneously, extract SURF feature points in the binocular images for stereo matching. When the number of matched feature points exceeds the preset number, align the visual observations with the inertial data to generate a local pose with sub - centimeter accuracy.
[0150] If the displacement deviation between the IMU and the visual positioning is greater than the preset deviation, trigger the dynamic calibration mode: pause the movement and rotate 360° to rescan the environmental features, and optimize the sensor error parameters by the least - squares method.
[0151] When an abnormal area is detected, synchronously record the timestamp of the current binocular camera frame, and obtain the three - dimensional coordinates and attitude angles of the center point of the robot at this moment in the pipeline coordinate system (the origin is the center of the pipeline inlet flange) from the positioning module.
[0152] According to the geometric parameters of the camera installation, calculate the three - dimensional offset of the defect center point relative to the robot body, and convert the three - dimensional offset of the defect center point relative to the robot body into the pipeline global coordinates through the homogeneous coordinate transformation matrix.
[0153] Record the pipeline global coordinates, bind the pipeline global coordinates with the defect type of the corresponding abnormal area, and obtain the record of the defect position and type including the pipeline coordinate system.
[0154] In summary, this method can realize the binding of the defect type, geometric parameters of the abnormal area and the current robot pose, and generate the record of the defect position and type including the pipeline coordinate system. Through multi - source positioning data fusion, dynamic calibration mode, visual SLAM technology and homogeneous coordinate transformation, the accurate measurement and recording of the defect position are ensured, providing accurate data support for subsequent defect repair and pipeline maintenance.
[0155] In this embodiment, the control method further includes the following steps:
[0156] Collect the pipeline three - dimensional point cloud data in real time, combine the gravity direction perception of the IMU to determine the pipe bottom orientation (the gravity direction ± 15° interval is defined as the sediment - prone area), and construct the topological complexity parameter (bending node density × pipe diameter change gradient).
[0157] When the remaining battery power is lower than 30%, trigger the energy - saving mode: start the intermittent sampling strategy (perform a full - frame image acquisition every 2 meters of travel) in the straight section (curvature radius > 5 times the pipe diameter), and at the same time reduce the SLAM mapping frequency to 1Hz.
[0158] If a sudden increase in pipe wall roughness is detected (standard deviation > 2 times the historical mean) and the remaining battery power > 40%, or the characteristic peak of iron oxide is identified (wavelength 580 - 650 nm), immediately switch to the continuous scanning mode (full-frame acquisition at 0.5-meter intervals); when entering the high-incidence area of historical corrosion (judged by the probability density of the pre-loaded defect heat map > 0.5), synchronously activate the multi-spectral imaging module to enhance feature extraction;
[0159] Introduce the deposition risk weight (pipe bottom area weight coefficient × 2) and the remaining battery power attenuation factor (power consumption per meter × reciprocal of the remaining battery power). When planning the path, give priority to covering the areas prone to pipe bottom deposition. When the path length exceeds 80% of the remaining battery power endurance mileage (current battery power / power consumption per unit mileage), automatically truncate the detection range and generate a return path; During the movement process, continuously compare the actual topology with the preset model. When the curvature deviation exceeds 15%, trigger path replanning;
[0160] Establish a dynamically updated defect distribution heat map. The probability density value of each grid (0.5m × 0.5m) is comprehensively calculated from the historical detection times (weight 60%), the material degradation index (weight 30%), and the real-time sensor abnormal readings (weight 10%); When the probability density of a certain grid is detected > 0.7 for three consecutive times, mark it as a high-risk grid, automatically generate a priority re-inspection list containing the GPS coordinates of this grid (mapped to the global coordinate system of the pipeline), and push it to the subsequent inspection robots through the wireless mesh network;
[0161] After each task is completed, use the Bayesian update rule to correct the probability model of the heat map: If the re-inspection robot confirms the existence of a defect, raise the probability density of this grid to 0.9; If no abnormality is found in two consecutive re-inspections, reduce the density value according to the exponential decay formula; At the same time, according to the actual power consumption data, optimize the power consumption per unit mileage prediction model to form an adaptive detection strategy optimization closed-loop system.
[0162] It should be noted that through multi-modal perception data fusion, dynamic weight adjustment, and closed-loop feedback mechanism, the optimal balance between detection efficiency and accuracy is achieved under the constraint of limited battery power, ensuring full coverage of high-risk areas and reducing the defect missed detection rate.
[0163] As Figure 3 shown, in the second aspect of the present invention, a magnetic crawler pipeline robot control system 6 based on machine vision is disclosed. The magnetic crawler pipeline robot control system includes a memory 41 and a processor 52. A magnetic crawler pipeline robot control method program is stored in the memory 41. When the magnetic crawler pipeline robot control method program is executed by the processor 52, the steps of any one of the magnetic crawler pipeline robot control methods are implemented.
[0164] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A magnetic crawler pipeline robot control method based on machine vision, characterized in that: The following steps are involved: Based on the real-time scanning of the pipe cross-section profile by the ultrasonic module, the magnetic attraction strength of the crawler is dynamically adjusted to adapt to the change of pipe diameter; When encountering a curved pipe, the curvature radius of the curved pipe is obtained, and a torque control strategy of the robot is formulated according to the curvature radius of the curved pipe; During the movement process, binocular cameras are used to synchronously collect images of the inner wall of the pipeline at a fixed frame rate, and a lightweight convolutional neural network is used to perform a global defect coarse screening on the inner wall image of the pipeline to obtain abnormal areas; Perform multi-scale feature fusion analysis on the abnormal area, combine the morphological differences of each defect, accurately identify the defects in the abnormal area, and obtain the defect type of the abnormal area; The defect type and geometric parameters of the abnormal area are bound to the current robot posture to generate a record of the defect position and type including the pipeline coordinate system.
2. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 1, characterized in that: Based on the real-time scanning of the pipe cross-section profile by the ultrasonic module, the magnetic attraction strength of the track is dynamically adjusted to adapt to the change in pipe diameter. Specifically: The multi-angle ultrasonic sensor synchronously transmits high-frequency sound wave signals in a circular distribution manner, and receives the echo data reflected from the inner wall of the pipeline in real time; Calculating the echo time difference and intensity distribution in each direction according to the echo data, reconstructing the three-dimensional point cloud data of the pipeline cross section according to the echo time difference and intensity distribution in each direction, fitting the local surface through the three-dimensional point cloud data of the pipeline cross section, and obtaining the surface features of the pipeline cross section; Performing polynomial interpolation on the surface feature to obtain a surface feature change curve of the pipe cross section, obtaining a first-order derivative of the surface feature change curve, obtaining a pipe diameter change gradient value of the current pipe area, and obtaining a gradient absolute value of the pipe diameter change gradient value of the current pipe area; If the absolute value of the gradient is less than a preset threshold, the intensity of the electromagnet current is adjusted in real time based on a linear interpolation model; If the absolute value of the gradient is greater than a preset threshold, the dynamic compensation mode is triggered, and a feedforward-feedback composite control structure is used to adjust the magnetic attraction force output.
3. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 2 is characterized in that: If the absolute value of the gradient is less than a preset threshold, the intensity of the electromagnet current is adjusted in real time based on a linear interpolation model, specifically: Calling a preset curvature-current mapping table and obtaining the second-order derivative of the surface characteristic change curve to obtain tube wall curvature data; Input the currently extracted pipe wall curvature data into the mapping table, match the interval by binary search, build a linear interpolation function based on the curvature value at the interval endpoint and its corresponding reference current value, and calculate the theoretical current intensity corresponding to the current curvature; At the same time, a real-time magnetic attraction feedback mechanism is introduced to collect the actual adsorption force distribution between each magnetic track unit and the pipe wall through a ring-shaped Hall sensor array, input the theoretical current value into the dynamic compensation controller, and correct the current output value by combining the adsorption force deviation and curvature change rate. Then the current segmented gradient module is activated to determine the increase or decrease trend of the magnetic attraction force according to the direction of the curvature gradient. If the curvature increases, the current intensity is increased step by step according to the exponential decay curve. Otherwise, a step-by-step decrease strategy is adopted to avoid track slippage caused by sudden current changes. Finally, the reference current value at the endpoint of the interpolation interval is updated based on the historical adjustment data. The current-curvature relationship data under the recent stable adsorption state is screened through the sliding window algorithm, and the mapping table parameters are dynamically optimized to form an adaptive closed-loop adjustment system to ensure that the magnetic attraction force transitions smoothly with the curvature of the pipe wall.
4. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 2, characterized in that: If the absolute value of the gradient is greater than a preset threshold, the dynamic compensation mode is triggered, and the magnetic attraction output is adjusted using a feedforward-feedback composite control structure, specifically: Call the preset pipe diameter change rate-compensation current mapping table, divide the compensation interval according to the positive and negative signs and amplitude of the pipe diameter change gradient value, use the piecewise linear interpolation algorithm to calculate the pre-compensation current base value, superimpose the inertia compensation factor corresponding to the real-time motion speed of the robot, and generate a feedforward current instruction; At the same time, the feedback control loop is started to collect the real-time magnetic attraction distribution of each magnetic track unit through the annularly distributed Hall sensor array, and the deviation matrix between the mean value of the magnetic attraction and the target value is constructed; A fuzzy PID algorithm is used to perform multi-dimensional membership analysis on the deviation matrix, dynamically adjust the integral item weight to suppress overshoot, and output feedback correction current instruction; The feedforward current command and the feedback correction current command are input into the hybrid controller to generate a final current control parameter command; The dynamic balancing strategy of magnetic attraction force is simultaneously executed, and the final current control parameter instruction is spatially redistributed according to the contact pressure distribution of each crawler unit to enhance the magnetic attraction force on the side of the pipe diameter contraction; Finally, the actual pipe diameter changes are recorded through the online learning module, and the recursive least squares method is used to update the Kalman filter parameters to achieve adaptive optimization and form a closed-loop anti-disturbance control architecture.
5. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 1, characterized in that: When encountering a curved pipe, the curvature radius of the curved pipe is obtained, and the torque control strategy of the robot is formulated according to the curvature radius of the curved pipe, specifically: When the robot's leading articulated probe detects a bend, it collects the axial and radial geometric feature point cloud data at the entrance of the bend, reconstructs the centerline trajectory of the bend based on the geometric feature point cloud data and the cubic spline interpolation algorithm, and calculates the curvature radius R of the bend based on the centerline trajectory of the bend and the least squares method. If R is less than the preset safety threshold, the emergency torque compensation mode is triggered; if R is greater than the preset safety threshold, the current control strategy is maintained unchanged; In the trajectory planning stage, the mapping relationship between the curved pipe coordinate system and the robot body is established. Taking R as the constraint condition, the dynamic window method is used to generate a feasible passing trajectory that meets the minimum centrifugal force constraint, and the theoretical contact angle of each track unit is calculated. Based on the feasible passing trajectory and the theoretical contact angle, the maximum torque value of each drive motor is obtained through a torque balance equation; and the real-time torque value of each drive motor is obtained at the same time; Calculating the difference between the real-time torque value and the maximum torque value to obtain a torque deviation value; When the torque deviation value exceeds the safety threshold, the fuzzy rule base is used to dynamically adjust the real-time torque value of each drive motor, giving priority to increasing the inner track drive torque to offset the centrifugal effect; When the torque deviation value does not exceed the safety threshold, the current control strategy is maintained unchanged.
6. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 1, characterized in that: A lightweight convolutional neural network is used to perform a global defect coarse screening on the pipeline inner wall image to obtain abnormal areas, specifically: The pipeline inner wall image is divided into a sliding window of 256×256 pixels, and the step size is set to 128 pixels; if the curvature radius R of the curved pipe is less than 5 times the pipe diameter, it is switched to a 192×192 window and the step size is reduced to 64 pixels to adapt to the arc surface deformation; Before each window is input into the lightweight convolutional neural network, multi-scale context features are first extracted through the spatial pyramid pooling layer. When the edge density in the window is lower than the preset threshold, the window is skipped to reduce redundant calculations. The Sigmoid function is used to generate an abnormal probability heat map in the [0,1] interval, and the global threshold is initialized to 0.7; the abnormal probability of each window is obtained through the abnormal probability heat map; If the standard deviation of the abnormal probability of 10 consecutive windows is less than 0.05, the current pipeline section is determined to be a defect-free area; when the probability value is detected to be densely distributed in the range of 0.6-0.7, the regional growing algorithm is activated to merge adjacent low-probability abnormal windows; For windows with anomaly probability exceeding 0.7, a non-maximum suppression algorithm is used to remove duplicate regions with an overlap ratio greater than a preset overlap ratio, and the maximum probability window is retained as the center of the region of interest; When the center of a region of interest is detected in three consecutive frames of images, its bounding box coordinates are mapped to the pipeline global coordinate system, and an initial confidence label is attached to obtain the abnormal region.
7. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 1, characterized in that: Perform multi-scale feature fusion analysis on the abnormal area, combine the morphological differences of each defect, accurately identify the defects in the abnormal area, and obtain the defect type of the abnormal area, specifically: The abnormal area image is downsampled using a Gaussian pyramid, and the multi-directional morphological gradient is calculated at each scale layer to extract the edge intensity map. When the detection target is a crack, pixels with a 45° directional gradient response value greater than 120 are selected as the initial edge point set. Calculate the fractal dimension FD of the abnormal area; if FD>1.6 and the linear edge ratio in the area>70%, it is determined to be a crack candidate area; If FD < 1.2 and the regional grayscale variance > 800, it is marked as a suspected scaling area; The saturation channel is extracted in the HSV color space, and the LBP operator is applied to generate a texture map. When the LBP variance of the peeling area is greater than twice the variance of the original pipe wall texture, a corrosion feature marker is generated. The morphological gradient amplitude, fractal dimension and texture variance of the three scale layers are combined into a feature vector, and the feature vector is reduced in dimension using principal component analysis to obtain the correlation coefficient between features; When the correlation coefficient between features is greater than 0.8, the first 6 principal components are retained as the input vector of the support vector machine; otherwise, the first 10 principal components are retained as the input vector of the support vector machine; the output vector of the support vector machine is obtained; If an output vector is in the color gradient direction and the texture peeling score is greater than 0.8, it is classified as corrosion; if an output vector is in the grayscale mutation intensity and the protrusion height is greater than 2mm, it is judged as scaling; the remaining output vectors are secondarily judged whether they are cracks through fractal dimension and edge linearity.
8. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 7, characterized in that: Also includes: The classification probability of the support vector machine is calibrated by Platt. When the probability of the corrosion class is greater than 0.9 and the difference with the probability of the scaling class is greater than 0.4, the final category is directly output. If the difference between the two probabilities is ≤0.2, it returns to the feature fusion stage, appends the hyperspectral data of the local area for spectral reflectance matching, and recalculates the classification weight.
9. The method for controlling a magnetic crawler pipeline robot based on machine vision according to claim 1, characterized in that: Bind the defect type and geometric parameters of the abnormal area to the current robot posture to generate a defect location and type record containing the pipeline coordinate system, specifically: The odometer displacement is obtained through the encoder, and the dead reckoning is performed in combination with the angular velocity data of the IMU to construct the robot's six-degree-of-freedom pose estimation in real time; At the same time, the visual SLAM thread is started to extract SURF feature points in the binocular image for stereo matching. When the number of feature point matches exceeds the preset number, the visual observation and inertial data are aligned to generate local pose with sub-centimeter accuracy. If the displacement deviation between IMU and visual positioning is greater than the preset deviation, the dynamic calibration mode is triggered: the vehicle stops moving and rotates 360° to rescan the environmental features, and the sensor error parameters are optimized by the least squares method. When an abnormal area is detected, the timestamp of the current binocular camera frame is recorded synchronously, and the three-dimensional coordinates and attitude angle of the pipeline coordinate system of the robot center point at this moment are obtained from the positioning module; According to the geometric parameters of the camera installation, the three-dimensional offset of the defect center point relative to the robot body is calculated, and the three-dimensional offset of the defect center point relative to the robot body is converted into the global coordinates of the pipeline through the homogeneous coordinate transformation matrix; The global coordinates of the pipeline are recorded, and the global coordinates of the pipeline are bound to the defect type of the corresponding abnormal area to obtain a defect position and type record containing the pipeline coordinate system.
10. A magnetic crawler pipeline robot control system based on machine vision, characterized in that: The magnetic tracked pipeline robot control system includes a memory and a processor. The memory stores a magnetic tracked pipeline robot control method program. When the magnetic tracked pipeline robot control method program is executed by the processor, the steps of the magnetic tracked pipeline robot control method as described in any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Video intelligent assistance-based rail-lying type robot control method and system
CN120363214A
Nondestructive testing system and method for structural uniformity of composite bulletproof helmet
CN120404938A
Agricultural machine navigation system based on farmland path identification
CN120800399A
Method and system for intelligently monitoring motion posture of underwater submersible based on MEMS (Micro Electro Mechanical System)
CN121026113A
Municipal pipeline detection method and detection system based on nondestructive detection and artificial intelligence
CN121280509A