Research and Experiment on Cruise Control of a Self-Propelled Electric Sprayer Chassis

: In order to address the issues of poor stability in vehicle speed and deteriorated spraying quality caused by changes in road slope and the decrease in overall mass due to liquid spraying, this study focuses on analyzing the structure and longitudinal dynamic characteristics of a 4WID high ground clearance self-propelled electric sprayer. By utilizing MATLAB/Simulink software, three subsystems, namely, the inverse longitudinal dynamics model, torque distribution model, and motor model, are established. The model takes into account the effects of longitudinal driving resistance, slope, and vehicle roll angle on the distribution of loads among the four wheels during slope driving. A seven-degrees-of-freedom dynamic model is developed. A hierarchical control structure is designed, incorporating an upper-level PID controller and a lower-level fuzzy PID controller, to control the overall system. The control algorithms are tailored to the specific characteristics of the sprayer’s operation, and simulation experiments are conducted under the corresponding operating conditions. Building upon this, a sensor-equipped experimental platform is set up in the self-propelled sprayer manufactured by the team in the preliminary stage. Real vehicle tests are conducted in two scenarios: transition transportation and field operations, with the evaluation of the overall vehicle speed serving as the performance metric to validate the correctness of the model and the control theory.


Introduction
As agricultural environmental protection requirements become increasingly stringent, electric-driven, high-clearance, self-propelled sprayers are poised to become a future trend.However, due to the complex working conditions of sprayers, changes in external road environments, and decreased curb weight caused by internal liquid spraying, issues such as poor driving speed stability, uneven spraying, and deteriorated work quality are prone to occur.Achieving cruise control of sprayers under disturbances in complex environments is a crucial means by which to enhance their operational quality and efficiency.
Currently, motion control and task control are the two core components of automatic control technology for intelligent agricultural machinery.Domestic and international scholars' research on automatic agricultural machinery control primarily focuses on navigation path tracking control [1][2][3] and navigation positioning algorithms [4][5][6].The study of constant-speed cruise control for agricultural machinery, as a crucial direction within motion control, presents more research opportunities compared to the study of adaptive cruise control for automobiles [7][8][9][10][11][12].Most agricultural machinery studies target agricultural equipment powered by engines, adjusting the power system through parameters to achieve precise operational speeds [13,14].Regarding agricultural machinery speed control, COEN et al. [15] developed a cruise control system based on a predictive controller designed using the harvester's dynamic model, minimizing engine speed without compromising acceleration performance.KAYACAN et al. [16] controlled the longitudinal speed of tractors using a PID controller during the design of agricultural vehicles.Miao Zhonghua et al. [17] proposed a real-time adjustment algorithm for a cotton picker's working speed based on fuzzy PID control, establishing a speed adjustment model to achieve optimal control of the cotton picker's working speed.He Jie et al. [18] designed an expert PID speed control algorithm and PID interpolation mechanism control algorithm with a combined control strategy for rice transplanters, enabling automatic control of planting operations and speeds.
The spray machine cruise control is an automatic control strategy designed to maintain a constant speed of the spray machine during field operations.This control method is crucial for crop protection operations, as implementing cruise control for the spray machine can reduce human error and resource wastage, aiding farmers in accurately applying crop protection products.Based on their independently developed novel four-wheel-drive and steerable spray machine, the Shen Yue team [19] established the kinematic model of the chassis and adopted a hierarchical control approach.Through an upper-level wheel speed distribution controller and a lower-level wheel speed coordination controller for speed control, the results demonstrated that the maximum speed fluctuation controlled was 0.2 m/s, meeting the operational requirements of the spray machine.
In conclusion, there is a limited number of in-depth studies on the longitudinal velocity control of electric sprayers, with little consideration given to the unique operational characteristics of sprayers and external disturbances.Moreover, the majority of research relies on conventional PID algorithms, leading to issues concerning robustness and control precision balance.Therefore, this study, taking into account the structural features of high-clearance, self-propelled electric sprayers, aims to establish an accurate mathematical model under external disturbances and to implement a hierarchical control structure to investigate speed control strategies for constant-speed cruising.This approach seeks to achieve stable speed control during the operation of the sprayer, meeting the requirements for high-quality pesticide spraying.Subsequently, the real-time experimental platform for speed control during cruising is constructed for the sprayer, and experiments are conducted during transitional transport and field operations to validate the established model and control algorithms.

Test Platform Construction
The experimental platform was established based on a high-clearance, self-propelled sprayer constructed by our team.The chassis of the sprayer is a swing-type flexible electric chassis, with specific parameters outlined in Table 1.A six-axis attitude measurement gyroscope module was installed at the center of gravity position of the sprayer to measure vehicle acceleration, speed, and body posture.The vehicle controller employed an IMC T3654 industrial programmable controller from Hirschmann, along with a remote controller featuring a human-machine interface, as depicted in Figure 1.
The vehicle controller employed an IMC T3654 industrial programmable controller from Hirschmann, along with a remote controller featuring a human-machine interface, as depicted in Figure 1.The selected IMC T3654 controller is based on a 32-bit Tricore platform, known for its fast response speed and high efficiency.It offers an open programming environment and a rich set of mature application modules.The control algorithm developed earlier can be converted into program code using Codesys and then burned into the controller (the version of the programming tool is Codesys v3.5 sp4).
The IMC T3654 controller is housed in the control box at the front of the sprayer.To measure the acceleration at the center of gravity, a JY61P six-axis attitude sensor is fixed to the support beam below the tank.By integrating the acceleration data, the current driving speed can be determined.Additionally, the sensor provides the vehicle's pitch angle, allowing for the calculation of the current slope gradient.The final setup of the experimental vehicle platform is illustrated in Figure 2.

Analysis of the Overall Cruise Control Model Architecture
Dynamic models were established for each component of the chassis.In order to ensure the accuracy and conciseness of the longitudinal dynamic model and control system, a mechanistic analysis of each part of the system is conducted.Subsequently, a longitudinal dynamic simulation system for the sprayer is developed, and simulations are carried out using Simulink to validate the model's correctness, facilitating the application of control algorithms on the model in the future.
The working environment of the sprayer is complex, with road conditions potentially varying between uphill and downhill slopes during operation.To analyze the longitudinal forces and motion states of the sprayer when driving on slopes, the force diagram is established in the spatial coordinate system as shown in Figure 3.The ground coordinate system is symbolized by Xs-Ys-Zs, with the directions of Xs, Ys, and Zs following the right- The IMC T3654 controller is housed in the control box at the front of the sprayer.To measure the acceleration at the center of gravity, a JY61P six-axis attitude sensor is fixed to the support beam below the tank.By integrating the acceleration data, the current driving speed can be determined.Additionally, the sensor provides the vehicle's pitch angle, allowing for the calculation of the current slope gradient.The final setup of the experimental vehicle platform is illustrated in Figure 2.
Agriculture 2024, 14, x FOR PEER REVIEW 3 of 23 The vehicle controller employed an IMC T3654 industrial programmable controller from Hirschmann, along with a remote controller featuring a human-machine interface, as depicted in Figure 1.The IMC T3654 controller is housed in the control box at the front of the sprayer.To measure the acceleration at the center of gravity, a JY61P six-axis attitude sensor is fixed to the support beam below the tank.By integrating the acceleration data, the current driving speed can be determined.Additionally, the sensor provides the vehicle's pitch angle, allowing for the calculation of the current slope gradient.The final setup of the experimental vehicle platform is illustrated in Figure 2.

Analysis of the Overall Cruise Control Model Architecture
Dynamic models were established for each component of the chassis.In order to ensure the accuracy and conciseness of the longitudinal dynamic model and control system, a mechanistic analysis of each part of the system is conducted.Subsequently, a longitudinal dynamic simulation system for the sprayer is developed, and simulations are carried out using Simulink to validate the model's correctness, facilitating the application of control algorithms on the model in the future.
The working environment of the sprayer is complex, with road conditions potentially varying between uphill and downhill slopes during operation.To analyze the longitudinal forces and motion states of the sprayer when driving on slopes, the force diagram is established in the spatial coordinate system as shown in Figure 3.The ground coordinate system is symbolized by Xs-Ys-Zs, with the directions of Xs, Ys, and Zs following the right-

