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

Authors: Maohua Xiao; Weichen Wang; Kaixin Wang; Wei Zhang; Hengtong Zhang
Journal: Shock and Vibration
 (2020)

---

## Abstract

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 efficiency. PSO is an iterative optimization evolutionary algorithm, which can iterate through different particles to find 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 five different 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 five different 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.


---

## Body

## 1. Introduction

The 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. Therefore, 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. The 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. The 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. The 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]. Therefore, 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. Therefore, 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. Therefore, 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. The 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. The slave swarms updated the speed and position independently and sent the best particle information to the master swarm. The 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. The specific research process is shown in Figure1.Figure 1
Research content flow chart.


## 2. 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. The 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].The mathematical description of the particle swarm algorithm is as follows; assuming that the population size isN, at iteration time t, the position coordinates of each particle in the D-dimensional space can be expressed as xi¯t=xi1,xi2,⋯,xid,⋯,xiD, and the velocity of the particles is expressed as vi¯t=vi1,vi2,⋯,vid,⋯,viD. The coordinate position xi¯t and speed vi¯t are adjusted at time t+1 as follows: (1)vi¯t+1=ϖvi¯t+c1r1pi¯t−xi¯t+c2r2pg¯t−xi¯t,(2)xi¯t+1=xi¯t+vi¯t+1,where c1 and c2 are the learning factors; r1 and r2 are random numbers between 0 and 1.Inertia weightϖ in formula (1) describes the influence of particle inertia on particle velocity. The value can adjust the global and local optimization ability of PSO. The larger the value, the stronger the global optimization ability and the weaker the local optimization ability, otherwise, the stronger the local optimization ability. Therefore, 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]. This algorithm is called Linear Decreasing Weight particle swarm optimization (LDWPSO), and the expression is shown in formula (3): (3)ϖ=ϖmax−ϖmax−ϖmin×tTmax,where Tmax is the maximum evolutionary algebra; ϖmin is the minimum inertia weight; and t is the current number of iterations.


### 2.2. BP Neural Network

The 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∈Rn, X=x1,x2,...,xi,...,xnT, the number of hidden neurons is h, x′∈Rh, X′=x1′,x2′,...,xi′,...,xn′T, the number of output neurons is m, Y=y1,y2,...,yk,...,ymT, the output vector is y∈Rm, and the activation function adopts the S-shaped function: (4)fu=11+exp−u.Figure 2
BP neural network structure.The weight between the input layer and the hidden layer isWji, the threshold is θj, the weight between the hidden layer and the output layer is Wkj, the threshold is θk′, and the neuron output of each layer satisfies (5)xj′=fuj=f∑i=1nWjixi−θj,(6)yk=fuk′=f∑j=1hWkjxj′−θk′.During the training process, the training accuracy of the BP neural network is measured by the training error RMSE [10]:(7)RMSE=∑i=1Q∑m=1Qymi−tmi2÷Q×m,where Q is the number of training samples and tmi is the expected output of the i-th training sample at the k-th node of the output layer.


### 2.3. BP Neural Network Training Algorithm

The BP algorithm is a supervised learning algorithm. The input learning samples areP: xi1,xi2,...,xiq,...,xip,i=1,2,...,n, and the expected corresponding outputs are tk1,tk2,...,tkq,...,tkp,k=1,2,...,m. The learning algorithm is to correct the connection weight and threshold of the error between the actual output yk1,yk2,...,ykq,...,ykp,k=1,2,...,m and the expected output, so that ykq is as close as possible to the required tkq. For the convenience of calculation, the threshold is written into the connection weight; let: θj=Wn+1,j, θk=Wh+1,k, xn+1=−1, xh+1=−1, then the neuron output of each layer is as follows: (8)xj′=fuj=f∑i=1n+1Wjixi,(9)yk=fuk′=f∑j=1h+1Wkixj′.Theq-th sample is input into the network to obtain the output ykq,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:(10)Eq=12∑k=1mtkq−ykq2.Forp learning samples, the total error is(11)E=12∑q=1p∑k=1mtkq−ykq2.Assume thatWsc is the connection weight between any two neurons in the network (that is, Wji and Wkj), including the threshold, and E is a nonlinear error function related to Wsc. Let ε satisfy the following formula:(12)ε=Eq=12∑k=1mtkq−ykq2,(13)E=∑q=1pεWq,xq.Using the gradient method, the correction value for eachWsc is (14)ΔWsc=−∑q=1pη∂ε∂Wsc,where η is the step size.(15)ΔE=∑q=1p∑∂ε∂Wsc=−η∑q=1p∑sc∂ε∂Wsc2≤0.The gradient method can change the total error in the direction of reduction untilΔE=0. This 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.


