A method and system for adaptive stabilization control of a patrol robot pose drift

By combining multi-source data compensation and tight coupling fusion with a drift spatiotemporal prediction model based on graph attention networks and physical constraints, the problem of attitude drift of inspection robots in complex environments is solved. This achieves high-precision attitude estimation and active drift trend prediction, improving the stability and safety of the robot under extreme working conditions.

CN122632867APending Publication Date: 2026-08-25GUANGZHOU INST OF RAILWAY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610952098.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing inspection robots suffer from accumulated positioning errors and unstable attitude estimation in complex environments due to odometer slippage, visual sensor failure, and delayed response of fixed parameter controllers. They also lack the ability to actively predict drift trends and are prone to overshooting or tipping over under extreme conditions.

Method used

Compensation is achieved by comparing multi-source attitude data with motion data, combined with error state Kalman filtering for tight coupling fusion, and a drift spatiotemporal prediction model is constructed through graph attention network, gated recurrent unit and physical information neural network to judge the slip trend in real time and generate attitude adjustment strategy, so as to realize drift mode classification and trend prediction.

Benefits of technology

Maintaining high-precision attitude estimation during long-endurance and complex environments reduces response lag and improves the operational stability and safety of the inspection robot under highly nonlinear conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122632867A_ABST
    Figure CN122632867A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of robot control, and discloses a kind of inspection robot posture drift self-adaptive stable control method and system, first, the multi-source posture data and motion data of inspection robot are acquired, the drift trend is judged by comparing with historical data, the motion data is compensated according to the drift trend, the compensated motion data is fused with the multi-source posture data, and the fusion state quantity and its drift estimation variance are obtained;Multi-source posture data, motion data and fusion state quantity are input into pre-trained drift space-time prediction model, and the drift mode classification result and future drift trend prediction sequence are output;According to the drift mode classification result, the drift estimation variance and the drift trend prediction sequence, a posture adjustment strategy is generated, and the control parameters of the inspection robot are adjusted.The application realizes active perception, trend prediction and self-adaptive inhibition of the posture drift of the inspection robot in a complex unstructured environment, effectively improving the posture estimation accuracy and running stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot control technology, and in particular to an adaptive stabilization control method for the attitude drift of an inspection robot, as well as a computing device. Background Technology

[0002] Currently, inspection robots are widely used in automated inspection tasks in hazardous or enclosed environments such as power tunnels, chemical plant areas, and underground utility tunnels. Their autonomous positioning and attitude control accuracy directly determine the validity of inspection data and the robot's operational safety. Existing inspection robots typically use a combination of inertial navigation systems (INS) and wheeled or tracked odometry (Odom) for attitude estimation and dead reckoning. However, low-cost MEMS inertial measurement units (IMUs) have inherent zero-bias instability; integration operations cause small errors to accumulate over time, resulting in severe drift. Simultaneously, in complex ground conditions such as mud, slippery surfaces, or uneven terrain, the odometry is prone to measurement distortion due to slippage or track deformation. This inherent limitation of a single sensor combination causes the attitude estimation accuracy of inspection robots to deteriorate significantly over time during long-endurance operation, making it difficult to maintain a stable operating state.

[0003] To suppress sensor drift, existing technologies often incorporate visual odometry (VO) or laser SLAM for auxiliary correction. However, inspection scenarios such as power tunnels and underground utility tunnels commonly encounter harsh conditions such as drastic changes in lighting, sparse feature points, and high dust or smoke levels, leading to frequent failures in visual feature extraction and matching. Laser point cloud registration is also prone to degradation, even causing positioning jumps. Although some solutions attempt to use Kalman filtering to fuse multi-source information to suppress heading angle drift, or to use GRU networks combined with attention mechanisms for multimodal temporal fusion, existing fusion methods are mostly loosely coupled architectures, where each sensor's data is independently processed before fusion, failing to achieve tightly coupled joint optimization at the raw data level. Furthermore, existing solutions generally do not incorporate the dynamic deviation between the sensor coordinate system and the actual vehicle posture caused by the vehicle's flexible deformation into the perception model, resulting in systematic errors in the pose estimation benchmark itself under conditions such as obstacle crossing or heavy-load driving.

[0004] In terms of attitude control, existing inspection robots mostly employ strategies such as PID control, model predictive control (MPC), or active disturbance rejection control (ADRC). Previous research has attempted to estimate lumped disturbances using extended state observers or to address the challenges of dynamic modeling with data-driven model-free adaptive control methods. However, most of these controllers are designed based on linear time-invariant models, assuming that external disturbances are low-frequency, smooth signals, and that control parameters remain fixed once tuned. When the inspection robot encounters highly nonlinear conditions such as climbing slopes, slipping on muddy surfaces, or sudden lateral wind disturbances, fixed-parameter controllers struggle to compensate for abrupt disturbances in real time. More importantly, existing control methods are all reactive feedback adjustments, lacking the ability to proactively predict drift trends, resulting in lag in control response and a tendency to overshoot, oscillate, or even tip over under extreme conditions. Therefore, there is an urgent need for an attitude stabilization control method for inspection robots that can achieve accurate drift perception, trend prediction, and adaptive suppression. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides an adaptive stabilization control method and system for posture drift of inspection robots, in order to solve the technical problems in the prior art that inspection robots are prone to overshooting and instability or even rollover in extreme conditions when performing tasks in complex environments, such as the accumulation of positioning errors caused by the odometer slipping and distorting on wet or undulating ground, the failure of the vision sensor in positioning under drastic changes in lighting or in environments with sparse features, the lag in response of the fixed parameter controller under strong nonlinear conditions such as climbing slopes or lateral wind disturbances and its inability to cope with the dynamic deviation of the coordinate system caused by the flexible deformation of the vehicle body, and the lack of active prediction capability of drift trend.

[0007] (II) Technical Solution

[0008] To achieve the above objectives, the main technical solutions adopted in this application include:

[0009] In a first aspect, embodiments of this application provide an adaptive stabilization control method for the attitude drift of an inspection robot, the specific steps of which include:

[0010] S1, acquire multi-source attitude data and motion data of the inspection robot; compare the multi-source attitude data and motion data with the corresponding historical data to determine the sliding trend of the inspection robot; compensate the motion data according to the sliding trend, and use error state Kalman filtering to fuse the compensated motion data with the multi-source attitude data to obtain the fusion state quantity characterizing the current attitude of the inspection robot and its drift estimation variance;

[0011] S2, the multi-source attitude data, motion data and the fused state variables are input into a pre-trained drift spatiotemporal prediction model. The drift spatiotemporal prediction model maps the multi-source attitude data, motion data and the fused state variables to graph vertices, and uses a graph attention network to extract the spatial dependency features between each graph vertex. It uses a gated recurrent unit to extract the temporal features of the evolution of the fused state variables over time, and combines a physical information neural network to introduce rigid body dynamics equations as physical constraints. The model outputs drift pattern classification results and a drift trend prediction sequence within a preset time period.

[0012] S3. Based on the drift pattern classification results, the drift estimation variance, and the drift trend prediction sequence, generate an attitude adjustment strategy for the inspection robot, and adjust the control parameters of the inspection robot according to the attitude adjustment strategy.

[0013] Optionally, in some embodiments of this application, compensating the motion data based on the slippage trend includes:

[0014] Acquire attitude data and odometry data from the multi-source attitude data and motion data;

[0015] The speed v of the inspection robot is calculated based on the posture data. IMU The odometer-measured speed v is obtained based on the odometer data. odom ;

[0016] According to the speed v of the inspection robot IMU The odometer measures the speed v odom Calculate the current slip ratio s using the following formula: ;

[0017] Obtain a historical slip rate sequence, compare the current slip rate s with the historical slip rate sequence to determine the slip trend; when the current slip rate s shows an increasing trend relative to the historical slip rate, the slip trend is determined to be intensifying, and the preset compensation coefficient k is increased; when the current slip rate s shows a decreasing trend relative to the historical slip rate, the slip trend is determined to be converging, and the preset compensation coefficient k is decreased.

[0018] The odometer data is compensated according to the compensation coefficient k to obtain the compensated odometer data v. comp =v odom ×(1-k);

[0019] The compensated odometer data is then updated into the motion data to obtain the compensated motion data.

[0020] Optionally, in some embodiments of this application, the training steps of the drift spatiotemporal prediction model include:

[0021] S01, acquire historical multi-source posture data, historical motion data and historical fusion state variables of the inspection robot under various preset working conditions, and construct a training sample set;

[0022] S02, Construct an initial drift spatiotemporal prediction model, which includes a graph attention network module, a gated recurrent unit module, and a physical information neural network module cascaded in sequence. The graph attention network module is used to construct a dynamic spatiotemporal graph and extract the spatial dependency features between vertices of each input graph. The gated recurrent unit module is used to jointly encode the spatial dependency features output by the graph attention network module and the temporal sequence of the fused state variables, and extract the temporal features of the evolution of the fused state variables over time. The physical information neural network module is used to introduce rigid body dynamics equations as physical constraints to constrain the drift trend prediction sequence output by the drift spatiotemporal prediction model to satisfy the laws of rigid body dynamics.

