SciELO - Scientific Electronic Library Online

vol.44 número4Linear algebra and optimization based controller design for trajectory tracking of typical chemical processAntioxidant capacity of Ilex paraguariensis extracts by using HRP-based biosensor índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados




  • No hay articulos citadosCitado por SciELO

Links relacionados

  • No hay articulos similaresSimilares en SciELO


Latin American applied research

versión impresa ISSN 0327-0793versión On-line ISSN 1851-8796

Lat. Am. appl. res. vol.44 no.4 Bahía Blanca oct. 2014


Levenberg-marquardt method applied to the determination of vapor-liquid equilibrium model parameters

J.A.F. Oliveira, M.M.L. Duarte, E.L. Foletto‡,* and O. Chiavone-Filho

Chemical Eng. Department, Federal University of Rio Grande do Norte, Natal, 59066-800, Brazil
Chemical Eng. Department, Federal University of Santa Maria, Santa Maria, 97105-900, Brazil. *

Abstract— In order to correlate and optimize experimental data either from the laboratory or industry, one needs a robust method of data regression. Among the non-linear parameter estimation methods it may be pointed out of Levenberg, which applies the conversion of an arbitrary matrix into a positive definite one. Later, Marquardt applied the same procedure, calculating λ parameter in an iterative form. The Levenberg-Marquardt algorithm is described and two routine for correlating vapor-liquid equilibrium data for pure component and mixtures, based on this efficient method, have been applied. The routines have been written with an interface very accessible for both users and programmers, using Python language. The flexibility of the developed programs for introducing the desired details is quite interesting for both process simulators and modeling properties. Furthermore, for mixtures with electrolytes, it was obtained a coherent and compatible relation for the structural parameters of the salt species, with the aid of the method and the graphical interface designed.

Keywords— Nonlinear Regression; Levemberg-Marquardt Method; Vapor-Liquid Equilibria; Mixed Solvents Electrolyte Systems.


The phenomena and properties involved in the chemical processes present, usually, non-linear behavior. Therefore, it is needed a robust method of non-linear regression for providing the required correlation of the experimental data collected, either from the laboratory or from the industry.

Bard (1974) pointed out three methods of parameter estimation, i.e., least squares, maximum likelihood and Bayesian. The method of least squares is the oldest and most widely used estimation procedure. It can be applied directly to a deterministic model, without any knowledge being taken of the probability distribution of the observations. This feature satisfies quite well the propose of correlating most of the desired thermodynamic properties and process variables.

For solving these unconstrained problems, the Levenberg-Marquardt method has proven very reliable results. In this work the Levenberg-Marquardt algoritm is described in a simple form.

This parameter estimation method has been reproduced and applied for the correlation of vapor-liquid equilibrium (VLE) data using activity coefficient and equation of state approaches (Lazzús, 2010; Camacho-Camacho et al., 2007). For the first case, an evaluation of the thermodynamic consistency of the data can be provided, since activity coefficient models fulfill the exact definition of partial molar excess Gibbs energy.

Systematic evaluation of thermodynamic properties of solutions of sodium chloride (NaCl) in water, e.g., boiling point and osmotic coefficient, with an extensive experimental database, was provided by Clarke and Glew (1985). VLE calculation for mixed solvents electrolyte systems have been applied using functional group activity coefficient model, i.e., UNIFAC (Kikic et al., 1991). It was taken into account the electrostatic term with Debye-Huckel term, normalized according to the theory of Mc-Millan-Mayer. However, the estimated parameters present scattering and large order of magnitude. Loehe and Donohue (1997) described a survey of the literature models to determine thermodynamic properties of aqueous systems with strong electrolytes. Thomsen et al. (2004) have presented a systematic modeling work with mixed electrolytes and mixed solvents systems for solid-liquid-vapor equilibrium data, using UNIQUAC also. Haghtalab and Peyvandi (2009) have proposed a new version of UNIQUAC model for electrolyte solutions that requires just two fitted interaction parameters per binary aqueous system. The structural parameters of the ionic species were evaluated considering solvation for the determination of the radii.

This study aimed to describe the Levenberg-Marquardt computational procedure for estimation of vapor-liquid equilibrium model parameters. Validations of the method are present for pure component vapor pressure and binary VLE data. Application to strong electrolytes in mixed solvents systems has also been performed, using UNIQUAC model. It is proposed a new form to determine structural UNIQUAC parameters of the ions that is compatible with the solvent species parameters.