### 2.4. 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. The 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. The 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.Figure 3
PSO-BP neural network model.Specific steps are as follows:(1)
Initialize the algorithm parameters and determine the parameters of the BP neural network(2)
Select the mean square error of BP neural network as the fitness function of PSO algorithm(3)
Find individual extreme values and group extreme values(4)
Update the population speed and the position(5)
Calculate particle fitness(6)
Update the population speed and the position again(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)
After the training, enter the test sample into the neural network model corresponding to the individual for classification diagnosis


### 2.5. Multiswarm Cooperative Particle Swarm Optimizer Optimize BP Neural Network

In nature, the evolution of populations is mostly caused by the interaction of different populations. The 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. The entire population is divided intoN 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. The multiswarm coevolution model is shown in the figure below.In Figure4, 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. The update method is as follows:(16)vidM=vidM+c1r1pidM−xidM+øc2r2pgM−xidM+1−øc3r3pgQ−xidM,(17)xidM=xidM+vidM,where M is the master swarm; Q is other symbiotic groups except the master swarm; pgM is the optimal particle in the master swarm; pgQ is the optimal particle in Q; c3 is the learning factor; r3 is a random number between 0 and 1.Figure 4
Multiswarm coevolution model.In addition,φ is the migration factor, indicating the participation of the symbiotic group, which is determined by the following formula:(18)0,GbestQ<GbestM,0.5,GbestQ=GbestM,1,GbestQ>GbestM,where GbestM is the fitness value determined by pgM. GbestQ is the fitness value determined by pgQ.In this update mechanism, each particle in the master swarmp updates its state according to its own optimal value, the optimal value in the master swarm, and the optimal value in the slave swarm. The 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).The 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)
The 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 conditionsAccording to the above research and analysis results, the diesel engine fault data under five different working conditions are classified and diagnosed.


## 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. The 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].The mathematical description of the particle swarm algorithm is as follows; assuming that the population size isN, at iteration time t, the position coordinates of each particle in the D-dimensional space can be expressed as xi¯t=xi1,xi2,⋯,xid,⋯,xiD, and the velocity of the particles is expressed as vi¯t=vi1,vi2,⋯,vid,⋯,viD. The coordinate position xi¯t and speed vi¯t are adjusted at time t+1 as follows: (1)vi¯t+1=ϖvi¯t+c1r1pi¯t−xi¯t+c2r2pg¯t−xi¯t,(2)xi¯t+1=xi¯t+vi¯t+1,where c1 and c2 are the learning factors; r1 and r2 are random numbers between 0 and 1.Inertia weightϖ in formula (1) describes the influence of particle inertia on particle velocity. The value can adjust the global and local optimization ability of PSO. The larger the value, the stronger the global optimization ability and the weaker the local optimization ability, otherwise, the stronger the local optimization ability. Therefore, 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]. This algorithm is called Linear Decreasing Weight particle swarm optimization (LDWPSO), and the expression is shown in formula (3): (3)ϖ=ϖmax−ϖmax−ϖmin×tTmax,where Tmax is the maximum evolutionary algebra; ϖmin is the minimum inertia weight; and t is the current number of iterations.


## 2.2. BP Neural Network

The 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∈Rn, X=x1,x2,...,xi,...,xnT, the number of hidden neurons is h, x′∈Rh, X′=x1′,x2′,...,xi′,...,xn′T, the number of output neurons is m, Y=y1,y2,...,yk,...,ymT, the output vector is y∈Rm, and the activation function adopts the S-shaped function: (4)fu=11+exp−u.Figure 2
BP neural network structure.The weight between the input layer and the hidden layer isWji, the threshold is θj, the weight between the hidden layer and the output layer is Wkj, the threshold is θk′, and the neuron output of each layer satisfies (5)xj′=fuj=f∑i=1nWjixi−θj,(6)yk=fuk′=f∑j=1hWkjxj′−θk′.During the training process, the training accuracy of the BP neural network is measured by the training error RMSE [10]:(7)RMSE=∑i=1Q∑m=1Qymi−tmi2÷Q×m,where Q is the number of training samples and tmi is the expected output of the i-th training sample at the k-th node of the output layer.


