Brought to you by:

The Deep-Prior Distribution of Relaxation Times

and

Published 9 January 2020 © 2020 The Electrochemical Society ("ECS"). Published on behalf of ECS by IOP Publishing Limited
, , Citation Jiapeng Liu and Francesco Ciucci 2020 J. Electrochem. Soc. 167 026506 DOI 10.1149/1945-7111/ab631a

1945-7111/167/2/026506

Abstract

Electrochemical impedance spectroscopy (EIS) is the established tool for the study of many electrochemical experiments. While the analysis of EIS data is challenging, this can be assisted by the distribution of relaxation time (DRT) method. However, obtaining the DRT is difficult as the underlying problem is ill-posed. Inspired by recent advances in image analysis, we develop a completely new approach, named the deep prior distribution of relaxation time (DP-DRT), for the deconvolution of the EIS to obtain the DRT. The DP-DRT uses a deep neural network fed with a single random input to deconvolve the DRT and fit the EIS data. The DP-DRT has the peculiarity of having a number of parameters much larger than the number of observations. Further, unlike most supervised deep learning models, large datasets are not needed as the DP-DRT is trained against a single available EIS spectrum. The DP-DRT was successfully tested against both synthetic and real experiments displaying considerable promise and opportunities for extensions.

Export citation and abstract BibTeX RIS

Electrochemical impedance spectroscopy (EIS) is one of the experimental techniques most frequently used in electrochemistry.14 This technique has several well-known strengths. First, it is relatively easy to implement. Second, it gives high precision measurements. And third, it provides data across a wide range of frequencies (from mHz to MHz).5 For these reasons, this technique has been used in many diverse applications including batteries,610 supercapacitors,11 solar cells,12 membranes,13 electrolyzers,14 fuel cells,15,16 medicine,17 and biology.18

In a typical EIS experiment, one takes an electrochemical system at steady-state and perturbs it with a small sinusoidal voltage (or current) with a given frequency. By measuring the current (or voltage) and repeating the same procedure for a given frequency range, the EIS spectrum can be obtained.1 In short, the EIS technique measures a voltage-to-current transfer function.5 In spite of the considerable power of this method, it is difficult to interpret EIS data because a model is needed.19 A common approach is to fit the EIS spectra against networks of elementary circuits. However, one should note that often the circuit networks are just analogs, which may lack uniqueness and physical meaning.2 Physical models of EIS data would be ideal, but they are problem-specific and can be computationally complex.2024 Furthermore, even if a physical model is available, there is no guarantee that it can capture the entire physics of the electrochemical systems at hand. One alternative to these conventional methodologies is to use the distribution of relaxation times (DRT),2532 which interprets the impedance as resulting from a distribution of relaxation timescales, i.e.

Equation (1)

where ${Z}_{{\rm{DRT}}}$ is the impedance, $f$ is the frequency, $\gamma \left(\mathrm{ln}\,\tau \right)\geqslant 0$ is the DRT, $\tau $ is a timescale variable, ${R}_{\infty }$ is a resistance, and ${L}_{0}$ is an inductance. The DRT model has proven to be very powerful, and recently this method has been employed to understand the fundamentals of solid-state ionic systems,33,34 batteries,3538 supercapacitors,39,40 porous electrochemical reactors,41 dielectrics,42 solar cells,43 and fuel cells.4447 These applications have highlighted the promise of DRT models. However, there are still issues. The primary challenge is the estimation of the function $\gamma (\mathrm{ln}\,\tau )$ because the deconvolution problem is ill-posed and depends very strongly on the experimental errors. To overcome this issue, Fourier,48,49 evolutionary,39,50,51 Monte Carlo,52 maximum entropy,53 probability-,54 and regression-based5561 inversion methods have been developed. Among these approaches, regularized regression (RR) is perhaps the most popular and efficient. In general terms, RR consists of minimizing, with respect to a vector of DRT values ${\boldsymbol{\gamma }}=\,{\left(\gamma \left(\mathrm{ln}{\tau }_{1}\right),\gamma \left(\mathrm{ln}{\tau }_{2}\right),\ldots ,\gamma \left(\mathrm{ln}{\tau }_{M}\right)\right)}^{\top },$ a loss function $ {\mathcal L} \left({\boldsymbol{\gamma }}\right)$ defined as

Equation (2)

where ${Z}_{\exp }\left({f}_{n}\right)$ is the experimental impedance measured at the frequencies ${f}_{n}$ with $n=1,\,2,\ldots N,$ ${Z}_{{\rm{DRT}}}\left({\boldsymbol{\gamma }},{f}_{n}\right)$ is an approximation of (1), and $P\left(\gamma \right)$ is some penalty function multiplied by a parameter $\lambda .$ While RR is relatively well established and can be linked to, and extended by, Bayesian statistics,62,63 it has the drawback of depending on the parameter $\lambda $ which biases the estimation of $\gamma .$56 In light of this, more extensions of this method are needed. In this work, we do that by assuming ${\boldsymbol{\gamma }}$ to be the output of a deep neural network (DNN). We should point the reader that from (1) to (2) the notation of ${Z}_{{\rm{DRT}}}$ changed slightly. In (1), we assumed that the impedance depended on the function $\gamma (\mathrm{ln}\,\tau )$ and therefore we wrote ${Z}_{{\rm{DRT}}}\left(\gamma (\mathrm{ln}\,\tau ),\,f\right).$ Instead, in (2) we wrote, consistent with our earlier works,56,60,62,63 that the impedance of the DRT model depends on the vector ${\boldsymbol{\gamma }},$ whose entries correspond to the $\gamma (\mathrm{ln}\,\tau )$ evaluated at certain collocation timescales ${\tau }_{m}$ with $m=1,\,2,\ldots ,\,M.$ We will use the notation employed in (2) for the remainder of this article.