A. Levenberg-Marquardt Method

The method presented by Levenberg (1944) utilizes a conversion of an arbitrary matrix into a positive definite one. This method rests on the observation that if is any positive definite matrix, then is positive definite for λ sufficiently large, no matter what . Marquardt (1963) suggested an iterative algorithm for the selection of λ.

The importance of working with a definite positive matrix is to satisfy the necessary and sufficient conditions of minimization in the data regression, where the least square of the residuals (ei) is to be found.

B. Levenberg-Marquardt Algorithm

In this section the Levenberg-Marquardt algorithm applied for a nonlinear parameter estimation is described in four phases.


(i) Enter ρmin (a minimum value of the step length ρ, e.g. 10-7), ε (a positive small number, e.g. 10-7), (vector of the dependent variables), (matrix of the independent variables) and (vector of the initial guess of the parameters to be estimated). Set J and λ = 0.01 (Marquardt parameter);

(ii) Calculate (vector of the residuals) and (objective function), where and ;

(iii) Calculate (gradient of Φ) and (approximation of the Hessian matrix of the function Φ), where and ;

(iv) Calculate

(v) Calculate , reminding that these values may be directly evaluated by:

(vi) Calculate (vector in the direction of the proposed step), and , where and are evaluated by the Cholesky method, see, e.g., Fox (1964), which is specific for the inversion of a definite positive matrix;

(vii) If accept , replace λ by max(0.1 λ,ε) and go to the step (xxi). Or else, continue from the step (viii);

(viii) Compute , and . With these values is calculated;

(ix) If , then continue from the step (x). Else, go to the step (xvi);

Extrapolation of ρ:

(x) Set J equal to the higher integer number that do not overcome the half of J;

(xi) If set ;

(xii) If continue on the step (xiii). Else, set and go to the step (xx);

(xiii) Compute

(xiv) If continue on the step (xv). Else, set and go to the step (xx);

(xv) Set ρ = ρ* and go to the step (xx);

Interpolation of ρ:

(xvi) Set ;

(xvii) If ρ ≤ ρmin go to the step (xx). Else, continue on the step (xviii);

(xviii) Compute and set J = J + 1;

(xix) If go to the step (xx). Else, set ρ(1) = ρ and , and return to the step (xvi);

(xx) Calculate ;


(xxi) The criterion of termination is tested, using and , as an example suggested by Marquardt (1963), is given according to the following equation:

where .

If the criterion is satisfied for all parameters, iterations are terminated and is accepted as the solution . Otherwise, set λ = 10λ and = , and return to the step (ii).

C. Vapor-Liquid Equilibrium Data Regression

In order to demonstrate the applicability of the implemented Levenberg-Marquardt method, two programs for correlating vapor-liquid equilibrium data have been developed.

Antoine Constants Estimation

The first program allows data correlation of vapor pressure and temperature for pure components, using the Antoine equation. In Eq. (1) we have that Psat is the vapor pressure, T is the saturation temperature, and A, B and C are the adjusted Antoine constants. This form of the Antoine equation is usual in the literature; however the user may, easily, apply a modified version of the correlation both in terms of the logarithm base and units.


To perform the data regression, the following objective function (OF) is to be minimized, which is the defined by the absolute residual in terms of vapor pressure.


The program requires initial guesses of A, B and C parameters to be estimated, name of the substance, number of data points and list of the experimental pairs of vapor pressure and saturation temperature. Indication of the units and the literature source from which the data has been retrieved is also requested. An output is provided where information about the iterations performed during the execution is registered, allowing the detection and identification of an eventual error. After convergence, the values of the estimated constants are displayed together with respective interval confidences, standard deviations and correlation matrix of the parameters. The program also provides the relative and absolute deviations in terms of vapor pressure and the estimation of the normal boiling point, at 760 mmHg, using the obtained correlation. Results for propyl acetate have been compared with Boublik et al. (1984) and validated the implemented program. The Antoine correlation for the propyl acetate has presented relative deviation (ΔP) of 0.04% and estimated the following parameters with corresponding confidence intervals: A = 7.03008±0.03391, B = 1290.200±19.505 and C = 209.466±2.161.

