- Email: [email protected]

Contents lists available at ScienceDirect

Petroleum journal homepage: www.keaipublishing.com/en/journals/petlm

Original article

Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index Mahdi Zeinali Hasanvand a, c, Mohammad Ali Ahmadi b, Reza Mosayebi Behbahani a, *, Farzaneh Feyzi c a b c

Department of Chemical Engineering, Ahwaz Faculty of Petroleum Engineering, Petroleum University of Technology, Ahwaz, Iran Department of Petroleum Engineering, Ahwaz Faculty of Petroleum Engineering, Petroleum University of Technology, Ahwaz, Iran Department of Chemical Engineering, Iran University of Science and Technology, Tehran, Iran

a r t i c l e i n f o

a b s t r a c t

Article history: Received 7 July 2015 Received in revised form 28 December 2015 Accepted 30 December 2015

Asphaltene precipitation can cause serious problems in petroleum industry while diagnosing the asphaltene stability conditions in crude oil system is still a challenge and has been subject of many investigations. To monitor and diagnose asphaltene stability, high performance intelligent approaches based bio-inspired science like artiﬁcial neural network which have been optimized by various optimization techniques have been carried out. The main purpose of the implemented optimization algorithms is to decide high accurate interconnected weights of proposed neural network model. The proposed intelligent approaches are examined by using extensive experimental data reported in open literature. Moreover, to highlight robustness and precision of the addressed approaches, two different regression models have been developed and results obtained from the aforementioned intelligent models and regression approaches are compared with the corresponding refractive index data measured in laboratory. Based on the results, hybrid of genetic algorithm and particle swarm optimization have high performance and average relative absolute deviation between the model outputs and the relevant experimental data was found to be less than 0.2%. Routs from this work indicate that implication of HGAPSO-ANN in monitoring refractive index can lead to more reliable estimation of addressed issue which can lead to design of more reliable phase behavior simulation and further plans of oil production. Copyright © 2016, Southwest Petroleum University. Production and hosting by Elsevier B.V. on behalf of KeAi Communications Co., Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

Keywords: Asphaltene Refractive index Stability Evolutionary algorithm Neural network

1. Introduction In the lifetime of petroleum industry, Asphaltene precipitation has the capability to be one of the most challenging issues in the process of petroleum production [1]. As the asphaltene deposition can occur in several places in the process of production: in the reservoir, near the wellbore, in the tubing, in surface production facilities and transportation systems, therefore it increases the expenditures and technical problems for

* Corresponding author. E-mail address: [email protected] (M.A. Ahmadi). Peer review under responsibility of Southwest Petroleum University.

Production and Hosting by Elsevier on behalf of KeAi

development stage of a reservoir [2]. As the investigation gets deeper, the most probable place for occurrence of asphaltene deposition is near-well bore [3]. The ﬁrst step for development of asphaltene precipitation model is the accurate knowledge of how asphaltene exist in the oil [4], therefore, it is useful to identify the crude composition and then explore asphaltene stability in the ﬂuid. There are several methods that describe crude oil composition [5]. SARA analysis is one of the simple approaches that commenced with the study of Jewell et al. [6]. This analysis divides crude into four categories: saturate, aromatic, resin, and asphaltene (SARA) fractions. The saturate fraction is formed of nonpolar material like: linear, branched, and cyclic saturated hydrocarbons. Aromatics are more polarizable that include one or more aromatic rings [5]. Resins are known as the fraction of the desasphalted oil that is strongly taken in surface-active materials such as Fuller's earth, alumina, or silica, and can be desorbed by a particular solvent such as pyridine or a

http://dx.doi.org/10.1016/j.petlm.2015.12.004 2405-6561/Copyright © 2016, Southwest Petroleum University. Production and hosting by Elsevier B.V. on behalf of KeAi Communications Co., Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

2

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

Initial Population Evaluation Fitness

YES

Meet Stop Criteria No

Exit Criteria (Global Best Satisfactory)

Selection

Cross Over and Mutation

New Population

Fig. 1. Flow chart of genetic algorithm for optimization.

combination of toluene and methanol [7]. Asphaltenes can be introduced as a fraction of crude oil that which have the maximum molecular weight and/or by the highest degree of polarity [8] and obvious aromatic features [9]. Recently, they are deﬁned by scientist as the part, precipitated by addition of lowboiling alkane (parafﬁn) solvent such as normal heptane but soluble in aromatic solvent like toluene or benzene [10]. SARA classiﬁcation can help us in identifying oil with the potential for asphaltene problems because it divides oil into fractions that related to asphaltene stability. Of course Wang and Buckley emphasized that measurement of SARA fractions are considerably related to the extraction methodology [5]. Despite, there are comprehensive studies in literatures about asphaltene stability and precipitation, but scientists can't describe the real mechanism of asphaltene agglomeration, ﬂocculation and precipitation, yet [11e14]. Andersen [15], Fotland et al. [16] and others [17,18] realized that there are some factors affecting asphaltene stability including pressure, temperature and ﬂuid composition in the media. Moreover they mention that the effect of surrounding ﬂuid composition and pressure are more remarkable than temperature inﬂuence. Likewise, Field experience [19,20] corroborates their results. Buckley hinted to this point that it is helpful to differentiate between surrounding ﬂuids that can compel asphaltene precipitation and those that do not [21]. Here upon others tried to quantify oil solvent properties and they found that pressure, temperature and oil composition can change oil solvent properties and effect on asphaltene stability [22,23]. Thermodynamic models follow these alterations by allocating solubility parameters to oil and asphaltenes [24e26].

