Development of Cooperative Controller for Dual-Motor Independent Drive Electric Tractor

. This paper proposes a control strategy of dual-motor independent drive electric tractor with cooperative control power take-oﬀ (PTO) and driving systems by investigating its structural characteristics to meet the ﬁeld operation requirements. In the following operation mode, the vehicle speed is taken as the input signal, and the PTO motor speed is followed by the vehicle speed at a proportional ratio. Four diﬀerent principles of collaborative control strategy-based stability control, namely, general closed-loop, conventional PID, adaptive fuzzy PID, and fuzzy neural network adaptive PID controls, are proposed to meet the requirements during speed change. Hardware design is divided into modules in accordance with circuit function. Software design is divided into application layer and underlying software, where the application software realizes the control strategy of the entire machine. The underlying software is based on the hardware driver of MC9S12XEP100 that connects the application layer software and hardware. A hardware-in-the-loop test platform based on dSPACE/DS1007 is built to test the function of the collaborative controller. Results show that the stabilization time of fuzzy neural network adaptive PID control is 0.024s. Compared with the three other control modes, the settling time decreases by 0.256, 0.034, and 0.028, respectively, and the overshoot decreases to 1.6%. Root locus analysis results show that the stability of the system is the best. Under the entire machine cooperative operation mode hardware in the loop test, the PTO motor maintains the ﬁxed target speed under the ﬁxed speed output mode, and the PTO speed in the following mode has a good follow-up to the vehicle speed. The controller realizes the control of the power output shaft to cut between the following and standard speeds. It also meets the requirement of cooperative control in the operation of dual-motor independent drive electric tractor.


Introduction
Compared with traditional tractors, pure electric tractors have compact structure, large power density, strong overload capacity, and high work efficiency [1][2][3][4]. e structures of pure electric tractors include single-motor, dual-motor coupled, and dual-motor independent drives [5][6][7]. e driving and power take-off (PTO) motors of dual-motor independent driving electric tractor independently provide mechanical power for the traction travel of the entire machine and the operation of agricultural implementation, and the control processes are independent of each other, which is beneficial to the speed control of the PTO. High degree of control freedom and effective improvement of electric tractor operating rate can be achieved through reasonable matching between the PTO and running speeds under different working conditions. e cooperative control relationship between its dual motors plays a decisive role in improving this performance.
Related studies have been performed for promoting the technological change in electric tractors [8][9][10]. A. N. Shishkov et al. designed a drive controller to adjust the control system, used a reluctance motor as the drive motor, and adopted an adjustable electric drive with multiple supporting torques to adjust the tractor power under extreme conditions [11]. Liu et al. used particle swarm optimization (PSO) algorithm to design a control strategy based on load torque to obtain high electrical conversion efficiency of an electric tractor motor [12]. Wu et al. introduced a driving torque management model for electric tractors based on field cruising operating conditions to eliminate the impact of the entire machine caused by driving torque changes and smoothen the torque changes [13]. Xu Liyou of Henan University of Science and Technology in China used PID and neural network control principles to develop a permanent magnet brushless motor controller on the basis of ploughing conditions that can meet the requirements of complex conditions and can rapidly converge at the target speed [14]. Shang Gaogao of Jiangsu University used fuzzy adaptive PID to construct a drive system control strategy for the operating mode of an electric tractor and achieved good target speed tracking results [15]. Chen Yanni et al. of China Agricultural University used a fuzzy PID algorithm to identify the required torque of a dual-motor coupled electric tractor at a fixed speed that effectively improves the response speed and accuracy of the target vehicle speed and traction resistance [16]. e above-related studies have mainly focused on single-motor and dual-motor coupling driven electric tractors, and neither of them has conducted research on dual-motor independent driving electric tractors.
is paper aims to investigate the dual-motor independent drive electric tractor cooperative control strategy and the speed and stability control between the drive and PTO motors, design and develop the entire machine cooperative controller, and conduct hardware-in-the-loop testing to provide technical reference for the subsequent design and drive system control of electric tractors.