[0023] S03, Construct a hybrid loss function that includes a data-driven loss term and a physical consistency loss term;

[0024] S04, input the training sample set into the initial drift spatiotemporal prediction model, use the hybrid loss function to perform iterative training and update the model parameters until the model converges, and obtain the trained drift spatiotemporal prediction model.

[0025] Optionally, in some embodiments of this application, the specific process by which the graph attention network module constructs a dynamic spatiotemporal graph includes:

[0026] Using the historical multi-source attitude data and historical fused state variables as data sources, the graph vertices of the dynamic spatiotemporal graph are constructed; the graph vertices include three-axis angular velocity nodes, three-axis acceleration nodes, left and right wheel speed difference nodes, visual optical flow mode length nodes, strain curvature nodes, and fused attitude angle nodes.

[0027] A multi-head attention mechanism is used to calculate the correlation strength between vertices in the graph as edge weights, and the outputs of each attention head are weighted and fused according to preset fusion weights.

[0028] When the data of any graph vertex becomes invalid or exceeds the preset confidence range, the attention weight corresponding to that graph vertex is reset to zero, and the attention weights of the remaining valid graph vertices are renormalized to obtain an updated dynamic spatiotemporal graph; the updated dynamic spatiotemporal graph is used to extract the spatial dependency features between the vertices of each input graph in the subsequent process.

[0029] Optionally, in some embodiments of this application, the process of constructing the physical consistency loss term includes:

[0030] Angular velocity data is extracted from the historical multi-source attitude data, and the historical fused state variables are differentiated over time to obtain angular acceleration data and attitude angle change rate.

[0031] Obtain the estimated values ​​of the rotational inertia and external torque of the inspection robot;

[0032] Based on the rigid body dynamics equations, a physical consistency loss term is constructed using the angular velocity, angular acceleration, rate of change of attitude angle, moment of inertia, and the estimated external torque:

[0033] ;

[0034] Where I is the moment of inertia, Let τ be the angular acceleration. ext This is an estimated value for the external torque. λ1 and λ2 are the attitude angle change rate, ω is the angular velocity, and λ1 and λ2 are the balance coefficients.

[0035] The physical consistency loss term Used to constrain the The estimated external torque τ ext The torque balance relationship in the rigid body dynamics equations is satisfied.

[0036] Optionally, in some embodiments of this application, the rigid body dynamics equations are:

[0037] ;

[0038] Where M is the net external torque acting on the inspection robot, I is the moment of inertia, and ω is the angular velocity. Angular acceleration; the estimated external torque τ ext The net external moment M is either the measured or estimated value, both pointing to the same physical quantity; the rigid body dynamics equation is used to constrain the net external moment M and the estimated external moment τ. ext Consistency, i.e., the ω and the constrained model predictions satisfy

[0039] The physical relationship.

[0040] Optionally, in some embodiments of this application, the change in attitude angle over time in the fused state variables is recorded as the drift quantity, and the drift mode classification result output by the drift spatiotemporal prediction model includes:

[0041] Periodic drift, the amount of drift fluctuates sinusoidally or quasi-periodicly over time, and the frequency of fluctuation is related to the robot's step frequency or the period of road surface ripples;

[0042] Monotonic cumulative drift, the amount of drift increases or decreases monotonically with time, the absolute value of the rate of change is greater than a preset threshold and the direction of change remains stable;

[0043] Mutation drift is defined as a drift that exceeds a preset mutation threshold within two consecutive sampling periods and is associated with an external shock event.

[0044] Optionally, in some embodiments of this application, the step S3 of generating an attitude adjustment strategy for the inspection robot based on the drift pattern classification result, the drift estimation variance, and the drift trend prediction sequence includes:

[0045] Based on the drift mode classification results, a corresponding baseline adjustment strategy is matched from a preset strategy library, which stores the mapping relationship between each drift mode and the control parameter adjustment direction. Based on the drift estimation variance and the drift trend prediction sequence, the baseline adjustment strategy is modified to obtain the attitude adjustment strategy.

[0046] Optionally, in some embodiments of this application, after step S3, the following step is further included:

[0047] Control commands are generated based on the attitude adjustment strategy to drive the actuator of the inspection robot to perform attitude correction;

[0048] After the actuator performs attitude correction, the feedback data of the actuator is acquired, and the actual displacement of the actuator is calculated based on the feedback data.

[0049] The actual displacement is compared with the theoretical displacement corresponding to the control command to calculate the displacement deviation;

[0050] The displacement deviation is backpropagated to the drift spatiotemporal prediction model, triggering an online update of the drift spatiotemporal prediction model parameters to obtain an updated drift spatiotemporal prediction model, which is used to output the drift trend prediction sequence after execution feedback correction.

[0051] In a first aspect, embodiments of this application provide a computing device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program stored in the memory, specifically executing the aforementioned adaptive stabilization control method for the attitude drift of an inspection robot.

[0052] (III) Beneficial Effects

[0053] This application discloses an adaptive stabilization control method and system for the attitude drift of an inspection robot. By comparing the current multi-source attitude data and motion data with historical data, the robot's slippage trend can be determined in real time. Based on this, distorted motion data (such as odometer slippage data) can be compensated in a targeted manner, eliminating measurement errors caused by slippage at the source. Furthermore, an error-state Kalman filter is used to tightly couple and fuse the compensated motion data with the multi-source attitude data. Compared to traditional loosely coupled or single-sensor solutions, this effectively suppresses the zero-bias accumulation of the low-cost IMU and the divergence caused by odometer slippage. Even in long-endurance and weak-signal environments, it can maintain high-precision attitude estimation and simultaneously output the drift estimation variance for subsequent control decision evaluation.

[0054] A drift spatiotemporal prediction model was constructed by cascading a graph attention network, a gated recurrent unit, and a physical information neural network. The graph attention network dynamically learns the spatial dependencies between multiple source sensors and can automatically reduce their weights when vision fails or a sensor malfunctions. The gated recurrent unit extracts the drift patterns of the fused state variables over time and captures the long-term dependencies of the drift. The physical information neural network uses rigid body dynamics equations as physical constraints to ensure that the prediction results conform to the basic laws of robot kinematics and dynamics, avoiding the output of results that do not conform to physical laws by the pure data-driven model under insufficient training data or extreme conditions.

[0055] The control decision is based on a comprehensive analysis of three factors: drift pattern classification, drift estimation variance, and drift trend prediction sequence. The drift pattern classification result is used to match the basic parameter tuning strategy corresponding to the current drift type; the drift estimation variance is used to dynamically adjust the step size (conservative when the variance is large, aggressive when the variance is small); and the drift trend prediction sequence is used to generate feedforward compensation that is superimposed on the controller output. These three signals work together to integrate information from three dimensions: drift type identification, state reliability assessment, and future trend prediction. Based on this, the controller begins to act in the early stages of drift, rather than waiting until the attitude deviates significantly before correction. This achieves a shift from reactive feedback to proactive prediction in control, effectively reducing response lag and significantly improving the stability and safety of the inspection robot under highly nonlinear conditions such as slope climbing, slippery conditions, and lateral wind disturbances. Attached Figure Description

[0056] Figure 1 This is a flowchart of an adaptive stabilization control method for the attitude drift of an inspection robot according to this application;

[0057] Figure 2 This is a flowchart of the training phase of a drift spatiotemporal prediction model in one embodiment of this application. Detailed Implementation

[0058] To better explain and facilitate understanding of this application, the following detailed description of the application is provided in conjunction with the accompanying drawings and specific embodiments.

[0059] In existing technologies, adaptive stabilization control methods for attitude drift of inspection robots can be mainly categorized into the following three types:

[0060] The first type is a single sensor combined with fixed-parameter control, which uses an inertial measurement unit (IMU) and an odometer for attitude estimation, and then uses a PID or linear quadratic controller to achieve attitude control. In this type of method, the IMU suffers from zero-bias instability, and the integral operation causes small errors to accumulate over time and drift. The odometer is distorted due to slippage on wet or uneven surfaces. Neither of them can provide a stable and reliable attitude reference in the long term. At the same time, the fixed-parameter controller is designed based on a linear time-invariant model, which makes it difficult to compensate for sudden disturbances in real time under conditions such as climbing slopes, muddy slippage, or crosswinds, which can easily lead to overshoot, oscillation, or even rollover.

[0061] The second category is visual or laser-assisted correction methods, which correct the accumulated drift of the inertial navigation system by introducing visual odometry or laser SLAM. In inspection scenarios such as power tunnels and underground utility tunnels, these methods often fail due to harsh conditions such as drastic changes in lighting, sparse feature points, and high dust or smoke levels. Visual feature extraction and matching frequently fail, and laser point cloud registration is prone to degradation, leading to positioning jumps and making it difficult to provide continuous and reliable pose correction. Furthermore, the fusion of visual and inertial data is often a loosely coupled architecture, with each sensor independently calculating before fusion, failing to achieve tight coupling and joint optimization at the raw data level, and not incorporating the dynamic deviation between the sensor coordinate system and the actual vehicle posture caused by the vehicle's flexible deformation into the perception model.

