Real-Time State of Charge Estimation for Each Cell of Lithium Battery Pack Using Neural Networks

Featured Application: Authors are encouraged to provide a concise description of the speciﬁc application or a potential application of the work. This section is not mandatory. Abstract: With the emergence of problems on environmental pollutions, lithium batteries have attracted considerable attention as an e ﬃ cient and nature-friendly alternative energy storage device owing to their advantages, such as high power density, low self-discharge rate, and long life cycle. They are widely used in numerous applications, from everyday items, such as smartphones, wireless vacuum cleaners, and wireless power tools, to transportation means, such as electric vehicles and bicycles. In this paper, the state of charge (SOC) of each cell of the lithium battery pack was estimated in real time using two types of neural networks: Multi-layer Neural Network (MNN) and Long Short-Term Memory (LSTM). To determine the di ﬀ erence in the SOC estimation performance under various conditions, the input values were compared using 2, 6, and 8 input values, and the di ﬀ erence according to the use of temperature variable data was compared, and ﬁnally, the MNN and LSTM. The di ﬀ erences were compared. Real-time SOC was estimated using the method with the lowest error rate.


Introduction
With the constant occurrence of energy crisis and environmental pollution in the modern era, the development of natural and efficient energy storage devices is required [1]. Among various energy storage devices, lithium batteries have recently attracted considerable attention due to their advantages, such as high power density, low self-discharge rate, long life cycle, and environmentally friendly characteristics [2]. Lithium batteries have been widely used in various applications, such as electric vehicles, bicycles, and scooters, other means of transportation [3,4], wireless power tools and vacuum cleaners, and smart phones [5].
Lithium batteries are a major power source used as an alternative to existing batteries due to their portability and excellent heat resistance, compared with primary batteries and lead storage batteries. However, if not managed properly, their performance may deteriorate, and they may become damaged, which, in severe cases, may cause an explosion [6]. Such problems are related to economy, reliability, and safety. Therefore, accurate measurement and estimation of the State of Charge (SOC) of a battery are important to improve reliability and provide safe service to users [7]. The SOC is an important parameter of a Battery Management System (BMS) [8] and indicates the available capacity of the current battery. Everything else is based on SOC; thus, accuracy and robustness need to be achieved.
Currently, the electric vehicle field is where the development of lithium batteries and research on battery SOC estimation technology are the most significant. It is very important to estimate the SOC in real time due to the characteristics of the electric vehicle, and it is possible to estimate more accurately and efficiently to estimate the SOC of other lithium battery products. However, it is difficult to estimate accurate real-time SOC due to cost and limited computational power [9].
Various methods for SOC estimation have been recently proposed. However, most are the SOC that estimate the battery cell. In addition, studies on how to estimate the SOC in real time are scarce. Lithium-ion batteries can supply stronger power to high-power electrical products with a high energy density than a cell-based battery. Therefore, estimating the SOC of a battery pack leads to an efficient and safe use of the battery [10].
In this paper, a method for real-time SOC estimation of the cells of the lithium battery packs using Multi-layer Neural Network (MNN) and Long Short-Term Memory (LSTM) is proposed. The relationship between the voltage and SOC was determined after charging and discharging four lithium batteries at both room temperature and high temperature. Subsequently, the SOC of each battery cell was estimated by learning, with each of the four neural networks, using the collected data. Moreover, the performance of the method was evaluated through the simulation. In this paper, SOC estimation was performed in three methods. First, the error rate differences according to the number of inputs were compared; second, the error rate differences according to the temperature variable data used were compared; and finally, the differences in the performance between the MNN and LSTM were compared. Subsequently, the SOC of the lithium battery was estimated in real time using the input value of the learning method obtained with the lowest error rate.

Lithium Battery Pack
Lithium batteries are widely used as major power sources for electric vehicles, owing to their high energy density, high power density, long life cycle, and environmentally friendly characteristics [11]. Battery cells exhibiting high energy density are currently manufactured so that a large amount of energy can be stored in the same volume. Battery modules, which include a certain number, protect the battery cell from external shock and both high and low temperatures. A battery pack is composed of the BMS, and various battery control devices, installed in the battery module. The decline in the battery cell capacity and the occurrence of failures, due to external shock may cause a breakdown of the battery module composed of multiple battery cells. In addition, a battery pack that contains multiple battery modules can also cause failure. Even if the same battery is used for the battery pack, the battery cell becomes unbalanced when continuously charged and discharged, due to the difference in electrochemical characteristics [12]. Therefore, an accurate SOC estimation of a battery cell makes it possible to safely use the battery pack. Figure 1 is a diagram showing the relationship between battery cell, module and pack.