Colloidal models propose a colloidal suspension of asphaltene in the oil and assume that they (asphaltene) are stabilized by resines in the mixture [27,28]. The disperse phase of the crude oils is formed by asphaltenes, and resins, while maltenes are the continuous phase [29] and the colloidal stability of this mixture determines asphaltene precipitation [30]. Resins (naturally occurring inhibitors) have a considerable propensity to amalgamate with asphaltenes [14,31]. Such association specify their solubility in crude oil [32]. Even though the association between asphaltene and resins has never been irrefutably manifested [9] but some studies offered methods to indicate asphaltene stability based on presence of resin. For example, Resin to asphaltene ratio can be applied to disclose asphaltene stability according to an idea that assumes resins impart asphaltene stability by peptizing (coating) asphaltene particles [28]. Experimental observation of Fan et al. [5] discovered that each of SARA fractions is pertained to asphaltene stability. Colloidal instability index (C.I.I.) can be calculated from SARA analysis and be used to estimate asphaltene stability. This index is deﬁned below. Indeed CII is a monitoring criterion to distinguish the potential of asphaltene deposition in a crude sample [33].

C:I:I :

saturated þ asphaltene resine þ aromatic

(1)

De Boar [19] prepared some diagram for fast screening the risk of asphaltene precipitation. In addition, Jamaluddin et al. [34] putted forward an asphaltene stability index based on the oil density at initial and bubble point pressures and there are some other notes in literatures to screen asphaltene stability [35,36].

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

3

Start

Random Population

Fitness evaluation of all individuals

Stopping criteria

Best individuals

End

Find the best elites and discard others

Enhancement (Particle Swarm Optimization)

Tournament selection

Enhanced elites

Crossover and mutation

Offspring

New population (enhanced elites and offspring)

Fig. 2. Flow chart of hybrid genetic algorithm and particle swarm optimization process [42,43,53].

2. Literature review The refractive index has an indispensable situation in many branches of physics, biology and chemistry [37]. for a nonabsorbing medium, the refractive index is the ratio of the velocity of light in the vacuum to the velocity of light in the

medium [38]. The refractive index (RI) has been manifested to describe several prominent properties of multicomponent native petroleum, like: PVT behavior and surface tension [39,40] also asphaltene precipitation [41]. Refractive index of materials varies with the wavelength. This is called dispersion [42].

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

4

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

Start

Initialize the empires

IndexMove the colonies to their

relevant imperialist

Is there a colony in an empire which has higher cost than that of imperialist?

Yes

No

Exchange the positions of that imperialist and colony

No Compute the total cost of all empires

Pick the weakest colony from the weakest empire and give it to the empire that has the most likelihood to possess it

Is there an empire with no colonies? Yes

No

Eliminate this empire

Stop condition satisfied?

Yes Done Fig. 3. Flow chart of imperialist competitive algorithm process [56,57].

1. Asphaltenes 2. Resine 3. Aromatics 4. Saturates

Artificial Neural Network Integrated with PSO/GA/HGA PSO/ICA

Refractive Index

Fig. 4. Architecture of three layers ANN.

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

5

Fig. 5. Measured vs. estimated Refractive index (BP-ANN): a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

Buckley assumed that if the London dispersion contribution to the van der Waals forces is considered as the main intermolecular interaction energy in which it (London dispersion) controls asphaltene precipitation, then we can use refractive index dispersion to characterize London dispersion properties [39]. Wattana et al. concluded similar result as Buckley's conclusion and proposed that refractive index is an indicator of the quantity of the intermolecular attraction among the asphaltene molecules [43]. Although, the refractive index of light crudes can be directly assessed by common refractive-meters, but RI measurements of heavy oils and naturally bitumen are not possible, because of their turbid colors. In these cases, it is communal assumption to consider that a mixture of crude oil and a non-precipitant solvent behaves as an ideal binary mixture [44] where the crude oil is treated as a single component and the solvents are treated such as the second in the mixture. Then the real RI value of crude oils can be achieved by applying an easy-to-use mixing rule and extrapolation data [39]. For instance, Wattana et al. applied a very simple mixing rule as below equation:

nmix ¼ noil ∅oil þ nsolvent ð1 ∅oil Þ

Fig. 6. R2 for BP-ANN model: a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

their volume fractions. Furthermore Buckley revealed that the parafﬁnic compounds are among the lowest RI substances in a crude while, asphaltenes, resins, and aromatic hydrocarbons are among the highest [21]. Heptane titration curve can be used to determine the refractive index of deasphalted crude. In this way, we extrapolate data back to 0% heptane, then the RI of the deasphalted crude is calculated and at the end it is possible to estimate asphaltene refractive index [43]. Recently, there is an admissible point in which the reduction of the maltene fraction refractive index can decreases the asphaltene stability in the bulk of crude oil [45]. Goual and Firoozabadi showed the temperature dependency of the refractive indices [46]. Values of RI have been applied by Feynman et al., Vedam and Limsuwan to correlate composition and density according to Clausiuse Mossotti or LorenzeLorentz equation [47,48]. Fan et al. [5] proposed a correlation to estimate RIoil with using SARA fraction and evaluation asphaltene stability based on data for 67 oil samples:

(2)

where n show refractive indices and ∅oil is a volume fraction of a crude oil [43]. When the mixture refractive index was measured, its value reﬂects a proportion between all the blend components and

RIoil ¼

1:4452 S þ 1:4982 A þ 1:6624 ðR þ AsÞ 100

(3)

where S is saturates, A is aromatics, R is resins, and As is asphaltene weight percent. Predicted and measured asphaltene

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

6

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

Fig. 7. Measured vs. estimated Refractive index (GA-ANN): a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

