Application of Digital Twin in Smart Battery Management Systems

Lithium-ion batteries have always been a focus of research on new energy vehicles, however, their internal reactions are complex, and problems such as battery aging and safety have not been fully understood. In view of the research and preliminary application of the digital twin in complex systems such as aerospace, we will have the opportunity to use the digital twin to solve the bottleneck of current battery research. Firstly, this paper arranges the development history, basic concepts and key technologies of the digital twin, and summarizes current research methods and challenges in battery modeling, state estimation, remaining useful life prediction, battery safety and control. Furthermore, based on digital twin we describe the solutions for battery digital modeling, real-time state estimation, dynamic charging control, dynamic thermal management, and dynamic equalization control in the intelligent battery management system. We also give development opportunities for digital twin in the battery field. Finally we summarize the development trends and challenges of smart battery management.


Introduction
Global oil resources are drying up and environmental pollution is increasing. Reducing greenhouse gas emissions is one of the most global concerns. Many countries have issued relevant regulations about banning the sale of fuel vehicles, therefore related fields of new energy vehicles become a research hot spot [1,2]. The development and management of batteries is the key technology of new energy vehicles. Lithium ion batteries have become the most promising choice thanks to their high energy density, long cycle life and low self-discharge rates [3,4].
To maximize the performance of lithium-ion batteries in the use process, the requirements of the battery management system (BMS) are getting higher and higher, especially in terms of safety and cycle life. However, BMS obtains little information from a real battery, making it difficult to accurately indicate the aging and safety status of a battery, and necessitates full life cycle management. In addition, the on-board BMS cannot store or process large amounts of data during the operation of a vehicle, with poor real-time capability and data utilization rate [5,6]. For efficient battery management, it is necessary to indepth study the mechanisms, such as battery aging and thermal runaway. Besides, the integration of advanced technologies like big data, artificial intelligence (AI) into the BMS is promising to realize battery life cycle data management [6].
As academia has done a lot of researches on emerging technologies such as big data, AI, blockchain, and the Internet of Things (IoT) [7][8][9], the concept of digital twin (DT) is becoming more and more clear. DT can establish the mapping between a physical entity and a virtual model, which have close interaction with each other. DT was originally used in the aerospace field, mainly for remaining useful life (RUL) prediction and health management of aircraft. Ezhilarasu et al. [10] discussed the application of DT to evaluate the operation status of complex systems, such as aeroplanes. Li et al. [11] established the intelligent BMS oriented to digital and intelligent development.
This paper discusses the application prospects of DT in intelligent BMS. Section 2 describes the concept, development and key technologies of DT. Section 3 describes the methods and challenges of battery modeling, state estimation and RUL prediction, and elucidates how to solve these challenges based on DT. Battery safety and dynamic control based on DT are described in Section 4. In Section 5, the development opportunities and challenges of DT in the field of battery are elucidated. The future trends and challenges of intelligent BMS are summarized in Section 6.

Development of Digital Twin
The idea of DT was proposed by Professor Grieves M. W in 2003 in the course of Product Lifecycle Management, which is called "the virtual digital expression equivalent to physical products" [14]. To ensure the safe operation of the flight system during its lifetime, NASA introduced the concept of DT in the space technology roadmap of 2010. In 2011, the U.S. Air Force Research Laboratory used DT in the conceptual model of aircraft to predict structure life and ensure structural integrity [15]. It laid the foundation for the application of DTs in the aerospace field.
In 2014, the DT theory was accepted by the US Department of Defense, General Motors Corporation, Siemens (2021) 34:57 and other companies [16,17]. In 2016, Tao et al. [18] introduced DT into workshop research and explored the concept of DT workshop. They analyzed the key technologies of the DT model from the four system components of DT workshop which provided a theory for the realization of cyber-physical systems in the manufacturing workshop. Gartner, a world-famous consulting firm, has listed DT as one of the ten strategic technology trends for three consecutive years (2017-2019) [19][20][21]. With the support of existing advanced technologies, DT has become the key to optimizing product design and maintenance processes, realizing product RUL prediction and reducing the overall cost of products.

Concept of Digital Twin
The basic idea of DT is to accurately and real-time connect the physical world and the virtual world [22]. However, it is difficult to define the conceptual framework. In recent years, a large number of DT concepts and reference frameworks have been proposed. Zheng et al. [23] discussed the concept and characteristics of DT in a broad sense and a narrow sense, respectively. They proposed that the application framework of DT consists of physical space, virtual space and information processing layer. Table 1 tabulates different concepts and understandings of DT, summarizes the main points of these concepts, and reveals the development trend of DT.
Most early literatures define DT as high-precision models or multiscale simulations without considering realtime connections between the virtual and physical space.
With the deepening of research, researchers began to pay attention to the dynamic changes and bidirectional mapping of virtual and physical space.
Although there are different explanations in the literatures, the basic characteristics of DT have reached a consensus. DT is not a specific technology, but a concept that can be achieved through many advanced technologies. Therefore, enough clarity and specific concepts are required for different research areas. The DT system can rely on specific industrial practices and give full play to its advantages. Some researchers have also given a brief concept in the field of lithium-ion batteries, however, most of them focus on the use of DT to establish high-precision models and to estimate state of charge (SOC) and state of health (SOH) [24][25][26]. The mutual mapping and control of the virtual and physical batteries are neglected. With the further research of DT in the field of batteries, the concept of DT will become clearer.

Key Technologies of Digital Twin
From digital modeling to realize intelligent control, DT needs big data, AI, IoT, cloud computing, blockchain and other powerful platforms. These technologies are not independent of each other, and their relationship with DT is shown in Figure 2. This section will introduce the application and integration of these key technologies in DT.

Digital Twin and Big Data
Big data is a term utilized to refer to the increase in the volume of data that are difficult to store, process, and analyze through traditional database technologies. The nature of big data is indistinct and it involves Table 1 Concept of DT

Institutions / Authors Year Concept Key Point
NASA [27] 2010 DT is an integrated multi-physics, multi-scale, probabilistic simulation of a vehicle or system that uses the best available physical models, sensor updates, fleet history, etc., to mirror the life of its flying twin.

