Autonomous navigation control based on improved adaptive filtering for agricultural robot

Under the complex agricultural operation environment, reliable navigation system is the basic guarantee to realize the agricultural robot automated operation. This study focuses on improving navigation accuracy and control accuracy and conducts related research on autonomous navigation control of agricultural robots. This article discusses the advantages of using strict convergence criteria and combining Sage–Husa adaptive filtering with strong tracking Kalman filtering and then proposes an improved adaptive Kalman filter algorithm. The new algorithm can effectively suppress the filter divergence, improve the dynamic performance of the filter, and ensure its better filtering accuracy and strong adaptive ability to improve navigation accuracy of GPS. Further variable structure switching method is used to prevent proportional integral differential (PID) controller integral saturation phenomenon, which effectively solves the controller over-saturation problem. And combining this method with an improved adaptive filtering algorithm not only can effectively inhibit control interference but also achieve the anti-saturation effect, thereby enhancing the stability and accuracy of the control system. Finally, the simulation and experiment of the new method show that the proposed method greatly improves the ability of the filter to suppress divergence and control precision.


Introduction
With the progress of science and technology, and the continuous development of social informatization, as well as the scale, refinement, and diversification of agricultural production, modern agriculture has higher and higher requirements for its operation. And the human race has gradually entered the aging, the lack of agricultural labor force increasingly appears, some monotonous and heavy work will be gradually replaced by mechanized and intelligent robots. The development of computer, electronics, navigation, and other technologies has provided solid technical support for it, as well as a strong guarantee for the development of agricultural robots. As an alternative to the traditional agricultural machinery, agricultural robots in modern agriculture have begun to play an increasingly important role. [1][2][3] Since the end of the 1960s, the advent of mobile robots has opened a new chapter in human intelligence, which integrated real-time control, trajectory planning, target identification, and positioning, sensor, and other multisystems. With the leap in technology, the level of informatization has improved. Mobile robots have infiltrated many directions of human society and are widely used in various fields, such as industrial and agricultural production, aerospace defense, experimental teaching, and service industry. The flexibility of mobile robots restricts the popularity in practical applications, because it has become a hot topic of mobile robot research. Autonomous navigation is a basic skill necessary for mobile robots; a reliable robot navigation system is the basic guarantee for automated operation of agricultural robots. However, the navigation accuracy and reliability of the robot have always restricted the level of robotic autonomous operation, and it has become a bottleneck for agricultural automation. Agriculture navigation technology has become a hot spot of current research for agricultural robot, which also shows good progress. [4][5][6] Agricultural machinery and equipment for autonomous navigation can not only solve the problem of insufficient labor but also improve the efficiency of agricultural production. At present, agricultural robot navigation is mainly realized by two different methods: machine vision and satellite positioning; visual navigation is sensitive to the external environment, and it is difficult to meet the requirements of automatic navigation in different environments to a certain extent [7][8][9] ; satellite positioning and navigation has become a research popular spot in recent years, but its accuracy needs further research. [10][11][12] China is a great agricultural country, but the degree of agricultural mechanization and automation is generally low, but with the rising national strength and progress of science and technology, agricultural technology and productivity in rural areas has also been greatly improved. In recent years, many universities and research institutes have carried out research on intelligent vehicles and autonomous navigation system of agricultural mechanization. [13][14][15] This article mainly studies under the farmland environment. This study is to integrate GPS/micro electro mechanical systems (MEMS) sensor signals to realize the track planning and tracking performance of mobile robots so as to realize the navigation function of mobile robots. To overcome the divergence problem of Sage-Husa adaptive filtering algorithm, we improved it with Kalman filtering algorithm to suppress the divergence of the filtering and improve the dynamic performance of the filter, proposed to improve Sage-Husa adaptive filtering algorithm to enhance its stability and improve the filtering precision. The integrated adaptive variable-structure PID (VSPID) is used to guarantee the stability of the control system and realize autonomous navigation, path planning, and tracking of mobile robots. The recent literature about real-life applications of contemporary automation techniques in different fields gives us new inspiration. [16][17][18][19] Materials and methods

