Open access peer-reviewed chapter

Modeling a Petrochemical Unit with Artificial Neural Networks (ANN)

Written By

Shafaati Akbar and Pourazad Hamidreza

Submitted: 02 August 2022 Reviewed: 02 September 2022 Published: 25 January 2023

DOI: 10.5772/intechopen.107723

From the Edited Volume

Artificial Neural Networks - Recent Advances, New Perspectives and Applications

Edited by Patrick Chi Leung Hui

Chapter metrics overview

62 Chapter Downloads

View Full Metrics

Abstract

The purpose of this chapter is to model a petrochemical unit by neural networks to estimate the product flow rate of the plant by it. Multilayer perceptron and RBF neural networks have been used in this work, and finally, the outputs of both types of networks have been compared to choose the more accurate network. The same data have been used for training and modeling both networks. The data used for this modeling have been collected by measuring the flow rate of input materials and output products from the plant in ton per day. Table 1 shows the input materials and products.

Keywords

  • artificial neural networks
  • RBF
  • MLP
  • regression
  • petrochemical unit

1. Introduction

To model a petrochemical unit by the artificial neural network, the necessary acquaintances with artificial neural networks should be made first, and we should answer the question of why we should use artificial neural networks instead of conventional methods.

The artificial neural network is a complex nonlinear computing system that is inspired by nature, and the main advantage of this network in performing calculations compared with other computing systems is because of its internal structure [1].

Neural networks are composed of a large number of neurons that have extensive connections with each other. These neurons have the ability to share information with each other. A neural network performs calculations by organizing neurons and communication between them and the information stored in them.

Using conventional modeling methods requires a lot of mathematical calculations and has many complications, especially when we are dealing with a nonlinear system. It takes a lot of time to do this, and if there is an error in the calculations, all the steps must be repeated, and the existing error must be identified and fixed. On the other hand, all the influencing parameters of the designed model should be considered, and a relationship should be defined for how it affects the system, and finding these relationships also has complications. Finding these relationships is important because it can have a great impact on the accuracy of the designed model’s output. Finally, all relevant equations must be solved, which is very time-consuming.

There is no need to perform complex mathematical calculations in modeling with a neural network, and we can save time. Other advantages of neural networks compared with other methods include adaptability, nonlinearity, error tolerance, and flexibility against changing conditions.

To model with an artificial neural network, a dataset is needed to train the network, and these data must be collected by experimental tests, industrial devices, etc.

For example, in the modeling of a petrochemical unit, the goal is to predict outputs according to the flow rate of input to the petrochemical unit, so to prepare basic data for training the network, it is necessary to flow rate of inputs and outputs, during different operations be measured and entered into the network as training data.

In this modeling, the entire petrochemical unit considered as a black box (Figure 1), and only the flow rates of input and output materials are considered as influencing parameters. This is because none of the processes that take place inside the petrochemical unit are involved in the model designed based on neural networks.

Figure 1.

Assumed structure for the petrochemical unit for modeling by artificial neural network.

Here are several related works:

Tufaner et al. developed a three-layer artificial neural network (ANN) and nonlinear regression model to predict the performance of biogas production from the anaerobic hybrid reactor (AHR). In this study, experimental data were used to estimate the biogas production rate with models produced using both ANNs and nonlinear regression methods. Moreover, 10 related variables, such as reactor fill ratio, influent pH, effluent pH, influent alkalinity, effluent alkalinity, organic loading rate, effluent chemical oxygen demand, effluent total suspended solids, effluent suspended solids, and effluent volatile suspended solids, were selected as inputs of the model [2].

DS Pandey et al. developed a multilayer feed-forward neural network to predict the lower heating value of gas (LHV), lower heating value of gasification products including tars and entrained char (LHVp), and syngas yield during gasification of municipal solid waste (MSW) during gasification in a fluidized bed reactor. These artificial neural networks (ANNs) with different architectures are trained using the Levenberg-Marquardt (LM) back-propagation algorithm. Nine input and three output parameters are used to train and test various neural network architectures in both multiple-output and single-output prediction paradigms using the available experimental datasets [3].