Analysis of the Overall Cruise Control Model Architecture
Dynamic models were established for each component of the chassis.In order to ensure the accuracy and conciseness of the longitudinal dynamic model and control system, a mechanistic analysis of each part of the system is conducted.Subsequently, a longitudinal dynamic simulation system for the sprayer is developed, and simulations are carried out using Simulink to validate the model's correctness, facilitating the application of control algorithms on the model in the future.
The working environment of the sprayer is complex, with road conditions potentially varying between uphill and downhill slopes during operation.To analyze the longitudinal forces and motion states of the sprayer when driving on slopes, the force diagram is established in the spatial coordinate system as shown in Figure 3.The ground coordinate system is symbolized by X s -Y s -Z s , with the directions of X s , Y s , and Z s following the righthand rule, and the coordinate origin O s fixed at a corner of the slope.The coordinate system that moves with the center of mass of the sprayer's spring-loaded mass is symbolized by X v -Y v -Z v , with its origin O v coinciding with the center of mass of the sprayer's springloaded mass.When the sprayer travels on an inclined plane, the negative direction along the X v axis represents its longitudinal motion, Y v denotes the lateral direction, and Z v indicates the vertical direction.
Agriculture 2024, 14, x FOR PEER REVIEW 4 of 23 hand rule, and the coordinate origin Os fixed at a corner of the slope.The coordinate system that moves with the center of mass of the sprayer's spring-loaded mass is symbolized by Xv-Yv-Zv, with its origin Ov coinciding with the center of mass of the sprayer's springloaded mass.When the sprayer travels on an inclined plane, the negative direction along the Xv axis represents its longitudinal motion, Yv denotes the lateral direction, and Zv indicates the vertical direction.The slope angle is the angle between the projection of the slope on the Ys-Os-Zs plane in the spatial coordinate system Xs-Ys-Zs and the Ys axis.The heading angle of the sprayer when traveling on the slope is represented by θ, where θ is the angle between the velocity of the center of mass and the Ys-Os-Zs plane in the spatial coordinate system.The body roll angle of the sprayer in the spatial coordinate system is represented by α, and the pitch angle is represented by β.
When establishing the longitudinal dynamic model of the sprayer, the following assumptions are made: (1) The deformation of the tires and the ground are neglected.
(2) The entire body of the sprayer is symmetrical from left to right.
(3) The tires are in a pure rolling state without side slip or slip, and the tire-road adhesion is ideal.
Based on the above assumptions, this paper considers the sprayer operating under slope conditions, establishing a longitudinal dynamic model with simultaneous pitch and roll of the vehicle body.
To analyze the longitudinal dynamic characteristics of the electric self-propelled sprayer, an electric sprayer's longitudinal dynamic simulation system is first established.The system mainly consists of four parts, namely, an inverse longitudinal dynamic model, a torque distribution model, a motor model, and a seven-degrees-of-freedom vehicle body model, as shown in Figure 4.  Tdes-desired total driving or braking torque; T1des, T2des, T3des, T4des-desired torques for each wheel; T1, T2, T3, T4-actual output torques for each wheel; vf-actual speed; af-actual acceleration.L-sprayer wheelbase, m; l a -center of mass to front axle distance, m; l b -center of mass to rear axis distance, m; B-wheel pitch, m; h-height of center of mass, m; V-current traveling speed, m/s 2 ; F w -air resistance, N; F a -acceleration resistance, N; F p -ramp resistance, N; T tqij -optimum demand torque for each wheel, N•m; F tij -driving force of each wheel individually, N; F Nij -normal ground support for each wheel, N; F fij -rolling resistance of each wheel, N; (i = f,r; j = l,r).
The slope angle is the angle between the projection of the slope on the Y s -O s -Z s plane in the spatial coordinate system X s -Y s -Z s and the Y s axis.The heading angle of the sprayer when traveling on the slope is represented by θ, where θ is the angle between the velocity of the center of mass and the Y s -O s -Z s plane in the spatial coordinate system.The body roll angle of the sprayer in the spatial coordinate system is represented by α, and the pitch angle is represented by β.
When establishing the longitudinal dynamic model of the sprayer, the following assumptions are made: (1) The deformation of the tires and the ground are neglected.
(2) The entire body of the sprayer is symmetrical from left to right.
(3) The tires are in a pure rolling state without side slip or slip, and the tire-road adhesion is ideal.
Based on the above assumptions, this paper considers the sprayer operating under slope conditions, establishing a longitudinal dynamic model with simultaneous pitch and roll of the vehicle body.
To analyze the longitudinal dynamic characteristics of the electric self-propelled sprayer, an electric sprayer's longitudinal dynamic simulation system is first established.The system mainly consists of four parts, namely, an inverse longitudinal dynamic model, a torque distribution model, a motor model, and a seven-degrees-of-freedom vehicle body model, as shown in Figure 4.
hand rule, and the coordinate origin Os fixed at a corner of the slope.The coordinate system that moves with the center of mass of the sprayer's spring-loaded mass is symbolized by Xv-Yv-Zv, with its origin Ov coinciding with the center of mass of the sprayer's springloaded mass.When the sprayer travels on an inclined plane, the negative direction along the Xv axis represents its longitudinal motion, Yv denotes the lateral direction, and Zv indicates the vertical direction.Force diagram of the sprayer in a spatial coordinate system.M-total weight of sprayer, kg; L-sprayer wheelbase, m; la-center of mass to front axle distance, m; lb-center of mass to rear axis distance, m; B-wheel pitch, m; h-height of center of mass, m; V-current traveling speed, m/s 2 ; Fw-air resistance, N; Fa-acceleration resistance, N; Fp-ramp resistance, N; Ttqij-optimum demand torque for each wheel, N•m; Ftij-driving force of each wheel individually, N; FNij-normal ground support for each wheel, N; Ffij-rolling resistance of each wheel, N; (i = f,r; j = l,r).
The slope angle is the angle between the projection of the slope on the Ys-Os-Zs plane in the spatial coordinate system Xs-Ys-Zs and the Ys axis.The heading angle of the sprayer when traveling on the slope is represented by θ, where θ is the angle between the velocity of the center of mass and the Ys-Os-Zs plane in the spatial coordinate system.The body roll angle of the sprayer in the spatial coordinate system is represented by α, and the pitch angle is represented by β.
When establishing the longitudinal dynamic model of the sprayer, the following assumptions are made: (1) The deformation of the tires and the ground are neglected.
(2) The entire body of the sprayer is symmetrical from left to right.
(3) The tires are in a pure rolling state without side slip or slip, and the tire-road adhesion is ideal.
Based on the above assumptions, this paper considers the sprayer operating under slope conditions, establishing a longitudinal dynamic model with simultaneous pitch and roll of the vehicle body.
To analyze the longitudinal dynamic characteristics of the electric self-propelled sprayer, an electric sprayer's longitudinal dynamic simulation system is first established.The system mainly consists of four parts, namely, an inverse longitudinal dynamic model, a torque distribution model, a motor model, and a seven-degrees-of-freedom vehicle body model, as shown in Figure 4.  Tdes-desired total driving or braking torque; T1des, T2des, T3des, T4des-desired torques for each wheel; T1, T2, T3, T4-actual output torques for each wheel; vf-actual speed; af-actual acceleration.T des -desired total driving or braking torque; T 1des , T 2des , T 3des , T 4des -desired torques for each wheel; T 1 , T 2 , T 3 , T 4 -actual output torques for each wheel; v f -actual speed; a f -actual acceleration.
a des serves as the input to the inverse longitudinal dynamic model.After passing through the inverse longitudinal dynamic model, the desired torque T des is output to the torque distribution model.The torque distribution model calculates the desired torque for each of the four wheels based on factors such as the current posture of the sprayer and the slope of the road.The actual torques are obtained through the motor model; and finally, the actual torques of the four wheels are input into the seven-degrees-of-freedom vehicle body model of the sprayer to calculate the actual vehicle speed and acceleration.

Modeling of Inverse Longitudinal Dynamical Systems
According to Newton's second law, the kinetic equation of the sprayer can be obtained as follows: In Equation ( 1), F t is the total driving force of the sprayer, N; F b is the braking force, N; and F f is the rolling resistance, N.
The formula for each part of resistance is shown in Equation (2). 21.15 In Equation ( 2), C D is the air resistance coefficient; A is the windward area of the sprayer, m 2 ; V r is the traveling relative speed, m/s; V r = V + V wind , and considering the traveling of the sprayer under the windless condition, the relative speed at this time is the traveling speed of the sprayer; δ is the mass conversion factor that relates to the moment of inertia of the rotating parts of the sprayer, such as the wheels, and is usually greater than one [20]; a is the traveling acceleration of the sprayer, m/s 2 ; and µ is the rolling resistance coefficient.
The equation for the longitudinal dynamics of the sprayer during acceleration can be expressed as follows: Furthermore, the total driving force of the sprayer is composed of the driving forces provided by the four in-wheel motors, respectively, as shown in Equation (4).
In Equation ( 4), F t is the driving force of the whole vehicle, N; F tf and F tr are the sum of the driving force of the front and rear axles of the sprayer, N; and F tij is the driving force of each wheel individually (i = f,r; j = l,r), N, respectively.
The acting torque T tqij of the hub motor on each wheel generates a circumferential force F 0 on the ground; and the reaction force F tij of the ground on the wheel is the driving force of each wheel, expressed as follows: In Equation ( 5), R is the rolling radius of the wheel, m; and η t is the transmission efficiency of the in-wheel motor.
The sum of the output torque of the four hub motors can be calculated using Equations ( 2)-( 5), jointly as follows:

Four-Wheel Torque Distribution Strategy
In the four-wheel drive mode of the sprayer, the overall vehicle driving torque, determined by the controller, needs to be appropriately distributed before it is transmitted to the four hub motors.This ensures efficient and energy-saving power output [21,22].The distribution of the driving torques for each wheel of the sprayer during inclined slope conditions is based on the tire adhesion ratio.The tire adhesion ratio for each wheel during the sprayer's movement on a slope can be expressed as follows [23]: In Equation ( 7), C φfl , C φfr , C φrl , and C φrr are the attachment rates of the left front wheel, right front wheel, left rear wheel, and right rear wheel, respectively; F Nfl , F Nfr , F Nrl , and F Nrr are the normal reaction forces of the ground on the left front wheel, right front wheel, left rear wheel, and right rear wheel, respectively, N.
When C φfl = C φfr = C φrl = C φrr , the driving forces of each wheel simultaneously reached the ground adhesion limit, and all the adhesion forces between the ground and the wheels could be converted into driving forces for the sprayer.Considering that the sprayer travels on a slope with both pitch and roll body states, the pitch angle and roll angle of the vehicle change with the direction of travel.Therefore, the normal reaction forces from the ground on each wheel vary, leading to a different distribution of driving forces for each wheel based on the varying normal reaction forces from the ground.Hence, the relationship for distributing the driving forces for each wheel can be determined as follows: Based on the longitudinal dynamics analysis of the sprayer in space, the longitudinal dynamic forces from the pitch and roll perspectives can be obtained.The sprayer model can be simplified into a two-wheel model, as shown in Figure 5.
Agriculture 2024, 14, x FOR PEER REVIEW 7 of 23 The normal reaction forces on the front and rear wheels of the sprayer can be derived from the torque balance equation at the contact points with the ground.Similarly, the normal reaction forces on the left and right wheels of the sprayer can be obtained, as shown in Equation ( 9), based on the torque balance equation.( cos cos sin ) The normal reaction forces on the front and rear wheels of the sprayer can be derived from the torque balance equation at the contact points with the ground.Similarly, the normal reaction forces on the left and right wheels of the sprayer can be obtained, as shown in Equation ( 9), based on the torque balance equation.
The total vehicle normal support force and the torque distribution coefficients for each wheel of the sprayer can be obtained from Equation (9).Based on the torque distribution coefficients for each wheel of the sprayer, the optimal required torque for each wheel can be determined.
Equation ( 10) defines ψ fl , ψ fr , ψ rl , and ψ rr as the torque distribution coefficients for the front left, front right, rear left, and rear right wheels of the sprayer, respectively.

Modeling of Motor Systems
The parameters of the selected hub motor were determined to have a maximum power of 953.05 W and a maximum torque of 80.34 N•m.By calculations, the rated speed of the hub motor was found to be 113.2889r/min.Based on the generated external characteristic curve of the hub motor (as shown in Figure 6a) and its actual parameters, the drive motor model was established in MATLAB/Simulink (as shown in Figure 6b). of the hub motor was found to be 113.2889r/min.Based on the generated external characteristic curve of the hub motor (as shown in Figure 6a) and its actual parameters, the drive motor model was established in MATLAB/Simulink (as shown in Figure 6b).The motor is modeled in Simulink using the Lookup Table module according to the external characteristic curve of the motor.Meanwhile, in order to make the motor model conform to the reality, the following rules of torque output of the motor model are stipulated: according to the current speed of the motor, check the external characteristic table to obtain the maximum actual permissible torque; if the current demand torque is less than the maximum permissible torque, then the demand torque is output; if the current demand torque is more than the maximum permissible torque, then the output torque will be limited to the maximum permissible torque, which ensures the accuracy of the motor model.The motor is modeled in Simulink using the Lookup Table module according to the external characteristic curve of the motor.Meanwhile, in order to make the motor model conform to the reality, the following rules of torque output of the motor model are stipulated: according to the current speed of the motor, check the external characteristic table to obtain the maximum actual permissible torque; if the current demand torque is less than the maximum permissible torque, then the demand torque is output; if the current demand torque is more than the maximum permissible torque, then the output torque will be limited to the maximum permissible torque, which ensures the accuracy of the motor model.

Chassis Dynamics Modeling
The essence of vehicle modeling and stability analysis lies in accurately depicting the operational state of the vehicle, laying a solid foundation for vehicle control [24][25][26][27].Given the focus of this study on speed sustainment control during the operation of the sprayer, particular attention should be paid to the sprayer's motion characteristics in the horizontal plane during the dynamics analysis of the sprayer.
The schematic diagram of the chassis dynamic model of the sprayer is illustrated in Figure 7a,b, depicting a seven-degrees-of-freedom model and a wheel model.The seven-degrees-of-freedom model primarily encompasses the motion of the sprayer around the x-axis, y-axis, z-axis, and the rotational motion of the four wheels [28].Therefore, considering the analysis presented earlier, the motion differential equations accounting for the driving resistance of the sprayer, the vertical forces on each tire, and the dynamics of the wheels can be expressed as Equation (11).
In Equation (11), the longitudinal forces on the four wheels are represented by F ffl , F ffr , F fr , and F frr , N; the lateral forces on the four wheels are represented by F y_fl , F y_fr , F y_rl , and F y_rr , N; δ l indicates the steering angle of the left front wheel, while δ r represents the steering angle of the right front wheel, • ; I z stands for the moment of inertia of the sprayer around the z-axis, kg•m 2 ; B f corresponds to the front wheelbase distance, and B r to the rear wheelbase distance, m; m w denotes the weight of the tires, kg; a x signifies the longitudinal acceleration of the sprayer in the x-direction, m/s 2 , and a y describes the lateral acceleration of the sprayer in the y-direction, m/s 2 ; I wij represents the moment of inertia of the wheel about the center of the hub motor, kg•m 2 ; R is the wheel radius, m; and T bij denotes the rolling resistance torque, N•m, where T tqij provides driving torque when positive and acts as braking torque when negative.
To obtain accurate tire characteristics, suitable tire models must be established based on the specific research context to accurately describe the kinematic behavior of the tires, thereby enhancing the overall reliability and precision of the study [29,30].Currently, in practical engineering studies, there exist various tire models, categorized as theoretical models, empirical models, semi-empirical models, and adaptive models [31][32][33].
Among these, the "magic formula" tire model proposed by H. B. Pacejka stands out as a typical empirical model known for its unified and concise form, offering high fitting accuracy [34,35].This paper adopts the "magic formula" tire model, which employs a set of uniformly structured equations to precisely describe crucial mechanical properties such as longitudinal forces, lateral forces, and the aligning moments of the tire [36].
Agriculture 2024, 14, x FOR PEER REVIEW 9 of 23 In Equation (11), the longitudinal forces on the four wheels are represented by Fffl, Fffr, Ffr, and Ffrr, N; the lateral forces on the four wheels are represented by Fy_fl, Fy_fr, Fy_rl, Self-propelled sprayer power transmission system Self-propelled sprayer cruise control

Upper and Lower Level Controller Design
For the upper-level controller, the PID control algorithm was employed to ensure rapid response [37].It takes the user's speed setpoint and real-time vehicle speed as inputs and outputs the desired acceleration to the lower-level controller.
During the parameterization of the upper controller.Initially, the proportional gain (kp) was set to 2, while both integral (ki) and derivative (kd) gains were set to 0. Observing the response characteristics of the output, kp was continuously adjusted to ensure good system sensitivity, while ki was adjusted to reduce overshoot.After multiple iterations, the optimal PID parameter combination was determined to be kp = 15, ki = 3.97, and kd = 0.
To avoid the instability issues associated with conventional PID control [38], the fuzzy PID control approach was ultimately adopted for the lower-level controller design, considering the complex operating conditions of the sprayer during travel.This method ensures control accuracy while maintaining smooth driving.
The error between the target acceleration and the actual acceleration, represented by e, along with the rate of change of the error, c, are considered as fuzzy values for the proportional (Kp), integral (Ki), and derivative (Kd) coefficients.Based on the current operating conditions of the self-propelled sprayer, the fundamental domain for the error e between the target and actual accelerations is [−2, 2], while the domain for the error rate c is [−0.5, 0.5].These variables (Kp, Ki, Kd, ec, e) are divided into seven fuzzy sets each, represented as NB, NM, NS, ZO, PS, PM, and PB, indicating negative large, negative medium, negative small, zero, positive small, positive medium, and positive large, respectively.After determining the fuzzy sets and domains, membership functions were established for

