Illustration of Realtime Data-Driven Predictive “Digital Twin” in Offshore Facility, Courtesy image: Yokogawa

1 Background and problem research

1.1 Project Background

In many daily cases, safe and optimum operating condition is the most favorable concern for Chemical Process Engineers and operators of Chemical Plant and Refinery Operations. A process engineer and an operator should know while operating a Chemical Plant or Refiner should know which parameters can change target product yield and find best operating condition to get maximum production capacity.

But, Parameter changes in plant is so dynamic, and getting optimum operating condition in dynamic condition is the most challenging thing for Process Engineers and operators. Conduct experimental or trial and errors and trying to getting best operating condition during plant opration by adjusting is strongly avoided. Unexpected parameters changes can reduce the target product yield and production capacity. In some cases, some parameter changes can lead to unplanned shutdown can lead to fatal effect of a Chemical Plant or Refinery like blow-up or fire incident. Hence, ensure any parameters in plant at safe and optimum operating condition is not only for achieve safe operting condition but also the best way to achieve the maximum profit.

A digital twin is a virtual representation of an object, is updated from real-time data, machine learning and reasoning to help decision making, or in simple virtual model designed to accurately reflect a physical object [1]. By creating Digital Twin Model, which can be imitated/mirroring Chemical Plant and Refinery process, the effect of parameter changes to target product yield and production capacity can figured out. And number of experimental trial and error can be conducted and unexpected scenarios that can be avoided without giving any harm to the real process.

Futhermore, by connecting realtime parameters data to trained Digital Twin Model, the model not only could predict target product yield and production capacity, but also giving best recommendation operating condition in realtime to Process Engineers and operators. So they can adjust the parameters to achive optimum target product yield and production capacity.

1.2 Bussiness impact

Digital Twin projected as future backbone of industry. Digital Twin is more adaptive by real-time data input to the model. Digital twin market reach USD 8.6 Billion in 2022, and projected to reach 11.51 Billion in 2023 to 137.67 Billion by 2030 [3].
Creating a digital twin of design or exsisting plant by collecting data, creating model, model verification and create predictive analysis is a way to reduce money, but energy and time. Through digital twin, conducting experimental with model reduce the number of unexpected operating condition, faulty & Trip, provide operational visibility and analysis to help reduce asset failures, control costs and increase plant availability, and effective start-up and shutdown [2].

1.3 Target User

A company named XYZ.Ltd, currently running a Propylene Glycol plant. Their engineer belive that current operating condition is not at its optimum oprating condition. To solve this problem the engineer focus on the reaction happened in reactor shown below, their engineer is asking help to study some paramaters which give contribution to Propylene Glycol yield in Reactor Prods stream (Fraction molar of Propylene Glycol) and Product volume flow (Propylene Glycol Liquid Volume Flow).

The reaction happened in reactor is :

Propylene Oxide + Water → Propylene Glycol

After study which parameters gave contribution to Propylene Glycol yield in Reactor Prods stream and Product volume flow, The engineer is asking help to create Digital twin model of their Propylene Glycol Reactor, so they can do some experimental test by using the model. Furthermore, the engineers is asking help to built realtime data driven digital twin of their reactor which can predict the to Propylene Glycol yield in Reactor Prods stream and Product volume flow by using their realtime input parameter as above and give recommendation to engineer and operator the optimum input parameter value to archive maximum Propylene Glycol yield in Reactor Prods stream and Product volume flow.

1.4 Business Implementation

Digital twin have a potential as a new business entity. The deployed digital twin model utilized with data pipe and other MLops feature the connected DCS (Distributed Control System) of each plant could shall be monitored anytime and also each plant or refinery have unique model. Built, deployment, and monitoring services can be realized as a services company.

1.5 Output/Target of project

Here, The Digital Twin of Propylene Glycol Reactor bilt to help Engineers and operator to optimize their current plant performance and better decission making.

2 Data Collection

2.1 Information about the data

The data contain oparation parameters from Propylene Glycol Plant Model Simmulator which built by Aspen HYSYS. The data contain data from mass flow, heat flow, reactor dan controller. The data collected in dynamic data which simmilar with real plant data.

2.2 Data source, Data collection technique