stability can be compared by calculating a value of DRI (DRI ¼ RIoilePRI) using an average PRI ¼ 1.44 and detail result can be found in their paper [5]. In this paper, our aim is to develop various intelligent approaches for assessment of asphaltene stability in crude oils through the relation between the experimental SARA fraction data and the refractivity index of the crude oil sample. Evolutionary algorithms are carried out in this work to optimize on initial weights of the parameters implemented in artiﬁcial neural network. Results obtained from the developed intelligent approaches were compared with the corresponding experimental refractivity index data and discussed in further details throughout this research.

Fig. 8. Measured vs. estimated Refractive index (PSO-ANN): a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

1- Avoiding over-ﬁtting issue when considering ANN topology 2- Split implemented data sets into two appropriate assortments called “training” and “Testing” 3- Implement appropriate training function Due to previous studies of authors, multi-layer perceptron (MLP) with one hidden layer is recommended to model complicated issues in petroleum industry. To ﬁgure out the number of hidden neuron, trial and error procedure was executed and decision tool was mean square error (MSE) and it is when the values of solutions at the neurons of target layer are very nearly approach to the corresponding actual measured data [38e44].

3. Artiﬁcial neural network

4. Evolutionary algorithms

One of robust and quick approaches in engineering known as Artiﬁcial Neural Networks or ANNs, has been around for more than half of century. More recently, ANNs were faced in petroleum and chemical engineering to represent/predict some petrophysical properties and reservoir ﬂuid behavior like asphaltene precipitation [49e55]. One of outstanding characteristics of ANN is mapping the complex targets and corresponding input variables. To achieve the performance of ANNs, following points should be considered [49e55]:

4.1. Genetic algorithm GA which is one the most famous sort of optimization methods is basically known with its unique characteristics which are searching very fast and optimizing efﬁciently, the two very important features derived from the principle of “survival of the ﬁttest” component of natural evolution with the genetic propagation of belongings. In reality, GA functions through determining a range of zones in the objective area clariﬁed by experts and deﬁning concurrently and randomly a large number of likely

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

Fig. 9. Measured vs. estimated Refractive index (ICA-ANN): a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

paths. Additionally, the GA could theoretically and effortlessly been replaced with typical optimization procedures thanks to its initiation which is based on the notion of Darwinian natural selection and genetics in natural systems. According to notion of ‘survival of the ﬁttest’, the GA can converge towards the ﬁnest point in the arranged space soon after a series of cycling calculations. This searching pattern is based on technical tasks which are artiﬁcial mutation, crossover and selection. The presented algorithm is essentially run by preparing an opening population including a deﬁnite number of so-called individuals which are demonstrating the probable routes towards the preferred purpose. Turning chromosomes into encoded strings is the next step which is supposed to be precisely done. Successively, compatibility of each encoded string with the nature of the problem must be assessed by applying a ﬁtness function. The production of ﬁtness function pertinent to each chromosome is taken as criteria to come to a decision whether the related string can make an acceptable performance available. After removing weakest persons based on the already determined standards which are determined by the designer, it is the turn to operate crossover and mutation rates to yield fresh individuals with better performance. Then, execution of the crossover action on the couple of chosen strings (chromosomes) to recombine them has to be tracked. It has been recommended by the prior studies that the greatest performance of the GA becomes possible when the crossover point of any two chromosomes is aimlessly set. The process is followed by shifting some random selected position to

7

Fig. 10. Measured vs. estimated refractive index (HGAPSO-ANN): a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

1 if they are 0, and vice versa [56e60]. Fig. 1 illustrates a Simple Genetic Algorithm approach and summed up all of the previous explanation [56e60]. 4.2. Particle swarm optimization Particle Swarm Optimization (PSO) as a robust and high attended population based algorithm which ﬁrstly introduced and developed by Eberhard and Kennedy [61]. The PSO method is recently being executed to unravel various engineering optimization issues where a surface or a point in a multidimensional parameter space relevant to the best outcome and must be sought. One may view this approach as an iterative calculation of the optimum location of a swarm of particles that have a ﬂow, a direction of movement and velocity. The value and direction of the accelerations play a crucial role in calculations, and the locations of the particles in the swarm are updated iteratively implementing the below expressions [62,63]:

V kþ1 ¼ wk vk þ c1 r1 xk1 xk þ c2 r2 xkg xk

(4)

Xkþ1 ¼ xk þ ƛvkþ1

(5)

Wk ¼ wmax e (wmax e wmin) (k/Maximum Iteration)

(6)

where k represents the current iteration, and k is deﬁned as the limiting factor to express the particles diversity and to assure

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

8

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

Fig. 11. R2 for GA-ANN model: a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

convergence. c1 and c2 are the acceleration coefﬁcients, considering the individual experience of particles and interactions between them. vk and xk indicate the vectors of real velocity and position, correspondingly, and r1 and r2 are two random variables varying between 0 and 1. wk is the inertial weight that controls the effect of the earlier velocity on the new velocity vector (a momentum calculation). xl and xg are the local best position and global best particle position in the swarm, correspondingly [62,63]. 4.3. Hybrid genetic algorithm and particle swarm optimization Making randomly the initial population and its following evaluation are the starting steps of this hybrid. The generated error of the best individual can stop the process, if its value reaches the already stop criteria. On the other hand, the process goes on to get close as much as possible to this standard by gaining from advantages of the particle swarm optimization algorithm through simultaneous increasing the number of elites and running the chaining processes of tournament selection, cross over and mutation operations, and generating the new offspring. Combining the effects of these two ways on each other causes generating the new population with the features of enhanced elites and offspring (See Fig. 2) [53,54,64,65].

Fig. 12. R2 for PSO-ANN model: a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

