Sie sind auf Seite 1von 12

Talama, Vol. 42, No. 4, pp.

561-572, 1995
Elsevier Science Ltd
Pergmon 0039-9140(95)01446-2 Printed in Great Britain
0039-9140/95 $9.50 + 0.00

NON-LINEAR CURVE FITTING USING MICROSOFT


EXCEL SOLVER

S. WALSH a n d D. DIAMOND*
School of Chemical Sciences, Dublin City University, Dublin 9, Ireland

(Received 8 September 1994; Revised 12 October 1994. Accepted 12 October 1994)

Sununary--Solver, an analysis tool incorporated into Microsoft Excel V 5.0 for Windows, has been
evaluated for solving non-linear equations. Test and experimental data sets have been processed, and the
results suggest that solver can be successfully used for modelling data obtained in many analytical
situations (e.g. chromatography and FIA peaks, fluorescence decays and ISE response characteristics).
The relatively simple user interface, and the fact that Excel is commonly bundled free with new PCs makes
it an ideal tool for those wishing to experiment with solving non-linear equations without having to
purchase and learn a completely new package. The dynamic display of the iterative search process enables
the user to monitor location of the optimum solution by the search algorithm. This, together with the
almost universal availability of Excel, makes solver an ideal vehicle for teaching the principles of iterative
non-linear curve fitting techniques. In addition, complete control of the modelling process lies with the
user, who must present the raw data and enter the equation of the model, in contrast to many commercial
packages bundled with instruments which perform these operations with a 'black-box' approach.

Recent trends in data generation, owing in part ages tend to be engineer-orientated, not
to the computerization of instrumentation, especially user-friendly and expensive.
have led to larger and more complex data sets. In contrast, many analysts are very familiar
Traditional approaches to experimental data with spreadsheets such as Microsoft Excel and
processing are largely based on linearization Lotus 1-2-3, and several books have appeared
and/or graphical methods. However, this can recently describing their use as sophisticated
lead to problems where the model describing calculators for processing, displaying and inter-
the data is inherently non-linear, or where the preting scientific data, and as tools for teaching
linearization process introduces data distortion calculations in chemistry) '2 The familiar Win-
(e.g. in standard deviations of data which are dows user interface, ready availability (often
logarithmically related to the analyte concen- bundled free with new machines or on site-wide
tration as with ion-selective electrodes). Hence, licence) and access to desk-top publishing for
with the ready availability of the PCs in labora- integrating text and graphics were the main
tories, there is increasing interest in applying attractions. However, like Lotus 1-2-3, Excel
non-linear curve fitting techniques to exper- was primarily targeted at the business market,
imental data. and was frustratingly under-developed for scien-
Computers provide an ideal tool to overcome tific applications, particularly in terms of dis-
such problems. Although statistical programs play and data processing tools (e.g. non-linear
have been available for large main-frame com- regression). The balance has been somewhat
puters for many years, these were often cumber- addressed in recent years, and the appearance of
some to use and the computers were not readily powerful analysis tools such as solver makes
available. Many of these statistical packages Excel an important addition to the analyst's
have now been converted for PCs, but their armoury for processing experimental data.
application to solving analytical data processing Central to the successful application of solver
problems is still relatively rare as, although is the user's depth of understanding of the
scientifically correct and effective, these pack- problem, in contrast to many analytical data
processing packages, in particular those bun-
dled with instruments which often employ a
*Author to whom correspondence should be addressed. 'black-box' approach. With solver, the user
561
562 S. WALSHand D. DIAMOND

m u s t p r e s e n t the r a w d a t a in a spreadsheet, where H = peak height above baseline,


