You are on page 1of 15

Journal of Water Sustainability, Volume 3, Issue 4, December 2013, 223–237

© University of Technology Sydney & Xi’an University of Architecture and Technology

Introductory of Microsoft Excel SOLVER Function - Spreadsheet


Method for Isotherm and Kinetics Modelling of Metals Biosorption
in Water and Wastewater

Md Anwar Hossain, Huu Hao Ngo*, Wenshan Guo


Centre for Technology in Water and Wastewater, School of Civil and Environmental Engineering, University of
Technology Sydney, Broadway, NSW 2007, Australia

ABSTRACT
This paper aims to introduce a simple method to run a complicated non-linear analysis of isotherm and kinetics
models for metals biosorption based on input functions of spreadsheets. A robust method is demonstrated here to
exploit the ‘SOLVER’ function available in Microsoft (MS) Excel spreadsheet. It is more economic and user
friendly than specialized computer programmes. In this study, an iterative method was proposed to produce the op-
timal goodness of fit between experimental data and predicted data. This was described the implementing method
of a set of real data (garden grass as biosorbent) and the predicted results were compared with linear analysis and
MATLAB analysis. The R2 values found from MS Excel spreadsheet were 0.995, 0.999 and 0.996 while being
0.997, 1.000 and 0.999 by MATLAB for copper, lead and cadmium adsorption, respectively onto garden grass. The
prediction of maximum adsorption, qm by excel (59.336, 63.663 and 42.310 mg/g) were very similar to MATLAB
(59.889, 63.509 and 41.560 mg/g). The predictions of kinetics parameters were also close to MATLAB analysis.
Hence, the MS Excel Spreadsheet method could be a handy tool for biosorption models.

Keywords: Solver function; Microsoft Excel spreadsheet; non-linear analysis; iteration; goodness of fit; MATLAB

1. INTRODUCTION of the adsorption mechanism pathways,


expression of the surface properties and
To explore novel biosorbents in accessing an capacities of adsorbents, and effective design
ideal biosorption system, it is essential to es- of the adsorption systems (El-Khaiary, 2008;
tablish the most proper adsorption equilibrium Thompson et al., 2001). Similarly, the kinetics
correlation and kinetic correlation (Srivastava parameters, generally adsorption time and
et al., 2006). It is crucial for reliable prediction pattern of metals onto biosorbents are known
of adsorption parameters and quantitative from the fitness of kinetic parameters.
comparison of adsorbent behavior for different
In the past, linear least-squares method was
adsorbent systems or experimental conditions
widely used by transforming the equation into
(Gimbert et al., 2008; Ho et al., 2002). In the
a conventional linear form to calculate or pre-
perspective, equilibrium relationships, gener-
dict the isotherms/kinetics parameters or the
ally known as adsorption isotherms, describe
most fitted models. Principally, the models are
how pollutants interact with the adsorbent
subjected to their goodness of fit to the
materials, and thus are critical for optimization
experimental data with the magnitude of

*Corresponding to: h.ngo@uts.edu.au


224 M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237

coefficients of determination that close to unity Microsoft Office, and thus no additional cost is
(Wong et al., 2004). On the other hand, a sig- required. Spreadsheet programmes are among
nificant limitation related to the linearized the most commonly used software, and most
form of isotherm/kinetics equation has recently researchers have experience with them. Excel
been pointed out, which produces a vast offers a friendly user interface, flexible data
amount of different outcomes, implicitly alter manipulation, built-in mathematical functions
the error structure, violates the error variance and instantaneous graphing of data. It contains
and normality assumptions of standard least a function, named SOLVER, which is ideally
squares, leading to the bias of the adsorption suited to fitting data with non-linear functions
data (Han et al., 2007; Ho, 2004; Hong et al., via an iterative algorithm (Bowen and Jerman,
2009; Tunali and Akar, 2006; Vasanth and 1995), which minimizes the sum of the squared
Sivanesan, 2007). In this context, a non-linear difference between experimental data and
form of the isotherm and kinetics models with predicted data. The objective of this present
error analyses and optimization techniques are study was to propose and describe a method of
needed. In addition, evaluating the accuracy non-linear regression using the SOLVER
and consistency in parameters prediction or function of Excel as well as to compare the
estimation are also demanding. Moreover, a predicted parameters for Langmuir isotherm
curve fitting is applied to describe experi- and Pseudo-2nd-order models with the
mental data in all fields of research. The better MATLAB and linear analysis.
the fit, the more accurately the function de-
scribes the data. Over the past few decades, the
exponential development of computer pro- 2. METHODS
gramming has provided scope to calculate and
prediction of model parameters. The introduc- The methods illustrated in this paper are: (i) to
tion of computers into research makes it predict the optimum values of parameters for
straightforward to fit data with simple isotherms and kinetics models, (ii) to find out
functions such a linear regression, but it is higher fitness of models, and (iii) to predict the
more difficult and complicated to fit data with curve fitted with experimental values with MS
non-linear functions. Most of the programs (e.g. Excel spreadsheet using Solver function. They
MATLAB, C++, Microcal Origin, Sigma Plot or were carried out on PC operated by Windows
Graph pad Prism) require special mathematical 2007 and MS Office 2007. This protocol
knowledge to use and provides different explained entering the experimental data
options such as capability of fitting user-input manually into Excel and preparing graphs from
functions to data. In addition, these programs data. On this occasion, the formulated algo-
are expensive and significantly excess cost for rithm is carried out and the predicted curve is
simply fitting the data with non-linear func- overlaid on the experimental data points. De-
tions. Additionally, these programmes cannot gree of fitness of predictions is also calculated
easily manipulate the data and tend to display so that the accuracy of fit can be measured.
data, graphs, results, and analysis in multiple
windows, which can lead to confusion and 2.1 Models and assumptions
figures are not useable for article publication.
The Langmuir adsorption isotherm is perhaps
An alternative method is to use Microsoft the best known of all isotherms describing
Excel to fit non-linear functions. An advantage adsorption. The Langmuir model is obtained
of this method is that Excel is probably under the ideal assumption of a totally
included in the computer package as part of homogenous adsorption surface (Bilgili, 2006)
M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237 225

