Quality of Your Fit in EIS
Electrochemical Impedance Spectroscopy (EIS) is now ubiquitous in the electrochemical research, development, and qualitycontrol world. The technique compares the observed data from an EIS scan to a hypothetical model network of resistors, capacitors, inductors, and other theoretical components. If the data match the network (a “fit” of the data to the model), then the network of components is deemed to be a valid model of those data.
For a background on the technique of EIS, we recommend you read first our Application Note “Basics of Electrochemical Impedance Spectroscopy.” For a general discussion of modeling EIS data, see our Application Note “Equivalent Circuit Modeling Using the Gamry Electrochemical Impedance Spectroscopy Software.”
But what constitutes a valid network of electronic components to use as a model? This Application Note discusses the ramifications for your EIS experiment when too many or not enough components are used in your model.
How Many Parameters?
In short, the answer is “enough,” but not too many.
One can fit nearly any impedance spectrum using enough parameters, but the question then becomes, “is the fit realistic?”
Besides fitting the model to the data, we also want the fit to correspond to a real, physically intuitive system, with pores, insulating capacitative layers, and so on.
The most important of these layers of fitting is the representation of a real physical system. Second most important is being sure that the error bar for each ideal component in the model is smaller than the value calculated for that component, and that any residual errors are not systematic, but random. The least important of all is the goodness of fit, or χ^{2} value!
The basic rule is: Use the simplest model that fits the data. Don’t include redundant components. It is unacceptable to just keep adding electronic components to the model to create a good fit: the components must mean something in the real world.
Example
First Model
Let’s examine an example, EIS data taken on a lithiumion 18650 cell. Below is a Bode plot of the data.
Figure 1. Bode plot of EIS of a Liion cell.
We start with some kind of physical model like that shown below:
Figure 2. Sketch of physical model of Liion cell, with suggested electronic components corresponding to various parts of the cell.
We add a “stray inductance” that may be cable or instrumentrelated, to give a sixcomponent equivalent circuit like this, created with Gamry Instruments’ Model Editor:
Figure 3. First iteration of an equivalent circuit to a Liion cell.
Here we perform a fit with Gamry Instruments’ Echem Analyst™ software:
Figure 4. Fit using the equivalent circuit shown in Fig. 3 on Liion cell data.
Even a glance shows that this fit, though more or less reproduces the shape of the data, has some problems.
The residual errors are obviously not random:
Figure 5. Residual errors from fit shown in Fig. 4.
The goodnessoffit, the χ^{2} value, is 0.00274, which—surprisingly—is decent.
Overall, however, we can see that this model is defective.
Second Model
Modern batteries typically are designed with a high surfaceareatovolume ratio, that is, with many voids within the electrolyte. Thus we should include porous elements in our model circuit:
Figure 6. Revised physical model of a Liion cell, with circuit elements superimposed.
The Bisquert elements at the interface between the anode and electrolyte, and the cathode and electrolyte, are infinite series of resistors combined with parallel constantphase elements plus resistors. More about Bisquert circuit elements is in our Application Note “Demystifying Transmission Lines: What Are They? Why Are They Useful?” The total equivalent circuit modeling the system is thus:
Figure 7. Equivalent circuit used to model the Liion physical system in Fig. 6.
For such a seemingly complicated system, there are only eight circuit elements.
Below are the data, and a fit using the equivalent circuit.
Figure 8. Bode plot of Liion data, plus fit using the equivalent circuit in Fig. 7.
The solid lines (the fit) superimposed over the data match the data remarkably well. Let’s check the residuals to see if there is systematic error within the model:
Figure 9. Residuals from fit to Liion data using the equivalent circuit in Fig. 7.
The residual errors seem relatively random, falling above and below zero in nonsystematic ways. Not only that, they are about a quarter of the size of the previous model. How about the goodnessoffit, the χ^{2} value?
χ^{2} = 2.253 × 10^{–4}
This value is ten times smaller than the previous calculation.
Therefore we are justified in believing that this model is a physical one, for each component corresponds with a part of the battery; with a good fit and small, random residual errors; plus a good χ^{2} value.
What happens if we add a spurious electronic component to the equivalent circuit?
To the second model, let’s include a similar stray inductance in series with the model. The fit looks about the same (we don’t reproduce it for that reason), but how about the residuals?
Figure 10. Residuals plot for equivalent circuit in Fig. 7 plus a stray inductance in series.
There is some very slight improvement only at the highest frequency.
The goodnessoffit, the χ^{2} value, is 3.27 × 10^{–6}, which is certainly improved.
The last factor in judging the worthiness of an equivalent circuit is the residual error in each component. Here we start noting problems. Some of the components’ errors are significantly larger than the calculated value of the components themselves (Table 1, indicated in bold italic).
Table 1. Equivalent circuit components and their errors for the circuit in Fig. 7 plus a stray inductance in series. Components whose errors are larger than the computed values are shown in bold italic.
Component 
Value 
Error 
Unit 
R1 
0.001266 
0.1183 
Ω 
R2 
0.01711 
0.03101 
Ω 
Yo3 
1.040 
1.987 
S×s^{a} 
a4 
0.7405 
0.2166 

