Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Journal of Scientific & Industrial

Vol. 63, April 2004, pp. 336-343

Research

The use of neural networks on VLE data prediction t


Mehmet Bilgin*, I Metin Hasdemir
Istanbul

University,

Engineering

Faculty,

Department

and Oguzhan Oztas**

of Chemical

Engineering,

34320

Avcilar,

Istanbul,

Turkey

The neural network


model is employed
to predict the vapor-liquid
equilibrium
(VLE) data for six different
binary
systems having different chemical structures and solution types (azeotrope-nonazeotrope)
in various conditions
(isothermal
or isobaric). A model based on a feed-forward
back-propagation
neural network is proposed. Only half of the experimentally
determined
VLE data are assigned to the designed framework
as training patterns in order to estimate the VLE data of the
whole system in given conditions.
The VLE data are also calculated
by the UNIFAC model, a calculation
method widely
used in this field. The mean deviations
from the experimental
data are determined
for both the models. It is observed that the
data found by neural network
shows deviations,
particularly
data prediction
Keywords:

model gives an excellent agreement


with the experimental
data, while the UNIFAC model
at low pressures. In fact the neural network model can be treated as a potent means for VLE

in a fast and reliable

Vapor-liquid
7

IPC : Int. C1.

equilibrium,

way, compared
Neural

to the conventional

network,

Activity

coefficients,

UNIFAC

models.
model

G 06 N 3/02