Reduction and consistency test of vapor-liquid equilibrium data for binary systems

The second program developed is to accomplish the correlation of vapor-liquid equilibrium data for mixtures, using activity coefficient models presented in the literature (Prausnitz et al., 1999), i.e. Margules 2-suffixes, Margules 3-suffixes, Van Laar, Wilson and NRTL (Non-Random Two Liquids). Therefore, data regression consists of the corresponding parameter estimation of the activity coefficient model. In the case that the VLE data set is complete, i.e. presents the values of temperature, total pressure, liquid and vapor compositions, the correlation tests also the thermodynamic consistency of the experimental data set. This is due to the fact that the activity coefficient models (γi) respect the exact thermodynamic definition of partial molar excess Gibbs energy.


Thus, the Euler theorem may be applied, i.e. the additive property, together with the fundamental equation for GE, resulting in the so-called Gibbs-Duhem relation, see Prausnitz et al. (1999). This is the base of the thermodynamic consistency test of an experimental phase equilibrium data set. We may find in the literature, in general, two tests for thermodynamic consistency of VLE data, i.e. area test and deviation test. In our case, we have applied the deviation test which is in fact a data correlation followed by the analysis of the deviations (see Fredenslund et al., 1977). We may describe, easily, the VLE data correlation of a binary system by writing the total pressure equation (Barker, 1953), and neglecting the nonidealities of the vapor phase, which is a reasonable simplification for low pressures and nonassociating components.


It may be pointed out that the activity coefficients depend on the temperature, liquid mole fraction and their parameters, which are adjusted from phase equilibrium data reduction. To give an illustration, Eq. (5) shows the simple Margules 2-suffixes gamma model, for both components.


Therefore, the data reduction for the mixture is similar to the Antoine correlation, and may also be represented by Eq. (2), which defines the objective function in terms of the pressure. For the mixture the differences are that the saturation pressure is replaced by the total pressure and the parameters come from the activity coefficient model instead of the Antoine equation. After the data regression, the vapor composition may be evaluated, according to Eq. (6).


The vapor-liquid equilibrium data set for the n-heptane(1) + ethyl butyrate(2) system at 100 °C presented by Kojima and Tochigi (1979) has been used to test the nonlinear regression method implemented. The developed program allows parameter estimation of the five activity coefficient models listed at Table 1. It may be observed that all models have fitted satisfactorily the experimental data. Furthermore, the deviations presented indicate that the experimental data is consistent. Concerning the operation of the program for correlating vapor-liquid equilibrium data of mixtures, it may be pointed out that all information relative to the system is given by the input file. The model is chosen during the execution of the program, together with the initial guess of the gamma coefficients and the Marquardt parameter. An output file is also created. Similar to the Antoine program, this output file contains information related to the iterations realized, during the execution of the Levenberg-Marquardt method.

Table 1. Correlation and consistency test of the vapor-liquid equilibrium data for the n-heptane(1) + ethyl butyrate(2) at 100 °C (Kojima and Tochigi, 1979).

* C is the random parameter and has been set to 0.3, as default value.
** The values of the absolute average deviation are lower than 0.01 (Δy1 < 0.01), indicating that the data are considered to be consistent, according to Fredenslund et al. (1977).

After convergence, the values of the estimated parameters together with confidence intervals are presented together with the correlation matrix and standard deviations. Furthermore, the dependent variables are properly compared, and for the case of isothermic data, the percent average pressure deviation and the absolute average mole fraction of the vapor phase deviation are displayed, from which a thermodynamic consistence evaluation of the equilibrium data is prompt provided.

Vapor-liquid equilibrium correlation for mixtures with electrolytes

The Levenberg-Marquardt method was also applied for two aqueous ternary mixtures with methanol and NaCl and ethanol and NaCl with the second program. The corresponding binary systems have also been correlated. The UNIQUAC activity coefficient model (Abrams and Prausnitz, 1975) was applied in its original form and considering NaCl as one molecular species, i.e., neglecting the dissociation.

