Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil

Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil

Egyptian Journal of Petroleum (2016) xxx, xxx–xxx H O S T E D BY Egyptian Petroleum Research Institute Egyptian Journal of Petroleum www.elsevier.c...

1MB Sizes 3 Downloads 50 Views

Egyptian Journal of Petroleum (2016) xxx, xxx–xxx

H O S T E D BY

Egyptian Petroleum Research Institute

Egyptian Journal of Petroleum www.elsevier.com/locate/egyjp www.sciencedirect.com

FULL LENGTH ARTICLE

Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil Saeid Ahmadi a, Mohammad Sadegh Amiribakhtiar b, Amin Gholami c,*, Nader Bahrami c a

Department of Petroleum Engineering, Tehran University, Tehran, Iran Abadan Faculty of Petroleum Engineering, Petroleum University of Technology, Abadan, Iran c Reservoir Engineering Division, Iranian Offshore Oil Company, Tehran, Iran b

Received 7 May 2016; revised 25 June 2016; accepted 10 July 2016

KEYWORDS Asphaltene stability; Subtractive clustering; Genetic algorithm-pattern search; SARA fraction

Abstract Precipitation and deposition of asphaltene are undesirable phenomena that arise during petroleum production which give rise to a pronounced rate of increase in operational cost and adversely affect production rates as well. Hence, it is imperative to develop a mathematical model for the assessment of asphaltene stability in crude oil. In the present study, delta RI which constitutes the difference between refractive index of crude oil (RI) and refractive index of crude oil at the onset of asphaltene precipitation (PRI) is employed as the principal factor for determining the asphaltene stability of the region. Fuzzy logic is a potent tool capable of extracting the underlying dependency between SARA fractions (saturate, aromatic, resin, and asphaltene) data and delta RI for the inexpensive and rapid diagnosis of asphaltene stability. In this study a novel strategy known as hybrid genetic algorithm-pattern search (GA-PS) is suggested for the development of an optimal fuzzy logic model as a reliable alternative for the widely-applied subtractive clustering (SC) method. While SC solely optimizes mean of input Gaussian membership functions (GMFs), GA-PS tool optimizes both mean and variance of input GMFs. Comparison between GA-PS and SC methods confirmed the capability of GA-PS for developing an optimal fuzzy logic model. Ó 2016 Production and hosting by Elsevier B.V. on behalf of Egyptian Petroleum Research Institute. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/ 4.0/).

1. Introduction Crude oils have complex compositions. Application of individual molecular types for chemical identification of crude oil is contained by their complex composition. Hence, in lieu of * Corresponding author. E-mail address: [email protected] (A. Gholami). Peer review under responsibility of Egyptian Petroleum Research Institute.

individual molecular types, hydrocarbon group analysis is frequently employed for their characterization. SARA separation test is an example of such group type analysis. SARA test is a modality through which crude oil is categorized into four major chemical groups named saturate, aromatic, resin, and asphaltene. The separation is accomplished due to difference in polarity and solubility [1]. Among crude oil fractions, asphaltenes are the most important constituents owing to problems followed by their precipitation and deposition in production systems. It is proven that asphaltene is the heaviest,

http://dx.doi.org/10.1016/j.ejpe.2016.07.001 1110-0621 Ó 2016 Production and hosting by Elsevier B.V. on behalf of Egyptian Petroleum Research Institute. 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: S. Ahmadi et al., Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil, Egypt. J. Petrol. (2016), http://dx. doi.org/10.1016/j.ejpe.2016.07.001