Device platform
The platform of this study is a kind of fan-driven multifunctional working vehicle. The central control device of the platform includes ARM9 embedded mini2440 master controller, Linux operating system, LCD screen display information such as battery power and electronic map navigation and can realize trajectory planning. The main control signals of the central controller include driving signal of motor, working signal of the mower, position adjustment signal of the mower, working signal of the baiter, and so on. The main signals collected by the central controller include GPS and attitude module to collect longitude and latitude coordinates and directional angle signals, and visual recognition device.
Navigation system-RTK-GPS-X300 system: The accuracy is 1-5 m and 2 cm in RTK-GPS mode.
The mobile platform is equipped with a highperformance laptop, Wi-Fi communication, a built-in high-precision inertial attitude course measurement unit, and four rotary encoders as odometer. The mobile robot also has three sonar arrays front and back.

Agricultural robot modeling
Ignoring the friction between the road surface and the agricultural robot, constructing an agricultural robot vehicle model based on the vehicle geometry, Figure 1 is a wheeled vehicle turning model based on Ackerman steering geometry.
The motion model of a four-wheeled agricultural robot can be described by formula (1) In formula (1), V represents the longitudinal speed of the vehicle, l f , l r , respectively, represent the distances from the vehicle's center of gravity to the front and rear axles, d is the steering angular velocity, take the lateral slip angle b, the steering system angular velocity d, and the turning angular velocity of vehicle body g as state variable X. In this project, the average velocity of the mobile robot is V ¼ 3 km/h the distances from the vehicle's center of gravity to the front and rear axles is Using the ground coordinate system shown in Figure 1, the vehicle position information x; y ð Þ and the expressions of orientation information can be calculated from the state variable X. The initial state of the mobile robot is assumed as x 0 ; y 0 ; 0 ð Þ , then the mobile robot position information can be obtained according to formula (2) x The model has been relatively simplified. From the formula, it can be known that the state of the mobile robot in the whole movement process only depends on the moving speed and the size of the vehicle structure, without considering the mechanical effect between the road surface and the wheels. In other words, if the model is used, the mobile robot will get the same result in the case of hard road and muddy road, which is obviously inconsistent with the actual situation. Therefore, the model has certain limitations, but it will not affect the experiment at the playground.