4.4. Imperialist competitive algorithm (ICA) Atashpaz-gargari et al., in 2007 introduced and developed a new type of optimization algorithm which gained from the socio-political behavior of countries. According to the previous note, this optimization algorithm is called “Imperialist Competitive Algorithm” and abbreviate in ICA [66,67]. Throughout this optimization algorithm same as other evolutionary optimization algorithms the imperialist competitive algorithm launches with initial populations called countries. Countries in the ICA are split in two types: colony and imperialist (in optimization terminology, countries with the least cost) which together form empires. In the imperialistic competition procedure, imperialists make efforts to attract more colonies. As a result, during this process, the robust imperialists will be raised in the power and the vice versa about the weak ones. Each empire could collapse when the addressed empire loses all of its colonies. At the end of referred algorithm the most robust imperialist survives in the world and all the countries are colonies of this unique empire. Throughout this stage imperialist and colonies have the same position and power [66,67]. The implementation procedures of our developed matching approach based on imperialist competitive algorithm (ICA) are depicted in Fig. 3 [67].

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

9

Fig. 13. R2 for ICA-ANN model: a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

Fig. 14. R2 for HGAPSO-ANN model: a) Refractive index (RI) training phase b) Refractive index (RI) testing phase.

5. Results and discussion

MSEApproach ¼

G X m 2 1X Yj ðkÞ Tj ðkÞ 2 j¼1

(7)

k¼1

5.1. ANN output results As reported previously in the literature, four parameters including 1- Asphaltenes 2-Resins 3- Aromatics 4- Saturates could affect refractive index (RI) due to this fact to assess the aim of this contribution the addressed parameters were implemented as inputs of the developed sophisticated approach in order to diagnosis asphaltene stability based on refractive index (RI). These parameters were faced to the constructed network model to forecast refractive index (RI) as well as asphaltene stability. Same as other intelligent approaches, network model is extremely affected by various parameters which were involved in the development of the neural network approach like interconnection weights and biases. To solve successfully this issue, enormous efforts have been made to obtain optimum connection weights through network approach such as implication different population based optimization algorithms. To depict the robustness and uncertainty of the developed intelligent models, two statistical parameters were executed which are the mean square error (MSE) and correlation coefﬁcient (R2) expressed as following [53,54,67]:

Pn

M 2 RIiP RI R2 ¼ Pn M M 2 i¼1 RIi RI i¼

(8)

where m is the number of output nodes, G is the number of training data samples, Yj ðkÞ is the expected target, and Tj ðkÞ is the experimental refractive index (RI). When the MSE closes gradually to the zero, the error of our developed network model starts declining. Where RIM and RIP are the measured refractive index (RI) and predicted refractive index (RI), correspondingly. M RI represents the average of the measured refractive index (RI) data. Based on previously addressed statistical performance indexes and avoid any over-ﬁtting issue due to restriction of the implemented datasets, three layer network which has 7 neurons in hidden layer can monitor refractive index and furthermore asphaltene stability (see Fig. 4). Back propagation (BP) algorithm with training function called “LevenbergeMarquardt” was implemented to train the developed network model to estimate refractive index (RI) while it is worth mentioning that the

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

10

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

transfer functions in hidden and output layer are sigmoid and linear, correspondingly. To show uncertainty, integrity and effectiveness of the proposed network model and further coupled approaches, 44 data samples were faced for network training and the remaining 19 samples were put aside to be executed for testing and validating the network's performance. It is worth mentioning that the value 0.72 and 0.001 were assigned to the learning coefﬁcient and momentum correction factor, respectively to train developed network model with the back-propagation training (BP) procedure. Fig. 5 demonstrates the predicted and actual values of refractive index (RI) against corresponding data index. As can be seen from the addressed ﬁgure, estimated refractive indexes (RI) do not cover the actual trend whether overestimated or underestimated. Also the addressed results are depicted in regression plot, due to obtained results, the estimated refractive indexes in testing phase are above the diagonal line (Y ¼ X) and this fact represents underestimated prediction. Another point which could be extracted from Fig. 6 is low unsatisfactory correlation coefﬁcient (R2) that lowers than 0.8.

Fig. 15. R2 for linear regression approach to estimate refractive index.

5.2. Hybrid evolutionary algorithms and ANN output results To solve successfully the addressed issues, enormous efforts have been made to improve the robustness and to decline the uncertainty of the ANN model to estimate refractive index (RI) by means of optimizing interconnection weights of ANN model using various optimization algorithms based on previously suggested objective function. Optimization algorithms executed in this work are the imperialist competitive algorithm, genetic algorithm, Particle swarm optimization and hybrid of them. It is worth to highlight that the main purpose of each optimization algorithm is deﬁned to minimize mean square error (MSE) and approach its value to zero. To indicate the uncertainty, robustness and reliability of the optimization algorithms in improvement of the ANN model, a back-propagation (LevenbergeMarquardt) ANN was performed with the same data employed in other models. For each case, 25 runs with different randomly generated populations were executed. The hybrid GA, PSO and ANN model (HGAPSO-ANN) were employed using a population size of 200. To reach the optimum condition in GA-ANN model, the genetic parameters including crossover rate and mutation rate were determined via sensitivity analysis. Sensitivity analysis of each parameter is based on the two performance indexes including MSE and R2. Wide ranges of cross over probabilities in the interval of 0.5e0.9 were employed to indicate robust and accurate crossover rate. According to the outputs obtained from sensitivity analysis the convergence rate falls down as the crossover probability raise up which highest accuracy and effectiveness were belonged to crossover rate ¼ 0.85. For obtaining the optimum mutation rate the same analogy was employed and to assess this goal, seven mutation rates in the ranges of 0.0001e0.05 were employed and performance of each mutation rate was examined. It is worth to point out that, unsatisﬁed results and earlier convergence are a characteristic of low mutation rates. On the other hand, as the mutation probability goes up, gives a cut above outputs; however, it discourages leading a high level of convergence. The optimum uniform crossover rate and uniform mutation rate were assigned to 0.89 and 0.0125, correspondingly. Figs. 7e10 depict the outputs obtained from the genetic algorithm, particle swarm optimization (PSO), imperialist competitive algorithm (ICA) and hybrid genetic algorithm and particle swarm optimization (HGAPSO) approaches,

