Next Article in Journal
Are Electric Vehicles a Solution for Arctic Isolated Microgrid Communities?
Previous Article in Journal
A Study on the Vibration and Noise Reduction of Scrolling-Type Electric Compressor for Electric Vehicles
Previous Article in Special Issue
Research Progress on Thermal Runaway Warning Methods and Fire Extinguishing Technologies for Lithium-Ion Batteries
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Recognition of State of Health Based on Discharge Curve of Battery by Signal Temporal Logic

1
College of Automation Science and Engineering, South China University of Technology, Guangzhou 510641, China
2
National Demonstration Center for Experimental Economics and Management Education, Guangdong University of Finance and Economics, Guangzhou 510320, China
*
Author to whom correspondence should be addressed.
World Electr. Veh. J. 2025, 16(3), 127; https://doi.org/10.3390/wevj16030127
Submission received: 30 December 2024 / Revised: 14 February 2025 / Accepted: 22 February 2025 / Published: 24 February 2025
(This article belongs to the Special Issue Lithium-Ion Battery Diagnosis: Health and Safety)

Abstract

:
In order to study an algorithm that recognizes the state of health (SOH) of a battery rapidly and can be easily integrated into the micro-controller unit (MCU), it is proposed that signal temporal logic (STL) language is employed to describe the discharge curves, because the STL language is a formal language with strict mathematical definitions and the syntax is composed of simple logic, “and”, “or”, and “not”, under the constraints of time and parameter variation ranges, which is realizable and interpretable. Firstly, the drop voltage amplitude, drop time, voltage rebound amplitude, voltage rebound time, starting voltage, and ending voltage of the discharge curve are selected as the features of the STL formula, so the first-level and second-level primitive formulas are constructed to express the voltage of a battery in good health and poor health clearly. Secondly, the impurity measures of the information gain, misclassification gain, Gini gain, and robust extended gain are presented as the objective functions. Thirdly, the interpreter embedded in the MCU can interpret and execute each STL sentence. The voltage of a battery in good health rises slowly and falls slowly, while the voltage of a battery in poor health rises quickly and falls quickly. When the STL describes the discharge curve as “slow down slow up”, the battery is in good health. When the STL describes the discharge curve as “fast down, fast up”, the battery is in poor health. Among the different objective functions, the highest mean accuracy of the STL reaches 87.5%. In terms of the mean runtime, the extended misclassification gain and the extended Gini gain of the first-level primitives are 00851s and 0.0993, respectively. Under the same mean accuracy of 87%, the information gain and Gini gain of the second-level primitives are 0.2593 s and 0.2341 s. Compared with the existing machine learning algorithms, in terms of the mean runtime, the STL algorithm is superior to the CNN-BiLSTM-MHA model, RNN-LSTM-GRU model, and EC-MKRVM model. In terms of the mean accuracy, compared with the highest correct rate of the CNN-BiLSTM-MHA model, that is, 91.7%, the difference is 4%. As a means of quickly detecting whether the battery is in a healthy state, the accuracy difference is negligible, so the STL algorithm is apparently superior in terms of performance and realizability.

1. Introduction

