energies

Article The Estimation Life Cycle of Lithium-Ion Battery Based on Network and Genetic Algorithm

Shih-Wei Tan 1,2, Sheng-Wei Huang 1, Yi-Zeng Hsieh 1,2,3,* and Shih-Syun Lin 4,*

1 Department of Electrical Engineering, National Taiwan Ocean University, Keelung City 202301, Taiwan; [email protected] (S.-W.T.); [email protected] (S.-W.H.) 2 Center of Excellence for Ocean Engineering, National Taiwan Ocean University, Keelung City 202301, Taiwan 3 Institute of Food Safety and Risk Management, National Taiwan Ocean University, Keelung City 202301, Taiwan 4 Department of Computer Science and Engineering, National Taiwan Ocean University, Keelung City 202301, Taiwan * Correspondence: [email protected] (Y.-Z.H.); [email protected] (S.-S.L.)

Abstract: This study uses deep learning to model the discharge characteristic curve of the lithium- ion battery. The battery measurement instrument was used to charge and discharge the battery to establish the discharge characteristic curve. The parameter method tries to find the discharge characteristic curve and was improved by MLP (multilayer ), RNN (), LSTM (long short-term memory), and GRU (gated recurrent unit). The results obtained by these methods were graphs. We used genetic algorithm (GA) to obtain the parameters of the discharge characteristic curve equation.   Keywords: deep learning; MLP (multilayer perceptron); RNN (recurrent neural network); LSTM

Citation: Tan, S.-W.; Huang, S.-W.; (long short-term memory); GRU (gated recurrent unit); genetic algorithm (GA) Hsieh, Y.-Z.; Lin, S.-S. The Estimation Life Cycle of Lithium-Ion Battery Based on Deep Learning Network and Genetic Algorithm. Energies 2021, 1. Introduction 14, 4423. https://doi.org/10.3390/ Energy demand is increasing, from power generation to today’s nuclear power gen- en14154423 eration. In recent years, environmental protection issues have gradually risen and envi- ronmental pollution caused by power generation has become a threshold that must not be Academic Editor: Domenico Di crossed by technological development [1]. Domenico To achieve convenience, countless devices have been invented, which use electrical energy as the main source. People have invented, improved, and simplified these devices. Received: 31 May 2021 Portable electronic products can integrate various high-tech features. Modern high-tech Accepted: 15 July 2021 Published: 22 July 2021 products can be seen everywhere such as notebook computers, mobile phones, navigation devices, smart-watches, tablet computers, etc. To realize these elements, the battery is an

