*4.3. Fault Diagnosis of Shift Hydraulic System Based on BAS-BP Neural Network Model*

Beetle antennae search (BAS) is more effective than particle swarm optimization. Because the beetle antenna search can accurately find the expected target without specific function form and gradient information, it is applied to various optimization models to improve the efficiency of fault diagnosis [28].

Combining the beetle antennae search algorithm with the neural network, the global search capability of the beetle antennae search algorithm was used to optimize the initial weights and thresholds of the neural network. Moreover, compared with the particle swarm algorithm, the beetle antennae search algorithm is much simpler, because it only requires one beetle, which greatly reduces the amount of calculation. Its specific process roadmap is shown in Figure 6.

The beetle antennae search algorithm only has two parameters that need to be set, namely, the distance, d0, between the two whiskers and the ratio constant, c, between the step size and the distance of the two whiskers. In this paper, d0 = 1 and c = 5.

When applying the BP neural network model optimized by the beetle antennae search algorithm to the fault diagnosis of the shift hydraulic system, the fitness curve of samples is shown in Figure 7.

**Figure 6.** BAS-BP neural network algorithm flowchart.

**Figure 7.** Fitness curve of BAS-BP neural network.

It can be seen from Figure 7 that when using the beetle antennae search algorithm to optimize the BP neural network, the optimization speed of its fitness value is slow, which is mainly caused by its lesser parameters and lesser calculation amount. Although the optimization speed of the beetle antennae search algorithm must be slow, its optimization calculation process is faster.

Forty groups of test samples were inputted into the BP neural network optimized by the beetle antennae search algorithm, and the resulting diagnosis results of the test samples are shown in Figure 8.

**Figure 8.** The effect of fault diagnosis of the BAS-BP neural network test sample.

It can be seen from Figure 8 that the BP neural network model optimized by the beetle antennae search algorithm must have the strongest ability to recognize the five fault modes of the shift hydraulic system. Compared with the unoptimized BP neural network model and the particle-swarm-optimized BP neural network model, the fault recognition accuracy rate of the oil channel blockage fault (Fault Type 4) can reach 100%. However, it has a large deviation in the process of identifying the seal ring fault (Fault Type 3). Its recognition accuracy rate for pipeline joint leakage (Fault Type 5) is no higher than that of the unoptimized BP neural network model and the particle-swarm-optimized BP neural network model.

From the above analysis, it can be seen that the optimized BP neural network model is better than the unoptimized BP neural network model for fault recognition. Additionally, the BAS-BP neural network model has the strongest ability to identify the fault of the oil channel blockage fault T4, which is conducive to further analysis to determine and eliminate the fault.

The comparison of the fault diagnoses of the test samples of the three neural network models is shown in Figure 9 and the test sample fault diagnosis correct rate of the three neural network models is shown in Table 2.

**Figure 9.** Contrast diagram of fault diagnoses for BP, PSO-BP and BAS-BP.