The physical and chemical processes inside a battery during charging and discharging are complex and intricate. With many charges and discharges, the state of health (SOH) of the battery gradually deteriorates, the capacity fades, and the internal resistance increases, so the charge–discharge curves provide information about the voltage and capacity. Thus, as one of the indicators of battery performance, the SOH of the battery can be estimated and diagnosed by charge–discharge curves [1,2]. According to the new energy vehicle battery cycle life test standard, when the battery capacity of the battery is less than 80% of the initial capacity, the battery needs to be retired from the new energy vehicle [3]. Batteries can be recycled for secondary uses, such as energy storage devices, street lamps, and so on. On the basis of different capacities, the SOH of the battery is divided into two categories: batteries with an actual capacity less than 50% of the nominal capacity can be regarded as scrapped batteries, while batteries with an actual capacity greater than 50% of the nominal capacity can still be used. For cascade utilization of the retired batteries, it is necessary to recognize the SOH rapidly.
The methods of recognition of the SOH are mainly divided into three categories: direct measurement methods [4,5,6], model-based methods [7,8,9], and data-driven methods [10,11,12].
The direct measurement methods use the physical variables such as current, voltage, temperature, and electrochemical impedance spectroscopy (EIS) of the battery during the charge–discharge processes [13]. Sun et al. [14] proposed an estimation method of battery capacity and initial discharge of a series battery pack based on a partial reconstruction of the open circuit voltage (OCV) curve. Mo’ath et al. [15] presented a physics-informed smooth particle filter (SPF) framework for RUL prediction. EIS is one of the key battery parameters that can be identified by one of the non-destructive characterization techniques. Ning et al. [16] introduced a charge transfer factor and lithium-ion diffusion factor from EIS in the middle-frequency range and obtained the ohmic resistance and charge transfer resistance of the battery. However, these parameters are not only easily affected by the external environment, but also contain insufficient internal information about the battery, which, therefore, will affect the final estimation result [17].
The model-based methods, usually consisting of an inductor, resistor, and capacitor, are also used to estimate the SOH of the battery due to their low computational complexity and reasonable accuracy [18]. The ECM simulates the dynamic characteristics of the battery and identifies the electrical parameters such as resistance and capacity for the battery. Shuai et al. [19] proposed a battery discharge curve recognition method based on the improved Thevenin model, and developed the relationship between the parameters of the model and the charge state, battery surface temperature, and deformation. Ning et al. [20] developed an estimation algorithm for the SOH based on Thevenin’s battery model. The ECM method is usually combined with EIS to estimate the SOH of the battery. Ning et al. [21] used the ECM-EIS-based method to measure the solid electrolyte interface (SEI) resistance and capacitance in the mid-high frequency range, so the internal temperature of the battery is predicted. Li et al. [8] proposed an ECM method combined with EIS to estimate the SOH of the battery. Generally speaking, the advantage of the model-based methods is their high accuracy, but they require a more complex modeling process. In addition, the accuracy of these methods is also affected by the parameters of the battery system.
The data-driven methods directly use the data in the process of battery discharge, and process and analyze the data through machine learning and other methods to identify the battery state. There is also a method based on pattern recognition, which classifies the patterns of the battery discharge curve to identify the battery state. These algorithms include neural networks, deep learning, support vector machines, and Bayesian and Kalman filtering. Emanuele et al. [22] proposed a machine learning approach based on electrochemical impedance spectroscopy and 2D convolutional neural networks. Lu et al. [23] proposed an optimal switch control strategy based on deep reinforcement learning to consider the state of charge, state of health, and current distribution during parallel connection. Tan et al. [24] used deep learning to model the discharge characteristic curve of lithium-ion batteries, and the discharge characteristic curve is established by a recursive neural network–long short-term memory and gated recursive unit (RNN- LSTM- GRU) model. Dong et al. [25] selected the end voltage and discharge temperature as the characteristics based on the sample data of NASA batteries and presented a joint estimation of the state of charge and state of health of lithium-ion batteries based on a stacking machine learning (ML) algorithm. Zhang et al. [26] constructed an SOH prediction model based on a multi-kernel relevance vector machine and error compensation (EC-MKRVM) to improve the accuracy of the prediction of the SOH. However, the data-driven methods require a large amount of test data and manual annotation of training data, high computing power, and storage capacity in real-time applications.
In summary, the above methods need parameter identification for the complex models, or require a large amount of data and high computing power. It is challenging to develop an algorithm that recognizes the SOH rapidly and is easily integrated into a micro-controller unit (MCU). MCUs are widely used in the automotive industry. For example, the battery management system (BMS) needs to control charge and discharge, temperature, and battery balance. The master control board needs one MCU, and each slave control board also needs one MCU. However, the signal temporal logic (STL) language has the advantages of realizability and interpretability. STL language is a formal language with strict mathematical definitions. STL syntax is composed of simple logic, “and”, “or”, and “not”, under the constraints of time and parameter variation ranges, so it can express some attributes of dynamic systems. Yang et al. [27] presented a deep reinforcement learning algorithm and addressed the decision problem by using STL formulas with multiple logic AND operations. Kong et al. [28] used data to construct an STL formula that describes normal system behavior. This logic can be used to formulate properties such as “If the train brakes within 500 m of the platform at a speed of 50 km/h, then it will stop in at least 30 s and at most 50 s”. Thus, it can be seen that the STL is a specification language for defining and describing the behavior of dynamic systems in the domain of formal methods.
Therefore, as one of the indicators of battery performance, the SOH of the battery can be estimated and diagnosed by charge–discharge curves. In order to study an algorithm that recognizes the state of health (SOH) of a battery rapidly and can be easily integrated into the micro-controller unit (MCU), it is proposed that the signal temporal logic (STL) language is employed to describe the discharge curves, because the STL language is a formal language with strict mathematical definitions and the syntax is composed of simple logic, “and”, “or”, and “not”, under the constraints of time and parameter variation ranges, which is realizable and interpretable. Firstly, the features of the discharge curve, such as voltage drop amplitude, drop time, voltage rebound amplitude, voltage rebound time, starting voltage, and ending voltage are selected and represented by the simple logic “and”, “or”, and “not”, so the first-level and second-level primitive formulas are constructed to express the voltage of the battery in good health and poor health clearly. Secondly, the impurity measures of the information gain, misclassification gain, Gini gain, and robust extended gain are presented as the objective functions. Thirdly, the interpreter embedded in the MCU can interpret and execute each STL sentence. To verify the advantages of the STL, the algorithm is compared with the existing algorithm in terms of the mean runtime, the standard deviation of runtime, the standard deviation of accuracy, and the mean accuracy.

2. Methodology

2.1. Syntax of STL

Let R be the set of real numbers. For t R , R t is used to represent the interval t , ) . S = s : R 0 R n for n N . The elements of S are called signals, whose parameters can be denoted as times [29,30]. A signal at time t 0 can be represented as s [ t ] S , which denotes the signal shifted forwards in time by t time units, for example, s t τ = s ( τ + t ) for all τ R 0 .
Φ = T | f x ~ μ | ¬ Φ | Φ 1 Φ 2 | Φ 1 U [ a , b ) Φ 2 ,
where T is true and F is false. f x ~ μ is a predicate of a function f F defined in an n -dimensional real number space, μ R . ¬ and are the Boolean operations negation and conjunction. U [ a , b ) is the bounded temporal operator until.
s t | = T T ,
s t | = f x ~ μ f s t ~ μ ,
s t | = ¬ Φ ¬ s t | = Φ ,
s t | = Φ 1 Φ 2 s t | = Φ 1 s t | = Φ 2 ,
s t | = Φ 1 Φ 2 s t | = Φ 1 s t | = Φ 2 ,
Let S be the set of signals. If and only if s 0 | = Φ is a signal, s S said to satisfy an STL formula Φ . The temporal operators finally (F) and global (G) are defined as follows:
F [ a , b ) Φ T U [ a , b ) Φ ,
G [ a , b ) Φ ¬ F [ a , b ) ¬ Φ ,
Quantitative semantics can be represented by robustness. The robustness [14] is calculated:
r s , f ( x ) μ , t = f ( x ) μ ,
r s , f ( x ) < μ , t = μ f ( x ) ,
r s , Φ 1 Φ 2 , t = m i n r s , Φ 1 , t , r s , Φ 2 , t ,
r s , Φ 1 Φ 2 , t = m a x r s , Φ 1 , t , r s , Φ 2 , t ,
r s , G [ a , b ) Φ , t = m i n t 1 t + a , t + b ) r s , Φ , t 1 ,
r s , F [ a , b ) Φ , t = m a x t 1 t + a , t + b ) r s , Φ , t 1 ,
where r s , Φ , t represents the robustness of the signal s at time t with regard to STL formula Φ .
When the robustness of a signal is negative, it means that signal s deviates from STL formula Φ . The smaller the robustness is, the higher the degree of deviation of s with respect to Φ .

