###### Abstract  
Accurate estimation of the state of charge (SoC) of lithium-ion batteries is crucial for battery management systems, particularly in electric vehicle (EV) applications where real-time monitoring ensures safe and robust operation. This study introduces three advanced algorithms to estimate the SoC: deep neural network (DNN), gated recurrent unit (GRU), and long short-term memory (LSTM). The DNN, GRU, and LSTM models are trained and validated using laboratory data from a lithium-ion 18650 battery and simulation data from Matlab/Simulink for a LiCoO2 battery cell. These models are designed to account for varying temperatures during charge/discharge cycles and the effects of battery aging due to cycling. This paper is the first to estimate the SoC by a deep neural network using a variable current profile that provides the SoC curve during both the charge and discharge phases. The DNN model is implemented in Matlab/Simulink, featuring customizable activation functions, multiple hidden layers, and a variable number of neurons per layer, thus providing flexibility and robustness in the SoC estimation. This approach uniquely integrates temperature and aging effects into the input features, setting it apart from existing methodologies that typically focus only on voltage, current, and temperature. The performance of the DNN model is benchmarked against the GRU and LSTM models, demonstrating superior accuracy with a maximum error of less than 2.5%. This study highlights the effectiveness of the DNN algorithm in providing a reliable SoC estimation under diverse operating conditions, showcasing its potential for enhancing battery management in EV applications. lithium-ion battery; GRU neural network; LSTM neural network; state of charge; deep learning; electrical vehicle +
Footnote †: journal: Applied Sciences  
0000-0001-9993-3227-3274]J.J.J. A.  
this development has led to the V2G (vehicle-to-grid) technology [2; 3]. This new technology allows the battery of an electric car to be charged or discharged according to the needs and capacity of an electrical network. Lithium-ion technology offers a number of benefits compared to other energy storage technologies. The importance of lithium-ion batteries in electric vehicles (EVs) continues to grow, thanks to their high energy density, long life, and ability to withstand rapid charge and discharge cycles. An accurate state-of-charge (SoC) estimation is essential for efficient battery management, ensuring the safety, energy efficiency, and durability of the EV [4; 5]. A battery management system (BMS) is essential in any application [6], especially in electric vehicles, where it can monitor and protect the battery condition to ensure the reliable, safe, and efficient operation of electric vehicles [7; 8]. The BMS is vital for knowing the available energy in the battery and therefore predicting the remaining range of the electric vehicle [9]. However, a direct measurement of the SoC is not possible due to the nonlinearity of the SoC and the complex dynamics of batteries [10; 11]. The SoC is determined by the percentage of the current capacity \(Q(t)\) compared to the nominal capacity \(Q_{n}\). The latter is the energy that can be extracted from the battery when it is fully charged [12]; this value is specified by the producer. For battery packs, accurate SoC values for each cell are essential for cell balancing and efficient battery management [13]. One of the classic formulas for calculating SoC is the Coulomb Counting equation, in which the SoC is calculated by integrating the charge/discharge current versus time, which is given as follows:  
\[SoC(t)=\left(1-\frac{\int_{0}^{t}i(t)d(t)}{C_{n}}\right)\times 100\% \tag{1}\]  
An accurate SoC estimation is necessary to prevent damage to the battery and unexpected failure by protecting the battery from overcharging and deep discharge [14]. However, the estimation of the SoC remains a major challenge due to temperature variations and aging effects that influence battery performance.