Integration, simulation
Rosen et al. [28] 2014 DT is a kind of life cycle management through model and simulation which include the state information and historical information of the aircraft when manufacturing and using to realize the high-fidelity modeling of the aircraft in the full life cycle.

High-fidelity model
Schluse et al. [29] 2016 DT is virtual substitutes for the real world and contains virtual presentation and communication capabilities, constituting smart objects as intelligent nodes within the IoT and services.

Virtual substitutes
Söderberg et al. [30] 2017 DT uses faster optimization algorithms, powerful computing power and big data to realize real-time control and product optimization in the field of simulation.

Real-time control and optimization
Xu et al. [31] 2018 DT dynamically represents a physical entity and its functions, behaviors, and rules. Dynamic model Wang et al. [32] 2019 DT dynamically transmits selected online measurement data to the simulation world so that the running simulation model can reversely and adaptively control the real world.

Dynamic, feedback control
Wu et al. [24] 2020 DT is a digital replica of a physical entity, and there is a close connection between the two.
Data, model, AI considerable processes to identify and translate the data into new insights [33]. IBM proposed the 5V characteristics of big data: Volume, Variety, Value, Velocity, Veracity [34]. The big data platforms should have the performance of integration, storage, management, interactive analysis, visualization, and security. The twin data integrate the massive data of multiple sources, multiple types, and multiple structures, such as sensor data, model generation data, virtual and real fusion data [35]. Big data can extract more valuable information from the massive data generated by the DT to explain and predict the results and processes of real events. There is consistency between the DT model and big data in data type and so on. To a certain extent, it can be considered that the DT is a bridge between big data and the physical world.

Digital Twin and AI
AI is a machine's simulation of human consciousness and mind. The four main sub-fields of AI include machine learning, natural language processing, speech processing and machine vision. AI has a wide range of applications and machine learning is one of the most important algorithms in battery field [36]. Machine learning is an algorithm that automatically analyzes and obtains rules from data, and uses the rules to make inferences or predictions. Therefore, AI and big data often go hand in hand. The DT uses its high-fidelity virtual model, massive twin data, and real-time two-way dynamic interaction to realize functions such as simulation, diagnosis, prediction, and optimization control. AI analyzes, integrates and deeply mines twin data by matching the best intelligent algorithms to complete services with different needs. With the support of AI, DT can greatly improve the value of data and the responsiveness and accuracy of various functions.

Digital Twin and Internet of Thing
The IoT mainly connects real-world objects to the Internet through the interfaces of various devices (such as RFID, sensors, etc.), or connects them to each other to achieve information transmission and processing [37].
IoT devices and services act as "ladders" to collect, generate, analyze, and transmit digital data from the physical world to the virtual world. Twin data often have big data characteristics, and battery DT uses these data to predict the future state of the battery through machine learning technology in the case of incomplete physical mechanism and incomplete input data.

Digital Twin and Cloud
Due to the large amount of data and diversity, daily storage devices cannot meet the demand, and need to use cloud storage information. In addition, DT requires real-time model simulation optimization, behavior prediction, etc., and these processes require a lot of calculations for complex physical systems. Slow calculation speed will cause poor follow-up of the virtual model and the physical system too late to respond. In modern control systems, algorithm complexity and data amount are increasing. Thus the on-board processors are not able to meet the demand. The powerful cloud computing provides the possibility for real-time updates of the system. In the future, information processing, analysis and control decisions will all be carried out on the cloud platform. At present, researchers have devoted themselves to the research of cloud BMS, and believe that cloud BMS is an inevitable trend of future development [38]. Due to the large amount of data and the complexity of the algorithm, DT will rely on the cloud computing platform.

Digital Twin and Blockchain
Blockchain is a new type of application scheme realized through technologies, such as distributed data storage and point-to-point transmission. Blockchain is a combination of distributed ledger, consensus mechanism, smart contract and cryptography [39]. Essentially, it can be regarded as a database, which is a series of interrelated data blocks formed by a specific encryption method. Each data block contains a string of data and can be used to verify whether the transaction information is valid. The core of DT is the integration and analysis of data, and aspect of data management may have risks such as data leakage and malicious tampering. To achieve trust in the system, the problem of data credibility must be solved. The advantages of the combination of DT and blockchain are mainly reflected in ensuring that data are not tampered with during storage and transmission, and realizing the interaction between DTs. The realization of DT cannot be separated from these new technologies. They cooperate to realize the comprehensive perception of physical world, multi-scale and high-fidelity physical modeling, efficient and safe data

Summary
Although the idea of DT was put forward at the beginning of the 21th century, due to technical limitations, it has started to attract attention in recent years. At present, DT is still in the developing stage. The use of DT to fully realize the interconnection of the virtual world and the physical world still faces many challenges, such as the development of intelligent algorithms, the use of highprecision sensors, and the integration of cloud computing, big data, IoT and other technologies. However, the preliminary application of the DT in aerospace, intelligent manufacturing and other fields has proved its strong ability to deal with complex systems, and it also has huge potential in state prediction, fault maintenance, and optimized control.

Battery Digital Twin: Modeling and State Estimation
In recent years, the research of batteries is more and more extensive and mature, however, there are still many problems to be solved. To solve the problem of state estimation and RUL prediction of lithium ion batteries, the model is usually used to describe the voltage response curve, capacity and internal resistance of the battery. However, due to the high nonlinearity and coupling of the internal relations of batteries, it has been challenging to accurately establish the lithium-ion battery model [40]. DT has made excellent performance in the aerospace field, especially in RUL prediction and optimal control. This shows that we can use DT to solve the battery management problems. In the next two sections, we discuss the challenges of battery management and what kind of solutions DT can provide.