Upper and Lower Level Controller Design
For the upper-level controller, the PID control algorithm was employed to ensure rapid response [37].It takes the user's speed setpoint and real-time vehicle speed as inputs and outputs the desired acceleration to the lower-level controller.
During the parameterization of the upper controller.Initially, the proportional gain (k p ) was set to 2, while both integral (k i ) and derivative (k d ) gains were set to 0. Observing the response characteristics of the output, k p was continuously adjusted to ensure good system sensitivity, while k i was adjusted to reduce overshoot.After multiple iterations, the optimal PID parameter combination was determined to be k p = 15, k i = 3.97, and k d = 0.
To avoid the instability issues associated with conventional PID control [38], the fuzzy PID control approach was ultimately adopted for the lower-level controller design, considering the complex operating conditions of the sprayer during travel.This method ensures control accuracy while maintaining smooth driving.
The error between the target acceleration and the actual acceleration, represented by e, along with the rate of change of the error, e c , are considered as fuzzy values for the proportional (K p ), integral (K i ), and derivative (K d ) coefficients.Based on the current operating conditions of the self-propelled sprayer, the fundamental domain for the error e between the target and actual accelerations is [−2, 2], while the domain for the error rate e c is [−0.5, 0.5].These variables (K p , K i , K d , e c , e) are divided into seven fuzzy sets each, represented as NB, NM, NS, ZO, PS, PM, and PB, indicating negative large, negative medium, negative small, zero, positive small, positive medium, and positive large, respectively.After determining the fuzzy sets and domains, membership functions were established for the fuzzy variables.For NB and PB, zmf and smf membership functions were utilized, while trimf membership functions were used for the others.The membership functions have a narrow range in the middle and wider ranges on the sides to ensure quick stability when errors are small.
Drawing from the extensive driving experience of traditional vehicle drivers and the operational characteristics of the sprayer under study, fuzzy rules were formulated, taking into account response time and overshoot.Overshoot impacts the smooth operation of the sprayer; due to the significant mass of liquid in the tank, excessive acceleration could lead to increased liquid agitation within the tank, compromising the safety of the sprayer during operation.The formulation of fuzzy rules is as follows.
When the absolute value of the acceleration deviation e is large, the system's response speed becomes a primary consideration.To reduce the time required to reach the cruising speed, increasing the tuning parameters K p and K i can enhance the spray machine's dynamics, thereby correcting the deviation more quickly.However, this action may prematurely put the system into a regulation state, thereby prolonging the entire adjustment process.Therefore, fine-tuning of the tuning parameter K d is necessary to appropriately reduce its value in order to balance the system's response speed and stability.
When the absolute value of the acceleration deviation e only slightly exceeds a certain range, a moderate increase in the proportional gain K p can enhance the system's sensitivity to deviations.Based on the rate of change of the deviation e c , the integral gain K i is adjusted accordingly to optimize the system's dynamic performance.Simultaneously, to minimize the system's overshoot and ensure the safe and stable operation of the spray machine, the derivative gain K d can be moderately increased.
When the absolute value of the acceleration deviation e is relatively small, indicating that the actual operating speed of the spray machine is close to the user-set cruising speed, the controller needs to avoid excessive overshoot.At this point, maintaining K p and K i at a relatively moderate level is essential, while slightly increasing the value of K d can aid the system in better suppressing overshoot.
Following a comprehensive analysis of the deviation between the expected and actual acceleration values, fuzzy PID control rules were established, as presented in Table 2.After entering the rules in the table one by one in the MATLAB fuzzy logic design module, the characteristic surface corresponding to the input and output variables obtained is shown in Figure 9.
Subsequently, the fuzzy values output by the fuzzy controller were defuzzified to obtain precise output quantities.In this study, centroid defuzzification using the area centroid method was implemented in the MATLAB Fuzzy Logic Toolbox to ensure smooth output control.Ultimately, a constant speed cruise control system for the sprayer was established in Simulink.The controller takes the acceleration deviation and the rate of deviation as inputs and outputs K p , K i , and K d .These three parameters are added to the proportional, integral, and derivative gains of the system in a simple PID control.The resulting value, after proportional, integral, and derivative operations on the deviation, is then summed to produce the acceleration control value for the sprayer.After tuning, the optimal initial fuzzy PID parameters were determined to be k p = 2.5, k i = 2.8, and k d = 0.01.Subsequently, the fuzzy values output by the fuzzy controller were defuzzified to obtain precise output quantities.In this study, centroid defuzzification using the area centroid method was implemented in the MATLAB Fuzzy Logic Toolbox to ensure smooth output control.Ultimately, a constant speed cruise control system for the sprayer was established in Simulink.The controller takes the acceleration deviation and the rate of deviation as inputs and outputs Kp, Ki, and Kd.These three parameters are added to the proportional, integral, and derivative gains of the system in a simple PID control.The resulting value, after proportional, integral, and derivative operations on the deviation, is then summed to produce the acceleration control value for the sprayer.After tuning, the optimal initial fuzzy PID parameters were determined to be kp = 2.5, ki = 2.8, and kd = 0.01.

Analysis of Simulation Test Results
The vehicle dynamics model and controller model established in MATLAB/Simulink 2023a will be integrated to obtain the overall model for the constant speed cruise control, as shown in Figure 10.

Four-Wheel Torque Distribution Strategy Validation
To validate the constructed four-wheel torque distribution model, simulations were conducted under four different scenarios in the sprayer: when the sprayer's body pitch angle is 0°, when the sprayer does not have any lateral or pitch angles, when both lateral and pitch angles are 0°, and when they are both non-zero.To ensure that the simulation test aligns with the actual operating conditions, a survey of the actual transportation environment for the sprayer revealed that the majority of road gradients are less than 10°.

Analysis of Simulation Test Results
The vehicle dynamics model and controller model established in MATLAB/Simulink 2023a will be integrated to obtain the overall model for the constant speed cruise control, as shown in Figure 10.Subsequently, the fuzzy values output by the fuzzy controller were defuzzified to obtain precise output quantities.In this study, centroid defuzzification using the area centroid method was implemented in the MATLAB Fuzzy Logic Toolbox to ensure smooth output control.Ultimately, a constant speed cruise control system for the sprayer was established in Simulink.The controller takes the acceleration deviation and the rate of deviation as inputs and outputs Kp, Ki, and Kd.These three parameters are added to the proportional, integral, and derivative gains of the system in a simple PID control.The resulting value, after proportional, integral, and derivative operations on the deviation, is then summed to produce the acceleration control value for the sprayer.After tuning, the optimal initial fuzzy PID parameters were determined to be kp = 2.5, ki = 2.8, and kd = 0.01.

Analysis of Simulation Test Results
The vehicle dynamics model and controller model established in MATLAB/Simulink 2023a will be integrated to obtain the overall model for the constant speed cruise control, as shown in Figure 10.

Four-Wheel Torque Distribution Strategy Validation
To validate the constructed four-wheel torque distribution model, simulations were conducted under four different scenarios in the sprayer: when the sprayer's body pitch angle is 0°, when the sprayer does not have any lateral or pitch angles, when both lateral and pitch angles are 0°, and when they are both non-zero.To ensure that the simulation test aligns with the actual operating conditions, a survey of the actual transportation environment for the sprayer revealed that the majority of road gradients are less than 10°.