First, model created based on typical configuration of Propylene Glycol Plant. The typical model of plant model There are inlet streams : Propylene Oxide stream, Water Stream, Nitrogen Stream, and Heat Stream. For output stream : Vapor and Product Stream. There are some control placed in severeal streams : mass flow controller at Propylene Oxide stream to control Propylene Glycol fraction molar composition at product stream, Water Stream to control mass flow into the reactor, Nitrogen Stream to control reactor internal pressure, and Heat Stream to control the temperature of reactor. A reactor, type of reactor is Continuous Stirred Tank Reactor.

There are some some variables used and collected in this case :

  1. Reactor-LiquidPercentLevel [%]
  2. ReactorProds-Temperature [C]
  3. ReactorProds-CompMoleFrac(12-C3diol)
  4. ReactorProds-LiquidVolumeFlow [m3/h]
  5. Coolant-HeatFlow [kJ/h]
  6. Reactor-VesselPressure [kPa]
  7. WaterFeed-StdIdealLiqVolFlow [m3/h]
  8. PropOxide-StdIdealLiqVolFlow [m3/h]
  9. MakeUp-StdGasFlow [STD_m3/h]
  10. ReactorProds-MasterCompMoleFrac(12C3Oxide)
  11. ReactorProds-MasterCompMoleFrac(H2O)
  12. ReactorProds-MasterCompMoleFrac(Methanol)
  13. Vapour-StdGasFlow [STD_m3/h]
  14. Vapour-MasterCompMoleFrac(12-C3diol)
  15. Vapour-MasterCompMoleFrac(12C3Oxide)
  16. Vapour-MasterCompMoleFrac(H2O)
  17. Vapour-MasterCompMoleFrac(Methanol)
  18. Vapour-MasterCompMoleFrac(Nitrogen)
  19. ValveProduct-StdIdealLiqVolFlow [m3/h]
  20. Valve-Percentageopen [%]
  21. VLV-102-Percentageopen [%]
  22. VLV-100-Percentageopen [%]
  23. VLV-101-Percentageopen [%]

2.3 Data to answer the business questions needs

The data collected by compiling all dynamic cases by changging a variable and its effect to other variables. Those dynamic variable set changging then create cause and effect dynamic response. The cause and effect response will create more comprehensive models.

The model then used to predict response when user expect another parameter. Predict parameter that caused fail/trip. Safe start-up and shut-down. And best parameter set to get best or optimimum production.

2.4 Data Preparation

2.4.1 Prediktor is the inlet stream of reactor, they are :

  1. Reactor-LiquidPercentLevel [%]
  2. ReactorProds-Temperature [C]
  3. Reactor-VesselPressure [kPa]
  4. WaterFeed-StdIdealLiqVolFlow [m3/h]
  5. PropOxide-StdIdealLiqVolFlow [m3/h]
  6. MakeUp-StdGasFlow [STD_m3/h]

2.4.2 Target is the outlet stream of reactor, They are :

  1. ReactorProds-CompMoleFrac(12-C3diol)
  2. ReactorProds-LiquidVolumeFlow [m3/h]
  3. Coolant-HeatFlow [kJ/h]
  4. ReactorProds-MasterCompMoleFrac(12C3Oxide)
  5. ReactorProds-MasterCompMoleFrac(H2O)
  6. ReactorProds-MasterCompMoleFrac(Methanol)
  7. Vapour-StdGasFlow [STD_m3/h]
  8. Vapour-MasterCompMoleFrac(12-C3diol)
  9. Vapour-MasterCompMoleFrac(12C3Oxide)
  10. Vapour-MasterCompMoleFrac(H2O)
  11. Vapour-MasterCompMoleFrac(Methanol)
  12. Vapour-MasterCompMoleFrac(Nitrogen)
  13. ValveProduct-StdIdealLiqVolFlow [m3/h]
  14. Valve-Percentageopen [%]
  15. VLV-102-Percentageopen [%]
  16. VLV-100-Percentageopen [%]
  17. VLV-101-Percentageopen [%]

2.4.3 Data preparation

The data shall be not contain missing avalue, wrong scale and shall be in integer.