A seminal work by Ulyanov and co-workers on the deep image prior (DIP) has shown that a DNN with a random input can be trained against a single data point to perform image denoising, inpainting, and super-resolution.64 The DIP results are particularly striking for two reasons. First, they suggest that a DNN architecture without the pretraining on a large dataset is sufficient for image enhancement. Second, the DNN used by the DIP is heavily over parametrized, and, surprisingly, this property does not prevent improving images.65 In short, the DIP methodology suggests that the image characteristics (i.e. an image prior) can be directly encoded in the DNN architecture and a training dataset may not be needed for specific problems.66

Inspired by the flurry of results following this contribution and, in particular, its application to inverse problems, we adapted the DIP philosophy to develop the deep-prior distribution of relaxation times (DP-DRT).6672 In short, we did not assume that $N,$ the number of frequencies probed experimentally, has the same order of magnitude of the number $M,$ the number of collocation points used to approximate $\gamma \left(\mathrm{ln}\,\tau \right).$ Instead, we took ${\boldsymbol{\gamma }}$ to be the output of a DNN that depends on a rather large number of parameters. This is shown schematically in Fig. 1, where a DNN depends on (i) a set of weights and biases, which are written as a parameter vector ${\boldsymbol{\theta }}\in {{\mathbb{R}}}^{Q}$ with $Q\gg N,\,M;$ and (ii) on the chosen activation functions schematically displayed as colored circles. The key idea of the newly developed DP-DRT (DPλ-DRT) is to minimize the loss function (2) with $\lambda =$ 0 ($\lambda \geqslant {\lambda }_{0}\gt 0$ where ${\lambda }_{0}$ is the lower bound of $\lambda $) with respect to the large parameter vector ${\boldsymbol{\theta }}\,$ rather than ${\boldsymbol{\gamma }}\in {{\mathbb{R}}}^{M}.$ Using a simple and relatively shallow DNN, we found that the DP-DRT can perform inversion surprisingly well even without regularization. The DP-DRT method can capture overlapping features and discontinuities in the DRT, as well as significant noise in the experimental data. Furthermore, the DP-DRT can deconvolve experimental impedances with outcomes comparable to those of Bayesian methods. These results are particularly remarkable as we did not optimize the DNN architecture in this work.

Figure 1.

Figure 1. Schematic depiction of the DP-DRT model, a random scalar input is fed into a DNN, regression is used to obtain the network parameters and estimate the impedance. The activation functions are indicated with different colors (blue: ELU; orange: softmax).

Standard image High-resolution image

In the remaining sections, we will first outline the DP-DRT method. Following that, we will show the results obtained with stochastic experiments whose purpose is to assess the consistency and robustness of the approach. Then, the deconvolution results from the DP-DRT of actual real experiments will be discussed and compared to some reference results. Finally, an outlook for future research in this exciting field will be provided.

Theory

The deep distribution of relaxation times

For the DRT deconvolution, we aim at solving an inverse problem. That is, given an experimental data vector, ${{\boldsymbol{Z}}}_{\exp }={\left({Z}_{\exp }\left({f}_{1}\right),{Z}_{\exp }\left({f}_{2}\right),\ldots {Z}_{\exp }\left({f}_{N}\right)\right)}^{\top },$ we want to determine a latent vector ${\boldsymbol{\gamma }}=\,{\left(\gamma \left(\mathrm{ln}{\tau }_{1}\right),\gamma \left(\mathrm{ln}{\tau }_{2}\right),\ldots ,\gamma \left(\mathrm{ln}{\tau }_{M}\right)\right)}^{\top }$ such that

Equation (3)

where ${{\boldsymbol{A}}}_{{\rm{re}}}$ and ${{\boldsymbol{A}}}_{{\rm{im}}}$ are suitable matrices described elsewhere,56 ${\boldsymbol{v}}$ is a vector-valued function dependent on the two scalar parameters ${R}_{\infty }$ and ${L}_{0}$ in (1) (i.e. ${\boldsymbol{v}}={R}_{\infty }1+i\,{L}_{0}\,{\boldsymbol{f}}$ with $1={\left(1,1,\ldots ,1\right)}^{\top }$ and ${\boldsymbol{f}}={\left({f}_{1},{f}_{2},\ldots ,{f}_{N}\right)}^{\top }$), and ${\boldsymbol{\eta }}$ denotes the measurement noise. As already outlined and shown elsewhere,54,56,60,62,63 this linear model is an approximation of (1). The key contribution of this article is to take $\gamma $ to be the output of a DNN. $\gamma $ is a vector-valued function of a random input $\zeta $ which depends on a set of parameters ${\boldsymbol{\theta }}\in {{\mathbb{R}}}^{Q}$ with $Q\gg N,M.$