Traditional SOC Estimation Method
Several methods have been proposed for SOC estimation using the data from the current battery. There are battery SOC estimation methods, such as Kalman Filter method [13], Open-Circuit Voltage (OCV) method [14], and neural network method [15]. When charging and discharging the lithium battery, the data shows nonlinear characteristics.
In Kalman filtering, SOC estimation can be performed in real time because the extended Kalman filter method is often used because of the nonlinear characteristics of the battery. However, the calculation time is increased according to the increase in the variable [16]. In the OCV method, SOC estimation is performed based on the fact that the remaining capacity of the battery naturally decreases in proportion to its energy usage. However, real-time SOC estimation, using this method is difficult, as it requires a large amount of time, requires the battery to be in an equilibrium state, and requires the measurement of the terminal voltage [17].
The MNN and RNN are used to obtain data exhibiting non-linear characteristics of lithium batteries. When using MNN, several hidden layers need to be added in the existing neural network composed of faults to obtain data. Through it, the relationship between complex inputs and outputs can be determined. The MNN also has the advantage of adapting well to data, which is suitable for the control problems of nonlinear systems [18,19]. Conversely, the RNN sends the result from the node of the hidden layer to that of the output layer and then sends it back to the calculation input of the node of the other hidden layer. In general, the RNN is more efficient than the MNN and can be used to achieve better accuracy [20].

•
The algorithm is simple to implement.
• It is difficult to use in general because it requires accurate voltage measurement.

•
It is difficult to measure SOC in real time because the voltage must be measured in a flat state.

•
It has great error correction capability.
• It is difficult to apply because the parameters and algorithms are complex.

•
There has not been much research on its use in the SOC estimation for battery packs.
Conventional Neural Network based method [18][19][20][21] • It is useful for learning the nonlinear characteristics of a battery.

•
It can learn complex input/output relationships.
• It only estimates SOC for each battery cell.

•
There has not been much research on its use in the SOC estimation for battery packs.

Proposed method
• It is possible not only to estimate the SOC of the existing battery cell but also that of the battery pack.

•
It is possible to estimate SOC in real time.

•
In the case of the LSTM, the learning time is relatively increased compared with MNN.

Lithium Battery SOC Estimation Algorithm
In this paper, the lithium battery pack used in the experiment is composed of four cells. The schematic diagram of the proposed State of Charge (SOC) estimation method for the lithium battery pack using neural networks is shown in Figure 2.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 4 of 16 Appl. Sci. 2020, 10, x; doi: FOR PEER REVIEW www.mdpi.com/journal/applsci battery cell but also that of the battery pack.  It is possible to estimate SOC in real time.
increased compared with MNN.

Lithium Battery SOC Estimation Algorithm
In this paper, the lithium battery pack used in the experiment is composed of four cells. The schematic diagram of the proposed State of Charge (SOC) estimation method for the lithium battery pack using neural networks is shown in Figure 2. Power supply and electronic load are used to charge and discharge lithium batteries. The battery pack is composed of four cells, and one cell is consists of a 1300-mAh lithium battery. The battery controller consists of a voltage sensor, current sensor, temperature sensor, microcontroller, and eightchannel relay module. The battery controller is used to measure the voltage, current, and temperature variable data of the battery. Subsequently, the measured data is sent to a personal computer (PC) and then evaluated using neural networks to enable SOC estimation of the lithium battery.

Multi-Layer Neural Network
In this paper, to model the relationship between voltage and SOC, an MNN model was constructed, as shown in Figure 3.  Power supply and electronic load are used to charge and discharge lithium batteries. The battery pack is composed of four cells, and one cell is consists of a 1300-mAh lithium battery. The battery controller consists of a voltage sensor, current sensor, temperature sensor, microcontroller, and eight-channel relay module. The battery controller is used to measure the voltage, current, and temperature variable data of the battery. Subsequently, the measured data is sent to a personal computer (PC) and then evaluated using neural networks to enable SOC estimation of the lithium battery.

