Optimizing an Industrial Scale Naphtha Catalytic Reforming Plant Using a Hybrid Artificial Neural Network and Genetic Algorithm Technique

In this paper, a hybrid model for estimating the activity of a commercial Pt-Re/Al2O3 catalyst in an industrial scale heavy naphtha catalytic-reforming unit (CRU) is presented. This model is also capable of predicting research octane number (RON) and yield of gasoline. In the proposed model, called DANN, the decay function of heterogeneous catalysts is combined with a recurrent-layer artificial neural network. During a life cycle (919 days), fifty-eight points are selected for building and training the DANN (60%), nineteen data points for testing (20%), and the remained ones for validating steps. Results show that DANN can acceptably estimate the activity of catalyst during its life in consideration of all process variables. Moreover, it is confirmed that the proposed model is capable of predicting RON and yield of gasoline for unseen (validating) data with AAD% (average absolute deviation) of 0.272% and 0.755%, respectively. After validating the model, the octane barrel level (OCB) of the plant is maximized by manipulating the inlet temperature of reactors, and hydrogen to hydrocarbon molar ratio whilst all process limitations are taken into account. During a complete life cycle results show that the decision variables, generated by the optimization program, can increase the RON, process yield and OCB of CRU to about 1.15%, 3.21%, and 4.56%, respectively. © 2015 BCREC UNDIP. All rights reserved.


Introduction
Catalytic reforming is a process whereby light petroleum distillates (naphtha) are contacted with a platinum-rhenium containing catalyst at elevated temperatures and hydrogen pressures for the purpose of enhancing the octane number of the feed stream.The low octane, paraffin-rich naphtha feed, is converted to a high-octane liquid product that is rich in aromatic compounds; hydrogen and other light hydrocarbons are also produced as by-products.In addition to using reformer gasoline as a blending component of motor fuels, it is also a primary source of aromatics used in the petrochemical industry [1].Active catalysts for catalytic naphtha reforming reactions have a highly acidic character, allowing the formation of reactive intermediate species, leading to the desired reformed structures.The catalyst normally used in this process is platinum on chlorinated alumina support.They are in bead or extrudate form and usually contain between 0.2 and 0.4 wt%.Platinum, whatever the support [2].But, the main disadvantage of the naphtha reforming process, carried out in fixed-bed reactors, is the deactivation of the catalyst over time which drastically reduces the yield and quality of the product (i.e.gasoline) in consequence with length of operation.
Typical of industrial processes, optimal operation is required to guarantee profitability and such a task necessitates the use of process models.These models are used to predict the product yields and qualities, and are useful for sensitivity analysis and process optimization.Furthermore, it provides a useful basic foundation for investigation, implementation of automatic control, and for scaling up [3].Some efforts were spent in developing kinetic-based models for the catalytic naphtha reforming process [4,5,6].But, one of the drawbacks in modeling of catalytic-reforming unit (CRU) is the difficulty of developing a rigorous deterministic model for the process, including several important operating parameters such as temperature and mole fraction of the naphtha feed, hydrogen to hydrocarbon molar ratio, and pressure of reactors.The other drawback is that the catalyst deactivation and coking mechanisms are not well-understood.Therefore, in this situation, in addition to kineticbased models, classified as deterministic or first principal models, the use of an artificial neural network (ANN) can be also beneficial.ANNs are high performance non-linear analytical tools, which are capable of establishing the relationship between the input/output data without prior knowledge of the correlation between the variables involved in the system [7].ANNs have shown successful performance in modeling chemical processes in different fields, especially when there are difficulties in the usage of first-principle models (FPMs); even in some cases, they provide better results than empirical correlations [8].ANNs can be also applied as hybrid models.The term hybrid modeling is used to describe the incorporation of prior knowledge about the process under consideration in a neural network modeling approach [9,10].
ANN modeling approach has been applied for modeling of many refinery processes such as hydro desulfurization [3,11], hydrocracking [12,13], delayed coking [14], thermal cracking processes [15,16], and light naphtha isomerization plant [17].Moreover, due to its ability to model the complex and nonlinear problems, ANN can be a useful approach to model the complex behavior between input and output such as catalytic-dielectric barrier discharge plasma [18][19][20], and fluidized reactors [21].
Although some research outcomes on modeling and optimization of heavy naphtha catalytic reforming plant using ANN approach have been published [22][23][24][25], the deactivation of the catalyst has not received much attention in these works.In line with this significant issue, this contribution is intended to develop a hybrid-ANN model in which the decay function of heterogeneous catalysts is combined with a recurrent-layer artificial neural network (called DANN) to introduce deactivation rate of the catalyst into the ANN model.Moreover, it is intended to monitor the activity of the catalyst in an industrial scale CRU, and to predict the quality and quantity of the produced gasoline, simultaneously.This research begins with developing a hybrid-ANN model to estimate the activity of catalyst.Then, it is trained, tested and validated to simulate research octane number (RON) and yield of the gasoline.Finally, it is used to maximize the octane barrel level (OCB) of CRU, whilst all process limitations and operational constraints are considered.

