Physics Informed Learning with Quantum Circuits for Battery Models

This abstract has open access
Problem description and relevance

Electrochemical energy storage systems are a cornerstone of the global transition towards renewable energies. Lithium-ion batteries are used in portable electronical devices, electric vehicles and grid-scale renewable energy systems. Their internal dynamics are described by complex physical processes which pose in general a multiscale problem. Classical numerical methods operate on the limits of existing hardware as the demand for finer resolution and higher complexity of computational results increases, especially in three-dimensional models. Quantum methods with their inherently exponential latent space emerges as a promising candidate to capture high-resolution descriptions of multi-scale effects [1].

In our work we focus on the continuum model for the transport in an electrochemical cell and its transport dynamics. These processes are described by a system of coupled, nonlinear partial differential equations (PDEs), including the Nernst-Planck equation for ion diffusion, Poisson's equation for electrostatic potential, and non-linear reaction kinetics models for the electrochemical reactions at the electrode-electrolyte interface. Classical numerical methods, such as finite element or finite differences schemes struggle with these problems, especially when applied to 3d microstructures or multiscale effects in the electrodes.

Concurrent to numerical methods, Physics Informed Neural Networks (PINN) [2] provide a new approach to this kind of problem as they avoid discretization on a grid and have gathered the interest of the research community in recent years [3]. Transferring the idea of physics informed learning to quantum computing offers the potential to harness the exponential Hilbert-space for function descriptions together with additional advantages in terms of trainability, the required number of parameters in such a model.

The possible real-world impact is of high significance. Accelerated and more accurate battery simulation can improve the performance and longevity of lithium-ion batteries if used for battery management systems. Simulations on a larger scale and with more dimensions than currently possible would enable us to gain a better understanding and develop better batteries. The described method can be easily extended to new generations of batteries with alternative chemistries such as lithium-sulfur batteries which are a promising technology for the electrification of aviation. The battery simulation and modelling software market is projected to grow to 4 billion USD by 2030 [4], and sits upstream of a multi billion USD market [5].

Submission ID :
17
Methodology :

We use Differentiable Quantum Circuits [6] to solve the PDE system describing the battery. This is a variational algorithm combining physics informed learning with spectral numerical methods. The quantum circuit consists of a feature map encoding, which transforms the input variable, in our case time and space into a spectral basis. The features are recombined with a variational ansatz with trainable parameters. From the measurements we can calculate an expectation value of an observable, which represents the value of the encoded function. Two advantages of DQCs are, first, that the feature maps are differentiable by using the parameter shift rule and thus allowing us to get exact analytical derivatives of the encoded functions at the evaluated points. And second, as the feature maps are continuous, there is no need for discretization in either the space or time domain.

In our work we investigate the applicability of this method to solve realistic problems, on the example of a set of coupled non-linear PDEs describing the transport in an electrochemical cell. The modelled quantities are the concentration profile of Lithium ions in the electrolyte, the concentration in the electrodes, as well as the potentials of the electrodes and the electrolyte [7]. Most of these variables are time and space dependent and are coupled through a non-linear Butler-Volmer reaction rate with exponential behaviour [8].

In our approach each variable is encoded in its own quantum circuit. We compared different feature maps, based on Chebyshev and Fourier encodings. Additionally, we investigated making the frequencies in the feature maps trainable by adding additional parameters to the feature map encoding [9], which leads to a higher expressivity of the quantum circuit. The variational circuit consists of a hardware efficient ansatz which is measured using an Ising type Hamiltonian.

The optimization of the variational circuits is based on a loss function that is constructed analogous to classical PINNs. We collect all the outputs and derivatives with respect to a random set of evaluation points and calculate the partial differential equations. The same is done for the initial and boundary conditions and any other constraints. The sum of this different contributions forms the full loss function.

We derived several adaptions of the optimization strategy to improve trainability in a real-world application of electrochemical models. A pretraining on initial conditions emerged as essential, as the equations for reaction kinetics are highly sensitive on the overpotential. This ensures physical consistent conditions once the reaction parts are included in the loss function. A stepwise increase of the external current, driving the reactions,  helps to further avoid large gradients.

Additionally, a more complex model, adding different domains of the anode, separator and cathode as well as additional equations describing the storage of Lithium in the electrodes was tested. This consists of 5 variables and about 30 different terms in the loss function. A full solution of a DQC was not possible with the current simulator, but we show the representation of the results within a quantum circuit to estimate the representability.

Practical demonstration :

Our work incorporates a full implementation of the described variational hybrid quantum-classical algorithm for solving the system of coupled PDEs representing a simplified battery cell. We showcase results achieved on a quantum simulator and provide insights on the influence of different algorithmic parameters. Our implementation is based on Pytorch to implement the loss function and training routines and is combined with the python package Qadence [10] for the implementation of the quantum circuit and the error free quantum simulator. The implementation allowed us to investigate several properties of the described method, make out challenges when solving realistic problems and devise and test algorithmic solutions to overcome these.

Application potential :

Our work is a proof-of-concept, demonstrating that electrochemical models can be solved with DQCs. As such, we have solved simplified models, which classical solvers can solve in minutes, nevertheless our work encompasses the simulation of a full battery cell, incorporating all relevant building blocks, all types of equations, that are also necessary for more complex models as the Doyle-Fuller-Newman model.

The results of the simple model show, that with 8 qubits, 4 for each variable and a shallow circuit with just 8 layers of variational ansatz, a very good accuracy can be reached. As such only a comparably small number of variational parameters needs to be optimized classically. Recent work indicates that, in comparison to classical PINNS, quantum PINNs might offer an advantage in trainability [11]. Nevertheless, the number of circuit evaluations needed for the optimization is large and the influence of noise in currently available machines needs further investigations.

While the scaling of the computational cost of the optimization remains unclear, as with most physics informed methods, the exponential scaling of the feature map basis offers the potential to incorporate macro and micro-scale effects in a single model. This capability is essential for high-quality simulations of electrochemical systems. 

In this light, given the computational resources, the DQC algorithm can readily be extended to a 3d model, including more dimensions in the feature map, or with additional training data used to estimate parameters and other ideas to integrate a battery model with physics informed learning approaches. The flexible nature of the loss functions allows to integrate results from other scales, algorithms or even experimental data.

PhD student
,
Deutsches Zentrum für Luft- und Raumfahrt e. V.
Deutsches Zentrum für Luft- und Raumfahrt e. V.
Deutsches Zentrum für Luft- und Raumfahrt e. V.
10 visits