## Abstract

Organic redox-active molecules are attractive as redox-flow battery (RFB) reactants because of their low anticipated costs and widely tunable properties. Unfortunately, many lab-scale flow cells experience rapid material degradation (from chemical and electrochemical decay mechanisms) and capacity fade during cycling (>0.1%/day) hindering their commercial deployment. In this work, we combine ultraviolet-visible spectrophotometry and statistical inference techniques to elucidate the Michael attack decay mechanism for 4,5-dihydroxy-1,3-benzenedisulfonic acid (BQDS), a once-promising positive electrolyte reactant for aqueous organic redox-flow batteries. We use Bayesian inference and multivariate curve resolution on the spectroscopic data to derive uncertainty-quantified reaction orders and rates for Michael attack, estimate the spectra of intermediate species and establish a quantitative connection between molecular decay and capacity fade. Our work illustrates the promise of using statistical inference to elucidate chemical and electrochemical mechanisms of capacity fade in organic redox-flow battery together with uncertainty quantification, in flow cell-based electrochemical systems.

## Introduction

The development of low-cost grid-scale energy storage is necessary for widespread adoption of many renewable energy sources, given their intermittent nature. In this regard, redox-flow batteries (RFBs) are seen as a promising technology. An RFB comprises a pair of electrolyte reservoirs containing charge-storing redox-active materials which are separated by an ion-permeable membrane or separator. The electrolytes are pumped through a reactor cell, where they are oxidized and reduced cyclically as the RFB is charged and discharged^{1}. This architecture imparts RFBs with the unique capability of independently scaling the energy storage capacity (which scales with the volume of electrolyte reservoirs and concentrations of charge-storing species) and power (which scales with the size of the reactor cell stack). As the energy-to-power ratio (or rated duration of discharge) increases, the levelized cost of stored energy asymptotes to the cost of the electrolytes^{2,3}. For very cheap electrolytes, this cost may drop below that of standard enclosed (Li-ion) batteries^{4,5}.

Aqueous-soluble organic and organometallic redox-active molecules have received considerable research attention as potential charge carriers in RFBs because their costs at scale are projected to be low^{3,6}. Organic RFBs may thus store energy at lower levelized costs than state-of-the-art Li-ion systems if, in addition to low chemical cost, they also possess the right combination of solubility, chemical stability, and other electrochemical properties (e.g., redox potentials leading to high cell voltage and fast redox kinetics)^{7}. Unfortunately, most aqueous organic flow cells experience temporal rates of capacity fade higher than 0.1%/day^{8}, owing in large part to rapid chemical decomposition of their organic active materials. Such high fade rates render the vast majority of organic RFB chemistries unsuitable for practical deployment in RFB installations that are expected to last for decades.

Because redox-active organic molecules encompass a wide range of classes and are susceptible to a variety of decomposition mechanisms (e.g., nucleophilic attack, tautomerization, and hydrolysis)^{8}, understanding how reactant conversion or decay leads to capacity fade is a critical but often difficult task. Such understanding often requires the deployment of new *operando* measurement tools^{9,10,11} and cycling protocols that allow the deconvolution of reactant decomposition from other sources of capacity fade^{12,13,14}. For several candidate RFB charge carriers such as quinones^{9,10,15}, iron-based organometallic complexes^{16,17,18} and nitrogen-containing aromatic molecules^{19,20,21}, multiple hypotheses about the relationship between molecular decay and capacity fade have been advanced, some of which are mutually incompatible^{8}. In other chemistries, such as one recently developed based on fluorenone^{22}, there are complex equilibria among species in different redox and protonation states whose effect on capacity retention is not yet fully understood^{23}. These challenges call for new techniques to discern the probabilities or relative contributions of various hypothesized mechanisms to capacity fade observed in flow cells. In particular, understanding and rigorously quantifying the degree to which data gathered from experiments confirm or challenge particular hypotheses about chemical versus electrochemical sources of capacity fade is critical for developing organic RFB chemistries.

Statistical learning of physical models and their parameters from experimental observations, broadly approached as an estimation or inference task, can be brought to bear on this issue. Estimation centers around the ideas of regression where the goal is to find the optimal value of parameters so that the model prediction best fits (explains) the observations (e.g., see ref. ^{24}). However, these best fits are usually single-valued and do not quantify the uncertainty that is affected by, for example, the quantity and quality of observations. In contrast, inference seeks probabilistic solutions to convey the degree of uncertainty about different possible explanations that could have induced the observed data. Inference is typically carried out following the axioms of probability and Bayes’ theorem^{25,26,27}, where an initial prior uncertainty distribution is appropriately updated to a posterior uncertainty distribution given the newly acquired observations. The Bayesian update rule naturally incorporates new data that may materialize sequentially over time and offers a coherent representation of evidence aggregation. Bayesian inference is also advantageous for accommodating sparse, noisy, and indirect measurements, consolidating data sets from different sources and of varying quality, and permitting the injection of domain knowledge and expert opinion to the learning process^{28}. Beyond parameter inference, the Bayesian framework also extends to model selection^{29,30}, allowing one to compare various “packages” of hypotheses and assumptions manifesting as different model structures and parameterizations (e.g., different reaction mechanisms).

Bayesian inference and related probabilistic techniques have been applied to several problems in electrocatalysis and battery science, including failure prediction^{31} and the development of lifetime-extending charging protocols in Li-ion batteries^{32}, analyte labeling^{33}, model/variable selection and parameter estimation for Li-ion battery electrodes^{34}, electrochemical cell design^{35,36}, Tafel slope interpretation,^{37}, and materials discovery^{38,39}. However, no studies of which we are aware have applied these techniques to understand capacity fade or reactant decay in organic RFBs, nor has Bayesian model selection been deployed in these contexts.

In this work, we apply Bayesian inference and multivariate curve resolution-alternating least squares (MCR-ALS) methods to spectroscopic analysis of the decomposition of oxidized 4,5-dihydroxy-1,3-benzenedisulfonic acid (BQDS) or Tiron, an ortho-hydroquinone derivative previously investigated as a positive electrolyte material in aqueous RFBs^{40,41,42}. Whereas Bayesian inference applies broadly, MCR-ALS is specifically suited to spectrophotometry, as it uses iterative optimization under well-defined physical constraints for resolving mixed signals in a multi-component system into its pure components^{43}. MCR-ALS is applicable to understanding speciation in multi-component chemical systems via optical absorbance, where absorbance at a given wavelength might be linearly proportional to the concentrations of each component. Previous work has shown that oxidized BQDS is susceptible to a self-discharge reaction with water known as Michael addition/attack^{40,41,42,44}, which results in the formation of a series of hydroxyl-substituted para-hydroquinone species with lower redox potentials than BQDS. However, the intrinsic rates of Michael addition, and whether these rates are modified under *operando* cycling conditions, are not known. This information is critical for establishing a quantitative link between reactant decay/conversion and capacity fade.

The main contributions of our article are schematized in Fig. 1 and are as follows: 1. We performed Bayesian model selection to identify the most plausible kinetic scheme for the decay of BQDS based on ultraviolet-visible (UV–vis) spectrophotometry of a sacrificial oxidant, which acted as a reporter of Michael attack; 2. By applying Bayesian parameter inference and MCR-ALS to the UV–vis data, we obtained uncertainty-quantified estimates of the rates of Michael attack of BQDS both ex situ and inside an operating flow cell; and 3. We individually isolated the UV–vis spectra of all oxidation and Michael attack products by applying MCR-ALS to spectroscopic data obtained from the *operando* BQDS-containing flow cell.

Our paper is structured as follows. Section “Spectroscopic measurement of michael attack of BQDS” reports experimental details and measurements of Michael attack of BQDS ex situ via UV–vis spectrophotometry of the concentration of the sacrificial oxidant. Section “Model selection and uncertainty-quantified rates of Michael attack using Bayesian inference and multivariate curve resolution analysis” describes our application to the UV–vis data of Bayesian model selection and inference of the relevant decay rate constants. Section “Spectrophotometric analysis of BQDS decomposition in an operando flow cell” reports experimental details regarding BQDS oxidation and Michael attack under electrochemical cycling. In Section “Estimation of decay rate constants and UV–vis spectra of oxidation products”, we apply MCR-ALS to the *operando* UV–vis data, extracting the relevant decay rate constants as well as spectra for each oxidation/intermediate product. Finally, in Section “Discussion” we corroborate our results using nuclear magnetic resonance (NMR) analysis and density functional theory (DFT) calculations of the reaction energetics for Michael addition to BQDS. Section “Methods” reports all experimental and computational methods. Our work demonstrates the promise of using statistical inference techniques to elucidate and distinguish between chemical and electrochemical mechanisms of capacity fade in organic RFBs, and, more generally, for understanding variable-timescale molecular transformations in other flow cell-based electrochemical applications.