and represented as follows (Langmuir, 1918): 2.2 Goodness of fit


q m K LCe Goodness of fit is an essentially important pa-
qe = (1)
1 + K LCe rameter that estimates how well the curve (i.e.
the prediction) pronounces the experimental
where Ce is the equilibrium concentration data. Generally least squares method is used to
(mg/l), qe is the amount of metal ion adsorbed measure of the goodness of fit. It is based on
(mg/g), qm is the qe for a complete monolayer the theory that the scale of the difference be-
(mg/g), and KL is the constant related to the tween the experimental data points and the
affinity of the binding sites and the energy of prediction curve is a good measure of how well
adsorption (l/mg). the curve fits the data. For the purposes the
The pseudo-second-order model proposed least squares fit method will be demonstrated
by Ho and McKay (1998) is based on the by linear regression where ‘independent’ and
assumption that the adsorption follows second ‘dependent’ variables are used.
order adsorption. The linear form can be In the past, non-linear data would be
written as follows: changed into a linear form and consequently
analysed by the least squares fit method. This
K 2 qe2t
qt = (2) analysis could yield inaccurate measurements
(1 + qe k2t ) and predictions of the data and may alter the
where qe (mg/g) and qt (mg/g) are the experimental error or alter the relationship
adsorption amount at equilibrium and time t between the ‘independent’ and ‘dependent’
(min) respectively and K2 (g/mg min) is the variables. It is presumed that this method is
rate constant of adsorption. erroneous and old fashioned which should not
be operated. For data not describable by a
The modelling of the models is formulated
linear function, it is crucial to apply a protocol
on the basis of some essentially important as-
that will fit a non-linear function to the data. A
sumptions. The following are the assumptions:
suitable method for this procedure is called
(i) The equilibrium concentration, Ce (mg/l) iterative nonlinear least squares fitting. This
for equilibrium isotherm and contact time, t process will fulfill the same goal as used for
(min) is considered as an ‘independent’ linear regression, i.e. minimizing the value of
variable. the sum of squared of the difference between
(ii)The amount of metal ion adsorbed, qe (mg/g) data and prediction. However, it is still differ-
and the adsorption amount at any time t ent from linear regression in a way that it is an
(min), qt (mg/g) are assumed as ‘dependent’ iterative process based on algorithm. Initial
variables. parameters are estimates based on previous
experience of the data and on a sensible guess
(iii) The maximum monolayer adsorption
based on knowledge of the function used to fit
capacity, qm (mg/g) and Langmuir constant
the data. The following parameters are meas-
KL (l/mg) are presumed as predictable
ured and judged the goodness of fit:
variables based on the best fitted condition
of isotherm model. (i) The sum of squares (SS)
(iv) The adsorption amount at equilibrium, qe The best fit of the data is judged by the sum of
(mg/g) and the rate constant of adsorption, squares (SS) and the smallest value for the
K2 (g/mg min) are assumed as predictable sum of squares (SS) is the best fitted data of
variables based on the best fitted condition the model. This is described by the function:
of kinetics model.
226 M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237

and ‘prediction data, qe.model’. The coefficient


SS = ∑ [q exp − q model ] 2
n
(3) of determination represents the percent of the
i =1
experimental data that is the closest to the line
where, qexp is the experimental data, qmodel is of best fit/prediction. The models fitness is
the value predicted by the models for curve at signified by the coefficient of determination
corresponding Ce. The first iteration calculates (R2) and the following expression is used to
the SS value based on the initial parameters determine the R2 (Hossain et al., 2012b):
and the second iteration involves varying the
∑ (q − q e.model.n ) 2
n

parameter values by a small amount and e.exp.n

recalculates the SS. This process is repeated R2 = 1− n =1


(4)
∑ (q )
n
several times until a smallest possible value of e.exp.n − q e.exp.n 2