Multi-Layer Neural Network
In this paper, to model the relationship between voltage and SOC, an MNN model was constructed, as shown in Figure 3.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 4 of 16 Appl. Sci. 2020, 10, x; doi: FOR PEER REVIEW www.mdpi.com/journal/applsci battery cell but also that of the battery pack.  It is possible to estimate SOC in real time.
increased compared with MNN.

Lithium Battery SOC Estimation Algorithm
In this paper, the lithium battery pack used in the experiment is composed of four cells. The schematic diagram of the proposed State of Charge (SOC) estimation method for the lithium battery pack using neural networks is shown in Figure 2. Power supply and electronic load are used to charge and discharge lithium batteries. The battery pack is composed of four cells, and one cell is consists of a 1300-mAh lithium battery. The battery controller consists of a voltage sensor, current sensor, temperature sensor, microcontroller, and eightchannel relay module. The battery controller is used to measure the voltage, current, and temperature variable data of the battery. Subsequently, the measured data is sent to a personal computer (PC) and then evaluated using neural networks to enable SOC estimation of the lithium battery.

Multi-Layer Neural Network
In this paper, to model the relationship between voltage and SOC, an MNN model was constructed, as shown in Figure 3.  The feed-forward model equation that calculates the output value of the MNN model consists of an input/output relational expression in the hidden and output layer. MNN learning is accomplished by changing the weight using the back-propagation method [27].

of 15
In Figure 3, the MNN model uses two types of datasets as input values of the input layer. One of the datasets has only voltage data and 2, 6, and 8 input parameters. The other dataset has voltage and temperature data. This dataset consists of 3 and 7 inputs. There are two hidden layers. In the first hidden layer, the number of nodes is 128, and the rectified linear unit (ReLU) function is employed as the activation function; in the second hidden layer, the number of nodes is 64, and the ReLU function is similarly employed as the activation function. Moreover, there is one output layer. Adaptive Moment Estimation (Adam) was used as the learning method.
Since the ReLU function does not use exponential calculations in the calculation process, simple calculations can be employed instead. In addition, it changes the negative values to 0 due to its unsaturated form and linearity. Therefore, using this function makes fast convergence possible [28]. The equation of the ReLU function is as follows: Adam combines Momentum and RMSProp, a kind of learning method. It is a first-order gradient-based optimization algorithm with a stochastic objective function. It can also be easily implemented and exhibits good computational efficiency [29]. The calculation method stores the average of the slopes calculated so far and the average of the squared values of the slopes. Adam's equation is as follows: In the above equation, since mm and v are initialized to 0, a bias close to 0 is expected at the start of learning, and this goes through the process of making them unbiased. The equation is as follows: In Equations (2) and (3), m is the first moment vector initialization; v is the second moment vector initialization; t is the time step initialization; and θ is the initial parameter vector. The value of β 1 is 0.9; β 2 is 0.999; and is 10 −8 [30].

Long Short-Term Memory
Unlike the general MNN model, LSTM is a method that can take time and order into account as the result of the hidden layer is, once again, used as an input value of the hidden layer. In addition, the LSTM devised by adding cell state to solve the gradient vanishing problem of long-term dependency of the MNN model [31]. It is often used for predicting time series data, and if the data used in this paper is used, more accurate results can be obtained than with the MNN model.
In this paper, we used Long Short-Term Memory (LSTM). The input layers are 2, 6, 8 and 3 and 7 are used by adding temperature variable data. There were three hidden layers, and all the LSTM layers were used. In the first layer, there were 150 nodes; in the second layer, 100 nodes; and in the third layer, 50 nodes. The ReLU function was employed as the activation function of the three LSTM layers. In the output layer, there were 101 nodes, and the Softmax function was employed as the activation function. Adam was used as the learning method.
LSTM is one of the useful types of the RNN that can calculate the slope value of the basic RNN. Figure 4. presents the basic structure of LSTM. LSTM is a suitable method for SOC estimation as it considers the decrease in battery capacity as a time series [18]. The equation of LSTM is as follows.  Figure 4. presents the basic structure of LSTM. LSTM is a suitable method for SOC estimation as it considers the decrease in battery capacity as a time series [18]. The equation of LSTM is as follows. Step 1. Forget gate: Step 2. Input gate: Step 3. Update(Cell state): Step 4. Output gate(Hidden state): where, is the weight; ℎ is the hidden state; is the input; is the bias of each gate and state; is the forget gate; , the input gate; , the cell state; and , the output gate.
Softmax is a activation function that normalizes the output value in the last step for class classification with respect to the output value. The sum of the resulting values of the Softmax function is always 1 [32]. The equation of Softmax is as follows, where is the -th output, and is the number of dimensions equal to the number of classes [33].

