Research on decoupling control for the longitudinal and lateral dynamics of a tractor considering steering delay

To enhance the efficiency of tractor operation, the longitudinal and lateral dynamic control of a self-driving tractor is studied in this paper, and a control system that decouples control of the longitudinal and lateral movement of the tractor is proposed. The trajectory controller calculates the desired speed and desired yaw rate signals of each subsystem, and a PID controller regulates the longitudinal speed of the tractor. A pure pursuit algorithm calculates the desired front wheel angle of the tractor. To decrease the system time delay in the automatic steering system, an automatic steering scheme based on improved Smith predictive control is proposed. Through decoupling control of the longitudinal and lateral controllers, the tractor’s path tracking performance is assured.

Research on decoupling control for the longitudinal and lateral dynamics of a tractor considering steering delay Hequan Miao 1* , Peisong Diao 1* , Guangfei Xu 1,2 , Wenyan Yao 1 , Zhicai Song 1 & Wenjun Wang 1 To enhance the efficiency of tractor operation, the longitudinal and lateral dynamic control of a selfdriving tractor is studied in this paper, and a control system that decouples control of the longitudinal and lateral movement of the tractor is proposed. The trajectory controller calculates the desired speed and desired yaw rate signals of each subsystem, and a PID controller regulates the longitudinal speed of the tractor. A pure pursuit algorithm calculates the desired front wheel angle of the tractor. To decrease the system time delay in the automatic steering system, an automatic steering scheme based on improved Smith predictive control is proposed. Through decoupling control of the longitudinal and lateral controllers, the tractor's path tracking performance is assured.

List of symbols m
Mass (kg) δ Front wheel steering angle (degrees) ϕ Heading angle (degrees) L Distance between the front and rear axle (m) l f Distance between the front axle and the CG (m) l r Distance between the rear axle and the CG (m) r Turning arc radius (m) V x Longitude velocity of the CG (m s −1 ) V y Lateral velocity of the CG (m s −1 ) V xd Desired forward velocity of the tractor (m s −1 ) F lf Lateral force on the front wheels (N) C Is the angle of inclination of the road on which the vehicle is travelling (degrees) F lr Lateral force on the rear wheels (N) F tf Traction force on the front wheels (N) F tr Traction force on the rear wheels (N) F zf Vertical force of front tires (N) F zr Vertical force of rear tires (N) f xf Rolling resistance of front tires (N) f xr Rolling resistance of rear tires (N) α f Side-slip angles of the front tires (degrees) α r Side-slip angles of the rear tires (degrees) ω Yaw velocity of tractor (degrees s −1 ) β Carbody sideslip angle (degrees) Abbreviations GPS Global position system IMU Inertial measurement unit autonomous tractor" section. In "Research on the control strategy of an autonomous tractor" section, the overall control structure and the tractor control strategy are described. The simulation results of the whole system are given and analysed accordingly in "System simulation and testing" section. Finally, some conclusions are drawn from this study in "Conclusion" section.

Hardware construction of a path tracking control system
The hardware system structure of an automatic driving tractor is shown in Fig. 1. The experimental platform is composed of two subsystems, an automatic driving navigation system and an electronically controlled hydraulic steering system. The automatic driving navigation system is primarily composed of an integrated navigation system and a navigation computer. The integrated navigation system is composed of a double antenna positioning system and an inertial navigation system. A dual antenna positioning receiver is placed along the direction of the car body and is used to measure the vehicle's heading angle. The inertial navigation system is used for the auxiliary satellite positioning system. When the satellite signal is lost, the data calculated by the inertial navigation system can be used to locate the tractor through corresponding calculation. The inertial navigation system can also measure the tractor's attitude angle information.
The navigation computer calculates the deviation value between the current trajectory and the reference trajectory based on the data transmitted by the integrated navigation system to provide the steering angle information for the automatic steering system to execute. The steering computer calculates the steering deviation value according to the steering angle instruction received and the real-time detection value obtained by the front wheel angle sensor and controls the hydraulic steering system to complete the steering operation. The pressure www.nature.com/scientificreports/ sensor in the figure is used to detect the oil pressure and prevent the operation of the automatic hydraulic steering system from overloading. The yaw rate and front wheel angle of the tractor are measured by a gyroscope and front wheel angle sensor, respectively.

