Predictive modeling for an industrial naphtha reforming plant using a recurrent-layer artificial neural network

In this research, a layered-recurrent artificial neural network (ANN) using back-propagation method was developed for simulation of a fixed-bed industrial catalytic-reforming unit, called Platformer. Ninetyseven data points were gathered from the industrial catalytic naphtha reforming plant during the complete life cycle of the catalyst (about 919 days). A total of 80% of data were selected as past horizontal data sets, and the others were selected as future horizontal ones. After training, testing and validating the model using past horizontal data, the developed network was applied to predict the volume flow rate and research octane number (RON) of the future horizontal data versus days on stream. Results show that the developed ANN was capable of predicting the volume flow rate and RON of the gasoline for the future horizontal data with the AAD% of 0.238 and 0.813%, respectively. Moreover, the AAD% of the predicted octane barrel against the actual values was 1.447%, confirming the excellent capability of the model to simulate the behavior of the under study catalytic reforming plant.


INTRODUCTION
The need for transportation fuels, especially gasoline, will show a steady growth in the future, contributing to demand petroleum processes.Catalytic naphtha reforming is a very important process for producing high octane gasoline, aromatic feedstock and hydrogen in petroleum refining and petrochemical industries (Hu et al., 2002).This unit uses naphtha as feedstock to produce high octane value liquid, hydrogen (H 2 ) and liquefied petroleum gas (LPG) as by-products (Liang et al., 2005).To design new plants and optimize existing units, an appropriate mathematical model for simulating the industrial catalytic reforming process is needed (Weifeng et al., 2006).
Besides of kinetic-based models which are classified as deterministic or first principal models, the use of an artificial neural network (ANN), a 'black box' model, can be also beneficial, especially when the first principal approach cannot appropriately describe a system.In particular, neural networks are nonlinear, and they learn (or train) by examples.The user of a neural network gathers representative data, and then invokes training algorithms to learn the structure of them (Chaturvedi, 2010).ANN has been previously applied for modeling of refinery processes, such as hydro desulfurization, hydrocracking, delayed coking, and thermal cracking of naphtha processes (Bellos et al., 2002;Arce-Medina et al., 2009;Sadighi et al., 2010;Zahedi et al., 2009;Niaei et al., 2007).Due to its ability to model the complex and nonlinear problems, the ANN can be a useful approach to model the complex behavior between input and output *Corresponding author.E-mail: Seifsr@ripi.ir. in the catalytic processes, such as catalytic-dielectric barrier discharge plasma reactors (Istadi et al., 2006;Istadi et al., 2007;Istadi et al., 2007).In the field of modeling catalytic reforming plant using ANN (Manamalli et al., 2006) developed an artificial neural network to maximize the aromatics yield subject to constraints in inlet temperature of the reactors.Two neural networks one in the forward path and the other in the feedback path were trained to give set points for temperature control.Zahedi et al. (2008) developed two ANN models using the back-propagation and radial basis function (RBF) methods for simulating an industrial catalyticreforming unit.The proposed models predict the volume flow rate of hydrogen, gasoline, and liquid petroleum gas (LPG), outlet temperature of reactors, gasoline specific gravity, Reid vapor pressure (RVP) and research octane number (RON) of gasoline.In this case, 97 data sets were collected from an industrial naphtha reforming plant, and all data sets were used to train, test and validate the ANN architecture.After using ANN model, a set of optimized operation conditions leading to a maximized volume flow rate of produced gasoline were obtained.But, there were no reports to compare the optimized volume flow rate of product estimated by model against the actual results.Furthermore, the life of the catalyst or days on streams was not included in the model which was a crucial factor for a commercial scale fixed-bed reactor.
The present study was aimed at investigating the predictability of artificial neural network (ANN) models for an industrial naphtha reforming unit, called Platformer.This investigation discusses about the usage of mathematical models to find the behavior of the Platformer that is, yield and research octane number (RON) of the product from the existing data.This work can be significant because of considering the life of the catalyst or days on stream to predict the significant output variables.

