2.1. System Framework and Experimental Platform
The heading measurement system integrates a single-antenna GNSS receiver (Z301 Pos, Ver. V1.1.2, Nongxin Science & Technology (Beijing) Co., Ltd., Beijing, China) and a low-cost MEMS IMU (FSS-IMU614E-P, Ver. 12789, Forsense (Shanghai) Technology Co., Ltd, Shanghai, China) mounted on a 704 tractor (LOVOL Heavy Industry Co., Ltd., Weifang, China). The system architecture, illustrated in
Figure 1, synchronizes GNSS data (10 Hz) and IMU data (100 Hz) via a CAN bus, with a dual-antenna GNSS receiver (Z202, Ver. V1.3.7, Nongxin Science & Technology (Beijing) Co., Ltd., Beijing, China) serving as the heading reference. The hardware architecture of the Z301 Pos device is shown in
Figure 2, where the radio module (Harxon Co., Ltd., Shenzhen, China) receives RTCM data from the base station and forwards it to the GNSS module via an MCU. The GNSS module processes satellite signals and RTCM data to achieve RTK positioning, while the MCU collects and packages IMU and GNSS data for output.
Key hardware specifications are summarized in
Table 1. The experimental platform, depicted in
Figure 3, includes an AMG300 (Ver. 3.31.102.3, Nongxin Science & Technology (Beijing) Co., Ltd., Beijing, China) autosteering system for path control, ensuring repeatability in field tests. The device connections are detailed in
Figure 4, where the Z202 receiver shares the positioning antenna with the Z301 Pos via a GNSS splitter (Beijing East Sheep Science & Technology Co., Ltd., Beijing, China). The antenna (Harxon Co., Ltd., Shenzhen, China) configuration of the Z202 receiver is shown in
Figure 5, with the baseline direction calibrated to correct installation errors.
2.2. GNSS/IMU Data Fusion Based on EKF
The fusion of GNSS and IMU data involves two primary components: the SINS mechanical arrangement and the integrated navigation algorithm [
19,
20]. The differential equation governing the update of the SINS mechanical arrangement is given by:
where
is the differential of attitude matrix from the b-frame to the n-frame;
represents the attitude matrix;
represents the angular rate vector of gyro;
represents the Earth’s rotation rate;
represents the angular rate vector of the n-frame relative to the e-frame;
is the differential of velocity vector;
represents the velocity vector;
represents the specific force vector of accelerometer;
is the gravity acceleration vector;
is the differential of position vector;
represents the transfer matrices of velocity with the derivative of position.
Considering the measurement errors of the IMU and the initialization errors of attitude, orientation, velocity, and position, all of which will propagate through the update algorithm, leading to the continuous accumulation of errors in the SINS. The error equation for SINS is analyzed as follows:
where
represents the derivative of attitude error;
represents the attitude error;
,
,
, respectively, represent the transfer matrices that describe the relationship between the attitude error, velocity error, position error and the differential of attitude error;
represents the velocity error;
represents the position error;
represents the gyro bias;
represents the derivative of velocity error;
,
,
, respectively, represent the transfer matrices that describe the relationship between the attitude error, velocity error, position error and the differential of velocity error;
represents the derivative of position error;
represents the accelerometer bias;
represents the transfer matrices of position errors with the derivative of position error.
To accurately estimate the SINS errors, the attitude error
, velocity error
, position error
, gyro bias
, and accelerometer bias
are selected as the 15-dimensional state vector
, as shown below:
Based on the Equation (2), simplified system noise matrix, the state-space model for the integrated navigation algorithm is established as follows:
where
is a 15 × 15-dimensional continuous-time state transition matrix;
is a 15-dimensional systematic noise vector;
is a 3 × 15-dimensional measurement update matrix;
is a 3-dimensional measurement vector of position error;
is a 3-dimensional measurement noise vector;
and
denote the noise vector of gyro bias and accelerometer bias, respectively;
and
denote the noise vector of the first-order Markov process for the gyro and accelerometer, respectively;
and
corresponds to the related time constant of the first-order Markov process.
Therefore, the discrete EKF system model can be expressed as follows:
where
represents the transition matrix of the system state from time k − 1 to time k;
is the sampling interval;
is the system state vector prediction at time k;
is the state nonlinear function;
represent the system state estimation vector at time k − 1;
is the system noise covariance matrix at time k − 1;
is the measurement noise covariance matrix at time k;
represent the covariance matrix at time k − 1;
is the prediction of the covariance matrix at time k;
is the filter gain matrix at time k;
is the system measurement vector at time k.
The state errors are estimated through the EKF algorithm, and the attitude, velocity, and position updated by the SINS feedback are corrected. The equations are as follows:
where
,
and
denote the attitude, velocity, and position of SINS after error correction at time k, respectively;
,
and
denote the attitude, speed and position vector updated by the SINS at time k, respectively, and include the system errors of the SINS;
,
and
denote the attitude, velocity, and pose error quantity estimated by the EKF at time k, respectively.
Compensate the state estimation error through feedback to improve the measurement accuracy of the pose of the SINS.
2.3. Heading Constraint Model
The GNSS speed angle constraint scheme is used to improve the accuracy of heading measurement. However, the accuracy of the GNSS track angle is related to the speed, especially when the tractor is stationary, the track angle varies randomly between ±180°. Referring to the traditional zero-velocity update [
21], when the tractor is in a stationary state and the SINS heading value has not been initialized, set the heading value
to 0; when the tractor is in a stationary state and the SINS heading initialization has been completed, set the heading value
to the SINS heading of the tractor at the moment immediately before it entered the stationary state. The observation vector is extended as follows:
where
represent the position vector updated by the GNSS at time k;
represent the heading updated by the SINS at time k.
A new state observation vector is defined as follows:
when the tractor is in motion, the GNSS position and track angle are used as observations, and the observation vector is reconstructed as follows:
where
represent the heading updated by the GNSS at time k.
According to the GNSS module’s data sheet, the nominal horizontal positioning accuracy is 8 mm, assuming the horizontal distance between two adjacent static positioning points is twice the nominal accuracy (the horizontal distance between two points with a time interval of 0.1 s is 16 mm), the corresponding horizontal speed is 0.16 m/s, which can be regarded as the fluctuation of the static speed measurement error; the nominal speed measurement accuracy is 0.03 m/s, according to the threshold judgment method, the threshold is usually set to 2–5 times the accuracy [
22], in view of the vibration disturbance of agricultural tractors, appropriately increased thresholds help minimize misjudgment errors. Therefore, this paper assumed that when the speed is greater than 0.2 m/s, the tractor is in a moving state; conversely, the tractor is in a stationary state.
2.4. Adaptive Variance Estimation and Covariance Initialization
The vehicle tractor works in the field, and the amplitude of vehicle body vibration, driving speed, terrain excitation and other factors make the measured values of the GNSS track angle uncertain, making it difficult to calibrate the measurement variance of the track angle. Therefore, the maximum a posteriori estimation algorithm based on Sage–Husa is used to estimate the measurement error variance of the track angle [
23]. The measurement error variance is defined as:
where
represent the heading error at time k;
denote the heading error measurement covariance at time k;
represent the iteration factor at time k;
represent the heading error innovation at time k; the bottom-right subscript
denotes the
row and j column of the matrix.; b is the forgetting factor, and typically takes values between 0.95 and 0.99 [
24]. In this paper, b is set to 0.99.
When the tractor operates at low speed in the field, the randomness of track angle error leads to inaccurate estimation of measurement error variance. This inaccuracy affects the accurate estimation of the heading error angle. Therefore, we propose using the standard deviation of the continuous heading error innovation sequence to replace the single innovation error for conducting an online estimation of the measurement error variance, which is defined as:
This method effectively suppresses the influence of large random errors in individual heading measurements on the accurate estimation of the heading measurement variance and ensures a stable estimation of the measurement variance. In this study, m is set to 10.
In addition, the track angle at the instant when the speed first exceeds 0.5 m/s is utilized as the initial heading value of the SINS. At this moment, there is a significant uncertainty error in the initial heading value. Reasonably setting the initial value of the error covariance of the heading error angle in the EKF can accelerate the convergence of the heading error of the SINS.
Therefore, when initializing the heading of the SINS, it is proposed to use the variance statistical value of the track angle variation as the initial value of the covariance of the heading error angle. The equation is defined as follows:
where
represents the GNSS track angle variation between time k and time k − 1; N represents the length of the array, which is set to 10 in this paper.