Cooperative Control Strategy of Dual-Motor Independent
Driving Electric Tractor. Cooperative control mainly aims at the control problem of the power output shaft driven by a single motor and realizes the follow-up speed output and standard speed output functions of the PTO. An electric tractor with a dual-motor independent drive structure scheme is shown in Figure 1. A cooperative control strategy is designed for the structure of the dual-motor independent drive electric tractor. e constant speed and speed following modes of the PTO are constructed to decouple the drive system and PTO for meeting the requirements of different working conditions and improve the quality of operation. e PTO can be freely switched between the following type and the standard speed and improve the performance of different agricultural implementations and agronomy.
In the constant speed mode, the PTO motor provides a constant input speed for agricultural equipment, and a standard speed selection switch M is provided. e controller controls the PTO motor at output power of 540 r/min when the switch is set to state 1. e PTO motor outputs power at 1000 r/min when the switch is set to state 2.
In the speed following mode, the PTO motor speed follows the vehicle speed at a fixed proportion. e cab is provided with a following mode selection switch K. e speed following mode is activated when the switch is set to ON state. e speed following mode is closed when the switch is set to OFF state. In the speed following mode, the vehicle speed information is collected in real time through the wheel speed sensor, and running speed v is used as the input signal of the cooperative controller. e cooperative controller generates the expected speed module to convert it into the target speed signal required by the PTO motor and sends the control signal to the PTO motor driver that controls the PTO motor speed to follow the tractor running speed at a fixed proportion. A fuzzy neural network adaptive PID control method based on deviation e of the actual and expected speeds of the PTO motor is adopted to realize the cooperative control between the drive and PTO motors for outputting the desired speed.
where n p is the target speed of the PTO motor, r/min, k is the cooperative proportion coefficient, and i p is the speed ratio of the PTO motor reducer. During the speed following process, the cooperative controller performs real-time online monitoring and feedback.
e controller provides the driving motor a new control signal to reduce the tractor's running speed when the job load is large and the output power of the PTO motor is greater than the rated power, thereby reducing the output speed of the PTO motor and balancing the required power of the motor with the job load. e lifting system is controlled to upgrade the farm implement until the actual output power of the PTO motor is equal to the rated power, and then the lifting of the farm implement is completed when the running speed drops to the minimum threshold of the operating speed and the output power of the PTO motor has not returned to the rated power range. e actual output power of the PTO motor is less than the rated power, and the lifting system recovers the lifting height when the running speed returns to normal and falls within the specified threshold range.

PTO Motor
where m is the mass of the entire machine, kg, v is the driving speed of the tractor, m·s −1 , and F q , F T , F f , and F i are the wheel driving force, traction resistance, rolling resistance, and climbing resistance, N. e driving force is determined by the output torque of the driving motor, which can be expressed as where T is the output torque, N, i t is the total speed ratio of the transmission system, η m is the efficiency of the transmission system, and r w is the rolling radius of the drive wheel, m. e drive and PTO motors of the electric tractor are Brushless DC (BLDC) motors, and the commonly used twophase conduction star three-phase six-state type is used. e electromagnetic torque of the permanent magnet brushless motor under load is expressed as where T L is the load torque, N•m, J is the rotor moment of inertia, kg·m 2 , and B is the viscous resistance coefficient. e electromagnetic torque in the steady state of the motor can be expressed as e transfer function of the BLDC motor speed is obtained through Laplace transformation of the differential equation of the control system In the PTO motor speed control system, the speed closedloop control is adopted, with the target speed as the input signal and the actual motor speed as the feedback signal to prevent the speed overshoot of the PTO motor in the followup speed output mode. Under unit step ∆t, the next step will adjust the output, and the controller will conduct quantitative comparative analysis of the actual and target speeds and realtime adjustment of the output speed when the current speed immensely fluctuates and exceeds the preset value to enable the PTO motor to maintain the target speed.
Considering the smoothness of speed change during the speed following process, the impact of the entire machine caused by the torque change affects the smoothness of operation. is paper adopts a coordinated control strategy of the PTO motor response stability for control to reduce the overshoot and response time of the controlled system. e speed control principle of the PTO motor is shown in Figure 2.
is paper proposes four types of stability control methods with different principles and constructs common closed-loop, PID, adaptive fuzzy PID, and fuzzy neural network adaptive PID controls for the target output speed of the PTO motor to smoothen the speed changes in the PTO motor.
Tractor ploughing operation can be regarded as a constant speed operation. Traditionally, incremental PID control algorithm is used for speed closed-loop control, which can obtain better dynamic performance [17,18]. However, the BLDC motor adopted by PTO is a complex system with multiple variables, strong coupling, and nonlinearity. It itself is one of the main harmonic sources, which will generate a lot of electromagnetic interference during operation. e introduction of the differential link will improve the dynamic performance of the controller while also amplifying the noise signal. e three PID parameter corrections ∆K p , ∆K i , and ∆K d need to be continuously adjusted online to obtain satisfactory control results. Fuzzy adaptive PID control is adopted to improve the response speed and control effect of the PTO motor system [19,20]. e input interface of the 2D fuzzy controller constructed in this paper is deviation e and deviation rate ec, and the output interface is the three PID parameter corrections ∆K p , ∆K i , and ∆K d after online adjustment of the fuzzy rules.
During the test, the maximum target speed of the PTO motor is 1200 r/min when the hardware in the loop test is carried out on the speed control system of the unit negative feedback PTO motor. In order to match the input and output data of the fuzzy controller with the outside, the fuzzy controller uses a quantization factor and a proportional factor to proportionally transform the input/output value. e fuzzy set, universe of discourse, and membership function (MF) of input and output variables are defined as follows. e input and output are divided into seven fuzzy subsets, e � {negative large, negative middle, negative small, zero, positive small, positive middle, positive large} � {NB, NM, NS, ZO, PS, PM, PB}, the input discourse domain is [-6, 6], the output domain is [-1, 1], and the input and output MFs use triangles, as shown in Figure 3.
A fuzzy neural network overcomes the characteristics where fuzzy theory does not have self-learning ability and neural network cannot express human language [21]. In this paper, a neural network is introduced into fuzzy control, and fuzzy neural network adaptive PID control is constructed. e controller uses the nonlinear control characteristics of fuzzy control and the self-learning ability of backpropagation (BP) neural network to adjust the PID parameters online and in real time and optimizes the stability of the PTO motor speed control system [22].
Use the ANFIS Editor in Matlab to train ANFIS. According to the target training curve data, a Sugeno-type FIS describing the system is obtained through calculation and inference. e fuzzy rules and membership parameters of this FIS can be directly derived from ANFIS based on the known input-output data and the proposed conditions. e fuzzy subset is [7 7], the membership function is a triangular function, the error tolerance is 2, and the Epochs is 200. e input data includes the error of the speed and the error rate of change. e given training target curve and parameters in accordance with the dynamic response requirements of the motor are shown in Table 1.