n =1
SS is achieved. Only a single iteration is
required for linear regression to get the lowest where, qe.exp is the equilibrium sorption
value of the SS, because the second and high- capacity found from the batch experiment,
er derivatives of the function are zero. Con- qe.model is the prediction from the isotherm
versely, the second and higher derivatives are model for corresponding to Ce and n is the
not zero for non-linear regression, and thus an number of observations.
iterative process is required to calculate the
optimal parameter values. (iii) Residual root mean square error (RMSE)
and the chi-square test (χ2)
Several algorithms use in non-linear
regression including the Gauss-Newton, the Non-linear error functions such as the residual
Marquardt-Levenberg, the Nelder-Mead and root mean square error (RMSE) and the
the steepest descent methods (Johnson, 1992). chi-square test (χ2) are used to judge the equi-
SOLVER, which is based on the robust and librium model with the optimal magnitude.
reliable generalized reduced gradient (GRG) The standard equations are as follows (Hoss-
method can be used as an easy iteration ain et al., 2012b):
protocol. A comprehensive explanation of the
evolution and operation of this code can be RMSE=
1 n
∑ (qe.exp.n − qe.model.n) 2 (5)
found in literature (Lasdon et al., 1978; Smith n −1 n=1
and Lasdon, 1992). All algorithms have
similar properties, require input initial param-
χ =∑
2
n (q e.exp.n − q e.model.n ) 2
eters and use these values to get a better esti- (6)
n =1 q e.exp.n
mation of the parameters used in iterative
process. where, ‘qe.exp’ is the equilibrium adsorption
capacity found from the batch experiment,
(ii) The coefficient of determination (R2)
‘qe.model’ is the prediction from the isotherm
The coefficient of determination, R2, is model for corresponding to ‘Ce’ and ‘n’ is the
practical as it gives the proportion of the number of observations. The small values of
variance of one variable that is predictable RMSE and χ2 indicate the better model fitting
from the other variable. It is a measure that and the similarity of model with the experi-
allows verifying how certain one can be in mental data respectively (Ho et al., 2002).
making predictions from a certain model. The
(iv) The normalized standard deviation (NSD)
coefficient of determination is such that 0 < R2
and average relative error (ARE)
< 1, and denotes the strength of the linear
association between ‘experimental data, qe.exp’ The kinetics model is verified and optimised
M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237 227

by the coefficient of determination (R2), by and ‘equilibrium capacity at t, qt (mg/g)’ in


two non-linear errors: the normalized standard B column for Pseudo-2nd-order kinetics
deviation (NSD) and average relative error models. This is shown in Figure 1 for
(ARE). The standard equations are defined as isotherm model and Figure 2 for kinetics
(Gu et al., 2006; Hossain et al., 2012b): models.
b) Plot the data from cells A2 to A17 as X
∑ (q )
N

t.exp.N − q t.model.N 2
axis and cells B2 to B17 as Y axis in a
R2 =1− N =1
(7) scatter plot. The data points are displayed
∑ (q )
N

t.exp.N − q t.exp.N 2
as filled squares.
N =1
c) Enter labels in cells G1 to G8 to depict the
2
contents of the next adjacent cells H. In
1 N  q t.exp.N − q t.model.N  (8)
NSD = 100 × ∑ q
N − 1 i =1 
 cell G1 enter qm, which will describe the
t.exp.N  maximum adsorption capacity in cell H1.
Similarly, for cells G2 to G8, KL Mean of
100 N  q t.exp.N − q t.model.N  Exp. qe, df (degree of freedom), S.E.
ARE = ∑ q
N i=1 
 (9) (standard error) of Exp. qe, R2. Critical t
t.exp.N 
and CI (confidence interval), respectively.
where, qt.exp and qt.model (mg/g) are experi- d) For Kinetics model, Enter qe in cell G1 and
mental (‘exp’) and model (‘model’) predicted K2 in cell G2 and rest of cell G (G3 to G8)
amount of adsorptions capacity at time ‘t’ and are same as point 3.
‘N’ is the number of observations. The smaller
e) Enter Langmuir Isotherm equation (eq.1)
values of NSD and ARE imply the better
in column C (C2 to C17) which gives the
fitted model.
predicted values of equilibrium adsorption
capacity, qe for the corresponding equilib-
2.3 Algorithm and configuring the rium concentration, Ce. The Excel recog-
spreadsheet for non-linear models nized form of the equation is:
The following process illustrates how to use = ($H$1*$H$2*A2)/(1+ ($H$2*A2))
the SOLVER function in Excel to fit data with f) For kinetics equation (eq.2) enter the excel
user-input non-linear functions. The procedure form function in column C (C2 to C15)
by which the data fit proceeds is called iterative which give the predicted values of equi-
non-linear least squares regression. To execute librium adsorption capacity, qt for the
non-linear regression analysis using the corresponding equilibrium time, t. The
Langmuir isotherm and Pseudo-2nd-order Excel recognized form of the equation is:
kinetics models, the following procedure must
= ($H$2*($H$1^2)*A2)/(1+$H$1*$H$2*A2)
be formulated prior to proceed:
g) The mean value of qe for equilibrium
isotherm and qt for kinetics adsorption are
a) Enter experimental data onto a spreadsheet
calculated from the data at column B. The
in two columns, the A column containing
excel recognized form of the equation is
the ‘equilibrium concentration, Ce (mg/l)’,
need to be entered in cell H3 and the form
and the B column containing the
is:
‘equilibrium capacity, qe (mg/g)’ for
Langmuir isotherm; and ‘equilibrium = AVERAGE (B2:B17)
concentration at t, Ct (mg/l)’ in A column h) Enter the df (degree of freedom) function
228 M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237