3 EDA Steps

  1. Create Pyspark using R.
  2. Import data by using Pyspark.
  3. Check all variables complete and show all value.
  4. Remove missing value.
  5. Change all variables into integer.
  6. Split data to train and validation.
  7. Create some models (LM, NN, Tensorflow) and check Adjusted R Squares.
  8. Model improvement by remove outliers.
  9. Re-Create model and check check Adjusted R Squares.
  10. Do prodiction with data test.
  11. Select best model and model explanation.
  12. Create data pipeline and deploy realtime interactive model (to shiny).

4 Product Design

  1. The Models that will be used are at least LM, NN, Tensorflow.
  2. Fature shall be installed on shiny input number predictor and output number target.

6 Library Import

library(dplyr)
library(lmtest)
library(tensorflow)
library(keras)
library(tidyverse)
library(tidymodels)
library(rsample)
library(GGally)
library(ggplot2)

7 Data Import

TrainData <- read.csv("databaru/TrainDataNew.csv") 
head(TrainData)
##   Reactor.LiquidPercentLevel ReactorProds.Temperature
## 1                    86.9777                    43.33
## 2                    86.9775                    43.33
## 3                    86.9772                    43.33
## 4                    86.9769                    43.33
## 5                    86.9766                    43.33
## 6                    86.9764                    43.33
##   ReactorProds.CompMoleFrac.12.C3diol. ReactorProds.LiquidVolumeFlow
## 1                            0.0941995                        65.212
## 2                            0.0941995                        65.263
## 3                            0.0941995                        65.267
## 4                            0.0941995                        65.270
## 5                            0.0941995                        65.263
## 6                            0.0941995                        65.264
##   Coolant.HeatFlow Reactor.VesselPressure WaterFeed.StdIdealLiqVolFlow
## 1         -3.6e+08                130.001                      491.283
## 2         -3.6e+08                130.002                      491.282
## 3         -3.6e+08                130.001                      491.283
## 4         -3.6e+08                130.001                      491.284
## 5         -3.6e+08                130.001                      491.284
## 6         -3.6e+08                130.001                      491.284
##   PropOxide.StdIdealLiqVolFlow MakeUp.StdGasFlow
## 1                      198.302           235.889
## 2                      198.302           235.775
## 3                      198.302           235.753
## 4                      198.302           235.750
## 5                      198.302           235.749
## 6                      198.302           235.748
##   ReactorProds.MasterCompMoleFrac.12C3Oxide.
## 1                                 0.00585038
## 2                                 0.00585038
## 3                                 0.00585038
## 4                                 0.00585039
## 5                                 0.00585039
## 6                                 0.00585040
##   ReactorProds.MasterCompMoleFrac.H2O.
## 1                             0.893921
## 2                             0.893921
## 3                             0.893921
## 4                             0.893921
## 5                             0.893921
## 6                             0.893921
##   ReactorProds.MasterCompMoleFrac.Methanol. Vapour.StdGasFlow
## 1                                0.00602576           262.498
## 2                                0.00602576           262.258
## 3                                0.00602576           262.205
## 4                                0.00602576           262.193
## 5                                0.00602576           262.191
## 6                                0.00602576           262.190
##   Vapour.MasterCompMoleFrac.12.C3diol. Vapour.MasterCompMoleFrac.12C3Oxide.
## 1                             0.618541                            0.0477234
## 2                             0.618538                            0.0477232
## 3                             0.618539                            0.0477232
## 4                              0.61854                            0.0477233
## 5                              0.61854                            0.0477234
## 6                             0.618539                            0.0477234
##   Vapour.MasterCompMoleFrac.H2O. Vapour.MasterCompMoleFrac.Methanol.
## 1                      0.0616762                          0.00298235
## 2                      0.0616759                          0.00298233
## 3                      0.0616760                          0.00298234
## 4                      0.0616761                          0.00298234
## 5                      0.0616761                          0.00298234
## 6                      0.0616761                          0.00298234
##   Vapour.MasterCompMoleFrac.Nitrogen. ValveProduct.StdIdealLiqVolFlow
## 1                            0.887556                         652.116
## 2                            0.887557                         652.632
## 3                            0.887557                         652.671
## 4                            0.887556                         652.700
## 5                            0.887556                         652.627
## 6                            0.887556                         652.638
##   Valve.Percentageopen VLV.102.Percentageopen VLV.100.Percentageopen
## 1              435.168                     50                 49.998
## 2              435.157                     50                 49.997
## 3              435.133                     50                 49.997
## 4              435.108                     50                 49.998
## 5              435.085                     50                 49.998
## 6              435.063                     50                 49.998
##   VLV.101.Percentageopen
## 1                50.0001
## 2                50.0003
## 3                50.0003
## 4                50.0003
## 5                50.0003
## 6                50.0004

