Professional Documents
Culture Documents
SOLID
North-Holland STATE
IOlilCS
A method is presented for executing the Kramers-Kronig transforms of electrochemical impedance data on a computer. Atten-
tion is paid to the extrapolation techniques for impedance data with a limited frequency range. It is shown that impedance spectra
of systems with blocking electrodes, exhibiting a CPE-type response, are also Kramers-Kronig transformable. The necessity and
limitations of these transforms with respect to impedance data are briefly discussed.
0167-2738/93/$ 06.00 © 1993 Elsevier Science Publishers B.V. All rights reserved.
13 2 B.A. Boukamp / Application of the Kramers-Kronig transformation
There are two ways to deal with the x = co problem. degree m ( m + l adjustable parameters)
The most simple one is to ignore this specific data
point and exclude it from the integration procedure, y(o9)= £ aio9~, (9)
assuming that the integration function will faithfully
i=0
reproduce the curve at xi=og. The second option is to a set o f p sequential data points ( p > m ) , using a
to evaluate y~ at x~= o9, which can be useful if the dis- least squares fit procedure:
tance between data points on the frequency scale is
d k+p-- 1
rather large (e.g. 4 to 5 points per decade). By de- ( Y j - Y(Ogj) )2=O ,
veloping Z,e(x), or Zim(x), in a Taylor series around dai ;=k
x=o9 one obtains for eq. (2): i=O,...,rn, (10)
XZim(X) -- ogZim(o9) where yj represents the real (or imaginary) part of
X2--O9 2 the data and k to k + p - 1 the range o f p data points
dZim (X) in the data set to be fitted. The derivatives (in that
=[XZim (O9) -~ X ( X--Og ) T x=¢ ° range) can be found directly:
d
( x - o9) 2 d2Zim(X) I Y(O9) £ iaio9 i-L (11)
"[-X 2! dx2 Ix=coJI- (...) --ogZirn(og)] do) i= 1
The derivatives of the real and imaginary com- 0 200 400 600 800
ponents are not directly available. They can be ap- Z,~, , [Q]
proximated by fitting the real and imaginary parts of
the impedance with a polynomial expression. As the Fig. 1. Impedance spectrum of the test circuit presented in the
insert of this figure. Circuit parameter values are given in table
data most likely will contain some noise (statistical 1. The frequencyrange is 1 mHz-10 MHz. The K-K transform
errors) some degree of smoothing should be applied. values are calculated for the range 0.1 Hz-100 kHz. Frequencies
This can be accomplished by fitting a polynomial of are in Hz.
134 B.A. Boukamp / Application of the Kramers-Kronig transformation
Table 1 1 v -- 60
I :i
Parameter values of the equivalent circuit used for the example
°°°°°° uo o og o
dispersion presented in fig. 1.
10_ 2 . . . . . . . ~ °,K" o°° 40 (3
Oooo oo ° ° o~, , ° lI
Element Parameter value °oO oooo.oo °:
20
Rt 100 ,o-ooo: ....
R2 200~
...:..
0
C3 IX 10-7F E
R4 500 10° N
-2o "O
W5 [Yo(jW)°5], ]Io= l x 10-4S's -°5
10 .0 -4o
1 10 102 103 104 105 106
The low end and high end frequencies were used to
extend the integration range. Besides the exact data to , [ r a d . s 1]
set also two data sets with added noise (0.2% and
Fig. 2. Absolute values of the relative deviation, Adim of the esti-
0.5% relative to [Z(~o) [ ) were generated over the
mated differentials of Zim (OJ) with respect to the exact differen-
frequency range 0.1 Hz to 0.1 MHz using the CNLS tials for several combinations of the data sub-range, p, and the
program EQUIVALENT CIRCUIT [ 5 ]. polynomial degree, m: ( O ) p = 5 , m = 2 ; ( O ) p = 5 , m = 4 ; ([5])
As the equivalent circuit is rather simple the exact p = 7 , m = 4 , ( l l ) p = 7 , m = 6 ; ( V ) p = 9 , m = 6 . The modified
derivatives could be calculated, so that a direct com- exact differential, oodZim(Og)/do3 (drawn line), is shown for
clarity.
parison could be made with the derivative estimates
obtained through the polynomial LS-fit procedure.
that with a higher degree polynomial (with p = m + 1 )
For the noise flee impedance data set a series of de-
a more accurate value for the differential is ob-
rivatives were calculated using different combina-
tained. Applying some degree of smoothing, e.g. by
tions o f p (data sub-set length) and m (polynomial
adding two more points to the data set ( p = m + 3 ) ,
degree). The absolute values of the relative devia-
decreases the accuracy for this noise free data set.
tions, Aaiff,
For p = m + 1 an exact solution for the polynomial is
Adiff= dZj(a~)/dm-dY(oJ)/d~ obtained, but the derived differential value not nec-
dZj(oJ)/d~ essarily equals the exact value.
In fig. 3 the absolute values of the relative devia-
j = r e or im, (12)
tion of the derivatives, with respect to the exact val-
with respect to the exact imaginary differential val- ues, of the imaginary component are presented for
ues are presented in fig. 2 for the imaginary part of the 0.2% and 0.5% noise added example dispersions
the impedance. Here Y(co) represents the polynom- generated with the equivalent circuit of fig. 1. Anal-
ial function fitted to the real or imaginary part of the ysis showed that with a sub-set size of p = 9 an op-
dispersion (eqs. (9), (10)). For clarity the exact timum was obtained for m--3 or 4. Fig. 3 presents
imaginary differential is also shown in fig. 2. In or- the case for m = 4. The optimum amount of smooth-
der to limit the range the exact differential is pre- ing, however, may strongly depend on the form of
sented in the form: e). dZim (O))/dto. For the real part the impedance spectrum. The errors in the estimated
of the spectrum presented in fig. 1 identical results derivatives are much larger than the errors in the data
were obtained. set. Hence for data with appreciable noise this
For the evaluation of the coefficients, a/, of the po- method is not well suited for establishing the inte-
lynomial expression a Gaussian elimination/back- grand value at x2=to 2 in the transform integrals.
substitution algorithm [ 19 ] was used to solve the set The integrands of the K - K transforms, however,
of simultaneous equations represented by eq. (10). are well-behaved functions, as is demonstrated in fig.
In the polynomial differentiation In ~o was used as 4. Here the integrands of the real (eq. (4)) and im-
variable as this produced better results than the use aginary (eq. (2)) transforms, y,e(x, co) and o)'Yim(X,
of w. o~) are presented as function o f x for three values of
From the results presented in fig. 2 it is obvious oJ: 27~, 2~zX102 and 2~z×104 rads -~. Arrows mark
B.A. Boukamp /Application of the Kramer+Kronig transformation 13.5
1
method, i.e. skipping the point x= o, will be followed.
10"
5. Discrete transform procedure
-
Fig. 4. Integrands for the real to imaginary K-K transform, y,(x, Hence the integral can be replaced by a summation
o) (closed symbols), and for the imaginary to real transform, over all intervals x, to x,+ ,.
wy,.(x, o) (open symbols), as function of x for three values of The second route is by fitting a polynomial of de-
w: (0,O) w=2n, (A, A) o=ZnX 102and (B, 0) w=2nx lo4
gree m through a sub-set of p data points (see above).
rad SC’. The three w positions are indicated by arrows.
For the integral of the polynomial also an analytic
expression is available
the x=w positions, the corresponding data points
%+B--l- -
were calculated using eqs. ( 7 ) and ( 8 ).
If the spacing of the data points on the w-axis is
close enough then the special point x=w may be
omitted from the discrete integration procedure as (15)
proposed above, assuming that the modelling func- Thus the data set must be divided in a series of sub-
tion (cubic spline or polynomial) will closely repro- sets (each end member must also be the first mem-
duce the omitted data point. For highly accurate data ber of the next sub-set), which then can be evaluated
(little noise) the derivative estimation method may individually. The polynomial evaluation is almost a
be used. In the following procedures the simple factor 6 slower than the cubic spline evaluation,
136 B.A. Boukamp / Applicationof the Kramers-Kronigtransformation
In Xmin
.~ .... ....~,~.°*o*** .. ~o
104
ooooOOO ,
oo
o f eClnx+Ddlnx=eDxCmin/C , (18)
oooOO °°°°OOo
-- 1 0 -5
o
10-6 and
I 10 102 103 I¢ I0s 106
w , [rads ~]
i eC'nx+Ddlnx=-eDxC.x/C , (19)
Fig. 5. Plot of the absolute values of the relative differences, 3r~
In Xmax
and 3im,between the exact data of fig. 1 and the K-K transforms:
(@, ©) using the limited range of 0.1 Hz-0.1 MHz; ( A, A ) p r o v i d e d that C is positive in eq. (18) and negative
using two decades extrapolation at the low and the high fre-
in eq.,, ( 19): Including this final extrapolation to x = 0
quency side (eqs. (18) and (19) ), and (@, ~ ) with extrapola-
and x = oo a further i m p r o v e m e n t in the K - K trans-
tion to x=0 and x=oo ( +eqs. (21) and (22)). Open symbols
for the real to imaginary transform, closed symbols for the re- forms is obtained. This is clearly d e m o n s t r a t e d in
verse transforms. A spline integration procedure was used. fig. 5 by the relative deviations ( d f a m o n d s ) for the
B.A. Boukamp / Application of the Kramers-Kronig transformation 137
complete K - K transforms, including eqs. (18) and polynomial routine, with sub-set length p = 9 and po-
(19), of the exact data set of fig. 1. If the deviations lynomial degree m = 6, took 10.5 s for the same data
are taken relative to the modulus of the impedance set. The results obtained by both procedures, how-
vector (eq. ( 1 ) ) even lower values, especially for the ever, were very close. The K - K test program used
real to imaginary transform, are obtained for the Av,~. was written and compiled in Turbo Pascal v. 6.0
An example of the complete K - K transforms of (trademark Borland International Inc.) ~ using
the impedance data of fig. 1, but containing 0.2% and double precision for the floating point variables.
0.5% noise (relative to the modulus of the imped-
ance vector), is presented in fig. 6. The scatter in the
relative deviations, Av,~e and /IKmm, of the K - K 6. Blocking electrodes
transforms appears larger than in the original data,
but when the deviations are taken relative to the The Kramers-Kronig rules require the data to be
modulus of the impedance vector (eq. ( 1 ) ) the scat- finite for ~o--,0 and o J ~ . For impedance measure-
ter becomes comparable to the original noise in the ments on ionically conducting solid samples with
data set. blocking electrodes the condition of finiteness for
The full range K - K transforms of the data set o f ~o~0 is seldom met. Generally an "open ended" CPE
fig. 1 (43 frequencies), using the spline integration (constant phase element) type dispersion is ob-
routine, took less than 2 s on a 25 M H z 80386 per- served for o)---->O)min, where OJmin represents the lowest
sonal computer with coprocessor (80387 chip). The frequency measured. As each system will have a d c
conductance, however small it may be, the low fre-
quency dispersion will eventually return to the real
axis for ~o~0. But this will occur at extremely low
m data with 0.2% noise frequencies for which it is impractical (if not im-
0
101 possible) to carry out reliable impedance measure-
0
<3 °o° o ments. Fortunately the dispersion relation of a CPE
0 °°°o o o o °
- - 162 o o
o
oo Oo
element (impedance representation: Z(og)=
o o °
• o °
o o
• Zo(jog) - " ) does obey the K - K transforms [20] re-
o • Oo~ • • • • oeOO •
O• sulting in a finite value for the transform integral.
e• • • o° 0 ° 0 °o° •
<3 1 0 -3 • oO °°e o 0
o ° •
o• • This can be demonstrated by considering the trans-
form integral for a CPE element in the range 0~<
........ , ........ , . . . . . . . . . , ....... , . . . . . . . . . , ,, ,,,,,
X~Xmin, with X m i n < < (O. With X 2 <<[ O ) 2 the integral o f
10 ld ld 1~ ld 1~ eq. (2) simplifies to
W , [rad.s 11
Xm(n X Z o , i m X - ~ -- o)Zo,im o ) - o~
d
x2 o)2 dx
0
o
data with 0.5% noise Xmin
,~ 10"1 o Ooo o
Z°'im ff °)l-°~-xl-°~dx
o °°°o o o 092
<3 o
o Oo o 0
o o o o o o
- - 10-2 • • • o o
•
Oo
e• ° • o
Do• o• • oo • o •
•
• °• o e o •
eo
o • • =/O,im 0") 1 ~ 2 X m i n X 2 i'-n°t 1
• eo o •~o • ° • (20)
• o• co2(2-a)J '
• • o o
<3 10a
with
,,,, ........ , ........ , . . . . . . . . , . . . . . . . . , . . . . . . . . . , . . . . . .
lo ld ld 1¢ 10~ 10"
to, [rad.s 1]
"; Most of the algorithms described in this paper are available
Fig. 6. Plot of the absolute values of the relative differences, Av.v~e from standard computer libraries. However, interested read-
( • ) and Jv,xim ( © ) for the impedance data of fig. 1, but pol- ers may obtain the source code of the described procedures by
luted with 0.2% (upper graph) and 0.5% (lower graph) noise. sending a formatted diskette to the author in a reusable mailer.
13 8 B.A. Boukamp / Application o f the Kramers-Kronig transformation
0 _¢°'%¢' ° . . . . .
Similarly the value of the integral of eq. (4) in the 0 0.5 1.0
range 0 <~X<~Xmin,with Xmin<< 0), is found: Zreal , [k O]
Xmin
I Ro, E+Zo,reX-°t--Zim Fig. 7. Impedance spectrum of circuit with "open ended" CPE-
X2__ O)2 dx dispersion at low frequencies, obtained with the equivalent cir-
o cuit presented in the insert. Parameter values are presented in
table 2. The data was generated over the frequency range 0.1 Hz
Xmin X min (22) to 0.1 M H z and polluted with 0.2% relative noise using the pro-
O92 ( Z r e ( ° ) ) - - R c P E ) -- ( 1 - o Q o ) 2 Zo. . . . gram EQUIVALENT CIRCUIT.
with
Table 2
Parameter values of the equivalent circuit used for the example
Zo,r~ = Zo cos -~-. dispersion presented in fig. 7.
quency end. The low-end extrapolation was mo- 7. High frequency inductive effects
delled with a series combination of a resistance and
a CPE, the high frequency end by a (depressed) Sometimes inductive effects appear in the imped-
semicircle which was very close to capacitive behav- ance spectra at high frequency. This is almost always
iour ( a = 0.99). Parameters were obtained with the due to contributed lead inductances and/or instru-
CNLS program EQUIVALENT CIRCUIT. The mental distortions. Specifically the current-voltage
comparison of the actual values and the K - K trans- converters in many potentiostats add a substantial
forms are presented in fig. 8. The corresponding de- (series) inductive dispersion to the measured
viations from the original data set, now taken rela- impedance at high frequencies. In the impedance
tive to the modulus of the impedance vector, are representation the imaginary part, which contains the
presented in fig. 9. These results show that the pro- series inductance dispersion, does not transform to
posed procedure yields a suitable K - K transform yield the real part. This is most clearly demonstrated
method for blocking electrode measurements. by taking the imaginary to real transform integral in
the range Xma x ~ X ~ (:X), with o~<< Xma x
" x L x - o3L¢o 0) 2
1.0
"t
Xrnax
x2_m 2 dx~
i
Xmax
L- -~-f L d x
0.5
=L x + co =~, (23)
0
Xmax
N
-0.5
where L is the value (in Henry) of the apparent se-
9_ ries inductance. The failure to transform can simply
N -1.0
be understood by considering a simple RL series cir-
-1.5 cuit. In the impedance representation the real part
10 102 103 104 105 106 does not contain any information on the dispersive
W, [rad.s 1] component (the inductance), hence the imaginary
part cannot be derived from the real part. Thus these
Fig. 8. Comparison fo the K - K transforms (real: (C)), imag.: "high frequency" inductive effects must be removed
( [] ) ) and actual data set (drawn lines) of fig. 7. The transforms from the measured dispersion before a K - K trans-
were carried out with the special extrapolations of eqs. ( 19 ), (22)
and (23) using the spline integration routine.
form, in the impedance representation, can be ap-
plied. This is a rather simple procedure as these in-
0.06 ductive effects can be accurately measured using a
o known resistance in place of a sample. As the in-
0.04 ductive effect is generally added in series to the
impedance dispersion subtraction is straightfor-
0.02 o
ward. In the admittance representation, however, the
o 0
K - K transform can be applied to a system contain-
oo o • ing a series inductance.
0
-0.02
8. Discussion
w, [rad.s 1]
In practical applications the use of the K - K trans-
Fig. 9. Plot of the absolutevaluesof the relative differences,Ar.r~ forms seems to be limited by two shortcomings of
( • ) and 3r.ram (O) between the K-K transforms and the actual real data: (i) a limited, finite frequency range, and
impedance data of fig. 7. Here the differences are taken relative (ii) the presence of noise. With respect to the first
to the modulus of the impedance vector. restriction, this strongly depends on the type of elec-
140 B.A. Boukamp / Application of the Kramers-Kronig transformation
trochemical system under investigation. In some possible so that the corresponding impedances ap-
cases the limit values for the impedance, Z ( o J = 0 ) proach the limit value.
and Z(o~=ov), are readily approached in a normal Another solution to this problem may be the ex-
range of frequencies (e.g. 1 mHz-10 MHz). The K - trapolation method recently presented by Orazem et
K transformations can then be calculated with little al. [21,22]. In their approach the missing low fre-
error in the values for the end ranges. But generally quency part is modelled with two sets of polyno-
this is not the case and an "end region extrapola- mials, one for the real part and one for the imaginary
tion" must be included. If the dispersion in the end part of the dispersion. On the polynomials the re-
region is mainly due to one dispersive process, then striction is imposed that, together with the measured
extrapolation can simply be done by using a de- data set, they must obey the K - K transforms. The
pressed semicircle model or, at low frequencies for restriction leads to a set of simultaneous equations
blocking electrodes, a single CPE/resistance model from which the polynomial coefficients can be ob-
(eqs. (21) and (22)). If the end region of the dis- tained. This method provides two interesting pos-
persion also contains a significant contribution of a sibilities, it can estimate the dc resistance of an elec-
second dispersive process then this must be included trochemical system and it can indicate whether the
in the extrapolation. Simple estimations of the nec- measured data set complies with the K - K trans-
essary parameters for the extrapolation model will forms. A clear offset between the measured and the
then be more difficult and less precise. Partial CNLS- extrapolated frequency ranges is indicative of non
fit analysis of the end regions of the impedance spec- K - K compliance. The adjusting procedure for the
trum may be used to elucidate the proper dispersion polynomials is, however, rather complex, execution
model. The interactive CNLS program EQUIVA- times of 5 rain on a 16 MHz 386 computer with math
LENT CIRCUIT can be helpful in this respect coprocessor have been reported [ 22 ]. A point of dis-
through its pre-analysis sub-program [6] combined cussion is to what extent the dispersion of the "dom-
with the data simulation sub-program [5]. inant time constant in the lower frequency domain"
The presence of noise is mostly a problem with re- should be present in the measured data set. If the
spect to the estimation of the end regions extrapo- same requirements as presented in this paper must
lation. Testing various kinds of simulated data that be met, then the method described in this paper pre-
was polluted with random noise, relative to the sents at least equal accuracy at a much greater speed
impedance vector modulus, showed that the noise (seconds versus minutes).
level in the K - K transformed data was somewhat A quite different approach to a general K - K test
smaller than in the original data. Hence if the sys- of impedance data was presented by Agarwal and
tematic ("non K - K " ) error in the data is larger than Orazem [23,24]. This method is based on modelling
the mean statistical error, it will also appear in the of the dispersion with a large number o f parallel R -
comparison of the real data set and its K - K trans- C circuits connected in series (Voigt model). R - C
form, provided that the end region extrapolations do circuits are added until the overall dispersion equals,
not contribute a significant error to the transforms. within a certain preset error limit, the measured dis-
A study on the propagation of errors in the K - K persion. As each R - C circuit is K - K transformable
transforms is important in this respect. A brief dis- the entire model obeys the K - K transform. Hence if
cussion on this subject has recently been presented parts of the measured dispersion (generally the end
by Macdonald [ 17 ]. regions) fail to be modelled within the error limit
A serious problem arises when it is clear that one then these must be considered to be corrupted. In
of the end regions of the measured dispersion cannot order to keep the number of R - C circuits manage-
be modelled with the available dispersion relations. able a rather large (e.g. 2%) fit error must be ac-
This means that no proper end region extrapolation cepted. So far the method has been applied success-
can be carried out while this extrapolation is espe- fully on a number of systems, however, it remains to
cially crucial to the K - K transforms of the end re- be proven that it can also be applied to special cases
gion data points. In this case it is essential to extend such as e.g. an "open ended" CPE or bounded dif-
the frequency range of the measurement as far as fusion dispersion.
B.A. Boukamp / Application of the Kramers-Kronig transformation 141