Fig. 16. R2 for modiﬁed linear regression approach to estimate refractive index.

Table 1 Linear regression and modiﬁed linear regression coefﬁcients. Parameters

Saturates Aromatics Resins Asphaltenes

Normalized coefﬁcients Linear regression

Modiﬁed linear regression

0.337 0.049 0.421 0.227

0.272 0 0.464 0.249

correspondingly, draw a parallel with the experimental results in terms of refractive index (RI) versus data index. As can be seen from these ﬁgures, optimization algorithms could improve the efﬁciency and integrity of the ANN model by means of connection weights optimization. Also, among the optimization algorithms employed in this study, hybrid genetic algorithm and particles swarm optimization (HGAPSO) have high performance compared with others. Based on the statistical performance criteria, MSE ¼ 0.017351 and R2 ¼ 0.9994 of hybrid genetic algorithm and particle swarm optimization for refractive index (RI) compared with MSE ¼ 0.10837 and R2 ¼ 0.4627 for BP-ANN, MSE ¼ 0.017973 and R2 ¼ 0.9856 for GA-ANN approach, MSE ¼ 0.016186 and R2 ¼ 0.9864 for ICA-ANN approach, MSE ¼ 0.062107 and R2 ¼ 0.9755 for PSO-ANN

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

11

Start

Input SARA fractions to model

Calculation of Refractive

Calculation of Δ(RI)

Δ(RI) > 0.060

Yes

Asphaltene fraction is more likely to be

No

Δ(RI) < 0.045

Yes

Asphaltene fraction tends to deposit from the crude oil.

No Crude oil is in stability border region.

End

Fig. 17. Flow chart of the asphaltene stability monitoring calculations using the presented computer program [37].

approach, MSE ¼ 147.654 and R2 ¼ 0.7185 for linear regression approach and MSE ¼ 68.4126 and R2 ¼ 0.7191 for modiﬁed linear regression approach reveals high accuracy and integrity and low uncertainty of HGAPSO-ANN model (Figs. 11 to 16). Also to quantify the results gained from each model, we implemented the regression plot as well as correlation coefﬁcient. Fig.11e16 illustrate the extent of the match between the measured refractive index (RI) and estimated values by GA-ANN, PSO-ANN, ICA-ANN, HGAPSO-ANN, linear and modiﬁed linear regression approaches in term of a scatter diagram, respectively. It should be noted that the vertical axis represents the estimated refractive index (RI) while horizontal axis represents the measured laboratory refractive index (RI). As can be seen from Fig. 11, GA-ANN model shows satisfactory performance with R2 ¼ 0.9856 in testing phase; however, some estimated refractive indexes do not follow the diagonal line (Y ¼ X) also in training phase GA-ANN

model outcomes for lower boundary of refractive index (RI) are underestimated. As depicted in Fig. 12, PSO-ANN model has lower performance than GA-ANN model with R2 ¼ 0.9755 for testing phase. Moreover, for intermediate boundary of refractive index (RI) the obtained results are underestimated for both testing and training phases. Another model is ICA-ANN model and obtained results from this model are demonstrated in Fig. 13. According to the values obtained from ICA-ANN model, robustness of the ICAANN model is higher than genetic and particle swarm models based on R2 ¼ 0.9864. As depicted in Fig. 13, the values obtained in training phase for lower and intermediate boundaries follow the diagonal line; however, they did not exactly covered the line of Y ¼ X. Also, in testing phase some outputs are underestimated. Finally, the results of the HGAPSO-ANN model are illustrated in Fig. 14. As can be seen from this Figure, HGAPSO-ANN model has highest robustness and integrity with high correlation coefﬁcient

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

12

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13

Table 2 Effectiveness of the intelligent approaches. Permeability reduction Parameters

BP-ANN

GA-ANN

ICA-ANN

PSO-ANN

HGAPSO-ANN

Linear regression

Modiﬁed linear regression

MSE R2

0.10837 0.4627

0.017973 0.9856

0.016186 0.9864

0.062107 0.9755

0.017351 0.9994

147.654 0.7185

68.4126 0.7191