Battery Modeling
At present, the widely used battery models mainly include the equivalent circuit model (ECM), data-driven model (DDM) and electrochemical model [41,42]. ECM uses different combinations of electrical components such as resistance, capacitance, voltage source to simulate the charge and discharge characteristics of lithiumion batteries [43,44]. Because of the simple mathematical expression of ECMs, adaptive filtering algorithms such as recursive least squares can be implemented to identify parameters, making ECM the most popular choice [45,46]. However, as the ECM lacks physical meaning, it cannot characterize the internal reactions of the battery. Therefore, it is not suitable for control that needs to estimate the internal physical state. In recent years, fractional-order ECMs have been extensively studied. Xiong et al. [47] proposed a novel fractional-order model which considers both the Butler-Volmer equation and a fractional order constant phase element for SOC estimation. The DDM has been widely used in the development of battery models. It has a very high learning ability and is often used for battery state estimation and RUL prediction. Zhang et al. [48] proposed a novel data-drivenenabled battery states estimation method by combining recurrent neural network modeling and particle-filteringbased errors redress. The electrochemical model considers the internal electrochemical reactions, heat transfer, ionic diffusion and other reactions in the battery. It uses partial differential equations and algebraic equations to describe the charge and discharge behavior of lithium-ion batteries at a mechanism level. Common electrochemical models include the Pseudo-2D (P2D) model and the single particle model (SPM). The P2D model is based on theory of concentrated solution and porous electrode [49,50], and can describe the local behavior in the thickness direction of the battery. However, due to the large number of parameters, high complexity and long simulation time, the equations should be simplified to reduce the dimension [51]. A single particle is used to represent an electrode in the SPM. It is considered that the solid phase diffusion and migration only occur inside the particles, and the influence of liquid phase concentration and liquid phase potential on the battery terminal voltage is ignored [52,53]. SPM is easy to be online implemented due to its simple structure and little computational burden. However, the assumption regarding the simplifications does not hold in the case of large current rates, and the application of SPM is usually limited within 2C [54].
Although the electrochemical models can describe the changes in the internal state of the battery, these models usually have many parameters which are difficult to obtain. The acquisition of some parameters sometimes requires destructive testing. Ecker et al. [55] introduced the parameterization process of an electrochemical model of a Kokam 7.5Ah battery, and verified the measured parameter set through experiments. Similarly, Johannes et al. [56,57] measured and experimentally verified the electrochemical and thermal parameters of a 28 Ah high-power battery, and assembled a coin cell to determine the electrochemical performance of the electrode material.
But not all parameters affect the accuracy of the electrochemical model equally. Li et al. [58] divided the electrochemical model parameters into geometric parameters, transportation parameters, kinetic parameters, and concentration parameters. The sensitivity of 26 parameters was separately analyzed under constant current and constant voltage (CC-CV) charging and the actual operating load of electric vehicles, and the influence of different charging rate and discharge interval parameters was discussed. Electrochemical model parameter identification generally uses biomimetic optimization algorithms, such as genetic algorithm, particle swarm optimization, and colony foraging optimization [59,60]. These algorithms can obtain a global optimal solution through an intelligent search. Yan et al. [61] used a bacterial foraging optimization algorithm with a shorter calculation convergence time to identify parameters of SPM, such as electrode active surface area, lithium ion solid phase diffusion coefficient, and reaction rate constant.

State Estimation and Remaining Useful Life Prediction
In order to make electric vehicles operate safely and efficiently, the battery SOC, SOH estimation and RUL prediction are important, which can provide a basis for the energy management and safety management of electric vehicles. The electrochemical reaction process and reaction stage of the battery are complex and difficult to determine, and the complexity of the working conditions during the vehicle operation. In addition, there is a coupling relationship between SOC and SOH, and their changes will affect the battery model parameters, resulting in an inaccurate battery model. These reasons make it difficult to obtain accurate values of SOC and SOH.
The simplest method of SOC estimation is the Ampere-hour integration method, however, the initial SOC is difficult to obtain, and the estimation accuracy is subject to the current sensor. In order to solve the influence of sensor signal noise, adaptive filtering algorithms are usually used to improve the estimation accuracy, such as the extended Kalman filter (EKF), cubature Kalman filter (CKF), unscented Kalman filter (UKF) and particle filter [62,63]. Xia et al. [64] proposed a SOC estimation algorithm based on an adaptive cubature Kalman filter (ACKF), and two typical driving cycles are applied to evaluate the performance of the proposed method by comparing with the traditional EKF and CKF algorithms. Experimental results show that the ACKF algorithm has better performance in terms of SOC estimation accuracy, convergence to different initial SOC errors and robustness against voltage measurement noise. In order to reduce the impact of constant parameters on the accuracy of SOC estimation in the battery model, Xiong et al. [65] proposed a joint SOC estimation method, in which the H infinity filter is used to online estimate the battery model parameters, and the UKF is used to estimate the SOC. The proposed joint SOC estimation algorithm has high accuracy, fast convergence, and high robustness.
However, this method cannot be applied to the situation of small current discharge and small sampling interval. Although filtering algorithms are widely used for SOC estimation, they do not consider the influence of battery aging and other factors on SOC.
Therefore, researchers began to investigate the joint estimation of SOC and SOH to improve the accuracy of both. Based on the simplified P2D model, Liu et al. [66] jointly constructed the relationship between SOC and SOH and the average lithium-ion concentration based on full consideration of electrolyte dynamics and electrolyte dependence. The SOH of the battery was calibrated with the average lithium-ion concentration predicted by the lower cut-off voltage. The accuracy of online SOC estimation can be maintained during battery aging. However, the accuracy of the above model-based estimation methods is subject to model parameters.
In response to the challenges of model parameterization and the highly nonlinear and coupled nature of the battery degradation process, researchers have tried a variety of data-driven methods, such as neural networks, support vector machines, Gaussian process regression to solve state estimation, RUL prediction and other problems [67,68]. Machine learning uses a large amount of data to train the mapping between voltage, current, temperature, etc. and SOC, SOH. Khaleghi et al. [69] proposed a data-driven algorithm based on multi-state indicators, in which time-domain and frequency-domain condition indicators were extracted from on-board data at certain time intervals and fed into Gaussian process regression estimators to estimate SOH. However, datadriven methods are computationally heavy and dependent on training data. Therefore, researchers have selected two or more methods to improve accuracy. Chen et al. [70,71] proposed a SOC estimation method based on a feedforward neural network (FFNN). Firstly, an improved battery model was established using FFNN, and then the SOC was estimated based on the FFNN model and EKF. Experiments proved the applicability of this method in the case of incorrect initial SOC, initial capacity and low temperature, and the SOC estimation error can be stabilized within 2%. However, the real-time performance, robustness and stability of the system cannot be guaranteed from the perspective of computational complexity and accuracy.
Curve-based methods are often used in aging diagnosis, Zhang et al. [72] proposed a feature extraction-based method based on the charging voltage curve to estimate battery SOH. Similarly, Severson et al. [73] found the features with the highest correlation from features such as the early cycle discharge voltage when the capacity degradation has not emerged. Incremental capacity analysis (ICA) and differential voltage analysis (DVA) based on battery OCV curves are also used for the calibration of SOH. Both IC and DV curves can be obtained by transformation of constant current charge-discharge data [74]. The former is described as dQ/dV-V relation, while the latter is described as dV/dQ-Q relation (V and Q denote battery voltage and charge amount, respectively). The curve needs to deal with noise. Besides, IC and DV curve acquisition usually requires a small current rate, which can be difficult in practical applications. Riviere et al. [75] proposed an online estimator, in which a Butterworth filter was used to obtain clean datasets for ICA.
Battery aging is governed by various factors. Xiong et al. [76] summarized the aging mechanisms of lithiumion batteries, and discussed the evolution of the dominant aging mechanism under different external factors. This study provides a theoretical basis for RUL prediction and aging test design. RUL prediction methods mainly include empirical prediction method, filtering prediction method and time series prediction method [77][78][79]. The empirical prediction method uses historical experimental data to fit the aging trajectory, such as polynomial model, exponential model and Verhulst model [80][81][82]. This method is simple, and light-weight, however, the fitting is sensitive to the fluctuation of the sample data, and the prediction results are easy to diverge. The filtering prediction method is based on the idea of state estimation. Wang et al. [83] proposed a state space model based on a spherical container particle filter for RUL prediction of 26 lithium-ion batteries and proved that the model is superior to the particle filter in terms of prediction accuracy. Filtering algorithm can improve the accuracy of RUL prediction, however, the accuracy is easily affected by external temperature.
Time series prediction methods include gray prediction, neural network, relevance vector machine and other methods. The historical capacity data are used for training and learning, and the trained model is used for future battery capacity changes. Rezvani et al. [42] studied an adaptive neural network method, which takes the battery capacity as input to predict the RUL. Simulation experiments proved that the prediction method achieves a better single-step prediction. Zhang et al. [84] proposed a recurrent neural network (RNN) based on long-term short-term memory (LSTM) to predict RUL. The model was trained using experimental data of lithium-ion batteries at different current rates and temperatures and has good results in RUL predictions trained on offline data. However, these methods based on AI algorithms rely heavily on training data.
There are many methods for battery modeling, state estimation, and RUL prediction, each has its advantages, disadvantages or limitations. Table 2 shows a comparison of various methods.