2 most polar and, most complicated portion of a petroleum fluid [2]. Asphaltenes are conventionally defined as colloid-like heavy fractions of crude oils that are completely miscible with aromatic hydrocarbons like benzene and toluene but precipitate when excess of low-molecular weight normal alkanes like n-pentane and n-heptane are added [3]. At initial reservoir condition, asphaltene is stable in crude oil by virtue of peptizing by resin [4]. Owing to the sensitivity of phase stability of asphaltene to change in thermodynamic conditions such as variation in pressure, temperature, and crude oil composition, delicate balance between asphaltene and other components in crude oil might be disturbed and asphaltene commence to phase-separate from crude oil and deposit in solid form in the production system [5]. The precipitation and deposition of asphaltene impinge both upstream and downstream of petroleum industry. Upstream, deposition of asphaltene has detrimental effects on reservoir rock properties owing to mechanisms of wettability alteration and pore throat blockage [6]. Downstream, precipitation and deposition of asphaltene arise in topside production facilities and transportation pipeline which induce a considerable increase in production operational costs as well as an adverse effect on production rates [7]. Marked increase in operation cost fostered by asphaltene precipitation created a need to develop a simple and effective model with the view to grasping the underpinning fundamentals of the phase behavior of asphaltene precipitation. Extensive studies have been undertaken to clarify the phase behavior of asphaltene, but efforts for achieving a precise model for prediction of the threshold point at which asphaltene separate from petroleum fluids and its amount is hindered mainly as a consequence of its fuzzy nature and myriad of parameters affecting its precipitations [8]. Each of the three main classes of models takes various approaches to describe the precipitation conditions and they are as follows: (I) Molecular thermodynamic models [9], (II) colloidal approach [10], and (III) Models which are based on scaling approach [11]. The stability of asphaltene in crude oil is one of the major challenging issues in oil industry and has been the subject of extensive studies. Many researchers introduced different criteria for monitoring asphaltene stability in crude oil [12–14]. Leontaritis and Mansoori, [12] posited that stabilizing the asphaltene in crude oil would be achieved by means of peptizing by resin; therefore, they introduced asphaltene and resin contents as the pre-eminent factors that affect asphaltene stability in crude oil. They introduced the resin to asphaltene ratio as the indicator for diagnosis of asphaltene stability. Yen et al. [13] claimed that portions of each of the SARA fractions play a significant role in stabilizing asphaltene in crude oil. As a result, a new screening criterion professed as colloidal instability index was introduced in order to identify the potentiality of asphaltene deposition in crude oil systems. Their index is defined as the ratio of sum of asphaltene and aromatic to the sum of resin and aromatic. Recently, Fan et al. [14] proposed a new criterion to quantitatively investigate asphaltene stability. They used two distinct factors, refractive index of crude oil (RI) and refractive index of crude oil at the onset of asphaltene precipitation (PRI), for the diagnosis of asphaltene stability in crude oil. They employed the difference between RI and PRI as a decisive factor for assessment of asphaltene stability in crude oil. They pointed out that delta RI (DRI ¼ RI  PRI) greater than 0.06 corresponds to crude oil with stable asphaltene while delta RI (DRI ¼ RI  PRI) less than 0.045

S. Ahmadi et al. is indicative of crude oil which is more likely to have asphaltene deposition problems. Crude oil with delta RI (DRI ¼ RI  PRI) in the range of 0.045 and 0.06 is considered in the border region. Ideally, RI is computed by using a Refractometer. Calculating RI from experimental technique is costly, time consuming, and limited to light crude oils. Limitations associated with the experimental method have created the need to develop an accurate mathematical model for relating the RI to the SARA experimental data. Available mathematical models for assessment of asphaltene stability in crude oil through the use of refractive index fall into two major categories. In the first class, empirical correlations are used for the diagnosis of asphaltene stability in crude oil through relating the SARA fractions data to RI [14–15]. In the second class, Least-Square Support Vector Machine is employed as an intelligence model for construction of a model between SARA fractions data and RI [16]. Aforementioned mathematical approaches predict RI by the use of SARA fractions data and consider the constant value of 1.44 for PRI. Subsequently, determination of the asphaltene stability region was achieved by virtue of computing the difference between RI and PRI. Although application of empirical correlations and intelligence model for the diagnosis of asphaltene stability in crude oil is useful, they possess some drawbacks as they do not have enough accuracy and they also consider the constant value for PRI without considering the variation of PRI by crude oil composition. Pertaining to the above explanation, it seemed crucial to propose a satisfactory mathematical model as an alternative for direct prediction of delta RI by the use of SARA fractions experimental data and for assessing the asphaltene stability in crude oil. In the light of the above, a novel methodology was offered to construct a fuzzy model for connecting the SARA fraction data to delta RI. The widely-held approach for developing fuzzy clusters and fuzzy rules between input/output data is subtractive clustering. However, the mentioned procedure is established upon the basis of producing Gaussian membership functions (clusters) with constant spread. To be more descriptive, spread of Gaussian membership functions will not be optimized. To overcome this problem, a hybrid genetic algorithm-pattern search technique was suggested for extracting the optimal values of parameters involved in fuzzy clusters. This strategy has dramatically widened in function for it optimizes traditional subtractive based fuzzy model and enhances the accuracy of the final prediction. 2. Optimizing fuzzy logic by genetic algorithm-pattern search Fuzzy logic is an extension of Boolean logic that views problems as a degree of truth or ‘fuzzy sets of true or false’ [17]. The process of mapping a set of input data into an output using the fuzzy logic is called fuzzy inference system. This procedure is illustrated through the following equations from a mathematical perspective. Suppose that input membership functions for the fuzzy inference system are designated to estimate delta RI from SARA fraction data and are as follows: li ðSÞ ¼ expððS  mSi Þ2 =2r2Si Þ

