Issue 
Int. J. Metrol. Qual. Eng.
Volume 15, 2024



Article Number  12  
Number of page(s)  12  
DOI  https://doi.org/10.1051/ijmqe/2024012  
Published online  26 July 2024 
Research article
Optimized LSTM based on an improved sparrow search algorithm for power battery fault diagnosis in new energy vehicles
^{1}
School of Quality and Safety Engineering, China Jiliang University, Hangzhou 310018, China
^{2}
China Automotive Engineering Research Institute, Chongqing 401122, China
^{*} Corresponding author: zhoujuan@cjlu.edu.cn
Received:
22
December
2023
Accepted:
18
June
2024
Rapidly and accurately diagnosing power battery faults in new energy vehicles can significantly improve battery safety. Aiming at the collected power battery historical fault data information, a power battery fault diagnosis method based on an improved sparrow search algorithm (ISSA) optimized LSTM neural network is proposed. First, typical fault types are screened out through statistical fault sample data, and feature extraction is carried out by using wavelet packet unsupervised learning, solving the problem that long time series signal features are difficult to extract and recognize. Second, to solve the uneven distribution problem in initial population randomization, which can result in slow process of the algorithm, the initial position of the sparrow population is initialized using piecewise chaotic mapping with a homogenized distribution. Then, the population's optimal position in each iteration is perturbed using a variant of Gaussian difference, addressing the issue of the population easily converging to local optima. Finally, the hidden layer's optimal number of neurons of LSTM neural network is optimized by improving the sparrow search algorithm. Solving the problems of randomness and the difficulty in selecting the hyperparameters of the LSTM, a feature matrix is used as the input of the LSTM for model training and fault diagnosis and classification. The effectiveness of this method is verified by comparative experiments. The results indicate that the improved Sparrow search algorithm proposed can improve the capabilities of power battery fault diagnosis.
Key words: Power battery / fault diagnosis / Gaussian difference variation / sparrow search algorithm / LSTM neural network
© S. Zhou et al., Published by EDP Sciences, 2024
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
1 Introduction
China has emerged as the most global leader in the new energy vehicle sector, with the largest share of new energy vehicle ownership, representing 55% of the world's total [1]. However, there are still many development bottlenecks and problems. The safety and reliability of power batteries are crucial as they serve as key and fundamental components [2]. Lithiumion batteries are the preferred power battery in current power supplies. Fault diagnosis is a top priority for new energy vehicles as they rely on it as their energy resource.
Power battery fault diagnosis methods include knowledgebased, modelbased, and datadriven methods. Knowledgebased fault diagnosis methods rely on knowledge of the battery mechanism as well as knowledge and experience accumulated over time [3]. Reference [4] establishes rules for detecting anomalous temperature rises and voltage drops to predict battery failures. Based on the probability of battery failure in order to assess the risk of realtime battery failure. The fault diagnosis method based on knowledge requires the creation of an expert knowledge base. However, its accuracy is compromised by the limited availability of actual fault data for new energy vehicles. The modelbased fault diagnosis method starts with an equivalence circuit or electrochemical model of the lithium battery [5]. Various techniques, for instance, Kalman filtering and recursive least squares, are then employed to predict the state and determine the parameters of the battery model [6,7]. Reference [8] uses a recursive least squares (RLS) algorithm based on the mean difference model (MDM). Reference [9] develops a cell difference model (CDM) to determine cell microshortcircuit faults by estimating microshortcircuit (MSC) currents using the extended Kalman filter (EKF) and a recursive least squares (RLS) filter. Electrochemical models have also been used to diagnose battery faults such as overcharging, over discharging and internal short circuits [10]. Eventually, these methods assess the battery failure state by comparing the residual signals generated. Nevertheless, above methods require highly accurate cell models, and the large number of computations make power battery fault diagnosis difficult.
The development of machine learning and artificial intelligence has resulted in an increase in the use of datadriven fault diagnosis methods, which have been a research focus. Reference [11] establishes a power battery voltage abnormality fault diagnosis model using the theory of the LSTM and mean difference model (MDM), and its diagnostic accuracy was 90.91%. Reference [12] uses a residual long shortterm memory network to model the input‒output relationship of a proton exchange membrane fuel cell system and used the modelbased method to detect the faults of the fuel cell system, accelerating the training speed and improving the diagnostic accuracy. Reference [13] uses an LSTM neural network to predict the surface temperature and the internal temperature of a battery and determined the thermal fault of the battery by the temperature difference between the two and the temperature rise rate. In reference [14], a fault diagnosis method based on the isolated forest algorithm for lithium power batteries is proposed, and its overdetection effect in the fault diagnosis of lithium power batteries is verified. Reference [15] used the least squares method to merge the prediction results of ARIMA model and LSTM model to determine the discrepancy of individual cells and effectively improve the accuracy of voltage prediction. Compared with the methods based on the battery model, this type of method can theoretically effectively improve the fault diagnosis rate. In reference [16], a fault diagnosis method for electric vehicle power batteries based on a timefrequency diagram is proposed. It is verified by real vehicle data that the proposed method can identify the battery fault and advance the identification time. Reference [17] proposes a combined modelbased and datadriven fault diagnosis scheme for lithiumion batteries, and the several experiments of the single cell and the battery pack are conducted to verify the effectiveness and superiority of the developed method over the existing results. The fault types of lithiumion battery packs for electric vehicles are complex, and the treatment is cumbersome. Reference [18] presents a fault diagnosis method for the electric vehicle power battery using the improved radial basis function (RBF) neural network. Reference [19] proposes a standardized fault feature comparison method to quantitatively study the sensitivity and robustness of different fault diagnostic methods for lithiumion batteries under different failure degrees, ambient temperatures, state of charges, and aging levels. The diagnostic methods based on battery model, sample entropy and correlation coefficient are constructed. However, this more ideal effect is built on the basis of the availability of sufficiently large training data, which will inevitably increase the model training time. In addition, the robustness is poor, and the improvement of the fault diagnosis accuracy is limited.
Reference [20] optimizes a deep limit learning machine for diagnosing the SOH of lithiumion batteries under random loading conditions by using a sparrow search algorithm improved by elite inverse learning and the Cauchy–Gaussian variational strategy, which has a high accuracy. Reference [21] uses elite inverse learning to initialize the population and introduced a random wandering mechanism so that they could be executed alternately. Reference [22] employs a small habitat optimization technique to enhance the optimization effect of the multiobjective sparrow search algorithm. In reference [23], chaotic mapping is introduced to adjust the main parameters of SSA, and a logarithmic spiral strategy is introduced to improve the sparrow search mechanism, increase the diversity of the population, and improve the ability to search the surrounding space. Reference [24] introduces sinecosine and inverse learning strategies into the sparrow search algorithm and proposed a chaotic sparrow search algorithm that enhances the robustness and optimality search of the algorithm. Reference [25] proposes a novel algorithm to enhance the algorithm using reverse learning and chaos theory to enhance the stopping power of the SSA. However, due to their limitations, the above algorithms often suffer from the problems of excessive search time, ease of falling into local optima, and poor robustness during the iteration process.
A power battery fault diagnosis method is proposed based on the optimized LSTM neural network with improved sparrow search algorithm, and the current value, SOC value, average voltage value, battery temperature, maximum voltage number, minimum voltage number, maximum temperature number and minimum temperature number of five fault states in the power battery fault data set are used as detection signals. The feature extraction is performed by wavelet packet using unsupervised learning, the homogenized distribution piecewise chaotic mapping and Gaussian difference variant are optimized for the sparrow search algorithm, and the number of neurons in the hidden layer of the LSTM neural network is optimized by using the improved sparrow search algorithm, and the feature matrix is used as the input to the LSTM neural network for training the model, and the fault diagnosis and classification is performed. The experimental results show that by comparing the optimized LSTM neural network with the sparrow search algorithm and the LSTM neural network, the fault diagnosis accuracy can be effectively improved and the fault diagnosis time can be shortened. The main contributions of this paper can be summarized as follows:
This paper establishes an improved sparrow search algorithm optimized LSTM fault diagnosis method for power battery, which can effectively improve the fault diagnosis accuracy and shorten the fault diagnosis time.
Unsupervised learning is used for feature extraction, in order to tackle the problem that the features of long time series signals are difficult to extract and recognize in diagnosis.
To solve the problem of the slow astringent of the algorithm, the initial position of the sparrow population is initialized by piecewise chaotic mapping, improving the astringent speed and global search ability of the algorithm.
Perturbing the optimal position of the population at each iteration using Gaussian difference variants to solve the problem that the population tends to fall into local optima.
The number of neurons in the hidden layer of the LSTM neural network is optimized by improving the sparrow search algorithm to tackle the problems that hyperparameter selection is random and difficult in the LSTM neural network.
2 Fundamental principle
2.1 Principle of SSA
The SSA was proposed based on the behavior of sparrow groups in nature to obtain food and avoid predators through teamwork [26]. In the sparrow search algorithm, the better adapted sparrows are more likely to obtain food. These sparrows are referred to as discoverers. They lead the group to forage for food. There is a clear division of labor in the foraging process of a group of sparrows: discoverers, followers and scouts. Suppose a population of n sparrows can be expressed as:
where m is the dimension of the variables of the problem to be optimized.
Since the discoverers act as foraging guides for the population, to update the foraging search range, they need to constantly look for an expansive area and renewal their position. Therefore, in the iterative calculation of the sparrow population, the position renewal formula of the finder is:
where is the value of the nth element in the sparrow population, iter_{max} is the number of iteratable extremes of the population, a_{1} and a_{2} are uniform random numbers between (0, 1), R_{2} (R_{2}∊[0,1], the random value of a single individual sparrow) and ST (ST∊[0.5, 1]) are the range values of the hazard and the safety, respectively, and c is the range value obeying the normal distribution of random numbers.
The followers' position update formula is:
where and are the best and worst positions of the current global search by the discoverer, respectively; L is a 1 × d matrix where all elements are 1 s; and NP is the number of sparrow populations.
The location update formula for the early warning agent is:
where β is a step control parameter that conforms to the nature of a normal distribution, K ∊ [−1, 1] is a random value, f_{i}, f_{b}, and f_{w} are the current fitness value of the ith sparrow, the current global optimal fitness value, and the worst fitness value, respectively, and ε is a constant that is infinitely close to but not equal to zero.
2.2 Principles of LSTM neural networks
LSTM network introduces a gating unit to solve the long sequence data longterm dependency problem to avoid gradient vanishing or explosion during network training to preserve the different time scale information features of each loop unit [27]. The composition of the LSTM unit is shown as Figure 1.
The LSTM network is calculated as follows:
(1) The forgotten gate determines whether to retain the state information C_{t}_{–1} of the cell at the previous moment. The input of the forgotten gate is the hidden state h_{t}_{1} of the previous moment and the new input data x_{t}, and the output is the value f_{t}.
(2) The input gate processes the information learned from the input x_{t}, the previous moment state h_{t}_{–1}, and the output f_{t} of the forgotten gate. It then determines which information to retain to obtain the output memory gate value i_{t} and current cell state t.
(3) The output gate calculates the cell state h_{t} at the current moment and the output O_{t} based on the input x_{t}, the hidden layer state h_{t}_{–1} at the previous moment, and the cell state t at the current moment.
In the above equation, W_{f}, W_{i}, W_{c}, W_{o}, b_{f}, b_{i}, b_{c }and b_{o} equivalent to the weight matrix and bias of each gate, and σ denotes the sigmoid function.
Fig. 1 LSTM cell composition. 
3 Fault diagnosis model based on improved SSALSTM
3.1 Fault feature extraction
Figure 2 shows the process of transforming the raw state signals into network inputs by the wavelet packet decomposition method. First, the original signal is divided into multiple sample segments with a total of m data points. Then, the sample segments are decomposed by wavelet packet decomposition to obtain onedimensional wavelet coefficient matrices of the same length. Since the wavelet packet decomposition has 8 layers and the length of the original signal in the test is m, m wavelet coefficients of the 8th layer can be obtained, which leads to the dimension of the onedimensional wavelet packet coefficients matrix used as 1 × m.
Fig. 2 Signal conversion process. 
3.2 Improved SSA
3.2.1 Piecewise chaotic mapping
Chaos is a kind of random nonlinear phenomenon that exists universally in nature, and it can usually be detected in deterministic nonlinear systems [28]. The chaos phenomenon has the characteristics of stochasticity, ergodicity and regularity, and piecewise mapping, as a typical representative of chaotic mapping, has better chaotic characteristics and ergodicity than those of logistic onedimensional mapping. Figures 3 and 4 show the frequency diagrams of the generated values of piecewise mapping and logistic mapping, respectively. It can be known that the piecewise mapping has a more homogeneous distribution than the logistic mapping.
The SSA randomly generates the initial population, which may be unevenly distributed. Thus, the algorithm may converge slowly and easily fall into local optima. Piecewise chaotic mapping aims to generate a uniform partition in stochastic space as against the sequence of coincident numbers. To solve the problem that the initial population randomization of the sparrow search algorithm is prone to generating an uneven population distribution, which results in the slow convergence of the algorithm, the sparrow population' position is initialized by using uniform distribution piecewise chaotic mapping. This approach enhances the algorithm's ability to search globally and speeds up convergence. The specific process of sparrow population initialization by piecewise mapping is as follows. First, an mdimensional vector representing an initial individual is randomly generated in [0,1]. Then, for equation (4), each of its dimensions is substituted to iteratively derive i−1 new individuals and the values of the variables resulting from the homogeneous distribution of the slice mapping are mapped onto individual sparrows. The piecewise chaotic mapping expression is as follows:
where P ∈ (0, 1), x ∈ (0, 1), and x_{i}_{+1} is the individual sparrow after the i+1st mapping iteration.
Fig. 3 Piecewise mapping of frequency distributions. 
Fig. 4 Logistic mapping of frequency distributions. 
3.2.2 Gaussian difference variation
During the iteration process, the Gaussian differential variation algorithm perturbs the optimal position of the population, resulting in a larger bias in the neighborhood of the current mutant individual compared to the traditional differential variation algorithm. This increases the likelihood of the algorithm jumping out of the optimal location. When using the greedy approach, the population's optimal position is only updated if the perturbed position is superior, otherwise the optimal position stays unchanged. The Gaussian difference variant is expressed in the following formula:
where k_{1} and k_{2} denote the weight coefficients, g_{1} and g_{2} denote the Gaussiandistributed random numbers with a mean of 0 and a variance of 1, X* means the populationoptimal sparrow position, X_{rand} expresses the random sparrow position, and L^{t} expresses the position after Gaussian differential variation.
Following the perturbation, the position with the best fitness is selected as the optimal position for the current iteration. Equation (12) shows the method used to update the best position of the population.
where f(L^{t} ) and denote the fitness values of the postdisturbance and predisturbance positions, respectively.
3.3 Based on wavelet packet feature extraction and improved SSALSTM fault diagnosis model establishment
To obtain the optimal number of neurons in the hidden layer of the LSTM and to enhance the fault diagnosis accuracy of the LSTM neural network model, an unsupervised feature extraction and a supervised classification fault diagnosis method with improved SSALSTM is proposed. The implementation steps are as shown below:
The wavelet packet decomposition method is used to extract the timedomain signaling components in different frequency bands of the original fault data, and the decomposed signal is subjected to finite quantized feature extraction. The quantized feature samples are used as input to the model and are split into a training sample set and a test sample set.
The parameters of SSA, including population size, number of discoverers and followers, search range, search dimension, maximum number of iterations, learning rate, and other relevant parameters, are initialized.
According to equation (10), the sparrow population is initialized by homogenizing the distribution piecewise chaotic mapping and determining the individual sparrow position vector.
The fitness value of the i th sparrow, the current global optimal fitness value and the worst fitness value, f_{i}, f_{b}, and f_{w}, respectively, are calculated. Then, the optimal fitness, the worst fitness and their positions are determined. The discoverer position is updated according to equation (2). The optimal solution of the previous generation affects the position of the discoverer, and the follower and scout positions are updated according to equations (3) and (4), respectively
The optimal sparrow is perturbed using the Gaussian difference variant of equation (11), and the optimal sparrow position and fitness value are updated according to equation (12).
Finally, the optimal solution location is obtained. Determine whether the termination condition of the optimal solution is satisfied and output the optimal number of hidden layer neurons of the LSTM. If the termination condition of the optimal solution is not satisfied, back to step (4) and proceed to search.
The LSTM model is trained using the optimal hidden layer neuron number and learning rate obtained from the improved SSA search.
Fault identification and classification are realized through the softmax layer, and then the diagnosis of power battery faults is completed.
The improved SSALSTM fault diagnosis process is shown as Figure 5.
Fig. 5 Improved SSALSTM fault diagnosis flowchart. 
4 Experimental results and analyses
4.1 Description of data
To ensure the safe operation of new energy vehicles and promote the development of the new energy vehicle industry, China has established the National Regulatory Platform for New Energy Vehicles (hereinafter referred to as the platform). The data collection process of the platform mainly involves acquiring vehicle operation data based on multiple sensors, which are gathered in the Telematics Box (TBox) and then transmitted to the storage server of the platform via a wireless network. The platform currently includes 61 data items, including vehicle data, power battery system data, drive motor data and vehicle position data. Common data items include vehicle speed, accumulated mileage, SOC, total voltage of the power battery system, individual voltage, current, probe temperature value, and so on.
The battery fault data used in this paper are collected from this platform, and the extraction requirements of the invehicle data can be specifically referred to as GA/T 1998–2022 “Technical Specification for the Extraction of Electronic Data from Automotive Vehicles”. The data are collected once every 10 s, with a sampling accuracy of 1 mV. The power battery of a certain electric vehicle is finally collected with various parameter information under normal and fault states. The parameters include battery current, SOC, total voltage, single unit voltage, single unit temperature, highest voltage single unit number, lowest voltage single unit number, highest temperature single unit number, and highest temperature single unit number. The information from each parameter corresponds to the type of battery fault. The type of battery studied is a ternary material battery containing 174 single cells, with a standard operating voltage of 3.6 V for a single cell, an upper charging voltage of 4.15 V, a lower discharging voltage of 2.8 V, and a sustained discharging current that must not exceed 480 A in 10 s and 300 A in 60 s.
Five fault states, SOC jumping, SOC too high, SOC too low, single cell overvoltage and single cell undervoltage, are selected from the raw data, and each fault data point is labeled with a good corresponding label. The fault types are as follows: 1SOC jumping; 2SOC too high; 3SOC overvoltage; 4SOC overvoltage; and 5single cell undervoltage. Five fault states in the power battery fault data set are extracted by wavelet packet energy features for fault diagnosis.
The sample data under each of the five fault states are selected as 800 groups, totaling 4000 groups, and each group of fault data contains 8 fault features, totaling 32000 data points. Wavelet packet decomposition is performed on the obtained samples to obtain wavelet packet coefficients of the same length, and 4000×1×8 wavelet packet eigenvalues can be obtained by processing each fault sample segment, of which 3200 groups of data are selected for the training set and 800 groups of data are selected for the test set by the Randperm function. Some sample data are shown as Table 1.
Partial sample data.
4.2 Fault diagnosis based on ISSALSTM neural network model
When the training set samples are input, iterative training using the ISSA algorithm can result in the optimal position of the sparrow, i.e., the optimal number of hidden layer neurons of the LSTM neural network. The ultimate goal of fault diagnosis is to achieve the accurate classification of different kinds of fault types. The percentage of the optimized metric for fault diagnosis classification is used as the fitness function, as shown in equation (13). The improved SSAoptimized LSTM fitness curve is shown in Figure 6.
where curve is the optimal solution after each iteration.
As observed in Figure 6, after 2 iterations, the fitness value reaches the best for the first time, and the overall trend is more stable. From this, it can be concluded that when optimizing the LSTM hyperparameters, the improved SSA can be used for parameter optimization, allowing the algorithm to reach convergence faster, reducing the optimization time and better improving the optimization accuracy.
The classification capabilities of the LSTM neural network model are largely affected by the hyperparameters. Therefore, the number of neurons in the hidden layer of the LSTM neural network is trained using the improved SSA algorithm to iteratively find the optimal value. The parameters of the ISSALSTM model is shown as Table 2.
To assess the effectiveness of this method in testing accuracy, the power battery fault dataset is input into an optimized LSTM neural network using wavelet packet extraction and an improved sparrow search algorithm, the results of which are shown in Figures 7 and Figure 8. It can be observed that the improved sparrow search algorithm–optimized LSTM reaches the accuracy of 97% for the overall identification of the test.
Fig. 6 Improvement of parameter fitness iteration curve of SSA. 
Improved SSALSTM parameters settings.
Fig. 7 Comparison of training set results. 
Fig. 8 The test set predicts the error of the results. 
4.3 Comparative test analyses
To further validate the superiority of the wavelet packet decompositionbased and improved SSALSTM fault diagnosis method and to assess the fault feature extraction and recognition abilities of the model, the capability of the optimized LSTM with the SSA and the single LSTM neural network with the same fault diagnosis method used in this paper are tested using the same data and fixed ratio of the training and test sets. In the comparison experiments, the same test conditions are used. The neural network model test parameters are shown as Table 3, and results of the test are shown as Figures 9 and Figure 10.
From Figures 7–Figure 10, it can be observed that the proposed improved SSALSTM fault diagnosis model has the best classification effect compared to that of the other 2 models, with a value of 97%. The correct diagnosis rates of SSALSTM and LSTM are 96.25% and 94.625%, respectively. The algorithm in this paper can perfectly distinguish 5 different fault types, while the remaining 2 methods are slightly less effective. It can be shown that the improved SSALSTM has higher reliability and superiority for power battery fault diagnosis.
The diagnostic performance of the models is evaluated by the confusion matrix, accuracy, and diagnostic time, and the different models' confusion matrix is shown as Figure 11, where displays the number of predicted and real fault types on the horizontal and vertical axis, respectively. The diagonal line represents the number of accurately classified samples, while the offdiagonal line represents the number of incorrectly classified samples. Table 4 shows the accuracy and diagnosis time of different models.
Based on the results presented in Figure 12 and Table 4, it is evident that the accuracy of the proposed ISSALSTM model has significantly improved to 97%, surpassing other fault diagnosis models. Furthermore, the ISSALSTM model proposed in this study exhibits the shortest diagnosis time when compared to other models, and showing the model has good robustness. Therefore, the proposed method has good credibility and accuracy in engineering.
Neural network model parameters.
Fig. 9 (a) SSALSTM tests the classification results; (b) SSALSTM tests the classification result error. 
Fig. 10 (a) LSTM tests the classification results; (b) LSTM tests the classification result error. 
Fig. 11 Confusion matrix of each model. 
Different comparative experimental results.
Fig. 12 Comparison of three fault diagnosis models. 
5 Conclusion
Aiming at the problem of the low accuracy rate of power battery faults in new energy vehicles, a fault diagnosis method based on wavelet packet feature extraction and an ISSA to optimize a long shortterm memory neural network is proposed. The preprocessed fault data are input into a wavelet packet, and the stable high frequency and low frequency trend components are extracted to eliminate the interference of random disturbance signals. The unsupervised learning method is used for feature extraction to form the feature matrix, avoiding missing features caused by manual feature extraction, which affects the fault diagnosis effect. The SSA is improved by using the homogenized distribution of the piecewise chaotic mapping and Gaussian difference variant, which effectively increases the convergence speed and avoids the problem of the fault diagnosis accuracy. In addition, the problem of the algorithm being trapped in a partial optimum is avoided. The improved sparrow search algorithm optimizes the number of LSTM's hidden layer, adopts the stronger ability of the LSTM to process time series, explores the data features at a deeper level, and possesses stronger generalization and diagnosis abilities. The results of experiments show that when comparing the SSALSTM and LSTM fault diagnosis models, the fault diagnosis method based on wavelet packet feature extraction and the improved SSALSTM neural network has a better automatic feature extraction effect and higher fault diagnosis accuracy, and the proposed method has a certain application reference value.
The optimized LSTM model for sparrow search algorithm performs well in diagnosing power battery faults in new energy vehicles. However, further theoretical exploration is needed to optimize the model's internal structure and combine it with other optimization algorithms to improve fault diagnosis accuracy and shorten identification time. The introduction of migration learning techniques may also enhance the model's effectiveness in diagnosing power battery faults. Additionally, investigating the extension of the ISSALSTM model for fault diagnosis in other industries or domains can verify its generality and applicability.
Funding
This work was supported by Out of Control Accidents’ Scenario Reconstruction and Indepth Investigation Technology for New Energy Vehicle (No. 2021YFF0601102).
Conflicts of interest
All authors declare that they have no known competing financial interests.
Data availability statement
The data that have been used are confidential.
Author contribution statement
Juan Zhou: Writing – review & editing. Shengwei Zhou: Writing  original draft, Methodology, Software. Shun Zhang: Data curation, Investigation. Peng Wang: Resources, Investigation. Shengwei Zhou: Formal analysis, Validation.
References
 Z. Xie, J.H. Zhang, J. Xiong, Research on key technologies of lithiumion power battery system for new energy vehicles, Nonferrous Metals Eng. 10, 158 (2022) [Google Scholar]
 R. Xiong, W. Sun, Q. Yu, F. Sun, Research progress, challenges and prospects of fault diagnosis on battery system of electric vehicles, Appl. Energy. 279, 115855 (2020) [CrossRef] [Google Scholar]
 Z. Gao, C. Cecati, S.X. Ding, A survey of fault diagnosis and faulttolerant techniques—Part ii: fault diagnosis with knowledgebased and hybrid, IEEE Trans. Ind. Electron. 62, 3768–3774 (2015) [Google Scholar]
 J. Xiong et al., Failure detection for overdischarged Liion batteries, 2012 IEEE International Electric Vehicle Conference, 2012, pp. 1–5 [Google Scholar]
 M. Seo, M. Park, Y. Song et al., Modelbased internal short circuit detection of lithiumion batteries using standard charge profiles, I and Sustainable Technologies (SpliTech), 2019, pp. 1–5 [Google Scholar]
 Y. Wang, J. Tian, Z. Chen, X. Liu, Model based insulation fault diagnosis for lithiumion battery pack in electric vehicles, Measurement. 131, 443–451 (2019) [CrossRef] [Google Scholar]
 J. Tian, Y. Wang, D. Yang, X. Zhang, Z. Chen, A realtime insulation detection method for battery packs used in electric vehicles, J. Power Sources. 385, 1–9 (2018) [Google Scholar]
 M. Ouyang, M. Zhang, X. Feng et al., Internal short circuit detection for battery pack using equivalent parameter and consistency method, J. Power Sources. 294, 272–283 (2015) [CrossRef] [Google Scholar]
 W. Gao, Y. Zheng, M. Ouyang et al., Microshort circuit diagnosis for seriesconnected lithiumion battery packs using meandifference model, IEEE Trans. Ind. Electron. 66, 2132–2142 (2018) [Google Scholar]
 X. Feng, C. Weng, M. Ouyang, J. Sun, Online internal short circuit detection for a large format lithiumion battery, Appl. Energy. 168–180 (2016) [CrossRef] [Google Scholar]
 H. Zhang, H.X. Feng, F. Chen et al., Method for diagnosing abnormal voltage fault of electric vehicle power battery, Traffic Information Safety. 40, 148–156+172 (2022) [Google Scholar]
 R. Quan, Y.S. Le, T. Li et al., Fault detection of fuel cell system based on ResLSTM, J. Kunming Univ. Sci. Technol. 47, 68–77 (2022) [Google Scholar]
 N. Wang, Q. Yang, J. Xing, H. Jia, W. Chen, Thermal fault diagnosis method of lithium battery based on LSTM and battery physical model, 2022 41st Chinese Control Conference (CCC), 2022, pp. 4147–4152 [CrossRef] [Google Scholar]
 J. Jiang, Fault diagnosis method for lithiumion batteries in electric vehicles based on isolated forest algorithm, J. Energy Storage. 50, 104177 (2022) [Google Scholar]
 Z. Liu, Z. Zhang, D. Li, P. Liu, Z. Wang, Battery fault prognosis for electric vehicles based on AOMARIMALSTM in real time, 2022 5th International Conference on Energy, Electrical and Power Engineering (CEEPE), 2022, pp. 476–483 [CrossRef] [Google Scholar]
 Ch. Chang, Q. Wang, J. Jiang, Y. Jiang, T. Wu, Voltage fault diagnosis of a power battery based on wavelet timefrequency diagram, Energy. 278, 0360–5442 (2023) [Google Scholar]
 H. Jin, Z. Gao, Z. Zuo, Z. Zhang, Y. Wang, A. Zhang, A combined modelbased and datadriven fault diagnosis scheme for lithiumion batteries, IEEE Trans. Ind. Electron. 71, 6274–6284 (2024) [CrossRef] [Google Scholar]
 J. Wang, S. Zhang, X. Hu, A fault diagnosis method for lithiumion battery packs using improved RBF neural network, front, Energy. 9, 702139 (2021) [Google Scholar]
 Y. Kang, X. Yang, Z. Zhou et al., A comparative study of fault diagnostic methods for lithiumion batteries based on a standardized fault feature comparison method, J. Clean. Prod. 278, 123424 (2021) [CrossRef] [Google Scholar]
 J. Jia, S. Yuan, Y. Shi et al., Improved sparrow search algorithm optimization deep extreme learning machine for lithiumion battery stateofhealth prediction, Iscience. 25, 103988 (2022) [Google Scholar]
 X. Chen, L. Wu, X. Yang, Design of FOPID controller based on improved sparrow search algorithm, 2022 IEEE 5th International Conference on Information Systems and Computer Aided Education (ICISCAE), 2022, pp. 1–5 [Google Scholar]
 J. Dong, Z. Dou, S. Si et al., Optimization of capacity configuration of WindSolarDieselStorage using improved sparrow search algorithm, J. Electr. Eng. Technol. 17, 1–14 (2022) [CrossRef] [Google Scholar]
 A. Tang, T. Han, L. Xie, A Chaos sparrow search algorithm with logarithmic spiral and adaptive step for engineering problems, CMESComput. Model. Eng. Sci. 130, 331–364 (2022) [Google Scholar]
 A.D. Tang, T. Hang, D.W. Xu et al., Uav trajectory planning method based on chaotic Sparrow search algorithm, Appl. Comput. 41, 2128–2136 (2021) [Google Scholar]
 M. Qian, H.S. Huang, Q.S. Fan, Chaotic Sparrow search algorithm based on reverse strategy, Comput. Simul. 39, 333–339+487 (2022) [Google Scholar]
 L. Liu, S.Z. Sun, H. Yu et al., A modified fuzzy Cmeans (FCM) clustering algorithm and its application on carbonate fluid identification, J. Appl. Geophys. 129, 28–35 (2016) [CrossRef] [Google Scholar]
 X.X. Wu, Y.G. He, J.J. Duan, BiLSTM transformer DGA fault diagnosis method considering complex time series correlation characteristics, Power Autom. Equip. 40, 184–193 (2020) [Google Scholar]
 G.H. Zhu, W.H. Jing, S.C. Li, Service function chain optimization mapping algorithm based on improved Sparrow search algorithm, Comput. Appl. Res. 39, 2120–2123+2131 (2022) [Google Scholar]
Cite this article as: Shengwei Zhou, Juan Zhou, Shun Zhang, Peng Wang, Optimized LSTM based on an improved sparrow search algorithm for power battery fault diagnosis in new energy vehicles, Int. J. Metrol. Qual. Eng. 15, 12 (2024)
All Tables
All Figures
Fig. 1 LSTM cell composition. 

In the text 
Fig. 2 Signal conversion process. 

In the text 
Fig. 3 Piecewise mapping of frequency distributions. 

In the text 
Fig. 4 Logistic mapping of frequency distributions. 

In the text 
Fig. 5 Improved SSALSTM fault diagnosis flowchart. 

In the text 
Fig. 6 Improvement of parameter fitness iteration curve of SSA. 

In the text 
Fig. 7 Comparison of training set results. 

In the text 
Fig. 8 The test set predicts the error of the results. 

In the text 
Fig. 9 (a) SSALSTM tests the classification results; (b) SSALSTM tests the classification result error. 

In the text 
Fig. 10 (a) LSTM tests the classification results; (b) LSTM tests the classification result error. 

In the text 
Fig. 11 Confusion matrix of each model. 

In the text 
Fig. 12 Comparison of three fault diagnosis models. 

In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.