J. Electroanal. Chem., 75 (1977) 125--134 © Elsevier Sequoia S.A., Lausanne -- Printed in The Netherlands
125
CONVOLUTION AND DECONVOLUTION IN THE SYNTHESIS AND ANALYSIS OF STAIRCASE VOLTAMMOGRAMS *
HENRY L. SURPRENANT, THOMAS H. RIDGWAY ** and CHARLES N. REILLEY Kenan Laboratories of Chemistry, University of North Carolina, Chapel Hill, N.C. 2 7514 (U.S.A.)
(Received 2nd March 1976)
ABSTRACT The comparison of staircase voltammograms with linear scan voltammograms is complicated by the former's response being dependent on the measurement time. A method for the prediction and removal of that dependence is given, presenting the data in a form similar to that of semi-differential analysis. An efficient algorithm for simulating the response of a reversible system to repetitive stepwise excitation is developed utilizing the fast Fourier transform convolution procedure. A brief comparison of several convolution procedures is presented.
INTRODUCTION I n v o l t a m m e t r i c studies t h e c o n c e p t o f r e p l a c i n g t h e p o t e n t i a l r a m p w i t h a p o t e n t i a l staircase is c r e d i t e d t o B a r k e r [1] w h o n o t e d t h a t such a t e c h n i q u e w o u l d p r o d u c e , at l o n g times, a p u r e l y F a r a d a i c r e s p o n s e , t h u s e l i m i n a t i n g the m a s k i n g e f f e c t s o f t h e d o u b l e l a y e r c a p a c i t a n c e . Initial e x p e r i m e n t a l studies were p e r f o r m e d b y M a n n [2,3] as well as N i g m a t u l l i n a n d V y a s e l e v [ 4 ] . T h e first t h e o r e t i c a l g r o u n d w o r k was laid b y Christie and L i n g a n e [ 5] f o r reversible charge t r a n s f e r with n o c h e m i c a l kinetics, f o r t h e special case w h e r e t h e curr e n t is m e a s u r e d j u s t p r i o r to t h e a p p l i c a t i o n o f t h e n e x t step. T h e i r w o r k predicts a s t r o n g d e p e n d e n c e o f " p e a k " c u r r e n t a n d p o t e n t i a l on the size o f the step. T w o g r o u p s [6,7] have r e c e n t l y r e - e x a m i n e d t h e simple reversible s y s t e m w i t h o u t t h e r e s t r i c t i o n o n t h e m e a s u r e m e n t delay t i m e and have n o t e d additional s h a p e d e p e n d e n c i e s u p o n t h e m e a s u r e m e n t delay t i m e e m p l o y e d . C o r r e l a t i o n o f staircase v o l t a m m o g r a m s w i t h linear scan v o l t a m m o g r a m s is s e e m i n g l y m o r e d i f f i c u l t b e c a u s e o f these s h a p e d e p e n d e n c i e s f o r e v e n t h e simplest o f s y s t e m s . This is u n f o r t u n a t e since staircase cyclic v o l t a m m e t r y is ideally suited t o t h e l a b o r a t o r y c o m p u t e r . T h e s e a p p a r e n t difficulties vanish
* In honour of Dr. G.C. Barker's 60th birthday. ** Department of Chemistry, Texas A & M University, College Station, Texas, U.S.A.
126
if the proper viewpoint is taken, and the numerical realization is made possible by the aforementioned digital computers. The response of an electrochemical cell to a given excitation signal is dependent upon the nature of the charge and mass transfer process, the chemical stability of the species involved, and the excitation signal, all of which influence the flux of materials at the electrode surface. The concentration gradient of the electroactive materials is a convolution of the surface concentration (determined by the excitation signal and the charge transfer processes) with the bulk properties (determined by the mass transfer and chemical kinetic processes). All of the methods predicting the response of a given cell reflect this convolution. Whether the solution is obtained analytically by means of Laplace transforms, semi-integral transforms [8--10], finite difference simulations or numerical integration, the " s o l u t i o n " process is still one of convolution [11]. In this paper we will discuss several efficient methods for performing this convolution, including the fast Fourier transform approach, within the restrictions imposed by discrete excitation functions controlled by a digital computer. We will also discuss the inverse procedure of obtaining the change in concentration of species at the electrode surface from the current response of the cell. This analysis procedure is analogous to Oldham's semi-differentiation m e t h o d [10], though more exact for responses to the stepwise excitation studied here. More importantly, the analysis removes the influences of the data acquisition parameters from the observed responses, allowing more straightforward comparison with linear ramp voltammetry. We will also briefly discuss an efficient algorithm for simulating the response of reversible systems to several repetitions of the excitation waveform. THEORY
For electrochemical processes where the product species, P, is stable in solution and the reactant species, R, is not involved in a chemical equilibrium, it is well known [12--15] that the concentrations for R and P at a planar electrode surface at time, t, are given by t
cR(O, t) = c*
1 jI(r)dT nFAD 1/2 (rr(t T)} 1/2 -
-
(1)
t
I(r)dr nFAD~, 12 ~ (rr(t--r)} 112
cp(O, t) = c* + - -
1
_. /"
(2)
respectively, where the terms nFA and D have their usual significance, I is the current, and c* is the initial concentration. Restricting the system such that c~ is zero and the charge transfer process is reversible, then CR(0, t) = Cp(0, t)(DR/Dp) exp e
(3)
127 where 6 = ( n F / R T ) (E(t) -- E l l 2 }
(4)
and E1/2 is the reversible half-wave potential. Making these substitutions and rearranging leads to the form usually found in the literature, t I(r)dr (5) nFAc~D~12 1 + exp 1 e f (~(t --T)} 1/2 0 - -
The Laplace transform of eqn. (5) leads directly to
,
1/2
nFAcRDR
2
1 /(s) 1 + exp e s 1/2
(6)
where s is the Laplace variable, [ i s the transform of the current, a n d / 2 is the Laplace operator. A simple rearrangement yields
1 e -[(s) = nFAc*D~/2 s 1/2 J3 1 + exp
(7)
Without specifying the functionality of E(t), it is convenient to express eqn. (7) in its convolution integral form. If f ( s ) : F ( t ) and g(s) :G(t) are transform pairs, then fot F(T)G(t -- T)dT : f(s)g(s) is a transform pair [13]. To obtain the value for I(t) from eqn. (7) it is necessary to evaluate s 1/2, which is easily accomplished using the well known transform pair 1/slZ2 : 1/(rt) 1/2 and the operator sf(s) : d F ( t ) / d t + F(0). This then yields
I(t} = nFAc~D~/2
(0)
2T(1/2(t--__T)3/2 " 1 + exp e
o
where F(0) is 1/(~t) 1/2 evaluated at t = 0 and is zero at all other times. There is an alternative and more tractable form of eqn. (8) 1 I(t) = nFAc*aD~ 12 f o (~(t--~)}1/2
1 1 + exp e
1)
dT
(9)
which arises from the Laplace relationship g(s)f(s) : (g(s)/s) (sf(s)). If we let
K = n F A c R, D 1/2 R
(10a)
T(t) = 1/(rt) 1/2
(10b)
dI
F(E(t)) = ~ -
1 + exp e
I
then eqn. (9) can be simplified as I(t) = K . T ( t ) * F ( E ) ) using the asterisk to indicate the convolution integral.
(11)
128 If we restrict ourselves to cases where the potential is discretely changed only at specific times, i A t , then
F{E(iAt)} = (1 + exp[(nF/RT) (E(iAt)
-- Ell 2
}] ) - i _
{I + exp({nF/RT} [E{(i -- l)At} --E1/2])} - I
(12)
and F(E(t)) is zero at all other times. Such a restriction would be typical of a computer controlled experiment where the potential is set by a digital to analog converter. Since one cannot sample the data immediately upon changing the potential, indeed to do so is not even desirable because of the double layer charging contribution to the current, a delay time, td, is utilized, after which a data point can be acquired. The effects of this delay time on the shapes of staircase voltammograms have been studied both theoretically and experimentally [6,7]. Equation (10b) is therefore modified to yield T(iAt
+ td) =
(~(iAt
(13)
+ td)} -1/2
Because F ( E ( i A t ) ) is a series of spikes at constantly spaced intervals of time, the discrete approximation to the convolution integral i
I ( i A t + td) = K " ~
T((i--j)At
+ td} " F ( E ( j A t ) }
(14)
j=o
can be used. Equation (14) can be shown to be identical to eqn. (6) in ref. 6. Alternatively, with the proper precautions, the fast Fourier transform can effect the convolution I ( i A t + td) = K " ~ - 1 [ ~ ( T ( i A t + td) + Z} "V(F(E(iAt)} + Z)]
(15)
where V and V - 1 represent the Fourier transform and the inverse Fourier transform respectively, and Z represents zeroes appended to the arrays T and F. The zero stringing prevents the circular convolution property [ 16] of the discrete Fourier transform from distorting the result. One can solve for F ( E ( i A t ) ) and thus remove the dependence of the signal on the delay time by a recursive algorithm i--1
F ( E ( i A t ) ) = [ I ( i A t + td) -- ~
F(E(jAt)}
• T((i --j)At + t d } ]/T(td)
(16)
j=O
where F(E(O)) = I ( t d ) / T ( t d ) . This is equivalent to Oldham's [10] semi-differentiation technique, with compensation for the sampling time delay of the discretely excited voltammograms. Although at times quite useful, the Fourier transform deconvolution is not totally valid, for reasons pointed o u t later. Just as with linear scan voltammetry, one can repetitively excite the system with a discrete waveform. For reversible systems with no following chemical reactions, the current response during any cycle, m, can be efficiently computed by taking advantage of the circular convolution property of the Fourier transform. Assuming that the waveform repeats every n points then for the
129
L TM step of the mth cycle the current response would be mm+L
I((rnm+L)At+ta}=K
~
T{(mm+L--j)At+ta}.F(E(jAt)}
(17)
j=0
where m m = ( m -- 1) × (n -- 1). For reversible systems with no chemical kinetics F { E ( t ) } will itself repeat every cycle of the waveform. Because F ( E [ { m × (n -- 1) + / } A t ] ) = F ( E ( i A t ) } we can factor eqn. (17) to obtain L
I ( ( m m + L ) A t + td } = K ~
T((mm + L -- kk)At + t d } • F(E(kkAt)}
kk=O
n --1
+g ~
m --1
F{E(jAt)}
T [ ( r n m + L + j - - ~ i ( n -- 1)}At + td]
~
j=O
(18)
i1=1
The second term of eqn. (18) is a circular convolution that can be more efficiently computed using the fast Fourier transform approach. This leads to eqn. (19) L
I((rnm + L)At
+ td}
=
K ~
T((rnrn + L -- k k ) A t + t d } • F ( Z ( h k A t ) }
kk =0
(19) + E l 5 ~-1 ( V { S ( L A t
+ td)}Sr(F(E(LAt))}}]
o 1 •/(Tr(((n -- 1)jj + L ) A t + td)} 1/2, and n should where S ( L A t + td) = Eji= m--2 preferably be some integral power of 2. After several cycles the second term in eqn. (19) becomes much larger than the first, so that Fourier transform deconvolution in these cases closely approximates the proper result.
SYNTHESIS The synthesis of the response of a reversible system to stepwise excitation at a planar electrode has been studied [6,7] and it has been shown that the response is strongly correlated with the acquisition time delay, td. The effects of t d manifest themselves in changes of the peak potential and peak current such that comparison with linear scan voltammetry can be ambiguous. Since our methods of synthesis exactly duplicate the results of Zipper and Perone, the reader is referred to their article [6] for illustrations of the effects of to. The use of eqn. (14) to synthesize the staircase voltammogram of a reversible system is graphically depicted in Fig. 1. The response of the system, A, to a single potential step can either be calculated for a planar electrode via eqn. (13) or be experimentally determined. The change in surface concentration, B, as obtained from eqn. (12) is depicted as a smooth curve but is actually a series of impulse functions of varying amplitudes as the potential is stepped through the half-wave potential. Plotting B as a function of potential instead of time gives the more usual presentation, D. Convolving A and B using eqn. (14) yields
130
*
BA 4,
TIME
V POTENTIAL
Fig. 1. Synthesis of staircase voltammograms. The diffusion time response (A) is convolved with the change in surface concentration (B) to yield the current response (C). D and E are B and C, respectively, plotted versus potential.
the current responses, C and E, as functions of time and potential respectively. The potential function used in Fig. 1 was a staircase approximation to a triangular wave, but curve B could be computed just as easily for other potential waveforms, within the restriction that the potential change at only the specified times, iAt. For several active but non-interacting species B is the sum of eqn. (12) computed for each of the species. And the resultant response is obtained by a single convolution, assuming that A is identical for all species. The use of the fast Fourier transform to effect convolution, as in eqn. (15), is shown in Fig. 2. Functions A and B are Fourier transformed to yield D and E respectively, via a radix-2 fast Fourier transform algorithm which limits the array sizes to integral powers of 2. D and E are point-by-point multiplied to yield F which is then inverse Fourier transformed to yield the convoluted resposne, C. D, E, and F are presented as the magnitude of the complex numbers that result from the transformation. The left half of A, B, and C are identical to A, B, and C respectively of Fig. 1. However, to prevent the circular convolution effect from distorting C, zeroes must be added in the right half of A and B. This gives proper results in the left half of C, but physically unobtainable results in the right half. In a number of instances it is advantageous to know the response after
131
L
FOURIER-,),,L...._ ° __ TRANSFORM 1
-XFOURIER> ~ E
c~. IX,,... J ~
TIME
INVERSE F FOURIER L /TRANSFORMk
FREQUENCY
Fig. 2. Fourier transform convolution. The left halves of A, B, and C are identical to A, B, and C, respectively, in Fig. 1. Zeroes are added to arrays A and B to eliminate circular convolution. D, E, and F are the magnitudes of the Fourier transforms of A, B, and C, respectively.
several periodic excitations, such as a steady-state cyclic voltammogram. Previous methods of computing the behavior after the first cycle were time consuming, b u t using eqn. (19) the current response of a reversible system for cycles other than the first can be computed efficiently. The factoring of eqn. (17) to yield eqn. (19) uses a combination of the procedures in eqns. (14) and (15) except that zeroes are n o t appended before performing the Fourier transformation convolution. This factoring of one large convolution into two smaller convolutions saves large amounts of computation time especially for responses after a number of cycles. ANALYSIS
The analysis of the current response of a reversible system by semi-integral [8] or convolutive potential sweep [9] techniques yields the surface concentration at a planar electrode. Analysis using eqn. (16) gives the derivative of this presentation, i.e. the change in surface concentration, or semi-differential analysis. Use of eqn. (16) presents all the advantages of the semi-integral technique, without the short-time errors present in either the digital [17 ] or analog [18] semi-integration procedures.
132
The process of synthesis or analysis can be envisioned as knowing two out of the three arrays A, B, and C in Fig. 1, and then using the proper equation to obtain the third. The same can be said about the Fourier transform m e t h o d as depicted in Fig. 2. Here, however, we must realize that the right half of array C cannot be obtained experimentally. Unfortunately, this information is needed to Fourier transform deconvolute C with A to yield the correct B. Figure 3 shows the results of deconvoluting a current response from a synthetic first scan staircase voltammogram. A results from use of eqn. (16) and is of the proper functionality. B results from a Fourier transform deconvolution without adding zeroes, and is decidedly in error. C results from a Fourier transform deconvolution with zeroes added in place of the u n k n o w n portion. Although the error is not large, it could overwhelm even a far removed small peak. Equation (16) is valid only for the first scan, and results obtained with it for later scans get progressively worse. The Fourier transform m e t h o d with added zeroes also becomes worse as the number of scans increases. Interestingly, the Fourier transform approach that led to B in Fig. 3 improves dramatically with increasing scans. This results from the increasing dominance of the Fourier transform part of eqn. (19). In Fig. 4 the small error in the analysis by this method of the response of the twentieth scan is not apparent. In addition to removal of the effects of planar diffusion to yield symmetrical peaks, these methods also remove the effects of At and td, implying facile comparison of voltammograms obtained with differing acquisition parameters. If the experimental response of the system is distorted by the current transducer, this distortion can be removed by replacing the calculated response of eqn. (13) with the current time curve obtained from a single potential step experiment.
! A
/
A c1
Fig. 3. Deconvolution of synthetic staircase voltammograms. (A) Recursive algorithm of eqn. (16). (B) Fourier transform method without added zeroes. (C) Fourier transform method with added zeroes.
133
CYCLE
A V
Fig. 4. Fourier transform de¢onvolution of a steady-state staircase voltammogram.
COMPARISON OF COMPUTATIONAL ALGORITHMS
If one desires a convoluted resultant array of n points, the c o m p u t a t i o n time is proportional to 2n log2(2n) for the Fourier transform algorithm (eqn. 15) and proportional to n2/2 for the recursive algorithm (eqns. 14 or 16). Thus, as the array size increases the Fourier transform algorithm becomes more efficient relative to the recursive algorithm; on our computer system the Fourier transform method is faster for 512 point arrays or larger. The use of eqn. (16) has been criticized by Knight and Selinger [ 19] for the deconvolution of fluorescence decay curves. But, when T(td) is large in relation to the rest of the T array, as in our case, then the method gives meaningful results. Computational noise introduced by either the Fourier transform method or the recursive method is negligible for the array sizes used in this study; however, the computational noise level closely follows the computational time, presenting the possibility that the recursive method could introduce noise for large array sizes. For many mini-computers the 33% larger amount of array storage required for the Fourier transform method and the increased complexity in the software probably offset any time or noise advantage it might have.
134
CONCLUSION
The effects of the measurement delay time in staircase voltammetry at planar electrodes can be removed with a deconvolution process similar to semidifferential analysis. Unlike the semi-differential technique the deconvolution method is especially suited to the analysis of responses to stepwise excitation; indeed, it is in error for all but stepwise excitations. The removal of the measure ment delay time effects should lead to better direct comparisons of staircase voltammograms obtained under different data acquisition conditions, and thus enhances its usefulness as an alternative to linear scan voitammetry. ACKNOWLEDGMENT
We wish to thank the National Science Foundation, grant n u m b e r GP 38633X, for its support of this investigation.
REFERENCES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
G.C. Barker, Advan. Polarogr., 1 (1960) 144. C.K. Mann, Anal. Chem., 33 (1961) 1484. C.K. Mann, Anal. Chem., 37 (1965) 326. R.S. Nigmatullin and M.R. Vyaselev, Zh. Anal. Khim., 19 (1964) 545. J.H. Christie and P.J. Lingane, J. Electroanal. Chem., 10 (1965) 176. J.J. Zipper and S.P. Perone, Anal. Chem., 45 (1973) 452. D.R. Ferrier and R.R. Schroeder, J. Electroanal. Chem., 45 (1973) 343. M. Goto and K.B. Oldham, Anal. Chem., 46 (1974) 1522. J.M. Saveant and D. Tessier, J. Electroanal. Chem., 61 (1975) 251. K.B. Oldham and J. Spanier, J. Electroanal. Chem., 36 (1970) 331. R.S. Nicholson, Anal. Chem., 44 (1972) 478R. M. Senda and I. Tachi, Bull. Chem. Soc. Jap., 28 (1955) 632. H. Matsuda, Z. Elektrochem., 61 (1957) 489. H.S. Carslaw and J.C. Jaeger, Conduction of Heat in Solids, Oxford, New York, 1947. D.E. Smith in A.J. Bard (Ed.), Electroanalytical Chemistry, Vol. 1, Marcel Dekker, New York, 1966. G.D. Bergland, IEEE Spectrum, 6(7) (1969) 41. M. Grenness and K.B. Oldham, Anal. Chem., 44 (1972) 1121. K.B. Oldham, Anal. Chem., 45 (1973) 39. A.E.W. Knight and B.K. Selinger, Spectrochim. Acta, 27A (1971) 1223.