## Results and discussion

### Spectroscopic measurement of michael attack of BQDS

We first examined Michael attack of BQDS in 1 M H_{2}SO_{4} via spectrophotometric tracking of the concentration of a sacrificial chemical oxidant. BQDS is attractive as a positive electrolyte material in aqueous organic RFBs because of its high solubility (4 M)^{40} and redox potential (0.65 V vs Ag/AgCl, see cyclic voltammetry measurement in Supplementary Fig. 1). However, previous cell cycling experiments^{40,42} have shown that oxidized BQDS is susceptible to self discharge—this results in a progressively lower energy efficiency and the development of a Coulombic imbalance between the negative and positive electrolytes. Based on ex situ voltammetry and chemical analysis, it has been proposed that the origin of self discharge is one^{42} or two^{40} spontaneous nucleophilic additions of water to oxidized BQDS and its successive oxidized derivatives(denoted O_{1}, O_{2}, and O_{3}, respectively), which results in the formation of reduced, hydroxyl-substituted hydroquinone species (R_{1}, R_{2} and R_{3}), as illustrated in Fig. 1. Note that self discharge of BQDS does not entail oxygen or hydrogen evolution from water. Rather, the Michael addition reaction entails the formation of an adduct between water and a quinone derivative, followed by electron transfer within the adduct, and proton transfer between the adduct and solution. Because the overall result is that ketone groups in the quinone are reduced and protonated, the process is akin to discharge (reduction) of the quinone. Because oxidized BQDS and its successive oxidized derivatives (Fig. 1) are also susceptible to dimerization and other cyclization reactions with each corresponding reduced form^{44}, it is necessary to maintain each redox couple in the oxidized form in order to isolate the rates of conversion of O_{1} to O_{2}, O_{2} to O_{3}, etc., hereafter denoted as *k*_{1} and *k*_{2}, etc. We therefore sought a sacrificial oxidant that would maintain the oxidized form of each redox couple, and then to spectrophotometrically track the decrease in its concentration over time, the rate of which would correspond to the rate of Michael addition. The ideal oxidant must have (1) a redox potential that is high enough to oxidize BQDS but not to oxidize water, and (2) optical absorbance features that do not coincide with, or are negligible compared with those of BQDS. Both of these criteria are met by potassium dichromate (K_{2}Cr_{2}O_{7}), which has a redox potential of 1.3 V vs SHE (Supplementary Fig. 1), and whose UV–vis spectrum exhibits prominent peaks at 350 and 445 nm (Supplementary Fig. 2a, b), where absorbance of BQDS is near zero. Two-electron oxidation of BQDS or any other reduced hydroquinone derivatives by one mole of dichromate is expected to proceed according to the reaction:

where O_{x} and R_{x} represent oxidized and reduced derivatives, respectively.

The reduction in [K_{2}Cr_{2}O_{7}] in the presence of oxidized BQDS was consistent with two successive Michael additions. Figure 2a shows selected UV–vis spectra of 0.5 mM K_{2}Cr_{2}O_{7} after the addition of 0.2 mM BQDS. The intensity of the spectra decreased uniformly over the course of 20 h, consistent with a decrease in [K_{2}Cr_{2}O_{7}]. Because K_{2}Cr_{2}O_{7} was added in stoichiometric excess to BQDS, we tracked the decrease in the absorbance peak at 350 nm as a reporter of [K_{2}Cr_{2}O_{7}], based on a calibration curve (Supplementary Fig. 2c), and thus the reaction depicted in Eq. (1) (Fig. 2b). Upon the addition of the BQDS, there was an instantaneous 0.07 mM decrease in [K_{2}Cr_{2}O_{7}] that was commensurate with two-electron oxidation of BQDS to its oxidized form O_{1} (i.e., R_{1} to O_{1}). Over the next hour, the rate of consumption of K_{2}Cr_{2}O_{7} proceeded at an average of about 0.08 mM/h, before slowing to 0.001 mM/h over the subsequent 21 h. The total consumed [K_{2}Cr_{2}O_{7}] appeared to asymptotically approach 0.2 mM. This total consumption is consistent with three discrete two-electron oxidation events: one for conversion of R_{1} to O_{1}, and one each for R_{2} to O_{2} and R_{3} to O_{3}.

Control experiments confirmed that both BQDS and K_{2}Cr_{2}O_{7} were required for the observed spectral changes. No spectral changes were observed for BQDS in the absence of K_{2}Cr_{2}O_{7} (Supplementary Fig. 3)—consistent with water oxidation being insignificant—and vice versa (Supplementary Fig. 1). The control experiments also confirm the absence of any lamp drift because there is no shift observed in the zero-absorbance baseline above 500 nm over time as can be seen in Fig. 2a. We have also shown the lamp spectrum in Supplementary Fig. 4, where no observable drift is seen. Oxidation of BQDS in a thin-layer spectroelectrochemical cell for 19 h also revealed, consistent with previous work^{40,42}, the disappearance of the original BQDS redox feature, and the emergence of a new redox pair ~ 200 mV lower, around 0.65 V vs SHE (Supplementary Fig. 1). This new redox pair has been attributed to O_{3}^{40} as, being a para-quinone, it is expected to have a lower reduction potential than the ortho-quinone O_{1}^{45}.

We conducted three more BQDS oxidation measurements with different initial BQDS concentrations (Fig. 2c), and initial [K_{2}Cr_{2}O_{7}]:[BQDS] ratios varying between 1.6 and 2.5—but always in excess of 1, which is the stoichiometric ratio required for three two-electron oxidation reactions based on Eq. (1). Supplementary Fig. 5 reports the [K_{2}Cr_{2}O_{7}] consumed over time for these measurements. Each trace asymptotes close to the expected steady state. When normalized to the same BQDS concentration (Fig. 2c), the traces overlap, strongly suggesting that the chemical decay of BQDS is first order in [O_{x}], in agreement with the decomposition scheme in Fig. 1.

### Model selection and uncertainty-quantified rates of Michael attack using Bayesian inference and multivariate curve resolution analysis

Taken together, the spectroscopic data above constitute prima facie evidence that oxidized BQDS and its subsequent derivatives are susceptible to two, first-order Michael additions. We therefore sought to rigorously quantify the probability that the above data are explained by the model in Fig. 1, and then to calculate uncertainty-quantified reaction orders and rates for each individual Michael addition.

We first evaluated the most likely number of Michael addition reactions indicated by the above spectroscopic data, among one (i.e., conversion of O_{1} to O_{2}), two (O_{1} to O_{2} to O_{3}) and three (O_{1} to O_{2} to O_{3} to O_{4}). The unknown model parameters include reaction rates and orders for each individual transition (e.g., *k*_{1}, *k*_{2}, *m*_{1} and *m*_{2} for the model with two Michael additions). We chose a prior probability density function (PDF) of the reaction rate to be uniformly distributed over four orders of magnitude in log space, i.e., \({\log }_{10}k \sim {{{{{{{\mathcal{U}}}}}}}}[-6,-2]\) for all *k* terms, and a reaction order *m* that could take a value from {0, 1, 2} with uniform probability, i.e., \({\mathbb{P}}(m=0)={\mathbb{P}}(m=1)={\mathbb{P}}(m=2)=\frac{1}{3}\)). We used the peak in the optical absorbance spectrum at 350 nm as our observation of [K_{2}Cr_{2}O_{7}] because the optical absorbance from K_{2}Cr_{2}O_{7} at that wavelength is significantly stronger than that of BQDS (Supplementary Fig. 2a), its derivatives^{42}, and Cr^{3+}. Moreover, we assumed that the noise on absorbance of different snapshots is independent and identically distributed, such that the covariance matrix Σ_{ϵ} of the additive Gaussian error *ϵ* in Eq. (8) is a diagonal matrix with identical entries. The scale of the additive noise was determined by the standard deviation of the 350 nm peak from calibration curve measurements (Supplementary Fig. 2b). As shown in Supplementary Fig. 6, the standard deviation is about 0.0096 at 350 nm, therefore, we set Σ_{ϵ}’s diagonal entries to 0.0096^{2}.