Model of an autonomous tractor
When a tractor is operating, it usually works with farm tools. Different farm tools need different traction forces during operation, and some farm tools need to be driven by the tractor's power output to achieve the operation effect. Therefore, the tractor motion is simplified in this study, only the motion of the tractor itself is considered, and all the power of the tractor is used for its own driving.
Kinematic model of a tractor. Tractors are low-speed four-wheel vehicles. When considering errors such as tire and soil characteristics, tire slip, actuator transmission, installation and other errors, it is difficult to describe the system motion through an accurate mathematical model. Simplified mathematical models are usually used to describe the control system. This study uses the model shown in Fig. 2.
Inverse kinematics model of a tractor. In the decoupling control of the longitudinal and lateral motion of a tractor, it is necessary to research the longitudinal speed and the yaw rate. The above tractor kinematic model can be further written as follows according to V y = ωl r : Because the coordinate of the CG is P CG = [x y] T , the above formula can be expressed as: The inverse kinematics model shown below is established.
The desired longitudinal velocity and the desired yaw rate are expressed as: In the above formula, ω d is the desired yaw rate, and V xd is the desired longitudinal speed. Martins et al. 15 further expressed the above inverse kinematics formula as follows: (1) The air resistance of the tractor when driving is ignored.
(2) Considering that the moments of the tires are small, they can be ignored.
The lateral movement of the tractor can be obtained according to the force balance: Here, V y + ωV x represents the lateral component of the absolute acceleration of the CG. The law of rotation of a rigid body on a fixed axis is where J represents the moment of inertia of a rigid body and β represents the angular acceleration of a rigid body. According to the definition of the moment of inertia The yaw motion of the tractor at the CG is written as Eq. (10) according to the moment balance.
To decrease the calculation strength of the tractor's moment of inertia, Garrott 16 approximated the moment of inertia as: F tf sin δ + F lf cos δ + F lr = m(V y + ωV x ).  (10) (F tf sin δ + F lf cos δ) − F lr l r = Jω.   where k i , i = {f,r} represents the cornering stiffness of the tires. The side-slip angle of the front and rear wheels is calculated with the following formula: where Equation (13) can be written as: The equation of tractor yaw dynamics can be written in a state space form where Longitudinal dynamics model of a tractor. When a tractor is running on sloping ground, assuming that the air resistance is ignored, the force analysis diagram of the tractor can be simplified into Fig. 4. According to Newton's second law of motion, the force balance along the slope direction can be expressed in the following form: Rajamani 18 defines the slip rate as: www.nature.com/scientificreports/ where u w represents the speed of the wheel centre, ω w represents the wheel angular velocity, and r r0 represents the wheel radius when the tractor is not braking. When the slip ratio s is small, F tf and F tr have a linear relationship with s, which can be approximately expressed as: The rolling resistance of the front and rear wheels is approximated by the following formula: where k represents the rolling resistance coefficient.
When the rear wheel is the moment balance point ΣM tire-r = 0, the moment equation is: From the above equation, we can obtain: In the same way We can see that the acceleration of the vehicle V x during driving will affect the support of the ground on the tires F z .
Model of a tractor electrohydraulic steering system. The electronically controlled hydraulic steering system of a tractor can be regarded as a mathematical model with a reversing valve control voltage U(s) as input and a steering angle δ(s) as output (Shinji and Tsugiharu 19 ). When considering the actual delay in the system, the open-loop transfer function of the hydraulic steering system can be expressed as The parameters are determined through tests to be K = 22.7, τ = 0.05, and L = 0.12.