Introduction
In chemical industry the vapor-liquid equilibrium
(VLE) data are motly important for the design 0[_
distillation columns, where the liquid mixtures are
separated into their components. The correlation of
these data is found thermodynamically by various
interpretations of the Gibbs-Duhem equation, because
it is troublesome and time consuming to get them
experimentally. The Wilson, NRTL, and UNIQUAC
are the local composition models, and UNIFAC and
ASOG are the main group contribution methods based
on UNIQUAC and Wilson, respectively, impliciting
the local composition concept. Some of the models
such as, UNIFAC-Lyngbi,
UNIFAC-Dortmund2,
3
and UNIQUAC-A were modified for special cases.
Another type of estimation methods are the Margules
and 'van Laar equations, which are empirical models
of solution behaviour, derived from excess Gibbs
energy function. These models represent the excess
Gibbs energy function in different types of mathematical expressions and are used, both in vapor-liquid
and liquid-liquid
equilibrium
calculations.
The
t

thermodynamical

This work was supported


by the Research Fund
Uni versity, Project number: 172911508200 I

"Author for correspondence


""Department
of Computer

Engineering

of the Istanbul

common feature is that the models use the liquid


phase activity coefficient to achieve the equilibrium
data. Therefore, these methods are called activity
coefficient models, in general, and include two or
more energy parameters with respect to a particular
system. A set of specific parameters measured with
respect to any system is valid exclusively for such a
particular system (it cannot predict differences
between isomers for example). On the other hand,
because of the complexity of mathematical functions
in some models, determination of the energy
parameters is mathematically difficult. Furthermore,
for a defined system the energy parameters
determined by a known model given by different
sources in the literature, is found to be sometimes
different. In fact, any doubt about the VLE estimates
causes the design to be made at higher reflux ratio
than may be necessary, leading to increased energy
usage in distillation method. Although these models
have limited flexibility in the fitting of data, they are
adequate for most engineering purposes. But these
uncertainties cause errors in activity coefficient data,
especially in equilibrium data.
The neural network model, proposed in this paper,
is an alternatively intensive used method for most of
prediction problems in engineering calculations
and/or for different purposes. Many studies have

claimed neural networks potent applicability for


analysis of some complex systems. Neural networks
have succeeded in coping with a few biological and
chemical problems such as, control of bioreactors
with unstable parameters4, prediction of secondary
dimensional
structure of proteins5,
analysis of
overlapped spectrum or chromatography6, property
prediction
of compounds?,
phase
equilibrium
prediction in aqueous two-phase extraction8, and
design of a combined mixing rule for the prediction of
vapor-liquid equilibria9
The neural network is unable to offer parameters
such
as, the second
virial
coefficients
in
thermodynamic meanings or any energy parameter in
a detailed mechanism. For the purpose of gaining
promising predictability, an approach based on
optimum neural network architecture should be
determined.
Thermodynamic Basis
For any vapor-liquid system in equilibrium the
equality of fugacities of pure components leads to,

where Yi is the mole fraction of component i in vapor


phase,

is the mole fraction in liquid phase, <1>; is the

Xi

fugacity coefficient of i in the vapor phase, P is the


total pressure, Yi is the activity coefficient of i in the
fluid phase and J;0 is the standard-state fugacity of
the pure i component. The standard-state fugacity is
considered the fugacity of pure liquid i (j;) at system
temperature and pressure and is given by:
. 'V.
J;. =pSthS
I

[V/(P-P/)]

exp -----

"

[V.L(P_PS)]

<1>;

RT

At low pressures, vapor phases usually approximate ideal gases, for which <1>; = <1>; = 1 and the
Poynting factor, represented by the exponential,
differs from unity by only a few parts per thousand
and their influence in Eq. (4) nullifies. Thus the
assumption that <I>i = 1 introduces some error for
low-pressure VLE data, the Eq. (3) gets reduce to:
Y i-_ Yi'P
pXSj'

Neural Network Model


A neural network mimics the structure of human
synapse connections to imitate the work of the brain.
Typical structure of a neural network consist of
multiple layers, each of them has a group of
computing neurones, as shown in Figure 1. Each of
the neurone in one layer is completely connected with
others in the adjacent layers but not with ones in the
same layer. The first layer merely stores and
transports the values of the input features to the next
layer, the last layer calculates the output values, and
between them are the hidden layers.
One typical neurone in such a neural net is shown
in Figure 2. The inputs X are the products of the
incoming neurone values L and synaptic weights w,
Eq. (6). The output Y is then determined by applying
the resulting input value to the activation function.
There are many activation functions available to be
adopted for a net. In this work the log sigmoid
function, given in Eq. (7), was preferred. As a result

RT

where for pure liquid,

where CP. =-' .exp _

p/

is the saturation (vapor)

pressure, <1>; is the fugacity coefficient at saturation,


and

V;L

is the molar liquid volume, at temperature T.

The exponential is known as the Poynting factor.


Substituting in Eq. (1) for fi by Eq. (2) and solving for
Yi gives:

Yi =

y.cp.p
~s
I

Xi'

'

Fig. I-Typical
layers

structure of a neural net consisting of multiple

of this preference the input values can be any values


in the range of - and +
but the output values are
limited between 0 and 1. Thus, normalisation to the
vapor-liquid equilibrium data was performed in order
to obey the output ranges. Eq. (6) and (7) are given as
below:
00

y =

00

f(~LjWi) ,
=1

f(X)

+e

-x'

here N is the number of incoming values from


different neurones, L is the vector of incoming
neurones, and w is the synaptic weights between
incoming values and selected neurone.
Experimental Procedure
The feature of the neural network has been adapted
to deal with the prediction of the VLE data of six
various systems (Table 1). Four of the systems were
taken from literature. All of the systems present
various chemical structures and different solution

Weights
o

Lo
;

Inputs

':

System

Solution type

types
(azeotrope-nonazeotrope)
under
various
conditions (isothermal or isobaric). The isobaric VLE
data of isopropanol - methyl isobutyl ketone (MIBK)
systems at 53.33 and 80.0 kPa were determined
experimentally.
Isopropanol and methyl isobutyl ketone were used
in Merck quality. An all-glass dynamic recirculating
vapor-liquid equilibrium apparatus, developed by
Fischer Scientific Co., equipped with temperature and
pressure controllers were used in the experimental
equilibrium data determinations. The still allows good
mixing and flowing of both vapor and liquid phases
through an extended contact line, which guaranties an
intense phase exchange and their separation, once the
equilibrium is reached. The equilibrium temperature
was measured using a mercury glass thermometer
(Fischer certificated) within an accuracy of 0.05 K.
The temperature control of the heating was achieved
by a digital thermometer provided with a Pt-100
sensor. The total pressure of the system was
controlled by an electronic manometer. The VLE tests
were run at 40, 66.66 and 101.32 0.02 kPa
pressures, respectively. The equilibrium conditions
were checked by the reproducibility of the results of
gas chromatography (GC) analysis of liquid samples
taken from two phases.
Approximately, 100 mL low boiling component
(isopropanol) was put in the boiler of the apparatus.
The pressure was set via the controller and the heaters
were then actuated. On reaching the boiling point the
equilibrium temperature of the pure low boiling
component was determined. The 2-2.5 mL high
boiling component (methyl isobutyl ketone) was then
added to the boiler and waited for the equilibrium
conditions. The attainment of a constant temperature
for about 1 h was the sign of equilibrium reached. In
equilibrium, samples were taken out from liquid and
condensed vapor phases for analyzing with Gc. Thus,
in a known pressure (P) the liquid and vapor phase

Isopropanol + MIBK*

Normal

Isobaric, 53.33 kPa

Experimental

Isopropanol + MIBK
n-hexane + 1,2-dichloroethane

Normal
Min. azeotrope

Isobaric, 80.0 kPa

Experimental

Isothermal, 323. 15K

n-heptane + 1,2- dichloroethane

Min. azeotrope

Isothermal, 323.15 K

ref. 13
ref. 13

Normal

Isothermal, 323. 15K


Isobaric, 101.32 kPa

1,2-dichloroethane

+ n-octane

Acetone + chloroform

Max. azeotrope

ref. 13
ref. 14

compositions (XI> X2, YI> Y2) of a mixture at the


equilibrium
temperature
(D were determined
experimentally. By adding a few mL high boiling
component each time and repeating and while
continuing this procedure the equilibrium data of the
high boiling component enriched mixtures were
determined as well. Finally the boiling point of the
pure high boiling component was determined after
recharging the apparatus.
Samples withdrawn from the liquid and condensed
vapor phases were analyzed with a Hewlett-Packard
GC Analyzer, model HP-6890, equipped with FIdetector, and coupled with HP Chem-Station
software. An innowax (PEG) capillary column, 30m x
320 /lm x 0.5 /lm in size, was used to separate the
compounds at tailorized oven programs available for
each binary system studied. Nitrogen was used as
carrier gas at a flow rate of 0.8 mLimin. All injections
were performed on the split rate of 5/1. The GC was
calibrated with gravimetrically prepared standard
solutions to convert the peak area to the mole fraction
composition. Mole fractions were accurate to better
than 0.002.
Application of Neural Network

The adaption of the neural network model to the


VLE data prediction was performed by using the
MATLAB program (version 6.0), a widely used
calculation and programming agent in engineering
applications. The VLE problem was handled as a
generalization
problem and the neural network
calculations employed a feed-forward algorithm to
calculate the output, along with back-propagation to
recursively correlate the weights. The learning
process by adjusting the weights of the model was the
most important part to establish a predictable neural
network. As objective function in the learning process
the total squared error in each vector was taken as
0.0005 by using Eq. (8).

L,
II

Total squared error =

(~exPtl

_ ~Cal)2

1=1

here y/xptl
is the experimental value, y/'al the
calculated value, and n the experiment number.
Only half of the experimentally determined VLE
data points of six various binary mixtures were
assigned into the designed framework as training
patterns, in order to estimate the whole systems. The

results were verified by examining the distribution of


output errors and the dynamic response of the
learning process.
In the application the low boiling component
concentrations in the liquid phase (Xl) are given as
input set values, and as a result the low boiling
component concentrations in the vapor phase (y l) and
the liquid phase activity coefficients (YI, Y2) are taken
as output set values. The program is shown in
Appendix A.
Results and Discussion
The experimental activity coefficients, YI and Y2,
were calculated using the experimental T-XrYl values
of related binary systems in the Eq. (5). The pure
component vapor pressures (p/) in this equation
were calculated through the Antoine equation using
the constants Ai, Bi, and Ci (ref. 10).
The experimentally observed values of activity
coefficients (n) and vapor phase concentrations (Y/)
were compared with estimated values from UNIFACoriginal model I I and designed neural network model.
In the UNIFAC model the group-volume and surfacearea parameters of the mentioned chemicals were
taken as well. Table 2 and 3 present a quantitative
assessment of the predictions achieved for each
method with respect to mean deviation. Mean
deviation was taken as shown in Eq. (9) (ref. 12).
Mean deviation =
~Yi

= tl~.k(exptl)-~.k(calcd)l/n
k=1

According to Table 2 the isobaric isopropanol methyl isobutyl ketone systems at 53.33 and 80.0 kPa
and the isothermal 1,2- dichloroethane + n-octane
system at 323.15 K are attracting attention with a
mean deviation above 0.1 with respect to UNIFAC
calculated activity coefficients. These deviations are
shown in more detail by plotting experimentally
observed n values against the estimates in Figures 35, respectively. The neural network model has shown
excellent results for all systems with its flexible
configuration.
For evaluating the appropriateness of the models to
the azeotrope systems, it is useful to show the X-Y
plots (vapor-liquid
equilibrium
curve) of the
azeotrope systems n-hexane+ 1, 2-dichloroethane at

System
Isopropanol + MIBK, 53.33 kPa

YI
0.1006

Y2
0.1400

YI
0.0553

Y2
0.0119

Isopropanol + MIBK, 80.0 kPa

0.1412

0.1782

0.0234

0.0360

n-hexane + 1,2-dichloroethane

0.0630

0.0543

0.0238

0.0142

n-heptane + 1,2- dichloroethane

0.0475

0.0382

0.0261

0.0304

+ n-octane

0.0233

0.1051

0.0310

0.0452

0.0198

0.0104

0.0163

0.0094

1,2- dichloroethane

Acetone + chloroform
2,4

Table 3 -

.
0

2,2
2

experimental

"'(,

experimental

1"

".

Mean deviations between experimental and calculated


vapor phase concentrations
UNIFAC

System

.... UNIFAC

1,8

Neural network

UNIFAC

./

Neural network

YI

)'1

0.0135

0.0111
0.0114

/'''''

".

Neural Network

Isopropanol + MIBK, 53.33 kPa

l/

./'

,/

1.6

.~I

..,/
,/

....

1,4

.'

1,2

Isopropanol + MIBK, 80.0 kPa

0.0258

n-hexane + 1,2-dichloroethane

0.0163

0.0095

n-heptane + 1,2- dichloroethane

0.0077

0.0135

1,2-dichloroethane + n-octane

0.0094

0.0082

Acetone + chloroform

0.0028

0.0114

0,8

5,00

0.1

0,2

0,3

0,4

0,5

0,6

0,7

0.8

0.9

experimental

Y2.

experimental

Yl

4,50

X1

4,00

Fig. 3--Comparison
of calculated and experimental activity
coefficients of isopropanol + methyl isobutyl ketone system at
53.33 kPa

3,50

3,00
2,50
2,00
1,50

2,40

1,00
2.20
0,50
0

2,00

'.
1,80

.,

0,1

0,2

0,3

0,4

0,5

0,6

0,7

0,8

0,9

X,

'" .....

.....

~
..-

1,60

....
'-'

Fig. 5--Comparison
of calculated and experimental actiVIty
coefficients of 1,2- dichloroethane + n-octane system at 323.15 K

..
'.

1,40
1.20

0,80

0,1

0,2

0,3

0,4

0,5

0,6

0,7

0,8

0,9

x,
Fig. 4-Comparison
of calculated and experimental actIvity
coefficients of isopropanol + methyl isobutyl ketone system at
80.0 kPa

323.15 K (Figure 6), n-heptane + 1,2- dichloroethane


at 323.15 K (Figure 7), and acetone + chloroform at
101.32 kPa (Figure 8). At these systems the
azeotropic point, where the equilibrium curve
intersect the diagonal is, in fact. important,
representing the separation concentration of the
systems with normal distillation method. It was seen
that both the models show satisfactory results for
azeotrope systems.

0,9

0,9

0,8

0,8
0,7

0,7

0,6

0,6

y,

y,

0,5

0,5

0,4
0,4
0,3

0,3

0,2
0,1

experimental
Neural Network

0,2

experimental
Neural Network

0,1

UNIFAC
0

0
0

Fig. 6-Comparison
of calculated and experimental vapor phase
compositions of the System n-hexane + 1,2-dichloroethane at
323.15 K.

Fig. &--Comparison of calculated and experimental vapor phase


compositions of the system acetone + chloroform at 101.32 kPa

Conclusion
In this study the VLE data for six different binary
systems
(azeotrope-non azeotrope,
isothermal
or
isobaric) were predicted, applying neural network
model. It was seen that neural network can be treated
as a potent means for VLE data prediction in a fast
and reliable way, compared to the conventional
thermodynamical models. The VLE data of binary
systems in a wide range of pressure, and the VLE data
of ternary and quaternary mixtures presenting
different chemical structures will be the future course
of our study.

0,9
0.8
0,7
0,6

y,
0,5
0,4
0,3
0,2
0,1
0
0

Fig. 7--comparison
of calculated and experimental vapor phase
compositions of the system n-heptane + 1,2-dichloroethane at
323.15 K

In UNIF AC method, despite the care taken for


pressure indirectly through the temperature, it seems
insufficient at low pressures. On the contrary, neural
network model shows a good agreement at all
conditions,
presenting minimum deviations and
giving satisfying results.

Larsen B L, Rasmussen P & Fredenslund A, A modified


UNIFAC group-contribution
model for the prediction of
phase equilibria and heats of mixing, Ind Eng Chem Res, 26
(1987) 2274.
Gmehling J, Li J & Schiller M, A modified UNIFAC model.
2. Present parameter matrix and results for different
thermodynamic properties, Ind Eng Chem Res, 32 (1993)
178.
Fu Y, Sandler S I & Orbey H, A modified UNIQUAC
model that includes hydrogen bonding, Ind Eng Chem Res,
34 (1995) 4351.
Syu M J & Tsao G, Neural network modeling batch cell
growth pattern, Biotechnol Bioeng, 42 (1993) 376.
Holbrook S R, Dubchak I & Kim S H, Probe: a computer
program employing an integrated neural network approach
to protein structure prediction, Biotechniques, 14 (1993) 984.
Gasteiger J & Zupan J, Neural networks in chemistry,
Angew Chem Int Ed Engl, 32 (1993) 503.

10
11

Cheraoui D & ViIlemin D, Use of a neural-network to


determine the boiling-point of alkanes, J Chem Soc,
Faraday Trans, 90 (1994) 97.
Kan P & Lee C, A neural network model for prediction of
phase equilibria in aqueous two-phase extraction, Ind Eng
Chem Res, 35 (1996) 2015.
Alvarez E, Riverol C, Correa J M & Navaza J M, Design of
a combined mixing rule for the prediction of vapor-liquid
equilibria using neural networks, Ind Eng Chem Res, 38
(1999) 1706.
Reid R C, Prausnitz J M & Poling B E, The properties of
gases and liquids (McGraw-Hill, New York) 1987,629.
Fredenslund A, Gmehling J, Michelsen M, Rasmussen P &
Prausnitz J M, Computerized design of multi component

distillation columns using the UNIFAC group contribution


method for calculation of activity coefficients, Ind Eng
Chem Pro Des Dev 16 (1977) 450.
12

Fredenslund A, Jones R L & Prausnitz J M, A1ChE Joul7lal,


21 (1975) 1086.

13

Chaudhari S K & Katti S S, Vapour-liquid equilibria of


binary mixtures of n-hexane, n-heptane and n-octane with
1,2-dichloroethane at 323.15 K, Fluid Phase Equilib, 57
(1990) 297.

14

Kogan W B & Fridman W M, Handbuch


fliissigkeits-gleichgewichte
(VEB Deutscher
Wissenschaften, Berlin) 1961, 125.

Nomenclature

fi

\f

fO
L
n
N
p

If
R

fugacity of pure liquid


at system
temperature and pressure
fugacity
pure
standard-state
of
the
component i
vector of incoming neurones
experiment number
number of incoming values In a neural
net
pressure (kPa)
saturation (vapor) pressure of pure liquid i
universal gas constant

clear
NNTWARNOFF
% This program is tested with MA TLAB version 6.0
release 12.
% Definitions:
% Training set file: The file consisting the data for
training the neural network ( x, y, T, gammal,
gamma2 vectors).
% Input set file: The file consisting the data to be used
as input set for neural network (vector x).
% Output set file: The file where the output set of the
neural network will be saved.
% loading data ...

R=inputCTraining Set File Name: ','s');


S=input('Input Set File Name: ','s');
G=inputCOutput Set File Name: ','s');
PPP=load(R);[lpx Ipy]=size(PPP);
PPPl1=load(S);[lpxll
Ipyll]=size(PPPll);

w
Xi
Yi

L1Y;
<1J;

del' dnmpfVerlag der

temperature (K)
molar liquid volume of pure component i
synaptic weights
mole fraction of component i in liquid phase
mole fraction of component i in vapor phase
mean deviation
fugacity coefficient of pure component i at
saturation

<1>;

fugacity coefficient of component

y;

vapor phase
activity coefficient of i in the fluid phase

% building input vector [P] ....

x l=PPP(l :lpx,l);
P=xl';
xll=PPPll(1:lpxll,l);
Pll=xll';
% building target vector [T] ...
yl=PPP(1:lpx,3);
temperature=PPP(1: Ipx,5)/l 000;
gama1=PPP(1 :lpx,6)/l0;
gama2=PPP(1 :lpx,7)/l 0;
T=[y l';temperature';gama1';gama2'];
% defining hidden neurons ....
hl=8;
% building weight coefficients randomly ....
wl=rand(l,hl)';w2=rand(hl,4)';
b l=rand(hl, 1);b2=rand( 4,1);

in the

% training ...
df=500;
me=10000;
eg=0.0005;
lr=0.02;
tp=[df me eg Ir];
[wI ,bl, w2,b2,ep,tr]=trainbpx(wl,b
gsig',P,T,tp );

output2( :,3)=output(: ,2);


output2(:,4 )=output(: ,3);
output2(: ,5)=output(:,4);
disp

--')

1,'Iogsig', w2,b2,'lo

% processing output data ...


TTy=simuff(P, wl,b 1,'Iogsig', w2,b2,'logsig');
TTyll=simuff(Pll,wl,bl,'logsig',w2,b2,'logsig');
% displaying normalized output data ...
output=TTy 11';
output(:,2)=output(:,2)* 1000;
output(:,3)=output(:,3)* 10;
output(:,4 )=output(:,4)* 10;
output2(l:lpxll,I)=xll;
output2( :,2)=output(:, 1);

dispC xl
yl
gamma2')
disp( output2)

% fid=fopen(output2.txt,'w');
fid=fopen(G,'w');
fprintf(fid,'
x
y
Gamma2\n');
fprintf(fid,'
fprintf(fid,' \n');
fprintf(fid,'%8.5f
\n',output2');
fclose(fid);
% save output2

%8.5f

%8.5f

Gammal

%8.5f

%8.5f

You might also like