Optimizing the Control of the Hydraulic Driving System for the Power Shift Gearbox of a Cotton Picker Based on Dual Working Conditions

: In response to the issues of slow dynamic response, uneven shifting, and strong jolting during the starting and shifting operations of the cotton picker, we established a model for automatic power shifting control. We proposed optimization strategies using the Statechart logic control method and BP neural network control method. Different control effects were analyzed concerning pressure, ﬂow rate, motor speed, vehicle speed, impact degree, and slip-grinding work. The results showed that the Statechart logic control method increased the response time of the ﬂow rate by 46.67% during the starting process, with a good linear characteristic during the variation. It reduced the impact during starting and shifting by 38.57% and 67%, and the sliding friction power during starting and shifting by 51.95% and 33.33% respectively. The BP neural network control method reduced the pressure overshoot during starting and shifting by 25% and 30.77%, respectively, demonstrating better robustness. The pump, motor speed, and vehicle speed showed smooth growth after starting and shifting, with faster vehicle speed response during the starting process. Additionally, the vehicle speed overshoot during shifting signiﬁcantly decreased, ensuring overall performance that meets the operational requirements of the cotton picker. This ﬁnding holds practical signiﬁcance for the advancement of control strategy optimization and the development of the control system for the powershift gearbox in cotton pickers.


Introduction
A cotton picker is large agricultural equipment for cotton harvesting, and its performance is directly related to the efficiency of cotton harvesting, and the power shift gearbox is the core component of the cotton picker transmission system; its performance directly affects the operating effect of the machine. Power shift gearboxes are most widely used in large tractors [1,2], but the power flow generated during the power shift of the current domestic cotton picker gearboxes interrupts the power [3][4][5], and the shift impact is enormous, which dramatically reduces the driving experience, and the research related to power shift gearboxes for cotton pickers is relatively minimal, so the research on the power shift process of cotton pickers is still essential.
In recent years, major universities and research institutions have researched powershift transmissions, of which some have conducted much work on the theoretical basis of power transmission. Kugi A et al. have developed and simulated a hydrostatic transmission model based on a variable pump through a mathematical model [6]. By analyzing the shifting process of automatic transmission with multiple clutches, Zhang Y et al. pointed out that the shifting process is a dual system consisting of discrete and continuous systems and proposed a hybrid modeling method of constant and finite element state-based discrete systems based on bonding graph theory [7]. Deng X et al. designed a parallel hybrid power transmission system based on the tractor operating characteristics, transmission characteristics requirements, and hybrid power system transmission principles [8]. Yang S et al. established a kinematic model of the wet clutch's bonding process and verified the model's correctness through experiments [9]. Wang D designed the corresponding transmission scheme based on YTO's processing capability, determined the shift control principle of single/double clutch, and developed a load clutch and load clutch reversing unit with a reasonable structure and simple process [10]. Zhang M et al. developed a model of the hydraulic transmission system of the tractor and performed simulations [11]. Zhao D et al. modeled and analyzed the engine, oil pump, torque converter, and automatic transmission of the engineering vehicle to derive the kinematic equations of the transmission system and used buffer control and timing control to improve the shift quality [12].
In recent years, some scholars have also focused on the evaluation index of power shifting, and efforts to improve the shifting quality have received increasing attention. Xu L et al. pointed out that when a dual-clutch gearbox is shifted under field load, the two indexes of the torque transfer coefficient and transmission output torque were proposed because the original shifting indexes could not adequately cover its performance [13]. Chen N et al. analyzed the influencing factors of shift quality, proposed a control method to improve shift quality, and conducted experimental verification [14]. Zou H et al. pointed out the shift index, including shock degree, slip-wear work, and shift time, and simulated the shock degree using MATLAB/Simulink [15]. Lu Z et al. investigated the effect of temperature on pressure transfer characteristics and proposed a wet dual-clutch pressure control method to explore the factors of wet dual-clutch impact degree and wear [16]. Lu L et al. studied the effect of different pressure control strategies on shift quality by taking the shift overlap time and engagement pressure of powershift transmissions as research points [17]. Zhao D et al. used the variable structure fuzzy control method to control the high-speed switching valve to improve the shift quality. Through the simulation with and without an accumulator, the control parameters of different stages of oil pressure were set during the shifting process, which could achieve the purpose of shortening the shift time and improving the shift quality [18].
Some domestic universities have conducted partial research on issues related to the control strategy of power shifting. Yu F et al. On the basis of establishing a system dynamics model for the gearshift process of wet dual clutch automatic transmission (DCT), a multi-rule factorial fuzzy controller is designed and a control strategy for the gearshift process of wet dual clutch is formulated, taking into account the characteristics of the wet dual clutch system such as high nonlinearity and difficulty in establishing an accurate mathematical model [19]. Liu Z et al. established a system dynamics model of the wet dual-clutch transmission (DCT) shifting process, designed a multi-rule fuzzy controller, and developed a shifting strategy for the highly nonlinear characteristics of the wet dual-clutch system [20]. Gao A et al. used fuzzy control techniques [21], and Sakaguchi S, Yamaguchi H, and Ang K.H used fuzzy shift logic and PID control techniques [22][23][24] to modify the parametric control shift law of automatic transmissions. Fu S et al. carried out a study on clutch cylinder pressure following control and proposed a friendly format dynamic linearized clutch pressure model-free adaptive predictive control method [25]. By constructing a powershift transmission model, Xi Z et al. studied the dynamic characteristics analysis method of the powershift transmission shifting process, clutch load, slip-wear work, and power characteristics under different shift overlap times [26]. Wang Y et al. established the AMESim model of the electro-hydraulic control system of power shift transmission after researching the control system of power shift transmission, meanwhile, they designed a dual CAN bus communication network, which improved the anti-interference ability of the optoelectronic isolation circuit and the information transmission ability of Processes 2023, 11,2662 3 of 21 the system [27]. Bao M et al., in order to improve the efficiency of the variable pumpcontrolled quantitative motor system, established a fuzzy control model and a dynamics model using MATLAB/Simulink and ITI Simulation X, and a joint simulation was carried out with these two software programs, and a comparative analysis of the output speed of the quantitative motor and the displacement ratio of the bi-directional variable pumps were carried out by using the control methods of the adaptive fuzzy PID control and the ordinary PID control [28]. Zhao X et al. used a constant speed cooperative control method based on the picking subsystem of the cotton picker with a single pump controlling dual motors, and the traveling subsystem with variable pump controlled motors was proposed. And, taking the constant output speed of the picking speed and traveling speed as the control objective, the synchronized control of picking and traveling of the cotton picker was verified by comparing the direct control, PID control, and double feed-forward fuzzy PID cooperative control [29]. Cai Z et al. proposed a multi-clutch binding strategy with staged control to ensure uninterrupted power and smooth shifting during the shifting process of a powershift transmission. Through the kinetic analysis of the clutch binding and disengagement process, dynamic simulation analysis and strategy validation of the transmission shifting process were carried out [30]. Du C et al. pointed out that the clutch engagement process of P2 type single-shaft parallel hybrid vehicle indicates that the clutch should be engaged as soon as possible and with as little impact as possible during the engagement stage. The dynamics of the clutch engagement phase of the shift clutch in different driving modes was analyzed, and a clutch engagement control strategy based on model predictive control was designed, a joint Amesim-Simulink simulation model was constructed, and the effect of the model predictive control was compared with that of the fuzzy PID control [31]. Ye H et al. designed a Z-N frequency response PID control, GA-based PID parameter self-tuning control strategy, and State machine with Statechart module control method of comparative analysis, resulting in the BP algorithm-based PID parameter self-tuning control method under the amount of no overshoot [32]. Pan W et al. carried out Statechart and particle swarm algorithm control optimization on the basis of the hydraulic control model of cotton picker machinery, and it was finally concluded that the particle swarm algorithm optimization has a better effect on the pressure and rotational speed control [33].
However, most of these research studies are simulated and optimized for a single shifting process, and only some study and analyze the process of starting and shifting simultaneously. Few of them are targeted to optimize different control strategies for different processes. In this paper, a power shift automatic control model is established for the new power shift transmission scheme, and the Statechart logic control method and BP neural network control method are used to optimize different processes in a targeted manner. By analyzing the system pressure, torque, flow rate, and speed for two operating conditions, starting and shifting, and using the shock degree and slippage work as evaluation methods, the effectiveness of the optimized strategy results is verified through tests on input/output speed, torque, and system pressure. The simulation results are verified. This provides some practical significance for the further optimization of the control strategy and the development of the control system for the power shift gearbox of cotton pickers.