Four-Wheel Torque Distribution Strategy Validation
To validate the constructed four-wheel torque distribution model, simulations were conducted under four different scenarios in the sprayer: when the sprayer's body pitch angle is 0 • , when the sprayer does not have any lateral or pitch angles, when both lateral and pitch angles are 0 • , and when they are both non-zero.To ensure that the simulation test aligns with the actual operating conditions, a survey of the actual transportation environment for the sprayer revealed that the majority of road gradients are less than 10 • .Consequently, we have set a gradient of 10 • as the value for the sprayer's travel during operation.The simulation scenarios were set as follows: Scenario 1: The sprayer travels on a level road with no lateral or pitch angles in the body.The input whole-vehicle desired torque is set as a sine wave signal with amplitudes, biases, and frequencies of 100, 100, and 0.5, respectively.The simulation duration is 30 s, and the torque curves of each wheel hub motor output are illustrated in Figure 11a.
Consequently, we have set a gradient of 10° as the value for the sprayer's travel during operation.The simulation scenarios were set as follows: Scenario 1: The sprayer travels on a level road with no lateral or pitch angles in the body.The input whole-vehicle desired torque is set as a sine wave signal with amplitudes, biases, and frequencies of 100, 100, and 0.5, respectively.The simulation duration is 30 s, and the torque curves of each wheel hub motor output are illustrated in Figure 11a.Scenario 2: The sprayer travels on a level road from 0 to 10 s and then on a slope from 10 to 30 s with a heading angle of 90°, resulting in a 10° lateral tilt angle of the body and 0° pitch angle.The input signal is the same as in Scenario 1, and the torque curves of each wheel hub motor output are shown in Figure 11b.
Scenario 3: The sprayer travels on a level road from 0 to 10 s and then on a slope from 10 to 30 s with a heading angle of 0°, resulting in a 10° pitch angle of the body and 0° lateral tilt angle.The input signal matches Scenario 1, and the torque curves of each wheel hub motor output are depicted in Figure 11c.
Scenario 4: The sprayer travels on a level road from 0 to 10 s and then on a slope from 10 to 30 s with a 10° pitch angle and a 10° lateral tilt angle of the body.The input signal corresponds to Scenario 1, and the torque curves of each wheel hub motor output are displayed in Figure 11d.
The analysis of the torque distribution simulation results for the four scenarios reveals the following: (1) In Scenario 1, as the sprayer operates on a level road, using the sprayer's center of gravity position as the optimal torque distribution reference, it is determined from the established mathematical model that the center of gravity is located in the rear half of the sprayer, with equal mass on both sides.Consequently, the torque applied to the two rear wheels is equal and slightly greater than that applied to the front wheels.
(2) In Scenario 2, during the first 10 s, the torque distribution is similar to Scenario 1.
After 10 s, when the sprayer ascends the slope, with the left two wheels of the sprayer positioned lower due to the center of gravity being towards the rear, the left rear wheel should have the highest driving torque.Scenario 2: The sprayer travels on a level road from 0 to 10 s and then on a slope from 10 to 30 s with a heading angle of 90 • , resulting in a 10 • lateral tilt angle of the body and 0 • pitch angle.The input signal is the same as in Scenario 1, and the torque curves of each wheel hub motor output are shown in Figure 11b.
Scenario 3: The sprayer travels on a level road from 0 to 10 s and then on a slope from 10 to 30 s with a heading angle of 0 • , resulting in a 10 • pitch angle of the body and 0 • lateral tilt angle.The input signal matches Scenario 1, and the torque curves of each wheel hub motor output are depicted in Figure 11c.
Scenario 4: The sprayer travels on a level road from 0 to 10 s and then on a slope from 10 to 30 s with a 10 • pitch angle and a 10 • lateral tilt angle of the body.The input signal corresponds to Scenario 1, and the torque curves of each wheel hub motor output are displayed in Figure 11d.
The analysis of the torque distribution simulation results for the four scenarios reveals the following: (1) In Scenario 1, as the sprayer operates on a level road, using the sprayer's center of gravity position as the optimal torque distribution reference, it is determined from the established mathematical model that the center of gravity is located in the rear half of the sprayer, with equal mass on both sides.Consequently, the torque applied to the two rear wheels is equal and slightly greater than that applied to the front wheels.(2) In Scenario 2, during the first 10 s, the torque distribution is similar to Scenario 1.
After 10 s, when the sprayer ascends the slope, with the left two wheels of the sprayer positioned lower due to the center of gravity being towards the rear, the left rear wheel should have the highest driving torque.(3) In Scenario 3, the torque distribution during the first 10 s aligns with Scenario 1.After 10 s, when the sprayer climbs the slope, the torque applied to the two rear wheels is equal, as is the torque applied to the two front wheels, with the rear wheel torque exceeding that of the front wheels.(4) In Scenario 4, the torque distribution during the first 10 s is consistent with Scenario 1.
After 10 s, when the sprayer ascends the slope with a 10 • pitch angle and lateral tilt, the left rear wheel has the highest driving torque.
The simulation results indicate that the torque allocated by the torque distribution module corresponds to the actual force distribution on each wheel, enabling the sprayer to output more reasonable torque when driving on slopes, thereby ensuring stability and safety during operation.

Cruise Control Function Verification
Building upon the established longitudinal dynamics system model and control model, simulations were conducted for the cruise control of the sprayer, considering the actual operational requirements for spray coverage and driving safety.Typically, the sprayer operates at speeds of 3-8 km/h to maintain operational efficiency.Therefore, simulations were conducted under two typical scenarios based on the actual operating speeds of the sprayer: (1) The effectiveness of the set speed cruise control during the sprayer's transition and transport was validated.The following typical scenario was simulated: the sprayer travels on a level road with an initial speed of 5 km/h and zero initial acceleration, maintaining a constant weight.To test the robustness of the control system, an external disturbance in the form of a slope change was introduced between 5 and 10 s, causing the body of the sprayer to pitch at a 10 • angle.The simulation results for speed and acceleration are illustrated in Figure 12a,b.
equal, as is the torque applied to the two front wheels, with the rear wheel torque exceeding that of the front wheels.(4) In Scenario 4, the torque distribution during the first 10 s is consistent with Scenario 1.After 10 s, when the sprayer ascends the slope with a 10° pitch angle and lateral tilt, the left rear wheel has the highest driving torque.
The simulation results indicate that the torque allocated by the torque distribution module corresponds to the actual force distribution on each wheel, enabling the sprayer to output more reasonable torque when driving on slopes, thereby ensuring stability and safety during operation.

Cruise Control Function Verification
Building upon the established longitudinal dynamics system model and control model, simulations were conducted for the cruise control of the sprayer, considering the actual operational requirements for spray coverage and driving safety.Typically, the sprayer operates at speeds of 3-8 km/h to maintain operational efficiency.Therefore, simulations were conducted under two typical scenarios based on the actual operating speeds of the sprayer: (1) The effectiveness of the set speed cruise control during the sprayer's transition and transport was validated.The following typical scenario was simulated: the sprayer travels on a level road with an initial speed of 5 km/h and zero initial acceleration, maintaining a constant weight.To test the robustness of the control system, an external disturbance in the form of a slope change was introduced between 5 and 10 s, causing the body of the sprayer to pitch at a 10° angle.The simulation results for speed and acceleration are illustrated in Figure 12a The simulation revealed that the system exhibits a short speed response time of less than 0.1 s, with a maximum steady-state error close to 0 and an overshoot of 1.6%.At 5 s, the system demonstrated sensitivity to slope changes, responding quickly to alterations in the body posture and returning to stability within 2 s.
(2) The cruise control performance during spraying operations was validated under the following typical scenario: the sprayer starts from rest in the field and periodically adjusts the set desired speed.Additionally, as the spraying operation progresses, the sprayer's weight gradually decreases.Starting from 15 s until the end of the simulation, a 10° pitch disturbance was introduced.The simulation results for speed and acceleration are shown in Figure 13a,b.The simulation revealed that the system exhibits a short speed response time of less than 0.1 s, with a maximum steady-state error close to 0 and an overshoot of 1.6%.At 5 s, the system demonstrated sensitivity to slope changes, responding quickly to alterations in the body posture and returning to stability within 2 s.
(2) The cruise control performance during spraying operations was validated under the following typical scenario: the sprayer starts from rest in the field and periodically adjusts the set desired speed.Additionally, as the spraying operation progresses, the sprayer's weight gradually decreases.Starting from 15 s until the end of the simulation, a 10 • pitch disturbance was introduced.The simulation results for speed and acceleration are shown in Figure 13a,b.The simulations indicated that even when facing continuous adjustments to the desired vehicle speed by the user, the cruise control system maintained excellent speed tracking performance.The system exhibited a response time of less than 0.2 s, minimal overshoot, and minimal steady-state errors.Furthermore, it demonstrated good robustness in the face of external disturbances such as changes in road slope.The simulations indicated that even when facing continuous adjustments to the desired vehicle speed by the user, the cruise control system maintained excellent speed tracking performance.The system exhibited a response time of less than 0.2 s, minimal overshoot, and minimal steady-state errors.Furthermore, it demonstrated good robustness in the face of external disturbances such as changes in road slope.

Analysis of Field Vehicle Test Results
Real vehicle tests were conducted based on the actual working conditions of the self-propelled sprayer, focusing on transition transportation and field operations.To comprehensively evaluate the effectiveness of the sprayer's cruise control function under different road conditions, the experimental plan included on-road testing on cement, asphalt, and compacted soil surfaces in the field.The cement surface was utilized to assess the machine's speed maintenance capability when encountering slopes during straightline horizontal travel, while the asphalt surface was used to evaluate the cruise control function during routine transition transportation.On the compacted soil surface in the field, the cruise control function during actual spraying operations was validated.The experimental conditions and grouping are presented in Table 3, and the experimental process is illustrated in Figure 14.The simulations indicated that even when facing continuous adjustments to the desired vehicle speed by the user, the cruise control system maintained excellent speed tracking performance.The system exhibited a response time of less than 0.2 s, minimal overshoot, and minimal steady-state errors.Furthermore, it demonstrated good robustness in the face of external disturbances such as changes in road slope.