M. EI-Sefy et al. developed a feed-forward back-propagation artificial neural network (ANN) model and trained to simulate the interaction between the reactor core and the primary and secondary coolant systems in a pressurized water reactor. A Nuclear Power Plant (NPP) is a complex dynamic system of systems with highly nonlinear behaviors. In order to control the plant operation under both normal and abnormal conditions, the different systems in NPPs (e.g., the reactor core components, primary and secondary coolant systems) are usually monitored continuously, resulting in very large amounts of data. The transients used for model training included perturbations in reactivity, steam valve coefficient, reactor core inlet temperature, and steam generator inlet temperature. Uncertainties of the plant physical parameters and operating conditions were also incorporated in these transients [4].

1.1 Introduction to radial basis function networks (RBF)

Radial basis neural networks use the radial basis function instead of the logistic function as the activation function. The logistic function maps some arbitrary value to a 0–1 interval to answer a yes or no question (binary question) [5].

These types of neural networks are suitable for “classification” and “decision-making systems,” but they are not good in Continuous values. While the basic radial basis function answers the question, how far are we from the goal? And this makes these neural networks suitable for function approximation and machine control (for example, as an alternative to the PID controller) [5].

Radial basis neural networks are special types of natural neural networks that are distance-based and measure the similarity between data based on distance.

Unlike MLP networks, which have multiple consecutive layers, the RBF network consists of three fixed layers. An input layer, which is the input data entered into the network from there, the middle layer, which contains radial basis functions, and the output layer, which gives a linear combination of all middle layer outputs.

Output layer uses a linear activation function or can be thought of without any activation function [6].

1.2 Introduction to multilayer perceptron networks (MLP)

One of the most basic neural models available is the multilayer perceptron model, which simulates the transfer function of the human brain. In this type of neural network, most of the network behavior of the human brain and signal propagation have been considered in it, and hence, they are sometimes called feed-forward networks [1].

Perceptron is a machine learning algorithm that is in the field of supervised learning. This algorithm is known as one of the first artificial neural network algorithms used in this field. Perceptron is considered a type of binary classification algorithm, which means that this algorithm can decide whether a member belongs to a specific category or not [7].

A multilayer perceptron neural network consists of at least three layers, which are the input layer, a hidden layer, and the output layer. In this type of artificial neural network, the outputs of the first (input) layer are used as the inputs of the next (hidden) layer. This continues until, after a certain number of layers, the outputs of the last hidden layer are used as the inputs of the output layer. All the layers that are placed between the input layer and the output layer are called “Hidden Layers” (Figures 2 and 3).

Figure 2.

Schematic of an RBF neural network.

Figure 3.

Schematic of an MLP neural network.

Advertisement

2. Modeling by radial basis function networks (RBF) neural network

The necessary dataset for training this network is by measuring the flow rate of input materials and products (outputs) that have been collected, which has been measured every day for a year. Table 1 shows the inputs and outputs of the petrochemical unit.

InputsOutputs
SRGPOLYETHYLENE
LPGHIPS
PBRGPPS
BENZENEEPS
ACRYLONITRILEABS
BUTEN-1TOLUENE
MINERAL OILBD
GAS(Nm3/d)PENTANE
STEAMPROPYLENE
WATER(m3)C4 RAFFINATE
POWERC.F.O
STYRENEFUEL OIL
C7-C9

Table 1.

Inputs and outputs of the petrochemical unit.

For testing the network, experimental data were given to the network and the networks outputs compared with the real outputs of petrochemical unit shown in the Figure 4.

Figure 4.

Difference between RBF network’s outputs and experimental data(targets).

The empty circles on the blue graph in Figure 4 indicate the measured amount of the products (experimental data or targets), and the empty circles on the orange graph also indicate the predicted parameters by the neural network. Some of these circles are almost coincident with each other, and some are slightly different from each other. In the best case, these points should overlap. The names of each of which are indicated by arrows.

To better understand the amount of difference and whether the network has provided an acceptable performance or not, we can use linear regression between the data estimated by the network and the measured parameters (experimental data). Figure 5 shows the regression between the experimental and predicted data used in Figure 4.

Figure 5.

Regression between predicted data with RFB network and experimental data.

As can be seen, the correlation coefficient between the estimated and experimental data is 0.987, which is acceptable for the petrochemical unit in non-essential and non-sensitive situations.

Advertisement

3. Modeling by multilayer perceptron (MLP) neural network