Figure 3a shows the results of Bayesian model selection. The model posterior probabilities were computed following Eq. (10), which comprises random sampling of rate constants and reaction orders from their prior distribution and then comparing their predictions of K_{2}Cr_{2}O_{7} consumption with corresponding experimental values from UV–vis spectra. The Michael addition reaction was solved numerically using a 4th order Runge–Kutta time-marching algorithm, to ensure good numerical accuracy. We found using *N* = 10^{6} samples in Eq. (10) that the model with two Michael additions (i.e., conversion of O_{1} to O_{2} and then O_{3}) has the highest model evidence among three candidate models. This result is consistent with the stoichiometry of K_{2}Cr_{2}O_{7} consumption in Section “Spectroscopic measurement of michael attack of BQDS”.

We then applied Bayesian inference to ascertain unknown parameters for the most plausible model. We first determined the most probable *m* values by computing \({\mathbb{P}}({m}_{1},\,{m}_{2}|y,\,{{{{{{{\mathcal{M}}}}}}}})\), then sampled *k* while the reaction orders were fixed to their most probable values. This strategy was chosen instead of sampling *k* and *m* jointly because sampling from a mixed continuous-discrete space is computationally expensive, and there are only nine possible combinations of reaction order terms for the two-Michael addition model. Figure 3b shows the marginal posterior of *m*_{1} and *m*_{2} given the UV–vis data, which was computed through:

where the integral was estimated by taking the average of likelihood values with *k*_{1} and *k*_{2} sampled from the prior. Our results revealed that the combination *m*_{1} = *m*_{2} = 1—that is, conversion of O_{1} to O_{2} and O_{2} to O_{3} both being first order in [O_{x}]—is the most likely, with a posterior probability close to 1. Importantly, our analysis rules out the rather unlikely possibility that the apparently first-order reactivity inferred in Section “Spectroscopic measurement of michael attack of BQDS” was due to one reaction being zeroth order and the other being second order in [O_{x}].

We next estimated the rate constants for each Michael addition using Bayesian parameter inference. Figure 4a plots samples generated from the posterior for reaction rates \(p({\log }_{10}{k}_{1},\,{\log }_{10}{k}_{2}|y,\,{m}_{1}=1,\,{m}_{2}=1,\,{{{{{{{\mathcal{M}}}}}}}})\) and Fig. 4b reports the logarithm of the un-normalized posterior PDF (i.e., of the numerator in Bayes’ rule Eq. (7)). Our results indicate that there are two local maxima in the contour plot, but the bottom right local maxima has a much higher probability density value, and consequently only one high probability cluster emerged from the MCMC samples. The bottom right cluster corresponds to *k*_{1} = 3.768 × 10^{−4} and *k*_{2} = 1.986 × 10^{−5} s^{−1}. The standard deviations of samples are 1.248 × 10^{−5} and 2.684 × 10^{−7} s^{−1} for *k*_{1} and *k*_{2}, respectively. These results indicate that Michael attack to O_{1} is considerably more rapid than to O_{2}, with half lives of conversion of 0.51 and 9.69 h, respectively.

Figure 5a shows the expected temporal evolution in the concentration of all oxidized species for initial concentrations of 0.4 and 0.2 mM for K_{2}Cr_{2}O_{7} and BQDS, respectively, reported in Fig. 2c, assuming first-order kinetics for Michael attack and *k*_{1} and *k*_{2} values set at the highest posterior probability (red point) from Fig. 4a. The temporal evolution of the same species in the other experiments with other initial K_{2}Cr_{2}O_{7} and BQDS concentrations are shown in Supplementary Fig. 7. Figure 5b reports the computational temporal consumption of dichromate, normalized to an initial concentration of 0.2 mM and overlaid with similarly normalized experimental data in Fig. 2c. There is excellent agreement between the computational and experimental transients in [K_{2}Cr_{2}O_{7}], which strongly supports the validity of our Bayesian inference results.

In addition to Bayesian inference, we also estimated the decay rate constants by applying the MCR-ALS suite of applications to the spectroscopic data. Given the first-order reactivity of O_{1} and O_{2} determined above, the decay of BQDS and its oxidized derivatives can be modelled as a first-order multi-component kinetics problem, as follows:

where we have neglected the rapid chemical oxidation reactions. This system of equations has an analytical solution, shown in Supplementary Eqs. (1)–(3) for [O_{1}], [O_{2}] and [O_{3}] respectively in the Supplementary Information.

The concentration of consumed K_{2}Cr_{2}O_{7} is a function of the instantaneous concentrations of O_{2} and O_{3}:

By substituting the analytical expressions for O_{2} and O_{3} into Eq. (6), the consumed [K_{2}Cr_{2}O_{7}] can be written as a function of *k*_{1} and *k*_{2}. Thus, knowing the concentration of K_{2}Cr_{2}O_{7} at each time step permits one to determine the values of *k*_{1} and *k*_{2}. We approached this problem by first calculating [K_{2}Cr_{2}O_{7}] from each UV–vis spectrum based on the peak at 350 nm. This was done using MCR-ALS techniques (Supplementary Section 2). The values for *k*_{1} and *k*_{2} were then determined following Eq. (6) by using the concentrations determined for consumed [K_{2}Cr_{2}O_{7}] using MCR-ALS coupled with a fitting procedure from MATLAB’s curve fitting toolbox^{46}. The results obtained for *k*_{1} and *k*_{2} for the four data sets with different initial concentrations are presented in Table 1. The values for *k*_{1} and *k*_{2} averaged over these four data sets are 5.40 × 10^{−4} s^{−1} and 3.34 × 10^{−4} s^{−1}, which are reasonably consistent with the decay rate constants calculated from Bayesian inference (green points in Fig. 4).

### Spectrophotometric analysis of BQDS decomposition in an *operando* flow cell

The preceding spectroscopic measurements and analysis were aimed at quantifying the rate(s) of purely chemical decomposition of BQDS, i.e., in the absence of an applied potential or interaction with typical flow cell hardware (porous electrodes and membrane). To evaluate electrochemical BQDS decomposition during cycling of a flow cell, we set up a compositionally asymmetric flow cell whose capacity-limiting electrolyte (CLE) comprised 5–15 mM of BQDS in a supporting electrolyte of 0.9 M H_{2}SO_{4} and 0.1 M CH_{3}COOH. An excess of Methylene Blue was used as the counter electrolyte, and the two electrolytes were separated by a Nafion 115 membrane. The CLE was circulated among the electrolyte reservoir, cell, and an absorbance micro cross flow cell with a path length of 0.15 mm, for continuous UV–vis measurements (Supplementary Fig. 14). No K_{2}Cr_{2}O_{7} was present in the CLE, meaning that all UV–vis spectra represented a concentration-weighted average of BQDS and all its oxidation/decay products.

Figure 6 reports *operando* UV–vis spectra of a CLE containing 15 mM of BQDS after potentiostatic oxidation at a cell voltage of 0.8 V. Over the course of the experiment, the absorbance peak at 305 nm in the R_{1} spectrum diminished, while a new peak at 260 nm evolved, increased in intensity for roughly 2 h, and then slowly reduced in intensity. A similar trend has been observed previously^{42}.

We carried out two other experiments at BQDS concentrations of 5 and 8 mM but under otherwise identical potentiostatic conditions (Supplementary Fig. 8a and b, respectively); Supplementary Fig. 8c reports the current response for all three cells and Supplementary Fig. 8d shows the peak intensities at 260 and 305 nm coinciding when the UV–vis spectra are scaled to a concentration of 5 mM. This concentration-independent scaling is consistent with first-order kinetics for all species conversions, as has been demonstrated in the preceding sections.

We verified that these spectral trends did not result from some spurious chemical interaction between BQDS and the hardware within the absorbance cross flow cell. To do so, we set up an identical flow cell without the cross flow cell apparatus, and periodically took aliquots from the CLE for in situ UV–vis analysis. Supplementary Fig. 8e reports the absorbance at 260 nm over time for two such in situ measurements; they show clear qualitative agreement with the UV–vis trends for the *operando* setup in Supplementary Fig. 8d.

