Voltage and Overpotential Prediction of Vanadium Redox Flow Batteries with Artificial Neural Networks

: This article explores the novel application of a trained artificial neural network (ANN) in the prediction of vanadium redox flow battery behaviour and compares its performance with that of a two-dimensional numerical model. The aim is to evaluate the capability of two ANNs, one for predicting the cell potential and one for the overpotential under various operating conditions. The two-dimensional model, previously validated with experimental data, was used to generate data to train and test the ANNs. The results show that the first ANN precisely predicts the cell voltage under different states of charge and current density conditions in both the charge and discharge modes. The second ANN, which is responsible for the overpotential calculation, can accurately predict the overpotential across the cell domains, with the lowest confidence near high-gradient areas such as the electrode membrane and domain boundaries. Furthermore, the computational time is substantially reduced, making ANNs a suitable option for the fast understanding and optimisation of VRFBs.


Introduction
Deploying effective and scalable energy storage systems is becoming increasingly important as we move toward carbon-neutral emissions and a sustainable energy future [1,2].The integration of intermittent renewable energy sources into our energy infrastructure is imperative, considering the commitment to achieve carbon neutrality.The development of large-scale energy storage systems is vital for this integration and maximising the use of renewable resources while maintaining the stability of the electric grid.Redox flow batteries (RFBs) have become one of the front-runners among the several available choices [3][4][5][6].They are distinguished by the separation of the energy storage capacity from the power output, because RFBs store energy in chemical solutions contained in external tanks, allowing the capacity to be scaled independently of the power density [7,8].This decoupling of energy and power renders RFBs exceptionally flexible for a wide range of applications.
Arguably, vanadium-based redox flow batteries (VRFBs) are the most promising technology for commercial implementation [9,10].Invented by M. Skyllas-Kazacos et al. [11] in the 1980s, VRFBs employ only one single element, vanadium, in different oxidation states for both electrolytes, thus reducing the cross-contamination risk [12].Moreover, VRFB systems exhibit noteworthy characteristics in terms of cyclability, energy efficiency, response Batteries 2024, 10, 23 2 of 15 time, safe operation, remarkable energy storage capability, and incorporating readily recyclable components to minimize overall costs over the system lifetime [11,[13][14][15][16][17].This sets them apart from other RFB technologies, such as zinc-based chemistries, which present hydrogen evolution in charging, dendrite formation, and uneven metal deposition, which then lead to cell failure [3,18,19].Organic-based RFBs have gained attention for their use of abundant, non-expensive organic compounds, but they still face challenges arising from cycling stability and reactant decomposition [6,20,21].A more in-depth investigation is imperative to consolidate this technology for future scalability and commercial implementation.
Figure 1 depicts a visual representation of a single cell from a VRFB.The electrolytes are stored in two separate tanks.The positive electrolyte contains VO +  2 and VO 2+ ions, while the negative electrolyte has V 2+ and V 3+ ions.Both electrolytes are recirculated by pumps into the cell.The electrodes, inside the cell, provide an active area for the electrochemical redox reactions to occur.To prevent cross-contamination and allow for protons to pass and preserve the charge conservation, an ion-selective membrane is added between both electrodes [22].
Batteries 2024, 10, x FOR PEER REVIEW 2 of 15 states for both electrolytes, thus reducing the cross-contamination risk [12].Moreover, VRFB systems exhibit noteworthy characteristics in terms of cyclability, energy efficiency, response time, safe operation, remarkable energy storage capability, and incorporating readily recyclable components to minimize overall costs over the system lifetime [11,[13][14][15][16][17].This sets them apart from other RFB technologies, such as zinc-based chemistries, which present hydrogen evolution in charging, dendrite formation, and uneven metal deposition, which then lead to cell failure [3,18,19].Organic-based RFBs have gained attention for their use of abundant, non-expensive organic compounds, but they still face challenges arising from cycling stability and reactant decomposition [6,20,21].A more indepth investigation is imperative to consolidate this technology for future scalability and commercial implementation.Figure 1 depicts a visual representation of a single cell from a VRFB.The electrolytes are stored in two separate tanks.The positive electrolyte contains VO + 2 and VO 2+ ions, while the negative electrolyte has V 2+ and V 3+ ions.Both electrolytes are recirculated by pumps into the cell.The electrodes, inside the cell, provide an active area for the electrochemical redox reactions to occur.To prevent cross-contamination and allow for protons to pass and preserve the charge conservation, an ion-selective membrane is added between both electrodes [22].The chemical reactions occurring in the half-cells and the full cell are as follows: Full cell: The experimental evaluation of VRFB performance is the conventional approach to assess performance, but it has a considerable financial burden.As the use of VRFBs in The chemical reactions occurring in the half-cells and the full cell are as follows: Full cell: The experimental evaluation of VRFB performance is the conventional approach to assess performance, but it has a considerable financial burden.As the use of VRFBs in various applications has become increasingly popular, there is a growing need for cost-effective methods and strategies to understand and optimise their performance and system integration.Numerical models offer a rapid and iterative design approach, allowing researchers to easily modify system parameters, electrode geometries, and operating conditions.This approach enables the exploration of various design configurations and identification of optimal operating conditions more efficiently than traditional experimental methods.A wide range of numerical investigations of VRFBs is available in the public literature, ranging from basic zero-dimensional models [23][24][25] to the most complex three-dimensional models [26][27][28][29][30][31].The use of numerical models to simulate flow batteries involves a careful balance between computational cost and accuracy.Zero-and one-dimensional models are particularly helpful for preliminary evaluations, down-selection, and fast exploratory studies, but have the limitation of oversimplifying the complex behaviour of VRFBs, neglecting spatial variations and non-uniformities within the battery cell.The need for computational resources increases significantly as the accuracy of numerical simulations is improved to include aspects such as concentration profiles, potential, and current density distributions [28][29][30][31] or capture intricate time-dependent fluid-membrane interactions.However, recent advancements in Artificial Neural Networks (ANNs) have enabled the creation of accurate models trained on data obtained from Computational Fluid Dynamics (CFD) simulations.These surrogate models offer the flexibility and speed of low-fidelity models, while incorporating many aspects of advanced computational models.In the field of fluid mechanics, several studies have used ANNs to model different cases, such as active [32] and passive flow control devices [33], vehicle aerodynamics [34], thermal systems [35], and multiphase-state systems [36], to mention a few.
The primary objective of this study was to model a VRFB using Artificial Neural Networks (ANNs).To accomplish this, numerical simulations were performed to generate training and benchmark data.By altering the current densities and states of charge in these simulations, a comprehensive dataset was created.Specifically, two distinct ANNs were designed and trained: one for predicting the voltage and the other for predicting the overpotential.

Governing Equations
The model presented in this work consists of three domains: positive electrode, ion exchange membrane, and negative electrode.The current work utilizes a Nafion type cation exchange membrane.This choice aligns with the conventional approach in the literature and is consistent with the experimental validation.However, newly developed anion exchange membranes show promising results in terms of lower vanadium crossover and cost and enhanced H + permeability [37].The following assumptions were made in the numerical model:

•
Stationary conditions; • Incompressible electrolytes; • The fluids were assumed to be completely diluted; • Side reactions were neglected; • Both electrodes and the membrane were considered isothermal; • The properties of the electrodes, electrolyte, and membrane were isotropic; • Changes in the z-direction of the cell were ignored (depth in Figure 1).
The model was based on works published by Shah et al. [38] and Knehr et al. [39].The conservation of mass of the charged species can be expressed by Equation (4).
Variable ε refers to the electrode porosity, c i is the concentration of species i, and S i is the source term of the species (listed in Table 1).

Source Term
Positive Electrode Negative Electrode

S II (V(II) mass conservation equation) -
is the charged species flux described by the Nernst-Planck equation, as shown in Equation (5).
The first term accounts for diffusion, where D e f f i is effective diffusivity.In the second term (migration term), z i represents the charge of species i, u i is the ionic mobility, F is the Faraday constant, and φ l is the liquid potential.In the third term (convection), → u represents electrolyte velocity.
The effective diffusivity, D e f f i , was obtained from the Bruggemann correlation as shown in Equation (6).
The ionic mobility u i was calculated using the Nernst-Einstein equation, as shown in Equation ( 7), where R is the universal gas constant and T is the temperature.
The electrolyte velocity, represented by → u in Equation ( 5) in the convection term, is calculated by means of Darcy's Law, as shown in Equation (8), where p is the pressure and µ is the dynamic viscosity of the electrolyte, as indicated in Table 2, among the other electrolyte properties.

Term Symbol Value
K represents the porous electrode permeability calculated using the Kozeny-Carman equation, as shown in Equation (9), where d f is the fibre diameter and k ck is the Kozeny-Carman constant.
To fulfil the condition of electroneutrality, Equation (10) was solved for all charged species, except for SO 4 2− : To integrate the species balance with electrochemical reactions and the current flow within the electrode during the charge/discharge processes, the charge conservation equation was solved, as shown in Equation (11).
Equation (11) indicates that the electrochemical reaction rate (i R ) directly corresponds to the charges leaving the electrolyte → ı l , which in turn equate to the charges entering the electrode → ı s .Both the liquid and solid current densities are expressed by Equations ( 12) and (13).
The term σ e f f s , which corresponds to the effective conductivity of the porous electrode, was calculated using Equation ( 14), where σ s is the electrode bulk conductivity, listed in Table 3, with other parameters related to the electrodes.An integration with the Butler-Volmer law, which characterizes the electrochemical reactions occurring at the surface of the porous carbon electrode, is utilised to converge the conservation equations.Following this, the electrochemical reaction rate (i R ) was calculated for both electrodes, positive ("+") and negative ("−"), as shown in Equation (15) and Equation ( 16), respectively.
The specific surface area of the electrode was represented by a, α is the charge transfer coefficient, and η denotes the overpotential.i 0,+ and i 0,− , the exchange current densities, are expressed as shown in Equations ( 17) and (18), where k + and k − are the reaction rate constants for the positive and negative side, respectively.
Table 4 lists the kinetic parameters used in Equations ( 17) and (18).The overpotential was determined for the positive and negative reactions using Equations ( 19) and (20).
The standard equilibrium potentials E + and E − were obtained using the Nernst equation, as shown in Equations ( 21) and ( 22).
The effective conductivity of the membrane σ e f f m can be modelled as shown in Equation (23), where D e f f H + denotes the proton effective diffusion coefficient.

Boundary Conditions
Figure 1 x and y coordinates were taken as references for the boundary condition description.At x = x 0 , the anode external boundary is set as an electrical ground, that is, the solid potential is equal to zero: The species fluxes at the top and bottom of the membrane and the external boundaries of the electrodes are zero, aside from the inlets and outlets: At y = 0, a boundary was set for the flux entering the cell through the electrodes.
where Q is the volumetric flow rate, w cell is the cell width, and L e is the electrode thickness.
Analogously, the electrodes have a pressure outlet at y = h cell , and the flux of the species caused by diffusion is neglected.
A constant current density was applied to the external boundary of the cathode using Equation (28).
where i avg denotes the user-defined current applied to the boundary.The sign of this parameter determines whether the cell is in charge or discharge.This leads to the application of an electrical insulation to the upper and lower boundaries of the membranes and electrodes.
The geometrical dimensions and operating conditions of the cell are listed in Table 5.

Numerical Model
The cell was modelled using the commercial software COMSOL Multiphysics 5.5 with its incorporated physics packages, including Darcy's law and tertiary current distribution.By employing the finite element method, the model featured a structured mesh made of 4616 quadratic elements.The computational approach adhered to a relative error set at 1.0 × 10 −6 .

Neural Network
In the present study, a multilayer perceptron with backpropagation (MLP-BP) is used, which is a multilayer model with hidden layers.In this model, the output y is estimated using Equation (30).The output of each hidden neuron is calculated with the sigmoid function defined in Equation (31), which receives as input the postsynaptical h i of each i neuron from the previous layer, calculated with the linear combination defined in Equation (32), where x represents the inputs to the layers, ω the weights of the layers, and θ the biases.
The commercial software MATLAB 2022a [45], commercial code with its Deep Learning toolbox [46], was used to design and train the ANN.
The number of hidden layers and neurones in each network depended on the complexity of the magnitude considered.Hence, two different networks were trained for the two targeted ANN models: one for voltage prediction, as shown in Figure 2, and the other for overpotential prediction, as shown in Figure 3.The training data were split into 70% training, 20% validation, and 10% testing for both networks.
The first network (ANN1) predicts the voltage of the cell under charge and discharge regimes for different charge and current densities.ANN1 is a relatively simple ANN with a single input layer comprising three parameters: SoC, Current density, Charging or Discharging, a single hidden layer with eight nodes, and an output layer with a single node.Figure 2 shows the architecture of ANN1.The second network (ANN2) aims to predict the spatial overpotential of the cell for a constant State of Charge of 50% which is expected to be substantially less continuous compared to ANN1.Hence, added complexity is required in ANN2 which contains three hidden layers (with 8, 16, and 8 nodes) and an output layer with a single node for the overpotential.Figure 3 shows the architecture of the ANN2.The second network (ANN2) aims to predict the spatial overpotential of the cell for a constant State of Charge of 50% which is expected to be substantially less continuous compared to ANN1.Hence, added complexity is required in ANN2 which contains three hidden layers (with 8, 16, and 8 nodes) and an output layer with a single node for the overpotential.Figure 3 shows the architecture of the ANN2.The first network (ANN1) predicts the voltage of the cell under charge and discharge regimes for different charge and current densities.ANN1 is a relatively simple ANN with a single input layer comprising three parameters: SoC, Current density, Charging or Discharging, a single hidden layer with eight nodes, and an output layer with a single node.Figure 2 shows the architecture of ANN1.
The second network (ANN2) aims to predict the spatial overpotential of the cell for a constant State of Charge of 50% which is expected to be substantially less continuous compared to ANN1.Hence, added complexity is required in ANN2 which contains three hidden layers (with 8, 16, and 8 nodes) and an output layer with a single node for the overpotential.Figure 3 shows the architecture of the ANN2.
The ANNs are benchmarked using the standard Pearson product-moment correlation coefficient R.

Model Validation
The numerical model was validated using experimental data from You et al. [28], which involved placing a 5 cm 2 cell in a static solution and measuring the charge-discharge curves at two different current densities: 40 mA cm −2 and 80 mA cm −2 .Figure 4 illustrates the excellent agreement between the numerical results of the in-house simulation and experimental data from You et al. [28].The model demonstrated an average relative error of 1.6% when calculating the voltage, which is comparable to the level of agreement between the numerical simulations and experiments described in You et al. [28].The relative error has been calculated by means of the following expression: Relative error (%) = The ANNs are benchmarked using the standard Pearson product-moment correlation coefficient R.

Model Validation
The numerical model was validated using experimental data from You et al. [28], which involved placing a 5 cm 2 cell in a static solution and measuring the charge-discharge curves at two different current densities: 40 mA cm −2 and 80 mA cm −2 .Figure 4 illustrates the excellent agreement between the numerical results of the in-house simulation and experimental data from You et al. [28].The model demonstrated an average relative error of 1.6% when calculating the voltage, which is comparable to the level of agreement between the numerical simulations and experiments described in You et al. [28].The relative error has been calculated by means of the following expression:

Artificial Neural Network Validation
To evaluate the accuracy of the ANN predictions, the correlation coefficient (R-value) of the test set is considered, since these cases are unknown for the network, and therefore determine the generalisability of the proposed networks.The R-values after training ANN1 and ANN2 are shown in Figure 5.
The R-values for ANN1 and ANN2 were 0.99927 and 0.99516.Both models provide relatively high correlation coefficients, indicating a high level of confidence in ANN prediction.It should be noted that the two graphs do not have the same vertical scale and that ANN1 has no outliers, whereas the more complex ANN2 has a substantial set of outliers at the extremes.
To further analyse the performance of the two neural networks, Figure 6 shows a comparison between the predictions of ANN1 for both charging and discharging, together with the CFD results for the considered cases.The ANN1 prediction is illustrated as a surface, and the CFD results are illustrated using black markers.The possibility of spanning a continuous and smooth surface between CFD cases enables the prediction of a wellformulated ANN to have few outliers, which is the case for the ANN1 model.

Artificial Neural Network Validation
To evaluate the accuracy of the ANN predictions, the correlation coefficient (R-value) of the test set is considered, since these cases are unknown for the network, and therefore determine the generalisability of the proposed networks.The R-values after training ANN1 and ANN2 are shown in Figure 5.
The R-values for ANN1 and ANN2 were 0.99927 and 0.99516.Both models provide relatively high correlation coefficients, indicating a high level of confidence in ANN prediction.It should be noted that the two graphs do not have the same vertical scale and that ANN1 has no outliers, whereas the more complex ANN2 has a substantial set of outliers at the extremes.
To further analyse the performance of the two neural networks, Figure 6 shows a comparison between the predictions of ANN1 for both charging and discharging, together with the CFD results for the considered cases.The ANN1 prediction is illustrated as a surface, and the CFD results are illustrated using black markers.The possibility of spanning a continuous and smooth surface between CFD cases enables the prediction of a well-formulated ANN to have few outliers, which is the case for the ANN1 model.As previously mentioned, ANN2, compared to ANN1, is modelling a more complex phenomenon and has a non-negligible set of outliers of correlation coefficients.The intricate modelling is illustrated by detailed studies of the overpotential for a current density of 60 mA/cm 2 in the discharge mode for an SoC of 50%. Figure 7 shows a section view across the membrane (the xy plane in Figure 1), where the positive and negative electrode voltages across the membrane and neighbouring fluid are shown for the numerical simulations to the left and ANN2 to the centre.Observing the numerical results, one may note a near-discrete step in the electrode voltage over the membrane and a non-uniform distribution, particularly near the lower boundary.ANN2 captured a substantial fraction of the electrode voltage distribution of the section cut, as can be observed by comparing the results with the CFD results.However, there were clear discrepancies near the membrane and the lower boundary.These discrepancies are emphasised by the subtraction of the numerical results and ANN2, as illustrated on the rightmost surface in Figure 7.As previously mentioned, ANN2, compared to ANN1, is modelling a more complex phenomenon and has a non-negligible set of outliers of correlation coefficients.The intri cate modelling is illustrated by detailed studies of the overpotential for a current density of 60 mA/cm 2 in the discharge mode for an SoC of 50%. Figure 7 shows a section view across the membrane (the xy plane in Figure 1), where the positive and negative electrode voltages across the membrane and neighbouring fluid are shown for the numerical simu lations to the left and ANN2 to the centre.Observing the numerical results, one may note a near-discrete step in the electrode voltage over the membrane and a non-uniform distri bution, particularly near the lower boundary.ANN2 captured a substantial fraction of the electrode voltage distribution of the section cut, as can be observed by comparing the re sults with the CFD results.However, there were clear discrepancies near the membrane and the lower boundary.These discrepancies are emphasised by the subtraction of the numerical results and ANN2, as illustrated on the rightmost surface in Figure 7.As previously mentioned, ANN2, compared to ANN1, is modelling a more complex phenomenon and has a non-negligible set of outliers of correlation coefficients.The intricate modelling is illustrated by detailed studies of the overpotential for a current density of 60 mA/cm 2 in the discharge mode for an SoC of 50%. Figure 7 shows a section view across the membrane (the xy plane in Figure 1), where the positive and negative electrode voltages across the membrane and neighbouring fluid are shown for the numerical simulations to the left and ANN2 to the centre.Observing the numerical results, one may note a neardiscrete step in the electrode voltage over the membrane and a non-uniform distribution, particularly near the lower boundary.ANN2 captured a substantial fraction of the electrode voltage distribution of the section cut, as can be observed by comparing the results with the CFD results.However, there were clear discrepancies near the membrane and the lower boundary.These discrepancies are emphasised by the subtraction of the numerical results and ANN2, as illustrated on the rightmost surface in Figure 7.

ANN Effiency Benchmark
Table 6 summarises the computational times required for the CFD calculation, ANN1, and ANN2 for a workstation with a single Intel Xeon Gold 5120 CPU.The effectiveness of the ANN was benchmarked based on the time required to conduct a single CFD simulation.The results demonstrate that ANNs can significantly reduce the computational time required to obtain the results.ANN1 achieved a speed-up of 15,625 times the CFD, whereas with ANN2 for overpotential prediction, a speed-up of 266.7 was obtained.

Conclusions
This study investigated the predictive capabilities of Artificial Neural Networks (ANNs) for cell voltage and overpotential in Vanadium Redox Flow (VRF) cells.Two ANN models were developed, one for cell voltage and another for overpotential, and trained on a dataset generated by a two-dimensional numerical CFD model based on previous research by Shah et al. [30] and Knehr et al. [31].The accuracy of the CFD models was verified with experimental results from You et al. [28], with an average discrepancy of 1.6% for the charge and discharge curves at two different current densities (40 and 80 mA cm −2 ).
The results demonstrate that the ANN models are capable of accurately predicting a wide range of State of Charge and current density conditions with high precision during both charge and discharge.Additionally, the ANN model showed high confidence in overpotential predictions for most of the domains, with only minor performance deterioration in the high-gradient region over the membrane and selected boundaries of the simulated domain.
The computational power required for the ANN models was significantly less than that required for the CFD simulations, reducing the required computational power by up to four orders of magnitude.This reduction in power, combined with high confidence in

ANN Effiency Benchmark
Table 6 summarises the computational times required for the CFD calculation, ANN1, and ANN2 for a workstation with a single Intel Xeon Gold 5120 CPU.The effectiveness of the ANN was benchmarked based on the time required to conduct a single CFD simulation.The results demonstrate that ANNs can significantly reduce the computational time required to obtain the results.ANN1 achieved a speed-up of 15,625 times the CFD, whereas with ANN2 for overpotential prediction, a speed-up of 266.7 was obtained.

Conclusions
This study investigated the predictive capabilities of Artificial Neural Networks (ANNs) for cell voltage and overpotential in Vanadium Redox Flow (VRF) cells.Two ANN models were developed, one for cell voltage and another for overpotential, and trained on a dataset generated by a two-dimensional numerical CFD model based on previous research by Shah et al. [30] and Knehr et al. [31].The accuracy of the CFD models was verified with experimental results from You et al. [28], with an average discrepancy of 1.6% for the charge and discharge curves at two different current densities (40 and 80 mA cm −2 ).
The results demonstrate that the ANN models are capable of accurately predicting a wide range of State of Charge and current density conditions with high precision during both charge and discharge.Additionally, the ANN model showed high confidence in overpotential predictions for most of the domains, with only minor performance deterioration in the high-gradient region over the membrane and selected boundaries of the simulated domain.
The computational power required for the ANN models was significantly less than that required for the CFD simulations, reducing the required computational power by up to four orders of magnitude.This reduction in power, combined with high confidence in the predictions, provides a promising option for rapid evaluation and system integration

Figure 1 .
Figure 1.Schematic of the VRFB cell employed, with the negatively charged fluid symbolised in red and the positively charged fluid denoted in green.Additional details can be found in the text.

Figure 1 .
Figure 1.Schematic of the VRFB cell employed, with the negatively charged fluid symbolised in red and the positively charged fluid denoted in green.Additional details can be found in the text.

Figure 2 .
Figure 2. Architecture of the ANN for voltage prediction.

Figure 3 .
Figure 3. Architecture of the ANN for overpotential prediction.

Figure 2 .
Figure 2. Architecture of the ANN for voltage prediction.

Figure 2 .
Figure 2. Architecture of the ANN for voltage prediction.

Figure 3 .
Figure 3. Architecture of the ANN for overpotential prediction.

Figure 3 .
Figure 3. Architecture of the ANN for overpotential prediction.

Figure 4 .
Figure 4. Comparison of experimentally obtained charge-discharge curves from [42] and simulated curves in a 5 cm 2 cell for: (a) a current density of 40 mA cm −2 ; (b) a current density of 80 mA cm −2 .

Figure 4 .
Figure 4. Comparison of experimentally obtained charge-discharge curves from [42] and simulated curves in a 5 cm 2 cell for: (a) a current density of 40 mA cm −2 ; (b) a current density of 80 mA cm −2 .

Figure 7 .
Figure 7.Comparison between the CFD data and ANN predictions of the overpotential for a current density of 60 mA/m 2 in discharge mode for a State of Charge of 50%.

Figure 7 .
Figure 7.Comparison between the CFD data and ANN predictions of the overpotential for a current density of 60 mA/m 2 in discharge mode for a State of Charge of 50%.

Table 1 .
Source terms for species in the positive and negative electrodes.

Table 5 .
Operating conditions and cell geometrical parameters.

Table 6 .
Computational time required for each method.

Table 6 .
Computational time required for each method.