Exploring Alternatives To Create Digital Twins Fro
Exploring Alternatives To Create Digital Twins Fro
Exploring Alternatives To Create Digital Twins Fro
ARTICLE
ABSTRACT
In this work, Digital Twins based on Neural Networks for the steady state production of styrene were generated.
Thus, both the Aspen Technology AI Model Builder (alternative 1) and a homemade MS Excel VBA code connected
to Aspen HYSYS and Aspen Plus (alternative 2) were used with this same aim. The raw data used for generating the
Digital Twins were obtained from process simulations using Aspen HYSYS and/or Aspen Plus, which were connected
through a recycle-like stream via automation for solving the entire simulation flowsheet. Aspen HYSYS was used for
solving the pre-heating, reaction, and stabilization sections of the process whereas Aspen Plus ensured the computing
of the separation and purification columns. Both alternatives led to an excellent prediction showing the capability of
creating Digital Twins from and for process simulation.
Keywords: Digital Twin; Aspen Hybrid Model Builder; Aspen HYSYS; Aspen Plus; Automation; MS Excel-VBA
*CORRESPONDING AUTHOR:
Jaime Barbero-Sánchez, Department of Chemical Engineering, University of Castilla La Mancha, Avda. Camilo José Cela 12, Ciudad Real,
13071, Spain; Email: [email protected]
ARTICLE INFO
Received: 19 December 2023 | Revised: 10 January 2024 | Accepted: 12 January 2024 | Published Online: 19 January 2024
DOI: https://doi.org/10.30564/jcsr.v6i1.6168
CITATION
Barbero-Sánchez, J., Megía-Ortega, A., Ferro, V.R., et al., 2024. Exploring Alternatives to Create Digital Twins from and for Process Simulation.
Journal of Computer Science Research. 6(1): 16–30. DOI: https://doi.org/10.30564/jcsr.v6i1.6168
COPYRIGHT
Copyright © 2024 by the author(s). Published by Bilingual Publishing Group. This is an open access article under the Creative Commons Attribu-
tion-NonCommercial 4.0 International (CC BY-NC 4.0) License (https://creativecommons.org/licenses/by-nc/4.0/).
16
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
and process automation. Supervised learning, un- problem that allow the prediction of the desired out-
supervised learning, and reinforcement learning are put.
paradigms related to ML [4]. Specifically, supervised Recently, Aspen Technology Inc. has incorporated
Learning (SL) is a type of ML in which a model is into its products the AI Model Builder, which can gen-
constructed based on data that include the inputs (inde- erate Hybrid Models of processes and operations [18–22].
pendent variables) and known outputs (dependent vari- The models obtained this way can be deployed to the
ables) for a potentially large number of examples [1]. flowsheets at the process simulators Aspen Plus and
Digital Twins can provide digital copies of the Aspen HYSYS, allowing the performance of mass and
production lines while offering real-time process energy balances, sensitivity analyses, process optimiza-
monitoring, control, and optimization [5,6]. They estab- tions and other calculations of relevant significance in
lish feedback between real physical systems and the design and analysis at the process engineering step
digital model [7] and allow to simulation of the phys- of any project. Aspen Hybrid Models conveniently
ical systems more realistically [8]. To perform an ac- combine first principles and machine learning algo-
curate representation of a real system using a Digital rithms resulting in three types of them: those driven
Twin, as much information as possible is required [9]. by AI or by pure first principles and, finally, the re-
However, acquiring data is a challenging task [8]: a duced order ones.
multitude of sensor technologies based on the Inter- The pure first-principles models use theoretical
net of Things (IoT) exist, and which one to rely on equations and a limited set of empirical data to ob-
is a common source of concern; data acquired from tain their adjustable parameters. They generally ex-
sensors is not always reliable and is prone to noise trapolate well over a wide range of conditions. How-
and randomness; acquiring and validating data in a ever, they may not be available for all phenomena or
timely manner is a difficult task, etc. Consequently, operations of interest in the chemical industry and
some AI-based solutions must be addressed to avoid can be time-consuming to create and run.
these issues. Among them, one could consider the AI Hybrid Models have pure machine learning
following ones: data validation by utilizing ML clas- character. The data used for training them can pro-
sifiers to organize sensors as faulty; generation of ceed from plants or experiments. They need lots of
synthetic data to simulate the behavior of physical “good” data for training as already mentioned. If
systems which can later be utilized by ML models this condition is ensured, the model is accurate over
for testing purposes, etc. the range of operating conditions used for its train-
In other words, AI has opened a new dimension to ing. From this, it is evident that this kind of model
model and simulate chemical processes [3]. It has been may not extrapolate well or may violate physical
widely used as a tool for predictive analysis and has constraints which in several cases are difficult to
been successfully used to model processes includ- interpret. Positively it can stand out on these models
ing crystallization [10–13], adsorption, distillation [13], with two noticeable features: i) they may simulate
gasification [14], dry reforming [15] and filtration [16]. operations for which first-principles formulations
In chemical engineering industries and many ac- are not available or result very difficult to describe
ademic laboratories, AI is already in use, mostly in this way, and ii) they run very fast ensuring good
to monitor, predict and control the outcomes of convergencies within the overall process flowsheet.
unit operations [17]. To date, AI is most widely used Reduced order workflow is used to create an
in engineering to find the relationship between a de- empirical model based on data from numerous sim-
pendent variable and several independent variables ulation runs, where certain constraints are satisfied
through regression algorithms [17]. Alternatively, AI (e.g., mass balance). The creation of reduced order
can be built using classification or clustering algo- models follows two steps (Figure 1). Firstly, a case
rithms depending on the inputs available about the study on the process or operation is run, and second-
17
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
ly machine learning procedures are used to generate neuron, also called perceptron, is the single process-
a Neural Network (NN) by using the data obtained in ing unit that composes the Artificial NN and acts
the former step. Finally, the model is deployed in the as a transfer function of inputs to generate outputs.
simulation flowsheet as any other process or logical A feedforward network might contain at least one
operation. To fulfill this operational process, Aspen layer. After the network is built, it must be trained.
Technology has introduced two computational tools: The training process simply refers to the process of
i) the Aspen Multi-Case which takes advantage of repeatedly feeding the inputs and outputs, followed
the multicore architecture of modern CPUs to run a by adjusting the weights and biases using a suitable
lot of cases (in the order of thousands) in much less algorithm. The larger the data used for training, the
time than the original Case Study tool implemented greater the accuracy of the network. Once the net-
in Aspen HYSYS or the Sensitivity analysis availa- work is trained, it should be tested to predict the out-
ble in Aspen Plus, ii) the Aspen AI Model Builder, puts for new inputs.
a web-based service which allows the user creating As above mentioned, to demonstrate the capa-
NNs based on the data supply from plant operation, bility of Digital Twins as a surrogate of the physical
experiments or multi-case runs of rigorous process system, real and reliable data should be acquired,
simulations. which is not an easy task. Alternatively, the genera-
tion of valuable data that simulates the behavior of
that system can be used for configuring the Digital
Twin of the real process. However, the large number
of scenarios to be generated requires manually modi-
fying the same number of times a specific simulation
for accounting for results, using some tools like As-
pen Multi-Case as commented later to automate the
simulation process with third-party software.
Figure 1. Reduced order workflow used to create Hybrid Models In this work, the two alternatives mentioned will
according to the new AI resources implemented in the Aspen be applied to create Digital Twins of a well-known
Technology Process Engineering suite of programs.
chemical process: the production of styrene. To work
Aspen Technology’s products offer another inter- with a well-known process allowed the authors to
esting and confident way to create processes’ Digital focus on the development of both alternatives rath-
Twins. This latter one is supported by the automation er than on the process itself. Thus, both the Aspen
strategies, where the process simulators (Aspen Plus Technology AI Model Builder and an MS Excel
and/or Aspen HYSYS) can be linked to third-par- VBA code will be used with this aim. The conceptu-
ty codes built in MS Excel-VBA, Phyton, etc. In al and basic developments of the process reported by
this alternative, the NN is created and managed by Luyben [23] and Haydary [24] were taken as referenc-
third-party software, obtaining the process informa- es for the current process formulation. The Digital
tion from the simulators via automation. An advan- Twins here were developed to reflect the stationary
tage of this strategy is that the NN can be run by the operation of the styrene plant. Correspondingly, the
third-party software selected without requiring the input and output selected variables are mainly related
use of the process simulator. On the other hand, as to the operability and the controllability of the indus-
the NN is created by a user code, its configuration, trial process. The raw data used for generating the
structure, and other features can be freely manipulat- digital twins were obtained from process simulations
ed. using Aspen HYSYS and/or Aspen Plus. In the sec-
Artificial Neural Networks (Artificial NN) are ond alternative explored in this work and because of
commonly used in Supervised Learning. An artificial the specificities of the process simulators employed,
18
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
the interconnection of both, Aspen HYSYS and work, the adiabatic operation considered two reactor
Aspen Plus, was required for solving the entire sim- beds including an inter-bed heating (Figure 2).
ulation flowsheet i.e., Aspen HYSYS was used for Ethylbenzene conversions typically range from
solving the pre-heating, reaction, and stabilization 65% to 75%, with selectivity towards styrene be-
sections of the process meanwhile whereas Aspen ing between 93% and 97%. However, styrene and
Plus ensured the computing of the separation and pu- ethylbenzene have very similar boiling points, which
rification columns. The coupling of both simulators will require the use of distillation columns with many
was solved by the automation methodology through stages operating at high reflux ratios. This fact deter-
an MS Excel-VBA code. This way, a recycle-like mines that the separation and purification section of
stream emerged when connecting both programs the process is strongly energy-demanding being una-
which demanded a code for performing a direct iter- voidable in its exhaustive description, for which the
ation algorithm that fixed the internal recycle stream knowledge of the pressure profiles along the column
of the process. is critical. The reactor outlet mixture (Stream S8)
is cooled before further separation and purification.
2. Process description The heat released was used to generate high- and
low-pressure steam. The most volatile components
Styrene is an aromatic hydrocarbon derived are then separated into two flash drums. The liquid
from benzene which is obtained in the oil refining streams coming from these drums are conducted to
process [25]. There are different ways of producing a decanter, where two streams: aqueous and organic
styrene, the most widely used being the catalytic ones, are obtained. The latter one (Stream FT100)
dehydrogenation of ethylbenzene, which often takes was conducted to the separation and purification col-
place in the gas phase and requires an excess of wa- umn train which is composed of two distillation col-
ter vapor apart from the presence of solid catalysts, umns (T-100 and T-101). In the first column (T-100),
generally based on Fe2O3. This main reaction is ac- pure styrene was obtained at the bottom. This first
companied by several secondary reactions such as the column operated under vacuum conditions to avoid
pyrolysis of ethylbenzene to benzene and ethylene, undesired reactions such as styrene polymerization.
and the dealkylation of ethylbenzene to toluene and The top stream from this column is constituted by
methane. Two main technologies are commercialized a mixture of ethylbenzene and byproducts such as
to produce styrene: that developed by the German toluene and benzene. This mixture was conducted to
engineering BASF where the reactor operates near a second distillation column where the unconverted
isothermal conditions and the one proposed by the ethylbenzene was extracted from the bottoms with
American Dow Chemical in which the reactor oper- high purity and then recirculated to the conditioning
ates under a quasi-adiabatic regime [24]. In the current unit.
19
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
The two strategies considered in this work to cre- and the power supplied to the boiler.
ate a Digital Twin of the styrene process are mark- The initial values for the simulation convergence
edly different from the point of view of the compu- were taken from Haydary [24].
tational details. However, the specifications used to
define the process model are the same. All the calcu- 2.2 Input scenarios and response variables
lations were performed with the Aspen Plus and/or
Aspen HYSYS v12.1 and the corresponding version In this study, 6 input variables and 4 levels of var-
of the Aspen Multi-Case. iation for each one were considered resulting in 4096
scenarios. The selected input variables were the mass
flow rates of fresh steam entering the reaction unit,
2.1 Process model specifications
the top pressures of columns T-100 and T-101, and
The feed to the process (Table 1) consisted of the pressures of the cooling water streams (HP-H2O
pure ethylbenzene (Stream FRESH EB), steam and LP-H2O) yielding steam after passing through
(Stream STEAM1) and the recycled ethylbenzene the corresponding heat exchangers. A variation of the
stream coming (REC EB) from the bottom of the input variables of 2.5% above and below the values
second distillation column (T-101). These three reported in the reference simulations (Table S1) [24]
streams are mixed resulting in an effluent (S1) that was assumed. The narrowest of the variation inter-
was thermally conditioned in the heat exchange train vals for the input variables is consistent with the fact
(exchangers E-100 and E-101) which uses either the that the Digital Twin, as mentioned in the Introduc-
process fluid (S8 and S9). The conditioned mixture tion, is created to describe the stationary operation of
(S5) is fed to the reactions section which, as previ- the process.
ously mentioned, is composed of two tubular reac- The variables to be obtained by the Hybrid Mod-
tors operating adiabatically with inter-bed heating el (output variables) were: styrene mass flow rate
(E-102). Both reactors are similar in dimensions and (STYRENE), T-100 column reflux ratio, ethylben-
operating conditions. zene recirculation flow rate (REC EB), total ethylb-
Table 1 shows the input stream data to the reac- enzene conversion (%) at the outlet of the two re-
tion unit whereas Table 2 shows the reaction unit actors, total boiler power (HFE-100 and HFE-101),
decanter output current data, with stream S23 being T-100 column reboiler power, mass flow rate of the
the input to the separation unit (Figure 3). low pressure cooling water (LP-H2O), mass flow rate
The conditions and composition of the reactor of stream S17, H2 mole fraction in stream S17, mass
outlet mixture are given in Table 2. flow rate of the S24 stream (top stream in column
Columns T-100 and T-101 were specified by the T-100), mass flow rate of stream B/T (distillate from
purity of styrene and ethylbenzene, respectively, in the T-101 column, containing benzene and toluene),
the bottom streams (Table 3). The degree of freedom and mass flow rate of stream S22 (aqueous phase at
in both columns was completed with the reflux ratio the outlet of the decanter).
Table 1. Input streams data to the conditioning and reaction units.
Streams FRESH EB STEAM1 STEAM2 LP-H2O HP-H2O
Vapor fraction 0 1 1 1 1
Temperature [°C] 20.0 120.0 133.5 20.0 20.0
Pressure [kPa] 180 180 300 180 300
Mass flow [kg/h] 5308 1856 13721 704 4143
Mole Fractions
E-Benzene 1 0 0 0 0
Water 0 1 1 1 1
20
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
2.3 Alternative 1. Using the Aspen Technology network whereas the remainder ones were used for
AI Model Builder its validation. Other percentages were tested aiming
to improve the network capability without observing
In this alternative, the Aspen Multi-Case launched significant improvements of the results.
from an Aspen Plus model of the process was used The model created was deployed to the process
to generate massive results in the process (Para- simulator as “sensor” according to the nomenclature
graph 2.2). The property model Peng Robinson was adopted in this application. Correspondingly, only
used to estimate the fluid properties. Further, the the sensor is necessary to calculate the response
Aspen AI Model Builder was used to generate the variables. No connections between process units or
NN. Finally, the Hybrid Model was deployed to the sections are permitted for the sensors.
simulation flowsheet as a sensor (Figure 1). In the
current version of the Aspen AI Model Builder, the
2.4 Alternative 2. Using the MS Excel-VBA
Lasso regression algorithm [26] was used to create the
automation of Aspen HYSYS and Aspen Plus
NNs. The process was repeated several times trying
to generate the neural network
to improve the quality of the NN generated. As part
of this improvement, non-linear terms were included Aspen HYSYS was chosen for calculating the
for certain variables when no good regressions were feed conditioning and reaction sections as well as
obtained with the linear ones. As recommended, the cooling of the gases overcoming the reactor and
80% of the original data was used to train the neural their separation. Meanwhile, the columns were com-
21
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
puted in Aspen Plus. This decision is determined by Plus. Once the simulation is converged, the corre-
the fact that updating the information related to the sponding results obtained for stream REB in Aspen
column pressure profile in automated calculations, Plus were compared to the input values of stream
like sensitivity analyses, is a key factor in the current REC EB in Aspen HYSYS through a VBA code. If
work. It significantly impacts the correct prediction relative errors were higher than 10-4 (tolerance), the
of both the temperature at the bottom and the reboil- values of stream REB computed with Aspen Plus
er duties. In Aspen Plus this functionality is fully were transferred to REC EB in Aspen HYSYS. The
integrated into the internal analysis calculations. process was repeated until the relative errors were
However, in Aspen HYSYS is possible to export the lower than the tolerance.
pressure profile in an individual calculation, but not Once the case study calculations were complete,
automatically when case studies are performed. The the output variables produced by the coupled simula-
Peng Robinson equation from the Aspen Properties tions were captured through another VBA subroutine
was selected as the property model in both programs and transferred to a third one which was responsible
for predicting the fluid properties. for creating the Neural Network.
Integrating Aspen HYSYS and Aspen Plus in a
single simulation demands continuous and bilateral 2.5 Neural network training
information transference between both programs. Levenberg-Marquardt algorithm [27] coupled with
This issue was solved here by connecting both pro- an ANOVA analysis was used for training the net-
grams through a homemade MS Excel-VBA appli- work [28]. This algorithm has been also proposed for
cation specially programmed for this purpose. It also predictive inferential control of distillation. It was
solved the algebraic loop related to the ethylbenzene built in an MS Excel-VBA application which was
recycle (Figure 3). Thus, the subroutine used to con- sensitive to both the number of layers, the number of
verge the corresponding tear stream was included in neurons in each hidden layer and the propagation or
the MS Excel-VBA code. In practice, the connection active function used in each layer. Pearson’s ratio co-
between simulators was made through the stream efficient, r, defined similarly to the correlation index
REB in Aspen Plus and the stream REC EB in As- used in linear regressions, was also computed.
pen HYSYS, and streams S23 in both simulators. To generate a consistent neural network, the data
When a new scenario must be computed, the MS generated by the process simulations were randomly
Excel-VBA application sends an initial estimation divided into two groups: 80% of the data obtained
of stream REC EB to Aspen HYSYS. After reaching were used for training the neural network, and 20%
the convergence, the information of stream S23 in were used for its validation. This percentage is the
Aspen HYSYS is transferred to stream S23 in Aspen same as that used by the Aspen AI Model Builder.
Figure 3. Combined Aspen HYSYS and Aspen Plus simulation flowsheet used in the second alternative explored in the current work
to generate the data needed for training the Neural Network.
22
distillation.
number ofIt layers, the in
was built an MS
number of Excel-VBA application
neurons in each hidden which wasthe
layer and sensitive to both
propagation the
or active
number of layers,
function used inthe number
each layer. of neurons ratio
Pearson’s in each hidden
Linear:layer
coefficient, =and
the
r,defined propagation
similarly to theorcorrelation
active
function
index used used in inlinear
each regressions,
layer. Pearson’s was also coefficient, r, defined similarly to the correlation
ratiocomputed.
1
Journal of Computer Science Research | Volume 06 | Log-Sigmoid: Issue 01 | January2024 = 1+−
index used in linear regressions, was also computed.
To generate a consistent neural network, the data generated by the process simulations were
In this work, agenerate
Torandomlymultilayer perceptronneural
a consistent was consid-network,
divided into two groups: 80%the of data
the datagenerated
obtained
Polynomial: bywere
the
process
used
= for simulations
training thewere neural
ered. It was composed of an input layer, an output
randomly
network, divided
and 20% into two
wereThe groups:
usedconnec- 80% of the data obtained were used for
for its validation. This percentage is the same as that used by training the neural
layer and one or more hidden layers. (4) the
tions betweennetwork,Aspen and
neurons AI 20%
from were
goModel Builder.
the used forofitsone
neurons validation. This percentage is the same as that used by the
where i ranges from 1 to the total number of neurons
Aspen AI
layer to the neurons of Model
the next, Builder.
with no possibility in layer-1.
In this work, a multilayer perceptron was considered. It was composed of an input layer, an
of feedback (non-recurrent Neural Network). Ac- For the training procedure, the number of layers
In output
this work, layeraonly multilayer
and one orperceptron
more from hidden waslayers.
considered. It was composed
The connections between of neurons
an input go layer,
fromanthe
cordingly, information will be transferred and the number of neurons in each of the layers must
the input layeroutput the layer
toneurons ofand
output layer.
one one
layerortomore hidden of
the neurons layers.
the The with
next,
be established.connections
no between
possibility
The number of neurons
neurons go
feedback from the
in(non-recurrent
the input
The processing
neurons
NeuralunitofNetwork).
isone
characterized to thebyneurons
layer Accordingly, a weight- of thelayer
information next,will
iswith
fixednoby
only possibility
be the number
transferred of from
feedback
of input (non-recurrent
variables
the input layerthat
to the
ed sum of inputsNeural (p ), an output (a
i Network). Accordingly, j) and weights (w
information
ij). constitute the independent variables.
will only be transferred from the input layer to the The number
output layer.
The scalar input of a specific single neuron (pi) in of neurons in the output layer is similarly fixed by
output layer.
a layer of neuron The is processing
multiplied unit by the scalar weightby athe
is characterized numbersum
weighted of output
of inputs variables that constitute
(pi), an output the
(aj) and weights
(wij) to form w ijpi, processing
dependent variables. Finally, the number of hidden
The (wijone of the
). The scalarterms
unit is that
input ofis asent
characterized to the
specific bysingle
a weighted
neuron sum(piof
) ininputs
a layer(pi),ofan outputis(amultiplied
neuron j) and weights by the
[29]
summer . The other input (1) is multiplied by a layers and the neurons defined in each layer will
). Theweight
(wijscalar scalar (w input of a specific single neuron (pi) inisa sent
ij) to form wijpi, one of the terms that
layertooftheneuron
summer is multiplied
[29]
. The by the
other input
bias (bi) and then added to the total sum. The weight determine the learning capacity [29] of the neural net-
scalar is weight (wij) tobyform wijp(bi,i)one of thework.
terms Table
that is 4total
sent to the summer .associated
The other inputthe
associated with (1) multiplied
the connection froma unit bias i to and unit then
j added to the showssum. The
the weight neural
different with
networks
and the bias (1) iscontinuously
multiplied
areconnection frombymodified
aunitbiasi (b i)unit
and jthen
toduring andadded
the thatbias
the were areevaluated,
to the total sum.asThe
continuously well as theassociated
weight
modified number
during the ofwith
layers
the
learning
connection from(b unit i(bto unit j referred
and and
to asthetobias the number
arenet of
continuously neurons belonging to each layer.
learning process. The output
process. The i), often
output i),referred
often as the input, goes modified during
into a transfer the learning
function (f) which
Table 5 also displays the nomenclature used to iden-
the net input,process.
goes into Thea transfer
output (bfunction (f)
), oftenoutput whichto as the net input, goes into a transfer function (f) which
referred
produces the scalar ineuron (ai). This
tify way:
the NNs. Thus, 7•P-3•P-2•L-14 means a neural
produces the scalar neuron output (ai). This way:
produces the scalar neuron output (ai). Thisnetwork way: with three layers. The first received seven
= +
=1 inputs (independent variables) connected with three (1)
= =1 + (1) neurons (polynomial function transfer) yielding (1)three
Three transfer functions were considered:
outputs. The second one took the three outputs of
Three transfer
Three functions
transfer werefunctionsconsidered:were considered: the first layer which are conducted to the other two
Linear:
Linear: =a = n (2)
j j neurons (polynomial function transfer) yielding two
Linear: = (2) (2)
1 outputs. Finally, the third layer took these two out-
Log-Sigmoid: = 1+− (3)
1 puts which were conducted to fourteen linear neu-
Log-Sigmoid: = 1+− (3)
rons yielding the same number of outputs (dependent
Polynomial: = (3) variables). (4)
Polynomial: = (4)
Table 4. Neural networks tested. In all the cases the same 7 input and 14 output variables were considered.
Neural Network Name Layers Hidden Neural Networks Type of Neural Network Type of Output Neural Network
7•S-1•L-14 3 1 Sigmoidal Lineal
7•S-2•L-14 3 2 Sigmoidal Lineal
7•S-3•L-14 3 3 Sigmoidal Lineal
7•P-1•L-14 3 1 Polynomial Lineal
7•P-2•L-14 3 2 Polynomial Lineal
7•P-3•L-14 3 3 Polynomial Lineal
7•P-3•P-1•L-14 4 4 Polynomial Lineal
7•P-3•P-2•L-14 4 5 Polynomial Lineal
23
7•S-3•L-147•P-1•L-14
3 3 1
Sigmoidal Polynomial
Lineal Lineal
7•P-1•L-147•P-2•L-14
3 31 Polynomial
2 Lineal
Polynomial Lineal
7•P-2•L-14 3
7•P-3•L-14 32 Polynomial
3 Lineal
Polynomial Lineal
7•P-3•L-14 3 3 Polynomial Lineal
7•P-3•P-1•L-14
7•P-3•P-1•L-14 4 44 Journal of Computer
4 Polynomial
Polynomial Science Research Lineal
Lineal| Volume 06 | Issue 01 | January 2024
7•P-3•P-2•L-14
7•P-3•P-2•L-14 4 45 5
Polynomial Polynomial
Lineal Lineal
The training process consists of minimizing displays the correlation between the reflux ratio cal-
The training process consists of minimizing2 the following function, 2, by nonlinear regression2
theThefollowing function,
training process c , ofbyminimizing
consists nonlineartheregression culated
following function, by nonlinear
, by the rigorous process model computed by
regression
through the Levenberg-Marquardt algorithm:
through
throughthe
the Levenberg-Marquardt
Levenberg-Marquardt algorithm:algorithm: Aspen Plus and those predicted by the Hybrid Model
2
2 =
−
2
+
−
(5)
HM-100 for
2
column T-100.
=1 =1 =1
2 =1
2 = −
+ − (5)
=1 =1 (5)
=1
where yik and is the output variable k for the scenario i obtained by the automation process
=1
Process Variable R2 Q2
B/T.mass flow 0.993 0.993
S28.mass flow 0.993 0.993
Fresh EB.mass flow 1 1
HP-H2O.mass flow 1 1
Figure 4. Block diagram of the process of generation of the HP-Steam.mass flow 1 1
Digital Twin for alternative 2: automation strategy. LP-H2O.mass flow 0.996 0.996
LP-Steam.mass flow 0.996 0.996
S17.mass flow 0.993 0.993
3. Results and discussion S20.mass flow 1 1
S22.mass flow 1 1
3.1 Aspen Hybrid Model S5. temperature 0.995 0.994
LP-H2O.pressure 0.998 0.997
The Reduced Order Hybrid Model obtained by
Total conversion EB 0.993 0.993
the procedure described previously (Figure 1) was
STEAM1.mass flow 1 1
deployed in a new Aspen HYSYS case (Figure 5).
STEAM2.mass flow 1 1
Table 5 shows the statistics of the best model
Styrene.mass flow 0.993 0.992
attained for the 12 output variables selected to de-
scribe the process performance. Both the reproduci- Table 5 and Figure 6 show that the Hybrid Mod-
bility (R2) and the predictability (Q2) are higher than el accurately reproduce the results obtained by the
0.990 for all the variables. As an example, Figure 6 rigorous Aspen Plus model of the process. In fact,
24
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
for the conjunct of all the output variables selected, 3.2 MS Excel-VBA supported Hybrid Model
the mean relative error was lower than 1%.
Table 6 shows the parameters calculated for each
of the Neural Networks tested, the χ2 value, the mean
error (%) and Pearson’s r correlation index.
The total number of parameters optimized de-
pends on the number of neurons considered. The
Neural Network that best fit the data generated using
the automation methodology (lower χ2 value and r
value closer to 1) was the one that considered 3 pol-
ynomial neurons in layer 1, 2 polynomial neurons
in layer 2 and 14 linear neurons in the output layer
(7•6-3•6-2•7-14). Figure 7 shows the architecture of
the selected Neural Network, the numerical value of
all the adjusted parameters and the transfer function
considered for each neuron.
Figure 6. T-100 reflux ratio predicted by the Hybrid Model vs.
Once the most appropriate neural network was
those rigorously computed by the full process model in Aspen selected, it was validated with 20% of the total sce-
Plus. All the 4096 cases calculated are included in the graphic. narios generated by automation. Table 7 shows the
statistics of the best model attained for the output
Relevant results are the differences in time for variables selected. Both the reproducibility (R2) and
executing the 4096 cases using the rigorous Aspen the predictability (Q2) are higher than 0.990 for all
Plus model and the Hybrid Model. Using the same the variables. In Figure 8, the output variables es-
machine, for the first one 516 minutes were required, timated by the chosen Neural Network are plotted
whereas the second one demanded only 3 minutes. against the same variables obtained by the rigorous
The Aspen Multi-case required 42 minutes employ- calculations with Aspen HYSYS and Aspen Plus
ing 4 parallel runs and 16 CPUs of an I5 computer linked by the automation methodology shown in
processing unit. Figure 3.
Table 6. Results of the nonlinear regression process for the different NN tested in this work. Alternative 2: automation strategy.
25
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
Figure 7. Neuronal Network selected (7•6-3•6-2•7-14). This NN consisted of three layers. The first received seven inputs connected
with three neurons yielding three outputs. The second one took the three outputs of the first layer yielding two outputs. Finally, the
third layer took these outputs yielding twelve outputs.
26
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
Table 7. Reproducibility and predictability coefficients of the regressions supported by the Hybrid Model HM-100 obtained by the
automation strategy.
Process Variable R2 Q2
Styrene flowrate 1.000 1.000
Reflux ratio 1.000 1.000
Total EB conversion 0.999 0.999
H2 mole fraction on S17 0.995 0.995
Recycle EB flowrate 0.999 0.999
Power heaters 1.000 1.000
T-100 reboiler duty 0.997 0.997
LP-steam flowrate 1.000 1.000
S17 flowrate 0.999 0.999
B/T flowrate 0.990 0.990
S24 flowrate 0.999 0.999
S22 flowrate 1.000 1.000
Figure 8. Validation of the Neural Network. a) styrene stream flow rate; b) S22 stream flow rate, c) recirculation stream flow rate
(bottom flow rate of T-101); d) low pressure steam stream flow rate; e) S24 stream flow rate (gas flow rate of T-100); f ) S17 stream
flow rate; g) B/T stream flow rate (distillate flow rate of T-101); h) reflux ratio of T-100; i) total EB conversion; j) hydrogen purity of
S17 stream; k) furnace power; l) T-100 boiler consumption.
27
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
Similarly, to that observed with the Aspen Hybrid process are available in the bibliography. However,
Model, an excellent prediction was achieved with the the results obtained are in an Excel spreadsheet that
Neural Network selected. This NN can be considered can be requested from the authors.
representative as a Digital Twin of the whole process
of styrene production. Acknowledgments
V.R.F. thanks to the Aspen Technology Inc. the
4. Conclusions possibility to participate in the training course “EHM
Both the Aspen Technology AI Model Builder and 101: Introduction to Aspen Hybrid Models for En-
a MS Excel VBA code were successfully used for gineering”, where, during the trial time available for
generating a Digital Twins based on a Neural Network AIMB he carried out the case presented in the cur-
to describe the steady state production of styrene. rent paper.
The raw data used for generating the Digital Twins
were obtained from process simulations using Aspen References
HYSYS and/or Aspen Plus. The interconnection of
both, Aspen HYSYS and Aspen Plus, via Automation [1] Lee, J., Davari, H., Singh, J., et al., 2018.
was required for solving the entire simulation flow- Industrial Artificial Intelligence for industry
sheet when the second alternative was considered. 4.0-based manufacturing systems. Manufactur-
In this case, Aspen HYSYS was used for solving the ing Letters. 18, 20–23.
pre-heating, reaction, and stabilization sections of the DOI: https://doi.org/10.1016/j.mfglet.2018.09.002
process meanwhile whereas Aspen Plus ensured the [2] Jan, Z., Verma, B., 2020. Multicluster
computing of the separation and purification columns. class-balanced ensemble. IEEE Transactions
Both procedures led to excellent predictions. on Neural Networks and Learning Systems.
32(3), 1014–1025.
DOI: https://doi.org/10.1109/TNNLS.2020.2979839
Authors Contributions
[3] Feise, H.J., Schaer, E., 2021. Mastering dig-
This work was done jointly by all authors. Alicia itized chemical engineering. Education for
Megía and Jaime Barbero prepared the simulations. Chemical Engineers. 34, 78–86.
Jaime Babero wrote the manuscript. Víctor Ferro DOI: https://doi.org/10.1016/j.ece.2020.11.011
developed the Aspen Hybrid Model. Jose Luis Val- [4] Murphy, K.P., 2012. Machine learning: A prob-
verde developed the Neural Network on Microsoft abilistic perspective. MIT Press: Cambridge.
Office Excel. Víctor Ferro and Jose Luis Valverde [5] Mashaly, M., 2021. Connecting the twins: A re-
coordinated the whole study, the manuscript review view on digital twin technology & its network-
and revision. Jaime Barbero and Alicia Megía coor- ing requirements. Procedia Computer Science.
dinated the data interpretation and result discussion. 184, 299–305.
DOI: https://doi.org/10.1016/j.procs.2021.03.039
Conflict of Interests [6] Rojek, I., Macko, M., Mikołajewski, D., et al.,
2021. Modern methods in the field of machine
The authors declare that the research was con-
modelling and simulation as a research and
ducted in the absence of any commercial or financial
practical issue related to Industry 4.0. Bulletin
relationships that could be construed as a potential
of the Polish Academy of Sciences. Technical
conflict of interest.
Sciences. 69(2), e136717.
DOI: https://doi.org/10.24425/bpasts.2021.136717
Data Availability Statement [7] Hehenberger, P., Bradley, D., 2016. Mechatron-
The authors declared that all data on the styrene ic futures: Challenges and solutions for mecha-
28
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
tronic systems and their designers. Springer: et al., 2018. Dynamic optimization of dry re-
Berlin. former under catalyst sintering using neural
[8] Cheng, J., Zhang, H., Tao, F., et al., 2020. DT- networks. Energy Conversion and Manage-
II: Digital twin enhanced Industrial Internet ment. 157, 146–156.
reference framework towards smart manu- DOI: https://doi.org/10.1016/j.enconman.
facturing. Robotics and Computer-Integrated 2017.11.089
Manufacturing. 62, 101881. [16] Bagheri, M., Akbari, A., Mirbagheri, S.A.,
DOI: https://doi.org/10.1016/j.rcim.2019.101881 2019. Advanced control of membrane fouling
[9] Madni, A.M., Madni, C.C., Lucero, S.D., 2019. in filtration systems using artificial intelligence
Leveraging digital twin technology in mod- and machine learning techniques: A critical
el-based systems engineering. Systems. 7(1), 7. review. Process Safety and Environmental Pro-
DOI: https://doi.org/10.3390/systems7010007 tection. 123, 229–252.
[10] Damour, C., Benne, M., Grondin-Perez, B., DOI: https://doi.org/10.1016/j.psep.2019.01.013
et al., 2010. Nonlinear predictive control based [17] Kakkar, S., Kwapinski, W., Howard, C.A., et
on artificial neural network model for industri- al., 2021. Deep neural networks in chemical
al crystallization. Journal of Food Engineering. engineering classrooms to accurately model
99(2), 225–231. adsorption equilibrium data. Education for
DOI: https://doi.org/10.1016/j.jfoodeng.2010.02.027 Chemical Engineers. 36, 115–127.
[11] Velásco-Mejía, A., Vallejo-Becerra, V., Chávez- DOI: https://doi.org/10.1016/j.ece.2021.04.003
Ramírez, A.U., et al., 2016. Modeling and op- [18] Digital Twins: Essential to Driving Sustainable
timization of a pharmaceutical crystallization Operations for Chemical Producers [Internet].
process by using neural networks and genetic Aspen Technology Inc.; 2021. Available from:
algorithms. Powder Technology. 292, 122–128. https://www.aspentech.com/-/media/aspentech/
DOI: https://doi.org/10.1016/j.powtec.2016.01.028 home/resources/white-papers/pdfs/fy22/q2/
[12] Yang, M., Wei, H., 2006. Application of a neu- at-07361-wp-digitaltwins_final.pdf
ral network for the prediction of crystallization [19] Course EHM101: Introduction to Aspen Hy-
kinetics. Industrial & Engineering Chemistry brid Models for Engineering [Internet]. As-
Research. 45(1), 70–75. pen Technology Inc.; 2020. Available from:
DOI: https://doi.org/10.1021/ie0487944 https://esupport.aspentech.com/University-
[13] Singh, V., Gupta, I., Gupta, H.O., 2007. ANN- Course?Id=a3p4P000000Y4WVQA0
based estimator for distillation using Lev- [20] Hybrid Modeling: AI and Domain Expertise
enberg-Marquardt approach. Engineering Combine to Optimize Assets [Internet]. As-
Applications of Artificial Intelligence. 20(2), pen Technology Inc.; 2020. Available from:
249–259. http://www.bluesp.co.za/wp-content/up-
DOI: https://doi.org/10.1016/j.engappai. loads/2021/02/AT-06425_POV_Hybrid_Mod-
2006.06.017 eling.pdf
[14] Pandey, D.S., Das, S., Pan, I., et al., 2016. [21] Aspen Hybrid Models V12.1 [Internet]. Aspen
Artificial neural network based modelling ap- Technology Inc.; 2020. Available from: https://
proach for municipal solid waste gasification in www.aspentech.com/-/media/aspentech/home/
a fluidized bed reactor. Waste Management. 58, resources/faq-documents/pdfs/fy22/q2/at-
202–213. 06496-hybrid-models-customer-faq.pdf?sc_
D O I : https://doi.org/10.1016/j.wasman. lang=en
2016.08.023 [22] Aspen Hybrid Models: The Next Generation
[15] Azzam, M., Aramouni, N.A.K., Ahmad, M.N., of Process Simulation Technology [Internet].
29
Journal of Computer Science Research | Volume 06 | Issue 01 | January 2024
30