Powershift Gearbox Working Principle
The powershift transmission consists of a power mechanical structure as the actuator, a pump and motor as the power input and control part, and a valve circuit as the hydraulic control part, and the shifting process is accomplished by these parts together.  The mechanical structure of the transmission mainly consists of an  input shaft, duplex gear, planetary frame, spline bushing, planetary gear, gear ring, bevel  gear, and half shaft, and the hydraulic mechanism mainly consists of a wet clutch, wet  brake, pump, motor, and valve Figure 1 shows the schematic diagram of the power transmission route of the powershift gearbox. The engine's power is input to the transmission through the variable pump and variable motor. The mechanical structure of the transmission mainly consists of an input shaft, duplex gear, planetary frame, spline bushing, planetary gear, gear ring, bevel gear, and half shaft, and the hydraulic mechanism mainly consists of a wet clutch, wet brake, pump, motor, and valve circuit.  As shown in Figure 2a, the power transmission route of the low-speed gear, when the hydraulic oil pushes the brake piston to make the friction plate combine, it makes the planetary frame brake, and the power is output in the way of the fixed shaft gear transmission. Figure 2b is the high-speed gear power transmission route. When the hydraulic oil pushes the clutch piston to create the friction plate combine, the power is input from the input shaft and the spline bushing; at this time, the whole planetary system is linked with the double linkage gear as a whole, and the power is transmitted backward directly from the input shaft to the double linkage gear.  Table 1 is the cotton picker parameters performance table; cotton pickers usually have field picking, field transport, and road transport as three working conditions, so the technical parameters of the transmission system should meet the three working conditions simultaneously.  As shown in Figure 2a, the power transmission route of the low-speed gear, when the hydraulic oil pushes the brake piston to make the friction plate combine, it makes the planetary frame brake, and the power is output in the way of the fixed shaft gear transmission. Figure 2b is the high-speed gear power transmission route. When the hydraulic oil pushes the clutch piston to create the friction plate combine, the power is input from the input shaft and the spline bushing; at this time, the whole planetary system is linked with the double linkage gear as a whole, and the power is transmitted backward directly from the input shaft to the double linkage gear.  Figure 1 shows the schematic diagram of the power transmission route of the powershift gearbox. The engine's power is input to the transmission through the variable pump and variable motor. The mechanical structure of the transmission mainly consists of an input shaft, duplex gear, planetary frame, spline bushing, planetary gear, gear ring, bevel gear, and half shaft, and the hydraulic mechanism mainly consists of a wet clutch, wet brake, pump, motor, and valve circuit.  As shown in Figure 2a, the power transmission route of the low-speed gear, when the hydraulic oil pushes the brake piston to make the friction plate combine, it makes the planetary frame brake, and the power is output in the way of the fixed shaft gear transmission. Figure 2b is the high-speed gear power transmission route. When the hydraulic oil pushes the clutch piston to create the friction plate combine, the power is input from the input shaft and the spline bushing; at this time, the whole planetary system is linked with the double linkage gear as a whole, and the power is transmitted backward directly from the input shaft to the double linkage gear.  Table 1 is the cotton picker parameters performance table; cotton pickers usually have field picking, field transport, and road transport as three working conditions, so the technical parameters of the transmission system should meet the three working conditions simultaneously.  Table 1 is the cotton picker parameters performance table; cotton pickers usually have field picking, field transport, and road transport as three working conditions, so the technical parameters of the transmission system should meet the three working conditions simultaneously.  The hydraulic directional valve is a typical combination of mechanical, electrical, and hydraulic systems with strong nonlinearity. The hydraulic schematic diagram for controlling the wet clutch and wet brake is shown in Figure 3, which is mainly composed of two groups of hydraulic directional solenoid valves and hydraulic piston cylinders. Fixed quantity pumps 1 are constant pressure control units. When the solenoid valves in 2 and 3 are not energized both on the left side, there is no signal input to the wet clutch and wet brake, and the powershift transmission is at idle. When the two valves in 2 are energized, the electromagnetic force of the solenoid valve drives the spool to the right side, and when the two valves in 3 are not energized and located on the left side, the oil pushes the hydraulic cylinder 4 to the left side, and the wet brake is in a combined state, at which time the powershift transmission is in a low to medium-speed state. When the two valves in 3 are energized, the electromagnetic force of the solenoid valve drives the spool to the right, and the two valves in 2 pass the reverse potential, so that when the spool is on the left, the oil pushes the hydraulic cylinder 5 to the left. The wet clutch is in the combined state, at which time the power shift gearbox is in the high-speed state.  The hydraulic directional valve is a typical combination of mechanical, electrical, and hydraulic systems with strong nonlinearity. The hydraulic schematic diagram for controlling the wet clutch and wet brake is shown in Figure 3, which is mainly composed of two groups of hydraulic directional solenoid valves and hydraulic piston cylinders. Fixed quantity pumps 1 are constant pressure control units. When the solenoid valves in 2 and 3 are not energized both on the left side, there is no signal input to the wet clutch and wet brake, and the powershift transmission is at idle. When the two valves in 2 are energized, the electromagnetic force of the solenoid valve drives the spool to the right side, and when the two valves in 3 are not energized and located on the left side, the oil pushes the hydraulic cylinder 4 to the left side, and the wet brake is in a combined state, at which time the powershift transmission is in a low to medium-speed state. When the two valves in 3 are energized, the electromagnetic force of the solenoid valve drives the spool to the right, and the two valves in 2 pass the reverse potential, so that when the spool is on the left, the oil pushes the hydraulic cylinder 5 to the left. The wet clutch is in the combined state, at which time the power shift gearbox is in the high-speed state.

Pump and Motor Operating Principle
As shown in Figure 4, the power source of the cotton picker driving closed circuit system is mainly composed of the variable pump and variable motor. The displacement size of the variable pump is adjusted by a three-way solenoid valve to control the displacement of the double-piston rod hydraulic cylinder, the power source of the double-piston rod hydraulic cylinder action is provided by the quantitative pump, and the unloading valve ensures that the auxiliary pressure does not exceed 25 bar. The speed and torque

Pump and Motor Operating Principle
As shown in Figure 4, the power source of the cotton picker driving closed circuit system is mainly composed of the variable pump and variable motor. The displacement size of the variable pump is adjusted by a three-way solenoid valve to control the displacement of the double-piston rod hydraulic cylinder, the power source of the double-piston rod hydraulic cylinder action is provided by the quantitative pump, and the unloading valve ensures that the auxiliary pressure does not exceed 25 bar. The speed and torque size of the variable motor is regulated by a two-way three-way solenoid valve controlling the movement of the single-piston rod hydraulic cylinder, and the pressure control valve is size of the variable motor is regulated by a two-way three-way solenoid valve controlling the movement of the single-piston rod hydraulic cylinder, and the pressure control valve is used to ensure that the pressure in the main oil circuit does not exceed 450 bar for the purpose of protecting the system.

Shift Characteristics Evaluation Index
To evaluate the effect of the shift strategy on the shift quality, the change in transmission output characteristics caused by the shifting process is referred to as the shift characteristics. The shifting process is evaluated and analyzed by the following indicators.

Impact Degree
Impact degree is an important index to evaluate the smoothness of shifting. The friction plate and the piston cylinder are in rigid contact with each other, so there are two kinds of impact degrees in the driving process of the cotton picker: the starting impact degree exists when the brake needs to be combined when starting, and the shift impact degree exists when the brake needs to be separated and the clutch combined when shifting. In addition, the power cycling caused by too long a shift time should be avoided as much as possible. The formula for calculating the impact degree is as follows: where T is the output torque of the gearbox, N·m; v is the vehicle speed, km/h; 0 I is the rotational inertia of the driven part, kg·m 2 ; g i is the transmission ratio of the gearbox; n i is the ratio of the wheel side reducer.