Process Description
A catalytic naphtha reforming unit with a nominal capacity of 16,500 barrels per day, licensed by Chevron Corporation, was chosen for this case study.Protocol involves submitting feed of the plant to a hydrodesulfurization (HDS) reaction in the hydrotreating unit prior to entering the catalytic reformer.Then, the produced naphtha, called Platcharge, can be introduced to the catalytic reforming process.The most commonly used types of catalytic reforming units have three or four reactors, and each reactor has a fixed catalytic bed.For such a unit, the activity of the catalyst is reduced during operations due to deposits of coke and loss of chloride.Generally, the catalyst is regenerated or restored periodically using in situ high temperature oxidation of the coke followed by chlorination [26,27].Therefore, the catalyst in semi-regenerative catalytic reforming is regenerated during routine shutdowns occurring once each 18 to 24 months.
As shown in Figure 1, the Platcharge is preheated initially by the output stream of the last reactor in the effluent heat exchanger (E-1); after passing through the first furnace (H-1), it enters the first reactor (R-1) in which naphthenes are dehydrogenated to form aromatics.Then, the product stream from the first reactor passes through the second reactor (R-2) and the resulting outlet stream enters the third reactor (R-3).Similarly, the product stream from the third reactor enters the fourth reactor (R-4).Due to the endothermic nature of the naphtha reforming reaction, furnaces (i.e., H-1, H-2, H-3, and H-4) should be provided before each corresponding reforming reaction.Next, the product stream from the fourth reactor proceeding from the exchange of heat with fresh feed in heat exchanger E-1, and enters a separator, V-1, wherein the hydrogen produced during the reforming process (gas stream) is recycled and mixed with the Platcharge.Finally, the liquid product leaving the separator is introduced to the gasoline stabilizer, in which the LPG and light gases are separated from the gasoline; so, the vapor pressure of the gasoline can be set according to market requirements.The final product of the stabilizer is called the Reformate.
The catalyst distribution for reactors in the industrial catalytic naphtha reforming unit, and the specifications of the commercial Pt/Re catalyst are shown in Table 1 and Table 2, respectively.Moreover, the normal operating conditions of this unit are presented in Table 3.