Research on the control strategy of an autonomous tractor
When an autonomous tractor is operating, the current position and motion state are determined in real time through satellites and compared with the target point on the set path. The steering angle of the front wheels and the longitudinal speed are controlled through correlated algorithms so that the tractor can drive along the set path. The tractor's automatic navigation system corrects the front wheel steering angle and longitudinal speed to make the vehicle drive along the set path. The overall control block diagram of a tractor is shown in Fig. 5.
As shown in Fig. 5, the autonomous tractor host computer system calculates the deviation between the current position of the tractor and the set path through the corresponding path generation algorithm and calculates the desired longitudinal speed and yaw rate through the corresponding kinematics model. The longitudinal motion controller controls the longitudinal speed of the tractor, and the pure pursuit algorithm calculates the desired front wheel steering angle based on the desired yaw rate. The operation of the steering operation is completed through the automatic steering system. In this way, the tractor can drive along the set path through decoupling control of the tractor's lateral movement and longitudinal movement.
Longitudinal and lateral motion control method. To control the longitudinal and lateral motion of a tractor, it is necessary to study the longitudinal speed and the steering angle of the front wheels and determine the desired longitudinal speed and the desired yaw rate from the tractor inverse kinematics model obtained above.
For longitudinal speed control, this study uses a PID control strategy, and for the control of the front wheel steering angle, this study uses a pure pursuit algorithm to determine the desired front wheel angle according to (18)  Lateral tracking control strategy. To enhance the positioning accuracy of tractors, inertial navigation is usually used to assist satellite positioning 20 . The navigation controller calculates the lateral deviation and heading angle deviation based on the position information and path information and generates the expected front wheel steering angle, as shown in Fig. 6.
In the path tracking algorithm, the pure pursuit algorithm does not rely on complex mathematical models. It is used to calculate the arc required by the vehicle to track the target path. The test vehicle must follow the calculated arc to move from its current position to a target position at the next moment, and the target point is selected from the set path. The pure pursuit algorithm continuously iterates, and the preview point P continuously updates the position along the path so that the vehicle travel path forms a smooth tracking trajectory and finally makes the vehicle travel trajectory completely coincide with the path A-B, completing the tracking control 21,22 .
The geometric relationship of the pure pursuit algorithm is shown in Fig. 7. In Fig. 7, r is the trajectory radius, O is the centre of rotation, x is the deviation of the preview point P relative to the lateral coordinate of the car body, y is the deviation of the preview point P relative to the longitudinal coordinate of the tractor body, point P is a suitable point of the set path, the distance between point P and the vehicle body is the preview distance L look , and θ is the heading deviation. Then, the following formula can be obtained from the geometric relationship in the above figure:  The path curvature when turning is k, k = 1/r. Then, the above equation can be written as: The following geometric relationship is obtained from Fig. 7.
When the heading deviation angle θ is small ( θ → 0 ), sin θ ~ θ. Equation (32) can be approximately expressed as: The path curvature can be approximately expressed as: It can be seen from the above formula that the pure pursuit algorithm is only related to the preview distance L look .
The output of the pure pursuit algorithm is the curvature of the path when the tractor is driving, and the curvature can be converted into the yaw motion and longitudinal motion of the tractor.
where the curvature k = 1/r, and the above formula can be written as: The values of the ω and V when driving on a curve are used to control the steering angle of the front wheels and the speed of the vehicle, respectively.
According to Fig. 8, Gillespie 23 expressed the function of the path curvature radius as where (28) d 2 + y 2 = r 2 , www.nature.com/scientificreports/ Therefore, the desired front wheel angle is denoted as: Hydraulic steering system control strategy. From the hydraulic steering system model established in the previous section, the steering system is a second-order integral time-delay object, while the PID method has poor anti-interference performance and poor tuning effect, so when the steering system is disturbed, it is easy to produce oscillation and divergence phenomena, resulting in poor adaptability of the steering system 24 . In actual industrial production, many controlled objects have pure delay characteristics. To improve the delay in industrial control links, Smith 25 proposed a compensation model. The Smith predictive controller can better improve the pure delay link of the system, but it is necessary to establish a sufficiently accurate control object model, and the anti-interference ability is poor. Therefore, it is very meaningful to improve the traditional Smith predictive controller 26 . This study proposes a two-degree-of-freedom control scheme based on the improved Smith predictive control to improve the stability and anti-interference of the automatic steering system and reduce unnecessary additional steering. The block diagram of the proposed control scheme is shown in Fig. 9. In the figure, C(s) is the tracking controller, which is used to track the control voltage signal. The filter controller F(s) eliminates the overshoot in the automatic control process. D(s) is a disturbance suppression controller, which is used to suppress disturbances in the control system.