Challenges
Although researchers have done a lot of research work on the parameterization of electrochemical models, they still face another challenges. The model parameters can be obtained by using different methods. It is difficult to accurately estimate the variation of battery internal parameters during battery aging. Understanding the regularity of electrochemical parameters and establishing a parameter estimation method suitable for different batteries are very important for the future research of BMS. In terms of RUL prediction, the current research on the aging mechanism is not thorough enough to accurately describe all changes in the battery, and it is difficult to predict the inflection point of the life curve.
On-board BMS data can hardly meet the demand. The data-driven based state estimation and RUL prediction methods are attracting more and more attention and require mass of data. Like all big data problems, there are data collection, application, sharing, security, privacy and other issues [85]. The massive data generated during driving which may be stored on a big data platform or distributed on the onboard BMS, terminals and other equipment. As the current network attacks continue to change, any equipment safety issues can trigger a data leak risk.

Battery Digital Twin Model
DT models require multi-scale physical models of all aspects of the battery and real-time updates of the models. It is worth noting that the focus of the DT model is the reduction of the model. Instead of coupling multiple physical models together, multiple individual models represent the various properties of the battery. The internal behavior of the battery should be described transparently, including the electrical characteristics, thermal characteristics, and aging characteristics of the battery. Therefore, a complete battery DT requires the establishment of various models at first, however, all battery models have key points and limitations. They will play different roles in the battery DT system, and when necessary, different models need to be combined.
The difference with the traditional model is that DT model is updated in real time. For the ECM, the model can be updated by on-line parameter identification. However, it is difficult to update the electrochemical model in real time due to the problem of parameterization. Researchers have made continuous efforts to try to find the trajectory of the internal parameters by combining with data-driven models and to update the electrochemical model in real time. Chun et al. [86] proposed a realtime parameter estimation of an electrochemical model based on neural networks. First, according to the general chemical reaction rate formula, the parameters related to aging mechanisms are selected to indicate the progress of performance degradation and the shortening of battery life. After the specified parameter values are applied to the electrochemical lithium-ion battery model, the actual measurable data such as voltage, current, temperature, and SOC can be synthesized. Then it is used to train an RNN. The trained RNN directly provides estimated parameters after inputting external characteristic data, such as voltage, current and temperature. It can solve the problem of long convergence time for parameter identification using genetic algorithm and particle swarm optimization, and provide ideas for real-time updating of model parameters.
In the battery DT framework, researchers have also been exploring the use of reduced-order models and a certain degree of offline processing to make full use of the P2D model. Sancarlos et al. [87] used a data-driven model based on dynamic pattern decomposition to reappear battery behavior and obtained accurate results. In order to simulate real driving conditions, a hybrid twin model based on vehicle dynamics and battery is proposed to update the P2D model in real time. It has been verified that the maximum error of SOC and terminal voltage can be within 0.035% and 0.5% respectively. Figure 3 illustrates the process of establishing a real-time updated battery twin model based on the P2D model in literature [86].
It takes a lot of time to obtain battery aging data under laboratory conditions, and it will produce high economic costs. This requires that battery model has good transferability. DT can use historical data for theoretical analysis and simulation. Through a small number of experiments, combined with electrochemical models and prediction models, the changes of internal parameters, cycle life and safety of different batteries can be obtained. Ma et al. [88] proposed a hybrid prediction method, which combines the average Euclidean distance, the transfer learning method based on stacked noise reduction automatic encoder and the improved Arrhenius model. The model estimates the life of the same battery formulation tested at high temperature, and introduces the error correction coefficient into the original acceleration model to improve the prediction accuracy. The test cycle of nearly 60% can be optimized for different battery formulations. The battery model that can be transplanted to other types of batteries has been studied by researchers, which provides ideas for the DT transferable battery model.
However, mature digital twins need to establish a variety of fusion models to solve different problems. In the field of aerospace, Rossman et al. [89] in the virtual simulation platform of the new satellite concept that virtual simulation should use multi-physical fields, combining orbital mechanics, jet simulation, rigid-body dynamics, laser-sensor simulation, camera simulation, robot simulation, drive simulation, contact simulation, etc. In the battery DT system, it is a combination of the electric model, thermal model, aging model, force model, etc. However, there is still a long way to go to establish a battery DT model in an all-round way. More in-depth research is needed on the electrical characteristics, thermal characteristics and aging characteristics.