## 2.3. BP Neural Network Training Algorithm

The BP algorithm is a supervised learning algorithm. The input learning samples areP: xi1,xi2,...,xiq,...,xip,i=1,2,...,n, and the expected corresponding outputs are tk1,tk2,...,tkq,...,tkp,k=1,2,...,m. The learning algorithm is to correct the connection weight and threshold of the error between the actual output yk1,yk2,...,ykq,...,ykp,k=1,2,...,m and the expected output, so that ykq is as close as possible to the required tkq. For the convenience of calculation, the threshold is written into the connection weight; let: θj=Wn+1,j, θk=Wh+1,k, xn+1=−1, xh+1=−1, then the neuron output of each layer is as follows: (8)xj′=fuj=f∑i=1n+1Wjixi,(9)yk=fuk′=f∑j=1h+1Wkixj′.Theq-th sample is input into the network to obtain the output ykq,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:(10)Eq=12∑k=1mtkq−ykq2.Forp learning samples, the total error is(11)E=12∑q=1p∑k=1mtkq−ykq2.Assume thatWsc is the connection weight between any two neurons in the network (that is, Wji and Wkj), including the threshold, and E is a nonlinear error function related to Wsc. Let ε satisfy the following formula:(12)ε=Eq=12∑k=1mtkq−ykq2,(13)E=∑q=1pεWq,xq.Using the gradient method, the correction value for eachWsc is (14)ΔWsc=−∑q=1pη∂ε∂Wsc,where η is the step size.(15)ΔE=∑q=1p∑∂ε∂Wsc=−η∑q=1p∑sc∂ε∂Wsc2≤0.The gradient method can change the total error in the direction of reduction untilΔE=0. This 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.


## 2.4. 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. The 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. The 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.Figure 3
PSO-BP neural network model.Specific steps are as follows:(1)
Initialize the algorithm parameters and determine the parameters of the BP neural network(2)
Select the mean square error of BP neural network as the fitness function of PSO algorithm(3)
Find individual extreme values and group extreme values(4)
Update the population speed and the position(5)
Calculate particle fitness(6)
Update the population speed and the position again(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)
After the training, enter the test sample into the neural network model corresponding to the individual for classification diagnosis


## 2.5. Multiswarm Cooperative Particle Swarm Optimizer Optimize BP Neural Network

In nature, the evolution of populations is mostly caused by the interaction of different populations. The 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. The entire population is divided intoN 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. The multiswarm coevolution model is shown in the figure below.In Figure4, 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. The update method is as follows:(16)vidM=vidM+c1r1pidM−xidM+øc2r2pgM−xidM+1−øc3r3pgQ−xidM,(17)xidM=xidM+vidM,where M is the master swarm; Q is other symbiotic groups except the master swarm; pgM is the optimal particle in the master swarm; pgQ is the optimal particle in Q; c3 is the learning factor; r3 is a random number between 0 and 1.Figure 4
Multiswarm coevolution model.In addition,φ is the migration factor, indicating the participation of the symbiotic group, which is determined by the following formula:(18)0,GbestQ<GbestM,0.5,GbestQ=GbestM,1,GbestQ>GbestM,where GbestM is the fitness value determined by pgM. GbestQ is the fitness value determined by pgQ.In this update mechanism, each particle in the master swarmp updates its state according to its own optimal value, the optimal value in the master swarm, and the optimal value in the slave swarm. The 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).The 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)
The 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 conditionsAccording to the above research and analysis results, the diesel engine fault data under five different working conditions are classified and diagnosed.


## 3. Experimental Data Analysis