8 Data Type Check

glimpse(TrainData)
## Rows: 11,092
## Columns: 23
## $ Reactor.LiquidPercentLevel                 <dbl> 86.9777, 86.9775, 86.9772, …
## $ ReactorProds.Temperature                   <dbl> 43.33, 43.33, 43.33, 43.33,…
## $ ReactorProds.CompMoleFrac.12.C3diol.       <dbl> 0.0941995, 0.0941995, 0.094…
## $ ReactorProds.LiquidVolumeFlow              <dbl> 65.212, 65.263, 65.267, 65.…
## $ Coolant.HeatFlow                           <dbl> -3.6e+08, -3.6e+08, -3.6e+0…
## $ Reactor.VesselPressure                     <chr> "130.001", "130.002", "130.…
## $ WaterFeed.StdIdealLiqVolFlow               <dbl> 491.283, 491.282, 491.283, …
## $ PropOxide.StdIdealLiqVolFlow               <dbl> 198.302, 198.302, 198.302, …
## $ MakeUp.StdGasFlow                          <dbl> 235.889, 235.775, 235.753, …
## $ ReactorProds.MasterCompMoleFrac.12C3Oxide. <dbl> 0.00585038, 0.00585038, 0.0…
## $ ReactorProds.MasterCompMoleFrac.H2O.       <dbl> 0.893921, 0.893921, 0.89392…
## $ ReactorProds.MasterCompMoleFrac.Methanol.  <dbl> 0.00602576, 0.00602576, 0.0…
## $ Vapour.StdGasFlow                          <dbl> 262.498, 262.258, 262.205, …
## $ Vapour.MasterCompMoleFrac.12.C3diol.       <chr> "0.618541", "0.618538", "0.…
## $ Vapour.MasterCompMoleFrac.12C3Oxide.       <dbl> 0.0477234, 0.0477232, 0.047…
## $ Vapour.MasterCompMoleFrac.H2O.             <dbl> 0.0616762, 0.0616759, 0.061…
## $ Vapour.MasterCompMoleFrac.Methanol.        <dbl> 0.00298235, 0.00298233, 0.0…
## $ Vapour.MasterCompMoleFrac.Nitrogen.        <dbl> 0.887556, 0.887557, 0.88755…
## $ ValveProduct.StdIdealLiqVolFlow            <dbl> 652.116, 652.632, 652.671, …
## $ Valve.Percentageopen                       <dbl> 435.168, 435.157, 435.133, …
## $ VLV.102.Percentageopen                     <int> 50, 50, 50, 50, 50, 50, 50,…
## $ VLV.100.Percentageopen                     <dbl> 49.998, 49.997, 49.997, 49.…
## $ VLV.101.Percentageopen                     <dbl> 50.0001, 50.0003, 50.0003, …

9 Data Pre-processing

9.1 Variable type change

TrainData <- TrainData %>% 
  mutate(Reactor.VesselPressure=as.double(Reactor.VesselPressure)) %>% 
  mutate(Vapour.MasterCompMoleFrac.12.C3diol. = as.double(Vapour.MasterCompMoleFrac.12.C3diol.))

9.2 Variable type re-check

