**1. Introduction**

Lithium-ion batteries are a key technology for electric vehicles, portable devices and stationary applications such as home-storage systems. With the increasing usage of lithiumion batteries in complex fields of application, the demand for battery models is growing as well. Battery models are necessary to predict the dynamic voltage and current behaviour and to monitor internal states, particularly the state of charge (SOC) and the state of health (SOH). There are many different types of battery models [1,2]. Depending on the required purpose, they can be selected as a compromise between accuracy and simplicity. We introduce here a grey-box (GB) modelling approach that uses a simple equivalent circuit model (ECM) as a basis.

Digitisation has been progressing rapidly in the past decades, and with it the amount of available data increases. This has boosted the development of artificial intelligence and especially neural networks. Neural networks are an important representative of blackbox (BB) models. They learn relations between inputs and outputs of systems based on data [3–6]. However, BB models require a huge amount of training data. Therefore, it is reasonable to consider other modelling techniques. White-box (WB) modelling uses prior physical, chemical or engineering knowledge in the form of mathematical equations to describe the behaviour of the corresponding system. WB models are therefore limited to the understanding of the underlying processes. GB models combine WB and BB modelling techniques to benefit from their respective advantages [3–6].

**Citation:** Brucker, J.; Behmann, R.; Bessler, W.G.; Gasper R. Neural Ordinary Differential Equations for Grey-Box Modelling of Lithium-Ion Batteries on the Basis of an Equivalent Circuit Model. *Energies* **2022**, *15*, 2661. https://doi.org/ 10.3390/en15072661

Academic Editors: Luis Hernández-Callejo, Sergio Nesmachnow and Sara Gallardo Saavedra

Received: 24 February 2022 Accepted: 25 March 2022 Published: 5 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

There are many examples in current research where neural networks are used to model lithium-ion batteries. In Ref. [7] a feedforward network with two hidden layers approximates the SOC of a battery based on the actual voltage, current and time. The authors of Ref. [8] predict the SOC of a battery with a recurrent neural network (RNN). The last three values of SOC, battery current, battery voltage and the values of four temperature sensors are taken into account. RNNs enable time series prediction. The authors of Ref. [9] perform online predictions of the remaining capacity of a lithium-ion battery with a long short-term memory network, a special form of RNN. The measured voltages during constant current (CC) charging above a certain battery voltage and the charge throughput till reaching the charge cut-off voltage serve as inputs. The authors of Ref. [10] use neural networks for battery design. They generate their training data with a pseudotwo-dimensional model of a lithium-ion battery by varying different design parameters. The first neural network classifies whether the given parameter combination leads to a possible battery configuration or not. A second neural network estimates the specific energy and the specific power of the battery with the chosen parameters. In Ref. [11] a feedforward network is used for end-of-line prediction. The unmeasured physical battery parameters are estimated by a neural network. The aforementioned approaches represent BB models. The following articles focus on GB modelling of lithium-ion batteries. The authors of Ref. [12] estimate the SOH of a battery with a neural network that takes the fitted parameters of an ECM as input. In Ref. [13] a reduced-order physics-based model is supplemented with two neural networks to predict what the authors call "nonideal voltages" of the positive and negative electrode. An additional Bayesian network approximates the influence of ageing on the battery resistance and the amount of cyclable lithium. The authors of Ref. [14] build GB models of dynamic systems including external variables with neural ordinary differential equations (NODEs). In contrast to the original contribution [15], they call the combination of NODEs and differential equations "universal differential equations". In Refs. [16,17] NODEs are used for GB modelling of lithium-ion batteries. The authors of Ref. [16] focus on physical battery modelling in combination with NODEs. They consider ageing effects such as solid electrolyte interface formation, lithium plating and active material isolation as well as the increase in the internal resistance. NODEs approximate the remaining deviation between the physical model and the experiment. In our previous work [17] an ECM serves as a basis for a GB model of a lithium-ion battery. NODEs model the voltage drop across the included resistor–capacitor (RC) circuit.

In the present contribution, we continue our previous work [17] by further improving the GB model. For this purpose, we increased the amount of physical knowledge in the model. In contrast to the former contribution, the focus of the current study is on modelling the dynamic properties of the battery. We used additional training data from charging and discharging with pulsed currents to train the time constant of battery dynamics. Furthermore, we tested the trained GB model against two test profiles covering more realistic battery operation. So far we have neither considered temperature dependencies nor ageing effects.

The target battery studied here is a large-format 180 Ah prismatic commercial lithiumion cell with lithium iron phosphate (LFP)/graphite chemistry. This type of cell is used in stationary storage systems. We have previously investigated the experimental properties of this cell in great detail [18]. LFP cells are attractive for stationary storage applications because they have shown a high cyclic and calendaric lifetime [19,20]. However, their state diagnosis is challenging due to a flat, plateau-like discharge voltage curve and charge– discharge voltage hysteresis [21]. One of the goals of the present study is therefore to investigate the applicability of GB models to this type of cell.

The paper is organised as follows. In Section 2, we describe the fundamentals of the ECM, the NODEs and the combination of both for GB modelling of lithium-ion batteries. In Section 3, we show and discuss the application of the proposed GB model to the simulation of lithium-ion batteries. The training and test results are given as well as their dependencies on hyperparameters, the user-defined parameters of a neural network. Hyperparameters such as the learning rate or the number of hidden layers of a neural network control the learning process. At the end of the paper, we summarise the results and give an outlook.

The measurement data and the code are available in Zenodo. See 'Data Availability Statement' for further information.