### 3.1. 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.Figure 5
Typical CAN bus connection diagram.At present, the CAN bus based on SAE J1939 protocol has been widely used in advanced internal combustion engines at home and abroad. Through 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].The 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.Table 1
Parameter information of engine based on SAE J1939 protocol.
Data namePGNData length (byte)ResolutionData rangeOffsetEngine management systemEngine load6143311%0%–250%0Intake pressure6527012 kPa0–500 kPa0Coolant temperature6526211 C−40–200 C−40Engine speed6144420.125 rpm0–8031.875 rpm0Intake manifold pressure6514920.1 kPa0–6425.5 kPa0Intake camshaft position6523520.1 deg0–60 deg0Exhaust camshaft position6523620.1 deg−30–0 deg0Fuel supply advance angle6534420.1 deg0–15 deg0From 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].(19)Value=Re s×R+Offset,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. The experimental prototype of Weichai WP6 diesel engine is shown in Figure6.Figure 6
Schematic diagram of Dongfeng 1504-5 tractor and Weichai WP6 diesel engine. (a) Dongfeng Agricultural Machinery 1504-5 tractor. (b) Weichai WP6 diesel engine. (c) Structural diagram of Weichai WP6 diesel engine.
(a)(b)(c)Five diesel engine operating conditions are normalf1, low oil pressure f2, and intake pipe blockage f3, high pressure oil pump failure f4, and piston ring broken f5. The collected information includes engine speed I1, engine load I2, coolant temperature I3, air flow I4, intake manifold pressure I5, intake camshaft position I6, exhaust camshaft position I7, and fuel supply advance angle I8. Then 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.Table 2
Sample data of diesel engine failure under different working conditions.
Working conditionSerial numberSampleI1I2I3I4I5I6I7I8f11647.5327.49102.0033.1032036.67−18.906.002645.7727.59102.7232.7032036.58−18.906.753644.7527.53102.7633.1032236.45−18.933.754647.5327.53102.8132.7031936.78−19.007.505644.5227.49102.7432.9031836.55−19.148.25f211648.6430.15104.1233.5032536.12−19.106.5012644.6330.46104.4733.7032536.54−19.326.6513642.3231.24103.6933.4032436.89−19.246.7514645.8932.59105.6334.1032637.10−18.906.7515644.5231.54104.6434.3032336.78−18.895.50f321647.5626.35102.1032.1032036.32−18.676.7522644.3226.23102.1332.1032136.25−18.586.5523645.5426.12102.2232.1532036.35−18.696.8524645.8925.89102.0531.9031936.56−18.456.6525643.2126.02102.0231.8031837.02−19.136.60f431640.2326.38102.2332.5531236.12−19.206.8832640.3536.25102.1932.4031336.21−19.156.5533639.2426.45102.1232.4531236.24−19.126.4234639.5625.76102.0532.3031536.34−18.986.3935638.7626.08102.0032.2031336.45−19.056.22f546640.1226.85102.1032.4031837.05−18.966.9547638.4526.55102.1032.3331636.84−18.856.5048649.1427.67101.9833.6532236.56−18.876.3549645.1227.35101.8933.4532036.43−19.036.7550644.3227.32102.0333.4232036.23−19.106.55Figure 7
Variation trend of eight parameters under five different working conditions. (a) Air flow change trend. (b) Coolant temperature change trend. (c) Engine load change trend. (d) Engine speed change trend. (e) Exhaust camshaft position change trend. (f) Fuel supply advance angle change trend. (g) Intake camshaft position change trend. (h) Intake manifold pressure change trend.
(a)(b)(c)(d)(e)(f)(g)(h)


### 3.2. Parameter Selection

The 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. The conversion formula is as follows:(20)A1=tansigW1×D,B1,A2=logsigW2×A1,B2,where A1 is the hidden layer output value; D is the input value of the input layer neuron;A2 is the output value of the neurons in the output layer; B1, B2are the threshold matrix; W1, W2 are weight matrix.According to the BP network structure, encode the particle length of the PSO algorithm, as shown in formula (21): (21)L=n×h+h+h×m+m,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. The learning factor of the algorithm isc1=c2=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.