glimpse(TrainData)
## Rows: 11,092
## Columns: 23
## $ Reactor.LiquidPercentLevel                 <dbl> 86.9777, 86.9775, 86.9772, …
## $ ReactorProds.Temperature                   <dbl> 43.33, 43.33, 43.33, 43.33,…
## $ ReactorProds.CompMoleFrac.12.C3diol.       <dbl> 0.0941995, 0.0941995, 0.094…
## $ ReactorProds.LiquidVolumeFlow              <dbl> 65.212, 65.263, 65.267, 65.…
## $ Coolant.HeatFlow                           <dbl> -3.6e+08, -3.6e+08, -3.6e+0…
## $ Reactor.VesselPressure                     <dbl> 130.001, 130.002, 130.001, …
## $ WaterFeed.StdIdealLiqVolFlow               <dbl> 491.283, 491.282, 491.283, …
## $ PropOxide.StdIdealLiqVolFlow               <dbl> 198.302, 198.302, 198.302, …
## $ MakeUp.StdGasFlow                          <dbl> 235.889, 235.775, 235.753, …
## $ ReactorProds.MasterCompMoleFrac.12C3Oxide. <dbl> 0.00585038, 0.00585038, 0.0…
## $ ReactorProds.MasterCompMoleFrac.H2O.       <dbl> 0.893921, 0.893921, 0.89392…
## $ ReactorProds.MasterCompMoleFrac.Methanol.  <dbl> 0.00602576, 0.00602576, 0.0…
## $ Vapour.StdGasFlow                          <dbl> 262.498, 262.258, 262.205, …
## $ Vapour.MasterCompMoleFrac.12.C3diol.       <dbl> 0.618541, 0.618538, 0.61853…
## $ Vapour.MasterCompMoleFrac.12C3Oxide.       <dbl> 0.0477234, 0.0477232, 0.047…
## $ Vapour.MasterCompMoleFrac.H2O.             <dbl> 0.0616762, 0.0616759, 0.061…
## $ Vapour.MasterCompMoleFrac.Methanol.        <dbl> 0.00298235, 0.00298233, 0.0…
## $ Vapour.MasterCompMoleFrac.Nitrogen.        <dbl> 0.887556, 0.887557, 0.88755…
## $ ValveProduct.StdIdealLiqVolFlow            <dbl> 652.116, 652.632, 652.671, …
## $ Valve.Percentageopen                       <dbl> 435.168, 435.157, 435.133, …
## $ VLV.102.Percentageopen                     <int> 50, 50, 50, 50, 50, 50, 50,…
## $ VLV.100.Percentageopen                     <dbl> 49.998, 49.997, 49.997, 49.…
## $ VLV.101.Percentageopen                     <dbl> 50.0001, 50.0003, 50.0003, …

9.3 Missing Data Check

colSums(is.na(TrainData))
##                 Reactor.LiquidPercentLevel 
##                                          0 
##                   ReactorProds.Temperature 
##                                          0 
##       ReactorProds.CompMoleFrac.12.C3diol. 
##                                          0 
##              ReactorProds.LiquidVolumeFlow 
##                                          0 
##                           Coolant.HeatFlow 
##                                          0 
##                     Reactor.VesselPressure 
##                                          1 
##               WaterFeed.StdIdealLiqVolFlow 
##                                          0 
##               PropOxide.StdIdealLiqVolFlow 
##                                          0 
##                          MakeUp.StdGasFlow 
##                                          0 
## ReactorProds.MasterCompMoleFrac.12C3Oxide. 
##                                          0 
##       ReactorProds.MasterCompMoleFrac.H2O. 
##                                          0 
##  ReactorProds.MasterCompMoleFrac.Methanol. 
##                                          0 
##                          Vapour.StdGasFlow 
##                                          0 
##       Vapour.MasterCompMoleFrac.12.C3diol. 
##                                          1 
##       Vapour.MasterCompMoleFrac.12C3Oxide. 
##                                          0 
##             Vapour.MasterCompMoleFrac.H2O. 
##                                          0 
##        Vapour.MasterCompMoleFrac.Methanol. 
##                                          0 
##        Vapour.MasterCompMoleFrac.Nitrogen. 
##                                          0 
##            ValveProduct.StdIdealLiqVolFlow 
##                                          0 
##                       Valve.Percentageopen 
##                                          0 
##                     VLV.102.Percentageopen 
##                                          0 
##                     VLV.100.Percentageopen 
##                                          0 
##                     VLV.101.Percentageopen 
##                                          0

There is NA values at Reactor.VesselPressure and Vapour.MasterCompMoleFrac.12.C3diol., Those values shall be removed from the data to avoid bias in data processing and modelling.

9.4 Missing Data Removal

TrainData <- TrainData %>% 
  na.omit()

9.5 Data Distribution Check