For the practical application of this method to other molecules and mechanisms, certain constraints and limitations have to be considered. First, the UV–vis spectra of the reactants and the degradation products need to be intense enough to be detected and significantly distinct from one another. Second, a detectable amount of the degradation products must form during the experiment. To give an example, assuming a change in absorbance of at least 0.05 is required to detect a decay product whose molar absorptivity is 10^{−3} M^{−1}cm^{−1}, over a cycling period of no more than 10 days, the molecular decay/capacity fade rate should be at least 0.5%/day. For timescales larger than 10 days, the in situ method can still be used, where aliquots can be drawn every few days and their UV–vis spectra analyzed.

### Estimation of decay rate constants and UV–vis spectra of oxidation products

We next sought to extract pure UV–vis spectra of intermediate species O_{1}, O_{2}, and O_{3} using the MCR-ALS suite of applications^{43}. Isolating these pure spectra from the spectra in Fig. 6 is a challenge because the latter originate from a system with continuously varying proportions of four possible components: R_{1}, O_{1}, O_{2}, and O_{3}. Chemometric techniques such as MCR-ALS can overcome this challenge, because they use matrix factorization methods combined with suitable physical and chemical constraints to deconvolute the component spectra and determine the concentrations and pure spectral profiles of each component. MCR-ALS analysis was ran on the spectral data set within a truncated wavelength range of 230–500 nm. Each spectrum was represented as a row of a matrix, and initial estimates for the concentration matrix were made using the purest variable detection method (SIMPLISMA)^{43,47,48}. The system was analyzed as a four-component system comprising R_{1}, O_{1}, O_{2} and O_{3}, with the constraints used to reduce the ambiguity in matrix decomposition being non-negativity of spectra and concentrations using a non-linear least squares method, as well as a stoichiometric balance closure constraint. A hard constraint for following a first-order kinetic model was also used. As a control, we ran MCR-ALS analysis on *operando* UV–vis spectra taken on a ferrocyanide-based electrolyte during bulk electrolytic cycling (Supplementary Fig. 9), and demonstrated that the technique successfully infers the correct spectral profiles and concentrations for ferrocyanide and ferricyanide (Supplementary Fig. 10) (Supplementary Section 3 for more details).

Estimates for the rate constant for electrochemical conversion of R_{1} to O_{1} (*k*_{0}), *k*_{1}, and *k*_{2} are shown in Table 2. Figure 7 shows the estimated spectra from the experiment with [BQDS]_{0} = 8 mM. The estimated spectral profiles indicate that O_{2} and O_{3} have similar spectra, with O_{3} having a weaker peak centered around 260 nm compared to O_{2}. This finding makes sense of the observation from the experimental UV–vis spectra that the peak at 260 nm rose and then fell during oxidative electrolysis of the BQDS electrolyte (Supplementary Fig. 8e). The larger variance for *k*_{2} than *k*_{1} is likely due to this phenomenon as well; the overlap in peak position for O_{2} and O_{3} limits the ability of MCR-ALS to distinguish between the two species. On the other hand, the rate constants *k*_{0} and *k*_{1} are relatively well determined and correspond to time constants on the order of a minute and half an hour, respectively. The estimated concentration profiles for R_{1}, O_{1}, O_{2}, and O_{3} for an [BQDS]_{0} = 8 mM and other concentrations are shown in Supplementary Fig. 11 and the estimated spectra are shown in Supplementary Fig. 12.

The mean values for *k*_{1} and *k*_{2} are plotted in Fig. 4 and superimposed on the uncertainty-quantified estimates of *k*_{1} and *k*_{2} obtained via Bayesian inference and those from MCR-ALS analysis on the ex situ BQDS decay data. Within uncertainty, there is good agreement among both sets of estimates, leading to the conclusion that reactant decay and thus capacity fade within a flow cell containing BQDS in the CLE is largely driven by chemical decay of the BQDS electrolyte based on the mechanism in Fig. 1.

### Discussion

The decomposition mechanism in Fig. 1, which was first proposed in a study by Yang et al.^{40}, was originally formulated based on NMR measurements of aliquots from a BQDS electrolyte after 2, 120 and 400 charge-discharge cycles in a flow cell. NMR is a more chemically specific technique than UV–vis, but it is difficult to quantify decay kinetics from such NMR measurements because if capacity fade is driven by a chemical decay—as has now been determined—the amount of time oxidized BQDS (or successive oxidized derivatives) are present in solution is a more relevant metric rather than the number of cycles spent in a flow cell^{8}. Therefore, to verify that the water addition steps in Fig. 1 proceeded under potentiostatic conditions, we set up a flow cell with a BQDS-containing CLE and Methylene Blue counter electrolyte, and, over the course of 24 h, drew aliquots from the CLE while it was under a fixed oxidative potential of 0.8 V.

The results of this experiment are shown in Supplementary Fig. 13a. The spectrum for BQDS contains two singlets at 7.17 and 7.41 ppm, corresponding to protons at the two unsubstituted aryl positions^{40,44}. After 1 hour, a singlet at 7.06 ppm is dominant, corresponding to the proton at the only unsubstituted aryl position in O_{2}. After 24 h, the peak corresponding to the aromatic proton in O_{2} disappeared, and no aromatic proton peaks were visible in the NMR scan, which would be expected given that all aryl positions are substituted in O_{3}. The evolution in NMR spectra and relative shifts in peak position are in line with our expectations based on NMR spectra simulated for O_{1}, O_{2} and O_{3} using ChemDraw (Supplementary Fig. 13b).