L5 
0.9335 
0.1719 

rm6 
0.05015 
0.003484 
Ω 
rk7 
0.1309 
0.1115 
Ω 
ym8 
881.9 
59.66 
S×s^{a} 
a9 
0.8004 
0.001724 

R10 
23.89 
28.45 
Ω 
Yo11 
1532 
184.2 
S×s^{a} 
a12 
0.9739 
0.01860 

L14 
0.3273 
0.6177 

rm15 
0.4677 
0.3220 
Ω 
rk16 
0.02744 
0.1984 
Ω 
ym17 
0.1676 
0.2693 
S×s^{a} 
a18 
0.8714 
0.7740 

Yo18 
5718 
1.961 × 10^{6} 
S×s^{a} 
a19 
–0.6792 
3.478 

L20 
3.168 × 10^{–7} 
3.464× 10^{–6} 
H 
Adding a “stray inductance” component, therefore, may improve the goodnessoffit, but also may begin to cause deterioration of the theoretical components themselves. Perhaps, in this case, we have included too many components for fitting this data set.
Third Model
Recently we learned about an alternate model for fitting Liion batteries:
Figure 11. Alternate model for Liion battery EIS.
This model replaces the Bisquert elements for a simpler resistor and constantphase element, plus a stray inductance. Hence the interfaces shown in Fig. 6 are not included in the model.
Figure 12. Fit of the EIS data using the model in Fig. 11.
The goodnessoffit is very good, 4.806 × 10^{–4}. The residual errors seem fairly random and are small (though not as small as the second model):
Figure. 13. Residuals plot for equivalent circuit in Fig. 11.
Let’s have a look at the errors in the theoretical components (Table 2):
Table 2. Equivalent circuit components and their errors for the circuit in Fig. 11.
Component 
Value 
Error 
Unit 
R1 
0.02488 
4.444 × 10^{–4} 
Ω 
R2 
0.02375 
1.106 × 10^{–3} 
Ω 
Yo4 
1.813 
0.3058 
S×s^{a} 
a5 
0.5733 
0.03191 

R6 
0.04811 
6.692 × 10^{–3} 
Ω 
Yo7 
246.8 
38.65 
S×s^{a} 
a8 
0.6856 
0.04822 

Yo9 
1856 
154.1 
S×s^{a} 
a10 
1.000 
0.01178 

L10 
7.574 × 10^{–7} 
1.287 × 10^{–8} 
H 
No uncertainties are larger than their respective components, which gives us confidence in the model.
When we consider the third model, with twelve free parameters, versus the second model, with twenty free parameters, and both give similar results, we are inclined to accept the third model.
This does not mean that the third model is the only acceptable model for a Liion battery. Different models are possible depending on the batteries’ underlying chemistries and internal components.
Conclusion
When creating equivalent circuits to fit your EIS data, be aware of several factors:
 The physicality of each theoretical component: Is there a real reason for its existence?
 The error bar on each component. Is the error bar smaller than the component itself?
 The goodness of fit: Is it relatively small?
Application Note Rev. 1.0 1/8/2019© Copyright 2018 Gamry Instruments, Inc. Echem Analyst is a trademark of Gamry Instruments, Inc.
Want a PDF version of this application note?
Please complete the following form and we will email a link to your inbox!