Application of direct digital control of electrode potential to controlled

Application of direct digital control of electrode potential to controlled-potential electrolysis experiments. C. L. Pomernacki, and J. E. Harrar. Ana...
0 downloads 0 Views 2MB Size
Application of Direct Digital Control of Electrode Potential to Controlled-Potential Electrolysis Experiments C. L. Pomernackl Electronics Englneerlng Department, Lawrence Llvermore Laboratory, Unlverslty of Callfornle, Llvermore, Callf. 94550

J. E. Harrar’ Qeneral Chemistry Dlvlslon, Lawrence Llvermore Laboratory, Unlverslty of Callfornle, Llvermore, Callf, 94550

A mlnlcomputer program and electronlc hardware have been developed for controlllng the potentlal of an electrode through the medlum of an algorlthm wlthln the computer. The control algorlthm found to be satlsfactory Is the dlscrete equlvalent of proportlonal-plus-Integralactlon. Control func= tlone are carrled out In assembly language at a sampllng rate of 1 kHz; the parameters that govern the control actlon and electrolysls condltlons can easlly be changed on-llne vla a hlgh-level conversatlonal language. Theory has been developed for guidance In tunlng the controller for varlous electrolysls cell characterlstlcs. Detalled control obJectlves and speclflcatlons have been formulated for typical electrolysls experlments. The system has been tested wlth mercury-pool and platlnum worklng-electrode cells, demonstratlng that the control objectives can be met and that the theory Is useful. System rlsetlmes of lese than 8 msec can be achleved, and steady-state control errors are not slgnlflcant. A malor fractlon of the tlme durlng each sampllng perlod ls available for other data processlng.

