Chemical Property-Guided Neural Networks for Naphtha Composition
  Prediction
The naphtha cracking process heavily relies on the composition of naphtha,
which is a complex blend of different hydrocarbons. Predicting the naphtha
composition accurately is crucial for efficiently controlling the cracking
process and achieving maximum performance. Traditional methods, such as gas
chromatography and true boiling curve, are not feasible due to the need for
pilot-plant-scale experiments or cost constraints. In this paper, we propose a
neural network framework that utilizes chemical property information to improve
the performance of naphtha composition prediction. Our proposed framework
comprises two parts: a Watson K factor estimation network and a naphtha
composition prediction network. Both networks share a feature extraction
network based on Convolutional Neural Network (CNN) architecture, while the
output layers use Multi-Layer Perceptron (MLP) based networks to generate two
different outputs - Watson K factor and naphtha composition. The naphtha
composition is expressed in percentages, and its sum should be 100%. To enhance
the naphtha composition prediction, we utilize a distillation simulator to
obtain the distillation curve from the naphtha composition, which is dependent
on its chemical properties. By designing a loss function between the estimated
and simulated Watson K factors, we improve the performance of both Watson K
estimation and naphtha composition prediction. The experimental results show
that our proposed framework can predict the naphtha composition accurately
while reflecting real naphtha chemical properties.
Chonghyo Joo, Jeongdong Kim, Hyungtae Cho, Jaewon Lee, Sungho Suh, Junghwan Kim
# Chemical Property-Guided Neural Networks for Naphtha Composition Prediction

###### Abstract

The naphtha cracking process heavily relies on the composition of naphtha, which is a complex blend of different hydrocarbons. Predicting the naphtha composition accurately is crucial for efficiently controlling the cracking process and achieving maximum performance. Traditional methods, such as gas chromatography and true boiling curve, are not feasible due to the need for pilot-plant-scale experiments or cost constraints. In this paper, we propose a neural network framework that utilizes chemical property information to improve the performance of naphtha composition prediction. Our proposed framework comprises two parts: a Watson K factor estimation network and a naphtha composition prediction network. Both networks share a feature extraction network based on Convolutional Neural Network (CNN) architecture, while the output layers use Multi-Layer Perceptron (MLP) based networks to generate two different outputs - Watson K factor and naphtha composition. The naphtha composition is expressed in percentages, and its sum should be 100%. To enhance the naphtha composition prediction, we utilize a distillation simulator to obtain the distillation curve from the naphtha composition, which is dependent on its chemical properties. By designing a loss function between the estimated and simulated Watson K factors, we improve the performance of both Watson K estimation and naphtha composition prediction. The experimental results show that our proposed framework can predict the naphtha composition accurately while reflecting real naphtha chemical properties.

 naphtha cracking process; naphtha composition prediction; chemical-guided neural network

## I Introduction

Naphtha, a liquid hydrocarbon mixture derived from crude oil, serves as a crucial feedstock in Naphtha Cracking Centers (NCCs) for the production of core chemicals such as methane, ethylene, and propylene as shown in Fig. 1. These chemicals are essential in the manufacturing of plastics, synthetic rubbers, and other materials widely used across various industries. The ratio of produced chemicals in NCCs is influenced by several control variables. In order to enhance economic value, it is imperative to manipulate these variables to optimize the production of target products in NCC. The yield of products depends on the two key variables: 1) operating conditions such as operating temperature and pressure, and 2) the naphtha composition such as paraffins and aromatics [1]. The composition of the naphtha is significant because each component has a different activation energy required to be cracked into lighter hydrocarbons. In the past, the chemical industry has employed optimization and estimation techniques to increase the yield of the target products. The operating conditions have been optimized using various commercial simulation software [2, 3, 4, 5] and the detail naphtha composition has been estimated roughly [6, 7, 8] for feedstock management. However, the traditional approaches rely heavily on mathematical equations and theoretical models coupled with case studies, making the optimization process time-consuming. Additionally, determining the precise composition of naphtha is challenging due to its complexity, despite its significant influence on product yield. Therefore, relying on mathematical equations or theoretical models is not feasible as naphtha's detailed composition can only be estimated through various experiments, such as gas chromatography, which offers limited flexibility.