ð1Þ

li ðAÞ ¼ expððA  mAi Þ2 =2r2Ai Þ

ð2Þ

Please cite this article in press as: S. Ahmadi et al., Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil, Egypt. J. Petrol. (2016), http://dx. doi.org/10.1016/j.ejpe.2016.07.001

Upgrading fuzzy logic by GA-PS

3

li ðRÞ ¼ expððR  mRi Þ2 =2r2Ri Þ

ð3Þ

li ðAsÞ ¼ expððAs  mAsi Þ2 =2r2Asi Þ

ð4Þ

where, S, A, R, and As denote saturates, aromatics, resins, and asphaltene fraction of crude oil; l is degree of membership; m and r are mean and standard deviation of Gaussian membership function; and i refers to rule number. The firing strength of each rule is then defined as below. li ¼ li ðSÞ  li ðAÞ  li ðRÞ  li ðAsÞ

ð5Þ

The corresponding output membership function for each rule is defined as: OMFi ¼ b1i S þ b2i A þ b3i R þ b4i As þ b5i

ð6Þ

Regarding the aforementioned relations, delta RI can be evaluated through the following equation. P l  OMFi DRI ¼ i¼1 i ð7Þ li Incorporated coefficients in the above equation are commonly extracted by virtue of subtractive clustering approach. However, subtractive clustering has no control over variance of input membership functions (MFs) and produces input MFs with constant variances. This deficiency leads to a nonoptimal fuzzy model. To eliminate this flaw, involved parameters in fuzzy model were extracted through hybrid genetic algorithm-pattern search (GA-PS) technique. For this purpose mean square error (MSE) function of fuzzy model was introduced to hybrid GA-PS. It is capable of accurately extracting optimal values of involved parameters in fuzzy model in order for MSE function to be located in its global minimum. Following equation illustrates the fitness function introduced to GAPS. MSE ¼

N 1X ðDRIm  DRIest Þ2 N i¼1

Figure 1 Schematic diagram of the followed strategy in this study for assessment of asphaltene stability in crude oil.

ð8Þ

where, N is number of data points, DRIm is measured delta RI and DRIest is estimated delta RI (i.e. DRI in Eq. (7) is exactly similar to DRIest ). For more study about hybrid GA-PS tool refer to Mohaghegh [18]. 3. Modeling, results and discussion

Figure 2 Plot showing number of clusters and mean square error for both training and test data versus different clustering radii. This figure shows by specifying 0.6 for clustering radius optimal model with three handling rules is obtained.

3.1. Input/output data space In the present study, dataset utilized for constructing the relationship between input/output data space and estimation of asphaltene stability region is collated from open literature experimental data [19]. All SARA fractions data are measured by way of the high pressure liquid chromatography (HPLC) technique. RI and PRI values were measured at 293.15 K and atmospheric pressure by the use of an automated Index Instruments GPR 11-37 Refractometer which employed critical angle technique for computing the refractive index for opaque liquids [19]. 3.2. GA-PS optimized fuzzy model Fig. 1 depicts the general flowchart of this study. At the first stage of this study, a Takagi–Sugeno fuzzy inference system

Figure 3 Crossplot showing correlation coefficient between measured and clustering based fuzzy logic (CBFL) predicted delta RI.