Analysis of Field Vehicle Test Results
Real vehicle tests were conducted based on the actual working conditions of the selfpropelled sprayer, focusing on transition transportation and field operations.To comprehensively evaluate the effectiveness of the sprayer's cruise control function under different road conditions, the experimental plan included on-road testing on cement, asphalt, and compacted soil surfaces in the field.The cement surface was utilized to assess the machine's speed maintenance capability when encountering slopes during straight-line horizontal travel, while the asphalt surface was used to evaluate the cruise control function during routine transition transportation.On the compacted soil surface in the field, the cruise control function during actual spraying operations was validated.The experimental conditions and grouping are presented in Table 3, and the experimental process is illustrated in Figure 14.During the transition transportation process, the power lever on the remote controller was manipulated to initiate the sprayer's movement from a standstill.Once the vehicle reached the desired speed, the "Cruise Control" button was pressed.At this point, the

Transit Transportation Test Horizontal Straight-Line Acceleration
During the transition transportation process, the power lever on the remote controller was manipulated to initiate the sprayer's movement from a standstill.Once the vehicle reached the desired speed, the "Cruise Control" button was pressed.At this point, the control system utilized the current speed signal to regulate the output torque of the wheel motor, ensuring the vehicle maintained the set speed.
The current speed and acceleration of the sprayer were calculated using sensors and transmitted to the upper computer through the controller for storage.During data processing, a low-pass filtering method was employed to eliminate high-frequency interference stemming from the sensors themselves or the environment, while preserving the lowfrequency components related to the movement of the sprayer.The specific parameter variations are depicted in Figure 15.
Figure 15a,b depict the speed and speed variation of the sprayer from acceleration to activating the cruise control function.At time t 0 in the figures, the "Cruise Control" function is enabled, with the current set speed being 2 m/s.The total duration of cruise control is symbolized by ∆t.To accurately determine the fluctuation and stability between the actual and desired speeds, the start and end times of cruise control are identified as control system utilized the current speed signal to regulate the output torque of the wheel motor, ensuring the vehicle maintained the set speed.
The current speed and acceleration of the sprayer were calculated using sensors and transmitted to the upper computer through the controller for storage.During data processing, a low-pass filtering method was employed to eliminate high-frequency interference stemming from the sensors themselves or the environment, while preserving the low-frequency components related to the movement of the sprayer.The specific parameter variations are depicted in Figure 15. Figure 15a,b depict the speed and speed variation of the sprayer from acceleration to activating the cruise control function.At time t0 in the figures, the "Cruise Control" function is enabled, with the current set speed being 2 m/s.The total duration of cruise control is symbolized by Δt.To accurately determine the fluctuation and stability between the actual and desired speeds, the start and end times of cruise control are identified as 5 s and 10 s, respectively.By processing the velocity and acceleration data during the Δt period, Table 4 is obtained.Combining Figure 15 and Table 4 reveals that during the transition transportation and straight-line acceleration scenario, the sprayer maintains a stable driving state due to the good road conditions.The acceleration during the cruise control phase remains around 0 m/s 2 , with a root mean square value of 0.06 m/s 2 .As can be observed from Figure 15b, there is a decreasing trend in the acceleration values from time t0 to t1.This stable acceleration ensures a small deviation between the speed and the desired value, with a maximum deviation of 0.15 m/s and a maximum deviation rate of 7.5%.The root mean square (RMS) deviation from the expected value is 4.5%, indicating that the velocity of the sprayer gradually stabilizes upon activation of the "constant speed cruise control" feature.

Straight-Line Uphill Driving
To assess the control effectiveness of the cruise control function during uphill travel, the sprayer was maneuvered to a road section with a slope.Prior to ascending the slope, the sprayer was engaged in horizontal straight-line cruise control.The specific parameter variations throughout this entire process are illustrated in Figure 16.By analyzing the velocity, acceleration, and vehicle pitch angle data during this timeframe, Table 5 was  Combining Figure 15 and Table 4 reveals that during the transition transportation and straight-line acceleration scenario, the sprayer maintains a stable driving state due to the good road conditions.The acceleration during the cruise control phase remains around 0 m/s 2 , with a root mean square value of 0.06 m/s 2 .As can be observed from Figure 15b, there is a decreasing trend in the acceleration values from time t 0 to t 1 .This stable acceleration ensures a small deviation between the speed and the desired value, with a maximum deviation of 0.15 m/s and a maximum deviation rate of 7.5%.The root mean square (RMS) deviation from the expected value is 4.5%, indicating that the velocity of the sprayer gradually stabilizes upon activation of the "constant speed cruise control" feature.

Straight-Line Uphill Driving
To assess the control effectiveness of the cruise control function during uphill travel, the sprayer was maneuvered to a road section with a slope.Prior to ascending the slope, the sprayer was engaged in horizontal straight-line cruise control.The specific parameter variations throughout this entire process are illustrated in Figure 16.By analyzing the velocity, acceleration, and vehicle pitch angle data during this timeframe, Table 5 was generated.During the processing of the collected pitch angle data, the utilization of the Kalman filter effectively eliminates noise and drift in the attitude sensor.
In Table 5, "horizontal travel" and "slope travel" refer to stable phases, excluding the transition from horizontal to sloped roads.As shown in Figure 16c, the horizontal travel period for the sprayer spans 0-5 s, while the slope travel period ranges from 10 to 15 s.Upon examination of Figure 16 and Table 5, it is evident that the sprayer was in the constant speed phase for the initial 5 s, during which an expected velocity of 8 km/h (2.22 m/s) was set.Analysis of the data reveals that the root mean square (RMS) value is 2.24 m/s, with a deviation of 0.9% from the expected velocity.Furthermore, the RMS value of acceleration is 0.063 m/s 2 .The sprayer maintained nearly constant speed during this phase, demonstrating effective control under cruise control.In Table 5, "horizontal travel" and "slope travel" refer to stable phases, excluding the transition from horizontal to sloped roads.As shown in Figure 16c, the horizontal travel period for the sprayer spans 0-5 s, while the slope travel period ranges from 10 to 15 s.Upon examination of Figure 16 and Table 5, it is evident that the sprayer was in the constant speed phase for the initial 5 s, during which an expected velocity of 8 km/h (2.22 m/s) was set.Analysis of the data reveals that the root mean square (RMS) value is 2.24 m/s, with a deviation of 0.9% from the expected velocity.Furthermore, the RMS value of acceleration is 0.063 m/s 2 .The sprayer maintained nearly constant speed during this phase, demonstrating effective control under cruise control.
At 5 s, the sprayer transitioned from horizontal to uphill travel.Under the influence of the gravitational component and frictional forces, the sprayer's velocity decreased rapidly.During the time period of 5-6 s, the sprayer was in a transition phase from horizontal to inclined terrain navigation.Due to the swift change in the pitch angle of the sprayer's body, the controller did not immediately adjust the speed.After 6 s, the sprayer reached a stable state of traversal on the inclined surface.Approximately 1.5 s later, the controller initiated a response to adjust the vehicle speed, and within 2.5 s, the speed was swiftly restored to the desired value.Concurrently, the pitch angle of the sprayer's body reflected the slope gradient, with Table 5 indicating a slope of approximately 8.42° during inclined operation.The root mean square (RMS) value of the velocity was 2.28 m/s, with a deviation of 2.7% from the desired value.These data demonstrate that even during inclined traversal, the constant speed cruise control function can essentially maintain the vehicle speed within the desired range.The system's overall response time was 1.5 s, with an adjustment duration of 2.5 s, indicating a control effect that is relatively accurate.

Fieldwork Trials
During field operations, considering the impact of the swaying motion of the spray boom on the quality of pesticide application, both the vehicle speed and acceleration were maintained at low values to mitigate this issue.After driving the sprayer onto the field  At 5 s, the sprayer transitioned from horizontal to uphill travel.Under the influence of the gravitational component and frictional forces, the sprayer's velocity decreased rapidly.During the time period of 5-6 s, the sprayer was in a transition phase from horizontal to inclined terrain navigation.Due to the swift change in the pitch angle of the sprayer's body, the controller did not immediately adjust the speed.After 6 s, the sprayer reached a stable state of traversal on the inclined surface.Approximately 1.5 s later, the controller initiated a response to adjust the vehicle speed, and within 2.5 s, the speed was swiftly restored to the desired value.Concurrently, the pitch angle of the sprayer's body reflected the slope gradient, with Table 5 indicating a slope of approximately 8.42 • during inclined operation.The root mean square (RMS) value of the velocity was 2.28 m/s, with a deviation of 2.7% from the desired value.These data demonstrate that even during inclined traversal, the constant speed cruise control function can essentially maintain the vehicle speed within the desired range.The system's overall response time was 1.5 s, with an adjustment duration of 2.5 s, indicating a control effect that is relatively accurate.