Online SOC Estimation by LSTM
Real-time SOC estimates were based on a real-time estimate of the SOC of the lithium battery pack by combining the 6 voltage data with the lowest error rate results in Section 5. Figure 5 presents the experimental configuration of the real-time estimation of the lithium battery pack. Real-time SOC estimation of the lithium battery was performed in a state wherein all four cells are fully charged, that is, at 100% SOC. An eight-channel relay module was added to the battery controller to achieve sequential SOC estimation of the four cells. Currently, studies on the Step 1. Forget gate: Step 2. Input gate: Step 3. Update(Cell state): Step 4. Output gate(Hidden state): where, W is the weight; h is the hidden state; X is the input; b is the bias of each gate and state; f is the forget gate; i, the input gate; S, the cell state; and O, the output gate. Softmax is a activation function that normalizes the output value in the last step for class classification with respect to the output value. The sum of the resulting values of the Softmax function is always 1 [32]. The equation of Softmax is as follows, where x i is the i-th output, and N is the number of dimensions equal to the number of classes [33].

Online SOC Estimation by LSTM
Real-time SOC estimates were based on a real-time estimate of the SOC of the lithium battery pack by combining the 6 voltage data with the lowest error rate results in Section 5. Figure 5 presents the experimental configuration of the real-time estimation of the lithium battery pack. Real-time SOC estimation of the lithium battery was performed in a state wherein all four cells are fully charged, that is, at 100% SOC. An eight-channel relay module was added to the battery controller to achieve sequential SOC estimation of the four cells. Currently, studies on the real-time estimation of SOC are scarce. Therefore, the real-time SOC estimation method, which has been researched and tested in this paper, is considered as a new direction of SOC estimation, and the research and experiments were conducted.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 7 of 16 Appl. Sci. 2020, 10, x; doi: FOR PEER REVIEW www.mdpi.com/journal/applsci real-time estimation of SOC are scarce. Therefore, the real-time SOC estimation method, which has been researched and tested in this paper, is considered as a new direction of SOC estimation, and the research and experiments were conducted. The experiment process was as follows. The four cells were completely charged at a constant voltage of 4.2 V and constant current of 1300 mA using an electronic load. Subsequently, the voltage and temperature variable data were sent to the PC through the battery controller. The SOC of the lithium battery was estimated in real time using the LSTM method utilizing only 6 voltage as the input value and the temperature variable data. The real-time estimation is as shown in Figure 6.
The real-time SOC estimation result of Cell 1 to Cell 4 is shown in Figure 6. The experimental result confirmed that the trend of SOC estimation of the battery pack was similar to that of the SOC estimation simulation experiment.  The experiment process was as follows. The four cells were completely charged at a constant voltage of 4.2 V and constant current of 1300 mA using an electronic load. Subsequently, the voltage and temperature variable data were sent to the PC through the battery controller. The SOC of the lithium battery was estimated in real time using the LSTM method utilizing only 6 voltage as the input value and the temperature variable data. The real-time estimation is as shown in Figure 6.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 7 of 16 Appl. Sci. 2020, 10, x; doi: FOR PEER REVIEW www.mdpi.com/journal/applsci real-time estimation of SOC are scarce. Therefore, the real-time SOC estimation method, which has been researched and tested in this paper, is considered as a new direction of SOC estimation, and the research and experiments were conducted. The experiment process was as follows. The four cells were completely charged at a constant voltage of 4.2 V and constant current of 1300 mA using an electronic load. Subsequently, the voltage and temperature variable data were sent to the PC through the battery controller. The SOC of the lithium battery was estimated in real time using the LSTM method utilizing only 6 voltage as the input value and the temperature variable data. The real-time estimation is as shown in Figure 6.
The real-time SOC estimation result of Cell 1 to Cell 4 is shown in Figure 6. The experimental result confirmed that the trend of SOC estimation of the battery pack was similar to that of the SOC estimation simulation experiment.  The real-time SOC estimation result of Cell 1 to Cell 4 is shown in Figure 6. The experimental result confirmed that the trend of SOC estimation of the battery pack was similar to that of the SOC estimation simulation experiment.