Recent advances in machine learning and data analytics have provided new opportunities for the optimization of cracking furnace with high accuracy and efficiency. Kim et al. developed machine learning-based yield prediction model of cracking process [9].The model was applied to find out the optimal operating conditions for increasing the product yield considering uncertainty. As a result, they found the optimal operating conditions according to different target products, ethylene and propylene. Plehiers et al. developed artificial neural networks (ANNs)-based model to predict a detailed characterization of naphtha and the flow rate of products [10]. The detailed characterization of a naphtha is predicted from three boiling points and main five components of naphtha. The flow rate of products was estimated using the reconstructed naphtha and operating conditions. Although the accuracy of their model was lower than commercial simulation software, the required central processing unit time per reaction was in the order of seconds. Ma et al. [11] suggested a neural network-based naphtha molecular reconstruction model. They improved the typical artificial neural network-based model by embedding physical information into the neural network. Mei et al. [12] proposed a molecular-based Bayesian regression model for petroleum fractions. They assumed that each component of naphtha is independently and identically distributed. Bi and Qiu developed a novel naphtha molecular
reconstruction process using a genetic algorithm and particle swarm optimization [13]. The proposed model was designed to provide an accurate composition for local refineries. They defined probability density functions to apply an optimization algorithm. As a result, they found that the proposed method reconstructed naphtha composition more accurately than other methods.

Although considerable efforts have been made in previous studies to optimize naphtha cracking processes, most of these studies have primarily focused on optimizing operating conditions. A few studies have attempted to reconstruct naphtha composition in detail and demonstrated promising results; however, they often relied on several assumptions or neglected other important indicators, such as the Watson K factor, which encapsulates the chemical property information of naphtha. This study aims to address these limitations by comprehensively considering both detailed composition data and chemical properties for the optimization of naphtha cracking processes.

To address this challenge, we propose a chemical property-guided neural network framework for accurate naphtha composition prediction using real-world naphtha data. Our proposed framework utilizes chemical property information to improve the performance of naphtha composition prediction. Specifically, our framework comprises two parts: a Watson K factor estimation network and a naphtha composition prediction network. The Watson K factor is a measure of the hydrocarbon mixture's normal paraffin content, which plays a crucial role in predicting the naphtha composition accurately The Watson K factor estimation network and naphtha composition prediction network share a feature extraction network based on the Convolutional Neural Network (CNN) architecture, while the output layers use Multi-Layer Perceptron (MLP) based networks to generate two different outputs - Watson K factor and naphtha composition. To enhance the naphtha composition prediction, we utilize a distillation simulator to obtain the distillation curve from the naphtha composition, which is dependent on its chemical properties. By designing a loss function between the estimated and simulated Watson K factors, we improve the performance of both Watson K factor estimation and naphtha composition prediction. The experimental results show that our proposed framework can predict the naphtha composition accurately and can be applied to chemical engineering processes.

The main contributions of our study can be summarized as follows:

* This is the first study to predict detailed naphtha composition from a distillation curve using deep neural networks. To predict the naphtha composition in detail, we propose a novel naphtha composition prediction model.
* To improve the naphtha composition prediction model, we propose a chemical property-guided neural network framework by using the Watson K factor.
* The proposed framework is validated with real industrial naphtha data, collected from a real naphtha cracking process. Thus, this framework is expected to be more applicable to real-world plants.

The remainder of this paper is organized as follows. Section II provides an overview of the network architecture and training process. Section III presents our experimental results and analysis. Finally, in Section IV, we conclude our work and give an insight into future work.

## II Methodology

The goal of the proposed framework is to predict the detailed composition of naphtha with high accuracy to quickly respond to the cracking process. By utilizing the predicted composition information, it is possible to optimize the reaction temperature for maximizing product yields using thermodynamic reaction kinetics equations. In the industrial fields, domain experts roughly estimate the composition of general types components of naphtha by analyzing the corresponding distillation curve. To predict the naphtha composition accurately, we propose the chemical property-guided model, as shown in Fig. 2. The proposed model takes the distillation curve data, which is determined by the physicochemical interaction between detailed composition, as input. The proposed model consists of a feature extractor motivated from ResNet [14] and MLP-based networks that predict the weight fraction of the detailed chemical composition. To guide the training procedure and improve the naphtha composition performance, we incorporate the Watson K factor, which characterizes different types of chemicals, including paraffin, aromatic, and naphthene-type chemicals. The Watson K factor can be calculated by a commercial chemical simulator and a traditional physics equation. In the training procedure, Thus, the additional loss term of K value updates the network to predict the naphtha having realistic chemical properties, not merely having high prediction accuracy.

### _Problem definition_

Predicting the detailed naphtha composition in the industry is a challenging task that often requires multiple experiments. The conventional approaches have limited flexibility because they rely on a restricted set of commercial indices. In addition, recently proposed data-driven models require certain