Table 2 reports structural parameters used for the studied species. It should be pointed out that structural parameters of the salt species, i.e., surface area and volume parameters were determined from the values of the water and a molar mass ratio. Two goals have been achieved using this approach. One was to provide data fitting capability with a reasonable order of magnitude of the structural parameters. Secondly, compatibility with the interaction parameters estimated for non-electrolyte binary mixtures are encountered. This is also an important feature for predictability of the model and group contribution applications like UNIFAC (Kikic et al., 1991). Values of r and q for ionic species have been fitted by Macedo et al. (1990). Another approach encountered in the literature is the increment of the parameters from the ionic radii by considering solvation. However, the use of these two methods demands estimation of new solvent-solvent parameters and thereby compatibility requirement is not fulfilled. By the other hand, using the values of r and q calculated from the values of water and a ratio of the molar masses, as presented in Table 2, it was obtained the desired compatibility and simultaneously good correlation capability, eliminating the problem of low structural values due to the size of the ion for UNIQUAC equation.

Table 2: Structural parameters for UNIQUAC model.

Table 3 presents the estimated UNIQUAC interaction parameters for the species studied. It should be pointed out that the non-electrolyte binary systems have been correlated initial and separately and then with these predetermined values the salt-solvent constants were estimated from the corresponding experimental data. All calculations have presented absolute average deviation in terms of vapor mole fraction lower than 0.01 and relative average deviation in terms of pressure less than 2%. These deviations indicate the consistency of the experimental data and also the quality of the parameters that gather many experimental points and different sources.

Table 3: Estimated UNIQUAC interaction parameters (aij) in kelvin for the studied systems with methanol (MeOH), ethanol (EtOH), water (H2O) and sodium chloride (NaCl)

aParameters estimated from methanol+ethanol VLE data (Niesen et. al., 1986; Kurihara et al., 1993).
bParameters estimated from methanol+water VLE data (Soujanya et. al., 2010; Yao et. al., 1999; Kurihara et al., 1993).
cParameters estimated from ethanol+water VLE data (Pemberton and Mash, 1978; Niesen et. al., 1986; Kurihara et al., 1993, 1995; Arce et. al., 1996; Navarro-Espinosa et al., 2010; Lai et al. 2014).
dParameters estimated from water+NaCl, methanol+water+NaCl and ethanol+water+NaCl VLE data (Clarke and Glew, 1985; Gmehling, 1997; Yang and Lee, 1998; Jõdecke et al., 2005), fixing MeOH+EtOH, MeOH+H2O and EtOH+H2O parameters determined previouslya,b,c.

Figures 1 and 2 illustrate the quality of the correlation obtained for the aqueous ternary systems with methanol and NaCl at 314.6 K and with ethanol and NaCl at 700 mmHg, respectively.

Fig. 1. Vapor-liquid equilibrium diagrams for methanol(1)+water(2)+NaCl(3) at 314.6 K; solid symbols experimental (Jõdecke et. al., 2005) and open symbols: UNIQUAC this work: and , x'1 =0.0328; and , x'1=0.0789; and , x'1=0.216; and , x'1=0.466.

Fig. 2. VLE y-x diagram for the system ethanol(1)+water (2)+NaCl(3) at 700 mmHg; 32 experimental points with salt mole fraction in the range of 0.001-0.1; experimental data (Gmehling, 1997); calculated values with UNIQUAC (this work).


The coherence of the developed programs has been verified via comparison with the parameters estimated for the same data set, confirming the reliability of the Levenberg-Marquardt routines implemented.

The results of the correlation program for mixtures are also efficient and analysis of the deviations allows the evaluation of the thermodynamic consistence of the experimental data. This qualification of the data may be useful for their application, i.e. for the development of models, and design and operation of processes.

The developed tool of calculation may be applied in problems of simulation and optimization of processes, using inclusive the visual recourses, which facilitates the interaction with the users. Furthermore, new correlation programs may also be developed to describe other thermodynamic and physical-chemistry properties, since Levenberg-Marquardt has been properly implemented.

These new salt species structural parameters demonstrated also to be flexible for the data correlation and coherent to respect to order of magnitude. The electrostatic contribution has not been considered for VLE calculations. The original form of the UNIQUAC model demonstrated to be feasible with the molecular approach for strong electrolyte species in mixed solvents systems.