in cell H4 and the excel form is: o) The S.E. of the exp. qe values, R2 and CI
= COUNT (B2:B17) − COUNT (H1:H2) are automatically calculated: 1.407, 0.995
and 3.017, respectively for Langmuir
i) The Standard Error (S.E) of experimental isotherm.
qe is measured from the values in column
B by Equation (3). Formulate the S.E. p) Similarly, the S.E. of the exp. qt values, R2
equation in excel function and enter in the and CI are automatically calculated: 3.481,
column H5. As this is an array, it needs to 0.995 and 7.584, respectively for Pseu-
be pressed ctrl+alt+enter together and the do-2nd-order kinetics model.
excel form is: q) Insert initial estimates (e.g. 40 and 2,
= {SQRT (SUM((B2:B17 − C2:C17)^2)/H4)} respectively) of the parameters qm/qe and
constant KL/K2 into cells H1 and H2,
j) The value of R2 is determined by Equation
respectively for isotherm and kinetics
(4) for Langmuir isotherm and Equation
model before running the algorithm.
(7) for Pseudo-2nd-order kinetics model.
It is calculated by entering the following r) Now execute the SOLVER to calculate
formula in H6 and expressing it as an array and fit the data.
formula as described below: s) Graph Columns C, D and E versus
= {1-(SUM((B2:B17−C2:C17)^2)/ Column A such that they are displayed as
SUM((B2:B17 - H3)^2))} continuous lines on the graph as illustrated
in Figures 4 and 5. These lines show the
k) In order for the confidence interval of the
fitted lines after running the algorithm, but
fit to be calculated, the critical t value at a
before running algorithm it may be shown
significance level of 95% is calculated by
different type of lines. The following
entering the following formula in H7.
section describes manipulations that allow
= TINV (0.05, H4) SOLVER to improve the fit.
l) The confidence interval is defined as
qemodel* Critical t*S.E. of Exp. qe. Thus in 2.4 Operation of SOLVER and controls
H8 enter = Critical t*S.E. of Exp. qe
= H7 * H5
Open the SOLVER function from the Tools
menu. The dialogue box showed in Figure 3A
m) Enter the following formula in D2 and appears the SOLVER. If SOLVER is not in
copy it down to D17. This calculates the this menu it should be installed, and use help
upper confidence limits (95%) of the from Excel for installation procedure if need-
model prediction. ed. The above procedure sets up the excel
= C2 + CI = C2 + $H$8 sheet that SOLVER requires in order to fit a
n) Similarly, enter = C2 − CI = C2 − $H$8 in data to the experimental data for non-linear
E2 and copy down to E17. This calculates function. Simply enter the suitable parameter
the lower confidence limits (95%) of the values in Column H and the function in a form
model prediction. that Excel recognizes in Column C.
M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237 229

Figure 1 The experimental data are entered into Column A and B with all Excel functions into
spreadsheet template for non-linear regression of Langmuir Isotherm

Figure 2 The experimental data are entered into Column A and B with all Excel functions into
spreadsheet template for non-linear regression of Pseudo-2nd-order kinetics model

A B

Figure 3 The built-in ‘Solver’ functions for running the setup algorithm and advance option. A:
The ‘Solver’ dialogue box used as an interface between the ‘Solver’ function and data on the
spreadsheet. B: The control and fine tune of algorithms using the ‘Solver Options’ dialogue box
230 M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237

Figure 4 The excel sheet after executed the algorithm for Langmuir isotherm model with
predicted parameters and fitted data curve with experimental data curve

Figure 5 The excel sheet after executed the pseudo-2nd-order kinetics model with predicted
parameters and fitted data curve with experimental data curve

After open the SOLVER, set the ‘target cell’ optimal values of qm/qe and KL/K2 are
to $H$6, ‘equal to’ max and ‘by changing cells’ 59.336/142.546 and 0.019/0.00019, respec-
to $H$2, $H$3. Now execute ‘Solve’ in the tively. The maximal value of R2 is 0.995/0.995
right corner (Figure 3A) and the value will for isotherm and kinetics model, respectively.
change. These changes will be displayed on the The continuous thick line in Figures 4 and 5
spreadsheet template (Figures 4 and 5). The with ∆ marker illustrates the best fit and it is
M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237 231