Improved adaptive filtering
Adaptive filtering 20-23 is a filtering method that can suppress the divergence of the filter. In the filtering calculation, on the one hand, the predicted values are continuously corrected by the measurement, and unknown or uncertain system model parameters and noise statistical parameters are estimated or corrected, so that the filter gain is automatically adapted to the observed data to reduce the estimation error.
Systematic mathematical model. Positioning agricultural mobile robot is the most basic part of mobile robot navigation, that is, the initial position of the mobile robot is known, then the pose position and orientation of robot are estimated and corrected by cumulative errors of the heading attitude system. As the uncertainty errors came into being with the process of agricultural robot movement under the interference of the complex external environment, a large cumulated error of pose position and orientation will be generated when the position and pose are updated with the heading attitude system, which will reduce the positioning accuracy. Kalman filter can effectively improve the accuracy of the attitude. For the agricultural robot described in formula (2), the discrete Kalman filter model can be expressed as Based on the metrical information of the system, the status variable of the system is taken as X k ¼ x k y k e v k b k ½ T , among x k ; y k indicate longitude and latitude, respectively, e v k and b k indicate the measurement error of the speed and the drift error of the gyroscope, respectively. k is the deterministic estimation matrix. Therefore, the status equation and the measurement equation of the system are In formula (3), the state-transform matrix of the system from time t k to time t kþ1 is G kÀ1 is the noise driving matrix of the system, W k is the system excitation noise sequence, W k ¼ ½0 0 x V k x k , x V k and x k represent the Gaussian noise associated with velocity and orientation, respectively, H k is the measurement noise sequence, V G k is the true speed, and f k is the true azimuth angle. Sage-Husa adaptive filtering. The Sage-Husa adaptive filtering algorithm can be described as In the formula, K k is the filter gain matrix, u k is the discrepancy vector, and R k is the measure noise variance matrix.
where d k is the weighting coefficient Forgetting factor 0 < b < 1 (generally, the value is 0.95-0.99).
Using this algorithm, the calculation is simple and has strong adaptability. To improve the filtering dynamic response speed, the memory length of the filter is limited by the forgetting factor b, and the filter can make timely estimation with the change of the measured value.
Strong tracking Kalman filtering algorithm. To ensure the convergence of the filter, the filtering stability is exchanged at the expense of a certain precision, such as increasing the process noise of the system and the variance matrix of the observed noise, and a large number of unmodeled errors are included to make the algorithm simple and reliable. The strong tracking Kalman filtering idea [24][25][26] is to multiply the weighted coefficient l k in front of the pretest covariance matrix of the status estimation error, as shown in equation (9). The method has a strong tracking capacity to mutation Among, When the status is abrupt, the weighting coefficient l ik increases, so that the tracking ability of the filter is also enhanced, and the reliability of the system is improved.
Improved adaptive filtering algorithm. Sage-Husa adaptive filtering algorithm and strong tracking Kalman filtering algorithm have their advantages and disadvantages, respectively. The accuracy of the former is higher but the computational cost is large; the latter has simple structure, high reliability, and strong adaptive capacity, but the filtering precision is reduced. In this study, two filtering algorithms are organically combined to form a filtering algorithm, and square root filtering is added to calculate the posterior state to ensure the symmetry and semi-positiveness of the system variance matrix that can not only ensure the filtering convergence but also maintain high accuracy, as shown in Figure 2.
Since v T k v k is the quadratic sum of the innovation sequence and contains the actual estimation error information, it can be used to describe the actual estimation error, while the theoretical prediction error is expressed by the Therefore, the below equation could be used to determine whether the filter converges. In the formula, r ! 1 is the adjustable coefficient. When the filter meets the convergence criterion, the Sage-Husa algorithm is used to estimate the state optimally. When the convergence criterion condition is not met, it means that the actual error has exceeded r times predicted by the theory; at this point, the filter has a divergence trend, and it needs to adjust the  Figure 2. Flowchart of improved adaptive filtering. P k;kÀ1 value with the weighted coefficient l k , so that it can better play the role of measurement value to suppress the divergence of the filter. In practical engineering, the residual error is usually used to calculate the check quantity to determine whether the filter is in normal working state. If normal, it is estimated by general filtering, otherwise, the fading factor l k value is estimated at any time according to the calculation. Here, we use the strictest criterion of convergence, which is The fading factor l k to prevent the filter from divergence is So, l k value is very important to control the divergence of the filter effectively. In the formula, the elimination factor l k ! 1.
The algorithm is based on the weight algorithm through which the estimation error of a one-step predicting variance matrix P k;kÀ1 lets the filter gain automatically adept to the observation data and reduces the estimation error to achieve the purpose of suppressing the divergence of the filter, showing more flexible and reliable advantages.
Steps of the improved adaptive filtering algorithm. Aiming at the limitations of standard Kalman filtering, the traditional Sage-Husa estimator is improved by combining the idea of square root filtering, that is, the new linear adaptive square root Kalman filtering algorithm, as shown in Figure 2. The specific algorithm is as follows: Step 1:Initialize, k ¼ 0 Step 2: Initialize, k ¼ 1; 2; . . . ; n, to do iteration 1. Time to updatê Estimate the statistical characteristics of measurement noise ffiffiffiffiffiffiffi Calculate the gain of filtering Estimate the corrected status valuê Find the square root of the posterior status variance Update and estimate the statistical characteristics of process noise ffiffiffiffiffiffiffi ffi Compared with the standard Kalman and Sage-Husa algorithms, the improved algorithm directly calculates the square root of the system state variance matrix, ensuring the symmetry and semi-positive character of the system variance matrix, overcoming the shortcoming of filtering divergence due to the loss of nonnegative character of the system state variance matrix caused by the accumulation of rounding error of standard Kalman formula.