(R2 ¼ 0.9994) for testing phase. To certify the robustness of the HGAPSO-ANN model, the results of the linear and modiﬁed linear regression models are compared with the results of our developed models. We proposed two regression models in this paper which ﬁrstly regression model constructed with all parameters and secondly model developed by screening the relevant parameters via analysis of variance (ANOVA). Analysis of variance is discussed at the end of this section. The obtained regression parameters are reported in Table 1 with details. As can be observed from Fig. 15, regression model has lowest performance in comparison with all of the previous models and disappointing robustness of the regression model is clear due to negative refractive index (RI) and in real condition is impossible. For modiﬁed regression model the same results were obtained as depicted in Fig. 16 and screening parameters with ANOVA could not improve the performance and integrity of linear regression model. The results certify that HGAPSO-ANN model could help us in determination of Asphaltene stability as demonstrated in Fig. 17. As reported in Table 2, the integrity and performance of the hybrid GA and PSO based on two performance indexes (MSE AND R2) is superior than other intelligent and conventional approaches including BP-ANN, GA-ANN, PSO-ANN, linear and modiﬁed linear regression models. Hybrid methods have very low uncertainty and high accuracy draw a parallel with BP algorithm and other optimization algorithms. It can be summed up that the hybrid optimization strategy (HGAPSO-ANN) described in the present work certiﬁed an undeniably excellent robustness in both convergence rate and global optima achievement. The statistical analysis of the implemented dataset that one of the high attendance sensitivity analysis approach which is called the analysis of variance (ANOVA) method was employed to determine a sensitivity analysis for the inventive models [68,69]. In this method, refractive index (RI) was set as the dependent variable and the dependence of the RI on each independent variable including Asphaltene, Aromatics, Saturates and Resins was determined. Fig. 18 depicts the results of the sensitivity analysis gained from ANOVA and it should be noted that the vertical axis of this ﬁgure represents the relative importance of each parameter and horizontal axis represents the independent parameters. It is worth to pointout that the higher correlation between each input and the output parameter certiﬁes the greater signiﬁcance of the variable on the magnitude of the dependent variable. As can be seen from Fig.18, resin is the most important parameter among all other parameters which play critical role in refractive index and furthermore asphaltene stability.

6. Conclusions Many efforts have been made throughout this communication to introduce and develop cutting edge solutions to monitor asphaltene stability based on the estimated refractive index (RI) at various conditions while various inventive optimization approaches evolved the integrity and performance artiﬁcial neural network to break and overcome the addressed hurdle of this study. To prove and certify the robustness, effectiveness and

Fig. 18. Relative importance of independent variables on refractive index (RI) of crude oils.

integrity of the up-to-the-minute approach in estimation refractive index and furthermore asphaltene stability high precise experimental data from the literature [36] were implemented. Based on the obtained solutions from this contribution the following extensive conclusions can be drawn: 1. The back-propagation, linear regression and modiﬁed linear regression approaches do not have satisfactory precision and integrity in estimation of refractive index (RI); however, there is good agreement between corresponding measured value and approach outputs while hybrid approaches carried out. 2. Commercial simulation software in asphaltene precipitation/ deposition modeling including Computer Modeling Group (CMG) can be coupled and improved by implementing HGAPSO-ANN method to facilitate better solutions with lower deviation and uncertainty. 3. A sensitivity analysis conducting the ANOVA approach dictate that the signiﬁcance of oil contents on the refractive index (RI) was in the following order: Refractive Index Aromatics > Saturates.

(RI):

Resins

>

Asphaltenes

>

References [1] Haitham M.S. Lababidi, Ali A. Garrouch, Mohammad A. Fahim, An expert system for predicting asphaltene deposition Kuwait University, in: SPE International Symposium and Exhibition on Formation Damage Control held in Lafayette, Louisiana, 20e21 February, 2002. [2] N. Carnahan, J.L. Salager, R.U. Anton, in: Effect of Resins on Stability of Asphaltenes Offshore Technology Conference, Houston, Texas, 30 Aprile3 May 2007. [3] Stephan Allenson, J. Walsh, A. Marjorie, in: Nalco/Exxon Energy Chemicals, Novel Way to Treat Asphaltene Deposition Problems Found in Oil Production International Symposium on Oilﬁeld Chemistry, Houston, Texas, 18e21 February 1997. [4] K.J. Leontaritis, U. of Illinois, in: Asphaltene Deposition: a Comprehensive Description of Problem Manifestations and Modeling Approaches SPE Production Operation Symposium, Oklahoma, March 12e14, 1989.

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004