aij UNIQUAC interaction parameters
A, B, C Antoine constants or activity coefficient parameters
approximation of the Hessian matrix of the function Φ
calcd calculated value
vector of the residuals
ei residue of point
exptl experimental value
molar excess Gibbs energy and partial molar excess Gibbs energy of species i
M number of experimental data points or atomic mass or molecular mass
mi molality of species i
n, ni total number of moles and number of moles of species i
NRTL Non Randon Two-Liquid
OF objective function
P total pressure
any positive definite matrix
vapor pressure of species i
gradient of Φ or UNIQUAC surface area parameter
r, q volume and surface area parameter
R universal ideal gas constant
T temperature
VLE Vapor-Liquid Equilibrium
matrix of the independent variables
xi, yi mole fraction of the component i in the liquid and vapor phase
x'i salt free mole fraction of the component i in the liquid phase
vector of the dependent variables
mole fraction of the component i in the vapor phase

Greek letters

ΔP percent average deviation, defined as
Δyi absolute average deviation, defined as
ε a positive small number
γi activity coefficient of the component i
vector of the parameters
vector of the parameters, initial guess
vector of the parameters at iteration i
ρ value of the step length
λ Marquadt parameter
vector in the direction of the proposed step
Φ objective function
Φ1 objective function at the iteration 1
Ψ(1) objective function at