Slip-Grinding Work
Slip-grinding work is an essential indicator of the thermal stability of the brakes/clutch friction plate, which is pushed by the piston cylinder to achieve compression and gradually transmit torque. Start brakes and shift clutch from the beginning of the combination are thoroughly combined. The friction plate is slip-grinding, and slip-

Shift Characteristics Evaluation Index
To evaluate the effect of the shift strategy on the shift quality, the change in transmission output characteristics caused by the shifting process is referred to as the shift characteristics. The shifting process is evaluated and analyzed by the following indicators.

Impact Degree
Impact degree is an important index to evaluate the smoothness of shifting. The friction plate and the piston cylinder are in rigid contact with each other, so there are two kinds of impact degrees in the driving process of the cotton picker: the starting impact degree exists when the brake needs to be combined when starting, and the shift impact degree exists when the brake needs to be separated and the clutch combined when shifting. In addition, the power cycling caused by too long a shift time should be avoided as much as possible. The formula for calculating the impact degree is as follows: where T is the output torque of the gearbox, N·m; v is the vehicle speed, km/h; I 0 is the rotational inertia of the driven part, kg·m 2 ; i g is the transmission ratio of the gearbox; i n is the ratio of the wheel side reducer.

Slip-Grinding Work
Slip-grinding work is an essential indicator of the thermal stability of the brakes/clutch friction plate, which is pushed by the piston cylinder to achieve compression and gradually transmit torque. Start brakes and shift clutch from the beginning of the combination are thoroughly combined. The friction plate is slip-grinding, and slip-grinding heat is generated during the slip-grinding work. The longer the slip-grinding time, the more heat generated and the more power loss, which will have a very negative impact on the life of the friction plate, while the power performance of the cotton picker will also be reduced.
At the initial moment of the speed synchronization phase, the active disc speed of the brakes/clutch is greater than the driven disc speed, with: At the end of the speed synchronization phase, the active disc speed of the brakes/clutch is equal to the driven disc speed, with: That is, the mathematical formula for the slip-grinding work is as follows: where T f is the friction torque, N·m; ω 2 is the brakes/clutch input speed, r/min; ω 1 is the brakes/clutch output speed, r/min; p is the clutch action pressure, bar; µ is the friction factor; S is the friction plate contact area, m 2 ; N is the number of friction plates; R 0 is the friction plate inner diameter, m; R 1 is the friction plate outer diameter, m; i H is the high speed gear ratio; i L is the low speed gear ratio. Table 2 shows the relevant parameters of the brakes/clutch.

Modeling Simulation
In this section, the automatic control model of the whole vehicle of the cotton picker is built and optimized using the Statechart logic control algorithm. The following is a comparative analysis of these two control methods.

Automatic Control Model
The automatic control model consists of five parts: pump-controlled motor, electrohydraulic reversing solenoid valve, gear-mechanical shift, differential speed, and wheel side reducer. Two parallel front/rear axle variable motors are driven by the hydraulic power of the variable pump, with the flow rate adjusted by changing the signal opening of the variable motor and, thus, the speed. The pressure source of the electro-hydraulic reversing solenoid valve is provided by the charge oil pump, and the directional movement of the two sets of spools pushes the piston cylinder to control the combination and separation of the brake/clutch, respectively, and the size of the spool pressure directly affects the impact degree of the shifting process. The mechanical shifting part is for high speed and low speed, two transmission modes, with a graded transmission ratio of 1 and 2.38, respectively, to realize the cotton picker in the field mode and road mode between the conversion. The wheel edge is directly connected to the drive wheel, which is the direct power mechanism driving the linear travel of the cotton picker. The loading includes the resistance moment of the cotton picker during the journey and the equivalent rotational inertia of the whole machine translational mass converted to the output of the gearbox.
When starting, the operation button is in the low-speed position, and the low-speed brake piston cylinder is filled with oil to make it combined; at this time, the variable pump is in the full discharge state, the displacement ratio of the variable motor rises gradually, and the vehicle speed rises slowly until the vehicle speed reaches 8.5 km/h. We operate the switching button, so that the displacement ratio of the variable pump and variable motor continues to change until the vehicle speed reaches 14.5 km/h. We operate the button for the high-speed position, the low-speed brake piston cylinder is drained to disengage it, and the clutch piston cylinder is filled to combine it to realize the gear shift, and the displacement ratio of the variable pump and the variable motor is changed again until the maximum speed of 27.6 km/h is reached.

Statechart Logic Control Algorithm Model
The transmission shift element is mainly composed of the brakes and clutch. The shift logic table shows that when in neutral, both brakes and clutch are separated; at low and medium speeds, the brakes are combined, and the clutch is separated; at high speeds, the brakes are separated, and the clutch is connected; when both the brakes and clutch are combined, the transmission is locked.
To make the shifting process smoother and with less shock, the control method of the Statechart logic control algorithm is further optimized based on the automatic control simulation model, as shown in Figure 5. The logic control algorithm takes the engine speed, the whole output speed, and the target vehicle speed of 27.6 km/h as input parameters, and the brakes/clutch, variable pump, and variable motor signal input as output parameters, and self-tuning is based on the internal logic algorithm, which further improves the response time of the system. power mechanism driving the linear travel of the cotton picker. The loading includes the resistance moment of the cotton picker during the journey and the equivalent rotational inertia of the whole machine translational mass converted to the output of the gearbox. When starting, the operation button is in the low-speed position, and the low-speed brake piston cylinder is filled with oil to make it combined; at this time, the variable pump is in the full discharge state, the displacement ratio of the variable motor rises gradually, and the vehicle speed rises slowly until the vehicle speed reaches 8.5 km/h. We operate the switching button, so that the displacement ratio of the variable pump and variable motor continues to change until the vehicle speed reaches 14.5 km/h. We operate the button for the high-speed position, the low-speed brake piston cylinder is drained to disengage it, and the clutch piston cylinder is filled to combine it to realize the gear shift, and the displacement ratio of the variable pump and the variable motor is changed again until the maximum speed of 27.6 km/h is reached.