2.2. STL Primitives Based on the Decision Tree

The decision tree is represented as an STL formula [30]. The decision tree is shown in Figure 1. C p represents the signals that satisfy the STL formula. C n denotes the signals that do not satisfy the STL formula. Φ i ( i = 1,2 , , n ) represents an STL primitive. The steps of converting each node into an STL formula are as follows: (1) Perform a logical “AND” operation on all formulas represented by the nodes of the left subtree. (2) Perform a logical “NOT” operation on the formula represented by the node, and then perform a logical “AND” operation with the nodes of the right subtree. (3) Perform a logical “OR” operation between (1) and (2). According to the conversion steps, the STL formula converted from the decision tree in Figure 1 is
Φ = ( Φ 1 Φ 2 Φ 4 ) ( ( ¬ Φ 1 ) Φ 3 Φ 5 ) ( ( ¬ Φ 1 ) ( ¬ Φ 3 ) Φ 6 ) ,
According to the STL formula, the set of signals S can be split into S p , which satisfy the STL formula, and S n , which do not satisfy the STL formula. The data set is S = s i , l i i = 1 N , where N is the number of lithium batteries, s i is the discharge voltage curve of the i-th lithium battery, l i is the category of the i-th lithium battery, and l i C . The category C includes two categories: lithium batteries in good health and lithium batteries in poor health.
In the decision tree, each node uses finite partition rules to split signals by the STL primitives [30]. STL primitives are of two types: first level and second level. The primitives are defined as follows:
The definition of first-level primitives is
P 1 = F τ 1 , τ 2 f ( x ) ~ μ   o r   G τ 1 , τ 2 f ( x ) ~ μ , ~ > , ,
The parameters of the first-level primitives are τ 1 , τ 2 , μ . Their parameter space is θ 1 = τ 1 , τ 2 , μ | μ R , τ 1 < τ 2 , τ 1 , τ 2 R 0 . The first-level primitives F τ 1 , τ 2 f ( x ) ~ μ represent that the predicate f ( x ) ~ μ is true for at least one time in the interval τ 1 , τ 2 . G τ 1 , τ 2 f ( x ) ~ μ denote that f ( x ) ~ μ is true for all times in the interval τ 1 , τ 2 .
The definition of second-level primitives is
P 2 = F τ 1 , τ 2 G 0 , τ 3 f ( x ) ~ μ   o r   G τ 1 , τ 2 F 0 , τ 3 f ( x ) ~ μ , ~ > , ,
The parameters of the second-level primitives are τ 1 , τ 2 , τ 3 , μ . The parameter space is θ 2 = τ 1 , τ 2 , τ 3 , μ | μ R , τ 1 < τ 2 , τ 1 , τ 2 , τ 3 R 0 .
The second-level primitives F τ 1 , τ 2 G 0 , τ 3 f ( x ) ~ μ denote that f ( x ) ~ μ is true for τ 3 seconds, and its initial time is in the interval τ 1 , τ 2 .

2.3. Impurity Measures

The signals are split by the STL formula based on the decision tree. A good splitting criterion makes the nodes pure; in other words, the nodes primarily have signals that belong to the same class. Purity is usually determined by impurity measures.
Let ψ be a parametric signal temporal logic formula; then, parameter θ Θ will generate Φ = ψ θ . For example, given ψ = F τ 1 , τ 2 f 1 x > μ and θ = [ 1.1,2.2,3.3 ] , so ψ ( θ ) = F 1.1,2.2 f 1 x > 3.3 . Define a function called p a r t i t i o n ( S , ψ θ ), which obtains the proportions of signals that satisfy and do not satisfy ψ θ that are present in the set of signals S; that is, S T , S F = p a r t i t i o n ( S , ψ θ ) .
P T = S T S
P F = S F S ,
P C p = S C p S ,
P C n = S C n S ,
where S T = s i , l i S | s i | = Φ , S F = s i , l i S | l i | Φ , S C p = s i , l i S | l i = C p , and S C n = s i , l i S | l i = C n . The classical impurity measures [31] are defined as follows:
Information gain (IG)
I G S , Φ = H S T , F p · H ( S ) ,
H S = c C p , C n P c l o g P c ,
Misclassification gain (MG)
M G S , Φ = M R S T , F p · M R ( S ) ,
M R S = m i n C p , C n P c ,
Gini gain (GG)
G G S , Φ = G i n i S T , F p · G i n i ( S ) ,
G i n i S = c C p , C n P c ( 1 P c ) ,
The robustness can be used to evaluate the classification effect of splitting S using the STL primitives during the parameter optimization process of the STL primitives. We used the following formulas to redefine the partition weights and, consequently, obtained extended impurity measures.
P T = s S T | r s , Φ | s S r s , Φ ,
P F = s S F | r s , Φ | s S r s , Φ ,
P C p = s C p | r s , Φ | s S r s , Φ ,
P C n = s C n | r s , Φ | s S r s , Φ ,
Equations (28)–(31) are substituted into the definitions of the classical impurity measures, and the extended impurity measures can be obtained. The extended impurity measures based on robustness are denoted by the symbol r. For example, MGr represents the extended misclassification gain.

2.4. Recognition Based on STL Algorithm