1. Abrams, D.S. and J.M. Prausnitz, "Statistical thermodynamics of liquid mixtures: a new expression for the excess Gibbs energy of partly or completely miscible systems," AIChE J., 21, 116-128 (1975).         [ Links ]
2. Arce, A., J. Martínez-Ageitos and A. Soto, "VLE for water + ethanol + 1-octanol mixtures. Experimental measurements and correlations," Fluid Phase Equil., 122, 117-129 (1996).         [ Links ]
3. Bard, Y., Nonlinear Parameter Estimation, Academic Press, New York (1974).         [ Links ]
4. Barker, J.A., "Determination of Activity Coefficients from Pressure Total Measurements," Austral. J. Chem., 6, 207-210 (1953).         [ Links ]
5. Boublik, T., V. Fried and E. Hála, The Vapor Pressure of Pure Substances, Elsevier, Amsterdam (1984).         [ Links ]
6. Camacho-Camacho, L.E., L.A. Galicia-Luna, O. Elizalde-Solis and Z. Martínez-Ramírez, "New isothermal vapor-liquid equilibria for the CO2 + n-nonane, and CO2 + n-undecane systems," Fluid Phase Equilibria, 259, 45-50 (2007).         [ Links ]
7. Clarke, E.C. and D.N. Glew, "Evaluation of the Thermodynamic Functions for Aqueous Sodium Chloride from Equilibrium and Calorimetric Measurements below 154 °C," J. Phys. Chem. Ref. Data, 14, 2, 489-610 (1985).         [ Links ]
8. Fox, L., An Introduction to Numerical Linear Algebra, Oxford Univ. Press (Clarendon), London and New York (1964).         [ Links ]
9. Fredenslund, A., J. Gmehling and P. Rasmussen, Vapor-Liquid Equilibria Using UNIFAC, Elsevier, Amsterdan (1977).         [ Links ]
10. Gmehling, J., Dortmund Data Bank (DDB) - electrolytes (ELE). Oldenburg, Germany: DDBST GmbH (1997).         [ Links ]
11. Haghtalab, A. and K. Peyvandi, "Electrolyte-UNIQUAC-NRF model for the correlation of the mean activity coefficient of electrolyte solutions," Fluid Phase Equilibria, 281, 163-171 (2009).         [ Links ]
12. Jõdecke, M., A.P.S. Kamps and G. Maurer, "Experimental Investigation of the Influence of NaCl on the Vapor-Liquid Equilibrium of CH3OH + H2O," J. Chem. Eng. Data, 50, 138-141 (2005).         [ Links ]
13. Kikic, I., M. Fermeglia and P. Rasmussen, "UNIFAC Prediction of Vapor-Liquid Equilibria in Mixed Solvent-Salt Systems," Chemical Eng. Science, 46, 2775-2780 (1991).         [ Links ]
14. Kojima, K. and K. Tochigi, Prediction of Vapor-Liquid Equilibria by the ASOG, Elsevier, Amsterdam (1979).         [ Links ]
15. Kurihara, K. M. Nakamichi and K. Kojima, "Isobaric vapor-liquid equilibria for methanol + ethanol + water and the three constituent binary systems," J. Chem. Eng. Data, 38, 446-449 (1993).         [ Links ]
16. Kurihara, K., T. Minoura, K. Takeda and K. Kojima, "Isothermal Vapor-Liquid Equilibria for Methanol + Ethanol+Water, Methanol+Water, and Ethanol + Water," J. Chem. Eng. Data, 40, 679-684 (1995).         [ Links ]
17. Lai, H.S., Y. Lin and C.-H. Tu, "Isobaric (vapor + liquid) equilibria for the ternary system of (ethanol + water + 1,3-propanediol) and three constituent binary systems at P = 101.3 kPa," J. Chem. Thermod., 68, 13-19 (2014).         [ Links ]
18. Lazzús, J.A., "Optimization of activity coefficient models to describe vapor-liquid equilibrium of (alcohol + water) mixtures using a particle swarm algorithm," Comp. and Mathem. with Applicat., 60, 2260-2269 (2010).         [ Links ]
19. Levenberg, K., "A method for the solution of certain nonlinear problems in least squares," Quart. Appl. Math., 2, 164-168 (1944).         [ Links ]
20. Loehe, J.R. and M.D. Donohue, "Recent advances in modeling thermodynamic properties of aqueous strong electrolyte systems," AIChE J., 43, 1, 180-195 (1997).         [ Links ]
21. Macedo, E.A., P. Skovborg and P. Rasmussen, "Calculation of phase equilibria for solutions of strong eletrolytes in solvent-water mixtures," Chem. Eng. Sci., 45, 875-882 (1990).         [ Links ]
22. Maquardt, D.W., "An algorithm for least squares estimation of nonlinear parameters," SIAM J., 11, 431-441 (1963).         [ Links ]
23. Navarro-Espinosa, I.R., C.A. Cardona and J.A. López, "Experimental measurements of vapor-liquid equilibria at low pressure: Systems containing alcohols, esters and organic acids," Fluid Phase Equil., 287, 141-145 (2010).         [ Links ]
24. Niesen, V., A. Palavra, A.J. Kidnay and V.F. Yesavage, "An apparatus for vapor-liquid equilibrium at elevated temperatures and pressures and selected results for the water-ethanol and methanol-ethanol systems," Fluid Phase Equil., 31, 283-298 (1986).         [ Links ]
25. Pemberton, R.C. and C.J. Mash, "Thermodynamic properties of aqueous non-electrolyte mixtures II. Vapour pressures and excess Gibbs energies for water + ethanol at 303.15 to 363.15 K determined by an accurate static method," J. Chem. Thermodynamics, 10, 867-888 (1978).         [ Links ]
26. Prausnitz, J.M., R.N. Lichtenthaler and E.G. Azevêdo, Molecular Thermodynamics of Fluid Phase Equilibria, Prentice-Hall (1999).         [ Links ]
27. Soujanya, J., B. Satyavathi and T.E. Vittal Prasad, "Experimental (vapour + liquid) equilibrium data of (methanol + water + glycerol) and (methanol + glycerol) systems at atmospheric and sub-atmospheric pressures," J. Chem. Thermod., 42, 621-624 (2010).         [ Links ]
28. Thomsen, K., M.C. Iliuta and P. Rasmussen, "Extended UNIQUAC model for correlation and prediction of vapor-liquid-liquid-solid equilibria in aqueous salt systems containing non-electrolytes. Part B. Alcohol (ethanol, propanols, butanols)-water-salt systems," Chem. Eng. Sci., 59, 3631-3647 (2004).         [ Links ]
29. Yang, S. and C.S. Lee, "Vapor-Liquid Equilibria of Water + Methanol in the Presence of Mixed Salts," J. Chem. Eng. Data, 43, 558-561 (1998).         [ Links ]
30. Yao, J., H. Li and S. Han, "Vapor-liquid equilibrium data for methanol-water-NaCl at 45°C," Fluid Phase Equil., 162, 253-260 (1999).         [ Links ]

Received: May 21, 2013
Accepted: March 24, 2014
Recommended by Subject Editor: Mariano Martín

Creative Commons License Todo el contenido de esta revista, excepto dónde está identificado, está bajo una Licencia Creative Commons