Fundamentals of artificial neural network
Most systems encountered in industry are nonlinear to some extent, and in many applications nonlinear models are required to provide acceptable representations [28].ANN is a parallel structure composed of nonlinear nodes which are connected by fixed weights and variables.Since these weights are not related to any physical identities, this approach can be classified as a black-box model.A major advantage of this modeling technique is that within a reasonable amount of time, one can obtain a highly accurate mathematical model of a system without detailed knowledge of the phenomena occurring during the process [3].
One of the most well-known structures of neural network for supervised learning is the multi-layer perceptron (MLP), which is generally used for classification and prediction problems [7].In a feed-forward MLP, neurons consist of at least three layers of nodes including input layer, output layer and one or more hidden layers (see Figure 2).For this topology, the information propagates in only the forward direction.
The most widely employed networks have one hidden layer only [29].Each node within a given layer is connected to all of nodes of the previous layer.The node sums up the weighted inputs and a bias, and it passes the result through a linear function as follows [30]: (1) where wji is the weight that goes from the input i to the hidden neuron j; b is the bias to the node, and xi is the input unit of the neuron.By utilizing an activation function (f), the output of the neuron can be written as follows: (2) This activation function is applied to model nonlinear behavior of the process.In this work, the activation function utilized for the hidden and output nodes is the Tangent sigmoid function as follows: (3) One of the most common approaches to develop a neural network and improve its ability to model real-world systems is introducing internal feedback connections, called a recurrent artificial neural network [31].As it is shown in Figure 3, a recurrent multi-layer perceptron, called RMLP, consists of a series of cascaded networks, each of which is included of multiple layers of nodes.These sub-networks are feedforward except for the last layer that has feedback connections among itself.
After creating the structure of the ANN the training procedure is carried out by introducing a set of known inputs and outputs.Now, ANN can learn the trend of these known data by manipulating the weights and biases.Using backward propagation, i.e. iterative reduction in training errors using a generalized delta rule [30], these parameters are adjusted using the   (4) where N is the total number of known values; k is the output values; actual refers to the measured outputs from the plant, and model refers to the simulated values by ANN.

