## 3 Case Study
### Data Preprocessing
Too many variables can lead to the occurrence of data redundancy, which affects the effectiveness of the model. Correlation analysis is applied to derive the correlation between the data to extract the principal characteristics of the data and reduce data dimensionality and redundancy. The Pearson correlation coefficient is  
\[\rho=\frac{\text{cov}(X,Y)}{\sigma_{X}\sigma_{Y}} \tag{4}\]  
where \(\rho\) is the value of the correlation coefficient between columns \(X\) and \(Y\); \(\text{cov}(X,Y)\) is the covariance between \(X\) and \(Y\); \(\sigma_{X}\) and \(\sigma_{Y}\) are the standard deviations of \(X\) and \(Y\), respectively. The obtained Pearson correlation coefficient plot of the data from the original 20-dimensional input after removing meaningless numbers and fixed values is shown in Figure 15a. As can be seen from the heat map, the correlation coefficients of the total voltage, battery voltage plurality, and the average number of cell unit voltages reach 0.9984 and 0.9997. Therefore, this study removes the columns of the total voltage and the average number of cell unit voltages and retains only the columns of the battery voltage plurality for the subsequent experiments (Table 2). The Pearson correlation coefficient plot of the final used data is shown in Figure 15b. 5. Data sample generation. Sliding window operation is performed on the data. Every 40 rows in the same fault code are composed of sample data, such that row 1 to row 40 constitutes the first sample data; row 2 to row 41 constitutes the second sample data; by analogy, a total of 10,608 sample data are obtained as shown in Figure 12c. The data samples are converted into pictures of size 40 \(\times\) 40 \(\times\) 1 as inputs to the network to visualize the sample data and form the final training dataset; some of the picture samples are shown in Figure 16.  
Figure 15: Pearson correlation coefficient plot: (**a**) data from the original 20\(-\)dimensional input after removing meaningless numbers and fixed values; (**b**) the final used data. dataset division. After the above preprocessing steps, a total of 10,608 image sample data are collected. In addition, the ratio of the training dataset to the test dataset is 2:1. The dataset of this study contains a total of 10,608 samples, the number of training datasets is 7189. and the number of test datasets is 3419. The dataset contains a total of 9 categories of labels, and the numbers of the training dataset and test dataset corresponding to each category of labels are shown in Table 3. Fault code \"0\" indicates that the vehicle is operating normally; fault code \"16\" indicates that the vehicle is experiencing a SOC low alarm fault; fault code \"4096\" indicates that the vehicle has a DC\(-\)DC temperature alarm fault; fault code \"8192\" indicates that the vehicle is experiencing a brake system warning fault; fault code \"32,768\" indicates that the vehicle is experiencing a drive motor controller temperature alarm fault; fault code \"40,960\" indicates that the vehicle has a drive motor controller temperature alarm fault and a brake system alarm fault; fault code \"57,344\" indicates that the vehicle has a drive motor controller temperature alarm fault, a DC\(-\)DC status alarm fault and a brake system alarm fault; fault code \"65,536\" indicates that the vehicle is experiencing a high-voltage interlock condition alarm fault; fault code \"73,728\" indicates that the vehicle has a brake system alarm fault and a high-voltage interlock status alarm fault.