VSPID controller based on adaptive Kalman filtering
In the course of the robot's navigation and tracking, the tracking of the target path requires the feedback control of the vehicle's lateral deviation and course deviation. In classical control, theory of PID control is the most commonly used because the PID control algorithm is most widely used in the engineering application of control algorithm, the advantages including simple algorithm process, strong robustness and high reliability, especially in the vehicle control, often based on position deviation and course Angle deviation for the input method of PID control.
For mobile robots, it is difficult to build a precise mathematical model. In the navigation process, the control algorithm cannot well suppress the system error, and it may bring unstable factors to cause divergence of the navigation system. The saturation phenomenon of actuator generally exists in the control system. When the deviation produces a jump change, the PID output will increase or decrease sharply. If the actuator reaches saturation, the static difference cannot be eliminated, and the integral term will continue to increase or decrease. If this nonlinear effect is not considered in system design, it will affect the performance of the system in large signal input, which may cause large overshoot and even cause the instability of the whole control system.
Anti-saturation VSPID controller. For the phenomena of integral saturation, VSPID is used in this article to cope with integral saturation. The controller structure is shown in Figure 3.
By adjusting the adaptive coefficient, the VSPID controller integrates the saturation error u n À u s . When u n enters the saturation state, the VSPID controller will dynamically prompt the integrator to pull u n out of the saturation region edge. VSPID uses adaptive coefficient h to adjust the integrator where the constant a > 0 makes u n rapidly converge to the nearest extreme point in the interval umax min . u ¼ ðumax min , u max and u min Þ are the maximum and minimum values of the control input signal, respectively.
VSPID control algorithm based on anti-windup is as follows VSPID controller with adaptive Kalman filtering. In this study, the improved adaptive Kalman filter is combined with VSPID controller to reduce the noise impact and improve the control quality. The position error signal e can be obtained by comparing the current position information and the filtered position information of the agricultural robot. The error signal e is applied to the VSPID controller to obtain the output u of the controller. In the control system, the parameters and structure of the VSPID controller can be changed in real time according to the error signal e, so it has strong robustness, as well as can reduce the requirements for system model accuracy. After the control quantity u is superimposed with the control interference signal w, it acts on the controlled object (agricultural robot) to obtain the input quantity of the filter, and the signal is filtered by the filter, it obtains the filtered position signal y e . The system structure diagram is as shown in Figure 4. In Figure 3, r represents the controlled amount, in this study, it represents the position signal of the agricultural robot, v is the measurement noise, Object is the controlled object (in this study it refers to the agricultural robot), and y represents the output of the controlled Object. y v is the output of the controlled object after superimposing the noise, that is, the input of the filter, y e is the output result of the filter, that is, the filtered position signal, and e, w, u are the same as above.

Simulation experiment of improved adaptive filtering
To verify the accuracy of the improved filtering algorithm, simulation experiment is arranged and the continuous 800 sets of GPS fixed-point data are collected. The longitudinal axis is the longitude, the transverse axis is the number of iterations, and the positioning data are filtered by three It can be seen from the Matlab simulation that the filtering divergence can be effectively restrained by adding the fade factor, but the weight of the old quantity is too large to make accurate estimation in time with the change of the measured value. The improved algorithm pays much attention to the function of updating sequence u k of residual error, when the system state estimation is carried out, the noise covariance matrix R k is estimated to improve the filtering accuracy. After the forgetfulness factor b is introduced, the weight of the new measured value is increased, making the estimation closer to the real value.
When solving practical problems, the established mathematical model cannot truly reflect the actual physical process, and when the model does not match the measured value obtained, the filter will diverge. In this article, based on Sage-Husa filtering algorithm, by establishing the onestep estimation error variance matrix P kjkÀ1 weighting algorithm to automatically adapt the filtering gain to the observation data, reduce the estimation error, and achieve the purpose of suppressing the divergence of the filtering, which shows more flexible and reliable advantages.