Statechart Logic Control Algorithm Model
The transmission shift element is mainly composed of the brakes and clutch. The shift logic table shows that when in neutral, both brakes and clutch are separated; at low and medium speeds, the brakes are combined, and the clutch is separated; at high speeds, the brakes are separated, and the clutch is connected; when both the brakes and clutch are combined, the transmission is locked.
To make the shifting process smoother and with less shock, the control method of the Statechart logic control algorithm is further optimized based on the automatic control simulation model, as shown in Figure 5. The logic control algorithm takes the engine speed, the whole output speed, and the target vehicle speed of 27.6 km/h as input parameters, and the brakes/clutch, variable pump, and variable motor signal input as output parameters, and self-tuning is based on the internal logic algorithm, which further improves the response time of the system.   Figure 6 shows the schematic diagram of the algorithm based on speed division, and Figure 7 shows the internal algorithm diagram. The displacement ratios of the variable  Figure 6 shows the schematic diagram of the algorithm based on speed division, and Figure 7 shows the internal algorithm diagram. The displacement ratios of the variable pump, front-drive motor, and rear-drive motor are used as control parameters. Low speed is the field picking mode, medium speed is the field transportation mode, and high speed is the road transportation mode. The algorithmic process is further explained below. pump, front-drive motor, and rear-drive motor are used as control parameters. Low speed is the field picking mode, medium speed is the field transportation mode, and high speed is the road transportation mode. The algorithmic process is further explained below.  Low-speed mode: This mode is the field picking mode; when the brake input signal K1 is 1, and the clutch input signal K2 is 0, the brake C1 is in the combined state, and the clutch C2 is in the separated state, and the signal opening of both the front drive motor and the rear drive motor is 1, the duty cycle is 1, and the displacement ratio is also 1. The displacement ratio of the variable pump gradually rises from 0 to 1, and the speed of the cotton picker also rises until the signal duty cycle reaches 1 and the cotton picker reaches the maximum speed of 8.5 km/h.
Medium-speed mode is for field transportation and speed regulation within the brakes segment. The algorithm continuously cycles within the segment for parameter selftuning optimization, adjusting the opening degree of the variable pump, thus regulating pump, front-drive motor, and rear-drive motor are used as control parameters. Low speed is the field picking mode, medium speed is the field transportation mode, and high speed is the road transportation mode. The algorithmic process is further explained below.  Low-speed mode: This mode is the field picking mode; when the brake input signal K1 is 1, and the clutch input signal K2 is 0, the brake C1 is in the combined state, and the clutch C2 is in the separated state, and the signal opening of both the front drive motor and the rear drive motor is 1, the duty cycle is 1, and the displacement ratio is also 1. The displacement ratio of the variable pump gradually rises from 0 to 1, and the speed of the cotton picker also rises until the signal duty cycle reaches 1 and the cotton picker reaches the maximum speed of 8.5 km/h.
Medium-speed mode is for field transportation and speed regulation within the brakes segment. The algorithm continuously cycles within the segment for parameter selftuning optimization, adjusting the opening degree of the variable pump, thus regulating Low-speed mode: This mode is the field picking mode; when the brake input signal K1 is 1, and the clutch input signal K2 is 0, the brake C1 is in the combined state, and the clutch C2 is in the separated state, and the signal opening of both the front drive motor and the rear drive motor is 1, the duty cycle is 1, and the displacement ratio is also 1. The displacement ratio of the variable pump gradually rises from 0 to 1, and the speed of the cotton picker also rises until the signal duty cycle reaches 1 and the cotton picker reaches the maximum speed of 8.5 km/h. Medium-speed mode is for field transportation and speed regulation within the brakes segment. The algorithm continuously cycles within the segment for parameter self-tuning optimization, adjusting the opening degree of the variable pump, thus regulating the pressure and flow of the system until it reaches the target speed and then enters the next stage of the algorithm. During this process, the displacement ratio of the front drive motor is reduced from 1 to 0.438, the displacement ratio of the rear drive motor is reduced from 1 to 0.511, and the signal duty cycle of the variable pump is maintained at 1. The displacement ratio is also maintained at 1 until the speed reaches 14.5 km/h. High-speed mode: This mode is for road transportation, for shifting between brakes, and clutch segments. When the clutch input signal K2 is 1, and the brakes input signal K1 is 0, the clutch C2 is in the combined state and the brakes C1 is in the separated state, the displacement ratio of the front drive motor changes from 0.438 to 0.712, and the displacement ratio of the rear drive motor changes from 0.511 to 0.762; at this time, the signal of the variable pump, the duty cycle continues to be maintained at 1, and the displacement ratio is also maintained at 1. When the vehicle speed is not higher than 27.6 km/h, the cycle algorithm is continuously optimized to adjust the opening degree of the variable motor until the target speed is reached, after which the displacement ratios of the front drive motor and rear drive motor are maintained at 0.318 and 0.340, respectively.

Simulation Analysis of Dynamic Characteristics of Upshifting Process
To verify the rationality of the powershift gearbox shift logic, the response speed, speed ratio characteristics, and pressure following the control effect of the system, the two control methods are analyzed by ignoring the changes in the corresponding resistance caused by changes in road conditions during the driving of the cotton picker. Figure 8 shows the system oil pressure curve, and the cotton picker in the starting stage; the engine speed gradually increased, the variable pump speed rose, and the system oil pressure rose rapidly. Still, the pressure grew too fast, or pressure fluctuations in the process of growth will be a too significant impact on the system. As can be seen from the figure, in the starting stage, due to the enormous motion inertia of the cotton picker, the displacement ratio of the variable pump began to increase. The oil pressure of the two control modes showed a significant overshoot, and the oil pressure overshoot of the system in the automatic control mode was 150 bar, which reached a stable state only in 5 s, then rose slowly. The system oil pressure overshoot of the Statechart control mode is 110 bar, 10.71% less than the automatic control mode. The oil pressure reaches the steady state in 4 s, followed by the constant pressure control state, and the response time is 27.27% better than the automatic control mode.

System Pressure Characteristic Analysis
Processes 2023, 11, x FOR PEER REVIEW 10 of 21 the pressure and flow of the system until it reaches the target speed and then enters the next stage of the algorithm. During this process, the displacement ratio of the front drive motor is reduced from 1 to 0.438, the displacement ratio of the rear drive motor is reduced from 1 to 0.511, and the signal duty cycle of the variable pump is maintained at 1. The displacement ratio is also maintained at 1 until the speed reaches 14.5 km/h. High-speed mode: This mode is for road transportation, for shifting between brakes, and clutch segments. When the clutch input signal K2 is 1, and the brakes input signal K1 is 0, the clutch C2 is in the combined state and the brakes C1 is in the separated state, the displacement ratio of the front drive motor changes from 0.438 to 0.712, and the displacement ratio of the rear drive motor changes from 0.511 to 0.762; at this time, the signal of the variable pump, the duty cycle continues to be maintained at 1, and the displacement ratio is also maintained at 1. When the vehicle speed is not higher than 27.6 km/h, the cycle algorithm is continuously optimized to adjust the opening degree of the variable motor until the target speed is reached, after which the displacement ratios of the front drive motor and rear drive motor are maintained at 0.318 and 0.340, respectively.

Simulation Analysis of Dynamic Characteristics of Upshifting Process
To verify the rationality of the powershift gearbox shift logic, the response speed, speed ratio characteristics, and pressure following the control effect of the system, the two control methods are analyzed by ignoring the changes in the corresponding resistance caused by changes in road conditions during the driving of the cotton picker. Figure 8 shows the system oil pressure curve, and the cotton picker in the starting stage; the engine speed gradually increased, the variable pump speed rose, and the system oil pressure rose rapidly. Still, the pressure grew too fast, or pressure fluctuations in the process of growth will be a too significant impact on the system. As can be seen from the figure, in the starting stage, due to the enormous motion inertia of the cotton picker, the displacement ratio of the variable pump began to increase. The oil pressure of the two control modes showed a significant overshoot, and the oil pressure overshoot of the system in the automatic control mode was 150 bar, which reached a stable state only in 5 s, then rose slowly. The system oil pressure overshoot of the Statechart control mode is 110 bar, 10.71% less than the automatic control mode. The oil pressure reaches the steady state in 4 s, followed by the constant pressure control state, and the response time is 27.27% better than the automatic control mode.  Automatic control mode in 30 s shift, the front drive motor and rear drive motor signal duty cycle have changed; at this time, the brakes began to release pressure, the friction plate disengaged, the clutch piston ring filled with oil, the friction plate began to combine, the friction plate and piston ring are between the rigid contact, the hydraulic oil viscous resistance is small, the oil pressure fluctuated significantly, and the overshoot amount reached 260.39 bar. The Statechart control mode shifted at 26.3 s, and the oil pressure also fluctuated, but the overshoot was 150.74 bar, which was 42.11% less than the automatic control mode. In contrast, the shift time was 54% shorter than the automatic control mode. After completing the shift, the automatic control mode pressure increase rate was non-linear, and the Statechart control mode pressure increase rate was linear.

System Flow Characteristics Analysis
To reduce the intuitive speed fluctuation phenomenon during the driving process of the cotton picker and enhance the driving experience, the flow rate should be changed as linearly as possible, as shown in Figure 9. In the low-speed range, the variable motor is kept fully open, and the displacement ratio is 1. The displacement ratio of the variable pump increases from zero. As the engine speed rises, the flow rate of the variable pump increases, and the flow rate fluctuates significantly when starting due to the rapid change of load and the turbulence of the hydraulic pipeline due to the different sizes of the cross-section. In the automatic control mode, the flow rate of the variable motor started to increase at 1.5 s after being excited by the signal, and the flow rate of the variable pump and variable motor increased in a non-linear pattern after fluctuating at 3.3 s. In the Statechart control mode, the flow rate of the motor started to increase at 0.8 s, and the response time increased by 46.67% compared with the automatic control mode. The flow rate increased linearly after fluctuating at 1.7 s.
Automatic control mode in 30 s shift, the front drive motor and rear drive motor signal duty cycle have changed; at this time, the brakes began to release pressure, the friction plate disengaged, the clutch piston ring filled with oil, the friction plate began to combine, the friction plate and piston ring are between the rigid contact, the hydraulic oil viscous resistance is small, the oil pressure fluctuated significantly, and the overshoot amount reached 260.39 bar. The Statechart control mode shifted at 26.3 s, and the oil pressure also fluctuated, but the overshoot was 150.74 bar, which was 42.11% less than the automatic control mode. In contrast, the shift time was 54% shorter than the automatic control mode. After completing the shift, the automatic control mode pressure increase rate was nonlinear, and the Statechart control mode pressure increase rate was linear.