clear that it is an improvement over the fit Use Automatic Scaling: This option can be
provided by the initial parameter values. used for automatic scaling when inputs and
Additionally, the confidence intervals around outputs have large differences in magnitude. It
the fit have been reduced. is recommended that this box keep checked for
The default solver settings can be changed all ‘Solver’ models.
by opening the Solver Options (Figure 3B). Assume Non-Negative: No constraints
Normally, the default setting is appropriate for have been used for all adjustable cells to get a
most situations but that can be changed into lower limit of 0 for all adjustable cells.
required targets. The most relevant to the Show Iteration Results: Set to have
protocol in this paper are described as below. ‘Solver’ pause to show the results for every
Max time: This is the amount of time in iteration.
seconds that ‘Solver’ will be allowed to run the Estimates: It determines subsequent esti-
iteration process before stopping. The default mates of the basic variable values at the outset
value is 100 s. of each one-dimensional search.
Iterations: It is the number of iterations that Tangent: It uses linear extrapolation from a
‘Solver’ will carry out the calculation before tangent vector. The Tangent choice is slower
stopping. The default value is 100 and it will but more accurate.
provide the optimal solution before either of
Quadratic: This option extrapolates the
these limits is reached and will present the minimum (or maximum) of a quadratic fitted
results. to the function at its current point.
Precision: It is determined how the calcu-
Derivatives: This option denotes the
lated values are precise to meet a target or difference used to estimate partial derivatives
satisfies a lower or upper bound. The default of the objective and constraint functions in the
value is 0.000001. The higher the precision, the
models.
more time is taken to reach a solution.
Forward: The previous iteration is used in
Tolerance: This option is appropriate only conjunction with the current point by this
to problems with integer constraints. The
option. It saves the recalculation time for finite
percent value by which the target cell of a
differencing, which can account for up to half
solution will fulfill the integer constraints and
of the total solution time.
it can differ from the true optimal value;
however, it still be considered acceptable. A Central: Central difference depends only on
lower tolerance tends to slow up the solution the present point and disturbs the decision
variables in opposite directions from that point.
process and the default value is set at 5.
Although this engrosses more recalculation
Convergence: It tells the ‘Solver’ when to
time, it may provide better result to choose a
stop the iterative process. The ‘Solver’ stops
direction when the derivatives are rapidly
after five iterations, if the calculated value in
changing, and hence fewer total iterations.
‘target cell’ is less than the number in the
Search: It specifies the algorithm used for
‘Convergence box’. The smaller the conver-
each iteration to find the direction to search.
gence value, the more time ‘Solver’ takes to
reach a solution and the default value is 0.001. Newton: The default choice is Newton that
requires more memory but less iteration than
Assume Linear Model: This analysis is
does the Conjugate gradient method.
non-linear regression, so leave the box
unchecked. It could be checked only if the Conjugate: It requires less memory than the
model is solved in linear. Newton method but typically needs more
232 M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237

iteration to reach a particular level of accuracy. experimental data. The goodness of fit of the
Load Model: It allows loading a previously model prediction to the experimental data were
saved fitted routine with newly data. evaluated by R2 and RMSE and χ2 for
Save Model: This option allows the user to Langmuir model; and NSD and ARE for
save the preferable fitting routine for future Pseudo-2nd-Order model (Hossain et al.,
2012a; Wang et al., 2004). The R2 values also
use.
calculated from linear regression and
MATLAB analysis to judge of the best fit and
compared. Normally the sum of the squares of
3. RESULTS AND VALIDATION OF
regression computes how far the predicted
THE MODELS
values differ from the overall mean of actual
The spreadsheet based models were executed values, and is equivalent to the sum of the
with the experimental data of copper(II), squares, the denominator of Equation (4) for
lead(II) and cadmium(II) adsorption on garden Isotherm and Equation (7) for Kinetics model.
grass. The parameters of Isotherm and kinetics After using ‘Solver’ analysis, the united values
model from the predictions were compared of the parameters for Langmuir isotherm and
with linear analysis and MATLAB modelling Kinetics model with linear and MATLAB
(procedure details is not provided in this paper) analyses are presented in Tables 1 and 2.
parameters. The model analysis process and after analy-
sis with ‘Solver’ are shown in Figures 1 and 4
3.1 Verification of models data respectively. The model fitting statistics of the
Langmuir and Kinetics model from Excel
Some conventional programmes and model- Spreadsheet, Linear and MATLAB program
ling are designed based on the standard error of were used to explain ‘predicted maximum or
the parameters for non-linear regression, but equilibrium adsorption’ with ‘experimental
these values are not always considered valua- adsorption’ relationships (Table 1). According
ble (Motulsky and Ransnas, 1987). As these to the R2 values (Table 1), the experimental
errors are neither additive nor symmetrical, data for copper(II), lead(II) and cadmium(II)
and exact confidence limits cannot be esti- adsorption on garden grass were highly fitted
mated by non-linear functions (Motulsky and with Langmuir isotherm prediction. It is
Ransnas, 1987). This Excel based program is apparent that the linear analysis showed low
designed with the built-in functions and the fitness with experimental data as R2 values of
coefficient of determination (R2) is used 0.382, 0.700 and 0.142 for copper(II), lead(II)
instead of standard error of the parameters for and cadmium(II) adsorption on garden grass
non-linear regression. It is assumed that an respectively. Conversely, the Excel Spread-
appropriate function is used to describe the sheet and MATLAB program analysis
experimental data and it is informed that how demonstrated high R2 with prediction for
accurately the function describes or fits the experimental data for copper(II), lead(II) and
data. The R2 value is named as the coefficient cadmium(II) adsorption on garden grass as the
of determination and its value represents the values were 0.995 and 0.997 for copper(II),
fraction of the overall variance of the ‘pre- 0.996 and 1.00 for lead(II) and 0.996 and 0.999
dicted model’ data that is explained by the for cadmium. It is revealed that both analyses
‘experimental data’. It is calculated from the systems predicted similar data which were
sum of the squares of the residuals captured the close to the experimental data. Furthermore,
error between the model prediction and the the Excel Spreadsheet and MATLAB program
M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237 233

analysis indicated similar prediction for mination, R2 values by excel spreadsheet,