Real-time State Estimation and RUL Prediction Based on DT
Battery modeling is the basis of DT, and battery charging and balancing strategies need to consider state and aging tracking of the battery, so real-time state estimation is also the basis of battery feedback control. The biggest advantage of the DT is that it can realize the online state estimation and then realize dynamic management of the battery. The DT is continuously updated following the battery aging process. It can combine data-driven algorithms and battery aging models, use historical data information and real-time data information to estimate the battery aging state, and the current maximum available capacity of the battery is fed back to the SOC estimation in real time to achieve accurate SOC estimation. Using the Internet of Vehicles to realize the cloud transmission of vehicle information, we can realize highprecision and high-following SOC and SOH estimations based on the cloud computing platform. Li et al. [26] proposed a cloud battery management system based on DT, as shown in Figure 4. It consists of six subsystems: a battery system for data generation, a BMS slave control for data sensing, an IoT component for data collection, a cloud for data storage, and an application programming interface for data analysis, and user interface for data visualization. The measured battery-related data are transmitted to the cloud BMS using IoT components, and a battery DT model is constructed based on the second-order RC model. The adaptive extended H infinite filtering is used for SOC estimation, and the particle swarm optimization is used for SOH estimates and updates the battery model in real time to achieve online battery SOC and SOH estimation. Finally, experiments have shown that the mean-square error (MAE) of voltage and SOC is maintained within 0.01V and 0.49%, respectively. The MAE of the SOH indicating the battery's capacity fade, SOHC, and the SOH indicating the battery's power fade, SOHR, estimated without sensor noise are 0.74% and 0.89%, respectively. The MAEs of SOHC and SOHR estimated with sensor noise are 1.7% and 2.3% respectively. Baumann et al. [90] proposed a DT system to estimate and display the SOH of the battery, using different models in the cloud BMS to estimate the battery system state and predict RUL. Qu et al. [25] established a DT model that mainly focuses on the battery performance degradation estimation by accurate battery discharge process simulation. The lithium-ion battery digital twin model that is proposed in this paper is driven by on-line measurable parameters, including terminal voltage, electric current and sample time. The health indicator is first extracted during the partially discharge process. And then, this health indicator is used as one of the inputs for the DT model and used an LSTM network to describe the relationship between battery terminal voltage and SOC. Due to the uncertainty of future working conditions in real vehicle operation, it is required to predict the future based on incomplete information. DT can complete the prediction of unknown working conditions by virtue of the strong learning ability of big data and AI. Ren et al. [91] proposed a new method for estimating the remaining discharge energy of the battery based on accurate prediction of future working conditions. First, predicting the future power output and temperature change rate of the battery based on historical data, and using the recursive least squares algorithm to estimate the ECM parameters to simulate the battery voltage response. Then, based on the iterative prediction of the battery state (including charge state, temperature, battery model parameter changes and voltage response) in the future discharge process to estimate the remaining discharge energy of the battery, which provides ideas for the prediction of unknown operating conditions.
In addition, most of the RUL prediction methods only consider single cell and battery cycle aging, while ignoring the different battery pack states and battery calendar aging. In DT, multiple single-cell models can be integrated into the battery pack model, which can clearly describe the inconsistencies of cell capacity, voltage, internal resistance, and internal parameters through different cell models. Since then, it can not only accurately predict the aging state of the battery cell, but also realize the state estimation and aging trajectory prediction of the battery pack.

Battery Digital Twin: Safety and Control
In recent years, battery fire still accounts for a large part of electric vehicle accidents, and the safety of electric vehicles has always been the primary concern of consumers [92]. Battery fault diagnosis, thermal management, charge/discharge control and balanced management play a critical role in ensuring battery safety and extending battery useful life. Under the premise of ensuring battery safety, achieving extremely fast charging is also a major problem at present.