System Flow Characteristics Analysis
To reduce the intuitive speed fluctuation phenomenon during the driving process of the cotton picker and enhance the driving experience, the flow rate should be changed as linearly as possible, as shown in Figure 9. In the low-speed range, the variable motor is kept fully open, and the displacement ratio is 1. The displacement ratio of the variable pump increases from zero. As the engine speed rises, the flow rate of the variable pump increases, and the flow rate fluctuates significantly when starting due to the rapid change of load and the turbulence of the hydraulic pipeline due to the different sizes of the crosssection. In the automatic control mode, the flow rate of the variable motor started to increase at 1.5 s after being excited by the signal, and the flow rate of the variable pump and variable motor increased in a non-linear pattern after fluctuating at 3.3 s. In the Statechart control mode, the flow rate of the motor started to increase at 0.8 s, and the response time increased by 46.67% compared with the automatic control mode. The flow rate increased linearly after fluctuating at 1.7 s.  The displacement ratio of the variable pump reaches 1 in the medium-speed mode, the displacement ratio of the front drive motor decreases to 0.5, and the displacement ratio of the rear drive motor decreases to 0.3. The medium-speed stage belongs to the in-segment speed regulation, and the vehicle speed should continue to rise. The flow rate of the front drive variable motor continues to increase in the automatic control mode. The  The displacement ratio of the variable pump reaches 1 in the medium-speed mode, the displacement ratio of the front drive motor decreases to 0.5, and the displacement ratio of the rear drive motor decreases to 0.3. The medium-speed stage belongs to the in-segment speed regulation, and the vehicle speed should continue to rise. The flow rate of the front drive variable motor continues to increase in the automatic control mode. The Statechart control mode is in the mid-speed stage, and the motor has reached a constant flow output.
In high-speed mode, the brakes start to disengage, the clutch starts to combine, and the transmission ratio changes from 1 to 2.38. At this time, the flow rate of the variable pump and variable motor changes more significantly due to the sudden change in the theoretical load. In automatic control mode, the flow rate of the variable pump is changed from 382 L/min to 320 L/min. The flow rate of the front-drive variable motor is changed from 365 L/min to 145 L/min, while in Statechart control mode, the flow rate of the variable pump is changed from 350 L/min to 320 L/min, and the flow rate of the front-drive variable motor is changed from 250 L/min to 142 L/min. Compared with the automatic control mode, the pump and motor fluctuations were reduced by 16.32% and 31.5%, respectively, after which the rapid achievement is of a constant flow output state; obviously, this control mode has better results.

Vehicle Speed Analysis
For a good driving experience, the ideal vehicle speed should vary linearly with as little shock as possible during the driving process, especially during gear shifting. As shown in Figure 10, the target speed is 27.6 km/h. In the automatic control mode, the speed increases non-linearly with the pressure and flow rate trend due to the non-linear characteristics of flow rate and pressure. As shown in Figure 10, the target vehicle speed is 27.6 km/h. In the automatic control mode, the vehicle speed also increases non-linearly due to the non-linear characteristics of flow and pressure. At the 30 s is the shift moment, the shift time is 5 s, the speed fluctuation at this time is more significant, the fluctuation amplitude reaches 2 km/h, the transmission ratio decreases after the shift, the drive torque decreases, the acceleration decreases and reaches the target speed near 65 s. In Statechart control mode, the system pressure and flow rate are linearly changing, and the vehicle speed is also increasing. The shift moment is 26.2 s, the speed fluctuation amplitude before and after the shift is 0.9 km/h, the shift time is 2.3 s, and the target speed is reached near 51 s. Compared with the automatic control mode, the speed fluctuation is reduced by 50%, and the shift time is reduced by 54%, which is evident that this control mode has better robustness.
Statechart control mode is in the mid-speed stage, and the motor has reached a constant flow output.
In high-speed mode, the brakes start to disengage, the clutch starts to combine, and the transmission ratio changes from 1 to 2.38. At this time, the flow rate of the variable pump and variable motor changes more significantly due to the sudden change in the theoretical load. In automatic control mode, the flow rate of the variable pump is changed from 382 L/min to 320 L/min. The flow rate of the front-drive variable motor is changed from 365 L/min to 145 L/min, while in Statechart control mode, the flow rate of the variable pump is changed from 350 L/min to 320 L/min, and the flow rate of the front-drive variable motor is changed from 250 L/min to 142 L/min. Compared with the automatic control mode, the pump and motor fluctuations were reduced by 16.32% and 31.5%, respectively, after which the rapid achievement is of a constant flow output state; obviously, this control mode has better results.

Vehicle Speed Analysis
For a good driving experience, the ideal vehicle speed should vary linearly with as little shock as possible during the driving process, especially during gear shifting. As shown in Figure 10, the target speed is 27.6 km/h. In the automatic control mode, the speed increases non-linearly with the pressure and flow rate trend due to the non-linear characteristics of flow rate and pressure. As shown in Figure 10, the target vehicle speed is 27.6 km/h. In the automatic control mode, the vehicle speed also increases non-linearly due to the non-linear characteristics of flow and pressure. At the 30 s is the shift moment, the shift time is 5 s, the speed fluctuation at this time is more significant, the fluctuation amplitude reaches 2 km/h, the transmission ratio decreases after the shift, the drive torque decreases, the acceleration decreases and reaches the target speed near 65 s. In Statechart control mode, the system pressure and flow rate are linearly changing, and the vehicle speed is also increasing. The shift moment is 26.2 s, the speed fluctuation amplitude before and after the shift is 0.9 km/h, the shift time is 2.3 s, and the target speed is reached near 51 s. Compared with the automatic control mode, the speed fluctuation is reduced by 50%, and the shift time is reduced by 54%, which is evident that this control mode has better robustness.