Publisher’s Note: MDPI stays neutral indispensable component [2]. with regard to jurisdictional claims in Nowadays, batteries are used in almost every device, which leads to a significant published maps and institutional affil- impact on the environment. Therefore, it would be ideal to optimize these reusable batteries. iations. The time and endurance of the device are dependent on reusable batteries. In addition to emphasizing the large capacity and long life of the battery, the market is also committed to research on battery health management systems. An automatic power-off system for charging can prevent the battery from overcharging and preventing the problem of reduced battery life [3–5]. Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. In recent years, different energy storage equipment has been developed but some This article is an open access article challenges remain. These challenges include the reduction in the cost of energy storage distributed under the terms and equipment and its size, extended lifespan and improved performance, and the system for conditions of the Creative Commons measuring the remaining battery power. Each discharge characteristic curve is different for Attribution (CC BY) license (https:// different manufacturers. It is very important to establish a battery discharge characteristic creativecommons.org/licenses/by/ module. To build a battery model, we need to understand the health of the battery, the 4.0/). discharge current, and the battery capacity. Then, the life of the battery can be predicted.

Energies 2021, 14, 4423. https://doi.org/10.3390/en14154423 https://www.mdpi.com/journal/energies Energies 2021, 14, 4423 2 of 21

As it is difficult to build a battery model, the voltage is measured at different time points with different current levels. To reduce time and cost, deep learning was used to solve the problem. We used different deep learning algorithms to train our model and to find the most similar characteristic curve. The discharge characteristic curve of the lithium-ion battery has been modeled by several methods [3–5] including the discharge test [6], ampere hour counting [4], open circuit voltage [4], linear modeling [7], physical properties of the electrolyte [4], internal re- sistance [4], impedance spectroscopy [8], Kalman filter [9], and artificial intelligence [10,11]. The methods of the discharge test, ampere hour counting, open circuit voltage, impedance spectroscopy, Kalman filter, and artificial intelligence are suitable for all battery model- ing, which have the advantages of online and easy to accurate, but have the drawbacks of adjusting the battery state, needing regular re-calibration points, low dynamics, cost intensive, the problem of determining initial parameters, and needing the training data, respectively. The method of linear modeling, the physical properties of the electrolyte and the internal resistance are usually in the application of lead, Ni/Cd, and Zn/Br batteries, which are not suitable for lithium-ion batteries [4]. The goal of our study was to predict the different model battery life based on the optimization algorithm and deep learning method. We adopted the optimization algorithm to find different battery charge and discharge regression parameters and used recurrent a deep neural network to predict the real discharge battery lifetime. Another objective is our hope that these studies can help in the prediction of electric vehicle batteries. This paper used different deep learning methods to study the discharge behavior of the battery to establish a discharge model and to understand the characteristics of the battery discharge. The measured discharge characteristic curve value was input into multilayer perceptron, recurrent neural network, long short-term memory, gated recurrent unit, and genetic algorithm, which are five different algorithms for training. The parameter values obtained were then compared with the characteristic values of the originally measured discharge curve. The rest of this article is organized as follows. Section1 describes our study moti- vation and Section2 introduces the related works about battery life prediction. Section3 contributes to our proposed method. The experimental section excludes our different battery model. Finally, we conclude our results in the last section.

2. Related Works In recent years, the use of artificial intelligence has greatly increased in the applica- tion of modeling the discharge of lithium-ion batteries [4,5,11]. Artificial intelligence is realized among the methods of and deep learning. Deep learning is a training method of machine learning and is the main mode of operation of artificial intelligence today. In this era of automation, the application of deep learning can be seen everywhere [12]. Since the 1980s, the reduction in computer hardware costs and the advancement of storage equipment has helped machine learning to flourish. It has evolved from a single-layer network to the current multi-layer network [13]. Deep learning is used for image recognition in self-driving cars. For artificial intelli- gence, the real challenge lies in how to solve the problem intuitively for humans. The image recognition based on deep learning can be retrieved as efficient features by convolution operators because some features are difficult for humans to extract. Deep learning has evolved and has been improved and simplified. There are many algorithms and models for everyone to apply because different algorithms or models have different characteristics, training methods, performance, and efficiency.

2.1. MLP (Multilayer Perceptron) Multi-layer perceptron is a supervised learning algorithm. The multi-layer architecture deals with nonlinear problems. MLP is roughly divided into three levels: input layer, Energies 2021, 14, 4423 3 of 21

hidden layer, and output layer. Each neuron is fully connected, and each connected neuron has weights that are used to calculate whether the input data has the information we need [14–16].

2.2. RNN (Recurrent Neural Network) The recurrent neural network was invented by David Rumelhart in 1986 [17]. It is roughly divided into three levels: input layer, state layer, and output layer. The state layer can also be regarded as a hidden layer, but the difference from MLP is that the state layer of RNN will have one more output value of the previous layer as input. Therefore, RNN is a kind of neural network with short-term memory [11,16,18,19]. RNN is a kind of neural network that is good at dealing with sequence problems. It specializes in dealing with related topics such as weather observation, stock trading, video data, and other temporal data. RNN emphasizes a concept: if a specific message appears multiple times in a sequence, then the matter of sharing information will become extremely important. RNN has a vanishing gradient problem. When the program is performed longer, the earlier data will become less important. This results in the incomplete calculation of the weights and the entire program cannot be carried out. It is impossible to remember what happened a long time ago. This problem was solved by Sepp Hochreiter and Jürgen Schmidhuber, who invented LSTM to improve the vanishing gradient problem.

2.3. LSTM (Long Short-Term Memory) LSTM is a special RNN model proposed by Sepp Hochreiter and Jürgen Schmidhuber in 1997 to improve the vanishing gradient problem [20]. Compared to RNN, LSTM is complicated. This algorithm introduces three gates to control memory, namely input gate, forget gate, and output gate. It gives the machine an ability to select information [21–24]. Here, we must mention three types of activation functions commonly used in deep learning. The commonly used activation functions in deep learning are the sigmoid function, tanh function, and rectified linear unit (ReLU). Sigmoid function is monotonous, continuous, and easy to solve [25]. The disadvantage of this function is that it can cause the vanishing gradient problem in the saturated regions at both ends. The advantages of the tanh function are similar to the sigmoid function, but the slope of the tanh function is larger, and the convergence and training speed will be faster [26]. The training range is from −1.0 to 1.0, so a more approximate value can be found. The disadvantage is the same as that of the sigmoid function (i.e., a vanishing gradient problem). The activation function rectified linear unit (ReLU) has no vanishing gradient problem and no complicated exponential calculations [27] with a fast convergence rate. The disadvantage of ReLU is that when the input is less than zero, it will not be able to update the data for the next calculation.

2.4. GRU (Gated Recurrent Unit) The gated recurrent unit is a type of recurrent neural network. It was invented by Junyoung Chung et al. in 2014 [28]. Like LSTM, it is designed to solve the vanishing gradient problem. The biggest difference is that this algorithm combines the forget gate and the input gate and replaces it with an update gate. Because of this, the GRU required calculation time and the required resources are greatly reduced [29–32]. The following table shows the three model (RNN, LSTM, and GRU) equations, sepa- rately. The below table shows the RNN, LSTM, and GRU equations. Energies 2021, 14, 4423 4 of 21

Recurrent Neural Network Equation The output of RNN: ht = σ(Uh × Xt + Wh × ht−1 + bh) σ( ) is activation function. ht is the hidden layer activations in time t. Xt is the input vector. Uh is the weight of input vector. Wh is the weight of hidden layer activations. bh is the bias. Long Short Term Memory Equation Forgotten gate:   ft = σ Wx f × Xt + Wh f × ht−1 + b f σ( ) is activation function. ft is the current forgotten gate. Xt is the current input vector. Wx f is the current weight of input vector. Wh f is the weight of the hidden vector. ht−1 is the weight of hidden vector in time t − 1. b f is the bias. Input gate: it = σ(Wxi × Xt + Whi × ht − 1 + bi) st = it∗ σ(Wxs × Xt + Whs × ht−1 + bs) + ft ∗ st−1 it is the external input gate. Output gate: Ot = σ(Wxo × Xt + Who × ht − 1 + bo) ht = Ot × tanh(st) Ot is the output gate. ht is the output. Gated Recurrent Unit Equation Update gate: Zt = σ(Wz × Xt + Wz × ht−1 + bz) Zt is the update gate. Reset gate: Rt = σ(Wr × Xt + Wr × ht − 1 + br) Rt is the reset gate.

3. Our Proposed Battery Model and Prediction Method Through the description in the previous section, we found that the recurrent deep neural network had better prediction performance and the battery life was a sequential predicted problem. Therefore, our study must discover different battery parameters with a battery regression function, so we designed a battery charge or discharge activation process to discuss the battery characteristics. We also introduced our major optimization algorithm— genetic algorithm—to help us to find the parameters of the battery charge/discharge function.

3.1. Battery Characteristics This paper used 18,650 commercial lithium-ion cylindrical batteries, which were common brands with good reliability and currently available on the market. We named them L brand, P brand, and S brand. The basic specifications and charging and discharging conditions are shown in Table1. The charge cut-off voltage was 4.2 V and the discharge cut-off voltage was 3 V. Energies 2021, 14, x FOR PEER REVIEW 5 of 23

3.1. Battery Characteristics This paper used 18,650 commercial lithium-ion cylindrical batteries, which were Energies 2021, 14, 4423 common brands with good reliability and currently available on the market. We named5 of 21 them L brand, P brand, and S brand. The basic specifications and charging and discharg- ing conditions are shown in Table 1. The charge cut-off voltage was 4.2 V and the dis- charge cut-off voltage was 3 V. Table 1. Specifications for 18,650 commercial lithium-ion cylindrical batteries.

Table 1. Specifications for 18,650 commercialL Brand lithium-ion cylindrical P Brand batteries. S Brand Average voltage L 3.7 Brand V P 3.7 Brand V S3.7 Brand V ChargingAverage cut-off voltage voltage 4.2 3.7 V V 4.2 3.7 V V 4.2 3.7 V V ChargingDischarge cut-off voltage voltage 3.0 4.2 V V 3.0 4.2 V V 3.0 4.2 V V DischargeNominal cut-off capacity voltage 2200 3.0 mAh V 2200 3.0 mAh V 2200 3.0 mAh V Nominal capacity 2200 mAh 2200 mAh 2200 mAh Maximum discharge rate 1.5 C 1.5 C 1.5 C Maximum discharge rate 1.5 C 1.5 C 1.5 C Cycle life ≥300 ≥300 ≥300 Cycle life ≥300 ≥300 ≥300 ◦ ◦ ◦ ◦ ◦ ◦ ChargingCharging working temperature temperature 10 10 C~45°C~45 C°C 10 10 °C~45C~45 C°C 1010 °C~45C~45 °CC ◦ ◦ ◦ ◦ ◦ ◦ DischargeDischarge working temperature temperature −−1010 °C~60C~60 C°C −−1010 °C~60C~60 °CC ±±1010 °C~60C~60 °CC

3.2.3.2. Lithium-Ion Lithium-Ion Battery Battery Charge Charge and and Discharge Discharge AfterAfter understanding understanding the the charging charging and and discha dischargingrging conditions conditions of of the the battery, battery, one can useuse the the battery battery tester tester to to set set multiple multiple groups groups of of different different charging charging and and discharging discharging rates as anan electronic electronic load load to to test the battery characteristics of a single battery core. Automated batterybattery testing testing equipment equipment can can be be used used to to measure various parameters of of the the battery in operationoperation (such (such as as voltage, voltage, current, current, current current flo flow,w, and and battery battery surface surface temperature, temperature, etc...), etc...), analyzeanalyze these these data data to to understand understand battery battery char characteristics,acteristics, and and build battery battery characteristics datadata based based on on this this fuel fuel gauge gauge model model [3]. [3].

3.3.3.3. Lithium-Ion Lithium-Ion Battery Battery Activation Activation SinceSince the the selected selected lithium-ion lithium-ion battery battery was was used used for forthe thefirst first time, time, the lithium-ion the lithium-ion bat- terybattery had had to be to beactivated activated before before the the charge charge and and discharge discharge study study as as the the measured measured charge charge and discharge characteristics can reflect the characteristics of the battery. The battery and discharge characteristics can reflect the characteristics of the battery. The battery ac- activation flow chart is shown in Figure1 below. tivation flow chart is shown in Figure 1 below.

FigureFigure 1. ActivationActivation flowchart flowchart (LOOP (LOOP 5 times).

TheThe procedure procedure is is as as follows: charge charge with with a a constant constant current current of of 88 88 mA mA (0.04 C) and chargecharge to to 4.2 4.2 V V with with a a constant constant voltage voltage until until the the current current is is less less than than 88 88 mA; mA; after after the the battery battery isis fully fully charged, charged, wait wait for for 30 30 min min to to restore restore th thee voltage to a stable state; discharge with a constantconstant current current of of 88 88 mA mA until until the the terminal terminal voltage voltage reaches reaches 3 3 V; V; again, again, wait wait for for 30 30 min; min; repeatrepeat this this process process five five times times to to activate th thee battery and and make the measured charge and dischargedischarge characteristics characteristics more more convincing.

3.4.3.4. Lithium-Ion Lithium-Ion Battery Battery Charging Charging and and Discharging Discharging AA total total of of 18,650 commercial lithium-ion cylindrical batteries batteries were discharged with differentdifferent C numbers ofof constantconstant current.current. TheThe L L brand brand and and S S brand brand used used 0.04 0.04 C, C, 0.1 0.1 C, C, 0.2 0.2 C, C,0.5 0.5 C, andC, and 1 C, 1 respectively,C, respectively, with with five differentfive different ways toways discharge. to discharge. The P brandThe P usedbrand 0.025 used C, 0.0250.1 C, C, 0.15 0.1 C, 0.15 0.2 C, C, 0.50.2 C,C, 10.5 C, C, and 1 C, 1.5 and C 1.5 to dischargeC to discharge in seven in seven different different ways. ways. After After the batteries were activated, we considered four batteries in series as one unit. Taking the L brand battery as an example, we first charged it with a constant current/voltage at 0.1 C to make the terminal voltage reach 16.8 V, then divided it into four batteries and discharged it with constant current from the terminal voltage of 4.2 V to 3 V. This was stopped when the discharge current dropped to 1/3 or 1/4, then we waited for 15 min before repeating this process 300 times, as shown in Figure2. Energies 2021, 14, x FOR PEER REVIEW 6 of 23

the batteries were activated, we considered four batteries in series as one unit. Taking the L brand battery as an example, we first charged it with a constant current/voltage at 0.1 C to make the terminal voltage reach 16.8 V, then divided it into four batteries and dis-

Energies 2021, 14, 4423 charged it with constant current from the terminal voltage of 4.2 V to 3 V. This6 was of 21 stopped when the discharge current dropped to 1/3 or 1/4, then we waited for 15 min before repeating this process 300 times, as shown in Figure 2.

Figure 2. Discharging flowchart flowchart (LOOP 300 times).

3.5.3.5. Multilayer Multilayer Perceptron Perceptron MultilayerMultilayer perceptron perceptron is is a kind of forwar forwardd pass neural network, which contains at leastleast three three layers layers (input (input layer, layer, hidden hidden layer, layer, and and output output layer), layer), and and uses uses the the technology technology of “backwardof “backward propagation” propagation” to achieve to achieve supervised supervised learning. learning. In the In the current current development development of deepof deep learning, learning, MLP MLP is actually is actually a special a special case case of a ofdeep a deep neural neural network. network. The recurrent The recurrent neu- ralneural network, network, long long short-term short-term memory, memory, and andgated gated recurrent recurrent unitunit concept concept are basically are basically the samethe same as MLP. as MLP. Only Only DNN DNN has has more more techniques techniques and and layers layers in in the the learning learning process, process, which which will be greater and deeper. Therefore, our studies emphasized these three recurrent type deepdeep neural networks and are described in the following section.

3.6.3.6. Recurrent Recurrent Neural Neural Network, Network, Long Short Term Memory, and GatedGated RecurrentRecurrent UnitUnit TheThe simplest simplest kind kind of of neural neural network network was was introduced introduced above, above, as multilayer as multilayer neural neural net- worksnetworks (MLP). (MLP). The Theoutput output of each of eachlayer layer of calculation of calculation will only will be only forwarded be forwarded to the toinput the ofinput the ofnext the layer next layerin a single in a single direction, direction, that that is to is say, to say, input input and and output output are are independent. independent. OneOne of of the the more more advanced advanced changes changes is is the the recu recurrentrrent neural network (RNN). The difference betweenbetween RNN and MLP is that RNN RNN can pass the the calculated calculated output of a certain layer back toto the the layer layer itself itself as as input. input. The The output output also also becomes becomes one oneof its of own its owninputs inputs at the at next the point next inpoint time in (not time another (not another hidden hidden layer).layer). Therefor Therefore,e, there is there memory is memory in RNN. in RNN.Because Because many applicationmany application scenarios scenarios have the have concept the concept of sequ ofence sequence such suchas battery as battery charge/discharge charge/discharge pro- cessprocess (the (theprobability probability of the of next the battery next battery state depends state depends on what on the what previous the previous state is). state There- is). fore,Therefore, to train to RNN, train RNN,you need you sequential need sequential data, where data, the where input the of input RNN of is RNNthe value is the of value each variableof each variablein each intime each series. time However, series. However, RNN has RNN a shortcoming, has a shortcoming, that is, thatthe is,earlier the earlierinfor- information has less influence on subsequent decision-making. When the time sequence mation has less influence on subsequent decision-making. When the time sequence passes, the influence of the previous information almost approaches zero. Therefore, we passes, the influence of the previous information almost approaches zero. Therefore, we need a bit of a paradoxical network—long short term memory (LSTM). LSTM introduces need a bit of a paradoxical network—long short term memory (LSTM). LSTM introduces three mechanisms to control memory, namely input gate, output gate, and forget gate. three mechanisms to control memory, namely input gate, output gate, and forget gate. The changes in the opening and closing of these three gates have also become one of the The changes in the opening and closing of these three gates have also become one of the variables. The machine learns to open or close by itself through data, thereby determining variables. The machine learns to open or close by itself through data, thereby determining which information is the focus and which is noise. LSTM uses memory to enhance current which information is the focus and which is noise. LSTM uses memory to enhance current decision-making, and uses three control gates to determine the storage and use of memory. decision-making, and uses three control gates to determine the storage and use of memory.1. In addition to the predicted output, a memory branch is added and updated over time. The current memory is represented by the “forget gate”, and “input gate” is 1. In addition to the predicted output, a memory branch is added and updated over used to determine whether to update the memory. time. The current memory is represented by the “forget gate”, and “input gate” is 2. Forget Gate: If the current sentence is a new topic or the opposite of the previous used to determine whether to update the memory. sentence, the previous sentence will be filtered out by this gate. Otherwise, it may 2. Forget Gate: If the current sentence is a new topic or the opposite of the previous continue to be retained in memory. This gate is usually a Sigmoid function. sentence, the previous sentence will be filtered out by this gate. Otherwise, it may 3. Input Gate: This determines whether the current input and the newly generated continue to be retained in memory. This gate is usually a Sigmoid function. memory cell are added to the long term memory. This gate is also a Sigmoid function, which means that it needs to be added or not. 4. Output Gate: This determines whether the current state is added to the output. This gate is also a Sigmoid function, indicating whether to add it or not. 5. Finally, for whether the long-term memory is added to the output, the tanh function − − is usually used. The value of the output gate will fall between [ 1, 1], and the 1 means removing the long-term memory. LSTM also has the problem of slow execution speed, so the gated recurrent unit (GRU) was proposed to speed up execution and reduce memory consumption. The difference Energies 2021, 14, 4423 7 of 21

between GRU and LSTM is that GRU only uses two gates, namely the update gate and reset gate. The reset gate controls what percentage of the previous hidden state should be used to calculate the next hidden state with the new input. The update gate is to adjust the ratio of the hidden state to the previous hidden state to obtain the final hidden state.

3.7. Genetic Algorithm Genetic algorithm (GA) [33–37] was proposed by Professor John Holland and his students around the 1970s and has been widely used to obtain the best results. It is used for optimization problems, artificial intelligence, data retrieval, machine learning, and deep learning. It is said to be a calculation method that simulates the evolution of natural organisms as various species will compete with each other in the environment and only the fittest will be able to survive. There are some commonly used terms and concepts in genetic algorithms. The population is composed of several different individuals. Individuals are composed of genes and genes are the basic elements of forming chromosomes. A generation refers to the process of evolution. Holland believes that the process of natural evolution occurs within the genes of chromosomes. Evolution refers to the changes that occur in each generation of organisms. The characteristics of each organism are the genes of the previous generation, which determine the level of fitness. Therefore, the principle of survival of the fittest will leave the excellent genes behind and weed out the unsuitable ones. The evolutionary processes of these simulated organisms include reproduction, crossover, and mutation. Crossover is the most important operation method in genetic algorithms. The process of evolution in the biological world may take tens of thousands of years, but it only takes a few seconds or minutes to use machines to execute genetic algorithms. If you want to obtain strong offspring, you must choose different genes for mating. The common selection methods are roulette wheel selection and tournament selection. The roulette-style selection method is that each generation of individuals represents a block on the roulette. The size of the block is proportional to the fitness value of the individual. The two selected individuals will be sent to the mating pool for mating to obtain excellent offspring. For competitive selection, two or more individuals are selected and the individual with a higher fitness value will be sent to the mating pool to wait. In the mating process, two chromosomes are used to produce offspring with some parent-like characteristics. The goal of mating is that the offspring have highly adapted chromosomes. However, it is also possible to inherit the shortcomings of the parents and the mating may not produce better offspring. After eliminating the offspring with shortcomings, an excellent offspring can continue to survive. The mutation process will make random changes to the chromosomes. The common method will change a certain gene in the chromosome. The purpose of mutation is to let the genetic algorithm search for genes that have not appeared before and bring new genes into the population. However, too many mutations will destroy the structure of the genetic algorithm and cause the offspring to be quite different from their parents. If the number of mutations is too small, the offspring and their parents will not change in any way, so mutations will be regarded as a secondary calculation method.

4. Experiment Result 4.1. Manual Extraction Parameters Before starting the experiment, we needed to know the discharge characteristic curve of the battery. Taking L brand 18650 as an example, Figure3 shows the voltage curve of the battery under different discharge rates using a battery measuring instrument. From the viewpoint of energy conservation, the discharge time is shorter before the higher discharge rate reaches the discharge cut-off voltage, which is a normal phenomenon. Energies 2021, 14, x FOR PEER REVIEW 8 of 23 Energies 2021, 14, x FOR PEER REVIEW 8 of 23

neticnetic algorithm algorithm and and cause cause the the offspring offspring to tobe bequ quiteite different different from from their their parents. parents. If the If the num- num- berber of ofmutations mutations is toois too small, small, the the offspring offspring and and their their parents parents will will not not change change in inany any way, way, so somutations mutations will will be beregarded regarded as asa secondary a secondary calculation calculation method. method.

4. Experiment4. Experiment Result Resu lt 4.1.4.1. Manual Manual Extraction Extraction Parameters Parameters BeforeBefore starting starting the the experiment, experiment, we we needed needed to toknow know the the discharge discharge characteristic characteristic curve curve of ofthe the battery. battery. Taking Taking L brandL brand 18650 18650 as asan an example, example, Figure Figure 3 shows3 shows the the voltage voltage curve curve of of thethe battery battery under under different different discharge discharge rates rates using using a batterya battery measuring measuring instrument. instrument. From From Energies 2021, 14, 4423 8 of 21 thethe viewpoint viewpoint of ofenergy energy conservation, conservation, the the disc dischargeharge time time is shorteris shorter before before the the higher higher dis- dis- chargecharge rate rate reaches reaches the the discharge discharge cut-off cut-off voltage, voltage, which which is ais normal a normal phenomenon. phenomenon.

FigureFigure 3. 3. DischargeDischarge curve curve of of L L brand brand 18650. 18650. The following equation employs three series subcells to describe the discharge char- The following equation employs three series subcells to describe the discharge char- acteristics of 18,650 commercial lithium-ion cylindrical batteries [4,38], where Vo1, Vo2, acteristics of 18,650 commercial lithium-ion cylindrical batteries [4,38], where Vo1, Vo2, Vo3, Vc, Vk, I, K, τ1, τ2, τ3, τ4, and τ5 are the open-circuit voltage of subcell 1 to subcell Vo3, Vc, Vk, I, K, τ1, τ2, τ3, τ4, and τ5 are the open-circuit voltage of subcell 1 to subcell 3, open-circuit voltage of batteries, voltage drop of external resistance, discharge current, 3, open-circuit voltage of batteries, voltage drop of external resistance, discharge current, decline constant of internal resistance, time constant 1 to 5, respectively. decline constant of internal resistance, time constant 1 to 5, respectively. I I I  t⋅  I  t⋅  I  t⋅  I   220t⋅    220t⋅    220t⋅   220  220  220  τ5   τ5   τ5  I I Ie⋅ τ5  I Ie⋅ τ5  I Ie⋅ τ5  −t⋅ I −t⋅ +kI⋅ Ie⋅  −t⋅ +kI⋅ Ie⋅  −t⋅ +kI⋅ Ie⋅  −t⋅ −t⋅ k⋅+  −t⋅ k⋅+  −t⋅ k⋅+  (1) 220 − ⋅ Vk  220 220  − ⋅ Vk  220 220  − ⋅ Vk  220 220  (1) 220Vc I ⋅− Vk  220 220 Vc I ⋅− Vk  220 220 Vc I ⋅− Vk  220 220  (1) Vk τ4 Vc220 I τ1 Vc220 I τ2 Vc220 I τ3 Vt():= I⋅ ⋅eVk τ4+ ⋅220Vo1⋅e τ1 + ⋅220Vo2⋅e τ2 + ⋅220Vo3⋅e τ3 Vt()220:= I⋅ ⋅e +Vc ⋅Vo1⋅e +Vc ⋅Vo2⋅e +Vc ⋅Vo3⋅e 220 Vc Vc Vc Using the discharge characteristic equation, we can find Figure 4 by manually ex- tractingUsing the theparameters. discharge Model characteristic is the original equation, parameter we can and find measurement Figure4 by manually is the value ex- obtainedtracting thefrom parameters. the manual Model extraction is the parameter. original parameter As shown andin Figure measurement 4, the manual is the extrac- value obtained from the manual extraction parameter. As shown in Figure4, the manual ex- Energies 2021, 14, x FOR PEER REVIEWtion parameters differed from the original data. Considering the time cost, different9 algo-of 23 rithmstraction were parameters used to solve differed this from problem. the original data. Considering the time cost, different algorithms were used to solve this problem.

Figure 4. Measurement of L brand 18650. Figure 4. Measurement of L brand 18650. We used the root mean square error equation (RMSE) to express the training score We used the root mean square error equation (RMSE) to express the training score where a smaller value is better. where a smaller value is better.

4.2. MLP Result Figures 5–7 show the measurement data of the L brand, P brand, and S brand batter- ies with varying discharging current: Epoch = 100, look_back = 10; model is the training data.

Figure 5. Curve of L brand 18650, Epoch = 100, look_back = 10.

Energies 2021, 14, x FOR PEER REVIEW 9 of 23

Figure 4. Measurement of L brand 18650.

We used the root mean square error equation (RMSE) to express the training score Energies 2021, 14, 4423 where a smaller value is better. 9 of 21

4.2. MLP Result 4.2.Figures MLP Result 5–7 show the measurement data of the L brand, P brand, and S brand batter- ies with varying discharging current: Epoch = 100, look_back = 10; model is the training Figures5–7 show the measurement data of the L brand, P brand, and S brand batteries data. with varying discharging current: Epoch = 100, look_back = 10; model is the training data.

Energies 2021, 14, x FOR PEER REVIEW 10 of 23

Energies 2021, 14, x FOR PEER REVIEW 10 of 23

Figure 5. Curve of L brand 18650, Epoch = 100, look_back = 10. Figure 5. Curve of L brand 18650, Epoch = 100, look_back = 10.

Figure 6. Curve of P brand 18650, Epoch = 100, look_back = 10. Figure 6. Curve of P brand 18650, Epoch = 100, look_back = 10. Figure 6. Curve of P brand 18650, Epoch = 100, look_back = 10.

FigureFigure 7. 7. CurveCurve of of S S brand brand 18650, 18650, Epoch Epoch = = 100, 100, look_back look_back = = 10.10. FigureTable 7. Curve2 shows of S brand the 18650, score Epoch after = the 100, completion look_back = 10. of training for Epoch = 100 and Table 2 shows the score after the completion of training for Epoch = 100 and look_back = 10. look_backTable =2 10.shows the score after the completion of training for Epoch = 100 and look_back = 10. Table 2. Results of MLP, Epoch = 100, look_back = 10. Table 2. Results of MLP, Epoch = 100, look_back = 10. L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score L C1E100LB10Brand 18650 Score2.3962 P C1E100LB10Brand 18650 Score1.9665 S C1E100LB10Brand 18650 Score1.416 C1E100LB10C2E100LB10 2.3962 1.0355 C1E100LB10 C2E100LB10 1.96652.5641 C1E100LB10C2E100LB10 5.14571.416 C2E100LB10C3E100LB10 1.0355 1.9235 C2E100LB10 C3E100LB10 2.56412.1702 C2E100LB10C3E100LB10 5.14571.4973 C3E100LB10C4E100LB10 1.9235 2.5563 C3E100LB10 C4E100LB10 2.17021.2151 C3E100LB10C4E100LB10 1.49731.9197 C4E100LB10C5E100LB10 2.5563 1.8657 C4E100LB10 C5E100LB10 1.21513.4141 C4E100LB10C5E100LB10 1.91972.2744 C5E100LB10 1.8657 C5E100LB10C6E100LB10 3.41412.1928 C5E100LB10 2.2744 C6E100LB10C7E100LB10 2.19281.8609 C7E100LB10 1.8609 4.3. RNN Result 4.3. RNNFigures Result 8–10 show the measurement data of the L brand, P brand, and S brand bat- teriesFigures with varying 8–10 show discharging the measurement current: Epoch data of= 100, the look_backL brand, P = brand, 10; model and is S thebrand training bat- teriesdata. with varying discharging current: Epoch = 100, look_back = 10; model is the training data.

Energies 2021, 14, 4423 10 of 21

Table 2. Results of MLP, Epoch = 100, look_back = 10.

L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score C1E100LB10 2.3962 C1E100LB10 1.9665 C1E100LB10 1.416 C2E100LB10 1.0355 C2E100LB10 2.5641 C2E100LB10 5.1457 C3E100LB10 1.9235 C3E100LB10 2.1702 C3E100LB10 1.4973 C4E100LB10 2.5563 C4E100LB10 1.2151 C4E100LB10 1.9197 C5E100LB10 1.8657 C5E100LB10 3.4141 C5E100LB10 2.2744 C6E100LB10 2.1928 Energies 2021, 14, x FOR PEER REVIEW C7E100LB10 1.8609 11 of 23

Energies 2021, 14, x FOR PEER REVIEW 11 of 23 4.3. RNN Result Figures8–10 show the measurement data of the L brand, P brand, and S brand batteries with varying discharging current: Epoch = 100, look_back = 10; model is the training data.

Figure 8. Curve of L brand 18650, Epoch = 100, look_back = 10.

Figure 8. Curve of L brand 18650, Epoch = 100, look_back = 10. Figure 8. Curve of L brand 18650, Epoch = 100, look_back = 10.

Figure 9. Curve of P brand 18650, Epoch = 100, look_back = 10. Figure 9. Curve of P brand 18650, Epoch = 100, look_back = 10.

Figure 9. Curve of P brand 18650, Epoch = 100, look_back = 10.

Figure 10. Curve of S brand 18650, Epoch = 100, look_back = 10.

Figure 10. Curve of S brand 18650, Epoch = 100, look_back = 10.

Energies 2021, 14, x FOR PEER REVIEW 11 of 23

Figure 8. Curve of L brand 18650, Epoch = 100, look_back = 10.

Energies 2021, 14, 4423 Figure 9. Curve of P brand 18650, Epoch = 100, look_back = 10. 11 of 21

Energies 2021, 14, x FOR PEER REVIEW 12 of 23

Figure 10. Curve of S brand 18650, Epoch = 100, look_back = 10. Figure 10. Curve of S brand 18650, Epoch = 100, look_back = 10. TableTable 33 showsshows the the score score after after the the completion completion of of training training for for Epoch Epoch = = 100 100 and and look_backlook_back = 10. = 10.

Table 3. Results of RNN, Epoch = 100, look_back = 10. Table 3. Results of RNN, Epoch = 100, look_back = 10. L BrandL Brand 18650 18650 Score Score P Brand P Brand 18650 18650 Score Score S S Brand Brand 1865018650 Score Score C1E100LB10 22.7628 C1E100LB10 26.1699 C1E100LB10 10.2164 C1E100LB10 22.7628 C1E100LB10 26.1699 C1E100LB10 10.2164 C2E100LB10 12.8867 C2E100LB10 15.3611 C2E100LB10 11.8313 C2E100LB10 12.8867 C2E100LB10 15.3611 C2E100LB10 11.8313 C3E100LB10 19.2566 C3E100LB10 7.8641 C3E100LB10 16.3885 C4E100LB10C3E100LB10 16.4656 19.2566 C4E100LB10 C3E100LB10 13.1751 7.8641 C4E100LB10 C3E100LB10 47.0949 16.3885 C5E100LB10C4E100LB10 14.4838 16.4656 C5E100LB10 C4E100LB10 27.3929 13.1751 C5E100LB10 C4E100LB10 23.4548 47.0949 C5E100LB10 14.4838 C6E100LB10 C5E100LB10 12.1015 27.3929 C5E100LB10 23.4548 C7E100LB10C6E100LB10 11.0649 12.1015 C7E100LB10 11.0649 4.4. LSTM Result 4.4.Figures LSTM 11–13 Result show the measurement data of the L brand, P brand, and S brand bat- teries with varying discharging current: Epoch = 100, look_back = 10; model is the training Figures 11–13 show the measurement data of the L brand, P brand, and S brand data. batteries with varying discharging current: Epoch = 100, look_back = 10; model is the training data.

FigureFigure 11. 11. CurveCurve of L of brand L brand 18650, 18650, Epoch Epoch = 100, = 100, look_back look_back = 10. = 10.

Figure 12. Curve of P brand 18650, Epoch = 150, look_back = 20.

Energies 2021, 14, x FOR PEER REVIEW 12 of 23

Table 3 shows the score after the completion of training for Epoch = 100 and look_back = 10.

Table 3. Results of RNN, Epoch = 100, look_back = 10.

L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score C1E100LB10 22.7628 C1E100LB10 26.1699 C1E100LB10 10.2164 C2E100LB10 12.8867 C2E100LB10 15.3611 C2E100LB10 11.8313 C3E100LB10 19.2566 C3E100LB10 7.8641 C3E100LB10 16.3885 C4E100LB10 16.4656 C4E100LB10 13.1751 C4E100LB10 47.0949 C5E100LB10 14.4838 C5E100LB10 27.3929 C5E100LB10 23.4548 C6E100LB10 12.1015 C7E100LB10 11.0649

4.4. LSTM Result Figures 11–13 show the measurement data of the L brand, P brand, and S brand bat- teries with varying discharging current: Epoch = 100, look_back = 10; model is the training data.

Energies 2021, 14, 4423 Figure 11. Curve of L brand 18650, Epoch = 100, look_back = 10. 12 of 21

Energies 2021, 14, x FOR PEER REVIEW 13 of 23

Figure 12. Curve of P brand 18650, Epoch = 150, look_back = 20. Figure 12. Curve of P brand 18650, Epoch = 150, look_back = 20.

Figure 13. Curve of S brand 18650, Epoch = 100, look_back = 10. Figure 13. Curve of S brand 18650, Epoch = 100, look_back = 10. Table4 shows the score after the completion of training for Epoch = 100 and Table 4 shows the score after the completion of training for Epoch = 100 and look_back = look_back = 10. 10. Table 4. Results of LSTM, Epoch = 100, look_back = 10. Table 4. Results of LSTM, Epoch = 100, look_back = 10. L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score C1E100LB10C1E100LB10 35.2445 35.2445 C1E100LB10 C1E100LB10 5.3272 5.3272 C1E100LB10 C1E100LB10 5.2539 5.2539 C2E100LB10C2E100LB10 34.7757 34.7757 C2E100LB10 C2E100LB10 7.2181 7.2181 C2E100LB10 C2E100LB10 30.271 30.271 C3E100LB10C3E100LB10 16.183 16.183 C3E100LB10 C3E100LB10 9.3963 9.3963 C3E100LB10 C3E100LB10 8.6395 8.6395 C4E100LB10C4E100LB10 4.7719 4.7719 C4E100LB10 C4E100LB10 3.2441 3.2441 C4E100LB10 C4E100LB10 16.1969 16.1969 C5E100LB10C5E100LB10 7.4273 7.4273 C5E100LB10 C5E100LB10 7.3323 7.3323 C5E100LB10 C5E100LB10 11.1258 11.1258 C6E100LB10C6E100LB10 5.8578 5.8578 C7E100LB10 3.7878 C7E100LB10 3.7878

4.5. GRU Result 4.5. GRU Result Figures 14–16 show the measurement data of the L brand, P brand, and S brand bat- Figures 14–16 show the measurement data of the L brand, P brand, and S brand teries with varying discharging current: Epoch = 100, look_back = 10; model is the training batteries with varying discharging current: Epoch = 100, look_back = 10; model is the data. training data.

Figure 14. Curve of L brand 18650, Epoch = 100, look_back = 10.

Energies 2021, 14, x FOR PEER REVIEW 13 of 23

Figure 13. Curve of S brand 18650, Epoch = 100, look_back = 10.

Table 4 shows the score after the completion of training for Epoch = 100 and look_back = 10.

Table 4. Results of LSTM, Epoch = 100, look_back = 10.

L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score C1E100LB10 35.2445 C1E100LB10 5.3272 C1E100LB10 5.2539 C2E100LB10 34.7757 C2E100LB10 7.2181 C2E100LB10 30.271 C3E100LB10 16.183 C3E100LB10 9.3963 C3E100LB10 8.6395 C4E100LB10 4.7719 C4E100LB10 3.2441 C4E100LB10 16.1969 C5E100LB10 7.4273 C5E100LB10 7.3323 C5E100LB10 11.1258 C6E100LB10 5.8578 C7E100LB10 3.7878

4.5. GRU Result Figures 14–16 show the measurement data of the L brand, P brand, and S brand bat- teries with varying discharging current: Epoch = 100, look_back = 10; model is the training Energies 2021, 14, 4423 data. 13 of 21

Energies 2021, 14, x FOR PEER REVIEW 14 of 23

Energies 2021, 14, x FOR PEER REVIEW 14 of 23

Figure 14. Curve of L brand 18650, Epoch = 100, look_back = 10. Figure 14. Curve of L brand 18650, Epoch = 100, look_back = 10.

Figure 15. Curve of P brand 18650, Epoch = 100, look_back = 10.

Figure 15. Curve of P brand 18650, Epoch = 100, look_back = 10. Figure 15. Curve of P brand 18650, Epoch = 100, look_back = 10.

Figure 16. Curve of S brand 18650, Epoch = 100, look_back = 10. Figure 16. Curve of S brand 18650, Epoch = 100, look_back = 10.

Table5 shows the score after the completion of training for Epoch = 100 and Figure 16. Curve of S brand 18650, Epoch = 100, look_back = 10. look_backTable 5 shows = 10. the score after the completion of training for Epoch = 100 and look_back = 10. Table 5 shows the score after the completion of training for Epoch = 100 and Tablelook_back 5. Results = 10. of GRU, Epoch = 100, look_back = 10.

TableL Brand 5. Results 18650 of GRU, Score Epoch = 100, P Brand look_back 18650 = 10. Score S Brand 18650 Score C1E100LB10 11.7349 C1E100LB10 13.9564 C1E100LB10 7.9086 L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score C2E100LB10 22.561 C2E100LB10 10.8346 C2E100LB10 14.9015 C1E100LB10 11.7349 C1E100LB10 13.9564 C1E100LB10 7.9086 C3E100LB10 15.0054 C3E100LB10 8.2631 C3E100LB10 7.614 C2E100LB10 22.561 C2E100LB10 10.8346 C2E100LB10 14.9015 C4E100LB10 5.245 C4E100LB10 5.8903 C4E100LB10 21.8592 C3E100LB10 15.0054 C3E100LB10 8.2631 C3E100LB10 7.614 C5E100LB10 5.2089 C5E100LB10 12.3002 C5E100LB10 8.8804 C4E100LB10 5.245 C4E100LB10 5.8903 C4E100LB10 21.8592 C6E100LB10 7.3077 C5E100LB10 5.2089 C5E100LB10 12.3002 C5E100LB10 8.8804 C7E100LB10 5.1895 C6E100LB10 7.3077

C7E100LB10 5.1895

Energies 2021, 14, 4423 14 of 21

Table 5. Results of GRU, Epoch = 100, look_back = 10.

L Brand 18650 Score P Brand 18650 Score S Brand 18650 Score C1E100LB10 11.7349 C1E100LB10 13.9564 C1E100LB10 7.9086 C2E100LB10 22.561 C2E100LB10 10.8346 C2E100LB10 14.9015 Energies 2021, 14, x FOR PEER REVIEW C3E100LB10 15.0054 C3E100LB10 8.2631 C3E100LB1015 7.614of 23

C4E100LB10 5.245 C4E100LB10 5.8903 C4E100LB10 21.8592 Energies 2021, 14, x FOR PEER REVIEW 15 of 23 C5E100LB10 5.2089 C5E100LB10 12.3002 C5E100LB10 8.8804 4.6. GA Results C6E100LB10 7.3077 4.6.1. L Brand 18650 C7E100LB10 5.1895 4.6. GAFigure Results 17 shows the results of L brand 18650 training with genetic algorithm (GA). The4.6.1.4.6. arrow L GABrand points Results 18650 to the location where improvement is needed. 4.6.1.Figure L Brand 17 shows 18650 the results of L brand 18650 training with genetic algorithm (GA). The arrow points to the location where improvement is needed. Figure 17 shows the results of L brand 18650 training with genetic algorithm (GA). The arrow points to the location where improvement is needed.

Figure 17. GA results (L brand 18650).

Figure 17. GA results (L brand 18650). FigureFigure 17. GA 18 results utilizes (L brandthe improved 18650). data. The arrow in Figure 18 is consistent with that in Figure 17, and the arrow in Figure 19 is narrower than that in Figure 17. We added an Figure 18 utilizes the improved data. The arrow in Figure 18 is consistent with that extra Figurecapacitor 18 toutilizes the discharge the improved characteristic data. The curve arrow equation in Figure and 18 increased is consistent the mutationwith that in Figure 17, and the arrow in Figure 19 is narrower than that in Figure 17. We added an ratein Figure and mating 17, and rate the to arrow make in it Figure easier for19 isthe narrower program than to find that approximate in Figure 17. values.We added Table an extra capacitor to the discharge characteristic curve equation and increased the mutation 6 shows the parameters of GA for L brand 18650. extrarate capacitor and mating to the rate discharge to make characteristic it easier for the curve program equation to find and approximate increased the values. mutation Table 6 rateshows and mating the parameters rate to make of GA it easier for L brand for the 18650. program to find approximate values. Table 6 shows the parameters of GA for L brand 18650.

Figure 18. GA results 2 (L brand 18650). Figure 18. GA results 2 (L brand 18650).

Figure 18. GA results 2 (L brand 18650).

Energies 2021, 14, x FOR PEER REVIEW 16 of 23

Energies 2021, 14, 4423 15 of 21

Figure 19. GA results 2 (L brand 18650): reduce the range at the arrow. Figure 19. GA results 2 (L brand 18650): reduce the range at the arrow.

Table 6. The parameters of GA (L brand 18650). Table 6. The parameters of GA (L brand 18650).

ParameterParameter Range Range True True Value Value I I0.01~110 0.01~110 72.6875 72.6875 K K 1.4 1.4× 10×−1310~1.4−13~1.4 × 10×−1910 −19 1.36331.3633 ×× 1010−13− 13 Vk Vk0~4000 0~4000 3674 3674 Vc Vc0~42,000 0~42,000 1292 1292 Vo1 0~3000 2404 Vo1 0~3000 2404 Vo2 0~35,000 10,603 Vo2 0~35,000 10,603 Vo3 0~4000 2555 Vo3 0~4000 2555 Vo4 0~70,000 30,444 τ1 Vo40~140,000 0~70,000 5339 30,444 τ2 τ10~450,000,000 0~140,000 113,874,966 5339 τ3 τ20~187,000 0~450,000,000 55,007 113,874,966 τ4 τ30~170,000 0~187,000 81,575 55,007 τ5 τ40~10 0~170,000,000 604 81,575 τ6 0~900,000,000 195,378,993 τ5 0~10,000 604 τ6 0~900,000,000 195,378,993 4.6.2. P Brand 18650 Figure 20 is the result of P brand 18650 training with genetic algorithm (GA). The 4.6.2. P Brand 18650 arrow points to the locations where improvement is needed. Figure 20 is the result of P brand 18650 training with genetic algorithm (GA). The arrow points to the locations where improvement is needed. Figure 21 represents the improved data. The arrow in Figure 20 is significantly consistent with that in Figure 21. The arrow in Figure 22 is narrower than that in Figure 20. We added two more capacitors to the discharge characteristic curve equation and increased the mutation rate and mating rate to make it easier for the program to find approximate values. Table7 shows the parameters of GA for P brand 18650.

Energies 2021, 14, x FOR PEER REVIEW 17 of 23

Energies 2021, 14, x FOR PEER REVIEW 17 of 23

Energies 2021, 14, 4423 16 of 21

Figure 20. GA results (P brand 18650).

Figure 21 represents the improved data. The arrow in Figure 20 is significantly con- sistent with that in Figure 21. The arrow in Figure 22 is narrower than that in Figure 20. We added two more capacitors to the discharge characteristic curve equation and in- creased the mutation rate and mating rate to make it easier for the program to find ap- proximate values. Table 7 shows the parameters of GA for P brand 18650.

Figure 20. Figure 20. GAGA results results (P brand (P brand 18650). 18650).

Figure 21 represents the improved data. The arrow in Figure 20 is significantly con- sistent with that in Figure 21. The arrow in Figure 22 is narrower than that in Figure 20. We added two more capacitors to the discharge characteristic curve equation and in- creased the mutation rate and mating rate to make it easier for the program to find ap- proximate values. Table 7 shows the parameters of GA for P brand 18650.

Energies 2021, 14, x FOR PEER REVIEW 18 of 23

Figure 21. GA results 2 (P brand 18650). Figure 21. GA results 2 (P brand 18650).

Figure 21. GA results 2 (P brand 18650).

Figure 22. GA results 2 (P brand 18650): reduce the range at the arrow. Figure 22. GA results 2 (P brand 18650): reduce the range at the arrow.

Table 7. The parameters of GA (P brand 18650).

Parameter Range True Value I 0.01~110 76.8125 K 1.4 × 10−13~1.4 × 10−19 9.1103 × 10−14 Vk 0~4000 2941 Vc 0~42,000 1087 Vo1 0~3000 697 Vo2 0~35,000 9232 Vo3 0~4000 3554 Vo4 0~70,000 8213 Vo5 0~70,000 34247 τ1 0~140,000 35186 τ2 0~450,000,000 151,985,257 τ3 0~187,000 7117 τ4 0~170,000 87,017 τ5 0~10,000 651 τ6 0~900000000 155,079,888 τ7 0~900,000,000 712,175,902

4.6.3. S Brand 18650 Figure 23 shows the results of S-brand 18650 training with genetic algorithm (GA). The arrow marks the points where improvement is needed.

Energies 2021, 14, 4423 17 of 21

Table 7. The parameters of GA (P brand 18650).

Parameter Range True Value I 0.01~110 76.8125 K 1.4 × 10−13~1.4 × 10−19 9.1103 × 10−14 Vk 0~4000 2941 Vc 0~42,000 1087 Vo1 0~3000 697 Vo2 0~35,000 9232 Vo3 0~4000 3554 Vo4 0~70,000 8213 Vo5 0~70,000 34247 τ1 0~140,000 35186 τ2 0~450,000,000 151,985,257 τ3 0~187,000 7117 τ4 0~170,000 87,017 τ5 0~10,000 651 τ6 0~900,000,000 155,079,888 τ7 0~900,000,000 712,175,902

Energies 2021, 14, x FOR PEER REVIEW 19 of 23 4.6.3. S Brand 18650 Figure 23 shows the results of S-brand 18650 training with genetic algorithm (GA). The arrow marks the points where improvement is needed.

Figure 23. GA results (S brand 18650). Figure 23. GA results (S brand 18650). Figure 24 shows the improved data. The arrow in Figure 24 is consistent with that in Figure 24 shows the improved data. The arrow in Figure 24 is consistent with that in Figure 23 and the arrow in Figure 25 is narrower than that in Figure 23. We added two Figure 23 and the arrow in Figure 25 is narrower than that in Figure 23. We added two more capacitors to the discharge characteristic curve equation and increased the mutation more capacitors to the discharge characteristic curve equation and increased the mutation rate and mating rate to make it easier for the program to find approximate values. Table8 rateshows and mating the parameters rate to make of GA it easier for S brandfor the 18650. program to find approximate values. Table 8 shows the parameters of GA for S brand 18650.

Figure 24. GA results 2 (S brand 18650).

Energies 2021, 14, x FOR PEER REVIEW 19 of 23

Figure 23. GA results (S brand 18650).

Figure 24 shows the improved data. The arrow in Figure 24 is consistent with that in Figure 23 and the arrow in Figure 25 is narrower than that in Figure 23. We added two more capacitors to the discharge characteristic curve equation and increased the mutation rate and mating rate to make it easier for the program to find approximate values. Table Energies 2021, 14, 4423 18 of 21 8 shows the parameters of GA for S brand 18650.

Energies 2021, 14, x FOR PEER REVIEW 20 of 23

Figure 24. GA results 2 (S brand 18650). Figure 24. GA results 2 (S brand 18650).

FigureFigure 25. GA 25. GAresults results 2 (S brand 2 (S brand 18650): 18650): reduce reduce the range the range at theat arrow. the arrow.

TableTable 8. The 8. The parameters parameters of GA of (S GA brand (S brand 18650). 18650).

ParameterParameter Range Range True TrueValue Value I I0.01~110 0.01~110 82.75 82.75 K K 1.4 ×1.4 10×−1310~1.4−13 ×~1.4 10−19× 10−19 1.30611.3061 × 10×−1310 −13 Vk Vk0~4000 0~4000 2965 2965 Vc 0~42,000 1144 Vc 0~42,000 1144 Vo1 0~3000 2456 Vo1 0~3000 2456 Vo2 0~35,000 33,368 Vo3 Vo20~4000 0~35,000 2632 33,368 Vo4 Vo30~70,000 0~4000 52,797 2632 Vo5 Vo40~70,000 0~70,000 27,897 52,797 τ1 Vo50~140 0~70,000,000 139,951 27,897 τ2 0~450,000,000 210,499,733 τ1 0~140,000 139,951 τ3 0~187,000 2942 τ2 0~450,000,000 210,499,733 τ4 0~170,000 47,774 τ5 τ30~10,000 0~187,000 671 2942 τ6 τ40~900,000 0~170,000,000 818,734 47,774,152 τ7 τ50~900,000,000 0~10,000 457,604,887 671 τ6 0~900,000,000 818,734,152 5. Discussion τ7 0~900,000,000 457,604,887 From the data, it is evident that the training result will have a similar curve to the output. By a simple lookup of the table, the data at different times, voltages, and currents can be found. However, for the values of time parameters and temperature, we cannot use these four methods. To obtain all the parameter values that make up the equation and to solve this prob- lem, we chose to use the genetic algorithm (GA). This method can set the parameters and range that are required to be solved. The program can imitate the natural world’s “sur- vival of the fittest” and the rule of “elimination” to screen data. In Tables 3–5, we can find the scores (RMSE) between different three recurrent-type model such as RNN, LSTM, and GRU. The average scores of LSTM were better than those of RNN and GRU, and the average of RNN was the worst score. However, we could also find the cure fitting type of Figures 8–16. The LSTM cure was also estimated to describe the recurrent-type model more reliably. From Figures 17–25, the predicted battery life of P brand 18650 was found as the GA parameters fit the battery life curve. However, S brand

Energies 2021, 14, 4423 19 of 21

5. Discussion From the data, it is evident that the training result will have a similar curve to the output. By a simple lookup of the table, the data at different times, voltages, and currents can be found. However, for the values of time parameters and temperature, we cannot use these four methods. To obtain all the parameter values that make up the equation and to solve this problem, we chose to use the genetic algorithm (GA). This method can set the parameters and range that are required to be solved. The program can imitate the natural world’s “survival of the fittest” and the rule of “elimination” to screen data. In Tables3–5, we can find the scores (RMSE) between different three recurrent-type model such as RNN, LSTM, and GRU. The average scores of LSTM were better than those of RNN and GRU, and the average of RNN was the worst score. However, we could also find the cure fitting type of Figures8–16. The LSTM cure was also estimated to describe the recurrent-type model more reliably. From Figures 17–25, the predicted battery life of P brand 18650 was found as the GA parameters fit the battery life curve. However, S brand 18650 and L brand 18650 were not smooth discharge situations and their discharge situations in our study process were not always at thee down state. Therefore, as a whole, the battery discharge equation of the GA parameters is efficient to estimate the battery life.

6. Conclusions In this paper, deep learning was used to describe the discharge characteristic curve of the battery. The discharge characteristic curve was used as the basis to establish the discharge model. The battery measuring instrument was used to charge and discharge the battery to establish the discharge characteristic curve. First, we tried to find the discharge characteristic curve by manually extracting the parameters and found that the effect was not good and the time cost was huge. Therefore, MLP (multilayer perceptron), RNN (recurrent neural network), LSTM (long short-term memory), and GRU (gated recurrent unit) were used to improve this cost. The results obtained by these methods were graphs, but the requirement was to obtain the parameters of the discharge characteristic curve equation. Finally, we used the genetic algorithm (GA) to find the parameters of the discharge characteristic curve equation. This method can effec- tively find the parameter values that constitute the discharge characteristic curve equation.

Author Contributions: Conceptualization: Y.-Z.H., S.-W.H. and S.-W.T.; methodology, Y.-Z.H. and S.- W.T.; software, S.-W.H.; validation, S.-W.T.; formal analysis, Y.-Z.H.; investigation, Y.-Z.H.; resources, S.-W.T. and S.-S.L.; data curation, Y.-Z.H. and S.-W.T.; writing—original draft preparation, Y.-Z.H. and S.-W.H.; writing—review and editing, Y.-Z.H. and S.-W.T.; supervision, Y.-Z.H.; project admin- istration, Y.-Z.H.; funding acquisition, Y.-Z.H. All authors have read and agreed to the published version of the manuscript. Funding: This paper was partly supported by Ministry of Science and Technology, Taiwan, under MOST 110-2221-E-019-051-, MOST 109-2622-E-019-010-, MOST 109-2221-E-019-057-, MOST 110-2634- F-019-001-, MOST 110-2634-F-008-005-, MOST 110-2221-E-019-052-MY3, and MOST 108-2221-E-019- 038-MY2. Conflicts of Interest: The authors declare no conflict of interest.

References 1. Ahuja, D.; Tatsutani, M. Sustainable energy for developing countries. Surv. Perspect. Integr. Environ. Soc. 2009, 2, 1. 2. Pereira, J.C. Environmental issues and international relations, a new global (dis)order-the role of International Relations in promoting a concerted international system. Rev. Bras. Política Int. 2015, 58, 191–209. [CrossRef] 3. Bryntesen, S.; Strømman, A.; Tolstorebrov, I.; Shearing, P.; Lamb, J.; Burheim, O.S. Opportunities for the State-of-the-Art Production of LIB Electrodes—A Review. Energies 2021, 14, 1406. [CrossRef] 4. Piller, S.; Perrin, M.; Jossen, A. Methods for state-of-charge determination and their applications. J. Power Sources 2001, 96, 113–120. [CrossRef] 5. Shen, Y.C. The Characteristics of Battery Discharge and Automodeling. Master Thesis, National Taiwan Ocean University, Keelung, Taiwan, 2013. Energies 2021, 14, 4423 20 of 21

6. Lee, S.J.; Kim, J.H.; Lee, J.M.; Cho, B.H. The State and Parameter Estimation of an Li-Ion Battery Using a New OCV-SOC Concept. In Proceedings of the Power Electronics Specialists Conference, Orlando, FL, USA, 17–21 June 2007; pp. 2799–2803. 7. Ehret, C.; Piller, S.; Schroer, W.; Jossen, A. State-of-charge determination for lead-acid batteries in PV-applications. In Proceedings of the 16th European Photovoltaic Solar Energy Conference, Glasgow, UK, 1–5 May 2000. 8. Huet, F. A review of impedance measurements for determination of the state-of-charge or state-of-health of secondary batteries. J. Power Sources 1998, 70, 59–69. [CrossRef] 9. Yu, Z.; Huai, R.; Xiao, L. State-of-Charge Estimation for Lithium-Ion Batteries Using a Kalman Filter Based on Local Linearization. Energies 2015, 8, 7854–7873. [CrossRef] 10. Chan, C.; Lo, E.; Weixiang, S. The available capacity computation model based on artificial neural network for lead–acid batteries in electric vehicles. J. Power Sources 2000, 87, 201–204. [CrossRef] 11. Hsieh, Y.; Tan, S.; Gu, S.; Jeng, Y. Prediction of Battery Discharge States Based on the Recurrent Neural Network. J. Internet Technol. 2020, 21, 113–120. 12. Hsieh, Y.-Z.; Lin, S.-S.; Luo, Y.-C.; Jeng, Y.-L.; Tan, S.-W.; Chen, C.-R.; Chiang, P.-Y.; Hsieh, Y.-Z.; Lin, S.-S.; Luo, Y.-C.; et al. ARCS-Assisted Teaching Robots Based on Anticipatory Computing and Emotional Big Data for Improving Sustainable Learning Efficiency and Motivation. Sustainability 2020, 12, 5605. [CrossRef] 13. Shahrivar, E.M.; Sundaram, S. The Strategic Formation of Multi-Layer Networks. IEEE Trans. Netw. Sci. Eng. 2015, 2, 164–178. [CrossRef] 14. Vilovic, I.; Burum, N. A comparison of MLP and RBF neural networks architectures for electromagnetic field prediction in indoor environments. In Proceedings of the 5th European Conference on Antennas and Propagation (EUCAP), Rome, Italy, 11–15 April 2011; pp. 1719–1723. 15. Xiang, C.; Ding, S.Q.; Lee, T.H. Architecture analysis of MLP by geometrical interpretation. In Proceedings of the 2004 International Conference on Communications, Circuits and Systems (IEEE Cat. No.04EX914), Chengdu, China, 27–29 June 2004; Volume 2, pp. 1042–1046. [CrossRef] 16. Xiang, C.; Ding, S.Q.; Lee, T.H. Geometrical Interpretation and Architecture Selection of MLP. IEEE Trans. Neural Netw. 2005, 16, 84–96. [CrossRef][PubMed] 17. Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning representations by back-propagating errors. Nature 1986, 323, 533–536. [CrossRef] 18. Uçkun, F.A.; Özer, H.; Nurba¸s,E.; Onat, E. Direction Finding Using Convolutional Neural Networks and Convolutional Recurrent Neural Networks. In Proceedings of the 2020 28th Signal Processing and Communications Applications Conference (SIU), Gaziantep, Turkey, 5–7 October 2020; pp. 1–4. [CrossRef] 19. Boden, M.; Hawkins, J. Improved Access to Sequential Motifs: A Note on the Architectural Bias of Recurrent Networks. IEEE Trans. Neural Netw. 2005, 16, 491–494. [CrossRef][PubMed] 20. Sepp, H.; Jürgen, S. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. 21. Heck, J.C.; Salem, F.M. Simplified minimal gated unit variations for recurrent neural networks. In Proceedings of the 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Boston, MA, USA, 6–9 August 2017; pp. 1593–1596. [CrossRef] 22. Kumar, B.P.; Hariharan, K. Multivariate Time Series Traffic Forecast with Long Short Term Memory based Deep Learning Model. In Proceedings of the 2020 International Conference on Power, Instrumentation, Control and Computing (PICC), Thrissur, India, 17–19 December 2020; pp. 1–5. [CrossRef] 23. Sheikhfaal, S.; Demara, R.F. Short-Term Long-Term Compute-in-Memory Architecture: A Hybrid Spin/CMOS Approach Supporting Intrinsic Consolidation. IEEE J. Explor. Solid-State Comput. Devices Circuits 2020, 6, 62–70. [CrossRef] 24. Schmidhuber, J.; Gers, F.; Eck, D. Learning Nonregular Languages: A Comparison of Simple Recurrent Networks and LSTM. Neural Comput. 2002, 14, 2039–2041. [CrossRef][PubMed] 25. Liu, B.; Meng, P. Hybrid Algorithm Combining Ant Colony Algorithm with Genetic Algorithm for Continuous Domain. In Proceedings of the 2008 The 9th International Conference for Young Computer Scientists, Hunan, China, 18–21 November 2008; pp. 1819–1824. [CrossRef] 26. Apostolov, P.S.; Stefanov, A.K.; Bagasheva, M.S. Efficient FIR Filter Synthesis Using Sigmoidal Function. In Proceedings of the 2019 X National Conference with International Participation (ELECTRONICA), Sofia, Bulgaria, 16–17 May 2019; pp. 1–4. [CrossRef] 27. Komatsuzaki, Y.; Otsuka, H.; Yamanaka, K.; Hamamatsu, Y.; Shirae, K.; Fukumoto, H. A low distortion Doherty amplifier by using tanh function gate bias control. In Proceedings of the 2014 Asia-Pacific Microwave Conference, Sendai, Japan, 4–7 November 2014; pp. 110–112. 28. Junyoung, C.; Caglar, G.; KyungHyun, C.; Yoshua, B. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv 2014, arXiv:1412.3555. 29. Turan, A.; Kayıkçıo˘glu,T. Neuronal motifs of long term and short term memory functions. In Proceedings of the 2014 22nd Signal Processing and Communications Applications Conference (SIU), Trabzon, Turkey, 23–25 April 2014; pp. 1255–1258. [CrossRef] 30. Mirza, A.H. Online additive updates with FFT-IFFT operator on the GRU neural networks. In Proceedings of the 2018 26th Signal Processing and Communications Applications Conference (SIU), Izmir, Turkey, 2–5 May 2018; pp. 1–4. [CrossRef] Energies 2021, 14, 4423 21 of 21

31. Mirza, A.H. Variants of combinations of additive and multiplicative updates for GRU neural networks. In Proceedings of the 2018 26th Signal Processing and Communications Applications Conference (SIU), Izmir, Turkey, 2–5 May 2018; pp. 1–4. [CrossRef] 32. Yang, S.; Yu, X.; Zhou, Y. LSTM and GRU Neural Network Performance Comparison Study: Taking Yelp Review Dataset as an Example. In Proceedings of the 2020 International Workshop on Electronic Communication and Artificial Intelligence (IWECAI), Qingdao, China, 12–14 June 2020; pp. 98–101. [CrossRef] 33. Pavithra, M.; Saruladha, K.; Sathyabama, K. GRU Based Deep Learning Model for Prognosis Prediction of Disease Progression. In Proceedings of the 2019 3rd International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, 27–29 March 2019; pp. 840–844. [CrossRef] 34. Yichen, L.; Bo, L.; Chenqian, Z.; Teng, M. Intelligent Frequency Assignment Algorithm Based on Hybrid Genetic Algorithm. In Proceedings of the 2020 International Conference on Computer Vision, Image and Deep Learning (CVIDL), Nanchang, China, 15–17 May 2020; pp. 461–467. [CrossRef] 35. Jiang, J.; Butler, D. A genetic algorithm design for vector quantization. In Proceedings of the First International Conference on Genetic Algorithms in Engineering Systems: Innovations and Applications, Sheffield, UK, 12–14 September 1995; pp. 331–336. [CrossRef] 36. Wang, J.; Hong, W.; Li, X. The Influence of Genetic Initial Algorithm on the Highest Likelihood in Gaussian Mixture Model. In Proceedings of the 2006 6th World Congress on Intelligent Control and Automation, Dalian, China, 21–23 June 2006; pp. 3580–3583. [CrossRef] 37. Chen, M.; Yao, Z. Classification Techniques of Neural Networks Using Improved Genetic Algorithms. In Proceedings of the 2008 Second International Conference on Genetic and Evolutionary Computing, Jinzhou, China, 25–26 September 2008; pp. 115–119. [CrossRef] 38. Ananda, S.; Lakshminarasamma, N.; Radhakrishna, V.; Srinivasan, M.S.; Satyanarayana, P.; Sankaran, M. Generic Lithium ion battery model for energy balance estimation in spacecraft. In Proceedings of the 2018 IEEE International Conference on Power Electronics, Drives and Energy Systems (PEDES), Chennai, India, 18–21 December 2018; pp. 1–5. [CrossRef]