Thermal Safety
The safety problem of lithium-ion batteries boils down to the thermal runaway. Many factors can cause thermal runaway, which can be divided into mechanical abuse (squeeze, acupuncture), electrical abuse (overcharge, overdischarge, external short circuit) and thermal abuse (local overheating). Feng et al. [93] specifically analyzed the propagation path of thermal runaway and the method of cutting off the thermal runaway. In order to improve the safety of lithium-ion batteries, battery manufacturers are looking for safer electrolyte and electrode materials, such as using additives and coatings to improve the thermal stability of the battery. In addition, the battery structure can also be changed to improve safety, such as the blade battery launched by BYD recently. It was reported not to heat up sharply under battery puncture tests [94]. Although battery safety can be improved from its structure, the prediction and control of thermal runaway in the use process is still the key to battery research. The prediction of the initial stage of thermal runaway is extremely critical. If reasonable control is not used to intervene, the internal temperature of the battery will continue to rise rapidly, which will cause the electrolyte to dry up, the solid electrolyte interphase (SEI) to decompose, and the separator to melt, accompanied by producing gas and large amounts of heat. This finally leads to thermal runaway [95]. The thermal abuse model is used to describe the temperature and battery performance under abnormal working conditions, and to warn of the danger of thermal runaway during battery operation. Kim et al. [96] presented the chemical reactions in lithium-ion batteries at high temperatures and applied them to a three-dimensional lithium-ion battery thermal abuse model. Lee et al. [97] proposed a two-way nonlinear electro-electrochemical-thermal coupling method to analyze the internal short circuit caused by quasi-static indentation and predict the pressure drop and temperature rise.
The prediction of thermal runaway focuses on temperature monitoring. Ouyang et al. [98] summed up the three characteristic temperatures of battery thermal runaway: self-heating starting temperature T1, temperature T2 that causes thermal runaway, maximum temperature T3 of thermal runaway. Thermistor or thermocouples are usually used to monitor the surface temperature of lithium-ion batteries. However, these two temperature sensors have low detection accuracy and are susceptible to environmental changes. In order to improve the detection accuracy of surface temperature and the reliability of data, Nascimento et al. [99] used fiber sensors to monitor the surface temperature of lithium-ion batteries in real time. Due to the heat conduction effect, there is a difference between the internal and external temperature of the battery, especially under high current rate or overcharging and overdischarging in extreme conditions. These conditions can easily cause safety problems, such as thermal runaway. Therefore, the measurement of the internal temperature of the battery is very important. Mutyala et al. [100] proposed a method of embedding a flexible polymer film thermocouple in a lithium-ion battery for monitoring internal temperature. Nascimento et al. [101] proposed a hybrid sensor network composed of fiber Bragg grating and Fabry-Perot cavity to monitor internal strain and temperature changes.
In the early stage of thermal runaway, the BMS often fails to detect faults in the initial stage due to characteristic signals, such as battery temperature, voltage, and current had no significant changes. However, electrochemical side reactions occur inside the lithium-ion battery, a large amount of gas will be produced even in the initial stage. Therefore, the use of gas sensors to monitor thermal runaway can obtain more sensitive and accurate early diagnosis results. Cai et al. [80] presented an early detection method of lithium-ion batteries thermal runaway based on gas sensing. By monitoring CO2 concentrations, which is produced at the early stage of battery thermal runaway, early detection of cell failure is possible.

Charging Control
Range anxiety and long charging times are often quoted among the main issues hindering wider adoption of EVs. Fast charging capability for batteries has become the focus of battery EV industries. Fast charging is to effectively avoid or weaken the polarization, control the charging temperature rise, and maximize the current acceptance ability of the power battery without affecting the battery useful life as much as possible.
Ohmic polarization, electrochemical polarization, and concentration polarization generated during charging are important factors that affect the charging time. Therefore, fast charging strategies often use depolarization method, such as shelve, negative pulse, slow pulse to avoid or weaken polarization [102]. In addition, the heat generated by fast charging is often difficult to effectively eliminate, thereby accelerating the aging of the battery. On the above problems, many researchers attempt to optimize the charging strategy from the perspectives of shortening the charging time, reducing the charging temperature rise, improving the charging efficiency, and extending the battery useful life [103]. Till now, the fast charging methods of batteries mainly include CC-CV charging, multi-stage constant current charging, pulse charging, AC charging, etc. [104]. Based on the simplified electrochemical-thermal model, Perez et al. [105] proposed an optimal battery charging control method, in which the Gauss-Legendre method was used for nondestructive charging under the limitation of phase concentration and temperature. Lithium plating at the negative electrode is the bottleneck of the fast charging technology of lithium-ion batteries, especially in low-temperature environments. Lithium plating not only accelerates the aging of the battery, but also triggers internal short circuit and thermal runaway accidents by penetrating the separator. Lithium plating is affected by many factors, such as lithium-ion liquid/solid phase diffusivity, ionic conductivity of the electrolyte, electronic conductivity of the electrode. It is believed that when the sum of the equilibrium potential and the overpotential is smaller than 0 relative to Li+/ Li, the lithium plating will occur. However, there is no in-depth study of the factors affecting lithium plating. In order to solve the problem of lithium plating during charging, researchers have developed many model-based methods to minimize the probability of lithium plating.
The negative electrode potential is the most obvious sign of whether lithium plating occurs. It can be monitored by inserting a reference electrode in the lithium ion battery. Mai et al. [106] estimated the negative electrode potential based on the P2D model to study the lithium plating limit of the standard CC-CV charging method. Subsequently, they used this method to propose another alternative charging conFigureuration file. However, some researchers have found that the negative electrode potential threshold for lithium plating is not always 0 V. Wu et al. [107] used metal foil as a reference electrode to study the influence of the capacity ratio of the negative electrode to the positive electrode of the soft pack battery on the negative electrode potential. When the ratio is 0.9 and the negative electrode potential drops to 0.1 V under 0.2C charging rate, lithium plating occurs. When the ratio reaches 1.05, the critical negative electrode potential for lithium plating is still above 0 V. This also proves that the battery design and charging conditions (such as temperature and charging rate) have a great influence on the lithium plating. Chu et al. [108] established an electrochemical model of a closed-loop observer based on the control-oriented lithium deposition state. Based on this model, a non-destructive fast charging strategy was proposed to ensure that the battery can be quickly charged while reducing damage to the battery.