The parameters of the STL primitives are obtained using the set of signals S , and the STL Algorithm is shown in Algorithm 1. The input parameters of the STL algorithm are as follows: (1) the set of primitives P; (2) impurity measures J; and (3) stop conditions of the algorithm stop.
Algorithm 1: constructSTLTree( · )
Iutput:
P—set of primitives
J—impurity measures
stop—stop conditions
S = s i , l i i = 1 N
h—current depth
output:a decision tree
1 If stop(h,S) then
2        t l e a f ( arg m a x c C { p S , c } )
3        return t
4   Φ * arg m a x ψ P , θ Θ J ( S , p a r t i t i o n ( S , ψ θ ) )
5 t n o n _ t e r m i n a l ( Φ * )
6   S T * , S F * p a r t i t i o n ( S , Φ * )
7 t.leftt c o n s t r c u t T r e e ( S T * , h + 1 )
8 t.right c o n s t r c u t T r e e ( S F * , h + 1 )
9 return t
The STL algorithm uses the set of signals S and the depth h of the current node as input. The impurity measures J are used as a cost function to find the optimal primitives. Therefore, a new nonterminal node can be obtained and used as the optimal set of primitives Φ * . Next, the partition is calculated according to the optimal STL formula. Finally, the STL algorithm recursively calls constructSTLTree() to construct the subtrees. The STL algorithm is instantiated by setting parameters (P,J) and the stop condition stop(h,S). The structure of the decision tree varies depending on the signals and the stop conditions.
The impurity measures J are used as a cost function to find the optimal primitives. The node optimization problem can be solved by a global nonlinear optimization algorithm. The optimization algorithm commonly used to solve the global nonlinear optimization problem is particle swarm optimization [16]. Therefore, we chose the particle swarm optimization algorithm as the node optimization algorithm. To apply the particle swarm optimization algorithm to the parameter optimization process of STL primitives, it is necessary to limit the search bounds of the parameter space of the primitives. These search bounds can be inferred from the signals but may vary depending on the application.

3. Results and Discussion

3.1. Experimental Setup

The detection circuit includes TMS320F28027, a buck circuit, a step-down circuit, a MOSFET drive circuit, a voltage and current regulation circuit, and an RS232 interface circuit. The main circuit of the detection circuit is the buck circuit, which controls the charge and discharge of lithium batteries. The buck circuit provides different input voltages for various chips. The MOSFET driving circuit is a voltage conversion circuit, which converts the output voltage of the MCU into the voltage of the driving MOSFET. The voltage and current regulation circuit includes a voltage and current detection circuit and dual channel digital lock-in amplifier, which can detect and regulate the voltage and current of the lithium battery in real time, and send it to the A/D channel of the MCU. The PC communicates with the detection circuit through the RS232 interface circuit, which can not only monitor the working state of the detection circuit, but also monitor the voltage and current of the lithium battery. The framework of the SOH detection circuit is shown in Figure 2.
The sampling resistor is usually used in series with the battery to keep the discharge current constant. In addition, the voltage U d i s applied to both ends of the battery is obtained during the discharge phase of the lithium battery. U d i s can be regarded as a time signal. The problem of battery SOH measurement is transformed into the problem of pattern recognition. Therefore, the detection circuit includes two techniques: firstly, the battery is charged at a high current by superimposing the small sine wave on the DC waveform. Charge current, which is constituted by fixed amplitude DC current and variant AC current, is employed to provide a unified comparison base. Secondly, HRPWM (high-resolution pulse width modulation) embedded in the TMS320F28027 MCU realizes charging control and wave formation synchronously [16].
The test bench used for the SOH detection circuit is shown in Figure 3. The detection circuit is responsible for maintaining the lithium battery discharge current at a constant value during the discharge phase. In addition, the lithium battery voltage data are transmitted to the PC until the end of the discharge phase. Then, the recognition effect of this method on the lithium battery voltage curve is verified on the PC. To ensure fast charging and measurement of the SOH of batteries, it is assumed that the battery is charged at a high current ratio. So, the battery is charged with the same high DC current of 1C (3.6 A) superimposed with an amplitude-identical sinusoidal voltage wave of 200 Hz. The principle is explained in detail in our previous study [16].

3.2. Data Description

The experiment uses 18650 lithium-ion batteries with a nominal capacity of 2600 mAh, which are made of LiFePo4 cathode and graphite anode material, as shown in Table 1. The sixteen lithium-ion batteries are all dismantled from power batteries, with different capacity fade levels. The usable capacities of the sixteen batteries are 696 mA·h, 703 mA·h, 714 mA·h, 742 mA·h, 1189 mA·h, 1427 mA·h, 1512 mA·h, 1568 mA·h, 1618 mA·h, 1678 mA·h, 1754 mA·h, 1729 mA·h, 1950 mA·h, 2105 mA·h, 2111 mA·h, and 2129 mA·h, respectively. In the experiment, the ambient temperature is fixed at 25 °C. The upper voltage limit is 4.2 V and the lower voltage limit is 3.0 V. The 16 batteries are discharged continuously for 0.5 min with a discharge current of 1 A, then they rest for 1 min, followed by continuous charging for 0.5 min with a charging current of 1 C (3.6 A), which can ensure fast charging and measurement of the SOH of the batteries.
Batteries with different capacities are batteries with different SOHs. According to the new energy vehicle battery cycle life test standard, when the battery capacity of the battery is less than 80% of the initial capacity, the battery needs to be retired from the new energy vehicle. On the basis of different capacities, the SOH of the battery is divided into two categories: batteries with an actual capacity less than 50% of the nominal capacity can be regarded as scrapped batteries, while batteries with an actual capacity greater than 50% of the nominal capacity can still be used. A battery with a nominal capacity of 2600 mAh is regarded as being in the poor SOH category if the usable capacity is less than 1300 mAh.

3.3. Comparison and Analysis

