1. The Problem: Why IMU State Estimation Diverges When AGVs Are Stationary
1.1 The Stop-and-Go Nature of AGV Operations
During intelligent AGV operations, AGVs frequently exhibit a “stop-and-go” pattern, which exposes them to error interference from both static and dynamic states. The IMU coordinate system is typically aligned with the vehicle body coordinate system, meaning that obtaining the IMU state values is equivalent to obtaining the AGV’s state. AGV state estimation with IMU plays a crucial role in Automated Guided Vehicle (AGV) systems — it provides critical state information and motion prediction data, forming the foundation for achieving autonomous capabilities in intelligent AGVs. Given the complexity and variability of intelligent AGV working environments, the accuracy and reliability requirements for state estimation systems are extremely high. The Inertial Measurement Unit (IMU), as the onboard sensor, can improve state estimation accuracy through auxiliary devices such as Beidou/GPS and visual sensors. However, within factories, rapid environmental changes caused by personnel walking and cargo obstruction lead to greater errors in auxiliary sensors. Therefore, improving the IMU’s own state estimation capability and reducing dependence on auxiliary sensors is of great significance for ensuring the operational reliability of intelligent systems.
- Due to the stop and go characteristic of intelligent AGV operation, it is hard to remove the errors caused by various states, which is hard to achieve the self-localization function. The following is clear, i.e., using the IMU to quickly identify if the AGV is in motion or at rest, and then performing the state estimation in each respective state.
- In the stationary state, the traditional direct zeroing method is easy, but it will lose attitude information and the subsequent dynamic estimation will also be affected. However, the IMU still generates non-zero values while it is stationary, which leads to rapid degradation of the accuracy of the static state estimation (primarily long-term drift of the static attitude and accumulation of errors in the static position and in the estimation of the static velocity). Overall, these effects affect the accuracy and stability of state estimation. In the IMU full-process state estimation, it is crucial to improve the accuracy of static state estimation.

1.2 Understanding IMU Static Errors
In solving the IMU state estimation divergence problem, effectively eliminating static errors and improving state estimation capability is critical. The acceleration and angular velocity output values should be close to zero when stationary, but minor variations occur due to the device’s inherent noise, leading to certain deviations. Therefore, how to effectively eliminate the influence of static errors and improve IMU pose estimation capability has become a key focus in solving IMU state estimation problems.
IMUs inherently carry static deterministic errors after leaving the factory. Deterministic errors include systematic errors such as scale factor, bias, mounting misalignment/non-orthogonality, and size effects. Bias error refers to the non-zero mean output in the absence of external disturbances — this error accumulates over time and can have a significant impact on long-term attitude estimation. Scale factor error represents a proportional mismatch between output and input, primarily causing deviations in the amplification or reduction factor of the output signal, thereby introducing measurement errors. Mounting error arises from non-ideal installation position or angle, which may cause systematic deviations between the gyroscope output and the actual motion, requiring correction and compensation in subsequent data processing. To improve IMU measurement accuracy, MEMS IMU error compensation relies on error model establishment to describe the relationship between these errors and actual measurement values.

In the analysis of IMU static random errors, the phase noise in the IMU model includes not only white noise but also flicker noise. When using standard deviation to analyze such noise, the results fail to converge. To address this issue, Allan variance analysis is employed for IMU random error analysis. This method can not only accurately identify noise types but also precisely determine the characteristic parameters of the noise. The Allan variance analysis method first collects system output signal data with a time series, divides the data into several equal-length segments, calculates the mean and variance for each segment, arranges the variance values in logarithmic form according to time length, and finally plots the Allan variance curve. Based on the characteristics of the Allan variance curve, the statistical properties of system errors — such as random walk error and white noise error — are analyzed. Through Allan variance analysis, in-depth analysis of inertial navigation system errors can be performed, thereby improving system accuracy and reliability.
The Allan variance method is suitable for evaluating and correcting IMU quantization noise, angular random walk, rate random walk, bias instability, and rate ramp. By performing Allan variance analysis on sensor output data, various random errors can be effectively corrected, thereby improving the accuracy and stability of IMU measurements.