Battery Balancing
Due to the accumulation of errors in the production process, transportation and storage, and electronic components, there will inevitably be inconsistencies among battery cells [109]. The balanced control strategy can be divided into working voltage based, SOC based, and capacity based [110,111].
The target of a balancing strategy based on the working voltage is to make the working voltage of each single cell in the battery pack reach the same or within a limited threshold range. Lee et al. [112] proposed an improved Cuk converter as a battery balanced circuit and used a fuzzy algorithm to control the circuit according to the voltage difference between the battery cells. The advantages of the balancing strategy based on the working voltage are that the working voltage is easy to obtain and the control strategy is simple. At present, this method is mostly used in engineering practice. However, due to the existence of over-potential, the consistency of battery operating voltage does not represent the consistency of the real state of the battery. In addition, if the active balancing circuit is used, due to the different load current of each cell, the working voltage of the cell in the discharged state is lower than the cell in the charging state. At this time, the working voltage of the battery will provide error judgment information.
The target of a balanced strategy based on SOC is to make the SOC of every single cell in the battery pack reach the same or within a limited threshold range. Lai et al. [113] used BMS to estimate the SOC and SOH of each cell as the control basis of the active balancing circuit to balance each cell in the battery pack. Compared with the balancing strategy based on the working voltage, the SOC based one can better reflect the battery state. Besides, the inconsistency of the SOC between each cell can quantify the balanced electricity, which makes it convenient to apply various intelligent control algorithms to optimize the balancing strategy. However, this method relies on an accurate estimation of SOC. Einhorn et al. [114] compared and analyzed the equalization effect of voltage and SOC as balancing variables under the same conditions. The results showed that the latter has a better control effect under the premise that accurate SOC estimation can be achieved. The balancing strategy based on battery capacity is based on total capacity, rechargeable capacity or releasable capacity, and its target is to maximize the capacity of the battery pack. Zheng et al. [115,116] proposed a battery pack online balancing algorithm based on the battery charging voltage curve. The target of the algorithm is to maximize the battery pack capacity. Firstly, the charging voltage curve is used to estimate the charging capacity online, and then the energy consumption balancing based on the estimation of charging capacity is proposed. However, there is still a small deviation between the balanced results based on the rechargeable capacity estimation and the theoretical capacity of the battery pack, and the fuzzy logic algorithm is further used to effectively reduce the capacity deviation of the battery pack. The balancing strategy based on battery capacity can maximize the capacity of the battery pack and can effectively avoid the occurrence of over-balance problems. Because this method is based on capacity, it better represents the real inconsistencies of the battery, but this method still cannot avoid the problems of online estimation of SOC and capacity.

Challenges
The first challenge is data acquisition. For research on thermal runaway, lithium plating, etc., battery stress, internal temperature and other information are required. Under laboratory conditions, it can be obtained by using high-precision sensors such as fiber sensors, pressure sensors, and built-in thermocouple sensors. However, in real vehicles applications, it will increase the cost, and the built-in sensor may also affect the electrochemical reaction process of a battery, and even cause other side reactions. In the future, it is necessary to solve the problem of using a limited number of sensors to diagnose battery faults.
Lithium plating models based on electrochemical models also face the problem of model parameterization. In addition, many lithium plating models are concentrated in one-dimensional or pseudo-two-dimensional space. These methods ignore the influence of concentration gradient and thermal gradient in the direction perpendicular to the pseudo-two-dimensional plane, which further leads to inaccurate results. And the three-dimensional thermal model will face the challenge of calculation and model delay. In terms of charging and balancing control strategies, it is impossible to achieve real-time and personalized control in the case of different requirements under different working conditions.

Optimization of Charging, Thermal Management and Balance Management
The thermal management and charging strategy based on battery DT mainly lies in real-time optimization and updating. In some special working conditions, battery status, and different demands, targeted adjustments can be made by considering consistency between battery cells. The optimization idea of charging strategy and thermal management strategy based on battery DT is shown in Figure 5. The left half of the process can be regarded as the establishment of a DT model. Based on the correction algorithm and the historical running state data stored in the battery data storage platform, the general battery simulation model is updated. And through the real-time running state data of the real battery, the battery DT is updated in real time.
Battery digital twins are used to optimize the charging strategy. Firstly, the optimized charging strategy is determined, such as multi-stage constant current charging, pulse charging, multi-stage constant heat charging and AC charging [117]. According to the demand set optimization objectives, such as charging time, battery remaining useful life, and based on the mechanism of battery reaction set boundary conditions, such as the maximum charging rate, maximum charging temperature rise. The charging parameters are input into the DT to simulate and predict the charging time, aging and temperature of the battery. The genetic algorithm and particle swarm optimization are used to maximize the optimization objective and select the best parameters. The charging Figure 6 Optimization of balanced strategy with digital twin current is generated according to the optimized parameters and the feedback control is completed.
The thermal management strategy is similar to the optimized charging strategy. The thermal management strategy can choose convection heating, conduction heating, short-circuit heating and mutual pulse heating, etc. [118]. The limit conditions are set as maximum or minimum temperature, maximum temperature rise or cooling rate. Finally, the real-time update and feedback control of the thermal management strategy are realized. It can be seen from the idea and flow chart of DT that compared with the traditional strategy optimization, the biggest advantage of strategy optimization based on DT is to realize the bidirectional dynamic mapping and control of the real battery and virtual model. It is not limited to the use of offline battery data management but can realize dynamic online management.
In addition, the inconsistency of battery cells will lead to the loss of capacity, the shortening of RUL and the increase of internal resistance. If not controlled, it will further increase battery inconsistency and aggravate battery aging [119]. In order to reduce the impact of battery charging and discharging on inconsistency, balanced control is required. Because the balance of the battery involves multiple battery cells, accurate analysis and optimization control will burden the amount of calculation.
At the same time, the actual operation data and simulated operation data are collected for analysis and calculation, which can not only reduce the inconsistency of the current battery cells, but also predict and control the inconsistency of the future battery cells. Compared with the research on battery charging and thermal management, it is necessary to establish a battery pack model when optimizing the balanced strategy, and analyze and mine the balance data. The balanced control strategy method and the optimization strategy algorithm calculate the equilibrium control strategy of the specified time step in the future. The commonly used balanced control strategies include model predictive control methods, generalized predictive control methods, PID control methods, etc., as shown in Figure 6.
Compared with the current battery management, the control strategy based on DT can adapt to complex working conditions and can be updated in real time according to user needs. In the face of low temperature environment, fast charging and other needs, the performance and useful life of the battery are guaranteed to a greater extent with DT.

Fault Prediction and Diagnosis
Traditional fault diagnosis is to detect over-voltage, over-current, over-temperature. However, a simple fault strategy can not achieve all-around fault tracking, fault warning and other advanced functions [6]. In recent years, some scholars have devoted themselves to the study of thermal runaway fault and sensor faults [120]. Battery fault diagnosis based on DT lays more emphasis on the establishment of battery comprehensive fault system including thermal fault, sensor fault, electrical fault, etc. which is constructed by combining fault diagnosis results with big data statistics using the artificial intelligence algorithm. In the future, fault diagnosis based on new technologies can realize the detection, location, traceability and prediction of battery system faults.
Another important role of DT in thermal runaway is to find the boundary conditions of thermal runaway, analyze the factors that cause thermal runaway, such as charge\ discharge rate, temperature, lithium plating degree, and SEI growth. Through thermal runaway experiments on batteries, a more accurate thermal runaway model is established by using an AI algorithm. Combined with DT, a large number of simulation tests of thermal runaway can be carried out to find the boundary conditions of thermal runaway under different test conditions, guide the control strategy under different working conditions of the battery, and reduce the occurrence of thermal runaway from the root.