[0062] The third category is conventional data-driven prediction and control methods, which utilize long short-term memory networks, gated recurrent units, or reinforcement learning to model and predict the robot's motion state, and combine this with adaptive control strategies to achieve parameter adjustment. These methods typically use temporal networks alone for state prediction or neural networks alone for controller parameter tuning, without incorporating the spatial coupling relationships between multiple sensors into the prediction model. Furthermore, purely data-driven models lack physical constraints, and under extreme conditions with insufficient training data coverage, they are prone to outputting physically unreasonable predictions. Moreover, the prediction and control processes are independent, with the prediction results only provided to the controller as reference information, failing to form a closed-loop decision-making chain from trend prediction to parameter adjustment, resulting in a lag in control response.

[0063] To address this, this application provides an adaptive stabilization control method for the attitude drift of an inspection robot. This method compares current multi-source sensor data with historical data to determine the slippage trend and compensates for the motion data accordingly. It employs error state Kalman filtering for tight coupling fusion, and uses a graph attention network to extract spatial dependency features between sensor data nodes, a gated loop unit to extract temporal evolution features of the fused state variables, and a physical information neural network to introduce rigid body dynamics equations as physical constraints. The method outputs drift pattern classification results and a future drift trend prediction sequence. Finally, based on the drift pattern classification results, drift estimation variance, and drift trend prediction sequence, a comprehensive decision is made to generate an attitude adjustment strategy and adjust the control parameters. This achieves integrated attitude stabilization control combining multi-source perception, trend prediction, and adaptive suppression, overcoming the shortcomings of the aforementioned prior art.

[0064] To better explain and facilitate understanding of this application, a detailed description of its embodiments is provided below in conjunction with the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a clearer and more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0065] Example 1:

[0066] The adaptive stabilization control method for posture drift of inspection robots disclosed in this application is applicable to various types of inspection robots, including but not limited to wheeled inspection robots, tracked inspection robots, rail-mounted inspection robots, and legged inspection robots. This embodiment takes a coal mine underground roadway inspection robot as an example, employing a tracked inspection robot deployed in the underground transport roadway to perform equipment inspection and environmental monitoring tasks along a track. The underground environment suffers from multiple sources of interference, such as roadway water accumulation, low illumination (some areas below 5 lux), and high concentrations of coal dust, leading to odometer slippage, loss of visual features, IMU integral drift, and vehicle body deformation, severely affecting the robot's posture estimation accuracy and operational stability. This embodiment uses the adaptive stabilization control method for posture drift of inspection robots provided in this application to perform real-time perception, prediction, and adaptive compensation for the aforementioned multi-interference conditions.

[0067] The control logic and data processing involved in this method are executed by an embedded controller deployed on the inspection robot. This controller is connected to data acquisition units such as IMU, odometer, vision sensor, and strain gauges via an industrial bus, acquiring multi-source sensor data in real time and outputting control commands to the walking drive unit. In the harsh environment of underground coal mines containing water and dust, this method can operate independently without relying on high-precision external positioning facilities, enabling the inspection robot to maintain stable posture and continuously perform detection tasks in waterlogged roadways.

[0068] Figure 1 The flowchart below shows a method for adaptive stabilization control of attitude drift in an inspection robot according to this application. Figure 1 As shown, the adaptive stabilization control method for the attitude drift of the inspection robot includes:

[0069] S1. Acquire multi-source attitude data (such as IMU data) and motion data (such as wheel odometry data) of the inspection robot. Compare the multi-source attitude data and motion data with corresponding historical data to determine whether the robot currently has a slippage trend. After determining the slippage trend, compensate the motion data according to the slippage trend, and then use the Error State Kalman Filter (ESKF) algorithm to fuse the compensated motion data with the multi-source attitude data to obtain the fused state variable representing the current attitude of the inspection robot and its drift estimation variance.

[0070] Specifically, the multi-source attitude data includes three-axis angular velocity data and three-axis acceleration data collected by the inertial measurement unit deployed on the inspection robot body. The inertial measurement unit is usually installed at the geometric center of the robot body, and its measurement data reflects the angular and linear motion state of the robot body in space.

[0071] Motion data includes wheel speed data collected by an odometer deployed on the robot's locomotive, specifically the wheel speed pulse counts of the left and right drive wheels. The difference in wheel speed and the robot's overall speed can be obtained by converting these pulse counts. Additionally, the motion data includes visual optical flow modulus data collected by a vision sensor deployed at the front of the robot's body. Visual optical flow characterizes the robot's velocity relative to its surroundings by analyzing the pixel displacement of feature points in consecutive image frames. Finally, the motion data includes strain curvature data collected by strain gauges attached to key stress-bearing areas of the robot's body. Strain curvature characterizes the degree of flexible deformation that occurs during obstacle crossing or loaded movement.

[0072] The data from the various sensors mentioned above are aggregated via an industrial bus to the embedded controller on the inspection robot body, serving as the basic input for subsequent slippage trend judgment and data fusion.

[0073] In a preferred embodiment, strain gauges deployed at key stress-bearing locations on the inspection robot's body collect real-time deformation data. Specifically, the strain gauges are attached to the surface of the crossbeams connecting the front and rear frames to the walking mechanism, the root of the swing arms in the suspension system, and the surface of the side plates near the track contact surface at the bottom of the vehicle body. These strain gauges are used to collect bending and torsional deformation data generated when the vehicle body traverses obstacles, climbs slopes, or bears load on one side. Before error state Kalman filtering fusion, the system compensates for the multi-source attitude data based on the deformation data collected by the strain gauges to eliminate the dynamic deviation between the sensor coordinate system and the actual attitude of the vehicle body caused by its flexible deformation.

[0074] Specifically, the process of compensating for multi-source attitude data based on deformation data collected by strain gauges includes: First, establishing a linear mapping model between vehicle body deformation and attitude deviation. Then, through finite element simulation analysis or static loading calibration experiments, determining the bending strain ε at key parts of the vehicle body. b Torsional strain ε t Deviation angle with vehicle body attitude The coupling coefficient matrix K between (including roll angle deviation, pitch angle deviation, and yaw angle deviation);

[0075] Furthermore, a real-time compensation algorithm is constructed: ;

[0076] in, (t) represents the attitude deviation caused by the flexible deformation of the vehicle body at time t.

[0077] Finally, the calculated attitude deviation amount The original attitude angles calculated by the IMU are removed to obtain compensated multi-source attitude data. This compensated multi-source attitude data is then fused with the compensated motion data using an error-state Kalman filter.

[0078] Furthermore, compensating the motion data based on the slippage trend includes:

[0079] First, the system extracts IMU attitude data and wheel odometry data from the acquired multi-source attitude and motion data.