### 3.3. 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 Table3.Table 3
Expected output of neural network.
Fault typeExpected outputf110000f201000f300100f400010f500001In 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. The training results are shown in Figures8 and 9.Figure 8
Comparison of adaptability changes of three different algorithm.Figure 9
Error convergence curves of four different neural networks. (a) BP neural network error curve. (b) PSO-BP neural network error curve. (c) LDWPSO-BP neural network error curve. (d) COM-MCPSO-BP neural network error curve.
(a)(b)(c)(d)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. The BP neural network optimized by COM-MCPSO achieves the target accuracy after only 589 steps of training. As shown in Figure6, 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. The diagnosis results are shown in Tables 4–7.Table 4
BP neural network diagnosis results.
Fault typeActual outputf10.54300.4999000.0220f20.00020.99940.000100.0001f30.003200.65600.00010.0001f400.24860.50440.99990f500.28740.00770.00010.7498Table 5
PSO-BP neural network diagnosis results.
Fault typeActual outputf10.79490.4611000.0001f20.00010.9999000.0001f30.001300.67020.00010.0001f4000.50050.99990.0001f50.078400.01620.00310.7717Table 6
LDWPSO-BP neural network diagnosis results.
Fault typeActual outputf10.86680.44900.00090.00060.0002f20.00050.99980.000100.0001f30.014900.99850.13330f40.000100.48470.99430.0006f50.136900.00810.00030.7528Table 7
COM-MCPSO-BP neural network diagnosis results.
Fault typeActual outputf10.97470.250000.00010.0004f20.00010.99990.000200.0001f30.000100.99850.19830.0002f40.000400.49930.99560.0001f50.159800.00490.00090.7733In 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. The calculation method is shown in formulas (22)–(24). The diagnosis results are shown in Table 7.(1)
The absolute value of average error MAE:(22)MAE=1N∑i=1Ndi−yi,whereN is the total number of samples, di is the Expected output, and yi is the actual output.(2)
The absolute value of the average relative error MRE:(23)MRE=1N∑i=1Ndi−yiyi×100%.(3)
The mean square error MSE:(24)MSE=1N∑i=1Ndi−yi2.It can be seen from Table8 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.Table 8
Network performance comparison.
Neural network categoryMAEMRE (%)MSEAccuracy (%)BP0.52522.940.208978.96PSO-BP0.36472.4090.134284.73LDWPSO-BP0.32381.69790.110492.24COM-MCPSO-BP0.27451.46500.085794.84


## 3.1. 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.Figure 5
Typical CAN bus connection diagram.At present, the CAN bus based on SAE J1939 protocol has been widely used in advanced internal combustion engines at home and abroad. Through 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].The 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.Table 1
Parameter information of engine based on SAE J1939 protocol.
Data namePGNData length (byte)ResolutionData rangeOffsetEngine management systemEngine load6143311%0%–250%0Intake pressure6527012 kPa0–500 kPa0Coolant temperature6526211 C−40–200 C−40Engine speed6144420.125 rpm0–8031.875 rpm0Intake manifold pressure6514920.1 kPa0–6425.5 kPa0Intake camshaft position6523520.1 deg0–60 deg0Exhaust camshaft position6523620.1 deg−30–0 deg0Fuel supply advance angle6534420.1 deg0–15 deg0From 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].(19)Value=Re s×R+Offset,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. The experimental prototype of Weichai WP6 diesel engine is shown in Figure6.Figure 6
Schematic diagram of Dongfeng 1504-5 tractor and Weichai WP6 diesel engine. (a) Dongfeng Agricultural Machinery 1504-5 tractor. (b) Weichai WP6 diesel engine. (c) Structural diagram of Weichai WP6 diesel engine.
(a)(b)(c)Five diesel engine operating conditions are normalf1, low oil pressure f2, and intake pipe blockage f3, high pressure oil pump failure f4, and piston ring broken f5. The collected information includes engine speed I1, engine load I2, coolant temperature I3, air flow I4, intake manifold pressure I5, intake camshaft position I6, exhaust camshaft position I7, and fuel supply advance angle I8. Then 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.Table 2
Sample data of diesel engine failure under different working conditions.
Working conditionSerial numberSampleI1I2I3I4I5I6I7I8f11647.5327.49102.0033.1032036.67−18.906.002645.7727.59102.7232.7032036.58−18.906.753644.7527.53102.7633.1032236.45−18.933.754647.5327.53102.8132.7031936.78−19.007.505644.5227.49102.7432.9031836.55−19.148.25f211648.6430.15104.1233.5032536.12−19.106.5012644.6330.46104.4733.7032536.54−19.326.6513642.3231.24103.6933.4032436.89−19.246.7514645.8932.59105.6334.1032637.10−18.906.7515644.5231.54104.6434.3032336.78−18.895.50f321647.5626.35102.1032.1032036.32−18.676.7522644.3226.23102.1332.1032136.25−18.586.5523645.5426.12102.2232.1532036.35−18.696.8524645.8925.89102.0531.9031936.56−18.456.6525643.2126.02102.0231.8031837.02−19.136.60f431640.2326.38102.2332.5531236.12−19.206.8832640.3536.25102.1932.4031336.21−19.156.5533639.2426.45102.1232.4531236.24−19.126.4234639.5625.76102.0532.3031536.34−18.986.3935638.7626.08102.0032.2031336.45−19.056.22f546640.1226.85102.1032.4031837.05−18.966.9547638.4526.55102.1032.3331636.84−18.856.5048649.1427.67101.9833.6532236.56−18.876.3549645.1227.35101.8933.4532036.43−19.036.7550644.3227.32102.0333.4232036.23−19.106.55Figure 7
Variation trend of eight parameters under five different working conditions. (a) Air flow change trend. (b) Coolant temperature change trend. (c) Engine load change trend. (d) Engine speed change trend. (e) Exhaust camshaft position change trend. (f) Fuel supply advance angle change trend. (g) Intake camshaft position change trend. (h) Intake manifold pressure change trend.
(a)(b)(c)(d)(e)(f)(g)(h)