1.3 The Core Challenge: Non-Zero Output at Rest Causes Estimation Divergence
Through the analysis of IMU static deterministic errors and random errors, the obtained results provide a degree of compensation for static errors. However, the IMU still produces non-zero output when the vehicle is stationary, so subsequent static state estimation techniques must be applied for further compensation.
2. Traditional Approaches and Their Limitations
2.1 Direct Zeroing and Its Risk of Information Loss
The direct zeroing method is a simple and straightforward IMU static estimation approach, but it has multiple drawbacks. Immediately resetting the velocity to zero upon detecting the first stationary point may cause an abrupt change in state estimation information, which is inconsistent with the actual dynamic-to-static transition process, resulting in pose discontinuity. The direct zeroing method cannot utilize historical observation information, and it causes the system to lose initial attitude information (magnetic field strength, gravity acceleration, direction, and orientation), which in turn creates difficulties for the initialization of subsequent dynamic state estimation.
2.2 The Static Error Compensation Principle
IMU static error compensation is one of the effective means of suppressing and compensating for navigation system errors. The traditional IMU static error compensation process for reducing IMU static errors can be divided into three parts: first, confirm the moment when the moving carrier is stationary using a static/dynamic detection algorithm; second, use the carrier’s velocity error as the error correction model; finally, apply an appropriate error elimination algorithm to correct the inertial calculation module using the known system velocity error, thereby improving the accuracy of the inertial estimation system.

When the carrier is detected to be in a stationary state, the velocity calculated by the IMU is used as the observation of the system velocity error, and estimation is performed through a Kalman filter. The updated state estimate is then used to feedback-correct the parameter errors within the system, thereby completing the static state estimation. The Kalman filter utilizes prior information about system errors and measurement errors to perform optimal estimation of the system state, and it achieves better error compensation effects, hence its wider adoption.
2.3 Detecting Stationary States: Beyond Simple Thresholding
To better distinguish the current state of intelligent AGVs and avoid the drawbacks of traditional threshold-dependent detection methods, a static/dynamic determination method based on Attention-CNN (Attention-Convolutional Neural Network) is proposed. By introducing an attention mechanism, the most relevant features can be automatically selected for weighting, better capturing data characteristics. Deep learning methods are used to extract the current static or dynamic state from IMU raw acceleration and angular velocity data. The proposed method improves determination accuracy from the traditional 85.2% to 95.8%.
Traditional static/dynamic determination methods are typically based on fixed thresholds — when the variance of acceleration or angular velocity is below a preset threshold, the state is classified as stationary; above the threshold, as moving. This approach is simple but heavily dependent on threshold selection: a threshold that is too low leads to missed detection of stationary states, while a threshold that is too high causes moving states to be misclassified as stationary. Particularly under different operating conditions (ground material, load weight, travel speed), the appropriate threshold changes, making fixed thresholds difficult to adapt. The Attention-CNN method avoids the drawbacks of manual threshold setting by directly learning discriminative features from raw IMU data, significantly improving determination accuracy.

3. The Two-Step Error-State Kalman Filter (TS-ESKF) Solution
3.1 Overall Framework
When the AGV is stationary, the IMU produces non-zero output causing state estimation divergence, and the traditional direct zeroing method carries the risk of losing initial attitude information (magnetic field strength, gravity acceleration, direction, orientation, etc.), which affects the accuracy of subsequent dynamic estimation. Therefore, a static error compensation method based on the Two-step Error-State Kalman Filter (TS-ESKF) is proposed. This method uses the error between the theoretical velocity value and the actual velocity value as the first-order observation model. Building upon the first-order update, a second-order observation model is introduced, which uses the error between static actual acceleration/angular velocity and theoretical acceleration/angular velocity as the second-order observation model, thereby more accurately describing the nonlinear characteristics of the system state, achieving compensation for IMU static errors, and improving the AGV static state estimation accuracy based on IMU.
The TS-ESKF static state compensation algorithm can be divided into four stages: 1) Initialize the main state vector, error state vector, and covariance matrix; define the system state model, observation model, and noise model. 2) Predict the current main state, error state, and state covariance based on the system state model. 3) Use the error between theoretical velocity and actual velocity as the first-order observation model; compare the predicted state with the actual observation and calculate the residual; combine with the observation noise model to obtain the Kalman gain. Use the Kalman gain to correct the predicted main state and state covariance matrix, obtaining the updated first-order state estimate and covariance matrix, then reset the error to zero. 4) Apply the error between theoretical acceleration/angular velocity and actual acceleration/angular velocity as the second-order observation model to correct the first-order state estimate, finally obtaining the second-order state update value.