Impact Degree Analysis
As shown in Figure 11, the brakes do not immediately enter the binding state because the hydraulic fluid needs to overcome the piston cylinder spring resistance and viscous resistance. In automatic control mode, the brakes start binding and transmitting torque at 1.5 s, with a shock fluctuation of 7 m/s 3 , and the brakes are fully bound after 5 s. Statechart control mode brakes start binding and transmitting torque at 0.95 s, with a shock fluctuation of 4.3 m/s 3 and full brakes binding after 4 s. The Statechart control mode reduces shock by 38.57% and brake binding time by 12.86% compared to the automatic control mode, contributing to longer brake life. the hydraulic fluid needs to overcome the piston cylinder spring resistance and viscous resistance. In automatic control mode, the brakes start binding and transmitting torque at 1.5 s, with a shock fluctuation of 7 m/s 3 , and the brakes are fully bound after 5 s. Statechart control mode brakes start binding and transmitting torque at 0.95 s, with a shock fluctuation of 4.3 m/s 3 and full brakes binding after 4 s. The Statechart control mode reduces shock by 38.57% and brake binding time by 12.86% compared to the automatic control mode, contributing to longer brake life. As shown in Figure 12, the brakes start to disengage when shifting gears, while the clutch starts to engage. The clutch in automatic control mode starts to combine and transmit torque at the 30 s with a shock fluctuation value of 13.35 m/s 3 , and the clutch is thoroughly combined after 34.9 s. The clutch in Statechart control mode starts to combine and transmit torque at 26.3 s with a shock fluctuation amplitude of 4.35 m/s 3 , and the clutch is fully combined after 28.4 s, which is a 67% reduction in shock and a 55.1% reduction in clutch combination time compared to the automatic control mode. As shown in Figure 12, the brakes start to disengage when shifting gears, while the clutch starts to engage. The clutch in automatic control mode starts to combine and transmit torque at the 30 s with a shock fluctuation value of 13.35 m/s 3 , and the clutch is thoroughly combined after 34.9 s. The clutch in Statechart control mode starts to combine and transmit torque at 26.3 s with a shock fluctuation amplitude of 4.35 m/s 3 , and the clutch is fully combined after 28.4 s, which is a 67% reduction in shock and a 55.1% reduction in clutch combination time compared to the automatic control mode.
resistance. In automatic control mode, the brakes start binding and transmitting torque at 1.5 s, with a shock fluctuation of 7 m/s 3 , and the brakes are fully bound after 5 s. Statechart control mode brakes start binding and transmitting torque at 0.95 s, with a shock fluctuation of 4.3 m/s 3 and full brakes binding after 4 s. The Statechart control mode reduces shock by 38.57% and brake binding time by 12.86% compared to the automatic control mode, contributing to longer brake life. As shown in Figure 12, the brakes start to disengage when shifting gears, while the clutch starts to engage. The clutch in automatic control mode starts to combine and transmit torque at the 30 s with a shock fluctuation value of 13.35 m/s 3 , and the clutch is thoroughly combined after 34.9 s. The clutch in Statechart control mode starts to combine and transmit torque at 26.3 s with a shock fluctuation amplitude of 4.35 m/s 3 , and the clutch is fully combined after 28.4 s, which is a 67% reduction in shock and a 55.1% reduction in clutch combination time compared to the automatic control mode.  Figure 13b shows the slip-friction work generated by the brake at start-up, and Figure 13a shows the friction torque at start-up. In the beginning, the friction gap is large, the friction torque fluctuation is significant, and the relative speed difference between the brake master and the enslaved person is extensive; with the piston cylinder promoting the movement of the friction plate, the friction gap is rapidly reduced, the friction torque fluctuation is gradually reduced, the relative speed difference between the brake enslaver and the enslaved person is gradually reduced until the brake is thoroughly combined, the friction plate to achieve complete compression, the relative speed difference between the enslaver and enslaved person is zero, and the slip-grinding work reaches its maximum value. In the beginning, the friction plate gap is large, the friction torque fluctuation is significant, and the relative speed difference between the brakes master and the enslaved person is extensive; with the piston cylinder promoting the movement of the friction plate, the friction plate gap is rapidly reduced, the friction torque fluctuation is gradually reduced, the relative speed difference between the brakes master and the enslaved person is gradually reduced until the brakes are thoroughly combined; for the friction plate to achieve complete compression, the relative speed difference between the master and enslaved person is zero, and the slip-grinding work reaches its maximum value. From Figure 13b, the automatic control mode friction plate from the start of slip-grinding to synchronization time is 3.85 s, slip-grinding work is 4.8 × 10 3 J, the Statechart control mode friction plate from the start of slip-grinding to synchronization time is 1.85 s, 51.95% less than the automatic control mode; the slip-grinding work is 3.3 × 10 3 J, 33.33% less than the automatic control mode. Figure 13b shows the slip-friction work generated by the brake at start-up, and F 13a shows the friction torque at start-up. In the beginning, the friction gap is larg friction torque fluctuation is significant, and the relative speed difference betwee brake master and the enslaved person is extensive; with the piston cylinder promotin movement of the friction plate, the friction gap is rapidly reduced, the friction torque tuation is gradually reduced, the relative speed difference between the brake enslave the enslaved person is gradually reduced until the brake is thoroughly combined, th tion plate to achieve complete compression, the relative speed difference between th slaver and enslaved person is zero, and the slip-grinding work reaches its maxi value. In the beginning, the friction plate gap is large, the friction torque fluctuat significant, and the relative speed difference between the brakes master and the ens person is extensive; with the piston cylinder promoting the movement of the friction the friction plate gap is rapidly reduced, the friction torque fluctuation is gradual duced, the relative speed difference between the brakes master and the enslaved p is gradually reduced until the brakes are thoroughly combined; for the friction pl achieve complete compression, the relative speed difference between the master an slaved person is zero, and the slip-grinding work reaches its maximum value. From F 13b, the automatic control mode friction plate from the start of slip-grinding to syn nization time is 3.85 s, slip-grinding work is 4.8 × 103 J, the Statechart control mode fr plate from the start of slip-grinding to synchronization time is 1.85 s, 51.95% less tha automatic control mode; the slip-grinding work is 3.3 × 103 J, 33.33% less than the matic control mode.  Figure 14b shows the slip-friction work generated by the clutch during shifting Figure 14a shows the friction torque during shifting. The clutch piston pushes the fr plate to move under the action of the hydraulic fluid; at this time, the gap betwee friction plate is relatively large, the friction torque fluctuates more significantly, an relative speed difference between the clutch master and slave parts is also significa the piston cylinder continues to push the friction plate forward, the gap between th tion plate is rapidly reduced until the friction plate is fully compressed. The relative difference between the clutch enslaver and enslaved part and the friction torque flu tion gradually decreases until zero, and the slip wear work reaches its maximum v Similarly, to ensure that the power is not interrupted when shifting, the clutch sta combine when the brakes are about to separate, the two shift times inevitably overlap the combination of the clutch is just the opposite of the separation process of the b The shifting process is a simultaneous action of the clutch and brakes, generating a po of parasitic work, so this phase generates more slip-grinding work than the starting p From the figure, the automatic control mode friction plate from the start of slip-gri to synchronization time is 2 s; the slip-grinding work is 4.26 × 104 J. The Statechart co  Figure 14b shows the slip-friction work generated by the clutch during shifting, and Figure 14a shows the friction torque during shifting. The clutch piston pushes the friction plate to move under the action of the hydraulic fluid; at this time, the gap between the friction plate is relatively large, the friction torque fluctuates more significantly, and the relative speed difference between the clutch master and slave parts is also significant. As the piston cylinder continues to push the friction plate forward, the gap between the friction plate is rapidly reduced until the friction plate is fully compressed. The relative speed difference between the clutch enslaver and enslaved part and the friction torque fluctuation gradually decreases until zero, and the slip wear work reaches its maximum value. Similarly, to ensure that the power is not interrupted when shifting, the clutch starts to combine when the brakes are about to separate, the two shift times inevitably overlap, and the combination of the clutch is just the opposite of the separation process of the brakes. The shifting process is a simultaneous action of the clutch and brakes, generating a portion of parasitic work, so this phase generates more slip-grinding work than the starting phase. From the figure, the automatic control mode friction plate from the start of slip-grinding to synchronization time is 2 s; the slip-grinding work is 4.26 × 10 4 J. The Statechart control mode friction plate from the start of the slip-grinding to the synchronization time is 1 s, 50% less than the automatic control mode; the slip-grinding work is 3.534 × 10 4 J, 17.04% less than the automatic control mode. mode friction plate from the start of the slip-grinding to the synchronization time is 50% less than the automatic control mode; the slip-grinding work is 3.534 × 104 J, 17.0 less than the automatic control mode. In summary, overall, the Statechart control mode has a significant control effect co pared to the automatic control mode, especially in terms of robustness inflow and imp degree control. However, the control pressure, especially during the in-segment spe regulation (medium-speed) phase, showed large fluctuations, and the control effect w not as good as the automatic control mode, and the flow rate of the front-drive and re drive variable motors showed small fluctuations during in-segment speed regulation, a the speed started in-segment speed regulation before reaching the target speed of the lo speed section, which was not suitable for the whole system. Therefore, the BP algorith based hydraulic driving control system optimization is proposed to further optimize results.