## 3.2. Parameter Selection

The 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. The conversion formula is as follows:(20)A1=tansigW1×D,B1,A2=logsigW2×A1,B2,where A1 is the hidden layer output value; D is the input value of the input layer neuron;A2 is the output value of the neurons in the output layer; B1, B2are the threshold matrix; W1, W2 are weight matrix.According to the BP network structure, encode the particle length of the PSO algorithm, as shown in formula (21): (21)L=n×h+h+h×m+m,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. The learning factor of the algorithm isc1=c2=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.


## 3.3. 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 Table3.Table 3
Expected output of neural network.
Fault typeExpected outputf110000f201000f300100f400010f500001In 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. The training results are shown in Figures8 and 9.Figure 8
Comparison of adaptability changes of three different algorithm.Figure 9
Error convergence curves of four different neural networks. (a) BP neural network error curve. (b) PSO-BP neural network error curve. (c) LDWPSO-BP neural network error curve. (d) COM-MCPSO-BP neural network error curve.
(a)(b)(c)(d)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. The BP neural network optimized by COM-MCPSO achieves the target accuracy after only 589 steps of training. As shown in Figure6, 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. The diagnosis results are shown in Tables 4–7.Table 4
BP neural network diagnosis results.
Fault typeActual outputf10.54300.4999000.0220f20.00020.99940.000100.0001f30.003200.65600.00010.0001f400.24860.50440.99990f500.28740.00770.00010.7498Table 5
PSO-BP neural network diagnosis results.
Fault typeActual outputf10.79490.4611000.0001f20.00010.9999000.0001f30.001300.67020.00010.0001f4000.50050.99990.0001f50.078400.01620.00310.7717Table 6
LDWPSO-BP neural network diagnosis results.
Fault typeActual outputf10.86680.44900.00090.00060.0002f20.00050.99980.000100.0001f30.014900.99850.13330f40.000100.48470.99430.0006f50.136900.00810.00030.7528Table 7
COM-MCPSO-BP neural network diagnosis results.
Fault typeActual outputf10.97470.250000.00010.0004f20.00010.99990.000200.0001f30.000100.99850.19830.0002f40.000400.49930.99560.0001f50.159800.00490.00090.7733In 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. The calculation method is shown in formulas (22)–(24). The diagnosis results are shown in Table 7.(1)
The absolute value of average error MAE:(22)MAE=1N∑i=1Ndi−yi,whereN is the total number of samples, di is the Expected output, and yi is the actual output.(2)
The absolute value of the average relative error MRE:(23)MRE=1N∑i=1Ndi−yiyi×100%.(3)
The mean square error MSE:(24)MSE=1N∑i=1Ndi−yi2.It can be seen from Table8 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.Table 8
Network performance comparison.
Neural network categoryMAEMRE (%)MSEAccuracy (%)BP0.52522.940.208978.96PSO-BP0.36472.4090.134284.73LDWPSO-BP0.32381.69790.110492.24COM-MCPSO-BP0.27451.46500.085794.84


## 4. Conclusion

The multiswarm cooperative particle swarm optimizer BP neural network effectively improves the accuracy of fault diagnosis concerning the high-power tractor diesel engine 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.



---

*Source: 8829257-2020-08-03.xml*