Process description
A catalytic naphtha reforming unit licensed by Chevron research cooperation with the nominal capacity of 16,500 barrel per day was chosen as a case study.The feed of the plant prior to entering the catalytic reformer should undergo hydro desulphurization (HDS) reaction in the hydrotreatment unit.Then, the produced naphtha, called Platcharge is introduced to the catalytic reforming process.The most commonly types of catalytic reforming units have three or four reactors that each has a fixed catalytic bed.For such a unit, the activity of the catalyst is reducing during the operation due to depositing coke and losing chloride.Hopefully, the activity of the catalyst can be periodically regenerated or restored using in situ high temperature oxidation of the coke followed by chlorination process (Weifeng et al., 2006;Chaturvedi et al., 2010).Therefore, the catalyst of the semi-regenerative catalytic reforming is regenerated during routine shutdowns of the process occurring once each 18 to 24 months.Normally, the catalyst can usually be regenerated 3 or 4 times, and then it must be returned to the manufacturer for reclamation of the valuable platinum and/or rhenium elements.
As shown in Figure 1, Platcharge is first preheated by the output stream of the last reactor in effluent heat exchanger (E-1), and after passing through the first furnace (H-1), it enters the first reactor (R-1) where  naphthenes are dehydrogenated to aromatics.Then, the product stream from the first reactor passes through the second reactor (R-2), and the outlet stream of that enters the third reactor (R-3).Similarly, the product stream from the third reactor enters the fourth reactor (R-4).Due to endothermic nature of naphtha reforming reaction, furnaces that is, H-1, H-2, H-3 and H-4 should essentially be provided before each corresponding reforming reactor.

Process variable Value
The product stream from the fourth reactor, after exchanging heat with fresh feed in heat exchanger (E-1), enters a separator (V-1) wherein the produced hydrogen during reforming process (gas stream) is recycled, and it then 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 the market requirement.The final product from the stabilizer is called Reformate.
The catalyst distribution of reactors in an industrial catalytic naphtha reforming process is revealed in Table 1.Moreover, the normal operating conditions of this unit are presented in Table 2.

DEVELOPMENT OF ARTIFICIAL NEURAL NETWORK MODEL
Although the subject of ANN modeling was discovered 50 years ago, it is only in the last 2 decades that ANN software have been presented to tackle with practical problems.ANN is a parallel structure composed of nonlinear nodes which are connected by fixed weights and variables.ANNs are different from the classic modeling approaches in that they are trained to learn solutions instead of being programmed to model an individual problem in the classic way.The advantages of ANN compared to classical methods are speed, simplicity, and capacity to learn from examples.Moreover, its ability to learn by experimental data makes ANNs very flexible and powerful than any other parametric approaches (Zahedi et al., 2008).
Figure 2 shows the scheme of a typical ANN structure.A typical network consists of an input layer, at least one hidden layer, and an output layer.The most widely employed networks have one hidden layer only (Hagan et al., 1995).For a feed-forward ANN, the information propagates in only the forward direction.In this case, each node within a given layer is connected to all of the nodes of the previous layer.The node sums up the weighted inputs and a bias and passes the result through a linear or nonlinear function (Haykin et al., 1998).The training of ANN is carried out by introducing it with a set of known inputs and outputs.Then, it learns the trend of these known data by manipulating the weights and biases.The ANN parameters that is, weights and biases are adjusted up to the minimization criterion reached.The most widely used criterion is the mean square error (MSE) as follows (Demuth et al., 2007): where N is the total number of known values; P is the output values; actual refers to the measured outputs from the plant, and model refers to the simulated values by ANN.
To create an ANN model, 110 data sets during the life cycle of the catalyst (about 919 days) were gathered from the understudy catalytic 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 operation.Before using these data to build the  ANN, it was necessary to validate them.If a reasonable overall mass balance (±5%) could not be calculated, the validity of test run was compromised.According to this strategy, 97 data points were obtained.The variables and their operating ranges are presented in Table 3.Among 97 data points, 80 data (up to the day of 800) were selected for building the ANN model.So, 48 data points were selected for training the ANN (60%), 17 data points for testing (20%), and the remained ones for validating the developed network.These data were called the past horizontal data supposed to show the behavior of the Platformer from start of run to the day of 800.The other data points, that is, from the day of 800 to the end of run (day of 919) were called the future horizontal data that were chosen to evaluate the ability of the ANN model as a reliable tool to predict the cycle life of the catalyst.
The ANN model of Platformer was developed by using the neural network toolbox (newlrn function), presented in MATLAB 2010a.A layered-recurrent neural network consisting of 7 neurons in the input layer and 2 neurons in the output layer was built.Determination of nodes in a hidden layer was very important for the ANN model.Too small a number of hidden nodes may not train the network well to reach an acceptable error.On the other hand, too many hidden nodes make the ANN to memorize the data instead of learning them.For the developed model in this work, 3 nodes were Sadighi and Mohaddecy 203 selected for the ANN model.So, it was found that the required coefficients that is, weights and biases of the designed network using 3 hidden nodes were limited to 80 parameters, less than the number of training data (97 sets).Therefore, the over learning of the model can be prevented.
The transfer or activation function used in the hidden and output nodes is the Tangent sigmoid function as follows: where x is the sum of the weighted inputs to the neuron and f(x) represents the output of the node.
The input neurons of the ANN consisted of days on stream (DOS), naphtha feed flow rate, recycle gas flow rate, hydrogen to hydrocarbon molar ratio, and inlet temperature to reactors 1 to 4 (7 neurons).The output layer of that was the research octane number (RON) and the product flow rate that is, gasoline or reformate (2 neurons).Training of the ANN was carried out using the function 'trainlm' which applied Levenberg-Marquardt optimization method to estimate weights and biases.Training was performed until finding the minimum MSE between the simulated and actual output variables that is, all past horizontal data points.Detailed of the ANN model used for the under study naphtha catalytic reforming plant is presented in Table 4.