Experiment Process
In this paper, the lithium battery pack used is composed of four cells. First, the battery pack consisting of four lithium batteries was fully charged at a constant voltage of 4.2 V using a power supply. This state is defined as 100% SOC. It has a stabilization period of 1 h after charge completion. Subsequently, the state of 0% SOC, which indicates discharge completion at a constant current of 1300 mA using an electronic load, was defined as one cycle. The voltage and temperature variable data were obtained using a battery controller. The previous charging, stabilization period, and discharge were repeated to collect data for a total of five cycles. Then, using the collected data, each cell's SOC was estimated using 4 MNN and LSTM. Python, TensorFlow, and Keras package were used for program writing and learning.
The experimental environment for the simulation of SOC estimation of the lithium battery pack is as shown in Figure 7.  Figure 7.-3 shows four lithium batteries. The experiment was conducted in the state of putting them in the safety chamber in preparation for explosion and safety accidents. The temperature control function can be used to receive high temperature variable data. Figure 7.-4 shows the battery controller, which consists of a voltage sensor, current sensor, temperature sensor, and microcontroller. Real-time SOC estimation was performed by adding an eight-channel relay module to the battery controller to achieve real-time data measurement. Subsequently, the measured data was utilized, which was sent to the PC shown in Figure 7.-5 . Moreover, the SOC of each cell was estimated using the MNN and LSTM. The SOC estimation procedure for each cell of the lithium battery pack was as follows:

(a) Each lithium battery pack consisting of 4 cells was fully charged with a constant voltage of 4.2 V.
This state is defined as 100% SOC. (b) After charging was complete, the pack was left to rest for 1 h. (c) Then, the lithium battery pack was completely discharged with a constant current of 1300 mA.
This state is defined as 0% SOC. (d) During discharge, the voltage and current were measured through the battery controller. (e) Steps (a) to (d) were repeated 5 times with data collected during each repetition. (*In case of high temperature measurements, the charging, resting, and discharging steps were performed at high temperature.) (f) The measured data was sent to a PC. (g) The data was learned using the MNN model and LSTM method. (h) The actual SOC estimation result and the learned SOC estimation result were compared. (i) The mean absolute error was used to calculate the error rate.

Experiment Process
In this paper, the lithium battery pack used is composed of four cells. First, the battery pack consisting of four lithium batteries was fully charged at a constant voltage of 4.2 V using a power supply. This state is defined as 100% SOC. It has a stabilization period of 1 h after charge completion. Subsequently, the state of 0% SOC, which indicates discharge completion at a constant current of 1300 mA using an electronic load, was defined as one cycle. The voltage and temperature variable data were obtained using a battery controller. The previous charging, stabilization period, and discharge were repeated to collect data for a total of five cycles. Then, using the collected data, each cell's SOC was estimated using 4 MNN and LSTM. Python, TensorFlow, and Keras package were used for program writing and learning.
The experimental environment for the simulation of SOC estimation of the lithium battery pack is as shown in Figure 7.  Figure 7.-③ shows four lithium batteries. The experiment was conducted in the state of putting them in the safety chamber in preparation for explosion and safety accidents. The temperature control function can be used to receive high temperature variable data. Figure 7.-④ shows the battery controller, which consists of a voltage sensor, current sensor, temperature sensor, and microcontroller. Real-time SOC estimation was performed by adding an eight-channel relay module to the battery controller to achieve real-time data measurement. Subsequently, the measured data was utilized, which was sent to the PC shown in Figure 7.-⑤. Moreover, the SOC of each cell was estimated using the MNN and LSTM. The SOC estimation procedure for each cell of the lithium battery pack was as follows: (a) Each lithium battery pack consisting of 4 cells was fully charged with a constant voltage of 4.2 V. This state is defined as 100% SOC. (b) After charging was complete, the pack was left to rest for 1 h. (c) Then, the lithium battery pack was completely discharged with a constant current of 1300 mA.
This state is defined as 0% SOC. (d) During discharge, the voltage and current were measured through the battery controller. (e) Steps a) to d) were repeated 5 times with data collected during each repetition.
(*In case of high temperature measurements, the charging, resting, and discharging steps were performed at high temperature.) (f) The measured data was sent to a PC.