Hybrid-MLP (HMLP) neural network applied to heavy naphtha catalytic reforming process
The success in obtaining a reliable and robust network depends strongly on the choice of process variables involved, as well as the available sets of data and the domain used for training purposes .Therefore, to develop such a reliable model, it is essential to include all momentous variables, affecting the yield and quality of the product in the input layer of the ANN structure.The input neurons of the developed hybrid-MLP for the target reforming plant consisted of activity of the catalyst, inlet temperature of all reforming reactors (T1 to T4), heavy naphtha feed flow rate (Ff), and hydrogen to hydrocarbon molar ratio (H2Oil (see Figure 4).The most important operating variables for control of product quality and yield in the Platforming process are the temperature of the catalyst beds and hydrogen to hydrocarbon ratio, included in the input layer.The output layer consisted of the RON (RONp) and yield of the process (Yield).
In the proposed hybrid model, the following exponential law is applied for estimating the activity of the catalyst [32]: (5) (6) where ac is the activity of the catalyst; α is the decay constant which is dependent to the type of the catalyst; life is the days on stream (DOS) for the current test run; ts is the time interval between the current test run and the previous one; mf is the mass flow rate of feed; Wcat is the total weight of reforming catalysts, and tc is a dimensionless term, called accumulated feed, representing the total amount of feed passed through the total catalyst weight at a specific life time.
The proposed hybrid-ANN model combined decay function of catalyst and ANN modeling approach; therefore, it was called DANN in this

Bulletin of Chemical Reaction Engineering & Catalysis, 10 (2), 2015, 214
Copyright © 2015, BCREC, ISSN 1978-2993 research.DANN was trained, tested and validated using the Neural Network Toolbox (newlrn function) of MATLAB 2012a.A layered-recurrent neural network consisting of 7 neurons in the input layer, 4 neurons in the hidden layer and 2 neurons in the output layer was built.The transfer or activation function used in the hidden and output nodes was the tangent sigmoid function.Training of the ANN was carried out using the function 'trainlm' which applied 'Levenberg-Marquardt' method to estimate weights and biases; it was performed until finding the minimum MSE between the simulated and actual output variables.

Wide plant optimization of CRU process
As a momentous process variable of CRU, the octane barrel level (OCB) of the unit (i.e., RON × gasoline flow rate) was maximized using the validated DANN model.This variable was important for evaluating productivity of the process and distinguishing the life cycle; so, it should be monitored at all times by CRU operators.Therefore, to optimize the plant, OCB should be maximized by manipulating the decision variables i.e., inlet temperature of all reforming reactors (T1 to T4), heavy naphtha feed flow rate (Ff), and hydrogen to hydrocarbon molar ratio (H2Oil).Therefore, the objective function and its constraints were expressed as follows:  where ti,actual and H2Oil are the actual reactor inlet temperatures and hydrogen to hydrocarbon molar ratio, respectively.Constraint 8(a) and 8(b) expresses limitations in increasing or decreasing reactor inlet temperatures and hydrogen to hydrocarbon molar ratios, respectively.Additionally, because of some operational problems in the crude distillation unit, lacking of storage tanks, and highly market demands, manipulating the heavy naphtha feed was forbidden; therefore, Ff was kept constant during the process optimization.
To minimize the objective function (Equation 7) subject to its constraints (Equations 8(a) and 8(b)), the genetic algorithm function (GA) of MATLAB 2012a was used by manipulating the process variables, which were inlet temperatures of reforming reactors and hydrogen to hydrocarbon molar ratios.

Naphtha Catalytic Reforming Model
During the data gathering, it was observed that the catalyst was deactivated mainly by coke deposition, reducing the RON of product.Therefore, it was essential to compensate the deactivation effect by increasing the inlet temperature of reactors versus DOS.For an industrial catalytic naphtha reformer, it was reported that the variations of RON versus days on stream was an appropriate index to show the activity of the catalyst [33].Consequently, to identify the activity of Pt-Re/Al2O3 catalyst, a set of ninety-seven data points during 919 days obtained from the target reforming plant.All data were selected from the normal condition when no abnormalities such as tower flooding, emergency depressurization and pump or compressor shut down were happen in the op-eration.From these data points, 58 data points were selected for training the DANN (60%), 19 data points for testing (20%), and the remained ones for validating the developed network.At first, it was assumed that DOS is an index for the deactivation of the catalyst; therefore, the first node of input layer consisted of DOS.
To identify the optimum number of neurons in the hidden layer, the value of MSE with different numbers of nodes were calculated.After 50,000 iterations, it was found that the network with 4 hidden nodes had the least MSE, and increasing the number of hidden nodes did not considerably improve the MSE of the trained DANN.Due to keeping the number of fitting parameters i.e., weights and biases as low as possible and preventing over-fitting, 4 hidden nodes were selected.After training network using 4 hidden nodes, it was found that the MSE of simulated data was about 0.0671.Now, to modify the accuracy of the network, the decay constant was manipulated from 0 to 18E-6 with the step size of 1E-6, and the hybrid network was retrained with 50,000 iterations for each step size.The variation of MSE for simulating RON versus deactivation constant is depicted in Figure 5.
Figure 5 reveals that the hybrid model with the decay constant of 6E-6 could simulate the RON of gasoline with the lowest MSE.For this case, the MSE of training, testing and validating data were equal to 0.0477, 0.0573 and 0.0956, respectively.
Moreover, to monitor the activity of the catalyst, the estimated activity versus DOS is shown in Figure 6.As shown in this figure, the catalyst lost about 23 percent of its activity at the end of cycle (day 919).According to the works of Kravtsov [34], the optimum relative activity of a commercial Pt-Re/Al2O3 reforming catalyst with 0.25 wt.% Pt and 0.41 wt.% Re was from 0.65 to 0.7, and the other catalyst with 0.3 wt.% Pt and 0.3 wt.% Re was between 0.75 and 0.8.It can be concluded that the presented approach was capable of estimating the activity of catalyst within a reasonable acceptable range.
In order to examine results, a comparison between the measured and predicted RON are shown in Figure 7. From this parity plot, it is completely evident that DANN is capable of predicting the RON of gasoline with acceptable precision.Using the decay constant of 6E-6, DANN was trained, tested and validated to model the process yield of CRU.The MSE in the training, testing and validating steps for yield of gasoline were 0.063, 0.31 and 0.386, respectively.A comparison between the simulated and measured yields is presented in Fig- ures 8. From this figures, it is concluded that the developed hybrid-ANN model can successfully simulate the process yield of the reforming process.Additionally, to have a better judgment, the average absolute deviation (AAD%) of the simulation results for the RON and yield of product at training, testing and validating steps using the hybrid model, are shown in Table 4. From this table, it is found that the AAD% of training, testing and validating data is small, and completely satisfying for engineering applications, especially for the validating data which are unseen data for the DANN model.It is supposed that the main source of deviation is the possibility of error measurement in obtained data with some faults such as power fluctuation of instruments, calibration of analysis devices, human errors, signal transmission that cannot be excluded from the measured data points.However, from the presented results, it can be concluded that the proposed approach is reliable enough to be utilized for simulating the behavior of an industrial scale CRU.

Optimal Conditions
After training, testing and validating the DANN model, it is now ready to be utilized for optimizing the operation of the CRU.The optimized decision variables of the plant i.e., inlet temperature of all reforming reactors (T1 to T4), and hydrogen to hydrocarbon molar ratio (H2Oil) are calculated for all ninety-seven data points.For each case, the optimized variables subject to the process constraints (Equation 8) are obtained to maximize OCB of the unit (Equation 7).
The comparison between the simulated results of CRU before and after applying the optimal decision variables, confirm that OCB averagely increases by 4.56% during a complete life cycle.Additionally, it is observed that RON and process yield enhanced 1.15% and 3.21% during this period.Figures 9 and 10 illustrate the comparison between actual and optimized RON and volume yield versus DOS.As seen from these figures, the optimized decision variables can increase RON and yield of CRU for most of data    points; therefore, without any deviation from constraints of the process, the profit of the CRU plant considerably increases.In Figure 11, the actual H2Oil of CRU is compared to the optimized ones.It can be seen that for most data points, the optimized H2Oil is lower than the actual values.Therefore, to reach the optimal point, the rate of the recycle stream should be decreased to reach the corresponding H2Oil for each case.The relevant optimal inlet temperatures for each reactor in comparison to the actual ones are presented in plots of Figure 12.
From this figure, it is observed that for the first reforming reactor (T1), the temperature of the inlet stream should be raised.Conversely, for the other reactors, the temperature of inlet streams, i.e.T2, T3, and T4 should be decreased.Manipulation of these decision variables is possible by changing the set point of the furnace of each reactor (H-1 to H-4).In CRU reactors, reactions producing aromatic compounds are highly endothermic and take place rapidly in the first reactor; so, high yields of aromatics are favored by high temperature and low hydrogen to hydrocarbon ratio.Furthermore, hydrocracking irreversible reactions are exothermic and mainly take place in the last reactor, and favored by high temperature and high hydrogen to hydrocarbon ratio.Therefore, decreasing the hydrogen to hydrocarbon molar ratio, increasing the temperature of the first reactor, and decreasing the temperature of others to enhance RON and yield of the process are compatible with the nature of the CRU process.

Conclusions
A hybrid decay function-artificial neural network with recurrent layers, called DANN, was developed for an industrial CRU.The constructed hybrid model was trained, tested, and validated on the basis of actual data obtained from the plant.This model estimated the activity of catalyst versus DOS.It was found the studied commercial Pt-Re/Al2O3 reforming catalyst lost about 23 % of its activity at the end of cycle.According to the works of other researchers, the optimum relative activity of this kind of catalysts was between 0.65 and 0.8; therefore, the estimated activity was within an acceptable range.Additionally, the results showed that DANN could predict RON and yield of the validating data (unseen data) with the AAD% of 0.271% and 0.755%, respectively, and the MSE of 0.0955 and 0.386, respectively.After validating the model and optimizing the decision variables of the CRU, i.e. inlet temperatures of reforming reactors, and hydrogen to hydrocarbon molar ratio, the simulation results indicated that by setting these variables on the optimized values, RON, process yield and octane barrel level increased to about 1.15%, 3.21%, and 4.56%, respectively.The achievements of this research are significant for monitoring the activity of commercial cata-

Figure 4 .
Figure 4. Structure of the hybrid ANN model (DANN) developed for the reforming plant

Figure 7 .
Figure 7. Correlation between measured and predicted values for the RON of Reformate

Figure 8 .
Figure 8. Correlation between measured and simulated values for the yield of Reformate

Figure 9 .Figure 10 .Figure 11 .
Figure 9.Comparison of the optimized and the actual RON of CRU vs. DOS

Figure 12 .
Figure 12.Comparison of the optimized and the actual reactor temperatures vs. DOS

Table 1 .
Catalyst distribution in reforming reactors

Table 2 .
Specifications of commercial Pt/Re reforming catalyst

Table 3 .
Operating conditions in catalytic reforming of target oil refinery

Table 4 .
MSE of prediction for output variables of reforming plant using DANN