experimental data for copper(II), lead(II) and linear and MATLAB analysis were similar
cadmium(II) adsorption on garden grass. These (Table 2), which implies that all analysis were
two analyses systems predicted the parameters properly fitted with experimental data. The R2
for Langmuir isotherm such as qm that were values for excel model, linear and MATLAB
similar for the three metals adsorption. The analysis were 0.995, 0.995 and 0.998 for
predicted values of qm from Excel Spreadsheet copper(II), 0.997, 0.998 and 0.998 for lead(II),
and MATLAB program analyses were 59.336 and 0.996, 0.999 and 0.998 for cadmium(II)
and 59.899 mg/g for copper(II), 63.663 and adsorption onto garden grass.
63.509 mg/g for lead(II), and 42.310 and Linear analysis was found to be equal
41.560 mg/g for cadmium(II) adsorption. On validity to the experimental with excel model
the other hand, linear analysis predicted much and MATLAB analysis. However, K2 values
lower values for qm for three metals adsorp- by linear analysis were different with the
tion. The model constants KL were predicted prediction of other two models while K2, by
at similar values by the two analyses system excel spreadsheet and MATLAB analyses were
but different values found by linear analysis similar and almost equal to the experimental
(Table 1). A plot of predicted data (Langmuir, data (Table 2). From the above discussion,
qe) versus experimental data (Exp. qe) for excel spreadsheet method can be reliable and
copper(II) adsorption onto garden grass by useful for kinetics analysis.
excel model is shown in Figure 4. As can be
seen in Figure 4, Excel spreadsheet model has 3.2 Statistical significance of excel
similar fit to measured values/experimental modelling
data of copper(II) adsorption to MATLAB
analysis (R2 = 0.995 compared to R2 = 0.997) Normally, non-linear regression programs
(Table 1). Similar R2 values for lead(II) and estimate of the standard error of (the) param-
cadmium(II) adsorption were predicted by eters. These values sometimes mislead the
both excel spreadsheet and MATLAB analysis. predictions and in non-linear functions,
The error functions RMSE and χ2 were also additive nor symmetrical errors, and exact
calculated and tabulated in Table 1. Surpris- confidence intervals cannot be computed
ingly both errors were predicted or estimated (Bowen and Jerman, 1995; Motulsky and
at similar values by excel and MATLAB Ransnas, 1987). The stated standard errors are
analysis. The results showed that overall based on linearising assumptions and will
performance of excel model was clearly always underestimate the true uncertainty of
equivalent to technically advanced MATLAB any non-linear equation and not proper to use
as shown in Table 1. the standard error values in further formal
The kinetics data for copper(II), lead(II) and statistical calculations (Brown, 2001; Speers et
cadmium(II) adsorption onto garden grass al., 2003). Asymptotic standard errors of the
were also analysed by MS Excel Solver parameters have been calculated, but a com-
function - spreadsheet, linear and MATLAB plex and time consuming computer program is
analysis. The MS Excel Solver function - needed to evaluate the Hessian matrix (Brown,
spreadsheet process is shown in Figure 2. The 2001; Hong et al., 2008). Thus, an approach is
analysed data are shown in Figure 5 and adopted in this paper to estimate the standard
tabulated in Table 2. It is noticeable that the error of the data around the prediction curve
predictions of equilibrium adsorption, qe, and is calculated by dividing the sum of the
kinetics constant, K2 and coefficient of deter- squares of the residuals by the degrees of
234 M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237

freedom to get the variance of experimental function (tinv) which allows calculation of the
data. The square root of this value produces the Critical t-value, thus bypassing the need to
standard error of the residuals and is used to look up tables of t values. The formula in cell
calculate the confidence interval. This confi- H7 (Figures 1 and 2) calculates this value for
dence interval is a sign of the probability that the desired confidence interval and degrees of
the true value/experimental data lie within the freedom (Abu-Lail et al., 2012; Hong et al.,
range specified by the probability formula 2008). Once this value has been calculated, the
(Brown, 2001). It commonly uses 95% confi- confidence interval is simply the best fit at all
dence interval, which means there is a 95% data points. It is found that the MS Excel
probability that the experimental value lies Solver function - spreadsheet method fulfilled
within the interval. To calculate the confidence all the statistical measures to predict the real
interval the Critical t-value must be calculated variance of probability of experimental data for
and it depends on the confidence interval and both isotherm and kinetics adsorption of
the degrees of freedom (Brown, 2001; Tramšek metals.
and Goršek, 2008). Excel has a built-in

Table 1 Comparison of equilibrium’s modelling parameters from MS Excel Solver function -


spreadsheet method with the analysed parameters from Linear and MATLAB analyses
for Langmuir isotherm
Name of metals Parameters from Excel Parameters from Parameters from
adsorption onto modelling for Langmuir Linear analysis for MATLAB analysis for
grass isotherm model Langmuir isotherm Langmuir model
model
Copper(II) qm.Exp = 50.89 mg/g qm.Exp = 50.89 mg/g qm.Exp = 50.89 mg/g
qm.Model = 59.336 mg/g qm.Model = 9.597 mg/g qm.Model = 59.899 mg/g
KL = 0.019 KL = 0.019 KL = 0.0188
R2 = 0.995 R2 = 0.382 R2 = 0.997
RMSE = 1.407 - RMSE = 1.426
χ2 = 0.854 - χ2 = 0.768