3.2 Error-State Kalman Filter vs. Standard Kalman Filter
In 2005, Foxlin used velocity measurements during stationary states as velocity error observations in an Extended Kalman Filter, effectively reducing the positioning error of the inertial navigation system while extending its duration. By utilizing zero-velocity information during stationary states as a constraint, velocity and displacement errors can be corrected at each step of the state estimation process. Compared to a standalone IMU estimation system, this approach has been proven to significantly improve state estimation accuracy and stability. Moreover, this method is particularly well-suited for “stop-and-go” intelligent AGV systems.
The key difference between Error-State Kalman Filtering and standard Kalman Filtering is that standard Kalman filtering directly estimates the full system state (position, velocity, attitude), while error-state Kalman filtering estimates the error quantities of the state. When the IMU is stationary, the error states are typically small and change slowly, conforming more closely to the linear system assumption. Therefore, error-state Kalman filtering offers better numerical stability and convergence characteristics. Building on this, the TS-ESKF method further introduces a second-order observation on top of the error-state Kalman filter framework, addressing the limitation of first-order ESKF which only uses velocity error as the observation.
3.3 Why Two Steps? The Rationale Behind First-Order and Second-Order Compensation
The error between the theoretical velocity value and the actual velocity value is used as the first-order observation model. Building upon the first-order update, a second-order observation model is introduced, which uses the error between static actual acceleration/angular velocity and theoretical acceleration/angular velocity as the second-order observation model, thereby more accurately describing the nonlinear characteristics of the system state.
The first-order observation model utilizes velocity error — when the carrier is in a stationary state, the theoretical velocity should be zero, and the velocity calculated through IMU integration represents the velocity error, which is used as the first-order observation to correct the state. The second-order observation model utilizes acceleration and angular velocity errors — in a stationary state, the accelerometer should theoretically measure only gravitational acceleration components, and the gyroscope should theoretically measure Earth’s rotation angular velocity components. The deviation between actual measured values and theoretical values constitutes the second-order error, which is used to further correct the state after the first-order update.
3.4 Experimental Validation and Performance
Experimental validation was conducted on the proposed method, and results demonstrate that the TS-ESKF method can converge to the true state more rapidly. Compared with the first-order Error-State Kalman Filter algorithm, the TS-ESKF algorithm reduces the root mean square error (RMSE) by 76.66%.
4. Enhancing Robustness with Covariance Constraints
4.1 The Vibration Interference Problem in Full-Process State Estimation
During full-process AGV operation, IMU sensors may be affected by vibration interference, causing state estimation to diverge rapidly. To address this, a covariance-constrained IMU static/dynamic full-process state estimation method is proposed. This method fully utilizes noise information, uses gravity acceleration as an absolute reference scale, and compensates for the covariance matrix in the UKF algorithm using the error between measured gravity acceleration and theoretical gravity acceleration. Introducing the covariance constraint term effectively enhances the application performance of the improved UKF algorithm. The proposed method integrates both static and dynamic state estimation approaches, achieving full-process IMU static/dynamic state estimation for AGVs.