Fieldwork Trials
During field operations, considering the impact of the swaying motion of the spray boom on the quality of pesticide application, both the vehicle speed and acceleration were maintained at low values to mitigate this issue.After driving the sprayer onto the field road and deploying the spray boom, the operator used a remote controller to initiate forward movement for spraying operations starting from a standstill.Upon reaching the desired operational speed, the "Cruise Control" button was pressed, allowing the control system to adjust the wheel motor torque based on the current speed signal to maintain the set speed.Additionally, to visually represent the impact of field roads on the vehicle, the pitch angle of the vehicle was monitored to indicate the roughness of the terrain.Initially, the pitch angle during flat ground travel was measured, and after obtaining and filtering pitch angle data during field travel, the specific parameter variations were presented in Figure 17.
system to adjust the wheel motor torque based on the current speed signal to maintain the set speed.Additionally, to visually represent the impact of field roads on the vehicle, the pitch angle of the vehicle was monitored to indicate the roughness of the terrain.Initially, the pitch angle during flat ground travel was measured, and after obtaining and filtering pitch angle data during field travel, the specific parameter variations were presented in Figure 17. Figure 17a,b illustrate the speed and speed variation of the sprayer from acceleration to activating the cruise control function.At time t0 in the figures, the "Cruise Control" function was engaged, with the desired speed set at 5 km/h, and the total duration of cruise control is symbolized by Δt.From Figure 17b, it is evident that to ensure stability during spraying, the maximum controlled acceleration is kept below 0.65 m/s 2 .Figure 17c shows significant variations in the pitch angle of the vehicle while traveling on field roads, with a maximum value approaching 10°, indicating random and substantial road disturbances.In the initial acceleration phase, the pitch angle rapidly increases due to the high instantaneous acceleration, reflecting the actual conditions of the sprayer.Summarizing the data collected during the cruise control phase yields Table 6.Overall, the combination of Figure 17 and Table 6 demonstrates that despite random road disturbances, the sprayer effectively maintains speed.The root mean square velocity is 1.35 m/s, with a deviation rate from the desired speed of 2.8%.The maximum deviation observed was merely 0.1 m/s, with the highest deviation rate being 7.2%.This indicates that the sprayer maintains good cruise control even during field spraying operations.The lower speed and the decrease in the center of gravity due to the lowering of the spray boom during spraying contribute to the enhanced stability of the vehicle under similar conditions.

Discussion
Due to changes in road gradient and variations in equipment weight during spraying, the stability of the sprayer is compromised.This study focuses on addressing the speed stability issues encountered by the 4WID high ground clearance self-propelled Figure 17a,b illustrate the speed and speed variation of the sprayer from acceleration to activating the cruise control function.At time t 0 in the figures, the "Cruise Control" function was engaged, with the desired speed set at 5 km/h, and the total duration of cruise control is symbolized by ∆t.From Figure 17b, it is evident that to ensure stability during spraying, the maximum controlled acceleration is kept below 0.65 m/s 2 .Figure 17c shows significant variations in the pitch angle of the vehicle while traveling on field roads, with a maximum value approaching 10 • , indicating random and substantial road disturbances.In the initial acceleration phase, the pitch angle rapidly increases due to the high instantaneous acceleration, reflecting the actual conditions of the sprayer.Summarizing the data collected during the cruise control phase yields Table 6.Overall, the combination of Figure 17 and Table 6 demonstrates that despite random road disturbances, the sprayer effectively maintains speed.The root mean square velocity is 1.35 m/s, with a deviation rate from the desired speed of 2.8%.The maximum deviation observed was merely 0.1 m/s, with the highest deviation rate being 7.2%.This indicates that the sprayer maintains good cruise control even during field spraying operations.The lower speed and the decrease in the center of gravity due to the lowering of the spray boom during spraying contribute to the enhanced stability of the vehicle under similar conditions.

Discussion
Due to changes in road gradient and variations in equipment weight during spraying, the stability of the sprayer is compromised.This study focuses on addressing the speed stability issues encountered by the 4WID high ground clearance self-propelled electric sprayer during driving and spraying operations.The approach involves the analysis of the sprayer's structure and longitudinal dynamic characteristics, utilizing a hierarchical control structure that combines upper-layer PID and lower-layer fuzzy PID algorithms to manage the entire system.The research encompasses the development of a dynamic model considering driving resistance, slope, and vehicle roll angle effects on the distribution of the four-wheel load, along with field tests to validate the model and control theory.
Key findings of this study include the following: (1) Establishment of a dynamic model for slope driving conditions based on an analysis of the sprayer's longitudinal dynamic characteristics.
(2) Implementation of simulation experiments under external disturbances and variations in vehicle weight using a hierarchical control structure with upper-layer PID and lower-layer fuzzy PID control.Results indicate rapid speed adjustment response times of less than 0.1 s, with an overshoot of only 1.6%.The control system demonstrates effective speed tracking capabilities across various simulated scenarios.(3) Evaluation of the stability of the sprayer's cruise control function through on-road tests using a sensor-equipped test platform.Results show minimal speed deviation and effective maintenance of stable speed during straight-line acceleration and uphill driving scenarios.
During the research process, it was assumed that the sprayer wheels do not slip, and the speed of each wheel can be calculated from the vehicle speed.The internal speed of the hub motor can be determined from the reduction ratio of the hub motor.Consequently, in real vehicle experiments, when the vehicle speed needs to be altered, the controller adjusts the magnitude of the analog voltage signal input to the hub motor driver.The driver then increases or decreases the current input to the hub motor, ultimately controlling the motor speed to achieve the desired speed.
Additionally, due to the nonlinear nature of the overall dynamic system, a hierarchical control approach was adopted in the controller design process, utilizing linear PID and nonlinear fuzzy PID.The design of the fuzzy PID controller addressed the limitations of traditional PID controllers in nonlinear systems.By incorporating fuzzy logic, the fuzzy PID controller can flexibly adjust its control strategy when facing nonlinear responses, thus better adapting to changes in system dynamic behavior.The combination of these two controllers resolved stability issues that might arise from directly applying traditional PID control in nonlinear systems, enhancing the overall adaptability and robustness of the control system.
Based on the above analysis, to make the model more realistic and improve control stability, future research will focus on the following aspects: (1) Considering the slip of each wheel during sprayer operation, incorporating slip rate control to enhance the precision of torque control.(2) Building upon the existing research, introducing advanced control techniques such as adaptive control, sliding mode control, or other more complex nonlinear control methods to more accurately capture the system's nonlinear characteristics, thereby designing more efficient and reliable control strategies.

Conclusions
(1) Based on the analysis of the longitudinal dynamic characteristics of a self-propelled electric sprayer on sloped terrain, a simplified model of the sprayer's dynamic system was established by combining relevant vehicle data under the assumption of simplification.(2) Simulation experiments were conducted using a hierarchical control structure based on upper-level PID control and lower-level fuzzy PID control, considering external disturbances and variations in vehicle weight.The results showed that the system had a very short response time for speed adjustment, less than 0.1 s, with an overshoot of only 1.6%.In the simulation experiments involving simultaneous variations in vehicle weight and slope, the control system exhibited a response time of less than 0.2 s, with minimal overshoot and steady-state errors.These three sets of simulation experiments verified the rationality of the torque distribution algorithm and the effectiveness of the cruise control algorithm in tracking the vehicle speed.(3) An experimental platform for the entire vehicle chassis was built on the actual vehicle to evaluate the stability of the cruise control function of the sprayer by collecting acceleration and velocity data using sensors.During the horizontal straight-line acceleration phase in transportation transition, the measured maximum deviation in speed was 0.15 m/s, with a maximum deviation rate of 7.5%.The acceleration remained close to zero during the cruise control phase, with a root mean square value of 0.06.During the straight-line uphill travel phase in transportation transition, the

Figure 1 .
Figure 1.Equipment for real vehicle test: (a) attitude sensor; (b) IMC T3654 controller; (c) remote controller.The selected IMC T3654 controller is based on a 32-bit Tricore platform, known for its fast response speed and high efficiency.It offers an open programming environment and a rich set of mature application modules.The control algorithm developed earlier can be converted into program code using Codesys and then burned into the controller (the version of the programming tool is Codesys v3.5 sp4).The IMC T3654 controller is housed in the control box at the front of the sprayer.To measure the acceleration at the center of gravity, a JY61P six-axis attitude sensor is fixed to the support beam below the tank.By integrating the acceleration data, the current driving speed can be determined.Additionally, the sensor provides the vehicle's pitch angle, allowing for the calculation of the current slope gradient.The final setup of the experimental vehicle platform is illustrated in Figure2.