Developing the neural network using past horizontal data
The described procedure for developing the artificial neural network was followed to train, test and validate the model for 80 points of past horizontal data.The MSE and AAD% of model obtained for RON and gasoline flow rate are presented in Table 5.Additionally, the parity plots for the RON and gasoline flow rate simulated by the ANN models are presented in Figures 3 and 4. From these results, it can be found that the deviation of simulated values in comparison to the measured data is acceptable for the output values of past horizontal data points.It is supposed that the main source of deviation was the possibility of error measurements in gathering data obtained with some faults, such as signal transmission, calibration and power fluctuation of instruments which could not be excluded from the actual data.However, from the presented simulation results, it can be concluded that the developed simulation program was reliable enough to be applied for predicting the behavior of the under study catalytic reforming unit.

Predicting the future horizontal outputs
After building the ANN, the outputs corresponding to the future horizontal data, that is, RON and gasoline flow rate were extrapolated.It is obvious that the predicted outputs are related to the days on streams from day of 800 to the end of run (day of 919).Figures 5 and 6 show the comparisons between the RON and flow rate of the produced gasoline against the actual values, respectively.As it can be seen from these figures, there are close mappings between the measured and the predicted (or extrapolated) output variables.It should be mentioned that the AAD% of predictions for the RON and gasoline flow rate were 0.52 and 1.62%, respectively.It is concluded that the ANN-based model is also good for extrapolating the behavior of the catalytic naphtha reformer.
As an important parameter for a naphtha catalytic reforming unit, the octane barrel of the unit (that is, RON × gasoline flow rate) was studied using the validated ANN model.This variable is so important to distinguish the end of the life cycle, and also it is always monitored to estimate the catalyst life.The results showed that AAD% of the predicted octane barrel for the future horizontal data using the ANN-based model was 1.477%.Additionally, the AAD% of the prediction for the octane barrel at the end of run (day of 919) was about 0.3%.From Figure 7, close mappings between the measured and simulated octane barrels for both past and future horizontal data can be understood.These results confirm that the presented approach can be applied by the refineries to monitor the operation of the catalytic reforming plant, and it can be used to estimate the octane, flow rate of gasoline and life cycle with an acceptable accuracy.

Conclusions
In this work, a recurrent layer neural network model was developed for the simulation of an industrial fixed-bed catalytic naphtha reformer.The collected data from the under study plant was divided to the past horizontal data (80 points from start of run to the day of 800), and the future horizontal ones (from the day of 800 to end of the life cycle).The built ANN model was trained, tested and validated on the basis of the past horizontal data.The results showed that the ANN model could simulate the RON, the flow rate of the produced gasoline, and the octane barrel of the past horizontal data with the AAD% of 0.238, 0.813 and 0.853%, respectively.Finally, the developed ANN model were applied to predict the RON, gasoline flow rate and octane barrel of the future horizontal data which were significant for estimating the life of the catalyst.The comparison between the model predictions (or extrapolation) and the future horizontal data confirmed that the developed ANN model could predict these momentous outputs with the AAD% of 0.52, 1.62 and 1.477%, respectively.

Figure 1 .
Figure 1.Block flow diagram of the catalytic reforming unit of the target oil refinery.

Figure 2 .
Figure 2. Schematic diagram of a typical structure layer.

Figure 3 .
Figure 3. Parity plot for the trained, tested and validated RON simulated by ANN model.

Figure 4 .
Figure 4. Parity plot for the trained, tested and validated gasoline flowrate simulated by ANN model

Figure 5 .
Figure 5. Actual RON of gasoline against predicted values vs. days of streams.

Figure 6 .
Figure 6.Actual flowrate of gasoline against predicted values vs. days of streams.

Figure 7 .
Figure 7. Octane barrel of past and future horizontal data against actual values vs. days of streams.

Table 1 .
Catalyst distribution in reforming reactors.

Table 2 .
Operating conditions in the catalytic reforming of the target oil refinery.

Table 3 .
The input variables and their ranges used for building the ANN model.

Table 4 .
Detailed of ANN algorithm build for the Platformer.

Table 5 .
AAD% and MSE of ANN model after training, testing and validating procedure.