SOC Estimation Performance Comparison According to the Number of Inputs
In this paper, the SOC error rates of the lithium battery packs were compared according to the difference in the number of inputs using 2, 6, and 8 voltages as the input values. Only pure voltage data were utilized for the comparison. After charging and discharging at both room temperature and high temperature, the collected data was evaluated using the MNN and LSTM to estimate the SOC of each cell. Tables 2 and 3 compare the error rates of Cell 1 to Cell 4, using the MNN and LSTM for 2, 6, and 8 voltages, at room temperature, and high temperature, respectively. Each error rate was calculated using the Mean Absolute Error (MAE). The equation for obtaining the MAE is as follows, where, n is the number; y is the actual SOC value; andŷ is the estimated SOC value. As a result of the experiment, it was confirmed that with the MNN model, the error rate was lower when using 6 voltage data as input values than when using 2 or 8 voltage data. With the LSTM model, when 6 and 8 voltage data were used as input values, the error rate was lower than when using 2 voltage data as input values. When using 6 and 8 inputs, there was a slight difference in error rate. However, it can be inferred that it is more efficient to use 6 voltage data as input values, because the more data there is, the more computation time required and learning efficiency decreases.

Comparison of Use/Unused of Temperature Variable Data
In this paper, an experiment was conducted to estimate the SOC of each cell for the lithium battery packs in the room temperature range of 25-26 • C and high temperature range of 39-42 • C. The input value using only the voltage data of room temperature and high temperature without the temperature variable data and the input value of room temperature, and high temperature at which the temperature variable data was added were compared. Figure 8 shows a graph of the SOC estimation result when using the MNN of Cell 4 utilizing only 6 voltage as the input value at room temperature and high temperature. Figure 9 also shows a graph of the SOC estimation result when using the LSTM of Cell 4 utilizing only 6 voltage as the input value at both room temperature and high temperature. The "origin" label in Figures 8, 9, 10, and 11 shows the real percentage SOC values and these can be calculated as follows, where, is the initial capacity of the battery, and is the capacity of the battery currently available. In this paper, the above equation is used to calculate the time for SOC estimation and the SOC origin of the lithium battery pack. Figure 10 shows a graph of the SOC estimation results when using the MNN of Cell 4 utilizing only 6 voltage as the input value and the temperature variable data at room temperature and high temperature. Figure 11 shows a graph of the SOC estimation results when using the LSTM of Cell 4 utilizing only 6 voltage as the input value and the temperature variable data at room temperature and high temperature. The "origin" label in Figures 8, 9, 10, and 11 shows the real percentage SOC values and these can be calculated as follows, where, is the initial capacity of the battery, and is the capacity of the battery currently available. In this paper, the above equation is used to calculate the time for SOC estimation and the SOC origin of the lithium battery pack. Figure 10 shows a graph of the SOC estimation results when using the MNN of Cell 4 utilizing only 6 voltage as the input value and the temperature variable data at room temperature and high temperature. Figure 11 shows a graph of the SOC estimation results when using the LSTM of Cell 4 utilizing only 6 voltage as the input value and the temperature variable data at room temperature and high temperature. The "origin" label in Figures 8-11 shows the real percentage SOC values and these can be calculated as follows, where, C releasable is the initial capacity of the battery, and C rated is the capacity of the battery currently available. In this paper, the above equation is used to calculate the time for SOC estimation and the SOC origin of the lithium battery pack.      Figure 11. SOC estimation results; (a) using the LSTM utilizing only six voltage as the input value and the temperature variable data at room temperature; (b) using the LSTM utilizing only 6 voltage as the input value and the temperature variable data at high. Figure 10 shows a graph of the SOC estimation results when using the MNN of Cell 4 utilizing only 6 voltage as the input value and the temperature variable data at room temperature and high temperature. Figure 11 shows a graph of the SOC estimation results when using the LSTM of Cell 4 utilizing only 6 voltage as the input value and the temperature variable data at room temperature and high temperature. Tables 4 and 5 show the comparison results of using the MNN and LSTM utilizing only 6 voltage as the input value and the temperature variable data. Shown from Cell 1 to Cell 4.  In this paper, the MNN and LSTM were used to estimate the SOC of lithium batteries. Figure 12 shows a graph of the results using the MNN and LSTM of Cell 4 utilizing 6 voltage as the input value and the temperature variable data at high temperature.  In this paper, the MNN and LSTM were used to estimate the SOC of lithium batteries. Figure 12 shows a graph of the results using the MNN and LSTM of Cell 4 utilizing 6 voltage as the input value and the temperature variable data at high temperature.
(a) (b) Figure 12. SOC estimation results with temperature data at high temperature (a) Using MNN (b) Using LSTM. Table 6 compares the results of using the MNN and LSTM utilizing only 6 voltage as the input value and the temperature variable data at both room temperature and high temperature. Cell 1 to Cell 4 are also shown in the Table 6.   Table 6 compares the results of using the MNN and LSTM utilizing only 6 voltage as the input value and the temperature variable data at both room temperature and high temperature. Cell 1 to Cell 4 are also shown in the Table 6. As a result of the experiment, it was confirmed that the SOC of a lithium battery using the LSTM method took a little longer to learn, but showed higher accuracy than when the SOC was estimated using the MNN model, and a low error rate was recorded.
In addition, the result of the experiment revealed that the error rate tends to be less when 6 V is used as the input value at both room temperature and high temperature. This confirms the tendency of the error rates to be lower than when using 2 and 8 voltages as the input values. It has also proven that the error rate is generally lower when using the LSTM than when using the MNN. For real-time SOC estimation, 6 voltage and temperature variable data were utilized as input layers, and the SOC of each cell of the lithium battery pack was estimated in real time using the LSTM.
According to Jiayi Luo et al. [13], the SOC estimation results of lithium battery, using the cubature Kalman filter method, showed a performance of error within 5%. In our proposed method, the average error was within 3% at room temperature and within 1% at a high temperature (40 • C). From these results, the performance of our proposed method was better than that of the above paper [13].
According to Chemali, et al. [21], the SOC of a lithium battery was estimated using the LSTM model and obtained the SOC estimation error of 1.68% at room temperature and an average of 1.26% at a high temperature (40 • C). It was confirmed that the performance of our proposed method was worse than Chemali's paper at room temperature. However, the performance of our proposed method at high temperatures was better than that proposed in Chemali's paper.
In addition, the two papers [13,21] were applied to estimate the SOC using only the battery cell. Conversely, the proposed method estimated the SOC of the battery for the battery pack that comprised four cells and the observed SOC estimation performance was slightly lowered.