Figure 1 .
Figure 1.Equipment for real vehicle test: (a) attitude sensor; (b) IMC T3654 controller; (c) remote controller.The selected IMC T3654 controller is based on a 32-bit Tricore platform, known for its fast response speed and high efficiency.It offers an open programming environment and a rich set of mature application modules.The control algorithm developed earlier can be converted into program code using Codesys and then burned into the controller (the version of the programming tool is Codesys v3.5 sp4).The IMC T3654 controller is housed in the control box at the front of the sprayer.To measure the acceleration at the center of gravity, a JY61P six-axis attitude sensor is fixed to the support beam below the tank.By integrating the acceleration data, the current driving speed can be determined.Additionally, the sensor provides the vehicle's pitch angle, allowing for the calculation of the current slope gradient.The final setup of the experimental vehicle platform is illustrated in Figure2.

Figure 3 .
Figure 3. Force diagram of the sprayer in a spatial coordinate system.M-total weight of sprayer, kg; L-sprayer wheelbase, m; la-center of mass to front axle distance, m; lb-center of mass to rear axis distance, m; B-wheel pitch, m; h-height of center of mass, m; V-current traveling speed, m/s 2 ; Fw-air resistance, N; Fa-acceleration resistance, N; Fp-ramp resistance, N; Ttqij-optimum demand torque for each wheel, N•m; Ftij-driving force of each wheel individually, N; FNij-normal ground support for each wheel, N; Ffij-rolling resistance of each wheel, N; (i = f,r; j = l,r).

Figure 3 .
Figure 3. Force diagram of the sprayer in a spatial coordinate system.M-total weight of sprayer, kg; L-sprayer wheelbase, m; l a -center of mass to front axle distance, m; l b -center of mass to rear axis distance, m; B-wheel pitch, m; h-height of center of mass, m; V-current traveling speed, m/s 2 ; F w -air resistance, N; F a -acceleration resistance, N; F p -ramp resistance, N; T tqij -optimum demand torque for each wheel, N•m; F tij -driving force of each wheel individually, N; F Nij -normal ground support for each wheel, N; F fij -rolling resistance of each wheel, N; (i = f,r; j = l,r).
Figure 3. Force diagram of the sprayer in a spatial coordinate system.M-total weight of sprayer, kg; L-sprayer wheelbase, m; la-center of mass to front axle distance, m; lb-center of mass to rear axis distance, m; B-wheel pitch, m; h-height of center of mass, m; V-current traveling speed, m/s 2 ; Fw-air resistance, N; Fa-acceleration resistance, N; Fp-ramp resistance, N; Ttqij-optimum demand torque for each wheel, N•m; Ftij-driving force of each wheel individually, N; FNij-normal ground support for each wheel, N; Ffij-rolling resistance of each wheel, N; (i = f,r; j = l,r).

Figure 4 .
Figure 4. Longitudinal dynamics simulation system of the sprayer.a des -desired model acceleration;T des -desired total driving or braking torque; T 1des , T 2des , T 3des , T 4des -desired torques for each wheel; T 1 , T 2 , T 3 , T 4 -actual output torques for each wheel; v f -actual speed; a f -actual acceleration.

Figure 5 .
Figure 5. Schematic representation of the forces on the sprayer from two viewpoints: (a) two-wheel model of the sprayer from a pitch angle view; (b) two-wheel model of the sprayer from a pitch angle view.

Figure 5 .
Figure 5. Schematic representation of the forces on the sprayer from two viewpoints: (a) two-wheel model of the sprayer from a pitch angle view; (b) two-wheel model of the sprayer from a pitch angle view.
re 2024, 14, x FOR PEER REVIEW 8 of 23

Figure 7 .
Figure 7. Sprayer chassis dynamics modeling: (a) schematic diagram of vehicle 7-DOF model; (b) wheel dynamics model.v wx_ij -longitudinal speed of wheel center; ω wij -angular velocity of wheel rotation; F fij -longitudinal force on wheels; F Nij -ground support.2.4.Design of Constant Speed Cruise Control Method Based on Fuzzy PID 2.4.1.General Architecture of Cruise Control System for Self-Propelled SprayersThe designed cruise control system in this study adopts a hierarchical control framework, consisting primarily of an upper-level controller and a lower-level controller.The upper-level controller is responsible for computing and determining the desired acceleration of the sprayer, while the lower-level controller, based on directives from the upper-level controller and actual acceleration values of the sprayer, outputs real control values to the dynamic model.The overall vehicle inverse longitudinal dynamics model and torque distribution model dynamically calculate the driving motor output torque in real time based on signals provided by the lower-level controller to ensure that the seven−degrees−of−freedom model tracks the desired acceleration, ultimately maintaining a constant speed.The schematic overview of the spray machine's cruise control system is depicted in Figure8, based on the outlined analysis.The figure illustrates the control models of the upper and lower controllers in Simulink.Additionally, the closed-loop feedback control signals between the controllers and the spray machine's dynamic model are represented by the numbers 1−4 in the figure.

Figure 8 .
Figure 8. Overall scheme of the cruise control system for the sprayer.

Figure 8 .
Figure 8. Overall scheme of the cruise control system for the sprayer.

Figure 9 .
Figure 9. Corresponding characteristic curves of input and output variables: (a) the input variable corresponds to the characteristic surface of Kp; (b) the input variable corresponds to the characteristic surface of Ki; (c) the input variable corresponds to the characteristic surface of Kd.

Figure 10 .
Figure 10.Overall model of cruise control at constant speed.

Figure 9 .
Figure 9. Corresponding characteristic curves of input and output variables: (a) the input variable corresponds to the characteristic surface of K p ; (b) the input variable corresponds to the characteristic surface of K i ; (c) the input variable corresponds to the characteristic surface of K d. .

Figure 9 .
Figure 9. Corresponding characteristic curves of input and output variables: (a) the input variable corresponds to the characteristic surface of Kp; (b) the input variable corresponds to the characteristic surface of Ki; (c) the input variable corresponds to the characteristic surface of Kd.

Figure 10 .
Figure 10.Overall model of cruise control at constant speed.

Figure 10 .
Figure 10.Overall model of cruise control at constant speed.

Figure 12 .
Figure 12.Parameters of cruise control simulation under working conditions: (a) speed tracking curve; (b) acceleration output curve.

Figure 12 .
Figure 12.Parameters of cruise control simulation under working conditions: (a) speed tracking curve; (b) acceleration output curve.

Figure 13 .
Figure 13.Parameters of cruise control simulation under working condition II: (a) speed tracking curve; (b) acceleration output curve.

Figure 13 .
Figure 13.Parameters of cruise control simulation under working condition II: (a) speed tracking curve; (b) acceleration output curve.

Figure 13 .
Figure 13.Parameters of cruise control simulation under working condition II: (a) speed tracking curve; (b) acceleration output curve.

Figure 15 .
Figure 15.The actual parameters of the sprayer under the transfer transportation-linear acceleration: (a) velocity variation; (b) acceleration change.

Figure 15 .
Figure 15.The actual parameters of the sprayer under the transfer transportation-linear acceleration: (a) velocity variation; (b) acceleration change.

Figure 16 .
Figure 16.Transfer field transportation-actual parameters of straight uphill driving sprayer: (a) velocity variation; (b) acceleration change; (c) body pitch angle changes.

Figure 16 .
Figure 16.Transfer field transportation-actual parameters of straight uphill driving sprayer: (a) velocity variation; (b) acceleration change; (c) body pitch angle changes.

Figure 17 .
Figure 17.Field operation-actual parameters of sprayer under linear acceleration: (a) velocity variation; (b) acceleration change; (c) body pitch angle changes.

Figure 17 .
Figure 17.Field operation-actual parameters of sprayer under linear acceleration: (a) velocity variation; (b) acceleration change; (c) body pitch angle changes.

Table 1 .
Overall technical design parameters of sprayer chassis.

Table 2 .
Adjustment table for control rules of parameters K p , K i , and K d .

Table 3 .
Test grouping and condition setting.
Accelerate in a straight line to a constant speed

Table 3 .
Test grouping and condition setting.

Table 4 .
The results of parameter processing under transfer transportation-linear acceleration.

Table 4 .
The results of parameter processing under transfer transportation-linear acceleration.

Table 5 .
The parameter processing results of transfer transportation-straight uphill driving.

Table 5 .
The parameter processing results of transfer transportation-straight uphill driving.

Table 6 .
Field operation-parameter processing results under linear acceleration.

Table 6 .
Field operation-parameter processing results under linear acceleration.