[0080] The inertial measurement velocity v of the inspection robot is calculated based on the IMU attitude data. IMU (That is, by integrating the acceleration measured by the IMU over time, the inertial velocity of the robot body in space is obtained, which serves as a reference value for the robot's actual motion velocity at the current moment); simultaneously, the odometer-measured velocity v is read from the wheel odometry data. odom .

[0081] Subsequently, the system measures the velocity v using inertial measurement. IMU And odometer measures speed v odomThe current slip ratio s is calculated using the following formula: .

[0082] The slip ratio s reflects the degree of deviation between the odometer measurement and the actual inertial motion. For example, when an inspection robot travels at a constant speed in a straight line in a dry, level alley, the speed v measured by the wheeled odometer... odom The inertial velocity v calculated by the IMU IMU Basically the same, at this time v odom ≈v IMU A slip ratio s≈0 indicates that the odometer data is reliable and no additional slip compensation is needed. When the inspection robot travels through waterlogged or muddy sections, the coefficient of adhesion between the tracks or wheels and the ground decreases, causing the drive wheels to spin freely on the slippery surface. At this time, the odometer, which measures the wheel rim rotation speed, outputs a false speed value that is much higher than the actual forward speed. The slip ratio s increases significantly, indicating that the odometer data has been severely distorted. The system then increases the value of the compensation coefficient k (this increase is achieved by the following adaptive correction formula) to strongly discount the odometer data in order to suppress the contamination of attitude estimation by false velocity.

[0083] To determine whether slip is worsening or recovering, the system maintains a historical slip rate sequence and compares the currently calculated slip rate s with the historical slip rate sequence.

[0084] During the system initialization phase, the initial value of the preset compensation coefficient k is k0. This initial value k0 can be calibrated based on the average slip error obtained by the inspection robot on a smooth standard road surface. It is usually set to 0 or a very small positive number (e.g., k0=0.05), indicating that under normal non-slip conditions, only a very small basic error compensation is performed on the odometer data.

[0085] Subsequently, the system calculates the current slip ratio s and the average of the historical slip ratio series (denoted as s). history The difference s=ss history The compensation coefficient k is then updated according to the following adaptive correction formula based on this difference: ;

[0086] Where, k new k represents the compensation coefficient after this update. old The compensation coefficient is the value from the previous moment, and α is a preset adaptive adjustment step size factor (e.g., it can be between 0.1 and 0.5), which is used to control the sensitivity of the compensation coefficient to changes in slip ratio.

[0087] Specifically, when an increasing trend of s relative to the historical slip rate is detected (i.e. (s > 0), the current slippage trend is determined to be "intensified", at which point k new >k old That is, as the compensation coefficient increases, the degree to which the odometer data is discounted increases accordingly; conversely, when a decreasing trend of s relative to the historical slip rate is detected (i.e., ... (s > 0) indicates that the slip ratio is lower than the historical average, and the slip trend is converging. At this time, k new It will automatically be less than k. old This means that as the compensation coefficient decreases, the reliability of the odometer data gradually recovers. Through the adaptive correction formula described above, the compensation coefficient k automatically increases or decreases with the slippage trend.

[0088] In addition, to prevent data distortion caused by over-adjustment of the compensation coefficient, the system also sets a safety boundary for the compensation coefficient, namely k. new The final value of k is restricted to a preset reasonable range, such as 0 ≤ k ≤ 0.9; when the calculated k new When the preset safety boundary is exceeded, the system will k new Truncate to the nearest boundary value. That is: ;

[0089] Using the adaptive correction formula described above, the compensation coefficient k automatically increases or decreases as the slippage trend changes. The updated compensation coefficient k new The k value after compensation at the current moment is used for subsequent calculations to correct the odometer data.

[0090] Finally, the system uses the dynamically adjusted compensation coefficient k to correct the odometer data, calculated using the formula: v comp =v odom ×(1-k);

[0091] Where k is the compensation coefficient calculated by the aforementioned adaptive correction formula and truncated by the safety boundary, and v odom For measuring speed using the original odometer, v comp This is the corrected odometer speed.

[0092] The corrected odometer speed is updated into the motion data and then input into the error state Kalman filter for fusion, thereby effectively avoiding attitude divergence caused by wheel slippage.

[0093] This step compares the current multi-source attitude and motion data with historical data to determine the robot's slippage trend in real time. Based on this trend, it adaptively compensates the odometer data, effectively eliminating measurement distortion caused by slippage on wet or undulating surfaces. Specifically, the system calculates the inertial measurement velocity from IMU data and compares it with the odometer's measured velocity to determine the slippage rate. By comparing the current slippage rate with historical slippage rate sequences, it determines whether the slippage is in an aggravating or converging trend and dynamically adjusts the compensation coefficient accordingly. This ensures the compensation level matches the actual slippage, avoiding over-correction when there is no slippage and under-compensation when there is severe slippage. Simultaneously, the system ensures the smoothness and stability of the compensation process by pre-setting initial values ​​and safety boundaries for the compensation coefficients, preventing data distortion caused by over-adjustment. Furthermore, this step uses error-state Kalman filtering to tightly couple and fuse the compensated motion data with the multi-source attitude data. Compared to traditional loosely coupled fusion methods, this achieves joint optimization of multi-source information at the raw data level. Furthermore, the multi-source attitude and motion data acquired in this step include not only inertial measurement unit (IMU) and odometer data, but also visual optical flow modulus data and strain curvature data. The strain curvature data characterizes the degree of flexible deformation of the vehicle body during obstacle crossing or loaded driving, enabling the system to perceive and compensate for dynamic coordinate system deviations caused by the vehicle body's flexible deformation during the fusion process. Through the synergistic effect of the aforementioned slip trend judgment, adaptive odometer compensation, and tightly coupled fusion of multi-source data, this step can maintain high-precision attitude estimation under long-endurance operation and complex terrain conditions.

[0094] Step S2: Input the multi-source attitude data, motion data and the fused state variables into the pre-trained drift spatiotemporal prediction model, and output the drift pattern classification results and the drift trend prediction sequence within a preset time period.

[0095] The drift spatiotemporal prediction model includes a cascaded Graph Attention Network (GAT) module, a Gated Recurrent Unit (GRU) module, and a Physical Information Neural Network (PINN) module.

[0096] Specifically, the system first performs a structured mapping on the input multi-source pose data, motion data, and fused state variables, transforming them into graph vertices within a graph data structure. Then, the Graph Attention Network (GAT) module processes these graph vertices, dynamically calculating the correlation strength between vertices through a multi-head attention mechanism, thereby effectively extracting the complex spatial dependencies between multi-source sensor data.

[0097] Secondly, based on the acquired spatial features, the system utilizes a gated recurrent unit (GRU) module to jointly encode the spatial dependency features output by the graph attention network and the temporal sequence of the fused state variables. Through the gating mechanism of the GRU module, the model can effectively capture and extract the temporal features of the fused state variables over time, thereby understanding the dynamic changes in attitude drift.

[0098] Finally, to prevent purely data-driven models from producing predictions that violate physical laws under complex operating conditions, the system incorporates a Physical Information Neural Network (PINN). This network introduces the robot's rigid body dynamics equations as physical constraints into the model, forcing the model's output predictions to satisfy the laws of rigid body dynamics.

[0099] Furthermore, Figure 2 This is a flowchart of the training phase of the drift spatiotemporal prediction model in this embodiment. For example... Figure 2 As shown, this training phase includes the following steps:

[0100] S01: Obtain historical multi-source posture data, historical motion data, and historical fusion state variables of the inspection robot under various preset working conditions. After cleaning and aligning these data, construct a training sample set for model training.

[0101] Specifically, the preset working conditions include: a flat straight-line walking condition, in which the robot moves at a constant or variable speed on a flat road surface to collect baseline operating data under conditions without external interference; a climbing and descending condition, in which the robot traverses sloping road sections with different load states to collect the output response of each sensor under conditions of pitch angle change; a wet and slippery road surface condition, in which a low-adhesion road surface is formed by sprinkling water or natural water accumulation to collect the deviation characteristics between wheel speed data and IMU calculated speed under conditions of odometer slippage; a continuous crosswind interference condition, in which the robot's attitude deflection response is collected under the action of continuous external lateral force; a single-tire depressurization and uneven load condition, simulating asymmetric walking resistance caused by uneven tire pressure to collect attitude change data under conditions of asymmetric force on the vehicle body; and a combination switching condition of the above multiple working conditions to collect the transient response characteristics of each sensor data at the moment of sudden change in working conditions.

[0102] Under the aforementioned preset operating conditions, the system collects triaxial angular velocity and triaxial acceleration data via an inertial measurement unit deployed on the inspection robot as components of historical multi-source attitude data. It also collects left and right wheel speed pulse counts via an odometer as components of historical motion data. The system then fuses the sensor data using an error state Kalman filter to obtain historical fused state variables. The collected data under each operating condition are aligned by timestamps to form a training sample set covering multiple operating states. Each training sample contains multi-source attitude data, motion data, and fused state variables at the same moment, and is labeled with the actual drift tag corresponding to that moment. This drift tag is obtained through post-hoc high-precision pose reference (such as a total station or laser tracker).

[0103] S02, Construct an initial drift spatiotemporal prediction model, which includes a graph attention network module, a gated recurrent unit module, and a physical information neural network module cascaded in sequence.

[0104] Among them, the graph attention network module is used to construct a dynamic spatiotemporal graph and extract the spatial dependency features between vertices of each input graph;

[0105] The gated recurrent unit module is used to jointly encode the spatial dependency features output by the graph attention network module and the temporal sequence of the fusion state quantity, and extract the temporal features of the evolution of the fusion state quantity over time.

[0106] The physical information neural network module is used to introduce rigid body dynamics equations as physical constraints, constraining the drift trend prediction sequence output by the drift spatiotemporal prediction model to satisfy the laws of rigid body dynamics.

[0107] In a preferred embodiment, the specific process of the graph attention network module constructing a dynamic spatiotemporal graph includes:

[0108] First, using the historical multi-source attitude data and historical fusion state variables as data sources, the graph vertices of the dynamic spatiotemporal graph are constructed. The graph vertices specifically include three-axis angular velocity nodes, three-axis acceleration nodes, left and right wheel speed difference nodes, visual optical flow mode length nodes, strain curvature nodes, and fused attitude angle nodes.

[0109] For each data node in the graph vertices, a real-time confidence coefficient is calculated synchronously. The confidence coefficient characterizes the reliability of the data quality at the current moment. The confidence coefficient is calculated as follows: For an odometer data node, its confidence α is calculated based on the slip ratio s. odom =max(0, 1-s), when s approaches 0, the confidence level approaches 1, and when s approaches 1, the confidence level approaches 0. That is, the more severe the slippage, the lower the confidence level of the odometer data.

[0110] For visual optical flow data nodes, their confidence level α is calculated based on the optical flow field consistency error between adjacent frames. visual When the image is blurry or there are insufficient feature points, the optical flow consistency error increases, and the confidence level decreases accordingly.

[0111] For an IMU data node, its confidence level α is calculated based on its measurement noise variance. IMU The confidence level decreases when the noise variance exceeds a preset threshold.

[0112] Subsequently, a multi-head attention mechanism is used to calculate the correlation strength between vertices in the graph as edge weights, and the outputs of each attention head are weighted and fused according to the preset fusion weights.

[0113] After weighting and fusing the outputs of each attention head according to preset fusion weights, the results are then calculated based on the confidence α of the source node. i confidence level α with the target node j The geometric mean is used as a modulation factor to modulate the initial edge weights, resulting in the final edge weights:

[0114] ;

[0115] Among them, W final W represents the final edge weights after modulation. attention The initial edge weights, α, are calculated using the multi-head attention mechanism. i Let α be the confidence coefficient of source node i. j Let be the confidence coefficient of the target node j. When the confidence of the source node or the target node decreases, the weight of its corresponding edge decreases synchronously. The worse the data quality, the smaller the impact of the node on the graph topology.

[0116] To enhance the model's robustness, when the confidence score of any graph vertex falls below a preset lower threshold, that data node is considered invalid. The attention weight corresponding to that vertex is reset to zero, and the node is temporarily removed from the graph structure. The attention weights are then renormalized based on the remaining valid graph vertices, resulting in an updated dynamic spatiotemporal graph. The aforementioned confidence weighting mechanism and the hard zeroing mechanism work together: for minor data quality degradation, continuous weighting smoothly attenuates its impact; for severe degradation, hard zeroing completely isolates it. Together, they form a complete solution for addressing multi-source data quality degradation. The updated dynamic spatiotemporal graph is used for subsequent extraction of spatial dependency features between vertices of each input graph.

[0117] S03, construct a hybrid loss function that includes a data-driven loss term and a physical consistency loss term.

[0118] In a preferred embodiment, the physical consistency loss term is constructed based on the rigid body dynamics equations. The rigid body dynamics equations describe the physical relationship between the attitude angle and angular velocity of the inspection robot when subjected to an external torque, and their specific form is:

[0119] ;

[0120] Where M is the net external torque acting on the inspection robot, I is the moment of inertia, and ω is the angular velocity. The external torque is angular acceleration. The estimated value of the external torque τ is... ext The net external moment M is either the measured or estimated value, both pointing to the same physical quantity; the rigid body dynamics equation is used to constrain the net external moment M and the estimated external moment τ. ext Consistency, i.e., the ω and the constrained model predictions Satisfying the torque balance relationship, That is, the angular velocity ω and angular acceleration predicted by the calculation model. The sum of the resulting inertial torque and gyroscopic torque is then compared with the estimated value of the observed external torque τ. ext A comparison is performed to constrain the deviation between the two to tend to zero.

[0121] The right side of the equation contains two terms: the first term... The first term is the inertial torque term, used to describe the portion of the external torque that produces angular acceleration; the second term... This is the gyroscopic torque term, used to describe the nonlinear coupling effect caused by the change in the direction of angular momentum when a rigid body rotates at high speed.

[0122] In this embodiment, only the inertial moment term is used in the process of constructing the physical consistency loss term. With the estimated external torque τ ext Consistency constraints are applied. This simplification is based on the following considerations: When performing tunnel inspection tasks, the inspection robot typically operates at a low speed (generally not exceeding 1-2 m / s), mainly moving in straight lines with a large turning radius and a small angular velocity ω. Therefore, the gyroscopic torque term... The magnitude is much smaller than that of the inertial torque term. The impact on attitude drift can be ignored. By ignoring this term, the computational complexity of the physical consistency loss term is significantly reduced without affecting the physical rationality constraint of the model's attitude drift prediction under low-speed operating conditions. In practical applications, if the inspection robot operates at a high speed or makes frequent turns, the complete gyroscopic torque term can be retained in the loss function; this embodiment does not impose such restrictions.

[0123] Based on the above rigid body dynamics equations, the construction process of the physical consistency loss term is as follows:

[0124] Angular velocity data ω is extracted from historical multi-source attitude data, and the time derivative of the historical fused state variables is performed to obtain angular acceleration data. and attitude angle change rate Simultaneously, the rotational inertia I and the estimated external torque τ of the inspection robot are obtained. ext Among them, the estimated external torque τ ext The moment of inertia (I) is measured by force sensors deployed on the inspection robot or estimated based on the current value of the drive motor, characterizing the actual external torque currently experienced by the robot. I is an inherent physical parameter of the inspection robot, which can be obtained in advance through CAD model calculations or system identification experiments.

[0125] In this embodiment, the estimated external torque τ ext It serves as a bridge connecting physical measurements and model predictions. One end originates from measured data from force sensors or estimated motor current, representing the actual external torque the robot experiences at any given moment; the other end acts as a constraint target in the physical consistency loss term, constraining the inertial torque corresponding to the angular acceleration predicted by the model. With τ ext Maintain consistency, through τ ext The rigid body dynamics equations can be transformed from abstract mathematical expressions into differentiable physical constraints, giving the model physical credibility.

[0126] The above angular velocity ω and angular acceleration Rate of change of attitude angle The moment of inertia I and the estimated external torque τ ext Substitute into the following formula to construct the physical consistency loss term:

[0127] ;

[0128] Where I is the moment of inertia, Let τ be the angular acceleration. ext This is an estimated value for the external torque. Let λ be the attitude angle and ω be the angular velocity; λ1 and λ2 are balance coefficients used to adjust the relative weights of the two loss terms in the total loss. In the early stages of model training, the model's prediction accuracy is low. Applying excessively strong penalties to physical constraints can easily lead to gradient conflicts, making model convergence difficult. Therefore, λ1 and λ2 are set to a small order of magnitude, allowing the data-driven loss term to dominate the optimization direction in the early stages of training, with the model prioritizing the fitting of drift patterns in the training data. As the training epochs increase, the model's prediction accuracy gradually improves, and λ1 and λ2 gradually increase according to a preset incremental strategy. The penalty strength of the physical consistency loss term gradually increases, forcing the model's output prediction results to gradually approach the laws of rigid body dynamics. When λ1 and λ2 reach their preset maximum values, the model simultaneously satisfies the requirements of data fitting accuracy and physical consistency, and training is complete. Through this dynamic adjustment strategy, the problem of loss oscillation or convergence failure in the early stages of training due to excessively strong physical constraints is avoided, achieving a smooth transition between data-driven learning and physical constraints.

[0129] It should be noted that the two losses in the above physical consistency loss term have different physical dimensions. The first term... The dimension of the torque is the square of the torque ( ), the second item The dimension is the square of the angular velocity (rad) 2 / s 2 The two losses are weighted and added together using balancing coefficients λ1 and λ2. The values ​​of λ1 and λ2 themselves include the function of dimension transformation. Numerically, by adjusting their relative magnitudes, the two losses are made to be of the same order of magnitude in the early stages of training. Therefore, even if the physical dimensions of the two losses are different, by adjusting the balancing coefficients, they are comparable and additiveable in the total loss function, without affecting the stability and convergence of the model training.

[0130] The first term in the above formula The physical meaning is: constraint (i.e., the portion of the torque used to generate angular acceleration in the rigid body dynamics equations) and the estimated external torque τ ext Keep it consistent. If the model predicts angular acceleration... The corresponding torque is inconsistent with the external torque measured by the sensor, indicating that the prediction result deviates from the physical laws described by the rigid body dynamics equation. This loss will increase and produce a penalty.

[0131] Second item The physical meaning is: constrained attitude angle change rate. Maintaining consistency with the angular velocity ω, meaning the rate of change of the attitude angle should equal the current angular velocity, conforms to the fundamental relationships of rigid body kinematics. In this embodiment, this constraint does not require the introduction of an additional coordinate transformation matrix, but is directly expressed as... The robot is constructed in a specific form. Under typical working conditions of underground coal mine roadway inspection, the robot primarily travels in straight lines and makes small-angle turns, with relatively small changes in roll and pitch angles. In this case, the rate of change of attitude angles is... Since the angular velocity ω is approximately equal to the angular velocity ω, this form can be directly used to effectively constrain the kinematic consistency between the two. For large-angle maneuvers, a precise description can be achieved by introducing a coordinate transformation matrix between the attitude angle and the angular velocity; this embodiment does not impose such limitations.

[0132] The above physical consistency loss term L phys With data-driven loss term L data Combining these, we obtain the mixed loss function: L total =L data +L phys ;

[0133] Among them, the data-driven loss term L data Mean squared error or mean absolute error is typically used to measure the deviation between the drift trend sequence predicted by the model and the true drift label. During the training process of the hybrid loss function, the model is required to fit the training data (data-driven term) and satisfy physical laws (physical consistency term), thereby achieving a balance between data-driven and physical constraints.

[0134] In a preferred embodiment, the physical information neural network module further includes an environmental parameter estimation branch.

[0135] Specifically, an additional regression head is set at the end of the physical information neural network module. This regression head consists of two fully connected layers. The input is the temporal feature vector output by the gated recurrent unit module, and the output is a numerical value used to characterize the current equivalent friction coefficient μ of the ground. est The equivalent friction coefficient μ est The external torque calculation step introduced into the rigid body dynamics equations, i.e., the estimated external torque τ. ext It consists of the difference between the motor driving torque and the frictional resistance torque, where the frictional resistance torque is related to μ. est They show a positive correlation.

[0136] During training, when the kinematic parameters such as angular velocity and angular acceleration output by the model are incompatible with the external torque measured by the sensor (i.e., according to the current μ), est The extrapolated frictional drag cannot explain the observed motion state, and the physical consistency loss term will penalize the model. To minimize the physical loss, the model automatically adjusts μ through backpropagation. est The value of is selected to gradually approach the true equivalent friction coefficient under the current ground conditions, and this update process does not rely on additional labeled data.

[0137] Through this auxiliary task, the model can simultaneously infer the equivalent friction coefficient of the current road surface while predicting the drift trend. This enables the model to adaptively adjust the confidence level of the odometer data under low adhesion coefficient conditions such as wet and slippery roads and muddy alleys, further improving the prediction accuracy of drift prediction under extreme conditions.

[0138] S04. Input the training sample set into the initial drift spatiotemporal prediction model and perform iterative training using a hybrid loss function. In each iteration, the parameters of the graph attention network, gated recurrent unit, and physical information neural network module are updated simultaneously through backpropagation, causing the hybrid loss function value to gradually decrease. During the iteration process, it is determined whether the hybrid loss function has converged. If it has not converged, the iteration continues; if it has converged, the training stops, resulting in a trained drift spatiotemporal prediction model.

[0139] In a preferred embodiment, the aforementioned drift-spatiotemporal prediction model is deployed in the edge computing unit of the inspection robot body. To meet the real-time control requirements for inference speed, the model employs weight quantization and operator fusion for compressed deployment, compressing the 32-bit floating-point parameters into 8-bit integers to reduce memory consumption and bandwidth requirements, and merging multiple consecutive computation steps into a single operator to reduce kernel call overhead. Simultaneously, the graph attention network uses a sparse attention mechanism, retaining only the K edges with the largest attention weights for graph convolution operations in each layer, while ignoring the remaining edges. After these optimizations, the drift-spatiotemporal prediction model's single forward inference time on the edge computing unit does not exceed 5 milliseconds, meeting the requirement of a 200Hz real-time control cycle.

[0140] Step S2 uses a pre-trained spatiotemporal drift prediction model to input multi-source attitude data, motion data, and fused state variables into a cascaded graph attention network module, a gated recurrent unit module, and a physical information neural network module, achieving multi-dimensional perception and prediction of the inspection robot's attitude drift. Spatially, the graph attention network module maps the input data to graph vertices and dynamically calculates the correlation strength between vertices through a multi-head attention mechanism, effectively extracting the complex spatial dependencies between multi-source sensor data and enabling the model to adaptively perceive the coupling relationships between sensors. Temporally, the gated recurrent unit module jointly encodes the spatial dependency features output by the graph attention network and the temporal sequence of the fused state variables. Through a gating mechanism, it captures the long-term dependencies of the fused state variables over time, grasping the dynamic changes in attitude drift and avoiding the gradient vanishing or exploding problems that traditional temporal models encounter when processing long sequences. At the physical constraint level, the physical information neural network module introduces rigid body dynamics equations as physical constraints into the model. During the training phase, a physical consistency loss term constrains the drift trend prediction sequence output by the model to satisfy the laws of rigid body dynamics, ensuring that the prediction results remain physically consistent under complex conditions. This solves the problem that purely data-driven models are prone to outputting physically unreasonable predictions under extreme conditions with insufficient training data coverage. The graph attention network module introduces a failure-zeroing and renormalization mechanism when constructing the dynamic spatiotemporal graph. When the data of any graph vertex fails or exceeds the confidence range, the attention weight corresponding to that vertex is reset to zero, and the attention weights of the remaining valid graph vertices are renormalized. This allows the model to maintain effective spatial dependency feature extraction even when some sensors fail, enhancing the model's robustness in harsh environments.

[0141] During the training phase, the system constructs a training sample set using historical data collected under various preset working conditions. This covers a wide range of complex working conditions that the inspection robot may encounter in actual operation, enabling the model to learn drift pattern characteristics under different working conditions during the training phase. In terms of loss function design, the system constructs a hybrid loss function that includes a data-driven loss term and a physical consistency loss term. The data-driven loss term ensures that the model fits the drift pattern characteristics in the training data, while the physical consistency loss term constrains the model output to conform to torque balance relationships and fundamental kinematic relationships based on rigid body dynamics equations. The joint optimization of these two loss terms achieves a balance between data fitting accuracy and physical plausibility. Backpropagation simultaneously updates the parameters of the graph attention network, gated recurrent unit, and physical information neural network module, ensuring that the drift pattern classification results and drift trend prediction sequences output by the model after training convergence accurately reflect the drift patterns contained in the historical data without deviating from the fundamental physical laws described by rigid body dynamics. Through the synergistic effect of spatial dependency extraction, temporal evolution modeling, physical law constraints, and multi-condition training, step S2 provides accurate drift pattern recognition and drift trend prediction for the attitude adjustment strategy generation in the subsequent step S3, realizing the transformation from passive perception to proactive prediction.

[0142] S3. Based on the drift pattern classification results, the drift estimation variance, and the drift trend prediction sequence, generate an attitude adjustment strategy for the inspection robot, and adjust the control parameters of the inspection robot according to the attitude adjustment strategy.

[0143] Specifically, the change in attitude angle over time in the fused state variables is recorded as the drift. The drift mode classification results output by the drift spatiotemporal prediction model include three types:

[0144] Periodic drift, characterized by sinusoidal or quasi-periodic fluctuations over time, with the frequency related to the robot's step frequency or the periodicity of road surface ripples, is typically caused by periodic external stimuli, such as the regular swaying caused by the robot's step frequency during walking, or the continuous oscillations caused by periodic road surface ripples. When the model output exhibits periodic drift, the system increases the controller's observation bandwidth to improve the tracking speed of periodic disturbances, while simultaneously reducing the nonlinear factor to suppress high-frequency noise amplification. These two measures work together to effectively suppress periodic drift.

[0145] Monotonic cumulative drift is characterized by a drift amount that increases or decreases monotonically over time, with the absolute value of the rate of change exceeding a preset threshold and the direction of change remaining stable. This type of drift is typically caused by the accumulation of zero bias in the inertial measurement unit (IMU), manifesting as a continuous deviation of the attitude angle in one direction. When the model output exhibits monotonic cumulative drift, the system activates the integral separation function and lowers the integral limit threshold to prevent the integral term from continuously accumulating in one direction, leading to integral saturation and subsequently causing control overshoot.

[0146] Sudden drift occurs when the change in drift amount exceeds a preset sudden change threshold over two consecutive sampling periods and is associated with an external impact event. This drift is typically caused by sudden external impacts, such as a robot colliding with an obstacle or a momentary disturbance caused by a sudden change in road surface. When the model output shows sudden drift, the system temporarily increases the switching gain of the controller to enhance its shock resistance and automatically returns to the baseline value after the sudden change ends.

[0147] In addition to the drift pattern classification results, the system also acquires the drift estimation variance, which reflects the reliability of the current fused attitude estimation. When the drift estimation variance is greater than a preset threshold, it indicates that the reliability of the current attitude estimation is low, and the system reduces the adjustment step size of the control parameters to perform parameter adjustment in a conservative manner; when the drift estimation variance is less than or equal to the preset threshold, it indicates that the reliability of the current attitude estimation is high, and the system increases the adjustment step size to respond quickly in an aggressive manner.

[0148] The system also performs differential processing on the drift trend prediction sequence to obtain the drift change rate, and generates a feedforward compensation amount based on the drift change rate. The feedforward compensation amount is superimposed on the output of the controller to realize the pre-output compensation torque before the drift occurs, thereby further improving the control response speed and making the control action occur before the drift occurs, rather than waiting for the attitude to deviate before making correction.

[0149] In a preferred embodiment, an attitude adjustment strategy for the inspection robot is generated based on the drift pattern classification result, the drift estimation variance, and the drift trend prediction sequence, specifically including:

[0150] First, based on the drift mode classification results, a corresponding baseline adjustment strategy is matched from a pre-set strategy library. The strategy library stores the mapping relationship between each drift mode and the control parameter adjustment direction. This mapping relationship, after control theory analysis and engineering verification during the system design phase, is pre-fixed in the inspector robot's controller in the form of a lookup table or conditional statement. During online operation, the system directly looks up the table to match the corresponding baseline adjustment strategy based on the drift mode classification results, without requiring online optimization or iterative calculations.

[0151] Specifically, when the drift pattern is classified as periodic drift, a typical scenario is an inspection robot driving on a road surface with periodic ripples, or regular body swaying caused by the robot's step frequency. In this case, the drift amount exhibits sinusoidal or quasi-periodic fluctuations over time. To address this persistent periodic disturbance, the system's baseline adjustment strategy involves increasing the controller's observation bandwidth and decreasing the nonlinearity factor. Increasing the observation bandwidth improves the extended state observer's tracking speed for periodic disturbances, enabling it to estimate disturbance changes more quickly. However, this also amplifies high-frequency measurement noise. Therefore, it's necessary to reduce the nonlinearity factor to suppress noise amplification. These two inversely related strategies effectively suppress periodic drift.

[0152] When the drift mode classification result is monotonic cumulative drift, a typical scenario is that during long-distance straight-line travel of an inspection robot, the zero bias of the inertial measurement unit drifts slowly with temperature changes or over time, causing the integrated attitude angle to continuously deviate monotonically in one direction. To address this continuous unidirectional accumulation of deviation, the system's baseline adjustment strategy is to enable integral separation and reduce the integral threshold. Integral separation ensures that the integral term only takes effect when the attitude deviation is small and changes gradually, preventing the integral term from accumulating under continuous deviation conditions; reducing the integral threshold further limits the maximum accumulation of the integral term, and both together prevent control overshoot caused by integral saturation.

[0153] When the drift mode classification result is abrupt drift, the typical scenario is an instantaneous impact experienced by the inspection robot when crossing a track joint, colliding with an obstacle, or experiencing a sudden change in road surface. The drift amount changes drastically within two consecutive sampling periods. For this type of instantaneous impact, the system's baseline adjustment strategy is to temporarily increase the controller's switching gain to enhance its shock resistance, and then automatically restore it to the baseline value after the abrupt change ends. Increasing the switching gain makes the controller more robust during the impact, enabling it to quickly suppress attitude changes. However, the high-gain state should not be sustained, otherwise it will amplify steady-state noise; therefore, it needs to be restored promptly after the impact ends.

[0154] After determining the baseline adjustment strategy, the system further modifies and supplements the baseline adjustment strategy based on the drift estimation variance and the drift trend prediction sequence to form the final complete attitude adjustment strategy.

[0155] Specifically, the drift estimation variance is used to correct the execution step size of the baseline adjustment strategy. This variance is output in real time by the error state Kalman filter and reflects the reliability of the current fused attitude estimation. When the drift estimation variance is greater than a preset threshold, it indicates that the reliability of the current attitude estimation is low. In this case, making large adjustments to the parameters may introduce new instability factors. Therefore, the system reduces the adjustment step size of the control parameters and performs parameter adjustments gradually in a conservative manner. When the drift estimation variance is less than or equal to the preset threshold, it indicates that the reliability of the current attitude estimation is high. The system increases the adjustment step size and responds quickly in an aggressive manner.

[0156] Simultaneously, the drift trend prediction sequence, after differentiation, generates a feedforward compensation amount, which is superimposed on the controller's output. The drift trend prediction sequence describes the trend of drift change within a preset time period. After differentiation, the drift change rate is obtained, which, multiplied by a preset proportional coefficient, yields the feedforward compensation torque. This feedforward compensation amount acts on the actuator before the attitude deviation becomes significant, achieving an advanced control effect of early prediction and early action.

[0157] Through the aforementioned multi-level superposition method, the baseline strategy determines the adjustment direction, the variance correction adjustment magnitude, and the feedforward supplementary advance action; these three elements work together to generate a complete attitude adjustment strategy. In actual operating conditions, the three drift modes may coexist, and the system uses the aforementioned multi-level superposition method to simultaneously cope with multiple disturbances.

[0158] In a preferred embodiment, the inspection robot employs a cascaded control structure to achieve attitude stabilization control. The cascaded controller includes an outer-loop attitude controller and an inner-loop drive controller. The outer-loop attitude controller uses an Active Disturbance Rejection Control (ADRC) strategy and includes an extended state observer to calculate a reference control quantity based on the deviation between the fused state quantity and the desired attitude, while simultaneously estimating the total external disturbance and performing feedforward compensation in real time. The inner-loop drive controller uses a sliding mode control strategy to quickly track the reference control quantity output by the outer-loop controller and adjust the drive motor in real time, enabling the actual rotational speed to converge rapidly to the target value. The inner and outer loops work together; the outer-loop controller ensures the robot remains stable at the macroscopic attitude level, while the inner-loop controller quickly suppresses execution-level disturbances such as motor load fluctuations and sudden road surface changes, significantly reducing the impact of external shocks on attitude control accuracy.

[0159] In step S3, the system generates a feedforward compensation torque by differentiating the drift trend prediction sequence. This feedforward compensation torque is then linearly superimposed with the feedback output of the active disturbance rejection controller (ADRC) and used together as the reference input for the inner-loop sliding mode controller. Since the feedforward compensation amount originates from the prediction of the future drift trend, this compensation amount acts on the inner-loop controller before the attitude deviation becomes significant, causing the actuator to act in advance, thereby suppressing the drift in its early stages.

[0160] Specifically, the parameter adjustment strategy of the cascaded control structure is as follows: when the drift mode classification result is periodic drift, the observation bandwidth of the outer loop active disturbance rejection controller is increased and the nonlinear factor is reduced to accelerate the tracking speed of periodic disturbances and suppress high-frequency noise amplification; when the drift mode classification result is monotonic cumulative drift, integral separation is enabled and the integral limit threshold is reduced to prevent the integral term from accumulating continuously in one direction and causing integral saturation; when the drift mode classification result is abrupt drift, the switching gain of the inner loop sliding mode controller is temporarily increased and restored to the reference value after the abrupt change ends.

[0161] In a preferred embodiment, after step S3, a feedback closed-loop self-learning step is further included, as follows:

[0162] First, control commands are generated based on the posture adjustment strategy to drive the actuators of the inspection robot to correct its posture. The actuators include the robot's walking drive motor and its transmission system. The control commands are output to the motor driver via an embedded controller, driving the robot to move according to the adjusted posture.

[0163] After the actuator performs attitude correction, feedback data of the actuator is acquired. The feedback data includes encoder feedback data installed on the output shaft of the drive motor. The actual displacement of the actuator during the attitude correction process is obtained by converting the encoder pulse count value.

[0164] The actual displacement is compared with the corresponding theoretical displacement in the control command to calculate the displacement deviation. This displacement deviation reflects the gap between the actual execution result and the expected control effect, and is the residual error after the actuator overcomes non-ideal factors such as external resistance, slippage, or deformation.

[0165] The displacement deviation is backpropagated to the drift spatiotemporal prediction model, triggering an online update of the model's parameters. This results in an updated drift spatiotemporal prediction model, which is used to output the drift trend prediction sequence after execution feedback correction. This online update does not change the overall model architecture; it only fine-tunes some top-level parameters, gradually incorporating actual execution deviations into the prediction basis.

[0166] Through this execution feedback closed-loop self-learning mechanism, the prediction accuracy of the drift spatiotemporal prediction model continuously improves during actual operation, and the control effect becomes more and more accurate with use. This ultimately forms a closed-loop control architecture, enabling the system to continuously adapt to environmental changes and the slow evolution of its own characteristics during long-term operation.

[0167] In a preferred embodiment, when the inspection robot successfully passes a preset calibration landmark or visual loop closure detection, a multi-level loop closure calibration is triggered: First, when the inspection robot passes a preset calibration landmark (such as a QR code label or reflective label), the absolute pose information provided by the landmark is used to reset the accumulated drift of the error state Kalman filter, eliminating the estimation error generated during long-term operation; second, the drift prediction error at the current moment is backpropagated to the drift spatiotemporal prediction model, triggering online fine-tuning and updating of the model's top-level parameters, enabling the model to quickly adapt to the current environment; finally, the integral saturation term of the controller is cleared, and the accumulator of the drift trend prediction sequence is reset to the current true drift value. Through the above three-level linkage calibration, the system can periodically eliminate accumulated errors during long-term continuous operation, maintaining attitude estimation accuracy and control stability. Together with the execution feedback closed-loop self-learning, it forms a two-layer closed-loop system of low-frequency high-precision correction and high-frequency continuous fine-tuning.

[0168] Step S3 generates a complete attitude adjustment strategy by synergistically integrating the drift pattern classification result, drift estimation variance, and drift trend prediction sequence. In the generation of the adjustment strategy, each of the three signals has a clear role: the drift pattern classification result is used to determine the adjustment direction, matching differentiated benchmark adjustment strategies to three different physical causes of drift: periodic drift, monotonically cumulative drift, and abrupt drift. This ensures that the control parameter adjustment accurately corresponds to the physical cause of the drift, avoiding the problem of a unified parameter adjustment strategy being inadequate for different drift types. The drift estimation variance is used to correct the adjustment step size; when the variance is large, parameter adjustment is performed conservatively, and when the variance is small, a rapid response is adopted aggressively, matching the control decision with the reliability of the current attitude estimation. The drift trend prediction sequence, after differential processing, generates a feedforward compensation quantity that is superimposed on the controller output, enabling the control action to begin before drift occurs, rather than waiting for attitude deviation before correction, significantly reducing control response lag. The three signals work together to make decisions in terms of direction, amplitude, and time, enabling a shift in control mode from reactive feedback to proactive prediction.

[0169] Furthermore, the execution feedback closed-loop self-learning step introduced after step S3 calculates the deviation between the actual and theoretical displacement by acquiring encoder feedback data from the actuator. This displacement deviation is then propagated back to the drift spatiotemporal prediction model, triggering online updates of the model parameters. This allows the model to gradually incorporate the execution deviation into its predictions during actual operation, continuously improving the accuracy of the drift trend prediction sequence over time. The synergy of drift mode classification, variance perception, feedforward compensation, and execution feedback enables the control strategy to simultaneously possess the capabilities of physical cause matching, confidence adaptation, advanced prediction, and continuous evolution. Through the synergistic effect of the aforementioned differentiated parameter tuning strategy, feedforward compensation mechanism, and execution feedback closed-loop self-learning, this step significantly improves the inspection robot's attitude stability and control robustness under highly nonlinear conditions such as slope climbing, slippery conditions, lateral wind disturbance, and sudden impacts.

[0170] Example 2:

[0171] Finally, this application also proposes a computing device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the instructions stored in the memory so that the computer device performs the inspection robot attitude drift adaptive stabilization control method described in the above embodiments.

[0172] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for adaptive stabilization control of attitude drift in an inspection robot, characterized in that, include: S1, acquire multi-source attitude data and motion data of the inspection robot; compare the multi-source attitude data and motion data with the corresponding historical data to determine the sliding trend of the inspection robot; compensate the motion data according to the sliding trend, and use error state Kalman filtering to fuse the compensated motion data with the multi-source attitude data to obtain the fusion state quantity characterizing the current attitude of the inspection robot and its drift estimation variance; S2, the multi-source attitude data, motion data and the fused state variables are input into a pre-trained drift spatiotemporal prediction model. The drift spatiotemporal prediction model maps the multi-source attitude data, motion data and the fused state variables to graph vertices, and uses a graph attention network to extract the spatial dependency features between each graph vertex. It uses a gated recurrent unit to extract the temporal features of the evolution of the fused state variables over time, and combines a physical information neural network to introduce rigid body dynamics equations as physical constraints. The model outputs drift pattern classification results and a drift trend prediction sequence within a preset time period. S3. Based on the drift pattern classification results, the drift estimation variance, and the drift trend prediction sequence, generate an attitude adjustment strategy for the inspection robot, and adjust the control parameters of the inspection robot according to the attitude adjustment strategy.

2. The adaptive stabilization control method for attitude drift of the inspection robot according to claim 1, characterized in that, The compensation of the motion data based on the slip trend includes: Acquire attitude data and odometry data from the multi-source attitude data and motion data; The speed v of the inspection robot is calculated based on the posture data. IMU The odometer-measured speed v is obtained based on the odometer data. odom ; According to the speed v of the inspection robot IMU The odometer measures the speed v odom Calculate the current slip ratio s using the following formula: ; Obtain a historical slip rate sequence, compare the current slip rate s with the historical slip rate sequence to determine the slip trend; when the current slip rate s shows an increasing trend relative to the historical slip rate, the slip trend is determined to be intensifying, and the preset compensation coefficient k is increased; when the current slip rate s shows a decreasing trend relative to the historical slip rate, the slip trend is determined to be converging, and the preset compensation coefficient k is decreased. The odometer data is compensated according to the compensation coefficient k to obtain the compensated odometer data v. comp =v odom ×(1-k); The compensated odometer data is then updated into the motion data to obtain the compensated motion data.

3. The adaptive stabilization control method for attitude drift of the inspection robot according to claim 1, characterized in that, The training steps for the drift spatiotemporal prediction model include: S01, acquire historical multi-source posture data, historical motion data and historical fusion state variables of the inspection robot under various preset working conditions, and construct a training sample set; S02, Construct an initial drift spatiotemporal prediction model, which includes a graph attention network module, a gated recurrent unit module, and a physical information neural network module cascaded in sequence; The graph attention network module is used to construct a dynamic spatiotemporal graph and extract spatial dependency features between vertices of each input graph; The gated recurrent unit module is used to jointly encode the spatial dependency features output by the graph attention network module and the temporal sequence of the fusion state quantity, and extract the temporal features of the evolution of the fusion state quantity over time. The physical information neural network module is used to introduce rigid body dynamics equations as physical constraints, constraining the drift trend prediction sequence output by the drift spatiotemporal prediction model to satisfy the laws of rigid body dynamics. S03, Construct a hybrid loss function that includes a data-driven loss term and a physical consistency loss term; S04, input the training sample set into the initial drift spatiotemporal prediction model, use the hybrid loss function to perform iterative training and update the model parameters until the model converges, and obtain the trained drift spatiotemporal prediction model.

4. The adaptive stabilization control method for attitude drift of the inspection robot according to claim 3, characterized in that, The specific process by which the graph attention network module constructs a dynamic spatiotemporal graph includes: Using the historical multi-source attitude data and historical fused state variables as data sources, the graph vertices of the dynamic spatiotemporal graph are constructed; the graph vertices include three-axis angular velocity nodes, three-axis acceleration nodes, left and right wheel speed difference nodes, visual optical flow mode length nodes, strain curvature nodes, and fused attitude angle nodes. A multi-head attention mechanism is used to calculate the correlation strength between vertices in the graph as edge weights, and the outputs of each attention head are weighted and fused according to a preset fusion weight. When the data of any graph vertex becomes invalid or exceeds the preset confidence range, the attention weight corresponding to that graph vertex is reset to zero, and the attention weights of the remaining valid graph vertices are renormalized to obtain an updated dynamic spatiotemporal graph; the updated dynamic spatiotemporal graph is used to extract the spatial dependency features between the vertices of each input graph in the subsequent process.

5. The adaptive stabilization control method for attitude drift of the inspection robot according to claim 4, characterized in that, The process of constructing the physical consistency loss term includes: Angular velocity data is extracted from the historical multi-source attitude data, and the historical fused state variables are differentiated over time to obtain angular acceleration data and attitude angle change rate. Obtain the estimated values ​​of the rotational inertia and external torque of the inspection robot; Based on the rigid body dynamics equations, a physical consistency loss term is constructed using the angular velocity, angular acceleration, rate of change of attitude angle, moment of inertia, and the estimated external torque: ; Where I is the moment of inertia, Let τ be the angular acceleration. ext This is an estimated value for the external torque. λ1 and λ2 are the attitude angle change rate, ω is the angular velocity, and λ1 and λ2 are the balance coefficients. The physical consistency loss term Used to constrain the The estimated external torque τ ext The torque balance relationship in the rigid body dynamics equations is satisfied.

6. The adaptive stabilization control method for attitude drift of the inspection robot according to claim 5, characterized in that, The rigid body dynamics equations are: ; Where M is the net external torque acting on the inspection robot, I is the moment of inertia, and ω is the angular velocity. Angular acceleration; the estimated external torque τ ext The net external torque M is either a measured or estimated value, both pointing to the same physical quantity; the rigid body dynamics equations are used to constrain the net external torque M and the estimated external torque τ. ext Consistency, i.e., the ω and the constrained model predictions satisfy The physical relationship.

7. The adaptive stabilization control method for attitude drift of an inspection robot according to claim 6, characterized in that, The change in attitude angle over time in the fused state variables is denoted as the drift. The drift mode classification results output by the drift spatiotemporal prediction model include: Periodic drift, the amount of drift fluctuates sinusoidally or quasi-periodicly over time, and the frequency of fluctuation is related to the robot's step frequency or the period of road surface ripples; Monotonic cumulative drift, the amount of drift increases or decreases monotonically with time, the absolute value of the rate of change is greater than a preset threshold and the direction of change remains stable; Mutation drift is defined as a drift that exceeds a preset mutation threshold within two consecutive sampling periods and is associated with an external shock event.

8. The adaptive stabilization control method for attitude drift of an inspection robot according to claim 7, characterized in that, Step S3, which involves generating an attitude adjustment strategy for the inspection robot based on the drift pattern classification result, the drift estimation variance, and the drift trend prediction sequence, includes: Based on the drift mode classification results, a corresponding baseline adjustment strategy is matched from a preset strategy library, which stores the mapping relationship between each drift mode and the control parameter adjustment direction. The baseline adjustment strategy is modified based on the drift estimation variance and the drift trend prediction sequence to obtain the attitude adjustment strategy.

9. The adaptive stabilization control method for attitude drift of an inspection robot according to claim 8, characterized in that, Following step S3, the following is also included: Control commands are generated based on the attitude adjustment strategy to drive the actuator of the inspection robot to perform attitude correction; After the actuator performs attitude correction, the feedback data of the actuator is acquired, and the actual displacement of the actuator is calculated based on the feedback data. The actual displacement is compared with the theoretical displacement corresponding to the control command to calculate the displacement deviation; The displacement deviation is backpropagated to the drift spatiotemporal prediction model, triggering an online update of the drift spatiotemporal prediction model parameters to obtain an updated drift spatiotemporal prediction model, which is used to output the drift trend prediction sequence after execution feedback correction.

10. A computing device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program and the processor executes the computer program stored in the memory, specifically performing the inspection robot attitude drift adaptive stabilization control method according to any one of claims 1 to 9.