Optimization of Hydraulic Driving Control System Based on BP Algorithm
In order to solve the problem of unstable pressure of the pump-controlled motor the hydraulic control system during the walking process of the cotton picker, resulting poor stability of the rotational speed output, this paper proposes BP (Back Propagati algorithm based hydraulic driving control system optimization to design the hydrau walking system controller, and optimize it by using the joint simulation, which will a long-term work in the future. Cotton picker working environment is complex and diverse, if the pump and mo cannot adjust the flow size to adjust the speed output in a timely manner, which will riously affect the performance of the cotton picker. The purpose of changing the varia pump flow size is to make the hydraulic driving system has good pressure characterist in order to ensure that the performance requirements at the same time, reduce the pr sure overshoot to protect the hydraulic system, and then improve the performance of cotton picker. As shown in Figure 15, the output rotational speed is obtained from the g coefficients of the front-drive motor and the rear-drive motor by the cross-coupled c troller, which is then transferred to the internal control system to realize closed-loop c trol. In the external feedback link, the deviation of the output rotational speed from target input rotational speed is transferred to the internal controller of the system resp tively, and the closed-loop control is formed inside and outside the system. Therefore hydraulic traveling control system based on BP algorithm is designed to effectively i prove the reliability of cotton picker on the basis of ensuring the performance of the tr eling system. In summary, overall, the Statechart control mode has a significant control effect compared to the automatic control mode, especially in terms of robustness inflow and impact degree control. However, the control pressure, especially during the in-segment speed regulation (medium-speed) phase, showed large fluctuations, and the control effect was not as good as the automatic control mode, and the flow rate of the front-drive and rear-drive variable motors showed small fluctuations during in-segment speed regulation, and the speed started in-segment speed regulation before reaching the target speed of the low-speed section, which was not suitable for the whole system. Therefore, the BP algorithm-based hydraulic driving control system optimization is proposed to further optimize the results.

Optimization of Hydraulic Driving Control System Based on BP Algorithm
In order to solve the problem of unstable pressure of the pump-controlled motor of the hydraulic control system during the walking process of the cotton picker, resulting in poor stability of the rotational speed output, this paper proposes BP (Back Propagation) algorithm based hydraulic driving control system optimization to design the hydraulic walking system controller, and optimize it by using the joint simulation, which will be a long-term work in the future.
Cotton picker working environment is complex and diverse, if the pump and motor cannot adjust the flow size to adjust the speed output in a timely manner, which will seriously affect the performance of the cotton picker. The purpose of changing the variable pump flow size is to make the hydraulic driving system has good pressure characteristics, in order to ensure that the performance requirements at the same time, reduce the pressure overshoot to protect the hydraulic system, and then improve the performance of the cotton picker. As shown in Figure 15, the output rotational speed is obtained from the gain coefficients of the front-drive motor and the rear-drive motor by the cross-coupled controller, which is then transferred to the internal control system to realize closed-loop control. In the external feedback link, the deviation of the output rotational speed from the target input rotational speed is transferred to the internal controller of the system respectively, and the closed-loop control is formed inside and outside the system. Therefore, a hydraulic traveling control system based on BP algorithm is designed to effectively improve the reliability of cotton picker on the basis of ensuring the performance of the traveling system.

Mathematical Model
A typical three-layer feedforward BP neural network structure is shown in Figure 16.
For the mathematical representation of the hidden layer: where implies the layer matrix. Where is the transfer unipolar Sigmoid function: For the mathematical representation of the output layer: where is the output layer matrix and is the implied layer vector. The expression for the adjustment amount of the weight of each layer is:

Mathematical Model
A typical three-layer feedforward BP neural network structure is shown in Figure 16.

Mathematical Model
A typical three-layer feedforward BP neural network structure is shown in Figure 16.
For the mathematical representation of the hidden layer: where implies the layer matrix. Where is the transfer unipolar Sigmoid function: For the mathematical representation of the output layer: where is the output layer matrix and is the implied layer vector. The expression for the adjustment amount of the weight of each layer is: In the Figure 16 are the input vector x = (x 1 , x 2 , x 3 , x 4 , x 5 , · · ·, x n ), the output vector y = (y 1 , y 2 , y 3 , y 4 , y 5 , · · ·, y n ), the hidden layer vector C = (c 1 , c 2 , c 3 , c 4 , c 5 , · · ·, c n ), the desired output vector A = (a 1 , a 2 , a 3 , a 4 , a 5 , · · ·, a n ), the connection matrix between the input layer and the hidden layer W = (w 1 , w 2 , w 3 , w 4 , w 5 , · · ·, w n ), and the connection matrix between the output layer and the hidden layer V = (v 1 , v 2 , v 3 , v 4 , v 5 , · · ·, v n ).
For the mathematical representation of the hidden layer: where W ji implies the layer matrix.
Where is the transfer unipolar Sigmoid function: For the mathematical representation of the output layer: where V ik is the output layer matrix and C i is the implied layer vector. The expression for the adjustment amount of the weight of each layer is: where V ik is the output layer matrix; W ik is the matrix connecting the input layer to the implicit layer; and α is the learning rate coefficient.
To determine the three parameters of the PID, K p , K i , K d , it is necessary to determine the structure of the BP neural network, the implicit layer, the output layer, the initial value of the weighting coefficients, the learning efficiency, and the inertia coefficient. The structure used in this paper is three, eight, and three modes, and the inertia coefficient is added to achieve the purpose of reducing oscillation and fast convergence.
The speed control model of the front and rear drive motors of the hydraulic driving system based on the hydraulic pump, hydraulic motor, hydraulic reversing solenoid valve, mechanical shift module, and wheel rim section is shown in Figure 17, and the inputs of the model are the input speeds of the front and rear drive motors and the deviation of the input speeds from the output speeds. The simulation model is shown in Figure 18. The simulation model of the hydraulic driving system is established in Simulink, and the ramp signal is used to replace the input rotational speed of the hydraulic motor, and the deviation of the input rotational speed from the input and output rotational speeds of the two motors is used as the input rotational speed of the controller to form a closed-loop feedback control loop.
where is the output layer matrix; is the matrix connecting the input layer to the implicit layer; and is the learning rate coefficient. To determine the three parameters of the PID, p K , i K , d K , it is necessary to determine the structure of the BP neural network, the implicit layer, the output layer, the initial value of the weighting coefficients, the learning efficiency, and the inertia coefficient. The structure used in this paper is three, eight, and three modes, and the inertia coefficient is added to achieve the purpose of reducing oscillation and fast convergence. The speed control model of the front and rear drive motors of the hydraulic driving system based on the hydraulic pump, hydraulic motor, hydraulic reversing solenoid valve, mechanical shift module, and wheel rim section is shown in Figure 17, and the inputs of the model are the input speeds of the front and rear drive motors and the deviation of the input speeds from the output speeds. The simulation model is shown in Figure 18. The simulation model of the hydraulic driving system is established in Simulink, and the ramp signal is used to replace the input rotational speed of the hydraulic motor, and the deviation of the input rotational speed from the input and output rotational speeds of the two motors is used as the input rotational speed of the controller to form a closed-loop feedback control loop.
where is the output layer matrix; is the matrix connecting the input layer to the implicit layer; and is the learning rate coefficient. To determine the three parameters of the PID, p K , i K , d K , it is necessary to determine the structure of the BP neural network, the implicit layer, the output layer, the initial value of the weighting coefficients, the learning efficiency, and the inertia coefficient. The structure used in this paper is three, eight, and three modes, and the inertia coefficient is added to achieve the purpose of reducing oscillation and fast convergence. The speed control model of the front and rear drive motors of the hydraulic driving system based on the hydraulic pump, hydraulic motor, hydraulic reversing solenoid valve, mechanical shift module, and wheel rim section is shown in Figure 17, and the inputs of the model are the input speeds of the front and rear drive motors and the deviation of the input speeds from the output speeds. The simulation model is shown in Figure 18. The simulation model of the hydraulic driving system is established in Simulink, and the ramp signal is used to replace the input rotational speed of the hydraulic motor, and the deviation of the input rotational speed from the input and output rotational speeds of the two motors is used as the input rotational speed of the controller to form a closed-loop feedback control loop.

Simulation Analysis
The system pressure of the BP neural network is shown in Figure 19. In the beginning, the engine speed rises slowly from idle speed, and the displacement ratio of the variable pump rises from 0. To ensure that the cotton picker can usually start, the displacement ratio of the variable motor is 1. As the static inertia of the cotton picker is relatively large, the oil has to fill the cavity of the hydraulic system. At the same time, part of the hydraulic oil will have stagnation, resulting in a significant overshoot of the starting pressure. Overshoot time 2.3 s. After the number of iterations reaches 110, the system pressure will be improved effectively. Compared with Statechart, the overshoot and stabilization time are reduced by 25% and 34.29%, respectively, resulting in faster convergence and minor overshoot.

Simulation Analysis
The system pressure of the BP neural network is shown in Figure 19. In the beginning, the engine speed rises slowly from idle speed, and the displacement ratio of the variable pump rises from 0. To ensure that the cotton picker can usually start, the displacement ratio of the variable motor is 1. As the static inertia of the cotton picker is relatively large, the oil has to fill the cavity of the hydraulic system. At the same time, part of the hydraulic oil will have stagnation, resulting in a significant overshoot of the starting pressure. Overshoot time 2.3 s. After the number of iterations reaches 110, the system pressure will be improved effectively. Compared with Statechart, the overshoot and stabilization time are reduced by 25% and 34.29%, respectively, resulting in faster convergence and minor overshoot. When entering the medium-speed stage, the engine speed reaches the maximum, and the variable pump displacement ratio is 1. To obtain continuous power, the pressure continues to rise. Hence, the variable motor displacement ratio decreases, the pressure overshoots due to the change in the pump and motor displacement ratio, and the pressure rises evenly as the motor displacement ratio continues to decrease.
26.3 s to reach the shift time, the engine speed starts to decrease, the variable pump continues to be in the whole discharge state, and the variable motor displacement ratio increases instantaneously, then slowly decreases, due to the sudden opening of the brakes drain port and clutch inlet port, causing the fluid turbulence phenomenon. In contrast, the transmission ratio changes, and the pressure fluctuates significantly after the engine speed reaches a stable value. The pressure grows steadily, the BP neural network during the shift; compared with Statechart, the fluctuation is reduced by 30.77%.
As shown in Figure 20, for the speed of the front and rear drive motors, the speed rises gradually with the pressure in the entire discharge state, and the Statechart control method regulates the speed in the beginning segment of 15.4 s and enters the mediumspeed mode from low speed. The BP neural network control method regulates the speed in the beginning segment of 15.8, and as the displacement ratio decreases, the pressure rises rapidly, and the speed increases rapidly. The shift time is 26.3 s, the motor displacement ratio changes again, and with the change of transmission ratio, the front drive motor speed drops from 2770 r/min to 1100 r/min. It enters the high-speed mode, finally, the BP neural network control mode at 50.05 s, and Statechart control mode at 50.6 s, the motor reaches the maximum speed. When entering the medium-speed stage, the engine speed reaches the maximum, and the variable pump displacement ratio is 1. To obtain continuous power, the pressure continues to rise. Hence, the variable motor displacement ratio decreases, the pressure overshoots due to the change in the pump and motor displacement ratio, and the pressure rises evenly as the motor displacement ratio continues to decrease.
26.3 s to reach the shift time, the engine speed starts to decrease, the variable pump continues to be in the whole discharge state, and the variable motor displacement ratio increases instantaneously, then slowly decreases, due to the sudden opening of the brakes drain port and clutch inlet port, causing the fluid turbulence phenomenon. In contrast, the transmission ratio changes, and the pressure fluctuates significantly after the engine speed reaches a stable value. The pressure grows steadily, the BP neural network during the shift; compared with Statechart, the fluctuation is reduced by 30.77%.
As shown in Figure 20, for the speed of the front and rear drive motors, the speed rises gradually with the pressure in the entire discharge state, and the Statechart control method regulates the speed in the beginning segment of 15.4 s and enters the mediumspeed mode from low speed. The BP neural network control method regulates the speed in the beginning segment of 15.8, and as the displacement ratio decreases, the pressure rises rapidly, and the speed increases rapidly. The shift time is 26.3 s, the motor displacement ratio changes again, and with the change of transmission ratio, the front drive motor speed drops from 2770 r/min to 1100 r/min. It enters the high-speed mode, finally, the BP neural network control mode at 50.05 s, and Statechart control mode at 50.6 s, the motor reaches the maximum speed. As shown in Figure 21, when the vehicle speed reaches 8.5 km/h, it enters the medium-speed mode, but in the first two control modes, it enters the medium-speed mode early before reaching the target speed, and in the low-speed mode, the BP neural network control method pressure is maintained at 140 bar, which improves the acceleration, and in 15.8 s, it enters the medium-speed mode from the target speed. The speed fluctuated due to the significant overshoot of the front drive motor speed during the gear shift. Still, the BP neural network control method reduced the overshoot by 13.28% compared with the Statechart control method and finally reached the target speed at 50.5 s, 0.5 s earlier than the Statechart control method.  Table 3 demonstrates the effectiveness of the Statechart logic control method and BP neural network control for controlling pressure and speed.  As shown in Figure 21, when the vehicle speed reaches 8.5 km/h, it enters the mediumspeed mode, but in the first two control modes, it enters the medium-speed mode early before reaching the target speed, and in the low-speed mode, the BP neural network control method pressure is maintained at 140 bar, which improves the acceleration, and in 15.8 s, it enters the medium-speed mode from the target speed. The speed fluctuated due to the significant overshoot of the front drive motor speed during the gear shift. Still, the BP neural network control method reduced the overshoot by 13.28% compared with the Statechart control method and finally reached the target speed at 50.5 s, 0.5 s earlier than the Statechart control method. As shown in Figure 21, when the vehicle speed reaches 8.5 km/h, it enters the medium-speed mode, but in the first two control modes, it enters the medium-speed mode early before reaching the target speed, and in the low-speed mode, the BP neural network control method pressure is maintained at 140 bar, which improves the acceleration, and in 15.8 s, it enters the medium-speed mode from the target speed. The speed fluctuated due to the significant overshoot of the front drive motor speed during the gear shift. Still, the BP neural network control method reduced the overshoot by 13.28% compared with the Statechart control method and finally reached the target speed at 50.5 s, 0.5 s earlier than the Statechart control method.  Table 3 demonstrates the effectiveness of the Statechart logic control method and BP neural network control for controlling pressure and speed.   Table 3 demonstrates the effectiveness of the Statechart logic control method and BP neural network control for controlling pressure and speed.
In summary, the preliminary BP neural network optimization further reduces the system pressure overshoot, improves the response time, and the speed growth has a heeling linear effect. However, the speed of the motor changes too fast when shifting gears, which is not better for the system at all, and the later optimization is still to be further improved, and changing the controller model and increasing the control parameters is a worthwhile scheme to try.

Conclusions
(1) The working principle of powershift gearbox and liquid-controlled reversing solenoid valve is analyzed, and the evaluation index of power shift characteristics is proposed. The target quantities are optimized by using Statechart logic control and the BP neural network for both starting and shifting conditions of the cotton picker, respectively.
(2) For the problem of erratic shifting and large shocks of the power shift gearbox, the new whole vehicle model of automatic control of the cotton picker is established, and Statechart logic control optimization was carried out on the basis of the automatic control model. The pressure, flow rate, vehicle speed, shock degree, and slip-grinding work are compared and analyzed, and the flow characteristics, shock degree, and slip-grinding work of the system under the Statechart control mode are optimized more significantly.
(3) In response to Statechart logic control's suboptimal optimization of system pressure and vehicle speed. The BP neural network parameter optimization was carried out to optimize the system pressure and speed, and the system pressure was linearly changed after optimization. The target speed was reached during the intra-segment speed regulation, and the speed changed smoothly after the intra-segment shift, and the response speed of the system was further improved, the oil pressure impact before and after the shift was slight and smooth, and the dynamic response was better. Funding: This research was funded by the National Natural Science Foundation of China, grant number 51665051, and Xinjiang Production and Construction Corps financial science and technology pro-jects major science and technology projects "Unveiling the List and Taking command", grant number 2022AA001.

Institutional Review Board Statement: Not applicable.
Data Availability Statement: All relevant data presented in the article are kept at the request of the institution and are therefore not available online. However, all data used in this manuscript are available from the corresponding authors.

Conflicts of Interest:
The authors declare no conflict of interest.