*3.4. Step 4: Adaptive Model Update*

Step 4 of the approach addresses the execution efforts applied on the software segment for implementing a battery DT. The commonly used software and programming languages of battery modeling are MATLAB, COMSOL or Python. Irrespective of the chosen platform, the flowchart of the implementation steps is shown in Figure 3. The green arrows denote the workflow of battery DT while the blue arrows denote that of a battery mode.

**Figure 3.** Software segment for implementation steps.

The conventional steps of building a battery model using experimental inputs for its parameter identification followed by the state estimation is the preliminary implementation step for battery DT. Real-world battery data (i.e., terminal voltage, load current and temperature) is then integrated with the model, which means they are added as time series input by importing the battery data (in .csv or other compatible formats). The parameter-update estimation step can be computationally handled in a dedicated code or in the differential

solver tools in MATLAB or Python. A standard method in MATLAB for accessing the parameters is through lookup tables (LUT). For model parameter-update in MATLAB, the parameter (in the required format) is uploaded to the workspace and directly imported to the LUT. Alternatively, in Python, re-assigning or updating an input parameter is relatively easy by direct access and assignment of the parameter in its respective object. Finally, the battery DT is subjected to the state estimation algorithm.