summary(TrainData)
##  Reactor.LiquidPercentLevel ReactorProds.Temperature
##  Min.   :47.22              Min.   : 33.84          
##  1st Qu.:86.97              1st Qu.: 43.33          
##  Median :87.37              Median : 43.40          
##  Mean   :86.30              Mean   : 50.75          
##  3rd Qu.:89.01              3rd Qu.: 44.83          
##  Max.   :92.81              Max.   :100.67          
##  ReactorProds.CompMoleFrac.12.C3diol. ReactorProds.LiquidVolumeFlow
##  Min.   :0.05824                      Min.   :  6.473              
##  1st Qu.:0.09356                      1st Qu.: 65.020              
##  Median :0.09422                      Median : 65.240              
##  Mean   :0.09967                      Mean   : 75.050              
##  3rd Qu.:0.09550                      3rd Qu.: 73.834              
##  Max.   :0.13979                      Max.   :493.593              
##  Coolant.HeatFlow    Reactor.VesselPressure WaterFeed.StdIdealLiqVolFlow
##  Min.   :-6.81e+08   Min.   : 13.03         Min.   : 49.14              
##  1st Qu.:-4.70e+08   1st Qu.:129.89         1st Qu.:491.29              
##  Median :-3.60e+08   Median :130.00         Median :491.29              
##  Mean   :-3.60e+08   Mean   :130.65         Mean   :554.19              
##  3rd Qu.:-2.73e+08   3rd Qu.:130.72         3rd Qu.:491.42              
##  Max.   : 3.60e+08   Max.   :145.05         Max.   :987.47              
##  PropOxide.StdIdealLiqVolFlow MakeUp.StdGasFlow
##  Min.   : 18.59               Min.   :   0.26  
##  1st Qu.:197.73               1st Qu.: 225.09  
##  Median :198.47               Median : 228.99  
##  Mean   :231.43               Mean   : 248.92  
##  3rd Qu.:299.33               3rd Qu.: 236.77  
##  Max.   :998.67               Max.   : 999.95  
##  ReactorProds.MasterCompMoleFrac.12C3Oxide.
##  Min.   :6.380e-07                         
##  1st Qu.:5.085e-03                         
##  Median :5.855e-03                         
##  Mean   :6.213e-03                         
##  3rd Qu.:8.458e-03                         
##  Max.   :1.208e-02                         
##  ReactorProds.MasterCompMoleFrac.H2O. ReactorProds.MasterCompMoleFrac.Methanol.
##  Min.   :0.8390                       Min.   :0.003659                         
##  1st Qu.:0.8911                       1st Qu.:0.005689                         
##  Median :0.8939                       Median :0.006026                         
##  Mean   :0.8877                       Mean   :0.006376                         
##  3rd Qu.:0.8997                       3rd Qu.:0.006187                         
##  Max.   :0.9356                       Max.   :0.009147                         
##  Vapour.StdGasFlow Vapour.MasterCompMoleFrac.12.C3diol.
##  Min.   : 86.01    Min.   :0.0010                      
##  1st Qu.:259.03    1st Qu.:0.5546                      
##  Median :262.19    Median :0.6133                      
##  Mean   :264.55    Mean   :0.5351                      
##  3rd Qu.:270.20    3rd Qu.:0.6681                      
##  Max.   :313.65    Max.   :0.9979                      
##  Vapour.MasterCompMoleFrac.12C3Oxide. Vapour.MasterCompMoleFrac.H2O.
##  Min.   :0.002462                     Min.   :0.03704               
##  1st Qu.:0.042801                     1st Qu.:0.05912               
##  Median :0.048712                     Median :0.06168               
##  Mean   :0.048252                     Mean   :0.12500               
##  3rd Qu.:0.072540                     3rd Qu.:0.06768               
##  Max.   :0.088666                     Max.   :0.73188               
##  Vapour.MasterCompMoleFrac.Methanol. Vapour.MasterCompMoleFrac.Nitrogen.
##  Min.   :0.001625                    Min.   :0.2385                     
##  1st Qu.:0.002929                    1st Qu.:0.8592                     
##  Median :0.003099                    Median :0.8660                     
##  Mean   :0.005299                    Mean   :0.8212                     
##  3rd Qu.:0.004072                    3rd Qu.:0.8876                     
##  Max.   :0.024973                    Max.   :0.9249                     
##  ValveProduct.StdIdealLiqVolFlow Valve.Percentageopen VLV.102.Percentageopen
##  Min.   :100.0                   Min.   :100.0        Min.   :50            
##  1st Qu.:639.2                   1st Qu.:434.7        1st Qu.:50            
##  Median :652.1                   Median :466.1        Median :50            
##  Mean   :593.8                   Mean   :527.0        Mean   :50            
##  3rd Qu.:675.3                   3rd Qu.:576.1        3rd Qu.:50            
##  Max.   :999.8                   Max.   :972.5        Max.   :50            
##  VLV.100.Percentageopen VLV.101.Percentageopen
##  Min.   :10.00          Min.   :  0.05        
##  1st Qu.:45.36          1st Qu.: 50.00        
##  Median :48.28          Median : 50.08        
##  Mean   :47.46          Mean   : 60.96        
##  3rd Qu.:49.90          3rd Qu.: 52.29        
##  Max.   :99.98          Max.   :349.00