Lead(II) qm.Exp = 56.302 mg/g qm.Exp = 56.302 mg/g qm.Exp = 56.302 mg/g
qm.Model = 63.663 mg/g qm.Model = 5.659 mg/g qm.Model =63.509 mg/g
KL = 0.027 KL = 2.539 KL = 0.0198
R2 = 0.999 R2 = 0.700 R2 =1.00
RMSE = 0.833 - RMSE = 0.789
χ2 = 13.607 - χ2 = 12.908

Cadmium(II) qm.Exp = 37.64 mg/g qm.Exp = 37.64 mg/g qm.Exp = 37.64 mg/g
qm.Model = 42.310 mg/g qm.Model = 1.199 mg/g qm.Model = 41.560 mg/g
KL = 0.020 KL = 0.167 KL = 0.0199
R2 = 0.996 R2 = 0.142 R2 = 0.999
RMSE = 1.475 - RMSE = 1.365
χ2 = 1.029 - χ2 = 1.015
M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237 235

Table 2 Comparison of kinetic’s modelling parameters from MS Excel Solver function -


spreadsheet method with the analysed parameters from Linear and MATLAB analyses
for Pseudo-2nd-Order model
Name of Parameters from Excel Parameters from Parameters from
metals modelling for Pseu- Linear analysis for MATLAB analysis for
adsorption do-2nd-Order model Pseudo-2nd-Order Pseudo-2nd-Order
onto grass model model
Copper(II) qe.exp = 134.96 mg/g qe.exp = 134.96 mg/g qe.exp =134.96 mg/g
qe.model =142.540 mg/g qe.model = 140.845 mg/g qe.model = 142.550 mg/g
K2 = 0.000194 K2 = 0.00016 K2 = 0.000123
R2 = 0.995 R2 = 0.995 R2 = 0.998
NSD = 109.810 - NSD = 98.055
ARE = -32.034 - ARE = -31.056

Lead(II) qe.exp = 4.8036 mg/g qe.exp = 4.8036 mg/g qe.exp = 4.8036 mg/g
qe.model = 4.851 mg/g qe.model = 4.733 mg/g qe.model = 4.863 mg/g
K2 = 0.286 K2 = 2.706 K2 = 0.289
R2 = 0.997 R2 = 0.998 R2 = 0.998
NSD = 2.112 - NSD = 2.567
ARE = -0.052 - ARE = -0.053

Cadmium(II) qe.exp = 2.900 mg/g qe.exp = 2.900 mg/g qe.exp = 2.900 mg/g
qe.model = 2.962 mg/g qe.model = 2.921 mg/g qe.model = 2.986 mg/g
K2 = 1.089 K2 = 4.825 K2 = 1.289
R2 = 0.996 R2 = 0.999 R2 = 0.998
NSD = 2.547 - NSD = 2.897
ARE = -0.068 - ARE = -0.078

3.3 Advantages and limitations process in the wrong direction and thus wrong
solution.
The above discussion indicated that although
this analysis protocol could be seen as robust
and reliable method for isotherm and kinetics
4. CONCLUSION
adsorption modelling as compared to other
programs, a few points should be taken in mind Isotherm and kinetics adsorption of metals are
before formulating the models. Firstly, the important models to predict and explicit the
SOLVER will take longer time while the inert characters of biosorbents for researchers.
number of parameters in the function is larger. In this context, non-linear modelling is a
Furthermore, the more constraints or increas- powerful technique for standardizing the
ing tolerance or precision in the function, the experimental data. The invention of computers
longer SOLVER will take. Secondly, sensible has made the modelling of data easier, quick
initial parameters are important and an and reliable for the users. This paper described
inappropriate parameter can lead the iteration the method suitable for users with basic
236 M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237

knowledge of excel and do not require a vast 158(1), 73-87.