Design of the tracking controller C(s).
When the actual steering system and the steering system model match each other (nominal case), the actual object is equal to the object model, that is, G(s)e −Ls = G 0 (s)e −L0s . The tracking response transfer function from reference signal U(s) to system output δ(s) can be obtained from Fig. 9.
The transfer function from the input interference signal q(s) to the system output δ(s) is It can be seen from the above formula that the input response and interference response in the control structure are completely decoupled, and the parameters of the controller can be obtained according to the   www.nature.com/scientificreports/ internal model control method. Therefore, the IMC-PID controller is adopted to design the tracking controller and disturbance suppression controller. D(s) does not affect the input response, and it is used to stabilize time-delay unstable objects. The stability of the system is related to the characteristic equation (1 + G 0 (s)C(s))(1 + D(s)G 0 (s)e −L 0 s ) = 0 and is mainly used to stabilize 1 + D(s)G 0 (s)e −L 0 s . Figures 10 and 11 show the internal model control principle structure and the equivalent feedback control system structure.
Through the structure of the internal model control principle, the following formula can be obtained: The internal model controller and feedback controller are According to the relevant theory of internal model control 27 , the integral link is approximated by the firstorder link, and when α is taken as a large enough number The process model is expressed as According to the design conditions of the internal model controller.

There is no unstable pole in Q(s); Q(s)G(s) is stable; (1 − Q(s)G(s)) G(s) is stable. Therefore, the filter design is
In this case, controller C(s) is represented by Eq. (45) The first-order Taylor expression is adopted to approximate the delay term e −Ls ≈ 1 − Ls , and an IMC-PID controller is obtained (46) K s ≈ αK αs + 1 .