enter the m o d e l a n d m o d e l p a r a m e t e r s cor- X = point on x-axis, ~ = distance along x-axis
rectly, a n d finally initiate the m o d e l building to peak maximum, a = standard deviation of
process. G r a p h i c a l w i n d o w s enable the d y n a m - the peak, B = baseline offset from zero.
ics o f the m o d e l b u i l d i n g process to be observed, Figure 1 shows the layout of a typical Excel
a feature which can be used to great effect in spreadsheet prior to using Solver using data
teaching the principles o f d a t a modelling. generated with equation 1. Column A contains
the x-axis data, and column C Gaussian data
USING SOL VER generated via equation (1) using column A data
and known values for the parameters H, ~, a
The following steps describe the general prin- and B, which have to be found by solver.
ciples of using solver which were used in all of Column B shows data generated using equation
the theoretical and practical examples described (1) with the initial starting values of H, 2, a and
later. The data set to be modelled must first be B shown in cells G3 to G6. For convenience,
obtained. In the case of theoretical studies, the these parameters should be entered as named
data are generated by means of the equation of variables in Excel using the 'insert-name'
interest. A suitable range of values can be command.
quickly obtained by means of the 'edit-fill- In order to find the solution to the best-fit
down' command. Figures 1 and 2 show the values of the Gaussian parameters, the user
various procedures involved in finding the sol- must present a target cell which contains the
ution to a Gaussian peak generated using the sum of squared residuals (SSR) between the
well known equation; known data (column C) and the estimated data
(column B). The residuals are listed in column
f(X) = H exp[-(~-~ "f)2 ] + B, (i) D and are obtained by subtracting equivalent
cells in columns B and C. Column E contains

Eile Edit ~iew Insert Format Iools Dsta ~ndow Help

c~t 3

time t Model Data residuals square i variables,


1 5.6172. 10000 4.6171 21.3179!:
2 " 5.:70051. . . . 110001 4.7005~ 22.0~3~ 4.00
3 ; 5.7916 1.0001i 4.7915 30.00
4 5.89O51 10001i 4.8904i 23.91641 .... $ =., 15.00
5 ...... ! 5.9974~ 1.0001~ 4.9973i 2z19728~ 5.00
6 6.1121 1.0002i 5.1120i 450.00
7 6.2346i 1.0002i 5 2344i
8 6.3644i 1.0003i 5.3642i
197 5.0000) ! qQOil ....... 3=09g01
198 50000': 1.0001i 3.9999i
199 #.ooooi 1.000oi

t =C200-D200
1. -H'EXP(-((A2OO-Z)^2/P))+B !
[
[2. J I
3. Named variables and
..............
I
their initial values
Fig. I. Typical layout of a solver problem in Excel. The data in column C are for the Gaussian peak (generated
via equation 1), and the model is entered in column B. Residual errors are in column D and their squares
are in column E. The named variables used by solver are in cells G3-G6 and the sum of squared residuals
(SSR) is in cell G9. Note that 2 is represented by z and a by S in the named variables list.
Non-linear curve fitting 563

4- 100
),- 5
: <,, 200
i)- 40

0.01

Fig. 2. (a) Initial panel presented to the user when solver is activated via the 'tools' menu. (b) The 'options'
dialog box which opens when activated by the user. See text for further details.

the squared residuals, and cell G9 the sum of the solution of the problem, and the unknown
squared residuals (i.e. the sum of cells E2 variables are restricted in value to realistic
to E200). This is the quantity which will be ranges. This of course implies that the user
minimized by solver. has considerable knowledge of the problem
Solver is activated via the tools menu. On prior to initiating the search.
activation, the user is presented with the panel Options displays the solver options dialogue
shown in Fig. 2a, which in this case, is set up to box (Fig. 2b) in which the user can vary more
solve the Gaussian problem described above. features of the solution process. These are:
The user options available are: Max. time limits the time allowed for the
search process.
Set target cell specifies the target cell which Iterations limits the number of iterations
can be maximized, minimized or set to a during the search process.
certain value. In this case the target cell is G 9 Precision sets the precision of the search
and it is set to be minimised. process. This will determine the minimum
By changing cells specifies the cells which will change in the target cell which will cause the
be varied by the search algorithm in order to search process to stop. The best value for
minimise the number in cell G9, i.e. cells G3 precision varies according to how far from
to G6 in this example. the global optimum the initial search position
Subject to the constraints: constraints can be is, and how smooth the error surface is.
applied by the user to limit the search space Tolerance represents a percentage of error
explored by the optimization algorithm. As is allowed in the optimal solution. A higher
usual in iterative search procedures based on tolerance would tend to speed up the solution
gradient-type algorithms, efficiency is best if process but at the expense of accuracy in the
the search is initiated as near the global final solution.
564 S. WALSHand D. DIAMOND

Assume linear model will speed up the sol- Figure 3 shows the results obtained with
ution process but obviously should be used solver for the Gaussian problem. Figure 3a
only if the relationship is linear. shows the initial position of the search, with the
Estimates specifies the approach used to estimated data being well displaced from the
obtain initial estimates of the variables. required Gaussian curve. Figure 3b shows
Briefly, these are the final positions of the known and estimated
data, illustrating the excellent fit obtained. The
Tangent uses linear extrapolation from a values returned by solver for the model par-
tangent vector. That is from a tangent, ameters (H = 10, Y = 100, tr = 2 0 and B = 1)
solver extrapolates in different directions are equal to the values used to generate the test
to identify which gives a minimum for the Gaussian curve.
target cell. This identifies the next direc-
tion of the search process. Modelling two overlapping Gaussian peaks
Quadratic uses quadratic (i.e. non-linear)
A more difficult task is to model two over-
extrapolation which can greatly improve
lapping Gaussian peaks, particularly where one
results in very non-linear problems at the
of the peaks appears only as a shoulder on a
expense of speed at arriving at an answer.
more dominant peak, a situation which often
Derivatives forward and central differen- occurs in spectroscopy and chromatography.
tiation options exist for estimates of partial Figure 4 illustrates such a situation which has
derivatives which give the gradient of the been successfully modelled using solver. In this
search at that point. example, both the test data and the model data
Search determines which search algorithm were generated using the equation;
(Newton and Conjugate) is used at each
iteration. Both methods are dependent on the f(x):n I exp[---(S~ ~1)2.]
calculation of gradient values in the error
surface at each stage in the iteration? '4 F-(x-~2)2I _
.2exp L j+.,
.

(2)
The Newton method typically requires more
memory than the conjugate search but re-
quires fewer iterations. The conjugate search
is useful if you have a complex problem 12.00•
(multiple model parameters, large data sets) 10.00 •
and memory usage is a concern. We have I 8,00.
found little difference in using either algor- g
ithm to date. 6.00.
4.00
Load/save model is used when more than one
solver model is to be used with the worksheet. '~ 2.00
Show iteration results gives the user a com- 0.00 i I ! I
plete update of all data after each complete 0 40 80 120 160 200
Data Index
iteration. If the estimated and known data
are graphed, the user can observe a dynamic
display of the search process as it proceeds 10.00 j ~ i
through each iteration. This is very useful in
observing visually the progress of the algor- I 8.00
ithm, but can obviously greatly slow down i .00
the process where a large number of iter-
4.00
ations are involved. If this option is not
exercised, the search process proceeds auto- 2.00
matically, reporting only the value of the o.00 I i I i
target cell after each iteration. 40 80 120 160 200
Use automatic scaling is useful in situations DaleI n d e x
Fig. 3. Results returned by solver for the fit to the Gaussian
where data may be distorted through gross data shown in Fig. 1. (a) The initial positions of the solver
differences in the magnitude of various par- data and the Gaussian peak. (b) The final fit to the Gaussian
ameters in the search algorithm. peak obtained using solver.
Non-linear curve fitting 565

100 storage (results can be described mathematically


9O
'IgO rather than stored as relatively large ASCII
7O files), and in the analysis of peak purity (e.g. by
comparing the shape parameters of experimen-
4O tal peaks to that of a typical peak obtained with
2O the analyte under normal conditions).
10 Exponentially modified Gaussian model.~
0
20 40 60 SO 10O 129 The exponentially modified Gaussian function
Date Index (EMG) is the result of the convolution of a
Fig. 4. Fit obtained with solver to two overlapping Gaussian
Gaussian function and an exponential decay. In
peaks where one of the peaks appears only as a shoulder on
a more dominant peak. Excel, this is achieved as follows. Y(n) rep-
resents an unconvoluted Gaussian data array of
n points calculated according to equation (1)
where H I = height of peak 1 above baseline, above. The difference AY(m) between a point
/-/2=height of peak 2 above baseline, Y(m) and the previous point Y(m - 1) is easily
~ = position of peak 1 maximum along x-axis, obtained by subtracting the appropriate cells.
5c2 = position of peak 2 maximum along x-axis, The convoluted set of points, EMG(m) is de-
tr I = standard deviation of peak 1, tr2 = stan- rived from the Y(m) array as follows:
dard deviation of peak 2, B = baseline offset
EMG(m) = EMG(m - 1)
from zero on y-axis.
Once again, the search returns an exact sol-
ution to the problems, with all parameters being
+ [Y(m) - EMG(m - l)], (3)
L
successfully returned with the correct values where
( H i = 8 0 , £1=52, tr I = 1 0 , /-/2=45, g2=72,
(r2 = 9 a n d B = 5 ) . A = 1 - e x p ( - tt"2/~ W1, (4)
Examples like these are very useful for teach-
where • = time constant of the exponential
ing the principles of optimization and non-
decay (where a time dependent function is being
linear least squares fitting to graduate students,
modelled), I4I], W2 = weighting factors, with ~"2
and in particular, in highlighting the need for
normally set at unity and m is the data index in
direction by the user of the process, as initial
the array.
conditions can easily be set which do not allow
On the spreadsheet, the Gaussian equation (1)
the algorithm to locate the desired minimum.
is first used to create a Gaussian data array over
the range of interest. The first point on this
M O D E L L I N G EXPERIMENTAL DATA array is then set equal to the first convoluted
In this section, we demonstrate the appli- point (EMG(1)). The second E M G point
cation of solver to modelling experimental data (EMG(2)) can then be calculated via equations
sets which, unlike the theoretical tests discussed (3) and (4) above, This procedure is repeated for
previously, will not have exact solutions. How- the entire Gaussian array using the 'edit-fill-
ever, the validity of the results can be inferred down' command in Excel.
by comparison with results obtained with other Tanks-in-series model.9'I° In this approach,
optimization algorithms, through knowledge of the flow system is regarded as behaving as a
the system being studied or through examin- series of mixing chambers which serve to distort
ation of the error of the fit. the initial ideal square-wave concentration
profile of the sample plug as it travels to the
Example (1). Modelling chromatography peaks detector. The equation used in this instance is;
Chromatography (and flow-injection) peaks
are characterized by a Gaussian-type shape f(t'=H[(Ti(t/li)N-, ")
distorted by tailing which occurs on the falling
portion of the peak. Models such as the expo- ×((Nl~.)exp(--t/Ti)], (5)
nentially modified Gaussian ~-s and the tanks-in-
series9a° have been developed in order to allow where Ti = mean residence time of an element of
this distortion of the standard Gaussian peak fluid in any one mixing tank (i). N = number
shape to be described mathematically. This has of tanks, t = time (x-axis index), H = scaling
important applications in the area of data factor.
566 S. WALSH and D. DIAMOND

Figure 5a-d illustrates the superior perform- best-fit obtained with the EMG and tanks-in-
ance of the EMG model in describing an exper- series models, respectively. Figure 5d compares
imental HPLC peak. Figure 5a shows the the residual errors obtained with each model
best-fit obtained with the Gaussian model using expressed as a percentage of the response maxi-
solver while Fig. 5b and c shows the equivalent mum, and while there is some structure in the

(a) 2500

.~ 2000
| -,, model ]
1500 0 HPLCdataJ

1000

~J 500

0
10 20 30 40
Data Index

2500
(b) ..................................................................................................................................

2000

iI=
i
1500

1000

500.

0
0 10 20 30 40

Data Index

(c) 2500

. • 2000
E
m,
!
1500 ° ata li
M
i
-~. 1000 i!
"6 !
•~P 500

0 LI~,..',..J.,,JU1;JWv, , - v~.rvc,,,uuiJUe,J,,.,e¢]
i
0 10 20 30 40
Data Index

(d) 8
6 -..O-., ~ enr E1Mv,
IG

~ 0

-4
-6
-8
5 !0 15 20 25 30 35 40
Data Index
Fig. 5. Comparison of (a) Gaussian, (b) exponentially modified Gaussian (EMG), (c) tanks-in-series
models to an experimental HPLC peak and (d) the residuals obtained for each fit (expressed as a % of
the peak maximum). The unit 'Bit-number' refers to the number returned by the I/O card on digitization
of the detector signal.
Non-linear curve fitting 567

E M G residuals, the error is clearly much smaller the error (expressed as a percentage of the
than that obtained with the other models. The maximum response) never being greater than
inability of the Gaussian model to cope with the + 2%, which is quite acceptable given the noise
peak tail is demonstrated by the comparatively on the original signal, and the time base of the
large residual error for points 22-30 which is experiment. The time constant obtained from
much reduced in the E M G residuals. the fit (T = 450 nsec) is typical of this material.
Figure 6c and c shows fits obtained with the
Example (2). Modelling fluorescence decay protein bound ruthenium compound using the
processes double exponential model (equation 7). Again,
The data set for the single exponential solver returns a good fit to the data, (z~ = 286
modelled in this equation refers to fluorescent nsec, z2 = 833 nsec) with the error being within
emission decay lifetime measurements of about + 3 % outside the initial 200 ns of the
the compound: ruthenium-bis(2,2'-bipyridyl) (5- curve. While, fitting two exponentials to data
isothiocyanate- 1,10-phenanthroline) [Ru(bpy)2 obtained in these experiments is almost certainly
(NCSphen)] z+ using a Q-switched ND-YAG an approximation such an approach can yield
laser. The samples were aerated and measure- important information on the environment of
ments were carried out in 0.1M carbonate buffer the fluorescent centre through examination
(pH 9.6). The compound absorbs at 455 nm and of the time constants obtained, while the pre-
is characterized by a fluorescence decay with a exponential factors may yield information on
single time constant. the relative populations of centres in the differ-
The double exponential model has been ent environments." However, this is a matter of
applied to fluorescent emission decay lifetime considerable debate amongst specialists in the
measurements of the same compound after area. For example, in these experiments it is
attachment of bovine serum albumin via a likely that the fluorescent centres exist in a
thio-urea linkage. 1~Once again the samples were number of different environments which modify
aerated and measurements carried out in 0.1M the emission characteristics (e.g. the time con-
carbonate buffer (pH 9.6). Binding of the stants). The fit with the double exponential
protein has little effect on the excitation and model is reasonably good, and the time con-
absorbance wavelengths but lifetimes of fluor- stants obtained are in the range expected. How-
escent centres near the binding sites are affected, ever, the curvature in the residuals suggests that
leading to differing sets of fluorescent emissions there is some additional structure in the data.
emanating from species bound in different This in turn indicates that the fluorescent
environments. The models used in this investi- centres exist in two main environments but
gation were general single and double exponen- this is probably not the complete picture. In
tial equations of the form: addition, careful examination of the residuals
suggests an oscillating structure above 1500
f(t) = [A(1 - e x p ( - k t ) ] + B, (6) nsec, which can also be seen in the original data.
where A = pre-exponential factor, k --- rate It is likely that this is instrumental rather than
constant, (1/k = decay lifetime), t = time, B = chemical in origin (e.g. environmental noise).
baseline offset and for the double exponential
Example 3. Modelling ion-selective electrode
f(t) = [A, (1 - e x p ( - k , t)] characteristics
ISEs can be characterized in terms of the well
+ [A2(1 - exp(-k2t)] + B, (7)
known Nikolskii-Eisenman equation (8) below
where A,, A2 = pre-exponential factors, kl, k2 = in terms of the cell constant (E°), the slope (S),
rate constants, t = time, B = baseline offset. and selectivity coefficients (g~ t) which describe
Data obtained from the instrumentation are the effect of various interfering ions ( j ) on the
transformed to suit the above exponential response of the electrode to the primary ion (i):
models via in-house software prior to
modelling. E=E °+slog a~+ K 0 aj , (8)
)
Figure 6a and b illustrates the fit obtained
using the single exponential model (equation 6) where a~ and aj are the activity of the primary
with the NCS compound, and the residuals of and interfering ions, respectively, and z~ and zj
the fit, respectively. Clearly the model par- are their charges. We have used a simplified
ameters returned by solver fit the data well, with version of the above equation (neglecting the
568 S. WALSH and D. DIAMOND
(a) 30000

20000
15000
~ 1 0000
5000 el
0 I I I
O.OOE+O0 5.00E+02 1.00E+03 1.50E+03 2.00E+03
Time /ne

(b) 2.52 l

1.5
1
0.5
0
-0.5
-1
-1.5
-2
0 500 1000 1500 2000
Time /hi

(c) 30o00

25000
i 2000O

15000

i 10O00

m 5000

0 I I I I I
500 1000 1500 2000 2500 3000
Tim • Ins

(d) 4 .]-.,..........o ..................................................................................................................................................


3
2 900 oo 00~ " ~ 0 0

-2 ~ '+~P . o ¢
-3 < ~ 0 0

-5 ~
0
-6 o i i J ,
500 1000 Tim1eSOJ)n, 2000 2500 30(:30
Fig. 6. (a) Fit obtained using a single exponential model for fluorescence decay obtained with ruthenium
bipyridyl isothiocyanate phenanthroline using a Q-switched N D - Y A G laser, U (b) residual errors obtained
with the single exponential model. (c) Fit obtained using the double exponential model for the protein
bound ruthenium bipyridyl isothiocyanate phenanthroline u and (d) the residual errors obtained with the
double exponential model.

charge factors on aj) extensively to enable errors the electrode characteristics (selectivity co-
on analytical signals arising from interferents to etficients, slopes, cell constants), which involved
be decoupled and corrected.': Approaches such extensive programme development. The meth-
as simplex optimization and genetic algor- odology basically involves generating a matrix
ithms 12J3 have been investigated for estimating of electrode responses to a series of calibration
Non-linear curve fitting 569

solutions containing the ions of interest at simplex to fine-tune the position of the mini-
activity levels set according to a fractional mum), simplex (uses the simplex only) and
factorial calibration design (see Tables 1 and 2). solver, results obtained with solver.
Thus for a four electrode array, 32 solutions are The results show good agreement on the
required, eight of which are targeted at each values of the cell potential and slope for both
electrode (e.g. solutions 1-8, Table 1 are for the electrodes with all three approaches. Further-
ammonium electrode, solutions 9-16 for the more, the values for selectivity coefficient for the
sodium electrode, solutions 17-24 for the pot- main interferent are very close for both elec-
assium electrode and solutions 25-32 for the trodes (i.e. around 0.18 for potassium interfer-
calcium electrode). We typically model the ence on the ammonium electrode and 0.14 for
Nikolskii-Eisenman parameters for a particular the value of ammonium interference on the
electrode using the matrix of potentials obtained potassium electrode). Even the low-valued selec-
from the electrode array with the eight cali- tivity coefficients are modelled to around the
bration solutions for that electrode, and then same value in each case, which is surprising
estimate the validity of the model by examining given their relatively minor effect on the fit. The
the residuals between the predicted array poten- worst case is for the sodium interference on
tials (calculated via the model parameters and the potassium electrode (K~°+~Na÷), for which a
the known activities in Table 1) and the ob- value could not be obtained with solver. How-
served array potentials (Table 2). ever, examination of the values obtained with
Table 3 show a comparison of fits obtained the other methods show this to be the smallest
for the potassium and sodium ISEs by three coefficient with least effect on the fit. These
different approaches, genetic algorithm with sim- results show that solver can obtain good esti-
plex optimization (uses a genetic algorithm to mates of electrode parameters using the array-
locate the approximate position of the minimum FIA calibration design. However, the genetic
of the error surface, and then switches to a algorithm performs better and has the added
advantage of being an unsupervised search tech-
nique (i.e. requires no prior knowledge of the
Table 1. Matrix of ion-activities in calibration solutionst2J3 problem). Nevertheless, considering the ease
Activities (molar) with which solver can be used, we feel it per-
Solution NH,+ Na + K+ Ca 2+ formed creditably well in this particular task.
1 7.89E-03 7.10E-03 2.37E-03 3.18E-03
2 8.46E-03 2.54E-03 4.23E-04 4.68E-04
Example (4). Modelling of ion-selective electrode
3 8.42E-03 8.42E-04 4.21E-03 3.56E-04 (ISE) dynamic response inflow-injection analysis
4 8.37E-03 4.18E-04 5.02E-04 1.50E-03
5 8.57E-05 6.00E-03 3.43E-03 2.18E-04
We have also used solver to look at the
6 8.58E-05 4.29E-03 6.86E-04 1.10E-03 dynamic responses obtained with PVC mem-
7 8.34E-05 1.67E-04 2.50E-03 2.95E-03 brane electrodes in a flow-injection analysis
8 8.96E-05 2.69E-04 1.79E-04 1.30E-04
9 7.06E-03 7.84E-03 7.06E-03 2.73E-03
set-up similar to that used in the calibration
10 7.56E-04 8.40E-03 5.04E-03 3.03E-04 experiments. ~2One approach is to use a logistic/
11 3.32E-04 8.30E-03 5.81E-04 1.93E-03 sigmoid model to characterize the rising portion
12 2.54E-03 8.46E-03 7.61E-04 4.16E-04
13 4.21E-04 8.43E-05 1.69E-03 2.56E-03
of the ISE response peak. The equation used is:
14 5.08E-03 8.47E-05 5.93E-03 5.21E-04
15 5.77E-03 8.25E-05 3.30E-04 2.83E-03
16 1.78E-04 8.92E-05 2.68E-04 3.19E-04 E(t) = (1 + exp[b(t - c)]) ~ + d, (9)
[ a 1
17 6.26E-03 6.26E-03 7.83E-03 3.09E-03
18 7.41E-04 4.94E-04 8.23E-03 2.34E-03 where a = peak height (mY), b = slope co-
19 3.38E-03 6.76E-04 8.54E-03 3.61E-04 efficient (mV per decade change in [K+],
20 6.80E-04 2.55E-03 8.50E-03 2.11E-04
21 1.63E-03 7.34E-04 8.16E-05 4.07E-03
c = time from beginning of the peak to the
22 2.56E-04 3.42E-03 8.54E-05 1.61E-03 inflexion on the rise (sec), d = baseline offset
23 8.68E-04 4.34E-03 8.68E-05 5.15E-04 (mV), e = symmetry parameter for the sigmoid,
24 1.79E-04 3.58E-04 3.95E-05 1.93E-04
25 6.31E-03 5.52E-03 6.31E-04 3.98E-03
E(t)=electrode response at time t (mV),
26 3.96E-03 5.55E-04 6.34E-03 4.05E-03 t = time (sec).
27 2.44E-04 8.13E-04 3.25E-04 4.46E-03 This model can give some indication of the
28 5.69E-04 8.12E-05 8.12E-04 4.45E-03
29 5.13E-03 5.13E-03 5.98E-04 5.41E-05
rate of ion-uptake at the membrane surface as
30 2.62E-03 6.99E-04 2.62E-03 5.87E-05 the sample plug passes and enable comparisons
31 7.04E-04 1.76E-03 1.76E-03 6.05E-05 to be made for different experimental situations
32 5.37E-04 4.48E-04 8.95E-05 6.46E-05
(varying concentration of the primary ion, effect
570 S. WALS8 and D. DIAMOND

Table 2. Matrix o f electrodes responses to calibration solutions ~2't3


Measured potentials (m V)
Solution NH2- Na + K÷ Ca 2+
! 1.30E + 02 1.41E + 02 1.43E + 02 6.67E +01
2 1.32E + 0 2 1.18E+02 1.17E + 0 2 4.55E +01
3 1.32E + 02 1.08E + 02 1.54E + 02 4.01E +01
4 1.34E + 02 7.93E + 01 1.22E + 02 5.70E +01
5 8.32E + 01 1.49E + 02 1.50E + 02 3.37E +01
6 5.99E + 01 1.36E + 0 2 1.13E + 0 2 4.92E +Ol
7 7.82E + 01 7.86E + 01 1.41E + 02 5.86E +01
8 4.82E + 01 6.89E + 01 8.15E+01 2.31E +01
9 1.30E + 02 1.44E + 02 1.58E + 02 5.92E +01
10 9.89E + 0 1 1.43E + 02 1.54E + 0 2 4.16E +01
11 7.25E + 01 1.44E + 02 1.07E + 02 5.90E +01
12 1.12E + 02 1.46E + 02 1.16E + 02 3.49E +01
13 8.57E + 0 1 6.49E + 01 1.32E + 02 5.14E +01
14 1.31E + 0 2 8.49E + 01 1.57E + 02 4.00E +01
15 1.29E + 02 4.99E + 01 1.13E + 02 5.93E +O1
16 6.36E + 01 4.28E + 01 9.74E + 01 3.56E +01
17 1.31E + 02 1.42E + 02 1.65E + 02 6.95E +01
18 1.06E + 02 1.02E + 02 1.67E + 02 6.28E +O1
19 1.26E + 02 9.97E + 01 1.61E + 02 3.87E +O1
20 1.06E + 02 1.25E + 02 1.64E + 02 3.38E +01
21 1.02E + 02 8.55E + 0 1 9.27E + 01 6.15E +Ol
22 6.78E + 01 1.20E + 02 7.00E + 01 5.18E +Ol
23 9.21E + 01 1.26E + 02 8.07E + 01 4.30E +Ol
24 5.85E + 01 5.85E + 0 1 6.85E + 0 1 2.81E +01
25 1.31E + 02 1.29E + 02 1.22E + 02 6.38E +01
26 1.26E + 02 1.00E + 02 1.61E + 02 6.34E +01
27 6.57E + 01 8.83E + 01 9.36E + 01 6.36E +O1
28 8.11E+01 5.86E + 01 1.18E + 0 2 6.44E +01
29 1.24E + 02 1.48E + 02 1.19E + 02 2.06E +01
30 1.14E + 02 9.85E + 0 1 1.45E + 02 2.11E +Ol
31 9.07E + 01 1.19E + 0 2 1.34E + 0 2 2.20E +Ol
32 7.88E + 01 8.56E + 0 1 7.64E + 01 2.15E +Ol

of interferents, injection volume, flow rate, etc.). combination of a, b and c in terms of flow rate
The model parameters in turn can be used as and injection volume). Figure 7 shows fits ob-
inputs in a further optimization of the instru- tained to two valinomycin electrode responses
mental operating conditions (e.g. optimize a to potassium injections at differing flow rates

Table 3. Comparison o f electrode characteristics for valinomycin (K ÷) and


tetramethylacetate p-t-butylcalix[4]arene (Na ÷ ) based ion-selective electrodes
obtained by a (i) genetic algorithm followed by simplex (GA-Simplex), (ii) simplex
only, and (iii) solver, using the data in Tables I and 2
Electrode
parameter GA-simplex~3 Simplex 13 Solver
A m m o n i u m ISE
E ° (mV) 225.8 225.8 225.1
S (mV/decade) 45.4 45.5 45.2
K~,K, 0.185 0.185 0.182
K~°~,Na+ 9.36 X 10 -4 2.09 X 10 -3 5.49 X I0 4
K~°~,ca2+ 6.46 x 10 -3 4.19 x 10 -3 6.04 x 10 -3
SSR (8) 6.313 6.507 6.405
SSR (32) 270.2 228.29 223.3
Potassium ISE
E ° (mV) 270.2 270.5 270.3
S (mV/decade) 51.4 51.5 51.5
K~+tr~a,. 0.143 0.143 0.140
K~°+tNa+ < 1.0 × 10 -6 4.53 × 10 4 0.00
K~tca2+ 5.36 x 10 -3 5.32 x 10 -3 7.33 x 10 -3
SSR (8) 29.17 30.04 28.97
SSR (32) 497.7 496.3 481.8
The sum of the squared residuals (SSR) for each method is also shown. SSR (8)
refers to the squared residuals for the eight calibration solutions and SSR (32)
refers to the squared residuals over the whole situation set.
Non-linear curve fitting 571

6O

4O

:~ 30

2O i J o model/0.5mL/min
lO ~ j J dataJl.OmL/min
0 model/O.5mLJmin
0 .. | I ...I !
0 5 10 Time/s 15 20 25
Fig. 7. Fit obtained with sigmoid model for the rising portion of FIA peaks obtained with a potassium
PVC membrane electrode at 1.0 and 0.5 mL/min flow rates (see Table 4); Carrier composition: 5 x 10-2M
MgC12, 10-6M KCI. Sample composition: 5 x 10 2M MgCI 2, 10-4M KCI; injection volume: 150/~1.

(1.0 and 0.5 ml/min). The model parameters While it is not on a par with custom-written
returned by solver for each flow rate are com- software packages for this purpose such as
pared in Table 4. Mathlab or Mathcad, or with more complex
From these results we can deduce that in- search methods such as genetic algorithms, it is
creasing the flow rate causes a slight reduction nevertheless, quite a useful aid to data interpret-
in the peak height (a), an increase in the slope ation and an excellent means for introducing
of the rise (given by the increased magnitude of non-linear curve fitting into research and teach-
b), a reduced time to the rise inflexion (c), and ing. Given the fact that Excel is readily avail-
a less symmetrical rise in terms of the sigmoid able, and familiar to most research and
model (larger value for e). Characterizing peaks undergraduate students, it can be expected to be
in this manner can be very useful for instrumen- quickly adopted by many workers for such
tal optimization purposes as mentioned above, applications. However, the existence of solver
and for describing peak shapes in terms of a few appears to be not widely known, a situation
simple parameters. This characterization can be which we hope this publication will redress in
useful for processing large numbers of peaks analytical circles. The fact that the user must
and for identifying the possible presence of import the experimental data, and arrange the
impurities through the definition of a 'typical' spreadsheet in a suitable manner for each prob-
analyte peak as possessing these parameters lem implies a complete understanding of the
within certain limits. mathematics of the model. The ease with which
named variables may be varied in Excel enables
CONCLUSIONS the user to experiment with equations and be-
Using examples from chromatography, spec- come familiarized with their effect on the curve
troscopy and electrochemistry, we have demon- obtained.
In conclusion, we hope the few examples
strated the usefulness of solver as a tool for
presented in this paper will stimulate other
mathematical modelling of experimental data.
workers unfamiliar with non-linear optimiz-
ation to experiment with this very useful Excel
Table 4. Model parameters for sigmoid model of FIA peak add-on.
rise obtained with valinomycin ISE in an FIA system at two
different flow rates (see Fig. 7) Acknowledgements--We wish to thank Maurice Burke
Model parameters 1.0 ml/min 0.5 ml/min (DCU) for providing the chromatography data, Johannes
Vos (DCU) for the fluorescence data and useful discussions,
a (mV) 5.70E + 01 5.93E + 01 and F. J. S~.ez de Viteri and Margaret Hartnett (DCU) for
b (mV per decade -1.78E-01 -I.03E-01 the ISE data and useful discussions.
change in [K+])
c (see) 4.84E + 00 9.59E + 00
d (mV) - 9 . 6 2 E + 01 - 1.14E + 00
e 7.49E + 00 4.16E + 00
REFERENCES
Carrier composition: 5 × 10-2M MgC12, 10-6M KCI.
Sample composition: 5 × 10-2M MgCI 2, 10-4M KCI. 1. O. J. Parker and G. L. Brennan, Spreadsheet Chemistry.
Injection volume: 150 #1. Prentice Hall, Englewood Cliffs, N.J., 1991.
572 S. WALSHand D. DIAMOND

2. H. Freiser, Concepts and Calculations in Analytical 7. R. Ddley, Anal. Chem., 1985, 57, 388.
Chemistry---a Spreadsheet Approach. CRC Press, Boca 8. A. Berthod, AnaL Chem., 1991, 63, 1879.
Raton, 1992. 9. J. Ruzicka and E. H. Hansen, Flow Injection Analysis.
3. W. H. Press, B. D. Flannery, S. A. Teukolsky and W. T. Wiley, New York, 1988.
Vetteding, Numerical Recipes. Cambridge University 10. O. Lee, G. A. Dumont, P. Tournier and A. P. Wade,
Press, New York, 1990. Anal. Chem., 1994, 66, 971.
4. G. H. Hostetter, M. S. Santina and P. D'Carpio- 11. E. Ryan, R. O'Kennedy, M. Feeny, J. Kelly and J. G.
Montalvo, Analytical Numerical and Computational Vos, Bioconjugate Chem., 1992, 3, 285.
Methods for Science and Engineering. Prentice Hall, 12. F.J. Sfiez de Viteri and D. Diamond, Analyst, 1994, 119,
Englewood Cliffs, N.J., 1991. 749.
5. E. Grushka, Anal. Chem., 1972, 44, 1733. 13. M. Hartnett, Ph.D. Thesis, Dublin City University,
6. J. P. Foley and J. G. Dorsey, Anal. Chem., 1983, 55, 73. 1994.

Das könnte Ihnen auch gefallen