M. Zeinali Hasanvand et al. / Petroleum xxx (2016) 1e13 [5] T.S.P.E. Fan, J.S.P.E. Wang, J.S. Buckley, in: SPE/New Mexico Tech, Evaluating Crude Oils by SARA Analysis SPE/DOE Improved Oil Recovery Symposium, Oklahoma, 13e17 April 2002. [6] D.M. Jewell, J.H. Weber, J.W. Bunger, H. Plancher, D.R. Latham, Ion-exchange, coordination, and adsorption chromatographic separation of heavy-end petroleum distillates, Anal. Chem. 44 (1972) 1391e1395. [7] E. Buenrostro-Gonzalez, C. Lira-Galeana, A. Gil-Villegas, J. Wu, Asphaltene precipitation in crude oils: theory and experiments, Thermodynamics (2004), http://dx.doi.org/10.1002/aic.10243. [8] R.B. Long, Chemistry of Asphaltenes, ACS Publications, 1981. [9] R. Cimino, S. Correra, A. Del Bianco, T.P. Lockhart, in: E.Y. Sheu, O.C. Mullins (Eds.), Asphaltenes: Fundamentals and Applications, Plenum Press, New York, 1995, pp. 97e130. [10] S.I. Andersen, J.G. Speight, Petroleum Resins: Separation, Character, and Role in Petroleum, Petroleum Science and Technology, 2001. [11] H. Pan, A. Firoozabadi, A Thermodynamic Micellization Model for Asphaltene Precipitation: Part I: Micellar Size and Growth ATCE, 1996. Denver SPE 36741. [12] V.V. Likhatsky, R.M. Balabin, R.Z. Syunyaev, Calculation of dipole moment of fractal asphaltene cluster, J. Dispers. Sci. Technol. 32 (2011) 1502e1508. [13] R.M. Balabin, R.Z. Syunyaev, T. Schmid, J. Stadler, E.I. Lomakina, R. Zenobi, Asphaltene adsorption onto an iron surface: combined near-infrared (NIR), Raman, and AFM study of the kinetics, thermodynamics, and layer structure, Energy Fuels 25 (2010) 189e196. [14] R.M. Balabin, R.Z. Syunyaev, Petroleum resins adsorption onto quartz sand near infrared (NIR) spectroscopy study, J. Colloid Interface Sci. 318 (2008) 167e174. [15] S.I. Andersen, Dissolution of solid boscan asphaltenes in mixed solvents, Fuel Sci. Technol. Int. 12 (1994) 1551e1577. [16] P. Fotland, H. Anﬁnsen, H. Foerdedal, H.P. Hjermstad, in: The Phase Diagrams of Asphaltenes: Experimental Technique, Results and Modeling on Some North Sea Crude Oils Symposium on the Chemistry of the Asphaltene and Related Substances, Cancun, Mexico, 1997. [17] F.B. Thomas, D.B. Bennion, B.E. Hunter, Experimental and theoretical studies of solids precipitation from reservoir fuid, J. Can. Petrol. Technol. (1992) 22e31. [18] A. Hammami, C.H. Phelps, T. Monger-McClure, T.M. Little, Asphaltene precipitation from live oils: an experimental investigation of onset conditions and reversibility, Energy Fuels 14 (2000) 14e18. [19] R. De Boer, K. Leeloyer, M. Eigner, A. van Bergen, Screening of crude oils for asphalt precipitation: theory, practice, and the selection of inhibitors, Soc. Petrol. Eng. Feb 55 (1995). [20] S.L. Kokal, S.G. Sayegh, in: Asphaltenes: the Cholesterol of Petroleum, SPE 29787 Presented at the SPE Middle East Oil Show, Bharain, Mar. 11e14, 1995. [21] J.S. Buckley, Predicting the onset of asphaltene precipitation from refractive index measurements, Energy Fuels 13 (1999) 328e332. [22] A. Hirschberg, L.N.J. DeJong, B.A. Schipper, J.G. Meijer, Inﬂuence of Temperature and Pressure on Asphaltene Flocculation Old SPE Journal, 1984. [23] J.H. Hildebrand, R.L. Scott, Solubility of Non-electrolytes, third ed., Reinhold, New York, 1950. [24] D.L. Mitchell, J.G. Speight, The Solubility of Asphaltenes in Hydrocarbon Solvents Fuel, Elsevier, 1973. [25] N.E. Burke, R.E. Hobbs, S.F. Kashou, J. Pet. Technol. 42 (1990) 1440e1446. [26] I.A. Wiehe, Two-dimensional solubility parameter mapping of heavy oils, Fuel Sci. Technol. Int. 14 (1996) 289e312. [27] J.P. Pfeiffer, R.N.J. Saal, Asphaltene bitumen as colloid system, J. Phys. Chem. 44 (1940) 139e149. [28] K.J. Leontaritis, G.A. Mansoori, Asphaltene ﬂocculation during oil production and processing: a thermodynamic colloidal model SPE 16258, in: SPE International Symposium on Oilﬁeld Chemistry, San Antonio, TX, USA, 1987. [29] S.I. Andersen, K.S. Birdi, Aggregation of asphaltenes as determined by calorimetry, J. Coll. Int. Sci. 142 (1991) 497. [30] H. Laux, I. Rahimian, T. Butz, Thermodynamics and mechanism of stabilization and precipitation of petroleum colloids, Fuel Process. Technol. (1997) 53e69. [31] J.G. Speight, The Chemistry and Technology of Petroleum, Marcel Dekker, Inc., New York, 1991. [32] J.A. Koots, J.G. Speight, Relation of petroleum resins to asphaltenes, Fuel 54 (1975) 179e184. [33] A. Yen, Y.R. Yin, S. Asomaning, in: Evaluating Asphaltene Inhibitors: Laboratory Tests and Field Studies SPE 65376, SPE International Symposium on Oilﬁeld Chemistry, Houston, 2001. [34] A.K.M. Jamaluddin, J. Creek, C.S. Kabir, J.D. McFadden, D. D'Cruz, J. Manakalathil, N. Joshi, B. Ross, in: Laboratory Techniques to Measure Thermodynamic Asphaltene Instability SPE 72154, SPE Asia Paciﬁc Improved Oil Recovery Conference, Kuala Lumpur, Malaysia, 2001. [35] F.M. Vargas, D.L. Gonzalez, J.L. Creek, J. Wang, J. Buckley, G.J. Hirasaki, W.G. Chapman, Development of a general method for modeling asphaltene stability, Energy Fuels 23 (2009) 1147e1154. [36] G. Porte, H. Zhou, V. LazzerieLangmuir, Reversible Description of Asphaltene Colloidal Association and Precipitation, ACS Publications, 2003. [37] R.B.S. Neto, J.P.R.F. de Mendonça, R. de Fısica Aplicada, Determination of Absolute Values of Refractive Index of Liquids Using an Interferometric Method 143.107.135.40, 2004.

13

