Fault Diagnosis of High-Power Tractor Engine Based on Competitive Multiswarm Cooperative Particle Swarm Optimizer Algorithm

With the rapid development of high-power tractor, the fault diagnosis of high-power tractor has become more and more important for ensuring the operating safety and eﬃciency. PSO is an iterative optimization evolutionary algorithm, which can iterate through diﬀerent particles to ﬁnd the optimal solution. However, there is only one population in the standard PSO algorithm, and the information exchange between the populations is relatively single, which can easily lead to the stagnation of the development of the population. In this paper, due to high-power tractor diesel engine fault complexity, fault correlation, and multifault concurrency, a multigroup coevolution particle swarm optimization BP neural network for diesel engine fault diagnosis method was proposed. First, the USB-CAN device was used to collect data of 8 items of the diesel engine under ﬁve diﬀerent working conditions, and the data was parsed through the SAE J1939 protocol; then, the BP neural network was reconstructed, and a competitive multiswarm cooperative particle swarm optimizer algorithm (COM-MCPSO) was used to optimize its structure and weights. Finally, the data of optimized neural network under ﬁve diﬀerent fault conditions show that, compared with BP neural network and PSO optimized BP neural network, the fault diagnosis of COM-MCPSO optimized BP neural network not only improves the network training speed, but also enhances generalization ability and improves recognition accuracy.


Introduction
e diesel engine is the most important part of the tractor. Unlike automobiles, tractor diesel engines have complex structures, complicated operating conditions, and harsh working conditions. On the contrary, the operating conditions of automobiles are gentle, and the working environment is suitable. Compared with automobiles, tractor engine and other key parts are more prone to failure. erefore, real-time and accurate diagnosis of tractor faults is more important than automobiles.
Cao used K-means clustering analysis to cluster the data and designed BP neural network to diagnose the running state of the diesel engine. e fusion of K-means algorithm and BP neural network algorithm was realized, which effectively improved the accuracy of diagnosis [1]. Nan collected the vibration signal, instantaneous speed signal, and cylinder pressure signal of the cylinder head of the tractor engine and diagnosed the fault signal via the RBF neural network [2]. Verbert used the weighted evidence synthesis method, determined the weight coefficient by the value of the degree of conflict between the obtained evidences, and finally employed D-S evidence theory to synthesize and thus improved the accuracy and reliability of fault diagnosis effectively [3]. Hui put forward the theory of online monitoring and fault diagnosis based on Dempster-Shafer. e Dempster-Shafer evidence theory was used for fusion diagnosis to diagnose the temperature regulating valve device of the diesel engine cooling system, which improved the reliability of system identification [4]. Particle swarm optimization algorithm is an iterative optimization tool with the characteristics of global optimization, which can solve the problem of neural network structure and weight optimization [5]. However, there is only one population in the standard particle swarm optimization algorithm. e characteristics of division and collaboration, multilevel, and diversity of evolution among the populations are not reflected; on the other hand, the information exchange in the group is limited to the information exchange between each individual and the best individual, which is likely to cause the stagnation of the population evolution [2]. erefore, a multiswarm cooperative particle swarm optimizer (MCPSO) was introduced.
In the current diesel engine fault diagnosis research, researchers used engine vibration signals to obtain engine fault data. For different parts of the fault, different sensors need to be placed for separate information collection. Due to the influence of external noise and the complexity of multisensor data collection, the authenticity of the fault information will be reduced. However, the CAN bus can connect the sensors of the engine together, and sensor nodes can be added on the CAN bus at will, which increases the collection range of fault data. In addition, the CAN bus is robust to subsystem faults and electromagnetic interference, which guarantees the authenticity of fault data and improves the efficiency of fault diagnosis. On the other hand, the optimization performance of the traditional K-means clustering analysis method greatly depends on the choice of K value and the selection of the initial clustering center, and the clustering result is worse than that of the PSO algorithm. erefore, in the process of fault diagnosis, how to ensure the authenticity of the fault data and the accuracy of the diagnosis results is particularly important. erefore, in view of the problems that diesel engine vibration signals are easily affected by noise and the diagnosis accuracy of existing neural network algorithms is low, this paper used CAN bus for information collection and competitive multiswarm coevolution particle swarm optimization algorithm to diagnose tractor faults. e aim is to improve the speed and accuracy of tractor fault diagnosis, which can effectively diagnose the fault in the early stage of the fault and improve the efficiency of tractor work.
Based on the above analysis, the research content of this article is as follows. (1) Under the five different tractor fault conditions, the CAN bus was used to collect the information of eight sensors such as diesel engine speed, engine load, and air flow; (2) analyzed the collected data through SAE J1939 protocol; (3) established BP and PSO-BP fault diagnosis models, respectively, and optimized the PSO optimization algorithm on the basis of both; (4) optimized the weights in the PSO algorithm and established the LDWPSO-BP neural network; (5) optimized the particle swarm in the PSO algorithm. First, the initial population of the particle swarm optimization algorithm was divided into four, namely, three slave swarms and one master swarm. e slave swarms updated the speed and position independently and sent the best particle information to the master swarm. e master swarm updated the speed and position according to the optimal particle information of the slave swarms and searched for the global optimal solution; (6) analyzed the fault diagnosis performance of BP neural network, PSO-BP neural network, LDWPSO-BP neural network, and COM-MCPSO-BP neural network and got the diagnosis result. e specific research process is shown in Figure 1.