If ${R}_{\infty }$ and ${L}_{0}$ are also outputs of the DNN, i.e., ${R}_{\infty }=\,{R}_{\infty }\left(\zeta ,{\boldsymbol{\theta }}\right),$ ${L}_{0}={L}_{0}\left(\zeta ,{\boldsymbol{\theta }}\right),$ and ${\boldsymbol{v}}={\boldsymbol{v}}\left(\zeta ,{\boldsymbol{\theta }}\right).$ We can use (3) to write the loss function (2) as

Equation (4)

where ${\parallel .\parallel }_{2}$ is the crm.

Implementation

For all simulations, we set the $\tau =1/f$ ($M=N$) and chose a relatively simple DNN, see Fig. 1, consisting of 4 layers with (i) a random input $\zeta ;$ (ii) an output layer of dimension $N+1,$ $N+2,$ or $N+3$ depending on the total number of parameters outputted (i.e., $N$ for $\gamma $ and the remaining for ${R}_{\infty },$ ${L}_{0},$ and $\lambda $); and (iii) 2 hidden layers of the width $N.$ The activation functions were chosen to be non-saturating exponential linear (ELU) units73 for the first three layers and a softmax ($\beta =5$) for the last layer. The weights and biases were initialized using the Xavier uniform method74 and to zero, respectively. Furthermore, the parameters of the network ${\boldsymbol{\theta }}$ were optimized using the Adam algorithm75 with a learning rate of 10−5 and a maximum of 100,000 iterations. Also, early stopping (i.e. the iterations stop when the absolute value of the variation of the loss is less than 10−8) was used.76 The input $\zeta $ was chosen randomly from a normal distribution with zero mean and unitary standard deviation, i.e. $\zeta \sim {\mathscr{N}}\left(0,1\right).$ The code was implemented with PyTorch77 and all simulations were run on a GeForce RTX 2060 GPU.

Stochastic experiments

The stochastic experiments were generated by corrupting the "exact" impedances with random Gaussian noise, see (3), with

Equation (5)

where ${\left({{\boldsymbol{\eta }}}_{{\rm{re}}}\right)}_{k}$ and ${\left({{\boldsymbol{\eta }}}_{{\rm{im}}}\right)}_{k}$ ($k=1,\cdots ,N$) are independent normal random variables of zero mean and variance ${\sigma }_{n}^{2},$ i.e. ${\left({{\boldsymbol{\eta }}}_{{\rm{re}}}\right)}_{k},\,{\left({{\boldsymbol{\eta }}}_{{\rm{im}}}\right)}_{k}\sim {\mathscr{N}}\left(0,{\sigma }_{n}^{2}\,\right).$ The chosen frequencies ranged from ${10}^{-4}$ to ${10}^{4}$ Hz with 10 points per decade corresponding to $N=$ 81. As already mentioned above, the DRT was evaluated at $\tau =1/f,$ implying that $M=N.$ Correspondingly, $Q=$ 20170, 20252, or 20334 if the DNN outputs either $\left(\gamma ,{R}_{\infty }\right),$ $\left(\gamma ,{R}_{\infty },{L}_{0}\right)$ or $\left({\boldsymbol{\gamma }},{R}_{\infty },\lambda \right),$ or $\left(\gamma ,{R}_{\infty },{L}_{0},\,\lambda \right),$ respectively. The models used for the ${Z}_{{\rm{exact}}}\left(f\right),$ the noiseless part of (3), are reported in Table I with the corresponding parameters listed in Table II.

Table I.  "Exact" impedances and DRTs used in the stochastic experiments.