understanding of the mathematics behind the Gimbert, F., Morin-Crini, N., Renault, F., Badot,
processes involved in this modelling. It is P.M. and Crini, G. (2008). Adsorption isotherm
important, however, is that the users under- models for dye removal by cationized
stand enough about the data to be fit to use the starch-based material in a single component
correct type of analysis, and to judge goodness system: Error analysis. Journal of Hazardous
of fit from calculated estimates. Most of the Materials, 157(1), 34-46.
researchers might have this knowledge to
Gu, S.B., Yao, J.M., Yuan, Q.P., Xue, P.J., Zheng,
execute the program and feel freed from using
Z.M. and Yu, Z.L. (2006). Kinetics of
technically advanced and expensive computer
Agrobacterium tumefaciens ubiquinone-10
software like MATLAB. This MS Excel Solver
batch production. Process Biochemistry, 41(8),
function-spreadsheet method showed robust- 1908-1912.
ness of well-fitting with experimental data
Han, R., Wang, Y., Zou, W., Wang, Y. and Shi, J.
which has a high degree of fitness (high R2
(2007). Comparison of linear and nonlinear
values). The predicted values of parameters for
analysis in estimating the Thomas model
isotherm and kinetics are comparable with the
parameters for methylene blue adsorption onto
analysis by advanced MATLAB programme.
natural zeolite in fixed-bed column. Journal of
Thus, it is reasonably helpful and user friendly
Hazardous Materials,145(1-2), 331-335.
for researchers who are not advanced in
computer programming. Ho, Y.S. (2004). Selection of optimum sorption
isotherm. Carbon, 42(10), 2115-2116.
Ho, Y.S. and McKay, G. (1998). The kinetics of
REFERENCES sorption of basic dyes from aqueous solution by
sphagnum moss peat. The Canadian Journal of
Abu-Lail, L., Bergendahl, J.A. and Thompson, Chemical Engineering, 76(4), 822-827.
R.W. (2012). Mathematical modeling of
Ho, Y.S., Porter, J.F. and McKay, G. (2002).
chloroform adsorption onto fixed-bed columns
Equilibrium Isotherm Studies for the Sorption
of highly siliceous granular zeolites.
of Divalent Metal Ions onto Peat: Copper,
Environmental Progress & Sustainable Energy,
Nickel and Lead Single Component Systems.
31(4), 591-596.
Water, Air, and Soil Pollution, 141(1-4), 1-33.
Bilgili, M.S. (2006). Adsorption of 4-chlorophenol
Hong, S., Wen, C., He, J., Gan, F. and Ho, Y.S.
from aqueous solutions by xad-4 resin: Isotherm,
(2009). Adsorption thermodynamics of
kinetic, and thermodynamic analysis. Journal of
Methylene Blue onto bentonite. Journal of
Hazardous Materials, 137(1), 157-164.
Hazardous Materials, 167(1-3), 630-633.
Bowen, W.P. and Jerman, J.C. (1995). Nonlinear
Hong, Y., Baik, J., Ko, I.Y. and Choi, H.J. (2008). A
regression using spreadsheets. Trends in
Value-Added Predictive Defect Type
Pharmacological Sciences, 16(12), 413-417.
Distribution Model based on Project
Brown, A.M. (2001). A step-by-step guide to Characteristics. Seventh IEEE/ACIS
non-linear regression analysis of experimental International Conference on Computer and
data using a Microsoft Excel spreadsheet. Information Science, 14-16 May, Portland,
Computer Methods and Programs in Oregon.
Biomedicine, 65(3), 191-200.
Hossain, M.A., Ngo, H.H., Guo, W.S. and Nguyen,
El-Khaiary, M.I. (2008). Least-squares regression T.V. (2012a). Palm oil fruit shells as biosorbent
of adsorption equilibrium data: Comparing the for copper removal from water and wastewater:
options. Journal of Hazardous Materials,
M. A. Hossain et al. / Journal of Water Sustainability 4 (2013) 223-237 237

Experiments and sorption models. Bioresource B. and Mishra, I.M. (2006). Adsorptive removal
Technology, 113, 97-101. of phenol by bagasse fly ash and activated
Hossain, M.A., Ngo, H.H., Guo, W.S. and Setiadi, carbon: Equilibrium, kinetics and
T. (2012b). Adsorption and desorption of thermodynamics. Colloids and Surfaces A:
copper(II) ions onto garden grass. Bioresource Physicochemical and Engineering Aspects,
Technology, 121, 386-395. 272(1-2), 89-104.
Johnson, M.L. (1992). Why, when, and how Thompson, G., Swain, J., Kay, M. and Forster, C.F.
biochemists should use least squares. Analytical (2001). The treatment of pulp and paper mill
Biochemistry, 206(2), 215-225. effluent: a review. Bioresource Technology,
77(3), 275-286.
Langmuir, I. (1918). The adsorption of gases on
plane surfaces of glass, mica and platinum. Tramšek, M. and Goršek, A. (2008). Analysis of
Journal of the American Chemical Society, growth models for batch kefir grain biomass
40(9), 1361-1403. production in RC1 reaction system. Journal of
Food Process Engineering, 31(6), 754-767.
Lasdon, L.S., Waren, A.D., Jain, A. and Ratner, M.
(1978). Design and Testing of a Generalized Tunali, S. and Akar, T. (2006). Zn(II) biosorption
Reduced Gradient Code for Nonlinear properties of Botrytis cinerea biomass. Journal
Programming. ACM Transactions on of Hazardous Materials, 131(1-3), 137-145.
Mathematical Software, 4(1), 34-50. Vasanth, K.K. and Sivanesan, S. (2007). Sorption
Motulsky, H.J. and Ransnas, L.A. (1987). Fitting isotherm for safranin onto rice husk:
curves to data using nonlinear regression: a Comparison of linear and non-linear methods.
practical and nonmathematical review. FASEB Dyes and Pigments, 72(1), 130-133.
Journal, 1(5), 365-374. Wang, D., Xu, Y., Hu, J. and Zhao, G. (2004).
Smith, S. and Lasdon, L. (1992). Solving Large Fermentation kinetics of different sugars by
Sparse Nonlinear Programs Using GRG. ORSA apple wine yeast Saccharomyces cerevisiae.
Journal on Computing, 4(1), 2-15. Journal of the Institute of Brewing, 110(4),
340-346.
Speers, R.A., Rogers, P. and Smith, B. (2003).
Non-Linear Modelling of Industrial Brewing Wong, Y.C., Szeto, Y.S., Cheung, W.H. and McKay,
Fermentations. Journal of the Institute of G. (2004). Adsorption of acid dyes on
Brewing, 109(3), 229-235. chitosan-equilibrium isotherm analyses.
Process Biochemistry, 39(6), 695-704.
Srivastava, V.C., Swamy, M.M., Mall, I.D., Prasad,

You might also like