The discharge voltage curves of sixteen lithium-ion batteries in different SOHs are collected under the same conditions, as shown in Figure 4. It is observed that there are some differences in the voltage drop amplitude, drop time, voltage rebound amplitude, rebound time, start voltage, and end voltage of the discharge voltage curves. Compared with batteries in poor health, batteries in good health present smaller voltage amplitudes and shorter drop times when discharged. So, for the end voltage of batteries in good health, the voltage rebound amplitude is smaller, and the rebound time is shorter.
In order to clearly compare the two different SOHs of batteries, the discharge voltage curves of batteries with residual capacities of 2129 mAh and 696 mAh are presented in Figure 5. The battery with a capacity of 2129 mAh has a smaller voltage drop and shorter voltage drop time during discharge. At the end of discharge, the voltage rebound is small and the rebound time is short. In contrast, a battery with a capacity of 696 mAh shows a significantly greater voltage drop. At the end of discharge, the voltage rebound is significantly higher. Obviously, the shape and trend of the discharge curve are related to the remaining capacity of the battery. Therefore, the battery with a residual capacity of 2129 mAh is in good health, while the battery with a residual capacity of 696 mAh is in poor health.
This study presents that the voltage of a battery in good health rises slowly and falls slowly, while the voltage of battery in poor health rises quickly and falls quickly. That is because the increase in internal resistance will reduce the overall usable capacity of the battery over time and result in SOH degradation, and the reduction in battery capacity changes the discharge behavior. Therefore, the SOH of batteries can be identified according to the shape of voltage change curve. The discharge voltage curve, voltage drop amplitude, drop time, voltage rebound amplitude, rebound time, start voltage, and end voltage can be used as feature points to identify the SOH of lithium-ion batteries. Because the STL is employed to describe the discharge curves of the battery, the algorithm for SOH recognition is realized quickly and is easily integrated into MCU. When the STL describes the discharge curve as “slow down slow up”, the battery is in good health. When the STL describes the discharge curve as “fast down, fast up”, the battery is in poor health.
The data set is S = s i , l i i = 1 N , where N is the number of lithium batteries, s i is the discharge voltage curve of the i-th lithium battery, l i is the category of the i-th lithium battery, and l i C . The category C includes two categories: lithium batteries with an actual battery capacity less than 50% of the nominal capacity and lithium batteries with an actual battery capacity greater than 50% of the nominal capacity. The depth of the tree is set to no more than 5, and the stop condition of recursion is that the number of data values reaching the node is less than 5. When constructing the decision tree, the discharge voltage curve is divided into four parts by the 4-fold cross-validation method, and a reliable model is obtained. Each part of the experiment is the test set, and the rest is the training set in turn. Therefore, the discharge voltage curve is divided into a training set and test set, and the first- and second-level primitives are used as the experimental primitives set P .
In the process of optimizing the parameters of the primitives, the particle swarm optimization algorithm is used due to the large parameter space and the global nonlinear optimization problem. When using different primitive sets to construct the decision trees, by adopting information gain, Gini gain, and misclassification gain, the extended gain adds the robustness degree as the objective function of the particle swarm optimization algorithm. After the finite iterative search of the primitive parameters in the particle swarm optimization algorithm, the first-level and second-level primitives with the best recognition accuracy can be obtained. The STL algorithm is implemented on a computer with 3.0 GHz CPU and 16 GB RAM. The mean runtime, runtime standard deviation, accuracy standard deviation, and mean accuracy under different classical gains and extended gains are tested. The running time refers to the time required by the STL algorithm to execute four different objective functions, that is, the classical information gain, the Gini gain, the misclassification gain, and the extended gain with the added robustness. The mean accuracy and the accuracy standard deviation are important metrics to evaluate the performance of the model. The mean accuracy reflects the average level at which the model makes accurate predictions, shown in Equation (32), while the accuracy standard deviation measures how discrete these predictions are, shown in Equation (33).
M e a n   A c c u r a c y = N u m b e r   o f   C o r r e c t   P r e d i c t i o n s T o t a l   N u m b e r   o f   S a m p l e s ,
A c c u r a c y   S t a n d a r d   D e v i a t i o n = ( A c c u r a c y i M e a n   A c c u r a c y ) 2 T o t a l   N u m b e r   o f   S a m p l e s ,
The experimental results are shown in Table 1 and Table 2. The STL formulas with the best recognition effects are shown in Equations (34) and (35).
G 14.07,33.42 f x > 3.4946 F 20.26,43.27 f x < 3.5083 ,
F 10.83,30.07 G 0,5.72 f x < 3.5383 F 9.89,27.99 G 0,4.04 f x < 3.5083
As seen in Table 2, during the optimization process of the first-level primitives, the mean accuracy rate of the loss function IGr is greater than the extended gain IG, while the mean accuracy rates of both MGr and GGr are 87.5%. In terms of time consumption, this indicates that learning, training, and testing in the first-level primitives all take an extremely small amount of time, mostly below 0.1 s. In particular, the loss function type IG takes the least amount of time, only 0.0549 s. The standard deviations of the time consumptions for the four loss functions are all fewer than 0.04 s.
According to Table 3, compared with the first-level primitives, the second-level primitives have more parameters to be optimized. Consequently, the calculation process is more complex than that of the first-level primitives. So, the runtime of the second-level primitives increases; thus, the misclassification gain reaches 0.6096 s, and the standard deviation of the time increases. However, the second-level primitives improve the mean accuracy rate, so the mean accuracies of the 4-fold cross-validation for the four loss functions, IG, IGr, MGr, and GGr, all reach 87.50%.

3.4. Comparation of Different Objective Functions

As shown in Figure 6a, in the first-level primitives, the mean accuracies of the 4-fold cross-validation of the extended misclassification gain and the extended Gini gain are 87.5%, and their accuracy standard deviations are the same, as shown in Figure 6b. The mean runtime of training and testing the first-level primitives is less than 0.1065 s, which is very short, as shown in Figure 6c. Among the cost functions, that of information gain takes the least time, 0.0549 s. The runtime standard deviations of the different loss functions are all less than 0.04 s, as shown in Figure 6d. The above analysis shows that the algorithm has good performance in recognizing the SOHs of the lithium batteries.
As shown in Figure 7a,b, in the second-level primitives, the information gain, classical Gini gain, extended misclassification gain, and extended Gini gain have the highest mean accuracy of 87.50%. Therefore, the mean runtime of the algorithm increases. The mean runtime of misclassification gain reaches 0.6095 s, and the standard deviation of the runtime also increases, as shown in Figure 7c,d.
In summary, among the different objective functions, the highest mean accuracy reaches 87.5%. Both the extended misclassification gain and the extended Gini gain of the first-level primitives and the second-level primitives are 87.5%, respectively. In addition, the information gain and Gini gain of the second-level primitives are also 87.5%. In terms of the mean runtime, the extended misclassification gain and extended Gini gain of the first-level primitives are 00851 s and 0.0993, respectively. The correspondences of the second-level primitives are 0.4143 s and 0.5105 s, respectively. Under the same mean accuracy of 87%, the information gain and Gini gain of the second-level primitives are 0.2593 s and 0.2341 s. That is because the second-level primitives require more parameters to be optimized than the first-level primitives, so the mean runtime of the second-level primitives increases, but by far less than 1 min, and it improves the mean accuracy.