Controller Hardware Design.
e hardware of the control platform includes the main control chip, minimum system, Controller Area Network (CAN) communication, and auxiliary circuit modules. Among them, the main control chip has a built-in entire machine control strategy program that processes the signals received by the entire machine controller and sends the control signals through the CAN bus.
e minimum system module is a circuit system capable of stably exerting the basic performance of the main control chip with the support of the minimum external circuits, including a power circuit, a clock circuit, a reset circuit, and a background debugging circuit. e function of the CAN communication module is to receive the message information transmitted by the CAN bus in accordance with the communication protocol, provide input signals for the program running in the main control chip, and send the output signals of the main control chip to the CAN bus. e auxiliary circuit module is composed of a filter circuit at the input terminal of each circuit module to improve the electromagnetic compatibility of the hardware platform. e hardware of the entire machine cooperative control platform is matched in accordance with the application environment and control strategy functions, as shown in Figure

Cooperative Controller Software Design.
e software of cooperative controller mainly includes application layer and bottom layer programs. e bottom program is to realize the control function in the form of driving hardware and the information interaction between the application and bottom layers through the bottom software interface. e application program sends corresponding instructions to the underlying program to control the hardware actions. At the same time, the underlying program transmits the hardware operating status and real-time data to the application program for enabling the application program to obtain the data changes and achieve the control goal. e application layer program adopts the Model-Based Design method. MATLAB/Simulink software is used to establish a cooperative control strategy model, Real-Time Workshop (RTW) toolbox is utilized to convert the model into an rtw file, and Target Language Compiler (TLC) is applied to convert the rtw file into a series of source files, including system object files, module object files, and TLC function libraries that support code generation. e generated source code is added to the engineering project of Freescale's official compiler CodeWarrior, the bottom program necessary for software operation in CodeWarrior is written, the application layer and bottom layer programs are combined, and the compile link is used and downloaded to the main control chip through the emulator to run the real machine. Figure 5 shows the engineering interface of CodeWarrior.