Model $Z\left(f\right)$ $\gamma \left(f\right)$ Notes Reference
ZARC ${R}_{\infty }+\displaystyle \frac{{R}_{ct}}{1+{\left(i2\pi f{\tau }_{0}\right)}^{\phi }}$ $\displaystyle \frac{{R}_{ct}}{2\pi }\displaystyle \frac{\sin \left(\left(1-\phi \right)\pi \right)}{\cosh \left(\phi \,\mathrm{ln}\left(\displaystyle \frac{\tau }{{\tau }_{0}}\right)\right)-\,\cos \left(\left(1-\phi \right)\pi \right)}$   [4]
2-ZARCs ${R}_{\infty }+\displaystyle \frac{{R}_{{\rm{ct}}}}{1+{\left(i2\pi f{\tau }_{0}\right)}^{\phi }}+\displaystyle \frac{{R}_{{\rm{ct}}}}{1+{\left(i2\pi f{\tau }_{1}\right)}^{\phi }}$ $\displaystyle \frac{{R}_{ct}}{2\pi }\,\sin \left(\left(1-\phi \right)\pi \right)\left(\displaystyle \frac{1}{\cosh \left(\phi \,\mathrm{ln}\left(\displaystyle \frac{\tau }{{\tau }_{0}}\right)\right)-\,\cos \left(\left(1-\phi \right)\pi \right)}\,+\displaystyle \frac{1}{\cosh \left(\phi \,\mathrm{ln}\left(\displaystyle \frac{\tau }{{\tau }_{1}}\right)\right)-\,\cos \left(\left(1-\phi \right)\pi \right)}\right)$   [4]
Havriliak-Negami ${R}_{\infty }+\displaystyle \frac{{R}_{{\rm{ct}}}}{{\left(1+{\left(i2\pi f{\tau }_{0}\right)}^{\phi }\right)}^{\psi }}$ $\displaystyle \frac{{R}_{{\rm{ct}}}}{\pi }\displaystyle \frac{{\left(\displaystyle \frac{\tau }{{\tau }_{0}}\right)}^{\phi \psi }\,\sin \left(\psi \theta \right)}{{\left({\left(\displaystyle \frac{\tau }{{\tau }_{0}}\right)}^{2\phi }+2{\left(\displaystyle \frac{\tau }{{\tau }_{0}}\right)}^{\phi }\cos \left(\pi \phi \right)+1\right)}^{\displaystyle \frac{\psi }{2}}}$ ${\rm{\theta }}=\arctan \left|\displaystyle \frac{\sin \left(\pi \phi \right)}{{\left(\displaystyle \frac{\tau }{{\tau }_{0}}\right)}^{\phi }+\,\cos \left(\pi \phi \right)}\right|$ [78]
Piece-wise Constant ${R}_{\infty }+\displaystyle \frac{{R}_{{\rm{ct}}}}{\mathrm{ln}\,\displaystyle \frac{{\tau }_{1}}{{\tau }_{0}}}\left(\mathrm{ln}\left(1-\displaystyle \frac{i}{2\pi f{\tau }_{0}}\right)-\,\mathrm{ln}\left(1-\displaystyle \frac{i}{2\pi f{\tau }_{1}}\right)\right)$ $\displaystyle \frac{{R}_{{\rm{ct}}}}{\mathrm{ln}\,\displaystyle \frac{{\tau }_{1}}{{\tau }_{0}}}\left(H\left(\tau -{\tau }_{0}\right)-H\left(\tau -{\tau }_{1}\right)\right)$ $H\left(\tau \right)$ is the Heaviside function [62]
Fractal ${R}_{\infty }+\displaystyle \frac{{R}_{{\rm{ct}}}}{{\left(1+i2\pi f{\tau }_{0}\right)}^{\phi }}$ $\gamma \left(\tau \right)=\left\{\begin{array}{cc}\displaystyle \frac{{R}_{{\rm{ct}}}}{\pi }\,\sin \left(\phi \pi \right){\left(\displaystyle \frac{\tau }{{\tau }_{0}-\tau }\right)}^{\phi } & \,{\rm{if}}\,\tau \lt {\tau }_{0}\\ 0 & {\rm{otherwise}}\end{array}\right.$   [56]

Table II.  Values of the parameters used in the stochastic experiments.

Parameter Numerical Value
ZARC 2 ZARCs Havriliak-Negami Piecewise Constant Fractional
${R}_{\infty }$ 10 Ω 10 Ω 10 Ω 10 Ω 10 Ω
${R}_{{\rm{ct}}}$ 50 Ω 50 Ω 50 Ω 50 Ω 50 Ω
${\tau }_{0}$ 1 s 0.1 s 1 s 10 s 1 s
$\phi $ 0.8 0.8 0.8   0.6
$\psi $     0.9    
${\tau }_{1}$ 1 s or 10 s 0.1 s
           

Results

Stochastic experiments

We conducted stochastic experiments to validate the methodology against cases where impedance, DRT, as well as the noise level, are known. First, we will illustrate the DP-DRT framework. Then, we will show that the method can deconvolve spectra with overlapping timescales. After that, we will discuss the inclusion of a regularizing parameter as the output of the network and analyze the influence of noise level ${\sigma }_{n}.$ Lastly, we will demonstrate that the DP-DRT can deconvolve elements with discontinuous timescale distributions.

An introductory example

Our investigation started with an illustrative example. We drew the EIS of a single ZARC element with ${\sigma }_{n}=0.1\,{{\rm{\Omega }}}^{\displaystyle \frac{1}{2}}$ as shown in Fig. 2a. Again, the reader can find the analytical formulas and the parameters used in Table I and Table II, respectively. Then, we minimized the loss $ {\mathcal L} \left({\boldsymbol{\theta }}\right),$ see (4). The loss, which is plotted as a function of the iteration number (iter) in Fig. 2c, decreases with increasing iteration number and so does the error defined as

Equation (6)

and shown in Fig. 2d. Two vertical dashed lines are plotted in Fig. 2d and correspond to the early stopping and minimum error or optimal iteration. We also compared the $\gamma \left(\mathrm{ln}\,\tau \right)$'s obtained at those two iterations, see Fig. 2b. Both early-stopping and optimal values are capable of closely matching the EIS and the exact DRT, where only small ridges are present at the base of the $\gamma \left(\mathrm{ln}\,\tau \right),$ i.e., for 10−2 $\leqslant \,\tau /s\,\leqslant $ 10−1 and 101 $\leqslant \tau /s\,\leqslant $ 102.

Figure 2.

Figure 2. (a) Nyquist plot of the EIS of a circuit consisting of a resistor in series with a single ZARC element (the synthetic experiment and the DP-DRT impedance are shown) and (b) corresponding exact and recovered DRTs. (c) Evolution of the loss and (d) error as a function of iteration number; iteration corresponding to early stopping and minimum error are indicated with the 'early stop' and 'optimal' labels, respectively.

Standard image High-resolution image

Overlapping timescales

We then tested if the method can recover the DRT and EIS of two partially overlapping ZARC elements. The Nyquist plots of the two EIS spectra can be found in Figs. 3a and 3c with the parameters from Table II. The DP-DRT recovers closely the exact EIS. The $\gamma \left(\mathrm{ln}\,\tau \right)$ can be obtained with a similarly limited discrepancy, as shown in Figs. 3b and 3d.

Figure 3.

Figure 3. (a) and (c) Nyquist plot of the EIS of a circuit consisting of a resistor in series with two ZARCs. In (b) and (d) the corresponding exact and recovered DRTs are shown.

Standard image High-resolution image

DPλ-DRT: ridge regression with the DP-DRT

As proposed by Ulyanov and co-workers,64 adding a regularizing term to the loss can enhance images obtained by the DIP. In that regard, Dittmer and co-workers68 suggested to output $\lambda $ from the network itself, where the optimal value is obtained by applying L-curve-like criterion. We attempted to implement a variation of what was proposed in these two articles and added to the loss an approximation of $\gamma \left(\mathrm{ln}\,\tau \right)$'s 2nd derivative.19,56,62,63 Furthermore, we set $\lambda \,\geqslant $ 10−6. We note that early stopping was still used. As shown in Fig. 4, this procedure leads only to a slight visual improvement in the recovered $\gamma $ and ${\boldsymbol{Z}}$ because the regularizing parameter monotonically decreased to 10−6 with the number of iterations. A similar improvement cannot be seen if the lower positive bound on $\lambda $ is not present (i.e. $\lambda \,\geqslant $ 0) as $\lambda \to 0$ with ${\rm{iter}}\to \infty .$

Figure 4.

Figure 4. (a) Nyquist plot of the EIS and (b) DRT obtained using the DPλ-DRT method. (c) Evolution of loss and error as a function of iteration with the early stop value shown. (d) Value of λ as outputted by the DNN vs iteration number.

Standard image High-resolution image

Increasing the noise

One may wonder what happens to the DP-DRT method if the experimental noise intensifies. We have tested this by increasing ${\sigma }_{n}$ by one order of magnitude to ${\sigma }_{n}=1\,{{\rm{\Omega }}}^{\tfrac{1}{2}}.$ This choice leads to heavily corrupted EIS spectra, as shown in Fig. 5a. The DP-DRT method can still recover the function $\gamma (\mathrm{ln}\,\tau )$ well but a few additional ridges are triggered by the extra noise. It is important to note that, as shown in Fig. 5b, early stopping corresponds to an iteration where the error is near its minimum. As the number of iterations increases, overfitting of ${\boldsymbol{Z}}$ is expected to occur, leading to an increased error on the latent ${\boldsymbol{\gamma }}.$ If we perform the same procedure with smoothing by using the DPλ-DRT with $\lambda \,\geqslant $ 0.1, the recovered DRT does not show any ridges, see Fig. 5d. However, both the loss and the error increase as shown in Fig. 5f. We must stress that a large $\lambda ,$ i.e., $\lambda \,\geqslant $ 0.1 was chosen in order to emphasize the impact of the regularizing term.

Figure 5.

Figure 5. (a) and (b) Noisy EIS (${\sigma }_{n}^{\exp }=1\,{{\rm{\Omega }}}^{\tfrac{1}{2}}$) and recovery obtained using the DP-DRT and DPλ-DRT ($\lambda \geqslant 0.1$) methods, respectively. (c) and (d) DRT obtained using DP-DRT and DPλ-DRT ($\lambda \geqslant 0.1$) methods, respectively. In (e) and (f), loss and error are shown vs the iteration number; the iteration corresponding to the early stopping is also indicated.

Standard image High-resolution image

Repeating the same inversion procedure numerous times can help assess the robustness of the approach, which was conducted by performing 1,000 stochastic experiments under the same hypotheses as above. These experiments were followed by DP-DRT inversion with early stopping. In Fig. 6a, we plot the mean DP-DRT and the 5 and 95% confidence bands. It can be observed that the DRT shape is well captured, albeit with some scatter, especially near the peak, indicating strong sensitivity to noise at that location. Further, Fig. 6b plots the probability distribution function (PDF) of the relative error defined as ${\rm{rel}}.\,{\rm{error}}({\rm{iter}})={\parallel \gamma (\zeta ,{{\boldsymbol{\theta }}}_{{\rm{iter}}})-{\gamma }_{{\rm{exact}}}\parallel }_{2}/{\parallel {\gamma }_{{\rm{exact}}}\parallel }_{2}.$ Consistent with the data shown in Fig. 6a, Fig. 6c indicates that the relative error has a broad distribution. For comparison, Fig. 6b shows the outcome of the DPλ-DRT deconvolution of the same stochastic experiments with the DRT appearing to be smoother. In contrast with the outcome of the DP-DRT (without $\lambda $), the recovered $\gamma \left(\mathrm{ln}\,\tau \right)$ is insensitive to the noise, showing a narrow distribution for the relative error, see Fig. 6d. This is consistent with intuition: because of the large additional penalty of $\lambda \geqslant 0.1$, the bias is large, but the variance is small.

Figure 6.

Figure 6. Outcome of 1000 synthetic experiments carried out using an identical setting as the ones shown in Fig. 5. In (a) and (b) the 'exact' DRT is reported together with the average DRT and the corresponding 95% confidence bands as obtained using the DP-DRT and DPλ-DRT ($\lambda \geqslant 0.1$) methods, respectively. (c) and (d), corresponding distributions of the relative errors.

Standard image High-resolution image

Deconvolving non-conventional distributions of relaxation times

We also tested whether the DP-DRT method can be used to fit non-conventional elements, whose DRT displays discontinuities and infinite values. For this reason, the EIS was computed for three circuits corresponding to the Havriliak-Negami (HN),78 piecewise constant (PWC),62 and fractal56 models. Then, the 'exact' impedance was corrupted with noise according to (4) with ${\sigma }_{n}=0.1\,{{\rm{\Omega }}}^{\tfrac{1}{2}},$ see Fig. 7. As shown there, the DP-DRT is able to recover both $Z\left(f\right)$ and $\gamma \left(\mathrm{ln}\,\tau \right)$ well. This is evident for the HN and PWC elements, see Figs. 7a–7d. For the fractal element, whose impedance and DRT are shown in Figs. 7e and 7f, respectively, oscillations are visible for $\tau \,\leqslant $ 1 s, though the timescale corresponding to the discontinuity appears to be captured well. We carried out identical stochastic experiments for a higher noise level by increasing ${\sigma }_{n}$ to ${\rm{0}}\mathrm{.5}\,{{\rm{\Omega }}}^{\displaystyle \frac{1}{2}}.$ As reported in Fig. 8, increasing the random experimental error does not affect the recovery of the EIS significantly, but more oscillations appear in the deconvolved $\gamma \left(\mathrm{ln}\,\tau \right).$ These simulation results are consistent with the analysis outlined above.

Figure 7.

Figure 7. (a), (c), and (e) Nyquist plots of the EIS response of the HN, PWC, and fractal models, respectively. (b), (d), and (f) corresponding DRTs obtained using the DP-DRT method. ${\sigma }_{n}^{\exp }$ was set at 0.1 ${{\rm{\Omega }}}^{\tfrac{1}{2}}.$

Standard image High-resolution image
Figure 8.

Figure 8. (a), (c), and (e) Nyquist plots of the EIS response of the HN, PWC, and fractal models, respectively. (b), (d), and (f) corresponding DRTs obtained using the DP-DRT approach. ${\sigma }_{n}^{\exp }$ was set at 0.5 ${{\rm{\Omega }}}^{\tfrac{1}{2}}.$

Standard image High-resolution image

We also studied the performance of the DP-DRT and DPλ-DRT models for sharp DRTs by choosing similar synthetic experiments as those reported in An introductory example where the key differences are the number of collocation point $N=$ 161 and $\phi $ either 0.9 or 0.99. For $\phi \,=$ 0.9, DP-DRT and DPλ-DRT models can match the exact DRT well, Fig. S3. If instead $\phi \,=\,$0.99, the timescale resolution is not sufficient to capture the peak value ( ∼500 ${\rm{\Omega }}$) as shown in Figs. S3d and S4d. Unsurprisingly, $\gamma \left(\mathrm{ln}\,\tau \right)$ obtained by DPλ-DRT deconvolution displays a broader peak width than that from the DP-DRT, see Fig. S5. This difference is due to the penalty used and can be overcome using lasso regularization.56

Real experiments

After testing the consistency of the DP-DRT methodology, we also tested its performance on real experimental data. First, the EIS measurement performed on a symmetrical SOFC cell was analyzed, then the DRT from the EIS of a full Li-ion battery was deconvolved. Depending on whether the regularization term $\lambda $ is added to the network, the total number of parameters is $Q\,=\,$ 24298 or 24388, and $Q\,=$ 20170 or 20252 for the SOFC and LIB EIS, respectively.

SOFC cathode

We first analyzed an EIS spectrum obtained by testing a symmetrical solid oxide fuel cell (SOFC). For comparison, the EIS is repeated in the Nyquist plots shown in Figs. 9a–9c. 15% Samarium-doped ceria was used as the electrolyte and sandwiched between two electrodes consisting of a mixture of Ag and Ba0.9La0.1FeO3−δ.79 The data was collected at 650 °C in a mixture of N2 and O2 (${p}_{{O}_{2}}=$ 0.21 atm) in the frequency range from 0.1 Hz to 8.56 × 104 Hz with 15 points per decade.

Figure 9.

Figure 9. (a), (b), and (c), Nyquist plot of the EIS of the symmetrical SOFC and DP-DRT and DPλ-DRT impedance models shown. (a), (d), and (g) outcome of the DP-DRT deconvolutions. DPλ-DRT model is shown in the remaining panels with λ ≥ 0.001 in (b), (e), and (h) and λ ≥ 0.01 in (c), (f), and (i). (d), (e), and (f). ECM reference is given in panels (d), (e), and (f). (g), (h), and (i), evolution of the loss and the discrepancy against the ECM reference, the early stopping iteration is indicated with a labeled vertical line.

Standard image High-resolution image

We first modeled the experimental data with an equivalent circuit model (ECM) consisting of a ZARC element plus an inductance. The parameters estimated by regression are listed in Table III. The fitted EIS and obtained DRT are shown in Figs. S1a and S1b (available online at stacks.iop.org/JES/167/026506/mmedia), respectively. The EIS obtained by DP-DRT without regularization is shown in Fig. 9a. The corresponding $\gamma \left(\mathrm{ln}\,\tau \right)$ is plotted in Fig. 9d, where, for reference, the DRT of the ECM54,60 is also shown. The DP-DRT method can recover well both the impedance and the DRT even without regularization. This is shown in Fig. 9g, where the loss (4) and the discrepancy are defined as

Equation (7)

are plotted as a function of the iteration number. We further report the DPλ-DRT results obtained by setting $\lambda \,\geqslant $ 10−3, see Figs. 9b, 9e, and h, and $\lambda \,\geqslant \,$10−2, see Figs. 9c, 9f, and 9i. Consistent with intuition, the small ridges present in the DP-DRT deconvolution could be smoothed out by including a regularizer. Unsurprisingly, the larger the lower bound on λ is, the more prominent the loss. We should note again that no exact DRT is available, and the discrepancy between DP-DRT and ECM-based distribution serves only as a reference. To compare the performance of different models, we also calculated the mean squared error (MSE) defined as

Equation (8)

with the results shown in Table SI. The DP-DRT method performed best with the lowest MSE value. In contrast, the ECM had the largest MSE among all four models.

Table III.  Parameters of the ECM (a single ZARC element plus an inductance) used to fit the SOFC experiment and corresponding numerical values obtained by regression. The error of each parameter outputted by ZView is also shown.

Parameter Regressed value Error
${R}_{\infty }$ 1.81 Ω 4.32 × 10-4 Ω
${R}_{{\rm{ct}}}$ 0.26 Ω 5.56 × 10-4 Ω
${\tau }_{0}$ 2.19 × 10-4 s 1.31 × 10-5 s
$\phi $ 0.69 2.42 × 10-3
${L}_{0}$ 5.36 × 10-7 H 1.37 × 10-9 H

LIB experiment

We also tested the DP-DRT model using lithium-ion battery (LIB) data taken from our earlier works.54,56,63 An ECM consisting of a series of 3 ZARCs and an inductance was used to model the experimental EIS.54 The parameters of the ECM are listed in Table IV, and the corresponding EIS spectra and DRT are shown in Figs. S2a and S2b, respectively. It is important to note that, as shown in Fig. S2a, the real and imaginary parts of the spectra are in the 0.11 to 0.16 Ω and 0 to 0.016 Ω range, respectively. Since the simulations are carried out in a single-precision floating-point format, the data was scaled to unity to avoid underflow or loss of accuracy. The results were then scaled back to the original values. Similar to the SOFC experiment, the DP-DRT without regularization can fit well to the impedance data, see Fig. 10a. Regarding the DRTs for low enough $\tau $'s, the DP-DRT does not have obvious discrepancies with respect to the DRT reference obtained from the ECM, as the two leftmost peaks of the ECM-DRT can be recovered well, see Fig. 10d. For the rightmost peak, which corresponds to the lowest frequencies probed, and whose corresponding arc is incomplete (see Fig. 10a) the DP-DRT recovery is inconsistent with that obtained with the ECM-based DRT. However, we believe that this is reasonable, especially considering that the uncertainty on any estimate obtained from that part of the EIS spectrum is expected to be high. If the MSE is used as a metric for evaluating the quality of the model, we note that DP-DRT performs better than the ECM, see Table SI.

Table IV.  Parameters of the ECM (3 ZARC elements) used to fit the LIB experiment and corresponding numerical values as obtained by regression. The error of each parameter outputted by ZView is also shown.

Parameter Regressed value Error
${R}_{\infty }$ 0.11 Ω 4.44 × 10-4 Ω
${R}_{{\rm{ct}},1}$ 1.69 × 10-2 Ω 8.48 × 10-4 Ω
${R}_{{\rm{ct}},2}$ 2.12 × 10-2 Ω 4.42 × 10-4 Ω
${R}_{{\rm{ct}},3}$ 5.23 × 10-2 Ω 1.89 × 10-3 Ω
${\tau }_{1}$ 2.34 × 10-3 s 1.23 × 10-3 s
${\tau }_{2}$ 0.20 s 1.08 × 10-2 s
${\tau }_{3}$ 75.30 s 2.33 s
${\phi }_{1}$ 0.54 2.31 × 10-2
${\phi }_{2}$ 0.94 7.78 × 10-3
${\phi }_{3}$ 0.79 1.03 × 10-2
${L}_{0}$ 7.61 × 10-7 H 3.64 × 10-8 H
Figure 10.

Figure 10. (a), (b), and (c), Nyquist plot of the EIS of the LIB and DP-DRT and DPλ-DRT impedance models shown. (a), (d), and (g), results of the DP-DRT deconvolutions. DPλ-DRT model is shown in panels (b), (e), and (h) with λ ≥ 0.001 and in (c), (f), and (i) with λ ≥ 0.01. ECM reference is also displayed in (d), (e), and (f). (g), (h), and (i), evolution of the loss and the discrepancy between predicted DRT and the ECM reference, the early stopping is labeled with a vertical line.

Standard image High-resolution image

As conducted for the SOFC deconvolution of subsection 3.2.1, we computed the DPλ-DRT by setting $\lambda \geqslant $ 10−3 (Figs. 10b, 10e, and 10h) and $\lambda \geqslant \,$10−2 (Figs. 10c, 10f, and 10i). Consistent with our earlier insight, the predicted DRT curves are smoother than without regularization. Further, the loss increases if regularization is included affecting the recovered impedance. We point the reader to Fig. 10c where at around $f\,\sim \,$11 Hz corresponding to the DPλ-DRT with $\lambda \,\sim \,$10−2; deviations in both EIS and DRT can be observed. For the largest $\lambda ,$ the loss and MSE are also the largest among the cases studied, see Fig. 10i and Table S1. It should again be stressed that the DRT obtained from the ECM is only a reference and the "exact" DRT is unknown.

Future Work

We have shown that the DP-DRT model, whose underlying DNN is a function of the network input $\zeta $ and is parameterized with respect to ${\boldsymbol{\theta }}\in {{\mathbb{R}}}^{Q}$ with $Q\gg N,$ can recover the EIS and DRT well. Despite the surprising result, several questions remain. For example, can we optimize the DNN architecture? One potential direction for that would be to include filtering, in the form of a 1D convolutional neural network or a U-net80 as originally used by Ulyanov and co-workers.64 Another interesting direction would be the study of under-parametrized networks with $Q\ll N$ as done by Heckel and Hand.72 In principle, one could obtain a reasonable DRT deconvolution from a network with a scalar random input and a single layer without bias (this corresponds to $Q=N+1$), as shown in Fig. 11. For that, we tested a single ZARC model as implemented in Fig. 2(a) with ${\sigma }_{n}^{\exp }\,=$ 0.5 ${{\rm{\Omega }}}^{\tfrac{1}{2}}.$ The inverse problem solution obtained using conventional quadratic programming (QP)56,60,62 without regularization is shown for reference in Fig. 11a. The results with a single-layer neural network without bias are shown in Figs. 11b, 11c, and 11d, where no activation function, a leaky ReLU activation, and a softplus activation were used, respectively. While the lack of activation function leads to severe oscillations, the inclusion of an activation function together with early stopping has a smoothing effect, allowing the capture of the main peak of the impedance. Starting from these preliminary results, a thorough investigation of the role of DNN architecture, activation function, early stopping cutoff, and single-precision arithmetic should follow the present work.

Figure 11.

Figure 11. Recovered DRT using (a) the conventional quadratic programming (QP) without penalty, (b), (c), and (d) the DP-DRT method with a single-layer DN. Panels (b), (c), and (d) differ in the activation function, no activation, a leaky-ReLU, and a softplus (β = 1) activation were used, respectively.

Standard image High-resolution image

Conclusions

Here, we report the surprising results that a DNN with a number of parameters much larger than the experimental data can be used for the estimation of the DRT from a single EIS spectrum without pretraining. The DP-DRT method is shown to be able to recover the impedance and its underlying DRT not only for simple elements but also in somewhat pathological situations, for example, when the timescales overlap, noise is significant, and for elements whose DRTs are discontinuous. The DP-DRT approach works well also for real experimental data as it closely matches reference values obtained with other methods.

This article opens up a new way to perform DRT deconvolution as well as opportunities for future works, including improving the DNN architecture, fine-tuning the early stopping criterion, adding ad-hoc regularization, and elucidating the role of single-precision arithmetic on DRT inversion.

Acknowledgments

The authors gratefully acknowledge the Research Grants Council of Hong Kong for support through the projects (16207615, 16227016, and 16204517). The authors also acknowledge the support from the Guangzhou Science and Technology Program (No. 201807010074), and Hong Kong Innovation and Technology Fund (No. ITS/292/18FP).

Please wait… references are loading.