Simulation experiment of VSPID controller
Experiment of anti-saturation VSPID controller. The PID and VSPID controllers were simulated by Simulink, and the square wave signal with a amplitude of 5 V was tracked with a time of 10 s, and the control input was limited to [À5,5]. The results are shown in Figures 7 and 8. Among them, T ¼ 1 ms, T ¼ 1 ms, T ¼ 1 ms, and T ¼ 1 ms.
As shown in Figure 8, although the anti-saturation constant T ¼ 1 ms is a little small, the VSPID controller performs satisfactorily, arrives quickly, and maintains the expected value, while the traditional PID cannot exit the saturation state.
The selection of parameter T ¼ 1 ms has a great impact on the performance and stability of VSPID because VSPID eliminates the competition between the anti-windup T ¼ 1 ms and the integrator T ¼ 1 ms under normal operation, and there is no need to pursue high gain to remain in the linear zone.
Because the driving speed of the agricultural robot in this system is low, the main requirement is that the overshoot of the controller response curve is higher, and the square wave response overshoot of the anti-windup VSPID control becomes smaller, so the VSPID controller can achieve a relatively stable control effect. Moreover, at the current rise time, the response speed of the system can be satisfied due to the low speed of the robot.
As shown in Figure 6, when T ¼ 1 ms, the tracking could not achieve satisfactory results, and for the discrete   system, the integral dynamics of the linear region would also be affected by T ¼ 1 ms.

Experiment of improved VSPID controller.
Simulation example: A mobile robot is used as a control object, the sampling interval is taken as T ¼ 1 ms, and the simulation time is 5 s. The control noise w and measurement noise v are both Gaussian white noise of 0.001 v, and the input signal is square wave signal of amplitude 5 V. The improved adaptive filtering is used to filter VSPID, suppose Q ¼ 1, R ¼ 1 (see Figures 9 and 10).
It can be seen from the square wave response diagram that the VSPID method quickly pushes the system out of the saturation area, and the tracking performance remains good, while the traditional PID has obvious tracking error.

Outdoor navigation experiment
This experiment was conducted in Dongshan playground of Jiangsu University to prove the feasibility and effectiveness of the above method. The red line of 1-2-3-4 is the planned path of the mobile robot, and the yellow line is the navigation and tracking curve of the system. The navigation path diagram of each algorithm is as shown in Figure 11.
As shown in Figure 11, in the case of unstable signal or large disturbance, although the mobile robot can complete the established route, its accuracy and control efficiency need to be further improved. From the navigation chart, it can be seen that from the starting point to the no. 1 navigation point, the tracking trajectory of the robot is relatively good and the driving is relatively stable. From the navigation point 1 to the navigation point 2, it initially follows the established route, and then the error increases rapidly and the tracking efficiency decreases rapidly. Tracking effect from navigation point 2 to navigation point 3 is general. From the navigation point 3 to the navigation point 4, the intensity of geomagnetic interference increased, and the tracking route became active. Although it finally reached the navigation point 4, the path was extremely poor. The navigation experiment under original condition failed.
The controller used in the original condition navigation is simple, cannot eliminate the static error of steady state, and has weak anti-interference ability. When the signal interference is large, the control system becomes saturated and caused system unstable easily. In the early stage of the experiment, the tracking effect is good, basically walking along the established route, but with the accumulation of errors and signal interference, the implementation efficiency of the controller is reduced, which can even lead to the robot tracking "out of control." As shown in Figure 12, the improved adaptive filtering algorithm and the anti-saturation VSPID control technology proposed in this article were applied to mobile robots. From the experimental navigation map, it can be seen that the robots basically completed the established route, and the navigation effect was good.
The new method improves the signal accuracy, speeds up the response speed of the navigation system, and eliminates the influence of static error. It is applied to navigation system of mobile robot to improve navigation accuracy, antiinterference ability, and to ensure control efficiency.  As shown in Figure 13, repeated tests were carried out on the new technology and constantly adjust the parameter forgetting factor b (0 < b < 1), finally satisfactory tracking effect was obtained.

Conclusion
The improved adaptive filtering algorithm can effectively reduce the system status error and restrain the signal divergence. The system is guaranteed to be real time, stable, and adaptive, and the filtering precision is improved. The improved VSPID controller can greatly improve the control efficiency by selecting appropriate parameters and realize the integral switching and saturation error feedback mechanism to maintain good tracking performance by selecting appropriate parameters. The new method can greatly improve the precision of GPS positioning and enhance the anti-interference ability of the system. After further adjustment of the parameters, the established path tracking achieved the desired effect.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.