Conclusions
In this paper, we proposed an SOC estimation method for each cell of a lithium battery pack using neural networks. Experiments were conducted at room temperature and high temperature. Due to the measurement accuracy of the data, there was a difference in the results for each cell. The proposed method was used to estimate the SOC of the lithium battery pack in real time. Moreover, the SOC of the lithium battery pack was estimated using the MNN and LSTM methods, using two types of datasets, the voltage dataset only and the voltage and temperature dataset together. After that, the results with the MNN and LSTM methods were compared and analyzed.
When using two, six, and eight inputs with only voltage data, a low overall error rate was recorded when using 6 voltage data as input values for the MNN model, and six and eight voltage data for the LSTM method. With the LSTM method, a similar number of low error rates were recorded for the six and eight input values. However, the use of eight input values had the disadvantage of increasing the learning time due to the increase in the amount of data, so we conclude that using six input values is more efficient. The SOC estimation results of the lithium battery pack were also obtained with input value using only six voltage data, and six voltage data and one temperature variable data. For the MNN model, SOC estimates, using voltage data and temperature variable data, tended to show lower error rates, and lower error rates for all cells were also seen when using the LSTM method, except for the estimated SOC error rate of cell three under room temperature conditions. The comparison of SOC estimates with the MNN and LSTM methods showed that the input value was based on the input parameters of 6 voltage data and temperature variable data combined to estimate the SOC, and that each cell for the battery pack had a higher error rate when it was estimated using the LSTM method. Therefore, we can confirm that SOC estimation using the LSTM method is better than with the MNN method. In conclusion, it is confirmed that the LSTM method using six voltage as the input value and temperature variable data had the lowest error rate. In addition, the real-time SOC of lithium battery packs was estimated using LSTM method, which used six voltage data and temperature data, which had the lowest error rate. By comparing the error rates obtained from similar cases, an average error rate of about 1.5% was derived in this paper. Therefore, it can be confirmed that the proposed method performs very well.
In future studies, we will collect more battery data, which can be used to conduct the simulation and real-time estimation of the SOC. We plan to reduce the error rate by studying neural network methods other than the MNN and LSTM method used in this paper.