The multilayer perceptron network considered for this modeling consists of three layers. The first layer has 80, the second layer has 35, and the third layer has 13 neurons.

The activation functions considered for each of these layers are Relu for the first and second layers and purlin for the last layer, respectively.

The best performance of the network is achieved when it gives the value of the error between the network and the experimental data to the lowest possible value, and this is done by some functions, which are called performance functions. In this modeling, the mean square error (MSE) performance function is used. For this modeling, the Levenberg Marquardt training algorithm is used [1, 8].

After the training process, the same data used for testing the RBF network in Figure 4 are used to test the MLP network, and the results are shown in Figure 6.

Figure 6.

Difference between multilayer perceptron network’s outputs and experimental data(targets).

Like Figure 4, the blue graph represents the experimental data, and the orange graph represents the data estimated by the neural network. The empty circles on the blue graph in Figure 7 indicate the measured amount of the products (experimental data), and the empty circles on the orange graph also indicate the estimated parameters by the neural network.

Figure 7.

Regression between predicted data with MLP network and experimental data.

As before, to better understand the amount of difference and whether the network has provided an acceptable performance or not, we can use linear regression between the data predicted by the network and the measured parameters (experimental data).

The correlation coefficient between experimental and estimated data by the network is equal to 0.995, which indicates the good performance of the network.

Advertisement

4. Conclusion

By comparing the correlation coefficient of the RBF neural network, which is equal to 0.987, and the correlation coefficient of the MLP neural network, which is equal to 0.995, it can be concluded that the MLP neural network can perform better in estimating the amount of petrochemical unit products in different conditions. Due to the complex processes that are carried out inside the petrochemical unit, by which inputs are converted into products, a large number of experimental samples are needed for modeling by neural network and its training. In other words, we should take samples from everything that has a direct or indirect effect on the system under study (petrochemical unit) and changes the amount of products produced by the petrochemical unit. It means recording the amount of these changes and finally preparing the required dataset. It is obvious that one of the things that have a great effect on the amount of products produced from a petrochemical unit is the amount of input materials (feed). Therefore, the amount of changes in production products that occur due to changes in the amount of feed should be recorded. These changes were measured per ton per day. As it was said, complex processes take place inside the Petrochemical unit, such as chemical reactors, distillation towers, etc., each of which has an effect on the amount of production, but due to the limitation in measuring these factors, it was decided to measure only the amount of input feed and changes in the amount of produced products, and for this reason, we omitted the details and processes within the petrochemical unit. By doing this, the accuracy of the designed neural network was disrupted, and to solve this problem, it was decided to increase the number of samples collected from the amount of input materials (feed) and changes in the products produced, so that the neural network has more data for training. It took a year to collect this amount of data to complete the desired dataset.

References

  1. 1. Haykin SS. Neural Networks and Learning Machines/Simon Haykin. New York: Prentice Hall; 2009. ch4, ch5
  2. 2. Tufaner F, Demirci Y. Prediction of biogas production rate from anaerobic hybrid reactor by artificial neural network and nonlinear regressions models. Clean Technologies and Environmental Policy. 2020;22(3):713-724
  3. 3. Pandey DS et al. Artificial neural network based modeling approach for municipal solid waste gasification in a fluidized bed reactor. Waste Management. 2016;58:202-213
  4. 4. El-Sefy M et al. Artificial neural network for predicting nuclear power plant dynamic behaviors. Nuclear Engineering and Technology. 2021;53(10):3275-3285
  5. 5. The Mostly Complete Chart of Neural Networks Explained. 2021. Available from: https://towardsdatascience.com/the-mostly-complete-chart-of-neural-networks-explained-3fb6f2367464
  6. 6. Radial Basis Function Neural Network Simplified. 2021. Available from: https://towardsdatascience.com/radial-basis-function-neural-network-simplified-6f26e3d5e04d
  7. 7. Multi-Layer Perceptron. Available from: https://www.sciencedirect.com/topics/computer-science/multilayer-perceptron
  8. 8. Haykin SS. Neuronal Networks: A Comprehensive Foundation. Subsequent edition. New York: Prentice Hall; 2000.ch1, ch3

Written By

Shafaati Akbar and Pourazad Hamidreza

Submitted: 02 August 2022 Reviewed: 02 September 2022 Published: 25 January 2023