3.5. Comparison with the Classical Algorithms

The recognition algorithm using STL is compared with the existing algorithms presented in the literature [26,32,33], which established a multi-feature and convolutional neural network–bidirectional long short-term memory–multi-head attention (CNN-BiLSTM-MHA) model, a recursive neural network–long short-term memory and gated recursive unit (RNN- LSTM- GRU) model, and a multi-kernel relevance vector machine and error compensation (EC-MKRVM) model, respectively.
As shown in Table 4, the mean runtime and the mean accuracy of the STL algorithm are 0.2593 and 87.5%, respectively. In comparison, the mean runtime and the mean accuracy of the CNN-BiLSTM-MHA model are 2.6095 and 91.63%, respectively. Similarly, the mean runtime and the mean accuracy of the RNN-LSTM-GRU model are 2.2341 and 90.51%, respectively. And the mean runtime and the mean accuracy of the EC-MKRVM model are 1.5186 and 90.72%, respectively. Therefore, in terms of the mean runtime, the STL algorithm is superior to the CNN-BiLSTM-MHA model, RNN-LSTM-GRU model, and EC-MKRVM model. In terms of the mean accuracy, compared with the highest correct rate of the CNN-BiLSTM-MHA model, that is, 91.7%, the difference is 4%. However, as a means of quickly detecting whether the battery is in a healthy state, the accuracy difference is negligible.
In conclusion, the mean runtime of the STL algorithm is apparently faster than the other models. Because the STL algorithm is composed of the simple logic of “AND”, “OR”, and “NOT” under the constraints of time and parameter variation ranges, and can be transformed into interpretive language sentence by sentence in the MCU, which has an embedded interpreter without compilation and linking, it can be executed quickly. So, the STL algorithm can be easily integrated into the MCU. Therefore, when the STL describes the discharge curve as “slow down slow up”, the battery is in good health. When the STL describes the discharge curve as “fast down, fast up”, the battery is in poor health.

4. Conclusions

The aim of the paper is to study an algorithm that recognize the SOH of a battery rapidly and can be easily integrated into an MCU. As the charge and discharge curves provide important information about the performance and SOH of a battery, the SOH recognition method of describing the discharge curve using the STL language is proposed. STL language has the advantages of realizability and interpretability. The STL language is a formal language with strict mathematical definitions. STL syntax is composed of simple logic, “and”, “or”, and “not”, under the constraints of time and parameter variation ranges, so it can express some attributes of discharge curves.
Firstly, the drop voltage amplitude, drop time, voltage rebound amplitude, voltage rebound time, starting voltage, and ending voltage of the discharge curve are selected as features of the STL formula, so the first-level and second-level primitive formulas are constructed with the time constraints and parameter variation ranges. Secondly, to evaluate the primitive sentences, the impurity measures of the information gain, misclassification gain, Gini gain, and robust extended gain are presented as the objective functions. Compared with the existing algorithms, the mean runtime and the mean accuracy of the STL algorithm are 0.2593 and 87.5%, respectively. So, the mean runtime of the STL algorithm is apparently faster than the other models, though its mean accuracy is not as good as those models. Thirdly, the interpreter embedded in the MCU can interpret and execute each sentence, so the algorithm of SOH recognition based on the STL mode can be easily integrated into the MCU.
In terms of the mean runtime, although the STL algorithm is superior to the CNN-BiLSTM-MHA model, RNN-LSTM-GRU model, and EC-MKRVM model, in terms of the mean accuracy, the highest mean accuracy of the STL algorithm is 87.5% and is less than that of the data-driven models. In the future, more indicators of SOH will be taken into account and described by STL. For example, the charge transfer factor [16] and lithium-ion diffusion factor have been introduced into an active material and lithium-ion inventory in our previous project, to further improve the performance of the recognition algorithm.

Author Contributions

Conceptualization, J.N. and B.X.; Data curation, W.Z.; Formal analysis, J.N.; Funding acquisition, B.X.; Investigation, J.N.; Methodology, J.N.; Project administration, B.X.; Resources, W.Z.; Software, W.Z.; Supervision, B.X.; Validation, J.N., B.X. and W.Z.; Visualization, J.N.; Writing—original draft, J.N.; Writing—review and editing, J.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Guangdong Province, Grant Number: 2015A010106005.

Data Availability Statement

