*4.2. Fault Diagnosis of Shift Hydraulic System Based on PSO-BP Neural Network*

Number of population particles and population particle number: The determination of particle number mainly depends on the complexity of fault type. If the total number of particles is small, it is not conducive to the overall optimization, and if the total number of particles is large, it will increase the calculation of the population. According to relevant data, generally, when the number of particles is maintained in the range of 20–40, the optimization result will be relatively good. If the problem is very complicated, the number of particles can be increased to more than 100 [27]. Aiming at the problem of fault diagnosis of the shift hydraulic system, this paper sets the number of population particles to 20.

The dimension of the particle: The value of the problem can be determined by the dimension of the problem. According to the fault diagnosis and data characteristics of the hydraulic system, the selected dimension is 81 in this paper.

The range of the particles: From the characteristics of the optimized problem, different change intervals for each dimension can be determined. According to the characteristics of the flow and pressure data of the shift hydraulic system, the range selected in this paper is (−5, 5).

Maximum speed *Vmax*: In general, the range of particles will be represented by *Vmax*, which is an important basis for determining the maximum distance that particles can move

in each iteration. According to the characteristics of the flow and pressure data of the shift hydraulic system, the range is selected as (−1, 1).

Learning factor c: generally, the learning factors c1 and c2 take the value of two.

Forty groups of test samples were inputted into the BP neural network optimized by particle swarm, and the resulting diagnosis results of the test samples are shown in Figure 5. The BP neural network optimized by the particle swarm has a strong ability to recognize the five fault modes of the shift hydraulic system. It mainly has deviations in the identification process of seal ring damage (Fault Type 3) and oil passage blockage fault (Fault Type 4), but it has a more obvious improvement in fault recognition compared to the unoptimized BP neural network model.

**Figure 5.** The effect of fault diagnosis of the PSO-BP neural network test sample.