The filter F(s) is designed to be
Disturbance rejection controller D(s). When the actual steering system and the steering system model match each other, the compensation sensitivity function of the load interference suppression closed-loop is expressed as The form of the above formula is similar to that of the Y(s) formula, so D(s) is designed with reference to the knowledge related to internal model control theory, similar to C(s).
In the above formula, Q(s) is used to represent the internal model controller. Then, referring to the relevant knowledge of the internal model controller 27 , Q(s) is expressed as From Eq. (53), the following formula can be obtained: The disturbance rejection controller formula is further approximated by first-order Taylor to obtain the following PID form: where K p2 = α+τ αK( 2 +L) ; T i2 = α + τ ; T d2 = ατ α+τ .
Hydraulic steering control system simulation. According to the model parameter, K = 22.7, τ = 0.05, and L = 0.12 of the hydraulic steering system determined in the previous section, the values of the two controllers C(s) and D(s) are established. Since the process is not clear and unknown, take 1 = 0.06, 2 = 0.18, α 1 = 0.13, α 2 = 0.55 to obtain the following form of the controller: Step signal input simulation. When the time is 0 s, a unit step signal is added to the input of the set point. When the time is 6 s and 13 s, the step interference signals with the amplitudes of 0.2 and 0.1 are added to the input and output of the controlled object, respectively. The output waveform shown in Fig. 12 is obtained through a Simulink Scope. It can be seen from the figure that the set value response of the system has no overshoot and has good anti-interference ability. In addition, to verify the robustness of the system, corresponding assumptions are made for the delay time and gain constant of the actual object. Assuming that the two are reduced by 20% and increased by 20%, the perturbation system obtained the results shown in Fig. 13 through a Simulink Scope. The output waveform, the blue solid line, is the response of the perturbation system when both parameters are reduced by 20%, and the red solid line is the response of the perturbation system when both parameters are . .
. www.nature.com/scientificreports/ increased by 20%. The red and blue curves in the figure can quickly return to a stable state after being disturbed, which proves the robust performance of the system. Sinusoidal signal simulation. When the time is 0 s, the unit sine signal is added to the input of the set point. When the time is 6 s and 13 s, the input and output of the controlled object, respectively, are added with step interference signals with amplitudes of 0.2 and 0.1 in the opposite direction. Finally, the output waveform shown in Fig. 14 is obtained through an oscilloscope. The red line is the standard sine signal, and the blue line is the nominal system response curve. After being disturbed, the blue curve can quickly recover to the stable state, which proves the anti-interference of the system. To verify the robustness of the system, corresponding assumptions are made for the delay time and gain constant of the actual object. Assuming that the two are reduced by 20% and increased by 20%, the perturbation system obtained the output waveform as shown in Fig. 15 through an oscilloscope, where the blue line is the response of the perturbation system when both parameters are reduced by 20%, and the red line is the response of the perturbation system when both parameters are increased by 20%. The red and blue curves can quickly recover to the stable state after being disturbed, which proves the robust stability of the system.
To test the effect of improving Smith's predictive control, the model shown in the Fig. 16 was built. The results shown in Fig. 17 are obtained through simulation. The green dotted line in Fig. 17 shows the sine signal input unit, the blue solid line shows the improved Smith prediction control, and the red dotted shows the line standard Smith prediction control. Figure 17 shows that when 6 s of external disturbance is input, the improved Smith predictive control quickly recovers to a stable state in approximately 7 s, and the tracking effect is significantly better than that of the standard Smith predictive control.   www.nature.com/scientificreports/ It can be seen from the above simulation diagram that the hydraulic steering control method used in this paper not only improves the anti-interference ability of the system but also makes the system have strong robust stability. In the hydraulic steering system control scheme proposed based on the improved Smith predictive control theory, the disturbance suppression response and tracking response of the steering system are independent of each other. The two controllers are designed in IMC-PID form, and they can be independently adjusted and optimized through a single parameter. Based on ensuring the performance of the setpoint tracking response, the system has good anti-interference ability and can fully meet the requirements of the actual work of the autonomous tractor.
Tractor longitudinal motion control strategy. Considering the operation situation of a tractor, the longitudinal dynamics model can be simplified to a first-order system 28,29 . Therefore, the longitudinal motion system model of the tractor is represented by "Longitudinal dynamics model of a tractor" section where V xd represents the desired speed of the tractor, V x represents the actual speed of the tractor, and the parameters of K and T were estimated as K = 1.04 and T = 2.06, respectively, by related experiments.