Hardware-in-the-Loop Testing
e electric tractor simulation model is mainly composed of models of the vehicle, battery, motor, gearbox, final drive, and wheels. Figure 6 shows the simulation model of the electric tractor. e simulation model contains 5 modules. Among them, module 1 is the driver model; module 2 corresponds to the motor simulation model, including three parts: drive motor, PTO motor, and calculation module; e hardware-in-the-loop test system uses a dSPACE real-time simulation test platform DS1007 to simulate the controlled object rather than the real drive motor, PTO motor, and battery pack connected to the cooperative controller to perform the simulation test of the entire cooperative control system. e DS1007 platform is a standard component system with DS1007 as the core processing board and supplemented with different types of input and output boards to meet different hardware-inthe-loop testing needs. A DS4002 board mainly deals with digital input and output signals. A DS2003 board receives analog input signals. A DS2103 board provides analog output signals. A DS4302 board is a dedicated CAN communication board.
e dSPACE system provides a seamless connection between the real-time simulation test system and MATLAB/Simulink software and realizes the transformation of MATLAB/Simulink simulation model through a real-time interface (RTI). e transformed simulation model is converted to the file format ControlDesk software realizes the monitoring and management of the test process, completes the reading and storage of data, and realizes the online adjustment of control parameters. e hardware-in-the-loop platform building process is divided into two parts, namely, model conversion and hardware connection. Model transformation sets the signal interface between the simulation model of the electric tractor and the cooperative controller through the CAN communication module of the Simulink environment support module of RTI1007. CAN communication settings are performed through the module of the DS4302 board in Simulink, and the baud rate, protocol type, and terminal resistance value are set in the establishment module to meet the basic requirements of CAN communication. In the CAN message receiving and sending module, the CAN channel and CAN controller number are selected, the message information is inputted in accordance with the communication protocol, and the CAN communication settings are completed. e simulation model is automatically transcoded on MATLAB/Simulink, the target file is generated, the test project is established by ControlDesk software, and the transcoded suffix is opened as a .sdf file. In the test project, a monitoring interface is set to monitor and manage the test process. e hardware-in-the-loop simulation platform structure is shown in Figure 7. e cooperative controller is powered by a 12 V DC power supply, and the information interaction between the DS1007 platform and the cooperative controller is realized through the CAN bus and connected to the upper computer through a network cable. e control effects of the target output speed stability control methods of four PTO motors with different principles are compared, and hardware-in-the-loop tests are performed on the unit negative feedback PTO motor speed control system. Table 2 shows the parameters of the power system of the proposed dual-motor independent drive electric tractor. e specific parameters of the BLDC motor used for testing are shown in Table 3. e output response curve of each step in the hardwarein-the-loop test control system is shown in Figure 8. From the perspective of time domain response performance indicators, the system has severe overshoot, settling time t s reaches 0.28 s, and the overshoot is as high as 49% under ordinary closed-loop control. Settling time t s under the conventional PID control mode is 0.058 s, the overshoot is 10.42%, the oscillation speed of the motor speed control system is fast, and the fluctuation is small. Settling time t s is 0.052 s under the adaptive fuzzy PID control mode, and the overshoot amount reduces to 4.3%. Time t s is adjusted to 0.024 s with the fuzzy neural network adaptive PID control, and the overshoot is reduced to 1.6%. Compared with the four sets of speed response curves, the fuzzy neural network adaptive PID control is adopted, and the system has faster response speed, smaller overshoot, and shorter adjusting time and improves the dynamic and steady-state performance of the motor. erefore, the fuzzy neural network adaptive PID control method is used for stability control of the speed fluctuation of the PTO motor during the cooperative control. e stability of the control system is verified, the root locus of the entire controlled system is analyzed, the dominant pole of the closed-loop system is determined in accordance with the performance indicators of the control system, and the adjustable parameters and the position of the open-loop zero pole of the system are obtained. e root locus is shown in Figure 9. e results show that the distribution of the root locus on the s-plane is located in the left half, and the system is stable regardless of the value of openloop gain k * . Comparative analysis shows that the closedloop zero point of the root trajectory is −4.2e + 04, and the two dominant poles p i are −1.76e + 04 and −0.621, respectively, under the fuzzy neural network adaptive PID control. e root locus moves to the left as a whole, the transition process rapidly decays, and the stability is improved. erefore, the fuzzy neural network adaptive PID is selected as the speed stability control strategy of the PTO motor in the dual-motor cooperative control strategy.
In the cooperative mode, the driver can switch the PTO between the following and standard speeds by controlling the mode signal selection switches M and K. e switching state is shown in Figure 10         the test, the target operation speed of the electric tractor is directly set by the upper computer ControlDesk in accordance with the test conditions, and the corresponding test results are shown in Figure 10(b). e analysis of the PTO motor output at 540 and 1000 r/min constant speed output and follow-up three sections is provided as follows: e 540 r/min standard speed output section corresponds to the test results of sections A-B and E-F in Figure 10(b) when mode switch K is set to state 1. e PTO speed is in A-B section, the PTO speed is raised from 0 to 540 r/min standard speed and maintained, the speed starts from 0 at 60 s, gradually accelerates to 7 km/h, and decelerates to 3.8 km/h, and the average speed of the entire process is 4 km/h. e PTO motor is maintained at a fixed target speed throughout the test.
At the corresponding time of point B, mode switch K is switched from state 1 to state 2. e 1000 r/min standard speed output section corresponds to the test results of sections B-C and D-E in Figure 10(b). e speed of the PTO rapidly increases from 540 r/min to the standard speed output of 1000 r/min. During the test, the speed of the vehicle fluctuates, and the speed of the PTO motor is unaffected. e PTO motor speed is maintained at the target speed to meet the requirements of the constant speed mode. e speed test process of the PTO in the following mode is performed in accordance with the vehicle speed at C-D sections.
e vehicle speed gradually increases from 8.2 km/h to 13.2 km/h and then decreases to 11.5 km/h. After a short time period, the vehicle speed rises again to 12.5 km/h and gradually decreases to 10.3 km/h. At this time, mode switch K is turned on, the PTO enters the follow-up speed mode, and the state of mode switch M is shielded. During the entire test process, the speed change curve of the PTO is synchronized with the C-D segment speed change, and the corresponding following speed results are shown in C-D section (Figure 10(b)), indicating that the PTO effectively implements the follow-up speed mode.
As shown in the above analysis of the working conditions of the cooperative mode in accordance with the two states of standard mode selection switch M, the cooperative controller realizes the PTO output mode with two fixed     speeds of 540 and 1000 r/min. e PTO is operated in the following speed output mode by controlling following mode switch K. e PTO motor can work well at the target speed, and the designed controller can accurately switch the PTO between the following and standard speeds, thereby meeting the cooperative control requirements of the dual-motor independent driving electric tractor. Figure 10(c) shows a diagram of the change in electric parameters of the power battery pack of the electric tractor. e change in the electrical parameters of the electric tractor during the PTO rotational speed test in the cooperative mode can be observed. In the entire test process, the current changes with the change frequency of the vehicle and PTO speeds, the state of charge decreases from 95% to 94.4%, and the voltage decreases from 347 V to 340 V without considerable fluctuations, showing that the operation of cooperative mode does not influence the load of electric tractor, and the electric tractor can normally operate with cooperative mode.

