## 4 Online Control Strategy
### Online Controller Verification  
The adaptability to driving conditions of the real-time controller depends on the training data of the BP neural network. In this study, six sets of data representing three different driving conditions, including congestion, the urban area, and the highway, were used for training. To verify the practicability of the online controller, 10 New European Driving Cycles (NEDC) were used as the test condition. As shown in Figure 10, the NEDC is composed of four urban working conditions and one suburban driving condition, and the maximum vehicle speed under these conditions is 50 and 120 km/h, and the average vehicle speed is 19 and 63 km/h, respectively, which can represent urban and suburban highway conditions. The initial SOC is 0.9, and the target SOC is 0.3. The BP neural network control strategy was simulated and calculated on the basis of the simulation model built on  
Figure 8: Equivalence factor recognized by the neural network. Figure 9: Online controller based on the back propagation (BP) neural network. MATLAB/Simulink. At the same time, the DP-A-ECMS algorithm was used to obtain the optimal sequence of equivalent factors offline for test conditions. In Figure 11, the results of the online identification of the equivalent factors of the neural network under a short period of working conditions are selected. Figure 11a is a comparison of the equivalent factor identified by the BP neural network and the median value of the optimal equivalent factors by DP-A-ECMS. The mean square error (MSE) is usually used to measure the recognition accuracy of neural networks. The MSE can be expressed as  
\[MSE=\frac{1}{N}\sum_{i=1}^{N}{\left({S_{BP}(i)-{S_{mid}(i)}}\right)^{2}}, \tag{19}\]  
where \(S_{BP}\) is the equivalent factor recognized by the neural network, \(S_{mid}\) is the median value of optimal equivalent factors obtained by the DP-A-ECMS, and \(N\) represents the total time steps. The upper limit and lower limit of optimal equivalent factors obtained by the DP-A-ECMS are shown in Figure 11b. According to the conclusion of the previous analysis, as long as the equivalent  
Figure 11: Equivalent factors of the neural network strategy, (**a**) Recognition error of BP neural network; (**b**) Allowable range of equivalent factor. Figure 10: New European Driving Cycles (NEDC) condition. factor is within its upper and lower limits, the final output of the vehicle is the same. Therefore, the updated MSE can be expressed as  
\[MSE^{\prime}=\frac{1}{N}\!\sum_{i=1}^{N}\left\{ \begin{array}{cc}\left(S_{BP}(i )-S_{\max}(i)\right)^{2},&S_{BP}(i)>S_{\max}(i)\\ \left(S_{BP}(i)-S_{\min}(i)\right)^{2},&S_{BP}(i)<S_{\min}(i)\\ 0,&S_{\max}(i)<S_{BP}(i)<S_{\max}(i)\end{array} \right., \tag{20}\]  
where \(S_{\max}\) and \(S_{\min}\) are the upper limit and lower limit of the optimal equivalent factors, respectively. It can be seen from Figure 11 that the neural network has a certain error in the recognition, but most of the recognized equivalent factors fall within the upper and lower limits of the optimal equivalent factor. Intuitively, the upper and lower limits of the optimal equivalent factor provide a fault-tolerant space for the online recognition of parameters. From the mathematical formula, in the updated MSE (Equation (20)), the part where the recognition equivalent factor is within the upper and lower limits is 0, so its value will be greatly reduced compared to the true recognition error of the neural network (Equation (19)). That is to say, under the test conditions, due to the characteristics of DP-A-ECMS, the influence of the recognition error of the neural network on the system performance is greatly diminished, so the generalization performance of the neural network has been greatly improved. In contrast, the DP-based online control strategy has no fault tolerance space, and the recognition error of the neural network directly affects fuel consumption.