Fig. 1: Overview of the naphtha cracking center (NCC) for ethylene and propylene production
assumptions, which may hinder their application in real-world industrial settings. This study proposes a novel method for napphta prediction using real plant data that considers a commercial chemical indicator to overcome these challenges. The proposed model utilizes the distillation curve of napphta \(X=[x_{1},...,x_{n_{d}}]\) with \(n_{d}\) boiling points of the distillation curve. Consequently, to compute the distillation curve of napphta as a composition-dependent variable using the simulator, this research employed data preprocessing techniques to transform the flow units (ton/hour) data of napthta into weight percent (wt%) units data. This conversion was necessary to ensure that the total components of the napphta add up to 100 wt%.

The Watson K factor \(k\) as input variables and the corresponding napthta composition \(C=[c_{1},...,c_{n_{c}}]\) with \(n_{c}\) compositions as output variables. The Watson K factor, which classifies oil by boiling points and density, is calculated using Eq. (1) [15, 16, 17]:

\[k=\frac{\sqrt[3]{1.8\tau b}}{\rho} \tag{1}\]

where \(\tau\) is the reference temperature, \(b\) is a coefficient, and \(\rho\) is the oil density.

### _Napththa Composition Prediction Model_

The napthta composition prediction model is illustrated in Fig. 3. In the chemical industry, napthta composition is typically estimated using a distillation curve and expert knowledge. To incorporate this knowledge into the model, we designed a feature extractor \(f(\cdot)\) that is motivated from ResNet with 1D operations [18], as shown in Fig. 4, an MLP-based composition estimation network \(e(\cdot)\). The input for napthta composition prediction is the distillation curve obtained by using ASPEN Hysys software [19, 20]. The ground truth of the napthta composition \(C\) is given in the dataset, and we preprocess the real napthta compositions to match the sum of the compositions equal to 100 wt%. The proposed napthta composition prediction model is trained to predict the detailed napthta components from the input distillation curve data with the preprocessed naphtha composition ground truth.

To train the networks, we formulate two loss functions. The first loss function calculates the difference between the predicted compositions and the ground truth of real compositions. The second loss function regularizes the sum of the predicted compositions to be equal to 100 wt%.

\[\mathcal{L}_{comp}=\left\|C-e(f(X))\right\|_{2}^{2} \tag{2}\]

Fig. 4: Detailed network structure of the feature extractor

Fig. 3: Training procedure and loss of the proposed napthta composition prediction model

Fig. 2: Schematic illustration of proposed chemical property-guided model
\[\mathcal{L}_{res}=\left\|100-\sum_{j}^{n_{c}}\hat{c}_{j}\right\|_{2}^{2} \tag{3}\]

where \(\hat{C}\) is the output of the model \(e(f(X))\), \(n_{c}\) is the number of components in naphtha, the objective loss \(\mathcal{L}_{pred}\) is expressed as the weighted sum of two loss functions. The weights \(\lambda_{comp}\) and \(\lambda_{res}\) control the relative importance of different loss terms.

\[\mathcal{L}_{pred}=\lambda_{comp}\mathcal{L}_{comp}+\lambda_{res}\mathcal{L}_ {res} \tag{4}\]

### _Chemical Property-guided Neural Network Framework with Watson K Factor_

To improve the naphtha composition prediction and incorporate the chemical property, we propose the chemical property-guided neural network model using the Watson K factor, a chemical property indicator of naphtha to guide the prediction of the naphtha composition. As shown in Fig. 5, our proposed framework consists of three networks: a feature extractor \(f(\cdot)\), an MLP-based composition estimation network \(e(\cdot)\), and an MLP-based Watson K factor estimation network \(w(\cdot)\). The weights of the feature extractor are shared between the composition estimation and the Watson K factor estimation networks. The composition estimation network is trained by minimizing the composition prediction loss in Eq. (4) and an additional loss function that measures the discrepancy between the ground truth of the Watson K factor, calculated from the ground truth of the naphtha compositions, and the simulated Watson K factor value from the predicted naphtha composition.

\[\mathcal{L}_{Sim}=\left\|k-\hat{k}_{sim}\right\|_{2}^{2} \tag{5}\]

\[\mathcal{L}_{pred}=\lambda_{comp}\mathcal{L}_{comp}+\lambda_{res}\mathcal{L}_ {res}+\lambda_{sim}\mathcal{L}_{sim} \tag{6}\]