Competitive Multigroup Coevolution
Particle Swarm Optimization Algorithm 2.1. Particle Swarm Optimization Algorithm. Particle swarm optimization is an intelligent algorithm based on population. Each member of the population is called a particle. Each particle is a potential feasible solution. e position of food in the population is expressed as a global optimal solution. In order to approach the position of the food, each particle learns constantly from the best position (pbest) and global best particle position (gbest) and finally approaches the position of the food [6]. e mathematical description of the particle swarm algorithm is as follows; assuming that the population size is N, at iteration time t, the position coordinates of each particle in the D-dimensional space can be expressed as , and the velocity of the particles is expressed as . e coordinate position x i (t) and speed v i (t) are adjusted at time t + 1 as follows: where c 1 and c 2 are the learning factors; r 1 and r 2 are random numbers between 0 and 1. Inertia weight ϖ in formula (1) describes the influence of particle inertia on particle velocity. e value can adjust the global and local optimization ability of PSO. e larger the value, the stronger the global optimization ability and the weaker the local optimization ability, otherwise, the stronger the local optimization ability. erefore, this paper adopts the strategy of linearly decreasing weight to dynamically adjust ϖ: at the beginning of the algorithm, ϖ can be given a large positive value. As the search progresses, ϖ can be gradually reduced linearly, thereby enabling the particles to explore the optimal value region at a faster speed in the early stage of the algorithm. And in the late stage of the algorithm, it can perform fine search in the optimal value area, so that the algorithm has a greater probability of converging to the global optimal solution position [7]. is algorithm is called Linear Decreasing Weight particle swarm optimization (LDWPSO), and the expression is shown in formula (3): where T max is the maximum evolutionary algebra; ϖ min is the minimum inertia weight; and t is the current number of iterations.

BP Neural
Network. e BP neural network adopts a three-layer topology [8,9], as shown in Figure 2, which is composed of an input layer, a hidden layer, and an output layer. In Figure 2, the number of input layer neurons is n, and the input vector is x ∈ R n , X � [

Output layer Hidden layer
Error backpropagation

Data stream forward propagation
Input layer Shock and Vibration .., x n ′ ] T , the number of output neurons is m, Y � [y 1 , y 2 , ..., y k , ..., y m ] T , the output vector is y ∈ R m , and the activation function adopts the S-shaped function: . (4) e weight between the input layer and the hidden layer is W ji , the threshold is θ j , the weight between the hidden layer and the output layer is W kj , the threshold is θ k ′ , and the neuron output of each layer satisfies During the training process, the training accuracy of the BP neural network is measured by the training error RMSE [10]: where Q is the number of training samples and t i m is the expected output of the i-th training sample at the k-th node of the output layer.