The direct digital control (DDC) of the potential of the working electrode in a 3-electrode cell has been viewed as an interesting possibility (1, 2 ) ever since the advent of minicomputers. In contrast to computer-controlled potentiostats (see, for example, Refs. 1-61, where the feedback control is still accomplished by means of an analog potentiostat, DDC of the electrode potential is a concept in which the control action is generated by means of a computational algorithm within the computer. This approach is also different from the type of digital control described by Goldsworthy and Clem (7, 8) and White (9),in which the control is effected through measurement of the electrode potential by means of a differential comparator, followed by a digital output. In their technique, which does not involve the use of a computer, the control action and its characteristics are fixed in hardware. Direct digital control via software has been widely implemented in industrial process control (10-121, but for a number of reasons has not yet found application in electrochemistry. One reason has been that a speed of response comparable to that of analog circuitry could not be attained because of computational speed limitations in the computer. Now, however, the existence of faster minicomputers, digital multiply/divide circuits, and advanced software techniques have enabled significantly faster data processing. At the present time, DDC would appear to be practical a t least for laboratory-scale controlled-potential electrolysis, and possibly analytical voltammetry, because these techniques do not require very high control speeds. A second factor hindering the development of DDC in the laboratory has been the much greater cost of the digiAuthor t o whom correspondence should be addressed. 1894

tal, compared to the analog approach. However, when the ubiquity and versatility of the minicomputer is considered, the use of DDC can be regarded much more favorably. From the point of view of improving control performance, digital computer control readily lends itself to such techniques as real-time adaptive control (13, 14) and nonlinear control ( 1 5 ) .Other potentialities include a greater flexibility of command voltage waveform, multivariable control, user-interactive operation, digital filtering, simultaneously performing other electrochemical data processing, and incorporation of iR compensation techniques such as those of Bezman (16) or Britz and Brocke (17). In controlled-potential coulometry, the operations of current integration, automatic background correction, and final integral prediction (18)might be included in the computer program. A further incentive for investigating the use of DDC in electrochemistry is that the recent rapid development of microprocessors (19, 20) holds the promise of performing this function with very compact, still less expensive hardware. A fundamental study using a minicomputer should serve as a good prelude to using microcomputers in this way. An investigation of DDC for electrode potential control not only appears to be worthwhile, but also is greatly facilitated by: first, existing information on suitable DDC algorithms developed in process control (21-23); second, a recent study of the characteristics of electrolysis cells as elements of control systems (24);and third, a precise knowledge of what the control strategy should be in controlledpotential electrolysis experiments (25). The approach taken here, after a period of experimentation with various other algorithms, was to implement DDC using the sampled-data equivalent of the classical proportional-plus-integral-plus-derivative control action. The characteristics of the controller were tailored to the transfer function of the cell to obtain the desired control response. The software was designed so that variation of the control parameters could be accomplished via a high-level conversational language. Also included was a programmable test signal for response testing. Specific, clearly-defined control objectives for controlled-potential electrolysis have been formulated, and the DDC control system was evaluated to see how well these specifications could be met.

SYSTEM THEORY AND CLASSICAL DDC CONTROL Block-Diagram Representation of Systems. A potentiostat-cell control system in which the control action is performed entirely by analog components can be represented in classical block-diagram form as shown in Figure 1 (26). The control amplifier and its associated phase-compensation network comprise the controller. The transfer function of this component is -G(s), with the minus sign indicating the inverting action of the controller and s being

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975

L

rzjF-1

-C(s)

follower

are written in terms of the complex variable z , which is the sampled-data counterpart of the continuous-system Laplace-transform variable s (27). In the digital system, there is no signal inversion in the controller; the negative feedback action is obtained by the subtraction process. Thus, R ( s ) and C(s) are written with the same polarity, and the polarity of R ( s ) that is actually used must be opposite that of the desired working vs. reference electrode potential. The discrete output signal, E ( z ) , which is produced in the control algorithm computation, is transmitted as a digital word to the digital-to-analog (D/A) converter. The output of the DIA converter, often termed a zero-order hold, is a continuous signal E ( s ) which is a series of discrete levels determined by the command words from the computer. The digital-to-analog converter thus transforms a numerical sequence into a continuous signal, and its effect in the system can be evaluated in terms of a transfer function P ( s ) . The signal E ( s ) could be applied directly to the counter electrode of the electrolysis cell. In the present work, a power booster is included to make the system suitable for controlled-potential electrolysis, and a filter is added (for reasons to be discussed below). In a mathematical analysis of the system, these additional components can be taken into account via their transfer functions. The analog-to-digital converter is represented in the block diagram of Figure 2 as a combination of a sampler and quantizer, Q (28), and its output is the sampled-data signal, C(z). For the present work, to scale the range of control potentials to the input range of the A D converter, a circuit with a fixed gain of 5 was included with the usual voltage follower. Control Algorithms. The most widely used form of feedback control, whether analog or digital, is that known as proportional-plus-integral-plus-derivative, or PID (10-12,15,21-23).In this mode of control, when an analog controller is used, the characteristics of the controller are adjusted so that the following time-domain equation is implemented:

1

Figure 1. Block diagram of analog potentiostatic control system the Laplace transform variable of complex frequency. The cell, assuming it is a linear device (24) has a transfer function H ( s ) . The potential of the counter electrode with respect to that of the working electrode, or the total cell voltage, is regarded as the cell input. It is equal to the controller output voltage, which is designated - E ( s ) . The potential of the reference electrode with respect to that of the working electrode, or the inverse of the usually designated control potential, is regarded as the cell output. This signal is designated -C(s). H ( s ) thus equals C ( s ) / E ( s ) ,and the actual working-electrode control potential is +C(s). The voltage-follower, which feeds the reference electrode signal back to the summing point, has a transfer function V ( s ) ;however, for high quality amplifiers and for frequencies T, the sampling effect is not large. Because the error is on the side of overdamped response, selecting Ti = T, experimentally is a good first approximation even for digital control when T, > T. The second requirement for non-overshooting response is a bound on the controller gain, K,. This condition, from Appendix 111, is 1

1

K,S-X A eTITc - 1 The maximum speed of response here occurs when 4

A further interesting feature of this case is that for polezero cancellation (b = b l ) , the maximum bound on the gain for stability (see Equation 19) is twice that for no overshoot. For values of controller gain less than that given by Equation 24, the system risetime will be smaller. In the case of pole-zero cancellation, and for sluggish systems ( TR >> T),it can be shown that

where TRis the 63% risetime of the overall closed-loop cellcontroller system. Equations 21, 24, and 26 have also been presented by Chiu, Corripio, and Smith (23)in somewhat different forms. If both the gain and the integral time equality conditions are satisfied (Equations 21 and 241, the system closed loop transfer function, Equation 18, reduces to

which is a pure unit delay. This is the “time optimal” or minimum-settling time response (40), in which the system output for a step input reaches the desired operating point in one sampling period.

EXPERIMENTAL Control Instrumentation. A Digital Equipment Corporation Model PDP-8/e minicomputer was used, together with 4K of core memory, a Model KE8-E Extended Arithmetic Element, a Model DK8-EP Programmable Real-Time Clock, and a Model LA30 Decwriter. Other equipment consisted of a Data Technology Model MADCl2F-06 12-bit analog-to-digital ( A D ) converter and an Analog Devices Model DAC-12OZ 12-bit digital-to-analog (D/A) converter with storage register. The additional analog circuitry in the control system was of conventional operational amplifier design. The voltage follower/amplifier was adjusted to have a voltage gain of 4.88 to scale the &2-V range of the control potential to the 10-V range of the AD converter. The 1-bit resolution of the A/D converter thus corresponded to 1-mV resolution in control potential. The -3-dB bandwidth of the voltage follower/amplifier was 112 kHz. The low-pass filter was an active, single-pole, RC type. The booster amplifier was designed with a voltage gain of 2.5 to provide an output of 25 V when driven by the 10-V output of the D/A converter. It could deliver 0.5-A current, and its -3-dB bandwidth was 52 kHz. The 1-bit resolution of the D/A converter thus corresponded to -12.5mV resolution in the counter-electrode voltage. In operation, the working electrode was connected to ground and measured voltages are referred to ground. Test Instrumentation. System response wa8 monitored and recorded with a Tektronix Type 536 oscilloscope fitted with a Hewlett-Packard Model 197A camera. Multiple-trace pictures were taken with a Type 1A4 plug-in installed in the oscilloscope; cell noise pictures were taken with a Type 1A7 plug-in which had provision for a dc offset and variable filtering of the input signal. A 3-kHz low-pass filter was used. Electrolysis current-time curves were obtained by the use. of a Pacific Measurements Model 1002 logarithmic converter and an Electro-Instruments Model 400 X-Y recorder. A voltage signal proportional to the current was taken from a 20-ohm resistor in series with the counter electrode by means of a Burr-Brown Model 3450 isolation amplifier and then filtered with a 4-pole, 1-Hz active filter prior to logarithmic con. version. DC voltages were measured with a Data Precision Model 3500 digital multimeter. Cell resistances were measured at 1 kHz with an Industrial Instrumenta Model RC16B1 conductivity bridge. The analog potentiostat to which the direct digital controller was compared has been described in detail previously (41). Electrolysis Apparatus. The mercury-pool cell and its frequency-response characteristics have been described previously (24, Figure 4). The platinum-gauze working-electrode cell was designed recently for analytical coulometry and has also been described (42). Its frequency-response characteristics are virtually the same as those of a cell with similar electrode configuration that

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975

iaee

Initialize Clock interrupt Read referenceelectrode data

1

Form t w o ’ s complement

Convert t o double precision and add set point, R(z)

i Convert t o single precision and calculate output

..

TvDe

available to the D/A converter approximately 100 Fsec after the start of an A/D converter conversion cycle. The parameters and terms of the equation are then updated, which consumes -50 fisec. Control is then returned to FOCAL until the next clock interrupt occurs, at which time the process is repeated. Since the sampling time is 1 msec, approximately 850-1sec time is available for additional computation during each control cycle. FOCAL provides a very powerful method for allowing the user to change the PID parameters conveniently on-line via a keyboard terminal. It is particularly important in this situation since the algorithm coefficients are not related in a simple manner to the PID parameters. Thus, the user needs only to enter the PID parameters and FOCAL computes the proper algorithm coefficients. A FOCAL overlay then passes these coefficients to the assembly-language control program discussed above, where they are available when needed. The software also includes a feature that is used to superimpose a square wave on the steady-state setpoint, or constant control voltage, for test purposes. This involves adding an increment to the setpoint, with the duration and sign of the increment being determined by counting cycles of the control sequence. Such a scheme could also be used to generate ramps, triangular waves, or more complex waveforms in the system. A listing of the digital control program is available upon request. Procedure. For each of the cells and chemical solutions tested, the salt-bridge tubes and counter-electrode tubes were filled with supporting electrolyte. To ready the control system for an electrolysis, the operator interacts with the FOCAL program via the keyboard. To start the computer program, the letter “G” is typed. Typing the letter “V” permits selection of the amplitude of a test square wave, and the dc control voltage. Typing the letter “P” evokes a request for “K”, the proportional gain, and “TI”, the integral time, values which the operator designates. Electrolysis is then started by typing the letter “S”. The parameters “V”, “K”, and “TI” may be changed on-line without interrupting the electrolysis. Electrolysis control is halted by typing the letter “H”. For the work reported here, the cell parameters were estimated from measurements of the total cell resistance and data obtained in the cell characteristics study (24).The integral time Ti was then selected to match the estimated cell time constant T,.The gain was initially set to 1 if the particular conditions had not been previously tested. Using first a blank solution (supporting electrolyte only), control was then initiated, and the response to the superimposed square wave was observed. By increasing the gain, and to a lesser extent by trimming the integral time, the system was tuned to obtain the shortest risetime with an acceptable amount of overshoot. Electrolysis of electroactive material was then carried out using the control settings found to be optimum for the blank solution.

RESULTS AND DISCUSSION Preliminary Studies. Although t h e full three-mode, or PID, control algorithm is frequently used in process control work (IO,21-23), and it was implemented in t h e assemblylanguage computer program developed here, preliminary studies with simulated and real electrolysis cells showed t h a t there was little, if any, enhancement of response when derivative control was added t o two-mode, PI control. T h i s has been generally t r u e for analog potentiostatic control as well (25, 41). It is also known theoretically that, for t h e simple first-order cell model, optimum control can be achieved using only PI control. Finally, since t h e actual cell parameters change with time during a n eIectrolysis, finetuning with derivative action a n d its additional complexity a r e not warranted. T h u s , further studies were carried o u t by tuning only t h e proportional gain and integral time, a n d t h e effects of only these controller parameters were investigated theoretically a n d experimentally. I n t h e time domain, t h e controller equation used was (from Equation 6, for T d = 0):

E ( k ) = E ( k - 1)

+

K,

[(I

+

):

e&) - e ( k - 1)

1

(27) 1900

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975

0,001

0.01

Integr,il time, T,,

0.1

1

10

msec ( p u r e

p control

T,

C. K

= 3

Ti = 5 . 5 msec

= 5 . 5 msec

6. K

P

=

5 T, = 5 . 5 msec

Ti for stable

Unity-Gain-Cell System Stability. Of particular interest in the design of the digital control system was its behavior when the controlled system has a transfer function of unity [ H ( s ) = 11. This condition exists when the output of the controller (the counter-electrode terminal) is connected to its input (the reference electrode terminal), and a t low frequencies, when the real electrolysis cell exhibits an attenuation factor, A , of unity [ H ( s ) 1,s 01. The regions of stability for particular sets of control system parameters should be predictable from Equation 19. This aspect of system behavior was investigated by connecting the controller output to the input, varying the -3-dB frequency of the low-pass filter in the loop (see Figure 2), and determining the values of K , and Ti that resulted in limit-cycle oscillations in the system. The experimental results of these tests are shown in Figure 6. The highest filter frequency that was examined, 500 Hz, coincides with the Nyquist sampling frequency for this system ( f n = 1/22', T = 1msec) (28); this filter was retained in the system for the subsequent experiments with simulated and real cells to minimize possible difficulties with aliasing (28) of the signals at the A/D converter input. Substitution of lower frequency filters in the loop approximates the conditions encountered with real cells having a single, dominant break frequency, or pole, and A G= 1. There was fairly good agreement between the experimental results and the limits for K , and Ti calculated from Equation 19. For example, for the 500-Hz filter ( T , = 0.32 msec), and an integral time of 0.3 msec, the calculated and experimental limits for K , are both 0.4. The values of gain dealt with here are perhaps lower than one is accustomed to thinking of in the context of analog control; however, it must be remembered that it is the integral action that permits control with low error at low frequency. I t can be seen from Equation 27, when the term T/T,e(k) 0, that large values of Ti correspond to purely proportional control; under these conditions the curves in Figure 6 reach a maximum value of allowable gain. Tests with Simulated Cells. Figure 7 illustrates the nature of the signals in the system and the effect of the tuning parameters, when the controller is connected to a resistor-capacitor network simulating an electrolysis cell containing no electroactive material. Based on information concerning cell transfer functions and electrode impedances developed in the previous study (24), a number of such simulated cells were tested. In this case, Rc = 100 9, RU = 2 9, CWE = 55 @, and no counter-electrode capacitor was used (CCE a);also, CB = 51 pF and RRE = 20 kR, but these components had a negligible effect on the response in this instance. The cell time constant, T,, was calculated from ( R c + RTJ)CWEto be 5.6 msec. Equation 21 indicates that Ti should be adjusted to 5.2 msec for pole-zero cancellation ( A = 1);here, for the first three pictures, Ti = 5.5

- -

-

= 1

--+I

Flgure 6. Maximum values of Kp and minimum values of PI control with low-frequency unity-gain feedback

-+

A. K

100

D. K = 3 T i = 1.0 msec

Flgure 7. Transient response of system with a simulated cell Upper trace: counter electrode voltage, 0.3 V/div; Lower trace: reference electrode voltage, 0.2 V/div; Horizontal scale: 4 msec/div

msec. The transient responses of this network and the real electrolysis cells were tested with a 10-Hz square wave superimposed on the dc control voltage. The discrete levels of the counter-electrode voltage at the sampling period of 1 msec are clearly visible in Figure 7; the reference-electrode voltage can also be distinguished as linear segments. Qualitatively, the response of the system is overdamped in Figure 7A, nearly critically damped in C, and underdamped in B and D. In B, the gain is too high, and in D the integral time is too low, leading to overshoot and ringijg in the controlled potential. Equation 23 indicates that the maximum gain without overshoot should be -5; experimentally, from Figure 7C, it is -3. The discrepancy is probably due to the fact that the equations were derived rigorously for cells having no uncompensated resistance and no zeroes in their transfer functions. In practice, it has been found that a factor of -2 is sufficiently accurate for agreement between estimated and experimentally-optimized tuning parameter values, and for experimental adjustments in these values. For the tuning parameters of Figure 7D, the system is nearing instability; the maximum gain calculated from Equation 19 for Ti = 1.0 msec is 7.5. Controlled-Potential Electrolysis Experiments. Figure 8 shows the transient response of the system during control with the platinum-gauze-electrode coulometry cell containing supporting electrolyte without electroactive material. Previous work with cells of this type (24) revealed that CWEis very large (>lo00 pF); T , therefore was calculated from the estimated value of CCE (-100 p F for 1 cm2) and the measured value of RU + Rc (75 9 ) to be -7.5 msec. The low value for A , which is G= C C E / ( C C E+ CWE),and the high cell attenuation a t intermediate frequencies [Rv/(Ru + R c ) ;see Ref. 241, both require that the controller gain be rather high to obtain adequate response. The lower trace in Figure 8 and in the pictures presented below is the voltage at a second reference electrode that is independent of the control system, while the middle trace is the filtered and amplified voltage a t the controlling reference electrode. For this set of tuning parameters, the system 95% risetime is about 6 msec and there is 5-10% overshoot.

ANALYTICAL CHEMISTRY, VOL. 47, NO. 72, OCTOBER 1975

1901

A. Analog control

Flguro 8. Translent response of system with a platlnum-worklngelectrode cell

= +0.24 V vs. SCE, bo a 10 PA; Kp 0.5M H2S04 Supporting electrolyte; = 100, 7 3 5 msec. Upper trace: counter-electrode voltage, 2 V/dlv; MMdle trace: output of 500-Hz flker, 0.2 V/dlv; Lower trace: auxlllary referenceelectrode voltage, 50 mV/dlv; Horlzontal scale: 4 msec/dlv Time - min. 100

10 c

Y

E 1 MA 8 100 uA 1 0 LA

:,,i\i Digital control

Time

Flgure 10. Voltage slgnal at the auxlllary reference electrode. Same electrolysls condltlons as Flgure 8, wlth /& = 30 pA

Ti = 1.8 msec; ( 8 )Dlgltal control: Kp = 100, 7 = 5 msec; Vertlcal scale: 2 mV/dlv: Horlzontal scale: Imsec/dlv

(A) Analog control: Kp = 22,

- min.

Figure 0. Log vs. time for the reductlon of 2.5 mg Fe(lll) In 0.5M H2S04 at 4-0.24 V vs. SCE. Platinum-worklng electrode cell. P' = +0.44 V vs. SCE

Figure 9 shows current-time curves for the electrolytic reduction of Fe(II1) in the platinum-working-electrode cell, both with the digital system tuned as described for the blank solution, and, under identical cell conditions, with control by means of the analog potentiostat. Measurement of the dc potential between the working and reference electrodes during electrolysis by means of a digital voltmeter verified accurate control by the digital system; this is also indicated indirectly by the linearity of the log-plot. Neither the linearity of the log-plots nor the amount of noise in the electrolysis current a t low levels was affected by a wide variation of the tuning parameters of the digital or analog systems. The higher noise level in the current during digital control is caused by the quantization (28),by the AID converter, of the potential a t which the cell is controlled. The contrast in the noise level in the control-potential signal in the two systems is shown in Figure 10, where random, sharp excursions in potential of the order of 1-3 bits can be distinguished in the digital system. Although only a few millivolts in magnitude, this causes variations in the current that are fairly large, especially when a reversible or quasireversible couple is present, and the electrolysis is near equilibrium. Digital control of potential with the mercury-pool cell was also satisfactory. Although the working electrode capacitance is much lower than that of the platinum-electrode cell, with 0.5M H@Od electrolyte, the cell time constant is not greatly different. For the blank solution, CCE and CWEare both -100 pF, giving a series equivalent of 50 pF; the cell resistance, RU + Rc is -90 a, thus T, 4.5 msec. For the experiments with copper and uranium, therefore, Ti was selected to be 5 msec. The attenuation factor of this cell is generally nearer 1 than that of the platinumelectrode cell (24); thus good control can be effected with 1002

m

Flgure 11. Translent response of system with mercury-pool cell during the reductlon of Cu(ll) to Cu(Hg) In 0 . 5 M HzS04 at -0.15 V vs. SCE. Kp = 25, = 5 msec (A) Near beglnnlng of electrolysls, /do = 40 mA; (E) Near end of electrolysls and blank solutlon, /do IZ: 10 PA. Upper traces: counter-electrode voltage: (A) 2 V/dlv: (E) 1 V/dlv; Middle traces: output of 500-Hz fllter, 0.2 V/dlv; Lower traces: auxlllary reference-electrode voltage, 50 mV/dlv; Horlzontal scale: 4 msec/dlv

less gain. The transient response of this system with the cell containing only supporting electrolyte and during the reduction of Cu(I1) is shown in Figure 11. The spike preceding the main rise in potential (Figure 11B) is due to residual, uncompensated resistance in the circuit wiring connected to the working electrode, and is not a significant feature. Figure 11 shows that the risetime of the system is increased significantly, compared to that of the blank solu-

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975

-

100 uA

10 uA

I

0

2

4

6

8 Time - m i n

10

1 2 1 4

Flgure 12. Log /& vs. time for the reduction of U(VI) in 0.5M H2SO4 at -0.325 V vs. SCE with the digital control system and mercurypool cell. Kp = 10, Ti = 5 msec

tion, when a large electrolysis current is flowing in the cell. Here the 95% risetime is changed from -3 msec to -40 msec. This effect is also well-known for analog systems, and is a result of the way the cell transfer function changes under these conditions (24, Figures 16 and 18). When the dc current is high, the impedances of both the counter and working electrodes are low (CCE,CWE a);this decreases the low-frequency attenuation factor A , and the cell tends to resemble a simple voltage divider, R u / ( R u Rc). A similar effect occurs at low dc current levels when a reversible couple is present in the solution, the electrolysis is a t equilibrium, and the control potential is near the formal potential for the couple (24, Figure 18). The controller gain could be increased to compensate for the change in cell transfer function; however, at low current levels, the system would then be underdamped and, in the case of the digital system, probably would be unstable. Although no detrimental effect arising from the decreased response has been detected, this is a situation where the control system could be refined through adaptive or automatic tuning (13, 14, 43) control techniques. A possible source of difficulty to proper control is system nonlinearity. It was found in the cell characteristics study (24) that the Cu(II)/Cu(Hg) system causes the cell to be significantly nonlinear in the region of 10.04 V vs. SCE. Operation of the digital system a t these potentials, however, revealed no detectable change in performance. Figure 12 shows current-time curves for the reduction of U(V1) in 0.5M H&04 by means of digital control. Under accurate potential control, the log idc vs. t plot is concave upward, as it is here, because of the intermediate disproportionation of U(V); whereas, if the potential becomes less negative, the plot is linearized (18). Figure 13 illustrates the response of the system under considerably higher-resistance electrolyte and cell conditions. In this case, the total cell resistance was 700 Q, and from previous measurements (24), CCE = 120 WFand CWE = 88 wF.The cell time constant thus was -35 msec. The controller integral time was set to 40 msec, giving the slightly underdamped response shown and a 95% risetime of -12 msec. This was satisfactory for electrolyses involving the reduction of Fe(II1) and the oxidation of Fe(I1) in this medium. The quality of the potential regulation during the reduction of 3 mg of Fe(III), near the beginning of the electrolysis, is shown in Figure 14. Most of the irregularities in the waveform here are due to stirring; this obscures the quantization noise described above.

Flgure 13. Transient response of system with mercury-pool cell

-

0.15MOxalic acid, 0.15MK2C204,pH 2.7. 4 0 = -0.40 V vs. SCE, & 10 PA, Kp = 30, F = 40 rnsec. Upper trace: counter-electrcde voltage, 3 V/dk Middle trace: output of 500-Hz fllter, 0.5 V/div; Lower trace: auxiliary reference-electrode voltage, 100 mV/div; Horlzontalscale: 4 msecldiv

-

+

CONCLUSIONS The experiments demonstrate that direct-digital control of electrode potential is a viable alternative to conventional analog control, at least for laboratory-scale controlled-potential electrolysis cells. It has been shown that the digital system can meet the performance specifications outlined

Flgure 14. Voltage signal at auxiliary reference electrode during reduction of Fe(lll)in oxalate electrolyte in the mercury-pool cell idc

= 40 mA; Vertical scale: 20 mVldiv; Horlzontalscale: 5 msec/div

for typical analytical and synthesis work. Moreover, the theory developed for tuning the control system appears to be very useful, even though the cells are known to be considerably more complex than the simple model assumes. Having this information is essential to successful control by means of the computer/controller, because this system cannot be simply turned on, “hoping for the best”, as is usually done with analog potentiostats. The importance of using a well-designed cell (good dc potential distribution and minimum phase shift), as a prerequisite for a good potential control, cannot be overemphasized. Cells with larger working and counter electrodes, and cells of higher resistance, such as those for organic electrochemistry in nonaqueous solvents, should also be amenable to the digital control technique. However, an important consideration in this case, if the integral time is matched to the cell time constant, is that it must be ensured that the term ?“/Tie&) in the control algorithm (Equations 6 and 27) does not become so small that errors arise due to roundoff or truncation in the computer (43, 44). It should also be possible to operate the digital system with cells having small-area working electrodes, such as those for voltammetry a t stationary or solid electrodes, except where very fast response is desired. Tests of equivalent circuits for this type of cell have been successful (the parameters of the simulated cell described above are not unlike those of a platinum-electrode voltammetric cell). However, at the present stage of the development of the digital controller, the relatively low tolerance of the system to changes in the cell transfer function toward unity gain probably precludes its use in dropping-mercury-electrode work. Further development of this concept, incorporating features suggested in the introduction, first requires attention to three remaining problems in the control, none of which are particulary difficult. One is that the present system does not recover properly from long-term, output-voltage limiting. The second, described more fully above, is that the system tuned to high gain is not stable under unity-

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975

*

1903

gain-cell conditions; this will require attention to the manner of switching the controller to the cell and to ways of handling possible unity-gain fault conditions. The third feature that should be corrected is the quantization noise effect. The resulting current noise could be filtered expediently, but a better solution would be to make the quantization noise negligible by the use of a 16-bit A/D converter. As it stands now, the digital controller is very easy to use and very flexible, especially in the manner of tuning and the type of command waveform that can be used.

APPENDIX I Equation 2 can be transformed to the s-domain very simply term-by-term by using the Laplace-transform pairs: f(t) F ( s ) , ff(t)dt F(s)/s, and df(t)/dt s F ( s ) . This yields

-

-

-

To obtain the z-transform,pf Equations 2 and AI, the term (1 - z - l ) / T is substituted for s (45) in Equation Al. This gives

...

m

Rearranging and collecting terms yields D(z) = K, x

L

1-

J (A41

2-1

which is the PID equation in z-space. The discrete-time form, Equation 6, can also be obtained from D ( z ) by noting that in general, if Y(2) =

+ +

a.

1

airi

+ +

a2z-2

+

b 2 r 2+

. a,z"" . . . b,z" , ,

( A5)

which reduces to

This is always true because k l k 2 > 0 and bl < 1; see Equations 13-15. The second condition, in which z = -1, requires that c 2 - c1

+

cg

>

0

(A14

This inequality reduces to kik,


I c d . Looking first a t c:! < -cot this reduces to

Then examining c2 > CO, this becomes

This is always true since k l k 2 > 0, b < 1, and bl is always positive. Thus, the question now is whether Equation A15 or A16 is the more restrictive condition. Starting from the known inequality bl < 1,the following can be formed l + b 2< -l + b 1 + b, bi Equation A15 therefore is the more restrictive, and it will delineate the stability of the overall system. Written in terms of the original system parameters, Equation A15 becomes Equation 19.

APPENDIX 111 The approach used to derive expressions for the controller gain, K , , and integral time, Ti,for non-overshooting system response is to determine the conditions under which the step response is non-oscillatory. The system closed-loop response, Equation 18, by solving the quadratic for the denominator, can be written

where

APPENDIX I1 For the stability analysis, the characteristic function of the system can be written F(2) = c222

+

ciz

+

cg

( A7)

01

=

1 2[(1 +

b) - k l k , ]

1 fi = -2 [ ( l + b - k 1 k J 2 - 4(b - b,k1k2)]1'2

(MO) (MI)

The system step response in the z-domain is given by

where ( -48)

c2 = 1 CI

= [ k l k , - (1 - b)]

( -49)

= b - kik,bi

(A10)

CO

For the cell-controller system to be stable, it is required (39) that the following conditions be satisfied: F(l)

>

0, F(-1)

>

0, and

~2

>

IcgI

U(z) =

z 2 - 1

Combining Equations A19, A22, and A23 yields

(All)

Satisfying the first of these conditions requires, for z = 1 in Equation A7, that 1904

where U ( z )is the unit step function in the z-domain:

The inverse transform of Equation A24 to the time domain is found by applying the residue theorem (46);this gives

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975

Td

= derivative time, Equations 2 and 6

TD = derivative time constant, Equation 1 Ti = integral time, Equations 2 and 6 TI= integral time constant, Equation 1 TR = control system 63%risetime For a non-oscillatory step response, the roots ( a - P ) and (a 0) must be real, positive, and have values less than unity so that the signs of (a- P)k a n d ( a P)k do not alternate. Examining first the condition for a and @ to be real, it is seen from Equation A20 that, because b, k l , and k2 are positive real, cy m u s t be positive real. It can also be shown that, for P to be real, the following condition must hold

+

+

bj

This defines the bound for

2

b

u(k) = time domain function, Equation A6 U ( z ) = unit step function V ( s )= voltage follower/amplifier transfer function y(k) = time domain function, Equations A6 and A25 Y ( z )= system step response z = z-transform, discrete-time variable 2 = z transformation CY = defined by Equation 19 @ =defined by Equation 20 n = ohms

(-426)

Ti,the integral

time; substitution of t h e system parameters for bl and b yields E q u a t i o n

20.

ACKNOWLEDGMENT Discussions with T. A. Bruhaker were very helpful d u r ing this work.

LITERATURE CITED

P is by definition also a positive quantity, thus a - /3 5 a

+ P; however, t o keep the function unipolar and stable, the following is required:

0 5 a - p 5 a + p s 1

(M7)

+

It can be shown that CY p is always less than or equal to 1. T h e remaining requirement t h a t 0 I CY - p, i.e., that CY 1 p leads t o klk,

b bi

5 -

which, upon substitution of the system parameters for k l , kz, b, and b l , yields the gain bound Equation 23.

NOMENCLATURE ao, a l , a2 = coefficients in control algorithm (Table I); also gener-

alized coefficients A = cell low-frequency attenuation factor b = defined by Equation 16 bl = defined by Equation 15 b l , b2 = generalized coefficients CO, C I , c2 = coefficients defined by Equations A10-A8, respectively C B = cell bridging capacitance CCE = counter-electrode double-layer capacitance CWE= working-electrode double-layer capacitance C ( s ) ,C ( z ) = control system output (reference-electrode voltage) D ( z ) = digital control algorithm transfer function e, e(s), e ( z ) = error signal = dc control voltage E ( s ) ,E ( z ) = controller output (counter-electrode voltage) f n = Nyquist sampling frequency f ( t ) ,F ( s ) = generalized functions F ( z ) = control system characteristic function G ( s ) = analog controller transfer function H ( s ) ,H ( z ) = cell transfer function idc = dc electrolysis current I(k) = numerical approximation to integral J ( s ) = filter transfer function k l = defined by Equation 13 kz = defined by Equation 14 k = integer variable, equivalent to kT for uniform interval sampling K , = controller proportional gain m, n = indexes P ( s ) ,P ( z ) = D/A-converter, zero-order hold transfer function Q = quantizer Rc = compensated cell resistance !?(SI, R ( z ) = control system input, set point, command signal Ru = uncompensated cell resistance s = Laplace transform variable, complex frequency t = time T = sampling time or period T,= cell time constant, Equation 9

Smith, Crlt. Rev. Anal. Chem., 2, 246 (1971). (2) D. E. Smith, in "Electrochemistry: Calculation, Simulation, and Instrumentation", J. S. Mattson, H. B. Mark, Jr., and H. C. MacDonald. Jr.. Ed., Marcel Dekker, New York, N.Y., 1972,pp 416-419. (3) S.P. Perone, D. 0. Jones, and W. F. Gutknecht, Anal. Chem., 41, 1154 ( 1969). (4)G. Lauer and R. A. Osteryoung, Anal. Chem., 40 (IO), 30A (1968). (5)L. Ramaley, Chem. Instrum., 6, 119 (1975). (6)T. Kugo, Y. Umezawa, and S.Fujiwara, Chem. hsfrum., 2, 189 (1969). (7) W. W. Goldsworthy and R. G. Clem, Anal. Chem., 43, 1718 (1971). (8)W. W. Goldsworthy and R. G. Clem.. Anal. Chem., 44, 1360 (1972). (9) W. R. White, Anal. Left., 5 , 675 (1972). 10) "Progress in Direct Digital Control", T. J. Williams and F. M. Ryan, Ed., Instrument Society of America, Pittsburgh, Pa., 1969. 11) L. 8. Koppel, in "Annual Reviews of Industrial and Engineering Chemistry, 1970", V. W. Weekman, Jr., Ed., American Chemical Society, Washington, D.C.. 1972,Chap. 8. 12) T. J. Harrison, in "Handbook of Industrial Control Computers", T. J. Harrison, Ed., Wiley-lnterscience, New York, N.Y., 1972,Appendix C. 13) V. W. Eveleigh, "Adaptive Control and Optimlzation Techniques," McGraw-Hill, New York, N.Y., 1967. 14) T. J. Williams, Instrum. Techno/., 16 (I), 37 (1971). 15) F. G. Shinskey, "Process Control Systems", McGraw-Hill, New York, N.Y., 1967,pp 144-149. (16)R. Bezman, Anal. Chern., 44, 1781 (1972). (17)D. Britz and W. A. Brocke. J. Electroanal. Chem., 58, 301 (1975). (18)F. B. Stephens, F. Jakob, L. P. Rigdon, and J. E. Harrar, Anal. Chem., 42, 764 (1970). (19)R. E. Dessy, P. Janse-Van Vuuren, and J. A. Titus, Anal. Chem., 46, 917A (1974). (20)R. E. Dessy, P. Janse-Van Vuuren, and J. A. Titus, Anal. Chem., 46, 1055A (1974). (21)J. B. Cox, L. J. Hellums, T. J. Williams, R. S. Banks, and G. J. Kirk, Jr., /SA J., 13 (lo),65 (1966). (22)J. A. Cadzow and H. R. Martens, "Discrete-Time and Computer Control Systems", Prentice-Hall, Englewood Cliffs, N.J., 1970,pp 100-106. (23)K. C. Chiu, A. B. Corripio, and C. L. Smith, lnstrurn. Contr. Syst., 46, (12),41 (1973). (24)J. E. Harrar and C. L. Pomernacki, Anal. Chem., 45, 57 (1973). (25)J. E. Harrar, in "Electroanalytical Chemistry". Vol. 8, A. J. Bard, Ed., Marcel Dekker, New York, N.Y., 1975,Chap. 1. (26) Reference 15,pp 119-120. (27)Reference 22,p 26 and Chap. 4. (28) P. C.Kelley and G. Horlick, Anal. Chem., 45,518 (1973). (29)G. L. Booman and W. B. Holbrook. Anal. Chem., 35, 1793 (1963). (30)J. A. Cadzow, "Discrete-Time Systems", Prentice-Hail, Englewocd Cliffs, N.J., 1973 pp 5-13. (31)J. E. Harrar and I. Shain, Anal. Chem., 38, 1148 (1966). (32)J. Newman and J. E. Harrar, J. Electrochem. SOC.,120, 1041 (1973). (33)J. G. Truxal, "Introductory System Engineering", McGraw-Hill, New York, N.Y.. 1972,pp 113-117. (34) E. R. Brown, D. E. Smith, and G. L. Booman, Anal. Chem., 40, 1411 (1968). (35)B. C . Kuo. "Automatic Control Systems", 2nd ed., Prentice-Hall, Englewood Cliffs, N.J., 1967,pp 231-234. (36) S. M. Shinners, "Modern Control Theory and Applications", AddisonWesley, Reading, Mass.. 1972,pp 174-176. (37) Reference 22,p 205. (38) Reference 22,pp 211,218. (39)B. C. Kuo, "Discrete-Data Control Systems", Prentice-Hail, Englewwd Cliffs. N.J.. 1970.II 134. (40)Reference 22,p 5 2 . (41)J. E. Harrar and E. Behrin. Anal. Chem., 39, 1230 (1967). (42)L. P. Rigdon and J. E. Harrar, Anal. Chem., 46,696 (1974) (43)J. Rogers, lnstrum. Contr. Syst., 44, (a),97 (1971). (44)Reference 15, pp 120-121. (45)Reference 22,pp 211,411. (46)Reference 39,p 47. (1) D. E.

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975

1905

RECEIVED for review April 22, 1975. Accepted June 27, 1975. This work was performed under the auspices of the U.S. Energy Research and Development Administration. Presented at the 169th Meeting, ACS, Philadelphia, Pa., 1975. Reference to a company or product name does not

imply approval or recommendation of the product by the University of California or the U.S. Energy Research and Development Administration to the exclusion of others that may be suitable.

Use of Pulsed Direct Current Potential to Minimize Charging Current in Alternating Current Polarography A. M. Bond and R. J. O'Halloran Department of Inorganic Chemistry, University of Melbourne. Parkville, Victoria, 3052, Australia

The use of a pulsed dc potential rather than the usual linear ramp In ac polarography Is descrlbed. By measurlng the dlfference In alternatlng current In the presence and absence of the pulse, subtraction of the charging current from the readout can be achieved. An approxlmate theoretlcal treatment of the technique, called differential pulse ac polarography, is presented and experimentally verified. Conslderable advantages over normal ac polarography are exhlbNed. Partlcularly when coupled with phase selective detection, almost complete dlscriminetion against charging current ls possible, even at high frequencies and with concenM. A Convenient readout shape retrations well below sults, with the peak-to-peak current parameter being linearly dependent on concentration. Whlle considerably more theoretlcal and experlmental research Is required for a thorough evaluation of this technique, results demonstrate that the use of a pulsed dc potential ramp can make an important addltion to ac polarographic techniques. Comparison wlth dc differential pulse polarography Is also presented to show the complementary nature of the ac and dc methods.

Polarographic techniques have an inherent charging current contribution present as an integral part of the experiment. The charging current, which is independent of the concentration of electroactive species, constitutes part of the total current flowing through the cell. It thus needs to be subtracted so that the concentration-dependent faradaic current can be measured. At low concentrations of the electroactive species, the charging current contribution becomes larger than the faradaic current and accurate corrections are difficult or impossible. The concentration of electroactive species a t which the charging current equals the faradaic current establishes the limit of detection. Several methods for overcoming the charging current problem are currently available. In dc polarography, the use of pulse and differential pulse techniques (instead of a linear dc potential ramp) discriminates against charging current ( I ) . With ac polarography, a sinusoidal voltage is normally applied to a linear dc ramp. The resultant ac current contains a significant charging current due to the capacitive nature of the electrode. This charging current can be shown to be 90' out of phase with the input signal. Since the faradaic current is usually 145O out of phase, the use of a phase-selective detector to measure the in-phase component enables discrimination against the charging current (2, 3). At high frequencies, however (2-6), nonideal behavior and uncompensated resistance prevent complete rejec1906

tion of the charging current; and sloping base lines and other undesirable phenomena limit the detection level. In the present work, the use of a differential pulse dc ramp as an alternative to a linear dc ramp is shown to provide a substantial improvement in ac polarography. Figure 1 shows a schematic diagram of the technique. The measurement of the difference in alternating current with and without the application of the pulse effectively subtracts out the charging current from the readout via a readily implemented electronic approach and provides a curve of extremely convenient shape for use in analytical work (see Figure 2 for example). The peak-to-peak current (Ai,-,) is a linear function of concentration and, since this parameter can be measured from the top of the positive peak to the bottom of the negative one, no base-line estimation is necessary. EXPERIMENTAL All chemicals used were of reagent grade purity. Cadmium solutions were prepared in 1M K N 0 3 supporting electrolyte. Solutions were thermostated at 25.0 f 0.1 "C and degassed with argon for 10 minutes. Polarograms were recorded using a Princeton Applied Research Corp, Princeton, N.J., Model 174 Polarographic Analyzer. A PAR Model 129 two-phasehector lock-in amplifier was used to obtain phase selective and total current measurements. An external ac sinewave oscillator (Optimation Inc; Model RCD-10) provided both the input and reference signals. The polarographic analyzer and ac circuitry were interfaced with PAR accessory 174/50.The pulsed ramp and differential amplifier were those normally used in the differential pulse polarography mode of the 174 Polarographic Analyzer. To minimize instrumental artifacts of the kind recently reported (7), time constants in the sample-and-hold circuitry were decreased by a factor of 100 compared with those supplied by the manufacturer. All measurements were made with a three-electrode system with Ag/AgCl as the reference electrode and platinum as the auxiliary electrode.

THEORY In differential pulse dc polarography, large current magnitudes per unit concentration are obtained with minimal charging current contribution. A periodic potential pulse of fixed amplitude E, is applied to the normal dc voltage ramp just prior to the end of drop life. The dc current is measured immediately before pulse application and again towards the end of the pulse duration. The difference between these two values of current is electronically stored (using sample-and-hold circuitry) and presented to a suitable readout device. The majority of the charging current is effectively subtracted out, although a small concentration independent dc component remains (8). If a similar pulse is now applied to the voltage ramp used

ANALYTICAL CHEMISTRY, VOL. 47, NO. 12, OCTOBER 1975