Development Opportunities and Challenges of Battery DT
Data are extremely important in DT, we need a lot of offline and online data to realize dynamic control and fault diagnosis. Battery online data, such as voltage, current, temperature, are collected by the sensor. These information are simply processed by the BMS in vehicles (V-BMS) and transmitted to the cloud-based BMS (C-BMS) through the IoT for data cleaning and data mining. In C-BMS, use historical and online data for battery modeling, state estimation, management strategy, etc. C-BMS transmits the control information to V-BMS main control circuit to realize the feedback control of the battery. The data interaction between C-BMS and V-BMS is shown in Figure 7 [38]. C-BMS cannot be separated from the IoT and big data. In the future, some functions of V-BMS will be completely replaced by the C-BMS. The two cooperate to create a new generation of battery management system. The establishment of DT model requires a large amount of historical data. For the battery commonly used in the market, there are already many open source data, such as the NASA battery data set, which can be used to fuse different data vectors together to create deeper electrochemical insights and increase the identifiability of these systems. These huge amounts of offline data that are extremely important to build DT system to achieve reliable battery management. However, in the future, if a new type of battery does not have enough data, smart algorithms will need to be used for transfer learning when building DT to speed up research on battery characteristics [121]. In addition, due to the limitations of on-board sensors, the amount and type of data collected in practical applications are not as good as in laboratory conditions, for example, battery internal multi-point temperature cannot collected through sensors, which also poses challenge to effective and stable battery management. Therefore, it is necessary to use more powerful AI algorithm to realize the derivation from single information to multiple information to make up for the vacancy of battery data. It also poses a challenge to AI algorithms. Therefore, data and AI are very important in realizing battery DT.
Although the battery DT presents challenges in terms of data and intelligent algorithms, however, battery modeling, state estimation and control are already possible based on DT. In addition, DT combined with blockchain technology can realize the full life cycle management of batteries. Aenugu et al. [122] used blockchain technology in a battery full life cycle data management platform, which includes client, multi-channel blockchain network, and data processing, data analysis and visualization modules. Blockchain technology is also used to manage the health status of decommissioned lithium batteries, which reliably records the health status information of decommissioned lithium-ion power batteries, and forms a decentralized, trustless distributed system. These applications can be used as a part of the battery DT, bringing great convenience to the battery full life cycle management. The ultimate goal of DT is to establish a physical world corresponding to the real world. For the DT of power battery, it is necessary to complete the interconnection with vehicle DT, and then connect with road and traffic digital twins. When the battery DT interacts with other DTs, it involves a lot of information transmission and storage. Setting the individual operation mechanism of many DTs, transmitting the data parameters between DTs and physical entities, and designing the contents of various interactive modes between DTs are difficult to be completed by centralization. The distributed system of blockchain can disperse the huge workload of DTs for interaction. The distributed system of the blockchain can disperse the huge workload of DT interacting. Through the cooperation of many nodes, it can be used as a medium for information communication between DT and create a completely virtual world.
Decommissioned batteries are also used for energy storage, including wind and solar energy storage, peak shaving and valley filling of smart grid and frequency balance. Some researchers have introduced the DT framework into the online analysis of smart grid, and used DT to analyze the power flow in the grid [123]. The battery DT system can not only quickly screen and group decommissioned batteries that can be used for echelon utilization, but also combine with the smart grid to analyze real-time storage capacity and the surplus of the grid to achieve efficient use of batteries for energy storage.
DT technology can also be used for battery production and assembly except in the use phase. The virtual assembly of battery based on DT is similar to the aircraft assembly workshop. The data can be transmitted by various types of sensors installed in the equipment production line and workshop and the host computer. Through big data analysis, the data integration and analysis between equipment and equipment, equipment and system, system and system are completed, so that the digitization and visualization of the whole process of power battery assembly and manufacturing are realized.
In general, the battery DT incorporates new technologies in the future has the following functions and opportunities in the BMS: (1) The advanced diagnostic algorithms and powerful computing capabilities are used to continuously and accurately monitor the battery state, and realize the life cycle management of batteries; (2) Management strategies, including charging strategy, thermal management strategy and balanced strategy, are optimized in real time. And the simple and efficient dynamic control of the battery is realized to maximize battery life, performance and safety. At the same time, the visualization of safe heat and life is realized; (3) A comprehensive fault diagnosis system can be established with DT, and the thermal runaway prediction is realized by finding the thermal runaway boundary to improve the safety and reliability of the battery system; (4) The battery DT is integrated with the vehicle DT and the road DT to realize the coordinated development of vehicle-road-cloud.

Conclusions
This paper summarizes the development history, application fields and current research of DT. New technologies such as AI, cloud computing, IoT, and blockchain provide the technical foundation for DT, and promote the process of battery research. And summarizes the problems of battery modeling, RUL prediction, and thermal runaway in the research of power BMS and DT can provide ideas for solving these problems. The establishment process of the battery digital twin and the methods of charging strategy, thermal management strategy and balanced strategy based on DT are introduced. And it lays a foundation for the active management of the battery which realizes the battery safety, long cycle life and high efficiency charging/ discharging.
The developing trend of the battery management system is intelligent, networking, more integrated and universal. Relying on high-precision sensors, cloud computing, machine learning and software technology, it can realize the full life cycle management of batteries from manufacturing, loading applications, fault maintenance and recycling. This management level is very important for energy storage equipment as it can achieve fast charging, and adapt to a variety of complex working conditions and other functions. DT has been initially applied to SOC and SOH estimation in the battery field, and has achieved satisfying estimation accuracy. Although DT research is in its infancy, there are still many technical challenges that need to be resolved, such as battery aging mechanism, lithium plating, data management\sharing and privacy, deep integration of AI, big data and cloud computing, the transferability of the model, etc. However, it has great value in predicting and optimizing products, which can provide some solutions for the optimization of smart BMS functions.