where \(\hat{k}_{sim}\) is the simulated Watson K factor of the predicted composition \(e(f(X))\) by the distillation simulator and \(\lambda_{sim}\) controls the relative importance of the simulated Watson K discrepancy loss. On the other hand, the Watson K factor estimation network is trained by minimizing the discrepancy between the predicted Watson K factor and the ground truth of the Watson K factor.

\[\mathcal{L}_{K}=\left\|k-w(f(X))\right\|_{2}^{2} \tag{7}\]

This loss function enables the Watson K factor estimation network to estimate the Watson K factor without the simulation and the Watson K factor equation Eq. (1).

To train the different networks, we cross-train the networks by minimizing the two different loss functions, respectively. The detailed training procedure for the chemical property-guided neural network is demonstrated in Algorithm 1.

```
0: Batch size \(m\) and Adam hyperparameters \(\eta\)
1:Input: Sets of distillation curves \(x\in X\), real naphtha compositions \(c\in C\), and Watson K factors \(k\in K\)
2:Output: predicted composition \(\hat{C}\) and the predicted Watson K factor \(\hat{k}\)
3:while\(\theta_{f},\theta_{e},\theta_{w}\) have not converged do
4: Sample a mini-batch \((x,c,k)\) from the distillation curve data \(X\), real naphtha compositions \(C\), and the corresponding Watson K factor \(K\).
5:\(\theta_{f}\leftarrow\theta_{f}-\eta\nabla_{\theta_{f}}\mathcal{L}_{pred}(x,c,k ;\theta_{f})\),
6:\(\theta_{e}\leftarrow\theta_{e}-\eta\nabla_{\theta_{e}}\mathcal{L}_{pred}(x,c,k;\theta_{e})\), \(\triangleright\)Eq. (6)
7: Sample a mini-batch \((x,k)\) from the distillation curve data \(X\), and the corresponding Watson K factor \(K\).
8:\(\theta_{f}\leftarrow\theta_{f}-\eta\nabla_{\theta_{f}}\mathcal{L}_{K}(x,k; \theta_{f})\),
9:\(\theta_{w}\leftarrow\theta_{w}-\eta\nabla_{\theta_{w}}\mathcal{L}_{K}(x,k; \theta_{w})\), \(\triangleright\)Eq. (7)
10:endwhile
```

**Algorithm 1** Training procedure for chemical property-guided neural networks \(f\), \(e\), and \(w\). All experiments in the paper used the default values \(m=8\), \(\eta=0.01\), \(n_{Watson}=2\).

## III Experimental Results

### _Dataset_

This study utilized actual naphtha data obtained from a Naphtha Catalytic Cracking (NCC) plant located in Korea. A total of 254 naphtha samples were gathered and subjected to chemical experiments to determine their detailed composition. The analysis revealed that the naphtha samples consisted of 25 primary components, including normal paraffins, isoparaffins, aromatics, and naphthene, based on their distinct carbon numbers.

The distillation curve represents the boiling points of a liquid mixture as a function of their relative concentration. It shows the percentage of the liquid that boils at or below a given temperature and is commonly used to characterize and analyze the composition of the oil. Here, the distillation curve data was collected from the simulator and 30 boiling points of the curve data, which ranges from 348 to 788 \(K\), were applied to predict the naphtha composition.

The dataset consisting of 254 samples including naphtha composition and distillation curve data is divided into two sets, one for training the model which contains 80% of the data, and the other for testing, which contains the remaining 20%. To avoid overfitting, K-fold cross-validation is performed

Fig. 5: Overview of the training procedure and loss of the proposed chemical property-guided framework
in each epoch, where the training and validation datasets are randomly partitioned into 5 equal-sized folds.

### _Implementation Details_

All models in this paper are trained using the Adam optimizer with a mini-batch size of 8. The learning rate hyperparameter was set to 0.01, and the initial decay rates for the first and second moments of the gradients were set to 0.9 and 0.99, respectively. Additionally, during the training of the Chemical property-guided model, weight parameters \(\lambda_{comp}\), \(\lambda_{res}\), and \(\lambda_{sim}\) were set to 0.1, 0.001, and 1, respectively. Based on experiment studies. the optimal weights were chosen to ensure that each loss term contributed equally to the training loss. Once the training was completed, the prediction accuracy of both models was compared on the test dataset using the following prediction metrics:mean-absolute error (\(MAE\)), mean-squared error (\(MSE\)), and \(R^{2}\).

\[MAE=\frac{1}{n}\sum_{i=1}^{n}\lvert y_{i}-\hat{y}_{i}\rvert \tag{8}\]

\[MSE=\frac{1}{n}\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2} \tag{9}\]