BP Neural Network Training Algorithm.
e BP algorithm is a supervised learning algorithm. e input learning samples are P: e learning algorithm is to correct the connection weight and threshold of the error between the actual output y 1 k , y 2 k , ..., y q k , ..., y p k , (k � 1, 2, ..., m) and the expected output, so that y q k is as close as possible to the required t q k . For the convenience of calculation, the threshold is written into the connection weight; let: θ j � W n+1,j , θ k � W h+1,k , x n+1 � −1, x h+1 � −1, then the neuron output of each layer is as follows: e q-th sample is input into the network to obtain the output y q k , (k � 1, 2, ..., m), the error of which is the sum of the squared errors of the output units, and the following formula is satisfied: For p learning samples, the total error is Assume that W sc is the connection weight between any two neurons in the network (that is, W ji and W kj ), including the threshold, and E is a nonlinear error function related to W sc . Let ε satisfy the following formula: Using the gradient method, the correction value for each W sc is where η is the step size.
e gradient method can change the total error in the direction of reduction until ΔE � 0. is learning method makes its vector W stable to a solution, but it is not guaranteed to be the global minimum solution of E, which may be a local smallest solution.

PSO-BP Neural Network Fault Diagnosis Model.
In the traditional BP neural network algorithm, the gradient descent method depends on the selection of the initial value; therefore, the training time is long, and it tends to fall into the local minimum and is difficult to select the number of hidden layers of the network structure. However, the PSO algorithm has the characteristics of fast convergence speed and powerful global search capabilities. e combination of the two will complement each other. Besides, BP neural network and PSO algorithm have certain commonality, and both of them are realized by simulating biological characteristics. e improved PSO algorithm can optimize the threshold and weight of the BP neural network, improving the shortcomings of the learning ability and convergence speed of the BP neural network, and giving full play to the powerful nonlinear mapping ability of the BP neural network [11].
PSO-BP neural network fault diagnosis is mainly divided into three parts: the determination of the neural network structure, the PSO-BP algorithm training network model, and the diagnosis process of the test sample [12], as shown in Figure 3.
Specific steps are as follows: (1) Initialize the algorithm parameters and determine the parameters of the BP neural network e evolution of a population often causes changes in other biological populations and can realize the information transmission and interaction between each other. In the traditional particle swarm optimization algorithm, the information that guides individual evolution only comes from the group, which makes it easy for the algorithm to produce "convergence" in the later stage. As a result, the evolutionary ability declines, and the performance of the algorithm is that the search is slow or even stagnant, falling into the local best point [13].
Inspired by the symbiosis in biological systems, this paper adopted a multiswarm coevolution model. In this model, the evolution of an individual is affected by its symbiotic group information as well as its own group. Based on the multiswarm coevolution model, PSO is embedded in it, hence, a multiswarm cooperative particle swarm optimizer (MCPSO).
First, based on the idea of mutual benefit and symbiosis, a multiswarm coevolution model was designed. In this model, a master-slave structure is used to represent the relationship between symbiotic groups. e entire population is divided into N subgroups (symbiotic groups), where Nm is the main group number and Ns is the subgroup number, and each subgroup contains the same number of individuals. In the evolution process, the symbiotic group that participates in the information exchange of other subgroups is called the master swarm, and the symbiosis that independently evolves and does not participate in the information exchange of other subgroups is called the slave swarm. e multiswarm coevolution model is shown in the figure below.
In Figure 4, each slave group executes independently the improved PSO algorithm (speed and position update) during the iteration process. Before all slave swarms perform the next status update, they send the best individual information found so far to the master swarm, and the master swarm updates the status based on the experience of these best individuals. e update method is as follows:

Shock and Vibration
where M is the master swarm; Q is other symbiotic groups except the master swarm; p M g is the optimal particle in the master swarm; p Q g is the optimal particle in Q; c 3 is the learning factor; r 3 is a random number between 0 and 1.
In addition, φ is the migration factor, indicating the participation of the symbiotic group, which is determined by the following formula: where Gbest M is the fitness value determined by p M g . Gbest Q is the fitness value determined by p Q g . In this update mechanism, each particle in the master swarm p updates its state according to its own optimal value, the optimal value in the master swarm, and the optimal value in the slave swarm. e self-swarm and other swarms are in a competitive relationship. In other words, the experience value of the symbiotic swarm will be adopted only when it is better than the value found by itself; otherwise, it will evolve in its own way; that is why it is called competitive MCPSO (COM-MCPSO). e specific optimization process of COM-MCPSO algorithm for BP neural network is as follows: (1) Import the processed fault data and establish a BP neural network (2) Initialize the population, divide the population into four equal parts randomly, and choose one of them as the master swarm while the others as the slave swarms (3) Each slave swarm finds the individual extremum and swarm extremum independently and updates the position and velocity (4) Before each slave swarm performs the next evolution, the global optimal particle (gbest) is sent to the master swarm (5) e master swarm selects the global optimal particle optimal value of each slave swarm and uses formula (16) to update the position and velocity of the master swarm (6) Calculate particle fitness (7) Determine whether the termination condition is met, if not, return to (6) (8) Use the optimization result as the initial value of the BP neural network (9) Train BP neural network based on the above conditions According to the above research and analysis results, the diesel engine fault data under five different working conditions are classified and diagnosed.

Experimental Data Collection Based on CAN Bus.
CAN bus is a network communication technology with high reliability, perfect function, and low cost, which is widely used in many fields such as automobile industry, industrial control aviation industry, and safety monitoring [14]. Figure 5 shows a typical CAN topology. As shown in the figure, the CAN bus includes two lines, CAN-H and CAN-L, and the node is connected to the CPU through the CAN controller.
At present, the CAN bus based on SAE J1939 protocol has been widely used in advanced internal combustion engines at home and abroad. rough the accessory ECU, the diesel engine monitoring system based on SAE J1939 protocol can obtain various operating parameters and fault information of diesel engines in real time. It provides a lot of information for the operator to understand and grasp the current state of the engine [15,16]. e J1939 protocol is transmitted in the form of a protocol data unit (PDU), where one PDU includes 8 bytes. In the J1939 application layer protocol, the parameter group is defined in detail, including the parameter update rate, effective data length, data page, PDU format, PDU details, default priority, and the content of the parameter group, and each parameter group PG has corresponding parameter group number (PGN) [17]. At the same time, each parameter of the J1939 protocol is assigned a number (SPN), which defines the physical meaning of the bytes in the PDU data field, including data length, data type, resolution, range, and reference label [18,19]. Details are shown in Table 1.
From the above parameters, the actual physical value corresponding to each parameter can be calculated. According to the original hexadecimal number of J1939 protocol parameter group PG, the corresponding design physical quantity can be obtained from formula (19) [20,21].
where Value is the actual value of the parameter; Res is the parameter resolution; R is the parameter value; Offset is the offset of the parameter. According to the parameter value range, the continuity parameter is generally represented by 1-4 bytes. In this regard, the article took Weichai WP6 diesel engine as the research object with the USB-CAN device as the medium and employed CANPro software to collect diesel engine information under five operating conditions. e experimental prototype of Weichai WP6 diesel engine is shown in Figure 6.
Five diesel engine operating conditions are normal f 1 , low oil pressure f 2 , and intake pipe blockage f 3 , high pressure oil pump failure f 4 , and piston ring broken f 5 . e collected information includes engine speed I 1 , engine load I 2 , coolant temperature I 3 , air flow I 4 , intake manifold pressure I 5 , intake camshaft position I 6 , exhaust camshaft position I 7 , and fuel supply advance angle I 8 .
en the collected information through SAE J1939 protocol was analyzed to obtain specific diesel engine fault information and the change trend of various data as shown in Table 2 and Figure 7.

Parameter Selection.
e structure of the selected BP neural network is 8-13-5, the transfer functions of the hidden layer and the output layer are tansig and logsig, and the trainlm function is selected as the training function. e conversion formula is as follows: where A 1 is the hidden layer output value; D is the input value of the input layer neuron;A 2 is the output value of the neurons in the output layer; B 1 , B 2 are the threshold matrix; W 1 , W 2 are weight matrix. According to the BP network structure, encode the particle length of the PSO algorithm, as shown in formula (21):    100 100 Engine load (%) 100