Then we decide the predictor and the target. The predictor is :

  1. Reactor-LiquidPercentLevel [%]
  2. ReactorProds-Temperature [C]
  3. Reactor-VesselPressure [kPa]
  4. WaterFeed-StdIdealLiqVolFlow [m3/h]
  5. PropOxide-StdIdealLiqVolFlow [m3/h]
  6. MakeUp-StdGasFlow [STD_m3/h]

and, the target is :

  1. ReactorProds-CompMoleFrac(12-C3diol)
  2. ReactorProds-LiquidVolumeFlow [m3/h]
  3. Coolant-HeatFlow [kJ/h]
  4. ReactorProds-MasterCompMoleFrac(12C3Oxide)
  5. ReactorProds-MasterCompMoleFrac(H2O)
  6. ReactorProds-MasterCompMoleFrac(Methanol)
  7. Vapour-StdGasFlow [STD_m3/h]
  8. Vapour-MasterCompMoleFrac(12-C3diol)
  9. Vapour-MasterCompMoleFrac(12C3Oxide)
  10. Vapour-MasterCompMoleFrac(H2O)
  11. Vapour-MasterCompMoleFrac(Methanol)
  12. Vapour-MasterCompMoleFrac(Nitrogen)
  13. ValveProduct-StdIdealLiqVolFlow [m3/h]
  14. Valve-Percentageopen [%]
  15. VLV-102-Percentageopen [%]
  16. VLV-100-Percentageopen [%]
  17. VLV-101-Percentageopen [%]

Then there will be 17 models involven in this case.

9.6 Column Names and decriptions

colnames(TrainData)
##  [1] "Reactor.LiquidPercentLevel"                
##  [2] "ReactorProds.Temperature"                  
##  [3] "ReactorProds.CompMoleFrac.12.C3diol."      
##  [4] "ReactorProds.LiquidVolumeFlow"             
##  [5] "Coolant.HeatFlow"                          
##  [6] "Reactor.VesselPressure"                    
##  [7] "WaterFeed.StdIdealLiqVolFlow"              
##  [8] "PropOxide.StdIdealLiqVolFlow"              
##  [9] "MakeUp.StdGasFlow"                         
## [10] "ReactorProds.MasterCompMoleFrac.12C3Oxide."
## [11] "ReactorProds.MasterCompMoleFrac.H2O."      
## [12] "ReactorProds.MasterCompMoleFrac.Methanol." 
## [13] "Vapour.StdGasFlow"                         
## [14] "Vapour.MasterCompMoleFrac.12.C3diol."      
## [15] "Vapour.MasterCompMoleFrac.12C3Oxide."      
## [16] "Vapour.MasterCompMoleFrac.H2O."            
## [17] "Vapour.MasterCompMoleFrac.Methanol."       
## [18] "Vapour.MasterCompMoleFrac.Nitrogen."       
## [19] "ValveProduct.StdIdealLiqVolFlow"           
## [20] "Valve.Percentageopen"                      
## [21] "VLV.102.Percentageopen"                    
## [22] "VLV.100.Percentageopen"                    
## [23] "VLV.101.Percentageopen"

