Anal. Chem. 1995, 67, 4458-4461
Multicomponent Kinetic Determinations Using Artificial(Neural Networks SebastiBn Ventura, Manuel Silva, and Dolores P&w-Bendito* Department of Analytical Chemistty, Faculty of Sciences, Univetsity of Cbrdoba, E- 14004 Cbrdoba, Spain Msar Hervas Department of Mathematics and Computer Science, Universw of Cbrdoba, E- 14004 Cbrdoba, Spain
Neural networks were successfully used for multicomponent kinetic determinationsof species with rate constant ratios approaching unity without the aid of spectral discrimination. The ensuing method relies on two inputs describingthe profile of the kinetic curve for each mixture, which is obtained by preprocessing kinetic data using nonlinear least-squares regression. A StraightEorWard network architecture (2:4s:21) was used to resolve mixtures of 2- and 3-chlorophenol; the trained network estimated the concentrations of both components in the mixture with a relative standard error of prediction of -5%, which is much lower than that obtained with Kalman filtering. The effect of some variables such as the rate constant and analyte concentration ratios on the proposed multicomponent determination is discussed. Chemometric techniques are being used increasingly in multicomponentkinetic determinations on the grounds of the high computational power of current computers, which allow processing of the huge amounts of information produced by experimental kinetic work. Recent approaches to the problem have been aimed at circumventing the primary shortcomings of classical differential reaction rate methods (e.g., the logarithmic extrapolation and proportional equation methods), namely their inability to accurately resolve mixtures of components with rate constant ratios approaching unity.' Multicomponent kinetic determinations are currently performed in two main ways, viz., with or without the aid of spectral discrimination (absorbance-wavelength-time measurements). Both are essentially employed to resolve binary or ternary mixtures with the greatest possible kinetic discrimination (viz., the lowest possible rate constant ratio) and accuracy, occasionally with no prior knowledge of the rate constants involved. For kinetic data recorded at a single wavelength (in the absence of spectral discrimination), the recently developed linear &,Iman however, performance short provides quite good when the rate constant ratio approaches unity-in addition, the algorithm requires the rate constants to be invariant from run to r ~ n . ~This - ~ requisite can be avoided by using the extended Kalman filter algorithm, convergence of which, however, relies heavilv on the inDut Darameters and number of iterations per(1) Mottola, H. A,; Perez-Bendito. D. Anal. Chem. 1994,66, 131R-162R. (2) Wentzell, P. D.; Karayannis, M. I.; Crouch, S. R. Anal. Chim.Acta 1989, 224,263-274. (3) Xiong, R;Velasco, A; Silva, M.; Perez-Bendito, D. Anal. Chim.Acta 1991, 251, 313-319.
4458
Analytical Chemistty, Vol. 67, No. 24, December 15, 1995
formed. So far, the only effective way of accomplishing kinetic discrimination was to simultaneously record kinetic information at various wavelengths (by exploiting kinetics and spectral discrimination jointly) by means of a diode array spectrophotometer. Newton-Gauss nonlinear regre~sion,~ factor analysis,6 principal component regre~sion,~ Kalman filterin8 and leastsquares regressiong have been successfully used for multicomponent kinetic determinations based on this principle. While the results are usually quite good in terms of accuracy and the lowest rate constant ratios afforded, application of the above-mentioned approaches requires differencesin the spectral features, in general, of the resulting products, which occasionally can only be accomplished through complexation or ligand displacement reactions. Consequently, these approaches are useless for multicomponent kinetic determinations based on monitoring the resulting product (or the reagent added to the analyte mixture). This renders spectral discrimination impossible, as in the resolution of many organic compounds by redox reactions, which is the core of noncatalytic kinetic applications. New methodologies affording maximum kinetic discrimination without the aid of spectral discrimination, which is most often unavailable, are required. ArfAicial neural networks (A"$ have lately aroused increasing interest from analytical chemists and have become a practical tool for solving a variety of problem^.'^-'^ Their potential for estimation of kinetic analytical parameters by use of small kinetic data sets with some advantages over classical parametric methods was recently dem~nstrated.'~This paper reports a new approach to multicomponent kinetic determinations using no spectral discrimination but only an A". Kinetic data are recorded at a single wavelength, and straightforward preprocessing of the kinetic curve using nonlinear least-squares regression provides the ANN inputs. The results thus obtained are compared with (4) Forster. E.; Silva, M.; Otto, M.; Perez-Bendito, D. Anal. Chim. Acta 1993, 274,109-116. (5) Cladera, A; Gomez, E.; Estela, J . M.; Cerda, V. Anal. Chim.Acta 1993, 272,339-344. (6)Cladera, A;Gomez, E.; Estela, J . M.; Cerda, V. Anal. Chem. 1993,65, 707715.
(7) Blanco, M.; Coello, J . ; Itumaga, H.; Maspoch, S.;Riba, J . ; Rovira, E. Talanta 1993,40,261-267. (8) Quencer, B. M.; Crouch, S. R Anal. Chem. 1994,66, 458-463. (9) Blanco, M.; Coello, J . ; Itumaga, H.; Maspoch, S.; Riba, J.Ana1. Chem. 1994, 66,2905-2911. (10)Zupan, J . ; Gasteiger, J . Anal. Chim. Acta 1991,248,1-30. (11) Blank, T. B.; Brown, S. D. Anal. Chim.Acta 1993,277, 273-287. (12) Bos, M.; Bos, A; van der Linden, E. Analyst 1993,118,323-328. (13) GBppert, J.; Rosenstiel, W. Fresenius]. Anal. Chem. 1994,349,367-371. (14) Ventura, S.; Silva, M.; Perez-Bendito, D.; Hervas, C. Anal. Chem. 1995, 67,1521-1525. 0003-2700/95/0367-4458$9.00/0 0 1995 American Chemical Society
those provided by Kalman filtering for validation. The strengths and weaknesses of the proposed neural network modeling approach were assessed by applying it to the resolution of mixtures of phenol compounds by oxidative coupling to N,Ndiethyl-kphenylenediaminein the presence of hexacyanoferrate (HI) ion, the reaction being monitored via changes in the absorbance of the dye formed. Both this reaction and its kinetics were described in detail in a previous paper.15
A Time
Figure 1. Schematic diagram of the foundation and architecture of the artificial neural network used for multicomponent kinetic determinations.
EXPERIMENTAL SECTION
Computational work was performed by using the extended “delta-bar-delta”back-propagation algorithm routines included in the Neuralworks Professional I1 software package, which was run on a Sun workstation. Sigmoidal and linear functions were used for the hidden and output layers, respectively. All other software used was included in the SAS/STAT package,16which was also run on the Sun workstation. Thirty samples containing 2- and khlorophenol concentrations between 2 and 18 ,uM were prepared as described e1se~here.I~ The concentration of both chlorophenols in the 1:l mixture was 2 pM (absorbance signal about 0.150), and the other mixtures were prepared accordingly. Kinetic photometric data were recorded at 660 nm at a rate of 0.5 s/point using an instrumental setup consisting of a Metrohm 662 spectrophotometerfurnished with an immersion probe that was interfaced to a Mitac PGAT 12-MHz compatible computer equipped with a PC-Multilab PCL 812PG 12-bit analog-to-digital converter. BASIS OF THE METHOD
Provided that signal changes are proportional to the initial analyte concentration, the signal measured at time t in a multicomponent kinetic determination, S,, is given by
where SAand SBare the signal increments resulting from the full conversion of species A and B in the mixture, and k A and k g are their pseudo-first-order constants. The principal issue to be addressed in multicomponent kinetic determinationsusing a neural network is the selection of the type and number of inputs to be used. A small number of inputs reduces network complexity and learning time, as well as the number of standards needed to train the network, which is of a great practical significance. We tested various approaches to select which and how many inputs were needed to ensure acceptable kinetic discrimination. Initially, we used up to 15 Sr values, uniformly distributed along the kinetic curve for the mixture as inputs (similar to the approach we previously employed for estimation of kinetic analytical parameters using A”s’3; however, the relative standard error of prediction (%SEP) was very high for both components (over 15%at best). Similar results were also obtained by using as inputs the number of principal components found by preprocessing kinetic data for the mixture using principal component analysis BCA) . The method for multicomponent kinetic determinations used in this work relies on appropriate selection of ANN inputs describing the profile of the kinetic curve for each mixture in order (15) Velasco, A.; Rui, X.; Silva, M.;Perez-Bendito, D. Talanta 1993,40, 15051510. (16) SAS/STAT, User’s Guide; SAS Institute, Inc., Cary, NC, 1989.
to achieve the maximum possible kinetic discrimination between its components. Equation 1 can be fitted to the following exponential function using nonlinear least-squares regression:
S, = sT[1 - exp(-kt]
(2)
where & and k are related to the true values of SA,Sg, k A , and k B . k can be considered the estimated rate constant for the mixture, approaching k A as the contribution of component A in the mixture increases, and vice versa. In resolving a given sample, k A and k B remain essentially constant-at the most, they undergo small changes from run to run-so & and k are formally related to SAand SB. However, the mathematical relation between these variables is very difficult to derive analytically and overly complicated anyway, so no attempt at approaching multicomponent kinetic determinations using statistical parametric methods has so far been made. The high capacity of A ” s for empirical modeling of data without using the mathematical relation between the variables allows relationships between parameters to be derived by training on mixtures of known composition. Briefly (Figure l), the ST and k values obtained by nonlinear regression from the kinetic curve for the mixture concerned are used as inputs to the network in order to obtain SAand SBor the concentrationsin the mixture as outputs by means of a very simple neural network architecture and no need for prior knowledge of the rate constant for each component. RESULTS AND DISCUSSION
We chose the oxidative coupling reaction of N,N-diethyl-pphenylenediamine with Bchlorophenol (2-ClPh) and khlorophe no1 (3-ClPh) as the experimental chemical system to assess the performance of A ” s in multicomponent kinetic determinations. These two compounds were selected on the grounds of their similar rate constants, viz.,(2.43 f 0.02) x and (1.77 It 0.02) x s-I for 2-C1Ph and 3-ClPh, respectively (the constant ratio was thus k 2 C p h / k X p h = 1.37).15 Characterization of the Data Set. Thirty synthetic samples containing the analytes in [2-ClPhl/[3-ClPhl ratios from 9 1 to 1:9 were analyzed in triplicate. The selected range was adopted for comparison with the results obtained using the Kalman filter algorithm in previous work.15 A data set consisting of 20 synthetic samples with [2-ClF’h]/[3-ClF’h] ratios from 51 to 1:5 was used to optimiie the variables affecting performance in the proposed multicomponent kinetic determination. The full data set was used to evaluate the scope of application of the approach. The cross validation (CV) method was used in every case to ensure the maximum possible accuracy in the results. One of the standards used was removed, and all others were included in the training set; after such a set was determined, the previously excluded Analytical Chemistry, Vol. 67, No. 24, December 15, 1995
4459
7 6 4
12
n w
-
9-
- "- I -
w
s
0
6-
2
4
6
'
kA k,
8
1012
0
2
4
6
'
8
1012
kA k,
Figure 3. Plots of %SEP as a function of the rate constant ratio
using simulated data: (A) faster component and (B) slower component in a binary mixture. Rate constant for the slower component, 2 x lo-* s-l. Simulated kinetic curve for each data set, 200 points at 1 s/point. Signal range assayed, 5:1-1:5.
3-
0 ; 0
I
I
I
I
I
50
100
150
200
250
300
Data Acquisition Time, s Figure 2. Effect of the reaction time region used on the relative
standard error of prediction in the simultaneous determination of chlorophenols using an ANN. (0)2-ChPh and (H) 3-ChPh. standard was submitted for prediction. This procedure was repeated for every standard. While this entails a higher computational (time) investment, it ensures a wider scope for the network from a small number of standards, which is of great practical interest. The small size of the data set used in this work can be ascribed to the good representativeness of the sampling parameters (& and A) with regard to the population. This is corroborated by the low relative standard errors of prediction found in this work (see below). Similar approaches have been reported in the literature.17 Effect of the Reaction Time Region. The architecture of the neural network used to study the topological region of the kinetic curve from which the two inputs could be obtained by nonlinear regression (NLR) was 2:4s:21 [viz., four nodes in the hidden layer and two outputs with sigmoidal (s) and linear functions (I), respectively]. Once the different kinetic parameters affecting mixture resolution are evaluated, the architecture is reoptimized. Based on the kinetic behavior of the mixture studied, a reaction time of 240 s was long enough for the whole kinetic curve to be recorded. Although using the full kinetic data resulted in the best NLR fitting parameters and hence allowed small variations in data between runs to be readily offset, it is occasionally desirable to shorten the data acquisition time-particularly in dealing with slow reactions-which entails assessing the performance of the ANN by using different time regions to derive its inputs by NLR As can be seen in Figure 2, the S E P increased linearly with decreasing reaction time. %SEP values were moderately high at short reaction times, as the likely result of the systematic error made being largely offset by the capacity of the neural network. A compromise must thus be made between accuracy and expedition in the analyses. We therefore chose to use the whole kinetic curve obtained by NLR in subsequent experiments. Under these conditions, the %EP values for 2-ClPh and 3-ClPh were 2.47% and 4.23%, respectively. Effect of the Rate Constant Ratio. The influence of such an important parameter on the performance of the ANN in the (17) Zupan, J.; Gasteiger, J. Neural Networks for Chemists. An Introduction; VCH: Weinheim, 1993. 4460 Analytical Chemistty, Vol. 67, No. 24, December 15, 1995
proposed multicomponent kinetic determination was studied by using simulated noisy kinetic data in order to check the effect over a wide range of rate constant ratios. The observed trends could thus be extrapolated to real data. For this purpose, a simulated data set similar to real data was used in which the measurement noise variance was taken to be 10-6 x 102*bS, which is quite realistic (it is equivalent to assuming the standard deviation for the transmittance was 0.002 unit). Figure 3 shows the variation of S E P as a function of the rate constant ratio for both components, and Table 1 gives the regression parameters obtained by plotting the estimated signals against their real counterparts. As can be seen, the predictive ability of the network was very good, particularly at rate constant ratios close to unity, where eq 2 fitted eq 1 especially closely. Higher constant ratios resulted in deviations from this fit and, while the network effectively offset the systematic error involved, the S E P increased as a result; in any case, the errors were fairly small and the regression parameters quite acceptable (Table 1). Mixtures of components with rate constant ratios of this order should pose no problem, as they can readily be addressed by the classical differential reaction rate method and therefore require no A". Effect of the Analyte Concentration Ratio. The influence of this parameter was assessed by using a data set derived from the whole kinetic curve recorded for each mixture assayed in [2-ClPhl/[3-ClPhl ratios from 9:l to 1:9 (30 synthetic samples). The results showed %EP to increase with increasing width of the concentration ratio for both components. Thus, expanding the ratio from 51-1:5 to 91-1:9 raised the %SEPfrom 2.47%to 4.52% for 2-ClPh and from 4.23% to 6.20%for 3-ClPh. Such an increase can be ascribed to a smaller contribution of the less concentrated component to the mixed analytical signal, consistent with the usual behavior of mixture resolution procedures. In any case, the results are quite good-%SEP values are acceptable for the wide range of afforded analyte concentrations in the mixture-in relation to those provided by other methods for mixtures with a rate constant ratio close to unity, as shown below. This testifies to the efficiency of A " s for multicomponent kinetic determinations. Network Architecture and Training. These two variables were reoptimized for the data set used (mixtures in [2-ClPh1/[3CPh] ratios from 91to 1:9) in the light of the above results. Thus, alternative numbers of nodes in the hidden layers were tested with network designs from 2:4s:21 to 26~21.The %SEP values for both components increased slightly as the architectural
Table I.Effect of the Rate Constant Ratio on the Regression Parameters for Estimated versus Real Signals for a Binary Mixture
rate constanl ratio, k d k B 1.1
1.3
linear regression equationu
3.4 = (0.61 f 6.70) x
corr
coeffb
+ + +
0.9979 1.43 x
(1.000 f 0.013)s~ SB= (1.42 f 7.60) x (0.987 f 0.016)s~ SA= (0.36 f 4.51) x (0.996 f 0.009)SA $3 = (-2.51 f 3.80) X (1.006 f 0.007)s~ 3.4 = (1.47 5 3.96) X (0.999 f 0.008)Sn SB= (1.34 f 3.56) X(1.000 f 0.007)s~ + 3.4 = (0.13 f 2.58) x (0.998 f 0.005)s~ 3~ = (1.69 f 2.60) x (0.996 i 0.005)s~ 3.4 = (0.69 f 2.85) x (0.999 f 0.005)S~ S B = (-0.90 f 2.68) x 10-3 (1.001 f 0.006)s~ SA= (0.34 i 3.74) 10-3 + (0.991 f 0.008)s~ SB= (1.18 f 3.61) x (0.999 f 0.008)s~ 3.4 = (-5.58 f 9 . i o j x 10-3 + (1.009 f 0.018)s~ 3~ = (4.17 f 7.17) x (0.992 f 0.014)s~ 3.4 = (1.09 i 1.18) x lo-’ (0.978 & 0.024)s~ 3 B = (31.7 f 0.01) x lo-’ (0.995 f 0.024)s~
+
1.5
1.7
2.0
3.0
+ +
+ + + +
5.0
10.0
SC ,
+ + +
0.9948 1.62 x lo-’ 0.9982 9.04
10-3
0.9993 7.62
10-3
0.9993 7.93
10-3
0.9994 7.08
10-3
0.9996 5.17
10-3
0.9997 5.20
10-3
0.9996 5.71
10-3
0.9997 5.38
10-3
0.9992 7.50
10-3
0.9984 7.71
10-3
0.9962 1.92 x lo-’ 0.9977 1.52 x 0.9942 2.48 x lo-’ 0.9934 2.53 x
a 3.4 and SB are estimated signals for the faster and slower components, respectively; SAand SBare the same for real signals. n = 25. S, is the standard error of the estimate.
Table 2. Comparison of the Quality Achleved in the Resolution 2-ChPhlB-ChPh Mixtures Using Artificial Neural Networks and Kalman Filterlng A A N s error (%) Kalman filtering error (%) [2-ChPh]/ [3-ChPh] 2-ChPh 3-ChPh 2-ChPh 5ChPh
9:1 5:1 4:1 3:la 2:l 1:l 1:2a 1:3* 1:4 1:5 1:6 1:7 1:9
2.41 -10.87 -3.45 5.52 -4.06 6.96 -1.35 4.65 1.91 4.31 -0.96 2.82 -0.79 0.81 -1.91 -2.74 -1.27 2.96 2.27 -2.25 -4.67 4.32 -9.92 2.61 -10.23 2.31
Once the architecture was established, the network was trained. Overtrainingwas avoided since using too many iterations would eventually result in the network “memorizing”the training standards, thereby degrading its own generalization capacity. Based on the results, training could be stopped at -1500 epochs (each epoch corresponded to the presentation of 30 standard phenol mixtures to the network, which gave rise to %SEP values of 4.52% and 6.20% for 2-ClPh and SClPh, respectively). The training set could thus be processed in about 5 min. Comparisonwith the Kalman Fiiter Algorithm. The performance of the proposed ANN in multicomponent kinetic determinations was compared with that of linear Kalman filtering, which was theoretically more suitable for resolving mixtures with rate constant ratios approaching unity using no spectral discrimination. Table 2 shows the results obtained (those for the Kalman filter algorithm are from a previous referenceI5). As can be seen, the Kalman filter allows the resolution of 2-C1Ph/SClPh mixtures in ratios from 4:l to 1:4; however, the relative errors involved are high (near or above 10%)in some cases. On the other hand, the errors made with the ANN are quite small (2-4%). In addition, the ANN affords higher analyte concentration ratios (9:l-1:9), with relative errors less than 10%. These results are quite favorable and testify to the good performance of neural networks in multicomponent kinetic determinations,where they afford broad analyte concentration ratios at rate constant ratios close to unity.
-2.50
39.5
-3.25 2.00 0.00 -2.00 2.37 8.66 8.75
13.0 -6.83 1.25 -4.00 -3.50 -9.78 -6.06
21.5
-5.66
The Kalman filter results at these ratios correspond to exactly 2.3: 1, 1:1.5, and 1:2.3, respectively. a
complexity was raised, which can be ascribed to a diminished generalization capacity arising from the small size of the training set used (better suited to the 2:4s:21), notwithstanding the fact that the CV method was applied to the prediction set, so a 2:4s:21 architecture was adopted. (18) Perez-Bendito, D.; Silva, M. Kinetic Methods in Analytical Chemistry; Wiley: New York, 1988; Chapter 6.
CONCLUSIONS
As shown in this work, neural networks enable multicomponent kinetic determinations of closely related species with rate constants ratios approaching unity with no prior knowledge of the individual rate constants or the aid of spectral discrimination. The proposed network architecture, which was used for the resolution of binary mixtures of species involved in pseudo-firstorder reactions, can be extrapolated to the resolution of mixtures involving other kinetic situations, such as the following: (a) multicomponent kinetic determinations of species following kinetics of a different order (e.g., first and second, second and second) and (b) multicomponent kinetic determinations in the presence of synergistic effects, a problem pending resolution since available kinetic methodologies for this purpose rely on complex mathematical equations.@ The empirical data modeling capacity of ANNs allows the synergistic effect to be readily solved by appropriate training of the network. In addition, A ” s avoid potential alterations of kinetic data for the mixture (e.g., short induction periods, outliers, small between-run variations in the rate constants, etc.). ACKNOWLEDGMENT
The authors gratefully acknowledge financial support from the Spanish Direccion General Interministerial de Ciencia y Tecnologia (DGICyT) for the realization of this research in the framework of Projects PB91-0840 (Department of Analytical Chemistry, University of Cordoba) and TIC9@0648 (Department of Mathematics and Computer Science, University of Cordoba). Received for review April 27, 1995. Accepted September 18, 1 9 9 5 ~ ~ AC950408S @Abstractpublished in Advance ACS Abstracts, November 1, 1995.
Analytical Chemistry, Vol. 67, No. 24, December 15, 7995
4461