Shock and Vibration
where n is the number of input layer nodes; h is the number of hidden layer nodes; m is the number of output layer nodes.
From the above data, the particle length of the PSO algorithm is 187, and the population size is 40. e learning factor of the algorithm is c 1 � c 2 � 2, the maximum evolution number of the population is 300, the maximum iteration number of the BP neural network is 3000, the momentum coefficient is 0.9, the learning rate is 0.3, the learning rate increment is 1.05, and the target error is 10 −5 . From the diesel engine data of five different working conditions, 6 sets of data are randomly selected for each working condition. A total of 30 sets of data are used as training samples, and the remaining 20 sets are used as test samples to establish a COM-MCPSO optimized BP fault diagnosis model.

Comparative Experiment Analysis of Fault Diagnosis
Model. Taking the diesel engine fault data under five different working conditions as the diagnosis object, the diesel engine fault is encoded as a digital signal, which is convenient for the identification of the fault diagnosis model, and the fault is recorded as "1"; otherwise it is "0"; according to the structure of the BP neural network, the ideal output of the neural network is shown in Table 3.
In order to verify the effectiveness of the COM-MCPSO-BP neural network after parameter selection, it is compared with BP neural network (BPNN), PSO-BP neural network, and linear decreasing weight PSO-BP (LDWPSO-BP) neural network. Among them, BPNN, PSO-BP, LDWPSO-BP, and COM-MCPSO-BP used the same neural network topology 8-13-5. e training results are shown in Figures 8 and 9.
It is easy to know from the figure that, in the PSO algorithm, the population converges to around 0.17 after 70 iterations; in the LDWPSO algorithm, the population converges to around 0.168 after 40 iterations, and moreover, the convergence speed and convergence accuracy are better than those of the traditional PSO algorithm; In the COM-MCPSO algorithm, the population converges to around 0.16 after only 35 iterations, which is faster and more accurate than the LDWPSO algorithm. e BP neural network optimized by COM-MCPSO achieves the target accuracy after only 589 steps of training. As shown in Figure 6, compared with the other three algorithms, the calculation speed is faster and the accuracy is higher. Finally, the remaining 20 sets of data are used as test samples, and the test samples are input into BP, LDWPSO-BP, and COM-MCPSO-BP to compare the diagnostic results of three different neural networks. e diagnosis results are shown in Tables 4-7.
In order to verify the fault diagnosis performance of each neural network, four indexes of MAE, MRE, MSE, and accuracy are selected to check the performance of the network. e calculation method is shown in formulas (22)-(24). e diagnosis results are shown in Table 7.
(1) e absolute value of average error MAE: 100    where N is the total number of samples, d i is the Expected output, and y i is the actual output.
(2) e absolute value of the average relative error MRE: (3) e mean square error MSE: It can be seen from Table 8 that the recognition accuracy of the COM-MCPSO-BP neural network is the highest, reaching 94.84%, which is 15.88%, 10.11%, and 2.6% higher than that of BP, PSO-BP, and LDWPSO-BP, respectively. It shows that the COM-MCPSO-BP neural network has higher diagnostic accuracy than that of the other three neural networks and verifies the effectiveness of the multigroup coevolution particle swarm optimization algorithm.      fault complexity, fault correlation, and multifault concurrency. On the other hand, the COM-MCPSO algorithm with a strong global search ability was used to optimize the structure of the BP neural network, which overcomes the BP neural network's vulnerability to local minimum value, slow training, and other issues. Finally, the constructed COM-MCPSO-BP fault diagnosis model was applied to the fault diagnosis of high-power tractor diesel engines to achieve accurate identification of diesel engine faults. Experimental results show that the fault diagnosis algorithm has higher accuracy and stronger generalization ability, which is better than BP neural network and PSO optimized BP neural network, so that it can better achieve diesel engine fault diagnosis.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

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