4.2 Covariance Constraint Principle: Using Gravity as an Absolute Reference
In the Kalman filter algorithm, the covariance matrix reflects the uncertainty of the estimated state. A smaller covariance value means more accurate system state estimation. The estimated values of state variables and the covariance matrix are interrelated — therefore, by introducing covariance constraints, improvement in system accuracy can be achieved. In IMU full-process state estimation, the covariance constraint terms encompass two aspects: process noise covariance and measurement noise covariance. Adding covariance constraint terms to the Kalman filter can control the growth of the estimator, thereby reducing the divergence of estimation errors.
The covariance constraint term is a method used in improved Kalman filter algorithms to constrain the covariance matrix in state estimation. It improves the accuracy and stability of state estimation by introducing prior information into the Kalman filter algorithm. The covariance constraint term can be implemented by adding an error information matrix to the Kalman filter algorithm. The error information matrix typically contains prior knowledge about state estimation, and the implementation method generally involves adding the error information matrix to the covariance matrix in the Kalman filter. This introduces error information into the improved Kalman filter, thereby constraining the state estimation.
4.3 Gravity Acceleration Error as the Measurement Constraint
In the motion state, the acceleration measured by the IMU includes not only the true gravity acceleration but also the influence of other factors such as vibration and rotation, causing certain errors in the acceleration measurements. By comparing the measured acceleration data with the true gravity acceleration, the acceleration error can be derived. This error is then converted into a constraint term to compensate for the covariance term, thereby improving the system estimation accuracy.
The vector cross product between the predicted gravity acceleration and the actual accelerometer output yields the error correction quantity. Given the normalized gravity acceleration in the navigation coordinate system, the three-axis acceleration in the navigation coordinate system is transformed into the body coordinate system through a rotation matrix. The pitch angle error and roll angle error are calculated, from which the heading angle error is then solved.

4.4 Covariance Correction Matrix Construction
The covariance correction matrix is typically a diagonal matrix, where each element is a calibration coefficient. These coefficients are used to adjust the diagonal elements of the covariance matrix, reducing the influence of system noise and model errors.
Based on the acceleration error values, the velocity and position error information can be integrated. In the update step of the improved UKF algorithm, the covariance matrix is corrected according to the attitude, velocity, and position errors. Three correction matrices are constructed respectively: the attitude covariance correction matrix (containing roll angle error, pitch angle error, and heading angle error), the velocity covariance correction matrix (containing velocity errors in the East-North-Up directions), and the position covariance correction matrix (containing position errors in the East-North-Up directions).
4.5 Full-Process Algorithm Flow
The covariance-constrained IMU full-process state estimation method integrates static/dynamic state determination, the TS-ESKF static error compensation method, the predictive capability of Modulation LSTM for dynamic state estimation for AGV navigation, and the UKF state estimation technique. This approach better addresses the challenges of cumulative errors and dynamic environmental changes faced by IMU in full-process state estimation, achieving more precise state estimation.
After CCML-UKF algorithm initialization, the Attention-CNN static/dynamic determination step is executed first to judge the current state. If static, the TS-ESKF static state estimation is executed. If the current state is non-static, the subsequent steps of the covariance-constrained IMU full-process state estimation are executed — state prediction, state covariance correction, observation prediction, observation covariance correction, and finally state update. This process iterates continuously to complete the full-process state estimation.
4.6 Full-Process Experimental Validation
The experimental hardware platform employed a laboratory-developed AGV platform, with the research subject being the Xsens Mti30 IMU manufactured by Xsens (Netherlands). To validate the covariance-constrained IMU static/dynamic full-process state estimation algorithm, data acquisition was performed using the intelligent platform. The collected data contained both stationary and dynamic IMU data, so the Attention-CNN neural network method was first applied for static/dynamic determination. The Attention-CNN-based static/dynamic determination method can accurately identify the current state, laying the groundwork for implementing IMU full-process state estimation.
The UKF algorithm, ACKF, CNN, and ML-UKF were compared with the CCML-UKF algorithm. Experimental results show that the proposed method reduces the root mean square error (RMSE) by 51.86%, achieving the goal of IMU-based intelligent AGV static/dynamic full-process state estimation.

5. Summary
The core challenge addressed in this article is a fundamental problem for any AGV using IMU-based navigation: when the vehicle stops, the IMU continues to output non-zero values that cause state estimation to drift over time. Traditional methods like direct zeroing are simple but lose critical attitude information. The TS-ESKF approach solves this through two-stage error compensation — first using velocity error, then using acceleration and angular velocity error — achieving a 76.66% RMSE reduction compared to single-stage ESKF. For full-process robustness in vibration-prone environments, covariance constraints using gravity acceleration as an absolute reference further enhance the estimation, delivering a 51.86% overall RMSE reduction. Together, these techniques provide a practical pathway to reliable IMU-only state estimation for AGVs operating in complex industrial environments, reducing dependence on external auxiliary sensors.