Please cite this article in press as: S. Ahmadi et al., Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil, Egypt. J. Petrol. (2016), http://dx. doi.org/10.1016/j.ejpe.2016.07.001

4

S. Ahmadi et al.

was constructed to estimate delta RI from SARA fraction data. Fuzzy rules and associated parameters were extracted through the agency of subtractive clustering approach. To achieve the best fuzzy model, different clustering radii were checked and the model with the lowest mean square error was chosen as the appropriate one (Fig. 2). Investigation illustrated that specification of clustering radius of 0.6 yields the best clustering based fuzzy logic (CBFL) model. Fig. 3 displays

Figure 4 Plot, showing the best and mean fitness values for delta RI fitness function after 300 generations. Best fitness value indicates mean square error of prediction for genetic algorithmpattern search based fuzzy logic model.

Table 1

the crossplot between measured difference indices and predicted values using CBFL. In the next step, Eqs. (1)–(7) were exploited for fuzzy formulation of SARA fraction data into delta RI. Having introduced Eq. (8) to hybrid genetic algorithm-pattern search (GA-PS) tool; appropriate values for involved parameters in Eqs. (1)–(7) were extracted so that the mean square error function of fuzzy model reached its global minimum. Fig. 4 portrays the run of GA-PS tool for delta RI fitness function during 300 generations. All regulations done for run of hybrid GA-PS tool are illustrated in Table.1. Fig. 5 exhibits input Gaussian membership functions generated by GA-PS based fuzzy logic model. To assess performance of GA-PS optimized fuzzy model, a thorough analysis was performed as shown in Fig. 6. Crossplot between measured and predicted fitness value proves there is a high correlation coefficient between them. Plot of relative error versus different samples reveals success of proposed study in estimation of delta RI. Furthermore, residual analysis of predictions shows errors for most samples are located in close proximity of zero. Comparing Figs. 3 and 6 confirms that GA-PS based fuzzy logic model outperformed the CBFL model. This figure indicates that both means and variances of membership functions are optimized on the part of the proposed methodology. Eventually, decision performance of GA-PS optimized fuzzy model is evaluated as Fig. 7 shows. Investigations show the

Regulations done before run of genetic algorithm.

Parameter/setting

Type/value

Parameter/setting

Type/value

Population type Population size Initial range Scaling function Selection function Elite preservation Crossover fraction

Double vector 30 chromosomes [1 1] Rank Stochastic uniform 4 0.78

Mutation function Crossover function Hybrid function Generations Stall generations Fitness tolerance Time limit

Gaussian Heuristic Pattern search 300 300 1.0 E6 Infinity

Figure 5

Input Gaussian membership functions generated from GA-PS based fuzzy logic model.

Please cite this article in press as: S. Ahmadi et al., Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil, Egypt. J. Petrol. (2016), http://dx. doi.org/10.1016/j.ejpe.2016.07.001

Upgrading fuzzy logic by GA-PS

5

Figure 6 Graph showing performance of proposed model using different statistical criteria, including correlation coefficient between measured and predicted data, relative error versus different samples, and residual analysis of prediction.

Figure 7 Graph showing decision quality of proposed model versus different samples. The proposed model wrongly identified one sample in the stable zone and two samples in the unstable zone. Three mistakes in sixty samples (around 5% error) is a satisfying result obtained by the proposed study.

proposed made a mistake in one sample of the stable zone and two samples of the unstable zone. Three mistakes in sixty samples (around 5% error) is a satisfying result obtained by the proposed study.

data. Furthermore, integration of hybrid genetic algorithmpattern search (GA-PS) technique and fuzzy logic (FL) model was adopted for prediction of delta RI from SARA fractions experimental data. A comparison between traditional subtractive clustering based FL model and GA-PS optimized FL revealed a more perfect performance of GA-PS in extracting fuzzy clusters and setting up fuzzy rules. Hereupon, in situations of similar form GA-PS optimized FL can be simply implemented for enhancing the accuracy of final prediction. GA-PS optimized FL affords a robust and accurate means whereby forecasting asphaltene stability in crudes. Eventually, the proposed method is capable of optimizing both time and money for determining delta RI of crude oils as compared with Refractometer. Acknowledgments A. Gholami would like to acknowledge the Departments of Research and Technology of the National Iranian Oil Company and Iranian Offshore Oil Company for support throughout this research. References