Conclusions
(1) A control strategy of dual-motor independent drive electric tractor with cooperative control PTO and driving systems is proposed. e fuzzy neural network adaptive PID is used to design the speed response stability control method of the PTO motor for the system scheme. (2) e circuit modules of power supply, CAN communication, and digital input are designed on the basis of MC9S12XEP100 microcontroller, and the hardware-in-the-loop simulation test control platform based on dSPACE/DS1007 is developed in accordance with the application environment and control strategy functions. e method of writing the bottom program in CodeWarrior is established in accordance with the cooperative control strategy, which is used to connect the application layer software and hardware. e cooperative controller is developed by combining the software and hardware. (3) A hardware-in-the-loop test is performed on the cooperative controller. e results show that the controller can control the power output shaft to freely switch between the following and standard speeds. In the constant speed mode, the PTO motor can maintain the target speed well. e speed stability control system of the PTO motor in the speed following mode has good dynamic and steady performance. e fuzzy neural network adaptive PID control is selected as the PTO motor speed response stability control strategy that executes the cooperative control strategy to deal with the speed fluctuation of the PTO motor during the cooperative control process, and the system root locus analysis has the best stability. Peak time t p of the system is reduced from 0.022 s to 0.014 s under the fuzzy neural network adaptive PID control, settling time t s is reduced to 0.024 s, and the overshoot is reduced from 10.42% to 1.6% of the conventional PID control, cooperative operation of the whole machine meeting the cooperative control requirements of the working process of the dual-motor independent drive electric tractor.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.