System simulation and testing
In this section, a system simulation was executed on the vehicle dynamics simulation software CarSim, in connection with MATLAB/Simulink to test the performance of the proposed control method 30 . Simulink was used in the simulation to build the model. The time step was fixed-step: 0.025 s, and auto (Automatic Solver Selection) was set by Solver. The time step of CarSim was 0.001 s, and the output file time step was 0.025 s with the integration method: AM-2 (2 updates per step).
The tractor model was selected from CarSim. The tractor parameters are given in Table 2. The target speed of the vehicle was 30 km h −1 , and the constant value of the tire-road friction coefficient (u) was 0.85. The simulation was path tracking on a Moose test track (Fig. 18). The reference (red line) is a double line change, which is suitable to check the controller's performance.
The overall CarSim and Simulink simulation model was run, and the relevant simulation results are shown in Figs. 19, 20, 21, 22, 23 and 24. In Fig. 19, the green line is the expected speed of 30 km h −1 , and the blue line is the actual speed change curve of the tractor. When the expected speed information is sent to the longitudinal motion controller, the tractor can quickly respond to it, and finally the actual vehicle speed is consistent with the expected speed, indicating that the tracking effect of longitudinal speed meets the demand.
(58) G(s) = 1.04 2.06s + 1 .       Fig. 20, the blue curve is the desired front wheel angle, and the red curve is the actual front wheel angle. The figure shows that the automatic steering system can quickly respond to the desired steering information sent by the host computer system, and the time delay between the actual steering and the desired steering is in line with the actual working conditions. It can be seen from Figs. 20 and 21 that the desired front wheel steering angle change trend is roughly the same as the desired yaw rate change trend, which is in line with actual conditions. It can be seen from Fig. 22 that the peak value of lateral acceleration is approximately 0.15 < 0.4 g. This effectively guarantees the path tracking effect while considering the comfortable requirements and driving stability of the tractor. Figure 23 shows that the tractor's front tire slip angles of L1 and R1 start to decrease at 7 s and then increase. At 13 s, the trends of L1 and R1 are opposite, and the trend from 7 to 20 s is in line with the reality steering operation. Generally, the front wheels of the tractor are used for steering, and the rear wheels are used for driving, so the tire slip angles of the rear tires L2 and R2 have the same tendency.
To verify the path tracking effect of the tractor, the test was carried out at a speed of 30 km h −1 . The test results are as follows.
It can be seen from Fig. 24 that the tractor produces obvious jitter at the turn of the set path between 60 and 150 m, and can quickly return to the straight tracking state after the turn is completed near 100 m, with a maximum tracking deviation of approximately 10 cm and the overall tracking effect meets the design requirements. Figures 24 and 25 show that when the speed is reduced, the tracking effect of the tractor is significantly improved, and the operating speed of the tractor is less than 10 km h −1 at ordinary times, which can meet the actual operating requirements.   , it can be seen from the above simulation diagram that the control algorithm proposed in this paper can better control the tractor's longitudinal and lateral movement, and make the tractor follow the set trajectory.
The above test data are based on the road environment, as shown in Fig. 26. However, when the tractor is operating on farmland, the operation situation of the tractor is more complicated (as shown in Fig. 27). Hence, it is very important to study the influence of the soil friction coefficient on vehicle operation. The tire-road friction coefficient (u) of the soil was selected as 0.3, 0.35, 0.5 and 0.75 for the test to better verify the performance of the tractor control system.
When considering the influence of the road friction coefficient, the corresponding results are shown in Fig. 28. Compared with Figs. 21 and 28, the desired yaw rate decreases significantly with the decrease in driving speed, but wobble occurs at the steering position under the influence of the soil friction coefficient. To better observe the effect of soil, the influence of different soil friction coefficients u on vehicles running under the conditions of velocities V x of 8 and 10 km h −1 was studied, and the results are shown in Figs. 29 and 30. As shown in Fig. 29, the tire lateral sideslip angle increases with increasing speed in the steering position. Because the lateral component of the steering position speed increases, the lateral slip angle of the tire increases, which is in line with the actual situation. By comparing Figs. 28 and 29, it can be seen that under the influence of the soil friction coefficient, the tire's slip angle fluctuates significantly, which is in line with the changing trend of the tractor at work. The corresponding results for the path tracking effect are shown in Fig. 30.
As shown in Fig. 30, when driving at speeds of 8 and 10 km h −1 , there is little deviation on a straight road. There will be some deviations in path tracking during the turn, but these deviations are small and have little impact on the actual operation. At the same time, it can be seen from Figs. 24, 25 and 30 that the friction  www.nature.com/scientificreports/ coefficient of the soil has little influence on the effect of path tracking when the tractor is running at low speed, and the tracking accuracy can meet the needs of actual operation.

Conclusion
In this paper, a path tracking control strategy for a tractor was designed based on the inverse kinematics model of the longitudinal and lateral dynamic decoupling control. The goal of controlling a tractor is to make it automatically track the desired trajectory and ensure that the tracking accuracy meets the actual agricultural production requirements. In this paper, the improved Smith predictor controller proposed for the hydraulic steering time delay verified the effectiveness of the control algorithm through simulation and comparison.
To test the overall control strategy, a joint simulation with CarSim and MATLAB/Simulink software was carried out. The experimental results show that the control strategy proposed in this paper can maintain a good tracking effect, and the driving speed can meet the actual operation requirements of the tractor. At the same time, the yaw rate, lateral acceleration, and other information when the tractor is travelling are analysed. The proposed path tracking control strategy can ensure the comfort and driving stability of the driver while ensuring the accuracy of path tracking. Considering that suspended farm tools are not considered in the vehicle dynamics modelling in this study, an overall tractor-farm tool dynamics model will be built in future research, and the tractor will be controlled according to the overall dynamics model so that the tractor can reach a better operation effect and maintain good fuel economy.