[38] F. Bitter, Currents, Fields and Particles the Technology, Press of Massachusetts Institute of Technology and Wiley, New York, 1956. [39] J.S. Buckley, G.J. Hirasaki, Y. Liu, V.S. Drasek, J.X. Wang, B.S. Gill, Asphaltene Precipitation and Solvent Properties of Crude Oils, Taylor & Francis, 1998. [40] H. Touba, G.A. Mansoori, A.M.S. Sarem, New Analytic Techniques for Petroleum Fluid Characterization Using Molar Refraction SPE 38312, Society of Petroleum Engineers, Richardson, TX, 1997. [41] S.D. Taylor, J. Czarnecki, J. Masliyah, Refractive index measurements of diluted bitumen solutions, Fuel 80 (2001) 2013e2018. [42] L. Kinsler, A. Frey, J. Coppens, Fundamentals of Acoustics, John Wiley & Sons, Inc, 2000, ISBN 0-471-84789-5, p. 136. ~ os, Fogler, Study of Asphaltene [43] P. Wattana, J. David, Wojciechowski, G. Bolan Precipitation Using Refractive Index Measurement, Taylor & Francis, 2003. [44] I.N. Evdokimov, A.P. Losev, Effects of Molecular De-aggregation on Refractive Indices of Petroleum-based Fluids Fuel, 2007. [45] M.A. Ahmadi, Neural network based uniﬁed particle swarm optimization for prediction of asphaltene precipitation, Fluid Phase Equilib. 314 (2012) 46e51. [46] L. Goual, A. Firoozabadi, Measuring asphaltenes and resins, and dipole moment in petroleum ﬂuids, AIChE J. 48 (2002) 2646e2663. [47] R.P. Feynman, R.B. Leighton, M. Sands, The Feynman Lectures on Physics,II, Addison-Wesley Publishing Co, 1989. [48] K. Vedam, P. Limsuwan, Piezo- and elasto-optic properties of liquids under high pressure, II refractive index vs. density, J. Chem. Phys. 69 (1978) 4772e4778. [49] A. Bain, Mind and Body: the Theories of Their Relation, D. Appleton and Company, New York, 1873. [50] W. James, The Principles of Psychology, H. Holt and Company, New York, 1890. [51] Z. Huang, M.A. Williamson, Determination of porosity and permeability in reservoir intervals by artiﬁcial neural network modeling, offshore eastern Canada, Pet. Geosci. 3 (1997) 245e258. [52] M.A. Ahmadi, S.R. Shadizadeh, New approach for prediction of asphaltene precipitation due to natural depletion by using evolutionary algorithm concept, J. Fuel 102 (2012) 716e723. [53] M.A. Ahmadi, M. Golshadi, Neural network based swarm concept for prediction asphaltene precipitation due natural depletion, J. Pet. Sci. Eng. 98e99 (2012) 40e49. [54] M.A. Ahmadi, S. Zendehboudi, M. Dusseault, I. Chatzis, Evolving simple-touse method to determine water-oil relative permeability in petroleum reservoirs, Petroleum. http://dx.doi.org/10.1016/j.petlm.2015.07.008. [55] M.T. Hagan, M.H. Fun, Levenberge-marquardt training algorithm for modular networks, IEEE Int. Conf. Neural Netw. 1 (1996) 468e473. [56] K. Premalatha, A.M. Natarajan, Hybrid PSO and GA models for document clustering, Int. J. Adv. Soft Comput. Appl. 2 (3) (2010) 302e320. [57] J.H. Holland, Adaptation in Natural and Artiﬁcial Systems, second ed., MIT Press, Cambridge, MA, 1975, p. 183. [58] H.P. Schwefel, Evolution and Optimum Seeking, second ed., John Wiley & Sons Inc., New York, 1995, p. 456. [59] R. Hassan, B. Cohanim, O. Weck, A comparison of particle swarm optimization and the genetic algorithm, in: Proceedings of 46th AIAA/ASME/ ASCE/AHS/ASC Structures, Structural Dynamics & Materials Conference, Austin, Texas, 2005, pp. 18e21. [60] M.A. Ahmadi, S. Zendehboudi, A. Bahadori, A. Lohi, A. Elkamel, I. Chatzis, Recovery rate of vapor extraction in heavy oil reservoirs: experimental, statistical, and modeling studies, Ind. Eng. Chem. Res. 53 (41) (2014) 16091e16106. [61] R.C. Eberhart, J. Kennedy, A new optimizer using particle swarm theory, Micro Mach. Hum. Sci. (1995) 39e43. [62] M.A. Ahmadi, M. Pournik, S.R. Shadizadeh, Toward connectionist model for predicting bubble point pressure of crude oils: application of artiﬁcial intelligence, Petroleum 1 (04) (2015) 307e317. [63] M.A. Ahmadi, Developing a robust surrogate model of chemical ﬂooding based on the artiﬁcial neural network for enhanced oil recovery implications, mathematical problems in engineering, Math Probl Eng 2015 (2015) 1e9. Article ID 706897. [64] C.F. Juang, A hybrid of genetic algorithm and particle swarm optimization for recurrent network design, IEEE Trans. Syst. Man Cybern. B Cybern. 34 (2) (2004) 997e1006. [65] R.J. Kuo, Y.S. Han, A hybrid of genetic algorithm and particle swarm optimization for solving bi-level linear programming problem e a case study on supply chain model, Appl. Math. Model. 35 (2011) 3905e3917. [66] E. Atashpaz-Gargari, C. Lucas, Imperialist competitive algorithm: an algorithm for optimization inspired by imperialistic competition, in: IEEE Congress on Evolutionary Computation, 2007, pp. 4661e4667. [67] M.A. Ahmadi, Prediction of asphaltene precipitation using artiﬁcial neural network optimized by imperialist competitive algorithm, J. Pet. Explor. Prod. Technol. 1 (2011) 99e106. [68] D.C. Montgomery, G.C. Runger, Applied Statistics and Probability for Engineers, Student Solutions Manual, John Wiley and Sons, New York, 2006. [69] D.C. Montgomery, Introduction to Statistical Quality Control, John Wiley and Sons, New York, 2008.

Please cite this article in press as: M. Zeinali Hasanvand, et al., Developing grey-box model to diagnose asphaltene stability in crude oils: Application of refractive index, Petroleum (2016), http://dx.doi.org/10.1016/j.petlm.2015.12.004