We also predicted the decomposition reaction thermodynamics for conversions of O_{1} to R_{2} and O_{2} to R_{3} using DFT modeling with the B3LYP functional and COSMO implicit solvation (Fig. 8). The Brønsted–Evans–Polanyi (BEP) principle observes that the difference in activation energy between two reactions of the same family is proportional to the difference of their reaction energies. Assuming the principle holds, DFT calculations of the reaction energies allow the kinetics of the two reactions responsible for capacity fade, O_{1} to R_{2} and O_{2} to R_{3}, to be compared qualitatively. The O_{1} to R_{2} reaction (Fig. 8a) is more thermodynamically favored than O_{2} to R_{3} (Fig. 8b), with overall free energy changes of −61.7 kJ/mol versus −23.0 kJ/mol, respectively. The first elementary step of the O_{2} to R_{3} pathway is much more endothermic (ΔG_{O2→I4} = 107.8 kJ/mol) than the first elementary step of the O_{1} to R_{2} pathway (i.e., ΔG_{O1→I2} = 71.4 kJ/mol). Subsequent steps for both reactions are downhill in free energy or essentially thermoneutral (i.e., I_{5} to R_{3}). Thus, the first elementary step of O_{2} to I_{4} likely has the highest activation energy for both pathways based on the BEP principle. It follows that the O_{1} to R_{2} decomposition should occur more rapidly than that of O_{2} to R_{3} (*k*_{2} < *k*_{1}), which is consistent with the results of applying MCR-ALS and Bayesian inference to our spectroscopic data. The DFT-predicted energetics qualitatively follow what is expected for apparent activation barriers calculated from the experimental values for *k*_{1} and *k*_{1} obtained in Sections “Model selection and uncertainty-quantified rates of Michael attack using Bayesian inference and multivariate curve resolution analysis” and “Estimation of decay rate constants and UV–vis spectra of oxidation products”. Assuming transition state theory, and a pre-exponential factor of *k*_{b}*T*/*h* = 6 × 10^{12} s^{−1}, we obtained activation barriers of 86 and 91 kJ/mol for the conversion of O_{1} to R_{2} and O_{2} to R_{3}, respectively.

Taken together, our DFT computations and NMR results strongly corroborate conclusions from Sections “Model selection and uncertainty-quantified rates of Michael attack using Bayesian inference and multivariate curve resolution analysis” and “Estimation of decay rate constants and UV–vis spectra of oxidation products”. Thus, combining UV–vis spectroscopy—whether ex situ or from *operando* flow cells—with matrix-based curve resolution, as well as Bayesian model selection and parameter inference, is a viable strategy for elucidating the role of Michael attack in the decomposition of flow battery reactants. Importantly, our techniques are able to resolve processes occurring across a range of timescales, from a minute to several hours. In the context of ongoing efforts toward designing Michael attack-resistant quinone-based posolytes^{40,49,50}, the methods demonstrated in this paper might be extended in future work toward high-throughput screening of other high-potential quinone derivatives^{45}, or evaluating the correlation between the rate of Michael attack and a quinone’s redox potential^{51}. Moreover, UV–vis signatures of intermediate species inferred from *operando* spectroscopy may be compared against ex situ spectra of decay species that have been proposed to feature in one or more hypothesized decay mechanisms. These campaigns may be extended to other molecular classes that are subject to Michael attack, and which are currently under consideration for organic flow battery applications, such as quinoxalines^{52} and biphenols^{53}.

More generally, the combination of spectrophotometry with statistical inference techniques as depicted by the workflow in Fig. 1 can be deployed in connection with a wider variety of decomposition mechanisms to which flow battery reactants from other molecular classes are susceptible. Although it might be difficult to use these methods to determine a completely unknown degradation mechanism, they may be used to verify a proposed hypothesis about the link between molecular decay and capacity fade, choose between competing hypotheses (which might be found based on techniques such NMR spectroscopy and mass spectrometry), or guide the design of cycling experiments in such a way as to extract decay rate parameters with high certainty and low experimental effort (i.e., via optimal experimental design^{54}). In addition to UV–vis spectroscopy, it is also possible to apply Bayesian techniques to other forms of spectroscopic data where the signal may be proportional to concentration such as Fourier Transform Infrared (FTIR) spectroscopy. The decay rate parameters thus obtained may in turn be supplied to analytical or numerical electrochemical models that can simulate capacity retention for a given load/duty cycle^{55,56}, thus paving the way to flow battery lifetime predictions. Even though we conduct our analysis for concentrations below 20 mM, we determined reaction kinetic rates and orders, so it should be possible to apply these to predict decay rates when practical concentrations (>0.5 M) are used. Beyond capacity fade in organic RFBs, these methods may also be deployed for other flow cell-based applications in which charge transfer is accompanied by homogeneous chemical conversion(s), such as electrosynthesis^{57} or (electro)chemical separations (e.g., CO_{2} capture)^{58}.

## Methods

### Chemicals

BQDS, H_{2}SO_{4}, potassium dichromate, D_{2}O, CH_{3}SO_{3}D and Methylene Blue (MB) were procured from Sigma Aldrich and used as received.

### Spectroscopic measurement of chemical oxidation of BQDS and Michael attack

UV–vis measurements of Michael attack of BQDS were conducted by monitoring the optical absorbance of K_{2}Cr_{2}O_{7} after the addition of a known quantity of BQDS. For each measurement, an aqueous solution of 2 mL of K_{2}Cr_{2}O_{7} was first prepared in a polystyrene cuvette with a 10 mm path length and 1 M H_{2}SO_{4} as supporting electrolyte; then BQDS was added to the solution and UV–vis spectra were recorded every 5 min. All UV–vis spectra were recorded at room temperature using a DH-mini light source from Ocean Insight and an HDX detector.

### Flow cell preparation

Flow cells were constructed with cell hardware from Fuel Cell Technologies (Albuquerque, New Mexico), and assembled into a zero-gap configuration, similar to a previous report^{59}. Pyrosealed POCO graphite flow plates with interdigitated flow patterns were used for both electrodes. Each electrode comprised a 5 cm^{2} stack of one sheet of CE Tech GF020 graphite felt (Fuel Cell Store, uncompressed thickness of 2.0 mm). All electrodes were baked in air for 12 h at 400 °C prior to use. The outer portion of the space between the electrodes was gasketed by Viton sheets with the area over the electrodes cut out. A 120-μm-thick Nafion 115 (Fuel Cell Store) ion-exchange membrane was used as the separator in the BQDS-MB flow cells with and without in-line UV–vis monitoring, and torque applied during cell assembly was 13.6 Nm on each of the eight bolts. A Cole-Parmer Masterflex peristaltic pump circulated the electrolyte through the flow cell through fluorinated ethylene propylene tubing of 1.61 mm inner diameter. We obtained calibration curves for each pump that enabled translation from revolutions per minute to a volumetric flow rate in mL/min. For the flowcell experiments, we used a volumetric flow rate of 30 mL/min. A Biologic VSP-300 potentiostat was used for all cell cycling, voltammetry, and impedance spectroscopy measurements.

### In-line *operando* UV–vis measurements

We monitored the rate of Michael attack of BQDS during its oxidation in an *operando* flow cell. This measurement was done by setting up an aqueous flow cell with a capacity-limiting electrolyte (CLE) comprising 8 mL of between 5 and 15 mM of BQDS, and directing the flow of electrolyte through an absorbance micro cross flow cell (Supplementary Fig. 14) from Firebird Optics. In all cases, 20 mL of 20 mM of Methylene Blue (MB) was used as the redox-active material in the non-capacity-limiting (NCLE) (or counter) electrolyte. We used MB in the counter electrolyte because it has been shown to have higher chemical stability as measured from symmetric flow cell cycling^{60} than anthraquinone 2,7-disulfonic acid^{61}, which has been previously deployed in the negolyte of BQDS full cells. The lower voltage of the BQDS-MB flow cell (0.15 V) compared to a BQDS-AQDS cell (~0.65 V) did not hinder our objective of investigating the degradation of BQDS. Our goal was to have a counter electrolyte with adequate excess capacity and stable redox behavior, not a high potential full-cell. The supporting electrolyte comprised 0.9 M H_{2}SO_{4} and 0.1 M CH_{3}COOH; the CH_{3}COOH was used to prevent MB from coagulating^{62}.

Although practical flow batteries may require the use of reactants with concentrations in excess of 0.5 M, we are constrained to lower concentrations due to the saturation limit of the spectrometer. Given that BQDS has a molar absorptivity of 2.4 × 10^{−3} M^{−1} cm^{−1} (considering the peak at 234 nm), we would need an impractically short path length of 1.2 × 10^{−3} cm or lower due to the saturation limit of the spectrometer if a 0.5 M concentration is to be used. This limitation does not exist for the in situ technique, where aliquots can be periodically drawn from the CLE and diluted before UV–vis analysis. In situ UV–vis measurements may therefore readily permit analysis of reactant concentrations >0.5 M, but at the expense of a lower time resolution than more continuous, *operando* measurements.

For each measurement, unless specified otherwise, UV–vis spectra were recorded every 5 s for the first hour, and then every 30 s for the next 10–20 h. The spectrometer and detector used for this experiment were the same as the ones used in Section “Spectroscopic measurement of chemical oxidation of BQDS and Michael attack”. BQDS was oxidized potentiostatically at a cell potential of 0.8 V, which is 0.6 V higher than the nominal potential of a BQDS-MB flow cell.

### NMR measurements and simulations

150 μL aliquots of a BQDS electrolyte under oxidation in a BQDS-MB flow cell were taken intermittently and examined using Nuclear Magnetic Resonance (NMR) spectroscopy. The CLE comprised 100 mM of BQDS, whereas the counter electrolyte comprised 50 mM of Methylene Blue (MB) with a six-fold excess capacity. The cell was charged at a constant current of 0.5 A until a voltage of 1 V was obtained, after which it was held at 1 V for 24 h. Aliquots were retrieved from the electrolyte after 5, 10, 20, 30, 60, 300, and 1440 min from the start of oxidation. Prior to NMR analysis, each aliquot was diluted to 20 mM with deuterated water (D_{2}O) as the solvent and 50 mM CH_{3}SO_{3}D was added as an internal standard.

NMR measurements were conducted on a Varian MR400 400 MHz (9.4 Tesla) Premium Shielded Magnet NMR spectrometer. The H-NMR simulations for BQDS derivatives were obtained using CDCl_{3} as the solvent under a frequency of 300 MHz with the ChemDraw software version 18.2.

### Bayesian inference and model selection

In this section we present a general Bayesian framework for parameter inference and model selection. We then use these methods for our models and experiments in Section “Results and discussion”.

#### Bayesian parameter inference

Bayesian parameter inference is exercised on a given model \({{{{{{{\mathcal{M}}}}}}}}\), such as the BQDS decay model in Fig. 1. We denote the collection of all model parameters (e.g., reaction orders and rate constants) by *θ*, and all measurements (e.g., absorbance data obtained using UV–vis spectroscopy) by *y*. Under a Bayesian framework, the uncertainty of *θ* is represented by a probability density function (PDF). When new measurements are acquired, the uncertainty of *θ* is updated through Bayes’ rule:

where \(p(\theta|{{{{{{{\mathcal{M}}}}}}}})\) is the prior PDF representing the initial uncertainty of *θ* in model \({{{{{{{\mathcal{M}}}}}}}}\) before having the new measurements *y*, and \(p(\theta|y,\,{{{{{{{\mathcal{M}}}}}}}})\) is the posterior PDF representing the updated uncertainty after incorporating *y*. Furthermore, \(p(y|\theta,\,{{{{{{{\mathcal{M}}}}}}}})\) is the likelihood PDF that provides a probabilistic description of the discrepancy between the model’s predictions and experimental observations, and \(p(y|{{{{{{{\mathcal{M}}}}}}}})=\int\,p(y|\theta,\,{{{{{{{\mathcal{M}}}}}}}})p(\theta|{{{{{{{\mathcal{M}}}}}}}})\,d\theta\) is the Bayesian model evidence (also called the marginal likelihood) that acts as a normalization constant to ensure \(p(\theta|y,{{{{{{{\mathcal{M}}}}}}}})\) remains a proper PDF (integrates to unity). Solving the Bayesian inference problem then entails computing or characterizing the posterior \(p(\theta|y,{{{{{{{\mathcal{M}}}}}}}})\).

The prior \(p(\theta|{{{{{{{\mathcal{M}}}}}}}})\) may be chosen in either a non-informative or informative manner. In the former, for example, if reasonable lower and upper bounds are known for the model parameter, then a uniform distribution can be imposed across this range. Such “flat” distribution means that initially all values are equally probable and one does not favor any particular region; this non-informative prior also appeals to the Principle of Maximum Entropy^{63}. In the latter, if historical data or domain experts are available, the prior PDF can be formed to incorporate this knowledge through techniques of expert elicitation^{28}. In our work, we take a non-informative approach and adopt a uniform prior distribution.

The likelihood \(p(y|\theta,{{{{{{{\mathcal{M}}}}}}}})\) quantifies how likely one is to observe *y* if the model’s parameter values were actually *θ*. Effectively, it provides a probability measure on the discrepancy between a model’s predictions and experimental observations, which may be induced by measurement noise or modeling error. We employ a commonly used likelihood form that involves additive Gaussian error:

where \({g}_{{{{{{{{\mathcal{M}}}}}}}}}(\theta )\) is model \({{{{{{{\mathcal{M}}}}}}}}\)’s prediction on the observable quantities if parameter values were *θ*, and *ϵ* is a zero-mean Gaussian distribution \({{{{{{{\mathcal{N}}}}}}}}(0,\,{{{\Sigma }}}_{\epsilon })\). Subsequently, the likelihood PDF may be evaluated as \(p(y|\theta,\,{{{{{{{\mathcal{M}}}}}}}})={p}_{\epsilon }(y-{g}_{{{{{{{{\mathcal{M}}}}}}}}}(\theta ))={{{{{{{\mathcal{N}}}}}}}}(y-{g}_{{{{{{{{\mathcal{M}}}}}}}}}(\theta );0,{{{\Sigma }}}_{\epsilon })\). Whereas such a zero-mean error assumption is commonly justified for measurement error from instruments, it is often inadequate to incorporate modeling error (i.e., systematic error due to incorrect assumptions in a model, such as the wrong number of Michael addition events to oxidized BQDS); however, this issue is separately addressed through Bayesian model selection in the next section.

Lastly, the Bayesian inference problem requires solving for the posterior. The posterior PDF is generally intractable to compute. Instead, one can characterize the posterior by generating samples from it, most commonly via Markov chain Monte Carlo (MCMC) methods^{64,65}. We therefore performed posterior sampling using the Metropolis–Hastings algorithm^{66,67} from PyMC3, a mature probabilistic programming Python package that can handle high dimensional parameter settings^{68}.

#### Bayesian model selection

Bayesian parameter inference from the previous section provides a means to quantify parameter uncertainty for a given model \({{{{{{{\mathcal{M}}}}}}}}\). However, what if we wish to compare different models that are built on different assumptions, such as BQDS decay models with one versus two versus three Michael additions? Such a task of model selection can also be accomplished in a Bayesian framework^{29,30}. Among *n*_{M} candidate models, the probability that the *i*th model \({{{{{{{{\mathcal{M}}}}}}}}}_{i},i=1,\ldots,{n}_{M}\) is the true data-generating model of experimental observations *y* can also be expressed through Bayes’ rule:

where \({\mathbb{P}}({{{{{{{{\mathcal{M}}}}}}}}}_{i})\) is the prior probability mass function (PMF) of model \({{{{{{{{\mathcal{M}}}}}}}}}_{i}\), and \({\mathbb{P}}({{{{{{{{\mathcal{M}}}}}}}}}_{i}|y)\) is posterior PMF given observations *y*. The new model-likelihood term \(p(y|{{{{{{{{\mathcal{M}}}}}}}}}_{i})\) is in fact the model evidence (denominator term) from Eq. (7). \(p(y)=\mathop{\sum }\nolimits_{i=1}^{{n}_{M}}p(y|{{{{{{{{\mathcal{M}}}}}}}}}_{i}){\mathbb{P}}({{{{{{{{\mathcal{M}}}}}}}}}_{i})\) still serves as a normalization constant but can be computed easily because \({{{{{{{{\mathcal{M}}}}}}}}}_{i}\) is discrete. If a uniform model prior is used—i.e., all models are initially equally probable with \({\mathbb{P}}({{{{{{{{\mathcal{M}}}}}}}}}_{i})=1/{n}_{M}\)—it follows that \({\mathbb{P}}({{{{{{{{\mathcal{M}}}}}}}}}_{i}|y)=p(y|{{{{{{{{\mathcal{M}}}}}}}}}_{i}) / \mathop{\sum }\nolimits_{j=1}^{{n}_{M}}p(y|{{{{{{{{\mathcal{M}}}}}}}}}_{j})\). The key to Bayesian model selection is therefore estimating the model evidence term \(p(y|{{{{{{{{\mathcal{M}}}}}}}}}_{i})\).

We elect to use a direct Monte Carlo integration to estimate the model evidence:

where *θ*_{i} denotes parameters of model \({{{{{{{{\mathcal{M}}}}}}}}}_{i}\), and \({\theta }_{i}^{(j)},j=1,\ldots,N\) represents the *j*th sample of *θ*_{i} drawn from the parameter-prior distribution \(p({\theta }_{i}|{{{{{{{{\mathcal{M}}}}}}}}}_{i})\). This Monte Carlo estimator for the model evidence may endure high variance if the posterior concentrates narrowly within the prior (i.e., many of the prior samples may have a near-zero contribution to the summand in Eq. (10)). More advanced techniques can be employed to improve the estimate, such as using importance sampling (e.g., Ch. 3.3 of ref. ^{69}) or variational inference^{70}; we leave the exploration of these advanced numerical methods for future work. The Bayesian methodology also has limitations. For example, the MCMC sampling algorithm for performing Bayesian inference can take a long time to mix (converge) if the posterior is sharply multimodal; in our work we mitigate this effect using multiple chains with randomized starting points. Computing the probabilities of several hypotheses using Bayesian model selection can also require many samples to stabilize and can be computationally expensive. Furthermore, Bayesian model selection is a method that identifies the most probable hypothesis from a given candidate set; it is not designed to generate new hypotheses.

### Multivariate curve resolution analysis

We determined the UV–vis spectra of all intermediate species that evolved during BQDS oxidation, and calculated the rate constants of Michael attack of oxidized BQDS using the MCR alternating least squares (MCR-ALS) suite of applications^{43}. The MCR-ALS technique is based on the matrix form of the Beer–Lambert Law:

where *X* is a matrix containing the spectra taken at each time step, *C* is the matrix whose columns contain the concentration of each independent component in the system with time, and *S* is the matrix that contains the pure spectra (the product of molar absorption coefficient and path length) of each component in the system along its rows. The dimensions of *X* are *t* × *λ*, where *λ* is the number of wavelengths recorded by the UV–vis spectrometer, and *t* is the number of spectra recorded; the dimensions of *C* are *t* × *n*, where *n* is the number of components in the system; and the dimensions of *S*^{T} are *n* × *λ*. The Beer’s Law decomposition of a spectral matrix is illustrated in Supplementary Fig. 15.

MCR-ALS uses the alternating least squares technique for matrix decomposition to determine the matrices *C* and *S*, thus allowing determination of the pure spectra for each of the components in the system and the associated rate constants of decomposition. Initial guesses for the factored matrices can be obtained using either evolving factor analysis (EFA) or purest variables detection (SIMPLISMA) techniques, followed by the iterative alternating least squares procedure to find the best fitting matrices^{47,48,71}. In this study we used the SIMPLISMA method. We also imposed additional constraints of non-negativity in spectra and concentrations, and closure (i.e., a fixed total concentration for all species) in order to reduce ambiguities in the matrix factorization. A key limitation of MCR-ALS is that it is only valid (assumes) for first order reactions; however this assumption is verified by our Bayesian model selection results.

### Density functional theory calculations

All DFT calculations were performed in the NWChem computational chemistry software version 7.0.0^{72}. Gibbs free energies of the species in the BQDS decomposition pathway were predicted. Each species in the pathway was geometry optimized using the B3LYP functional. The 6-311G** basis set was used^{73,74}. The COSMO model with default parameters was used to implicitly treat molecule solvation by water^{75}. The convergence criteria in NWChem used were \({{{{{{{\rm{GMAX}}}}}}}}=0.00045\), GRMS = 0.00030, \({{{{{{{\rm{XMAX}}}}}}}}=0.00180\), XRMS = 0.00120, and the electronic energy convergence was 10^{−5} hartree. Vibrational, rotational, and translational enthalpic and entropic contributions (assuming an ideal gas with rigid rotor-harmonic oscillator) were included to estimate the free energies at standard state.

## Data availability

The code and data for Bayesian inference analysis have been deposited on the GitHub repository via https://doi.org/10.5281/zenodo.7807364, and the DFT files and data are available in the NOMAD repository via https://doi.org/10.17172/NOMAD/2023.01.14-1.

## References

Soloveichik, G. L. Flow batteries: current status and trends.

*Chem. Rev.***115**, 11533–11558 (2015).Li, Z. et al. Air-breathing aqueous sulfur flow battery for ultralow-cost long-duration electrical storage.

*Joule***1**, 306–327 (2017).Brushett, F. R., Aziz, M. J. & Rodby, K. E. On lifetime and cost of redox-active organics for aqueous flow batteries.

*ACS Energy Lett.***5**, 879–884 (2020).Ziegler, M. S. et al. Storage requirements and costs of shaping renewable energy toward grid decarbonization.

*Joule***3**, 2134–2153 (2019).Gregory, T. D., Perry, M. L. & Albertus, P. Cost and price projections of synthetic active materials for redox flow batteries.

*J. Power Sources***499**, 229965 (2021).Dieterich, V. et al. Estimating the cost of organic battery active materials: a case study on anthraquinone disulfonic acid.

*Transl. Mater. Res.***5**, 034001 (2018).Darling, R. M., Gallagher, K. G., Kowalski, J. A., Ha, S. & Brushett, F. R. Pathways to low-cost electrochemical energy storage: a comparison of aqueous and nonaqueous flow batteries.

*Energy Environ. Sci.***7**, 3459–3477 (2014).Kwabi, D. G., Ji, Y. & Aziz, M. J. Electrolyte lifetime in aqueous organic redox flow batteries: a critical review.

*Chem. Rev.***120**, 6467–6489 (2020).Zhao, E. W. et al. In situ NMR metrology reveals reaction mechanisms in redox flow batteries.

*Nature***579**224–228 (2020).Zhao, E. W. et al. Coupled in situ NMR and EPR studies reveal the electron transfer rate and electrolyte decomposition in redox flow batteries.

*J. Am. Chem. Soc.***143**, 1885–1895 (2021).Jing, Y. et al. In situ electrochemical recomposition of decomposed redox-active species in aqueous organic flow batteries.

*Nat. Chem.*,**14**, 1103–1109 (2022).Kowalski, J. A., Fenton, A. M., Neyhouse, B. J. & Brushett, F. R. A method for evaluating soluble redox couple stability using microelectrode voltammetry.

*J. Electrochem. Soc.***167**, 160513 (2020).Kowalski, J. A., Neyhouse, B. J. & Brushett, F. R. The impact of bulk electrolysis cycling conditions on the perceived stability of redox active materials.

*Electrochem. Commun.***111**, 106625 (2020).Goulet, M.-A. & Aziz, M. J. Flow battery molecular reactant stability determined by symmetric cell cycling methods.

*J. Electrochem. Soc.***165**, A1466–A1477 (2018).GouletM.-A. et al. Extending the lifetime of organic flow batteries via redox state management.

*J. Am. Chem. Soc.***141**, 20 (2019).Luo, J. et al. Unraveling pH dependent cycling stability of ferricyanide/ferrocyanide in redox flow batteries.

*Nano Energy***42**, 215–221 (2017).Páez, T., Martínez-Cuezva, A., Palma, J. & Ventosa, E. Revisiting the cycling stability of ferrocyanide in alkaline media for redox flow batteries.

*J. Power Sources***471**, 228453 (2020).Luo, J. et al. Unprecedented capacity and stability of ammonium ferrocyanide catholyte in pH neutral aqueous redox flow batteries.

*Joule***3**, 149–163 (2019).Orita, A., Verde, M. G., Sakai, M. & Meng, Y. S. The impact of pH on side reactions for aqueous redox flow batteries based on nitroxyl radical compounds.

*J. Power Sources***321**, 126–134 (2016).Orita, A., Verde, M. G., Sakai, M. & Meng, Y. S. A biomimetic redox flow battery based on flavin mononucleotide.

*Nat. Commun.***7**, 13230 (2016).Lin, K. et al. A redox-flow battery with an alloxazine-based organic electrolyte.

*Nat. Energy***1**, 16102 (2016).Feng, R. et al. Reversible ketone hydrogenation and dehydrogenation for aqueous organic redox flow batteries.

*Science***372**, 836 (2021).Kwabi, D. G. Molecular engineering expands the chemical possibilities for organic flow batteries.

*Joule***5**, 1636–1638 (2021).Hastie, T., Tibshirani, R., and Friedman, J.

*The elements of statistical learning*. 2nd ed. (Springer, 2009).Berger, J. O.

*Statistical decision theory and bayesian analysis. Springer Series in Statistics*. (Springer, 1985).Bernardo, J. M. & Smith, A. F. M.

*Bayesian theory*. (John Wiley & Sons, New York, NY, 2000).Sivia, D.S. and Skilling, J.

*Data analysis: a Bayesian tutorial*, 2nd ed. (Oxford University Press, 2006).O’Hagan, A. et al.

*Uncertain judgements: eliciting experts’ probabilities*. (John Wiley & Sons, Ltd, Chichester, UK, 2006).Kass, R. E. & Raftery, A. E. Bayes factor.

*J. Am. Stat. Assoc.***90**, 773–795 (1995).Wasserman, L. Bayesian model selection and model averaging.

*J. Math. Psychol.***44**, 92–107 (2000).Finegan, D. P. et al. The application of data-driven methods and physics-based learning for improving battery safety.

*Joule***5**, 316–329 (2021).Attia, P. M. et al. Closed-loop optimization of fast-charging protocols for batteries with machine learning.

*Nature***578**, 397–402 (2020).Fenton Jr, A. M. & Brushett, F. R. Using voltammetry augmented with physics-based modeling and bayesian hypothesis testing to identify analytes in electrolyte solutions.

*J. Electroanal. Chem.***904**, 115751 (2022).Brady, N. W., Gould, C. A. & West, A. C. Quantitative parameter estimation, model selection, and variable selection in battery science.

*J. Electrochem. Soc.***167**, 013501 (2020).Gao, T. & Lu, W. Physical model and machine learning enabled electrolyte channel design for fast charging.

*J. Electrochem. Soc.***167**, 110519 (2020).Wan, S. et al. Machine learning-assisted design of flow fields for redox flow batteries.

*Energy Environ. Sci.***15**, 2874–2888 (2022).Limaye, A. M., Zeng, J. S., Willard, A. P. & Manthiram, K. Bayesian data analysis reveals no preference for cardinal tafel slopes in co2 reduction electrocatalysis.

*Nat. Commun.***12**, 703 (2021).Doan, H. A. et al. Quantum chemistry-informed active learning to accelerate the design and discovery of sustainable energy storage materials.

*Chem. Mater.***32**, 6338–6346 (2020).Agarwal, G., Doan, H. A., Robertson, L. A., Zhang, L. & Assary, R. S. Discovery of energy storage molecular materials using quantum chemistry-guided multiobjective bayesian optimization.

*Chem. Mater.***33**, 8133–8144 (2021).Yang, B. et al. High-performance aqueous organic flow battery with quinone-based redox couples at both electrodes.

*J. Electrochem. Soc.***163**, A1442–A1449 (2016).Xu, Y., Wen, Y.-H., Cheng, J., Cao, G.-P. & Yang, Y.-S. A study of tiron in aqueous solutions for redox flow battery application.

*Electrochim. Acta***55**, 715–720 (2010).Xu, Y., Wen, Y. H., Cheng, J., Cao, G. P. & Yang, Y. S. Electrochemical reaction mechanism of tiron in acidic aqueous solution.

*Adv. Mater. Res.***396-398**, 1730–1735 (2011).Jaumot, J., de Juan, A. & Tauler, R. Mcr-als gui 2.0: new features and applications.

*Chemom. Intell. Lab. Syst.***140**, 1–12 (2015).PregerY. et al. Quinone-mediated electrochemical o2 reduction accessing high power density with an off-electrode co-n/c catalyst.

*Joule***2**, 2722–2731 (2018).Wedege, K., Drazevic, E., Konya, D. & Bentien, A. Organic redox species in aqueous flow batteries: redox potentials, chemical stability and solubility.

*Sci. Rep.***6**, 39101 (2016).Curve Fitting Toolbox Documentation — mathworks.com. https://www.mathworks.com/help/curvefit/. Accessed 24 Jul 2022.

Windig, W. & Guilment, J. Interactive self-modeling mixture analysis.

*Anal. Chem.***63**, 1425–1432 (1991).Windig, W. & Stephenson, D. A. Self-modeling mixture analysis of second-derivative near-infrared spectral data using the simplisma approach.

*Anal. Chem.***64**, 2735–2742 (1992).Yang, B., Hoober-Burkhardt, L., Wang, F., SuryaPrakash, G. K. & Narayanan, S. R. An inexpensive aqueous flow battery for large-scale electrical energy storage based on water-soluble organic redox couples.

*J. Electrochem. Soc.***161**, A1371–A1380 (2014).Murali, A. et al. Understanding and mitigating capacity fade in aqueous organic redox flow batteries.

*J. Electrochem. Soc.***165**, A1193–A1203 (2018).Tabor, D. P. et al. Mapping the frontiers of quinone stability in aqueous media: implications for organic aqueous redox flow batteries.

*J. Mater. Chem. A***7**, 12833–12841 (2019).Pasadakis-Kavounis, A., Baj, V. & Hjelm, J. Electrochemical characterization of aromatic molecules with 1, 4-diaza groups for flow battery applications.

*Molecules***26**, 2227 (2021).Liu, W. et al. A high potential biphenol derivative cathode: toward a highly stable air-insensitive aqueous organic flow battery.

*Sci. Bull.***66**, 457–463 (2021).Chaloner, K. & Verdinelli, I. Bayesian experimental design: a review.

*Stat. Sci.***10**, 273–304 (1995).Modak, S. & Kwabi, D. G. A zero-dimensional model for electrochemical behavior and capacity retention in organic flow cells.

*J. Electrochem. Soc.***168**, 080528 (2021).Neyhouse, B., Lee, J., & Brushett, F. Connecting material properties and redox flow cell cycling performance through zero-dimensional models.

*J. Electrochem. Soc.***169**, 090503 (2022).Murray, A. T., Voskian, S., Schreier, M., Hatton, T. A. & Surendranath, Y. Electrosynthesis of hydrogen peroxide by phase-transfer catalysis.

*Joule***3**, 2942–2954 (2019).Diederichsen, K. M., Liu, Y., Ozbek, N., SeoH., & Hatton, T. A. Toward solvent-free continuous-flow electrochemically mediated carbon capture with high-concentration liquid quinone chemistry.

*Joule*,**6**, 221–239 (2022).Zhang, Y. et al. High-performance lithium-air battery with a coaxial-fiber architecture.

*Angew. Chem. Int. Ed.***55**, 4487–4491 (2016).Zhang, Y. et al. Insights into an air-stable methylene blue catholyte towards kw-scale practical aqueous organic flow batteries.

*Energy Environ. Sci.***16**, 231–240 (2023).Hu, B., Luo, J., Hu, M., Yuan, B. & Liu, T. L. A ph-neutral, metal-free aqueous organic redox flow battery employing an ammonium anthraquinone anolyte.

*Angew. Chem. Int. Ed.***58**, 16629–16636 (2019).Zhang, C. et al. Phenothiazine-based organic catholyte for high-capacity and long-life aqueous redox flow batteries.

*Adv. Mater.***31**, 1901052 (2019).Jaynes, E. T. and Bretthorst, G.L.

*Probability theory: the logic of science*(Cambridge University Press, 2003).Andrieu, C., de Freitas, N., Doucet, A. & Jordan, M. I. An introduction to MCMC for machine learning.

*Mach. Learn.***50**, 5–43 (2003).Brooks, S., Gelman, A., Jones, G. and Meng, X.-L. editors.

*Handbook of Markov Chain Monte Carlo*. (Chapman and Hall/CRC, 2011).Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. H. & Teller, E. Equation of state calculations by fast computing machines.

*J. Chem. Phys.***21**, 1087–1092 (1953).Hastings, W. K. Monte Carlo sampling methods using Markov chains and their applications.

*Biometrika***57**, 97–109 (1970).Salvatier, J., Wiecki, T. V. & Fonnesbeck, C. Probabilistic programming in python using pymc3.

*PeerJ Comput. Sci.***2**, e55 (2016).Robert, C. P. & Casella, G.

*Monte Carlo Statistical Methods*. (Springer, 2004).Blei, D. M., Kucukelbir, A. & McAuliffe, J. D. Variational inference: a review for statisticians.

*J. Am. Stat. Assoc.***112**, 859–877 (2017).Maeder, M. et al. Evolving factor analysis for the resolution of overlapping chromatographic peaks.

*Anal. Chem.***59**, 527–530 (1987).Apra, E. et al. Nwchem: past, present, and future.

*J. Chem. Phys.***152**, 184102 (2020).Pritchard, B. P., Altarawy, D., Didier, B., Gibson, T. D. & Windus, T. L. New basis set exchange: an open, up-to-date resource for the molecular sciences community.

*J. Chem. Inf. Model.***59**, 4814–4820 (2019).Feller, D. The role of databases in support of computational chemistry calculations.

*J. Comput. Chem.***17**, 1571–1586 (1996).Klamt, A. & Schüürmann, G. J. G. J. Cosmo: a new approach to dielectric screening in solvents with explicit expressions for the screening energy and its gradient.

*J. Chem. Soc. Perkin Trans.***2**, 799–805 (1993).

## Acknowledgements

This work was funded by the National Science Foundation under Award Number 2033969. The research also used resources of the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231 using NERSC award BES-ERCAP0021451.

## Author information

### Authors and Affiliations

### Contributions

S.V.M., X.H. and D.G.K. designed the study; S.V.M. and F.O. conducted the experiments; W.S. performed Bayesian inference analysis; S.S. performed MCR-ALS analysis; D.H. conducted DFT calculations under the supervision of B.R.G.; D.G.K., X.H. and B.R.G. supervised and guided the research. All authors contributed towards the writing of this manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Peer review

### Peer review information

*Nature Communications* thanks the anonymous reviewer(s) for their contribution to the peer review of this work.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Modak, S.V., Shen, W., Singh, S. *et al.* Understanding capacity fade in organic redox-flow batteries by combining spectroscopy with statistical inference techniques.
*Nat Commun* **14**, 3602 (2023). https://doi.org/10.1038/s41467-023-39257-z

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41467-023-39257-z

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.