4. Conclusion Precipitation and deposition of asphaltene often present a significant challenge to the oil industry which invites loss of efficiency of the production process as a consequence of the limited utilization of petroleum from the reservoir. Delta RI is one of the most reliable criteria for assessment of asphaltene stability in crude oil. In this work GA-FL was employed for the prediction of delta RI from SARA fractions experimental

[1] S. Ashoori, A. Abedini, R. Abedini, Kh. QorbaniNasheghi, J. Pet. Sci. Eng. 72 (2010) 186–194. [2] B. Shirani, M. Nikazar, A. Naseri, S.A. Mousavi-Dehghani, Fuel 93 (2012) 59–66. [3] I.K. Yudin, G.L. Nikolaenko, E.E. Gorodetskii, E.L. Markhashow, V.A. Agayan, M.A. Anisimov, J.V. Sengers, Phys. A 251 (1998) 235–244. [4] A.S. Kurup, J. Wang, H.J. Subramani, J. Buckley, J.L. Creek, W.G. Chapman, Energy Fuels 26 (2012) 5702–5710.

Please cite this article in press as: S. Ahmadi et al., Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil, Egypt. J. Petrol. (2016), http://dx. doi.org/10.1016/j.ejpe.2016.07.001

6 [5] L.A. Lawal, J.P. Crawshaw, E.S. Boek, V. Vesovik, Energy Fuels 26 (2012) 2145–2153. [6] K. Salahshoor, S. Zakeri, S. Mahdavi, R. Kharrat, M. Khalifeh, Fluid Phase Equilib. 337 (2013) 89–99. [7] B.J. Abu Tarboush, M.M. Husein, J. Colloid Interface Sci. 378 (2012) 64–69. [8] A. Chamkalani, M. Amani, M.A. Kiani, R. Chamkalani, Fluid Phase Equilib. 339 (2013) 72–80. [9] J. Wu, J.M. Prausnitz, A. Firoozabadi, AIChE J. 44 (1998) 1188–1199. [10] G.A. Mansoori, J. Pet. Sci. Eng. 17 (1997) 101–111. [11] H. Rassamdana, B. Dabir, M. Nematy, M. Farhani, M. Sahimi, AIChE J. 42 (1996) 10–21. [12] K.J. Leontaritis, G. Ali Mansoori, Asphaltene deposition: a survey of field experiences and research approaches, J. Petrol. Sci. Eng. 1 (3) (1988) 229–239. [13] A. Yen, Y.R. Yin, S. Asomaning, Evaluating asphaltene inhibitors: laboratory tests and field studies, in: Proceedings of

S. Ahmadi et al.

[14]

[15]

[16] [17] [18] [19]

the SPE International Symposium on Oilfield Chemistry, SPE 65376, Houston, Tex, USA, 2001, pp. 613–619. T. Fan, J. Wang, J.S. Buckley, Evaluating crude oils by SARA analysis, in: Proceedings of the SPE/DOE Improved Oil Recovery Symposium, SPE 75228, Tulsa, Oklahoma, USA, 2002. A. Chamkalani, International Scholarly Research Network, ISRN Analytical Chemistry Volume, 2012, Article ID 219276, 6. doi:10.5402/2012/219276. A. Chamkalani, A.H. Mohammadi, A. Eslamimanesh, F. Gharagheizi, D. Richon, Chem. Eng. Sci. 81 (2012) 202–208. L.A. Zadeh, Inf. Control. 8 (3) (1965) 338–353. S. Mohaghegh, JPT J. Pet. Technol. 52 (9) (2000) 64–73. J.S. Buckley, R.M. Norman, C. Palmer, P.K. Purnendu, Wettability, Imbibition: Microscopic Distribution of Wetting and its Consequences at the Core and Field Scales. Final report submitted by New Mexico Petroleum Recovery Research Center, 2003.

Please cite this article in press as: S. Ahmadi et al., Upgrading fuzzy logic by GA-PS to determine asphaltene stability in crude oil, Egypt. J. Petrol. (2016), http://dx. doi.org/10.1016/j.ejpe.2016.07.001