\[R^{2}=1-\frac{\sum_{i=1}^{n}(y_{i}-\hat{y_{i}})^{2}}{\sum_{i=1}^{n}(y_{i}- \bar{y_{i}})^{2}} \tag{10}\]

where \(y_{i}\) is the true value, \(\hat{y}_{i}\) is the predicted value, and \(\bar{y}_{i}\) is the average value of the true values.

### _Results and Discussion_

For the test dataset, Fig. 6 shows the parity plots of the proposed models, CNN-based and chemical property-guided models. In the graph, the x- and y-axis indicate the true and predicted wt% of each component, respectively. The data points are distributed near the line, y is equal to x, which implies that both models show high prediction performance for naphtha composition. Furthermore, Table I lists the averaged prediction performance of the proposed models in 5-fold cross-validation. The CNN-based model for predicting naptha composition had a good performance, with the averaged \(MAE\) of 0.0213, \(MSE\) of 0.0485, and \(R^{2}\) of 0.95 after being validated with a five-fold cross-validation. However, the standard deviations of \(MSE\) and \(R^{2}\) were 0.029 indicating some variations among the folds. On the other hand, the chemical property-guided neural networks achieved an average \(MAE\) of 0.0165, \(MSE\) of 0.0327, and \(R^{2}\) of 0.965 indicating that the chemical property-guided model not only performed for naptha composition prediction but also reduced the standard deviations of \(MSE\) and \(R^{2}\) to 0.020 and 0.021, respectively. These results show that the chemical property-guided model has improved the performance of the naphtha prediction model by additional training for Watson K.

In naptha, according to the K factor, the general types of compositions follow specific behavior of weight fraction due to its physicochemical interaction. Commonly, in high Watson K value, the paraffin and iso-paraffin-type composition has a large weight fraction, aromatic and naphthene-type composition has a lower weight fraction. As shown in Fig. 7, predicted naphtha via the chemical property-guided model certainly follows general types of compositions behavior of real naptha in K value increase. Across the full range of Watson K values, the predominant components are paraffin and iso-paraffin, which make up more than 40% of the total weight. Due to their low boiling points resulting from their straight carbon chain structure, an increase in weight fraction leads to the high Watson K value. Conversely, carbon ring-based aromatic and naphthene components, which have

Fig. 6: Parity plots for naphtha composition of different model: (a) CNN-based model; (b) Chemical property-guided model

Fig. 7: Predicted general type components in different Watson K value: (a) Paraffin; (b) Iso-paraffin; (c) Naphthene ; (d) Aromatic content compound
-boiling points ranging from 80 to 210\({}^{\circ}\)C, have a relatively lower weight percentage in crude oils with high Watson K values. Meanwhile, the CNN-based model does not show any composition behavior in different K values. Conclusively, the result reveals that the loss of the Watson K factor guides the training prediction model to generate naphtha composition that reflects realistic chemical properties, rather than just focusing on reducing the prediction accuracy.

## IV Conclusion

The naphtha cracking process is significantly affected by variations in the composition of naphtha, but detailed composition analysis, such as ASTM gas chromatography, is time-consuming and requires pilot-plant scale experiments [21]. To address this issue, a neural network framework is proposed in this study, which utilizes chemical property information and laboratory-scaled data to accurately predict complex naphtha composition without detailed experiments. The proposed framework comprises two networks, a Watson K factor estimation network, and a naphtha composition prediction network using distillation curve data. Both networks share a feature extraction network based on the Convolutional Neural Network (CNN) architecture, while the output layers use Multi-Layer Perceptron (MLP) based networks to generate two different outputs: Watson K factor and naphtha composition. The results show that the proposed framework has lower prediction loss than the model using only distillation curve data and shows good agreement with real naphtha data. However, two main limitations remain, 1) the model needs to be evaluated in the cracking process and 2) there is a possibility of overfitting. Although the proposed model has high prediction accuracy, the error in the detailed composition may lead to considerable errors in the cracking process due to its complex reaction kinetics. Therefore, the predicted composition should be tested in the cracking process to ensure that the final product composition is similar to the real composition. Additionally, due to the small dataset size of 254 data points, further studies are required to expand the proposed model for practical application to the petrochemical process.

## Acknowledgment

This work was partially supported by Carl-Zeiss Stiftung under the Sustainable Embedded AI project (P2021-02-009) and by the Korean Institute of Industrial Technology under the Development of AI Platform for Continuous Manufacturing of Chemical Process (JH-23-0002) and Development and application of carbon-neutral engineering platform based on carbon emission database and prediction model (KM-23-0098).