Reactor-LiquidPercentLevel [%] : is the percentage level of liquid in reactor.

ReactorProds-Temperature [C] : Temperature of liquid in reactor.

ReactorProds-CompMoleFrac(12-C3diol) : Mole Fraction of Propylene Glycol at Product Stream.

ReactorProds-LiquidVolumeFlow [m3/h] : Liquid Volume Flow of Product.

Coolant-HeatFlow [kJ/h] : Amount of Heat introduced/withdraw into reactor.

Reactor-VesselPressure [kPa] : Pressure in reactor.

WaterFeed-StdIdealLiqVolFlow [m3/h] : Liquid Volume flow of Water introduced into ractor.

PropOxide-StdIdealLiqVolFlow [m3/h] : Liquid Volume flow of Propylene Oxide introduced into reactor.

MakeUp-StdGasFlow [STD_m3/h] : Gas Nitrogen introduced into reactor to pressurized the reactor.

ReactorProds-MasterCompMoleFrac(12C3Oxide) : Mole Fraction of Propylene Oxide at Product Stream.

ReactorProds-MasterCompMoleFrac(H2O) : Mole Fraction of Water at Product Stream.

ReactorProds-MasterCompMoleFrac(Methanol) : Mole Fraction of Methanol at Product Stream.

Vapour-StdGasFlow [STD_m3/h] : Standard Gas flow out at Vapour Stream.

Vapour-MasterCompMoleFrac(12-C3diol) : Mole fraction of Propylene Glycol at Vapour Stream.

Vapour-MasterCompMoleFrac(12C3Oxide) : Mole fraction of Propylene Oxide at Vapour Stream.

Vapour-MasterCompMoleFrac(H2O) : Mole fraction of Water at Vapour Stream.

Vapour-MasterCompMoleFrac(Methanol) : Mole fraction of Methanol at Vapour Stream.

Vapour-MasterCompMoleFrac(Nitrogen) : Mole fraction of Nitrogen at Vapour Stream.

ValveProduct-StdIdealLiqVolFlow [m3/h] : Standard Ideal Volume Flow of Product out of Product Valve.

Valve-Percentageopen [%] : Valve Product stream Percentage Open.

VLV-102-Percentageopen [%] : Valve Vapour stream Percentage Open.

VLV-100-Percentageopen [%] : Valve Nitrogen stream Percentage Open.

VLV-101-Percentageopen [%] : Valve Water stream Percentage Open.

9.7 EDA Visualization

boxplot(TrainData$Reactor.LiquidPercentLevel)

boxplot(TrainData$ReactorProds.Temperature)

boxplot(TrainData$ReactorProds.CompMoleFrac.12.C3diol.)

boxplot(TrainData$ReactorProds.LiquidVolumeFlow)

boxplot(TrainData$Coolant.HeatFlow)

boxplot(TrainData$Reactor.VesselPressure)

boxplot(TrainData$WaterFeed.StdIdealLiqVolFlow)

boxplot(TrainData$PropOxide.StdIdealLiqVolFlow)

boxplot(TrainData$MakeUp.StdGasFlow)

boxplot(TrainData$ReactorProds.MasterCompMoleFrac.12C3Oxide.)

boxplot(TrainData$ReactorProds.MasterCompMoleFrac.H2O.)

boxplot(TrainData$ReactorProds.MasterCompMoleFrac.Methanol.)

boxplot(TrainData$Vapour.StdGasFlow)

boxplot(TrainData$Vapour.MasterCompMoleFrac.12.C3diol.)

boxplot(TrainData$Vapour.MasterCompMoleFrac.12C3Oxide.)

boxplot(TrainData$Vapour.MasterCompMoleFrac.H2O.)

boxplot(TrainData$Vapour.MasterCompMoleFrac.Methanol.)

boxplot(TrainData$Vapour.MasterCompMoleFrac.Nitrogen.)

boxplot(TrainData$ValveProduct.StdIdealLiqVolFlow)

boxplot(TrainData$Valve.Percentageopen)

boxplot(TrainData$VLV.102.Percentageopen)

boxplot(TrainData$VLV.100.Percentageopen)

boxplot(TrainData$VLV.101.Percentageopen)

ggcorr(TrainData, hjust = 0.75, size = 5, color = "grey50")