The data that support the funding of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ibraheem, R.; Strange, C.; Dos Reis, G. Capacity and Internal Resistance of lithium-ion batteries: Full degradation curve pre-diction from Voltage response at constant Current at discharge. J. Power Sources 2023, 556, 232477. [Google Scholar] [CrossRef]
  2. Huld, F.T.; Eleri, O.E.; Lou, F. New Insights into the Behaviour of Commercial Silicon Electrode Materials via Empirical Fit-ting of Galvanostatic Charge-Discharge Curves. ChemElectroChem 2023, 10, 202300393. [Google Scholar] [CrossRef]
  3. Wang, Z.; Zhao, X.; Fu, L.; Zhen, D.; Gu, F.; Ball, A.D. A review on rapid state of health estimation of lithium-ion batteries in electric vehicles. Sustain. Energy Technol. Assess. 2023, 60, 103457. [Google Scholar] [CrossRef]
  4. Dong, G.; Wei, J. A physics-based aging model for lithium-ion battery with coupled chemical/mechanical degradation mechanisms. Electrochim. Acta 2021, 395, 139133. [Google Scholar] [CrossRef]
  5. Lin, J.; Khoo, E. Identifiability study of lithium-ion battery capacity fade using degradation mode sensitivity for a minimally and intuitively parametrized electrode-specific cell open-circuit voltage model. J. Power Sources 2024, 605, 234446. [Google Scholar] [CrossRef]
  6. Xi, R.; Mu, Z.; Ma, Z. Lifetime prediction of rechargeable lithium-ion battery using multi-physics and multiscale model. J. Power Sources 2024, 608, 234622. [Google Scholar] [CrossRef]
  7. Simeng, Z.; Jiashen, T.; Bader, A. A review of equivalent-circuit model, degradation characteristics and economics of Li-ion battery energy storage system for grid applications. J. Energy Storage 2024, 101, 113908. [Google Scholar]
  8. Li, C.; Yang, L.; Li, Q. SOH estimation method for lithium-ion batteries based on an improved equivalent circuit model via electrochemical impedance spectroscopy. J. Energy Storage 2024, 86, 111167. [Google Scholar] [CrossRef]
  9. Jiang, C.; Wang, Y.; Sun, Z.; Chen, Z. Fractional-order equivalent circuit model for commercial sodium-ion batteries in a wide temperature range considering aging. J. Energy Storage 2025, 105, 114552. [Google Scholar] [CrossRef]
  10. Chen, L.; Bao, X.; Lopes, A.M.; Xu, C.; Wu, X.; Kong, H.; Ge, S.; Huang, J. State of health estimation of lithium-ion batteries based on equivalent circuit model and data-driven method. J. Energy Storage 2023, 73, 109195. [Google Scholar] [CrossRef]
  11. Deng, Z.; Hu, X.; Li, P. Data-Driven Battery State of Health Estimation Based on Random Partial Charging Data. IEEE Trans. Power Electron. 2022, 37, 3134701. [Google Scholar] [CrossRef]
  12. Tao, J.; Wang, S.; Cao, W.; Fernandez, C.; Blaabjerg, F.; Cheng, L. An innovative multitask learning—Long short-term memory neural network for the online anti-aging state of charge estimation of lithium-ion batteries adaptive to varying temperature and current conditions. Energy 2025, 314, 134272. [Google Scholar] [CrossRef]
  13. Chang, C.; Wang, S.; Tao, C. An improvement of equivalent circuit model for state of health estimation of lithium-ion batteries based on mid-frequency and low-frequency electrochemical impedance spectroscopy. Measurement 2022, 202, 111795. [Google Scholar] [CrossRef]
  14. Sun, J.; Tang, Y.; Ye, J. A novel capacity and initial discharge electric quantity estimation method for LiFePO4 battery pack based on OCV curve partial reconstruction. Energy 2022, 243, 122882. [Google Scholar] [CrossRef]
  15. Mo’ath, D.; Maher, G.; Ma’d, D. Physics-based model informed smooth particle filter for remaining useful life prediction of lithium-ion battery. Measurement 2023, 214, 112838. [Google Scholar]
  16. Ning, J.; Xiao, B.; Zhong, W.H. A rapid detection method for the battery state of health. Measurement 2022, 189, 110502. [Google Scholar] [CrossRef]
  17. Fu, Y.; Xu, J.; Shi, M. A fast impedance calculation-based battery state of health estimation method. IEEE Trans. Ind. Electron. 2022, 69, 7019–7028. [Google Scholar] [CrossRef]
  18. Wei, Z.; Zou, C.; Leng, F. Online model identification and state-of-charge estimate for lithium-ion battery with a recursive total least squares based observer. IEEE Trans. Ind. Electron. 2018, 65, 1336–1346. [Google Scholar] [CrossRef]
  19. Shuai, W.; Li, E.; Wang, H. An equivalent circuit model of a deformed Li-ion battery with parameter identification. Int. J. Energy Res. 2020, 44, 5500. [Google Scholar] [CrossRef]
  20. Ning, T.; Yebin, W.; Jian, C. One-shot parameter identification of the Thevenin’s model for batteries: Methods and validation. J. Energy Storage 2020, 29, 101282. [Google Scholar]
  21. Ning, J.; Xiao, B.; Zhong, W.H. Thermal Runaway Detection Method for Smart Electric Bicycle Charger. Eng. Rep. 2025, 7, e13082. [Google Scholar] [CrossRef]
  22. Emanuele, B.; Alessio, A.; Francesco, S. Uncertainty characterization of a CNN method for Lithium-Ion Batteries state of charge estimation using EIS data. Measurement 2023, 220, 113341. [Google Scholar]
  23. Lu, C.; Chen, J.; Chen, C.; Huang, Y.; Xuan, D. An active equalization method for redundant battery based on deep reinforcement learning. Measurement 2023, 210, 112507. [Google Scholar] [CrossRef]
  24. Tan, S.W.; Huang, S.W.; Hsieh, Y.Z. The Estimation Life Cycle of Lithium-Ion Battery Based on Deep Learning Network and Genetic Algorithm. Energies 2021, 14, 4423. [Google Scholar] [CrossRef]
  25. Dong, Y.; Chen, K.; Zhang, G. Joint Estimation of State of Charge and State of Health of Lithium-Ion Batteries Based on Stacking Machine Learning Algorithm. World Electr. Veh. J. 2024, 15, 75. [Google Scholar] [CrossRef]
  26. Zhang, L.; Sun, C.; Liu, S. State of Health Prediction of Lithium-Ion Batteries Based on Multi-Kernel Relevance Vector Machine and Error Compensation. World Electr. Veh. J. 2024, 15, 248. [Google Scholar] [CrossRef]
  27. Yang, Y.X.; Yang, T.G.; Zou, Y.Y. A Dual-Layer Network Deep Reinforcement Learning Algorithm for Multi-objective Signal Temporal Logic Tasks. Circuits Syst. Signal Process.: CSSP 2024, 43, 2585–2607. [Google Scholar] [CrossRef]
  28. Kong, Z.; Jones, A.; Belta, C. Temporal Logics for Learning and Detection of Anomalous Behavior. IEEE Trans. Autom. Control 2017, 62, 1210–1222. [Google Scholar] [CrossRef]
  29. Bombara, G.; Belta, C. Offline and Online Learning of Signal Temporal Logic Formulae Using Decision Trees. ACM Trans. Cyber-Phys. Syst. 2021, 5, 1–23. [Google Scholar] [CrossRef]
  30. Qin, J.; Xiao, B. Research on Motor Operating State Identification Using Signal Temporal Logic Method. Electron. Meas. Technol. 2021, 17, 7–13. [Google Scholar]
  31. Jones, P.K.; Stimming, U.; Lee, A.A. Impedance-based forecasting of lithium-ion battery performance amid uneven usage. Nat. Commun. 2022, 13, 4806. [Google Scholar] [CrossRef] [PubMed]
  32. Meng, H.; Geng, M.; Han, T. Long short-term memory network with Bayesian optimization for health prognostics of lithium-ion batteries based on partial incremental capacity analysis. Reliab. Eng. Syst. Saf. 2023, 236, 109288. [Google Scholar] [CrossRef]
  33. Wang, Y.; Ni, Y.; Zheng, Y.; Shi, X.; Wang, J. Remaining useful life estimation of lithium-ion batteries based on support vector regression optimized and ant lion optimizations. Proc. CSEE 2021, 41, 1445–1457. [Google Scholar]
Figure 1. STL formula based on the decision tree.
Figure 1. STL formula based on the decision tree.
Wevj 16 00127 g001
Figure 2. Framework of SOH detection circuit.
Figure 2. Framework of SOH detection circuit.
Wevj 16 00127 g002
Figure 3. Test bench for SOH detection circuit.
Figure 3. Test bench for SOH detection circuit.
Wevj 16 00127 g003
Figure 4. Discharge voltage curves from sixteen lithium batteries in different SOHs.
Figure 4. Discharge voltage curves from sixteen lithium batteries in different SOHs.
Wevj 16 00127 g004
Figure 5. Discharge voltage curves from the lithium batteries in good health (2129 mAh) and poor health (696 mAh), respectively.
Figure 5. Discharge voltage curves from the lithium batteries in good health (2129 mAh) and poor health (696 mAh), respectively.
Wevj 16 00127 g005
Figure 6. First-level primitives. (a) Mean accuracy. (b) Accuracy standard deviation. (c) Mean runtime. (d) Runtime standard deviation.
Figure 6. First-level primitives. (a) Mean accuracy. (b) Accuracy standard deviation. (c) Mean runtime. (d) Runtime standard deviation.
Wevj 16 00127 g006
Figure 7. Second-level primitives. (a) Mean accuracy. (b) Accuracy standard deviation. (c) Mean runtime. (d) Runtime Standard Deviation.
Figure 7. Second-level primitives. (a) Mean accuracy. (b) Accuracy standard deviation. (c) Mean runtime. (d) Runtime Standard Deviation.
Wevj 16 00127 g007
Table 1. Specifications of the 18650 batteries.
Table 1. Specifications of the 18650 batteries.
Battery CharacteristicsValue
Nominal capacity2600 mAh
Cell chemistryLiFePo4 cathode and graphite anode
Table 4. The mean runtime and the mean accuracy of different models.
Table 4. The mean runtime and the mean accuracy of different models.
AlgorithmMean Runtime/sMean Accuracy/%
STL0.259387.50%
CNN-BiLSTM-MHA2.609591.63%
RNN-LSTM-GRU2.234190.51%
EC-MKRVM1.518690.72%
Table 2. The results of recognizing the SOH of a lithium battery using first-level primitives.
Table 2. The results of recognizing the SOH of a lithium battery using first-level primitives.
Objective FunctionMean Runtime/sRuntime Standard Deviation/sAccuracy Standard Deviation/%Mean Accuracy/%
IG0.05490.022223.94%81.25%
MG0.06640.026912.50%81.25%
GG0.05750.022912.50%81.25%
IGr0.10650.034212.50%81.25%
MGr0.08510.011914.43%87.50%
GGr0.09930.019414.43%87.50%
Table 3. The results of recognizing the SOH of a lithium battery using second-level primitives.
Table 3. The results of recognizing the SOH of a lithium battery using second-level primitives.
Objective FunctionMean Runtime/sRuntime Standard Deviation/sAccuracy Standard Deviation/%Mean Accuracy/%
IG0.25930.137714.43%87.50%
MG0.60950.270812.50%81.25%
GG0.23410.105814.43%87.50%
IGr0.51860.129912.50%81.25%
MGr0.41430.106514.43%87.50%
GGr0.51050.104214.43%87.50%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ning, J.; Xiao, B.; Zhong, W. Recognition of State of Health Based on Discharge Curve of Battery by Signal Temporal Logic. World Electr. Veh. J. 2025, 16, 127. https://doi.org/10.3390/wevj16030127

AMA Style

Ning J, Xiao B, Zhong W. Recognition of State of Health Based on Discharge Curve of Battery by Signal Temporal Logic. World Electric Vehicle Journal. 2025; 16(3):127. https://doi.org/10.3390/wevj16030127

Chicago/Turabian Style

Ning, Jing, Bing Xiao, and Wenhui Zhong. 2025. "Recognition of State of Health Based on Discharge Curve of Battery by Signal Temporal Logic" World Electric Vehicle Journal 16, no. 3: 127. https://doi.org/10.3390/wevj16030127

APA Style

Ning, J., Xiao, B., & Zhong, W. (2025). Recognition of State of Health Based on Discharge Curve of Battery by Signal Temporal Logic. World Electric Vehicle Journal, 16(3), 127. https://doi.org/10.3390/wevj16030127

Article Metrics

Back to TopTop