scieee AI-readable full text Open interactive document viewer

Real-time reconciled simulation as decision support tool for process operation

Galán, Aníbal,Prada Moraga, César de,Gutiérrez Rodríguez, Gloria,Sarabia, Daniel,González, Rafael

Abstract

Producción Científica

Full text

Journal of Process Control 100 (2021) 41–64 Contents lists available at ScienceDirect Journal of Process Control journal homepage: www.elsevier.com/locate/jprocont Real-time reconciled simulation as decision support tool for process operation Anibal Galan a,b,∗, Cesar De Prada a,b, Gloria Gutierrez a,b, Daniel Sarabia b,c, Rafael Gonzalez d aDepartment of Systems Engineering and Automatic Control, School of Industrial Engineering, University of Valladolid, Dr. Mergelina, s/n, 47011, Valladolid, Spain bInstitute of Sustainable Processes, University of Valladolid, Dr. Mergelina, s/n, 47011, Valladolid, Spain cDepartment of Electromechanical Engineering, Escuela Politécnica Superior, University of Burgos, Avda. Cantabria, s/n, 09006, Burgos, Spain dDepartamento Optimización y Control, Petróleos del Norte S.A., San Martín 5, 48550, Muskiz, Spain article info Article history: Received 16 July 2020 Received in revised form 19 January 2021 Accepted 20 February 2021 Available online 18 March 2021 Keywords: Real-time reconciled simulation Process change of condition Refinery hydrogen networks Operation decision support MHE abstract Decision support tools in the process industry have been gaining relevance, especially for operation under uncertain conditions. This study describes real-time reconciled simulation (RTRS), and analyzes its usefulness as decision-making tool for process operators, especially under unexpected process changes. The proposed methodology is implemented in two case studies in the context of an oil refinery hydrogen network, where both plant and network levels are considered. A what-if analysis is conducted on two case studies, assessing two feasible mitigation actions for each case baseline condition. The focus of the discussion is, nevertheless, on the methodology itself and its general features as decision support tool. The relative error of RTRS for estimation of states and parameters, considering unmeasured disturbances, is satisfactory aligned with industrial standards for online measurements. In terms of mitigation actions, these are assessed with regards to its economic impact on the system in question. It is shown how actions at plant level may be disadvantageous when facing hydrogen demand changes, compared to network-wide mitigation actions. At plant level, it is pointed out the importance of purification units, prevailing over hydrogen make-up for mitigation of demand change. It is highlighted the fact that RTRS complements in a straightforward manner other control operation tools such as model predictive controllers (MPC) and real-time optimizers (RTO). Therefore, it may add to any decision support framework an open-loop component with parameter estimation and forecasting capabilities. Moreover, its potential for training and integration within other tools packages is discussed. Future directions of research are commented such as fully integrated decision support frameworks, including RTRS, MPC and RTO. Additionally, how RTRS may relate to digital twins, including an example of a suitable architecture is introduced, and RTRS role in enterprise-wide decision-making solutions is commented. ©2021 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). 1. Introduction It is well known that process plants are subjected to increasing pressures generated by globalization, increasing competition, environmental regulations, etc. that call for improving energy efficiency, product quality, operation cost, respect to the environment and waste generation, and so on. In order to fulfill these aims, companies, besides introducing new processes and revamps, are forced to enhance the way they operate their assets and the way they make decisions about ∗Corresponding author at: Department of Systems Engineering and Automatic Control, School of Industrial Engineering, University of Valladolid, Dr. Mergelina, s/n, 47011, Valladolid, Spain. E-mail address: [email protected] (A. Galan). production at different levels. As a result, many new technologies had or are being introduced which form what is known as the ‘‘automation pyramid’’ represented in Fig. 1. From the point of view of operation, Manufacturing Execution Systems (MES), Supervision and Advanced Control, and Basic Control layers play a key role. MES are made up of a set of applications of different nature oriented to production operations management, maintenance, process statistics, quality control and key performance indicators (KPI) management, etc. In batch plants, operation scheduling is in the core of MES, while in continuous ones Real Time Optimization (RTO) applications occupy this place. RTO systems have the function of deciding or recommending the values of the most significant process variables of the production units so that a certain economic cost function is minimized while process and operation constraints are satisfied. This is done https://doi.org/10.1016/j.jprocont.2021.02.003 0959-1524/©2021 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Abbreviations AC&O Advanced control and optimization BL Baseline CM Condition monitoring CRO Control room operator CV Controlled variable DAE Differential–algebraic equations system DCN Distributed control node DCS Distributed control system dll Dynamic-link library DM Dynamic model DR Data reconciliation DS Dynamic process system DST Decision support tool DSF Decision support framework EC European Commission ERP Enterprise resource planning EOO Equation and obejct oriented FG Fuel gas FGH Fuel gas header FPE First-principle equations FPM First principle models HAZOP Hazardous operations studies HC Hydrocarbon HDS Hydrodesulfurization HDSLib Hydrogen dynamic simulation library HPH High purity header HPS High pressure separator HS Hydrogen source In Online measurements ISOPE Integrated system optimization and parameter estimation IVP Initial value problem KPI Key performance indicators LHS Reactor load heating subsystem LPH Low purity header LPS Low pressure separator MES Manufacturing execution systems MHE Moving horizon estimation MPC Model predictive control MU Make-up MV Manipulated variable NLP Nonlinear programming PHD Process historian server PROOSIS Propulsion object-oriented simulation software PSE Process systems engineering PV Process value REI Resource efficiency indicator RTO Real-time optimization RTRS Real-time reconciled simulation SP Set point WiA What-if analysis solving periodically an optimization problem (NLP) of the type: minuJ(x,u) h(x,u) =0 g(x,u) ≤0 (1) Fig. 1. Automation pyramid. RTO: real-time optimization. MPC: model predictive control. Where Jrepresents the cost function to be minimized, uare decision variables that corresponds to the degrees of freedom of the process, xare process variables, his a suitable process model and gare process constraints. The model normally is formulated in steady state and is updated regularly using process measurements. Normally, recognizing that plant measurements may be distorted by noise or biases, a data reconciliation module is added as a way of estimating better values of plant variables and model parameters. In many cases, since the RTO problem is formulated in steady state, a steady-state detector is added to the scheme, as well as a data treatment module to take care of gross-errors or outliers [1], as depicted in Fig. 2. This generates targets for the next level, providing the best feasible steady state where the plant should operate in order to optimize the cost function J(u,x). These targets are often implemented as set points of Model Predictive Controllers (MPC). As it is well known, MPC utilizes a dynamic model to predict future controlled variables behavior as a function of moves of the manipulated ones, and chooses the best actions that minimize an error function of the predictions with respect to the targets. These actions computed at regular times by the MPC layer are normally implemented in the field by means of single control loops (e.g.: flow, level and temperature) of a Distributed Control System (DCS) installed in the control room, used by operators and technical personnel to deal directly with the process. In practice, this scheme is implemented in different ways according to the particularities of the plant considered, but it provides a good framework to discuss current challenges faced by the operation of large process plants. The above mentioned tools have provided clear operational advantages and helped to maintain the stability of the plants and improve its performance. There are many successful examples of industrial implementations of these technologies. However, the fact that RTO models are based on steady-state behavior, limits its actual use in complex process plants where steady-state conditions may rarely be reached for long periods of time, which presents another difficulty for actual implementation of RTOs in industry. In general, this may be worked around by changing the scope of the RTO in such a way that time at steady-state conditions is more likely in the long run, however this may leave out of scope some key process 42 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 2. Information flow around RTO tools, including the typical architecture of an RTO and its information exchange with Planning and Scheduling (upper hierarchical level) and NMPC modules (lower hierarchical level), and process data updates. CV: controlled variables. SP: set-points. DCS: distributed control system. PV: process values. KPI: key performance indicator. REI: resource efficiency indicator. variables which is certainly disadvantageous to say the least. Hence, defining the scope of the RTO is critical for succeeding and requires significant knowledge of the process (or support from those who are subject matter experts of units related to the RTO) and good judgment to understand the trade-offs of larger scopes vs smaller scopes. Additionally, it is important to keep in mind that, first, quite often they operate more or less independently using different models not always coherent, which sometimes generates problems and reduces the benefits it could bring and, second, they deal with only some, but not all, the decisions that daily operation requires. The first point refers not only to the use of different models in the RTO and MPC layers, quite often static, nonlinear and based on first principles in RTO, and dynamic, linear and data based in MPC, but also to the different time scales they operate, hours in RTO, minutes in MPC. Often, different company departments are responsible for their operation and maintenance, which leads to additional incoherence between models. This calls for an effective integration of levels, in particular between RTO and MPC [2,3]. Several proposals have been made in the literature, of which economic MPC (EMPC) is perhaps the best known [4–6]. EMPC uses directly an economic target in the controller instead of a quadratic error function with respect to set points and may incorporate a dynamic nonlinear process model, solving many of the above mentioned integration problems. Nevertheless, its use in large scale processes is not realistic, due to the size and complexity of the resulting dynamic optimization problem that must be solved on-line in a safe and consistent way. Integration of RTO and enterprise resource planning (ERP) tools is also an important topic but out of the focus of this paper. Regarding decision making, the second point, is as important as the integration of RTO and MPC [7,8]. Operators and technical personnel face many operational decisions regularly using their experience and knowledge of the process. These may be motivated by aspects not considered normally in RTO concerning, for instance, people, safety, availability of equipment, state of catalysts, and so on, or respond to transient changes in the plant that require human intervention. However, when it comes to large scale processes, its complexity sometimes prevents frontline personnel from adequately predicting the consequences of these operational decisions on production. Simulation techniques have been proposed since long ago as a way of offering some help in dealing with these problems creating an environment that facilitate the evaluation of the solutions proposed by different tools or people regarding plant conditions, though its use has not spread very much. Partly, this may be due to the fact that simulation is often used in isolation from other tools, with static models and off-line, while decision makers in the control rooms require dynamic real-time tools able to forecast the process behavior as a function of the current state of the process and intended decisions. Nevertheless, nowadays, as a result of the adoption of digitalization in the process industries and advances in the simulation environments, new conditions have been created so that dynamic simulation, combined with other tools, can form efficient decision support systems. This paper deals with the above mentioned problems of tools integration and decision making as a support for process operators based on novel simulation framework. It proposes an architecture that efficiently combines dynamic simulation, RTO and MPC as an effective decision and operation support system in continuous process plants. The paper describes such a framework with reference to a large scale industrial process: the hydrogen network of an oil refinery located in Spain, involving 18 plants linked by a complex distribution network. Moreover, it discusses its implementation, operational requirements and lessons learnt, with special reference to the simulation framework developed. The paper is organized as follows. After the introduction, a brief overview of the main aspects of crude oil refinery hydrogen networks and the specific configuration of the case study addressed is given in Section 2. Then, the architecture of the decision support system is presented and discussed in Section 3, as well as the integration of modules. Next, Section 4is focused on what we call real-time reconciled simulation framework. Finally, in Section 5, the paper presents some case studies with their respective results and discussion. Conclusions are given in Section 5, including future work directions. 43 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 3. Top: generic H2network diagram with sources (HS1/2), consumers 1–3, high purity headers (HPH 1/2), low purity header (LPH), and fuel gas header (FGH). Bottom: Petronor, refinery H2network in Muskiz, Spain [9]. Gray boxes represent process plants. 2. Hydrogen networks in crude oil refineries Hydrogen (H2) is used in oil refineries mainly for removing sulfur from hydrocarbons in order to comply with environmental regulations (known as hydrodesulfurization process). In addition, hydrogen is consumed in hydrocracking units for converting long chain hydrocarbons (a.k.a. ‘‘heavy’’), received from vacuum distillation unit bottoms, into shorter chain molecules (a.k.a. ‘‘light’’), which are more valuable fuel blending components. Hence, H2 has become a key utility in the operation of the refineries. Currently, high purity hydrogen is provided either by an external supplier and delivered by pipeline to the refinery network or produced internally from steam reforming plants. Other hydrogen sources are platforming units, aimed at increasing the octane number of gasolines, which produce low purity hydrogen as a by-product fed to the hydrogen network. Whichever the source is, hydrogen is finally distributed to individual consumer plants through a set of headers and pipelines, in a complex network arrangement. For instance, Petronor refinery hydrogen network comprises 14 consumer plants, two steam reformers and two platformers, is presented in Fig. 3 (bottom). Moreover, headers are usually sorted by H2purity, namely: high (HPH), low (LPH) or fuel-gas (FGH). HPH contain H2purities over 90% and are fed by steam reformers. LPH contain over 70% H2purity and are fed by platformers and recycle purge from consumers, see Fig. 3 (top). Typically, excess gases from LPH and consumers, as well as other non-recyclable off-gases (e.g.: less than 70% H2purity), are collected by a fuel gas header (FGH) and used as fuel for burners across the refinery. Thus, only HPH and LPH gases are used as make-up (MU) gas to the consumer units. A simplified schematic of a typical HDS plant can be seen in Fig. 4. The high sulfur hydrocarbon (HC) feed is mixed with treatment gas (typically around 85%–90% hydrogen content, and high pressure) coming from different sources (high and low purity headers, HPH and LPH respectively). This cold mixed stream is heated to reaction temperature, around 300–400 ◦C, by heat exchangers and a furnace (reactor load heating subsystem, LHS) before going into the reactor. This untreated hot stream reacts in the catalyst fixed bed of the reactor, where the actual desulfurization and other side reactions take place. Due to the exothermal nature of the reactions, the outlet stream is used to preheat the cold stream load in the heat exchangers within the LHS. The next stage of the process is the separation of gas and liquid, for this purpose the high pressure separator (HPS) is fed with the cooled reactor outlet, and produces two outlets: High pressure sour gas (rich in hydrogen sulfide, H2S) and medium or low pressure mixed gas and HC. Another key point related to the operation of the reactors is purity management. As mentioned before, the gas recycled from the separation units (HPS) has lower purity than the treatment gas fed to the reactor, but its purity can be increased using permeation membranes or, after being sent to LPH, reused in other plants either directly or mixed with fresh hydrogen to increase its purity. Hydrogen cannot be stored efficiently, and an excess of hydrogen has to be kept in the reactors to avoid catalyst deactivation. As a result of this, proper management of the network requires deciding in real-time, according to the hydrogen demands from the reactors and variable hydrogen flows generated by the platformer plants, how much fresh hydrogen should be produced by each producer plant, and how should be distributed through the network, and internally in the consumer plants, so that the losses to FG, or in general costs, are minimized. In addition, the operation of the network has to consider the most important economic target: the maximization of the hydrocarbon loads processed in the hydrodesulfurization plants, which may be limited 44 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 4. Simplified schematic of a generic hydrodesulfurization (HDS) plant. HPH: High purity gas header. LPH: Low purity gas header. HC: Liquid hydrocarbon; MU: Make-up. FG: Fuel gas. HPS: high pressure gas/HC separator. LPS: Low pressure gas/HC separator. HPr: high pressure. LPr: low pressure. Fig. 5. Hydrogen network operation aims: satisfying minimum H2purity in reactors, maximizing HC processed (consistently with plant scheduling), and minimizing pure H2losses to FGH. by the hydrogen available and the production aims established by the planning of the refinery for the period under consideration. Notice that reducing losses of hydrogen to FG may increase the hydrocarbon processing if hydrogen is the limiting factor, which provides additional value to the optimal management of the network. Certainly, decisions must satisfy all process constrains imposed by the equipment, operation, safety, targets or quality. In summary, hydrogen network operation aims should consider three dimensions, i.e.: H2purity in reactors, H2losses to FGH and HC processed in consumer plants. Due to the impact of each dimension in the process economy, an optimal operation should consider the following broad directions (see Fig. 5 for a summary of operating aims at a glance): H2purity in reactors and H2losses, should be as low as possible, while HC processed should be maximized. 3. Decision support framework As mentioned above, optimal operation of the network, or any other complex process, requires proper tools at different levels, including support for non-automated decisions. Our vision of the architecture of a system oriented to fulfill these aims, more than the rigid hierarchical structure of Fig. 2, comprises a set of functional modules organized in a decision support framework, as portrayed in Fig. 6. This would provide integral visibility across operations within a process network to aid decision makers. Besides the production plants, DCS and Historian, Fig. 6 shows three groups of functional blocks: those related to the operation of a RTO system appear in orange, those related to MPC in yellow while two new blocks in green are related to real-time simulation. In relation to the traditional architecture of Fig. 2, three main changes can be observed: The first one is an architecture that moves towards what could be considered a mesh more than a hierarchy. This point is related with recent trends and standards for the new generation of control systems like the proposal of the Open Process Automation Forum (OPAF): the O-PASTM (Open Process Automation Standards) which promotes a modular architecture characterized by open standard interfaces between elements [10]. The automation pyramid is eliminated and replaced by a flat structure where each system can communicate with each other through distributed control nodes (DCN) across a connectivity framework as portrayed in Fig. 7. The apparently unconnected RTO and MPC modules, along with the real-time reconciled simulation (RTRS) module, in a scheme oriented to operate in real-time is addressed in the subsequent Sections 3.1 and 3.2. 3.1. Integrating RTO solutions into MPC As mentioned in the introduction, the classical cascade implementation of RTO–MPC in which RTO executes at slow pace a static, nonlinear optimization and fixes the set points of a linear MPC executed at higher frequency, though conceptually clear and easy to perform, presents several issues. Among them, it can be 45 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 6. Block diagram of the proposed decision support framework showing the information flows. LP: linear programming. CRO: Control room operator. DMC: dynamic matrix control. MHE: moving horizon estimation. RTRS: real-time reconciled simulation.. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) Fig. 7. O-PAS modular architecture. DCN standard enables communication of non-O-PAS compliant modules through the connectivity framework. Modules can exchange data and information across the system in a straightforward manner. Source: [10]. highlighted the fact that RTO solutions corresponds to an ideal optimal steady state of the processes but, in practice, process plants are rarely in a steady state. Connected to this, the slow execution period of RTO implies that adaptation to any new condition only takes place from time to time, without early reaction against significant disturbances, which limits the benefits of RTO. 3.1.1. Data reconciliation and RTO This is the case in the hydrogen network taken as reference where a RTO system is in operation involving the 18 plants described in Section 2. The system collects 171 flows and 18 purity measurements, plus other variables and configuration parameters (temperatures, pressures, valve openings, etc.) totaling around 1000 variables, averaging them in two-hour periods to smooth the effects of transients and disturbances. Notice that, in spite of this number, there are many more variables that are not measured and many of them are not reliable. After analyzing and filtering them, they are fed to a data reconciliation module, which plays a central role in the architecture of Fig. 6. This module solves periodically an optimization problem that provides estimations of all plant variables consistent with a process model and constraints and having values as close as possible to the process measurements. The model involves more than 4400 variables and 4700 equality and inequality constraints with flows, purities, molecular weights of hydrogen and light ends and hydrogen consumption in the reactors as main variables. It is based on stationary mass balances and reduced order models of some special units like separators and membranes. The model is adapted automatically to structural changes, like a plant being shut down. The NLP problem is solved using IPOPT in the GAMS environment in a few minutes. Then, using the updated model, another optimization problem is solved every two hours in the RTO module, using a cost function that aims to: maximize the hydrocarbon load to consumer plants, minimize the use of fresh hydrogen generated in the steam reforming plants, and minimize the internal recycles of hydrogen in the consumer plants, which is linked to the operation of the recycle compressors. It considers : the reconciled process model, a set of operational constraints, and the refinery planning specifications. Main decision variables include: production of fresh hydrogen, feeds to consumer plants, hydrogen flows and recirculation, purges, purities and membranes operation, involving around 2000 variables and 1800 constraints and is solved also in the GAMS environments in a few minutes. Nevertheless, taking into account what was discussed at the beginning of this Section 3.1, the solutions found are not passed directly as set points to a MPC. Instead, the procedure displayed on Fig. 8 was used. 3.1.2. Implementation of RTO and MPC The first step in the methodology involves analyzing the solutions provided by RTO and extract common features or policies that correspond to the optimal operation. Examples in the hydrogen network problem can be to minimize the flow from H4 to H3 headers, or reduce the purity in the stream out of the high pressure separators as much as possible. Note that these are not specific values for set points of any variable but directions for the entire network to operate with minimum cost, which can be translated formally in terms of an optimization problem. The second step takes advantage of the two-layer architecture of many industrial MPC controllers like the DMC+ which incorporate 46 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 8. Left hand side - Implementation of the RTO generated policies as targets in the LP layer of the MPC module. Right hand side - the local LP optimizer sets of future values of the DMC set points. internally a linear programming (LP) optimizer that generate targets for a DMC controller [11]. The optimal policies of the RTO can be then implemented as targets in the LP layer which will generate specific set points (SP) to the DMC according to the process conditions. In this way, the MPC operates independently, adapting the policies extracted from the RTO to the process state. In essence, network-wide optimization results are transferred to the MPC by the operators in an open-loop manner or incorporated in the reduced LP function in the MPC if significant discrepancy is observed. A comprehensive discussion of this approach towards RTO–MPC integration is described by [12,13]. This reminds the idea of self-optimizing control of implementing optimization as control introduced by [14]. Nevertheless, the implementation is different because here there are no self-optimizing variables to control but policies to follow. The actual implementation in the refinery was done by the Petronor team and includes a DMC that covers the six most important plants of the network from the point of view of hydrogen management, trying to balance benefits obtained with simplicity of implementation. The controller operates only on key variables such as the set points of hydrocarbon loads to the consumer units, fresh hydrogen production, hydrogen feed to the consumers from the high purity header and supply of hydrogen from one of the platformer plants. It is executed every minute bringing consistent benefits. More detail about the operation of the network can be found in [15] and [12]. Note that, even if the RTO solutions are not implemented in real-time as it is an open-loop framework, both the data reconciliation and the RTO keep running on-line generating both, useful information about the hydrogen network and indications on how to command it optimally that are available through the process information system, remaining a part of the decision support framework. 3.2. Real time reconciled simulation As mentioned in the introduction, there are many operational decisions that operators and technical personnel have to make due to changes in the plant or operating conditions that require human intervention. In the same way, revising or accepting what is been suggested by the RTO when new situations or constraints realize requires human action and judgment. In large scale and complex processes like the hydrogen network, it is difficult to predict the consequences of some operational decisions on production. Simulation can offer help in this task, allowing the evaluation of the solutions proposed by different tools or people regarding new plant conditions. That is why the module RTRS appears in Fig. 6. However, in order to be useful and predict the future process evolution as a function of time and the intended decisions, the simulation has to be dynamic and must be properly initialized in real-time at the current process state, not to mention that the model has to be maintained properly updated. In order to perform the initialization and updating in real time, under user demand, the dynamic simulation must be integrated with other modules of the decision support and operation framework, namely the moving horizon estimation (MHE) and the data reconciliation modules. Integration with the RTO is also required in order to allow an easy evaluation of its proposals. The data reconciliation (DR) results can be used to update many model parameters but current state estimation requires past dynamic data obtained through the historian system and integrated estimation tools such as MHE that constitute the remaining block of the decision support framework. In this context, real-time reconciled simulation (RTRS) is defined as a system simulation, intended to be used in parallel with the process, in which all current parameters and states (measured and unmeasured) arise as a result of a DR based on past and current plant data. Moreover, it is capable of representing the future condition of the system within a simulation time horizon, provided that certain boundaries or manipulated variables (MV) are given within that horizon. From its definition, RTRS can be seen as a real-time simulation tool which incorporates parameters and states estimations based on current plant data. These capabilities motivate the interest in developing further RTRS applications. In particular, its combination of open-loop decision support and plant forecasting features, are the most outstanding outcomes of these tools. Fig. 9 shows a schematic of a decision support framework with a RTRS application, where, past system states, along with past and current manipulated variables, are captured online and utilized alongside a dynamic model, to estimate the current state of the system and its parameters. However, RTRS are challenged to effectively integrate plant forecast features (based on current plant status), with ease of implementation by end-users, e.g. control room operators, plant engineers, due to the complexity of integrating simulation and optimization tools towards real-time simulation for process operation. 4. Simulation environment This section describes the models used in the simulation and the simulation environment as well as the initialization procedure. 47 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 9. Decision support framework information flow with a real-time reconciled simulation application. 4.1. Simulation model and framework The models used in the simulation module are coherent with the ones used in data reconciliation or RTO, so that direct transfer of values is possible, but they incorporate dynamics where appropriate. All pieces of equipment comprising the plants and their connections, as well as the network connections are formulated as first principles models and as simple as possible trying to balance a good description of the key phenomena in the hydrogen network with the necessary computational performance. The model of the distribution network is based on mass balances of hydrogen (H2) and light ends (considered altogether as a single pseudocomponent, LIG). In the models, Fstands for gas flows, Xare hydrogen purities, and MW refers to molecular weights, while liquid streams are defined by: HC (liquid hydrocarbon flowrate), ρHC (HC density) and MWHC (HC molecular weight). Each knode has outlets iand inlets jstreams (2.a–d). Taking into account the difference in time constants between pipelines and reactors and other equipment, the models of the pipelines are considered static. Models for reactors (3.a–i), membranes (4.a–e), separation units (5.a–j), compressors and headers (2.a–d) incorporate other first principle and reduced order equations. Their models consider two basic mechanisms of H2consumption: chemical reaction (in reactors) and solubility losses (in separators). Simplified first order dynamics are considered in reactors, since H2is required in great excess compared to HC to protect catalysts premature deactivation. Reduced order models are used for permeation membranes fitting their parameters to historical plant data following methodologies of previous works by [16] and before by [9]. Table 1 presents a description of all variables and subscripts, while engineering units used in this study are provided in Table 2. In addition, the model incorporates a quantification of process economy (6), which is used for assessing the impact of different operations (a.k.a. set of actions SC) on profits over scenarios. Thereby, the economic impact of changes is transparent to decision makers. In particular, for any given number of scenarios considered, the best alternative is the one that satisfies all operational constraints, at the time it provides the highest process profit (6). At all nodes N: ∑ i,out Fk,i=∑ j,in Fk,j∀k∈N(2a) XH2,k·∑ i,out Fk,i=∑ j,in XH2,k,j·Fk,j∀k∈N(2b) MWk·∑ i,out Fk,i=∑ j,in MW k,j·Fk,j∀k∈N(2c) 100 ·MWk=MWH2·XH2,k+(100 −XH2,k)·MWLIG,k ∀k∈N(2d) At all reactors r: Fin,r=Fout,r+RDH2,r−RDLIG,r(3a) Fin,r Xin,r,H2 100 =Fout,r Xout,r,H2 100 +RDH2,r(3b) Fin,rMWin,r=Fout,rMWout,r+RDH2,rMWH2 −RDLIG,rMWLIG,r(3c) RDH2,r=HCin,r·rdH2,r(3d) RDLIG,r=HCin,r·rdLIG,r(3e) rdH2,r+τH2,r·d(rdH2,r) dt =rdH2,r,SS (3f) rdLIG,r+τLIG,r·d(rdLIG,r) dt =rdLIG,r,SS (3g) HCin,r=d(HCout,r) dt ·τHC,r+HCout,r(3h) WHC,in,r=WHC,out,r−RDLIG,r MWLIG,r LM (3i) ∀r∈Reactors At all permeation membranes z: Fin,z=Fo,z+Fpg,z(4a) 48 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 10. Components of the dynamic hydrogen network library used to build models by interconnection. Fin,z Xin,z,H2 100 =Fo,z Xo,z,H2 100 +Fpg,z Xpg,z,H2 100 (4b) Fin,zMWin,z=Fo,zMWo,z+Fpg,zMWpg,z(4c) Xo,z,H2=aFpg,z Fin,z +b·Xin,z,H2+c(4d) MWin,z,LIG =MWo,z,LIG (4e) ∀z∈Permeation membranes At all separators se, (13.h-j) do not apply to low pressure separators: ksolse,gasHC =22.415 ·Gout,se (Yout,se,H2+Yout,se,LIG) Gout,se ·Yout,se,HC (MWHC ρHC )(5a) ksolse,H2HC =22.415 ·Gout,se ·Yout,se,H2 Gout,se ·Yout,se,HC (MWHC ρHC )(5b) ksolse,MWLIG =MWout,se,LIG MWGout,se,LIG (5c) ksolse,H2gas =ksolse,H2HC ksolse,gasHC (5d) Gin,se (100 −Yin,HC )=Fout,se +Gout,se (100 −Yout,se,HC )(5e) Gin,seYin,se,H2=Fout,seXout,se,H2+Gout,seYout,se,H2(5f) Gin,se (100 −Yin,HC )MWGin,se =Fout,seMWout,se +Gout,se (100 −Yout,se,HC )MWGout,se (5g) HCin,se =d(HCout,se) dt ·τHC,se +HCout,se (5h) ksolse,gasHC +τse,gasHC ·d(ksolse,gasHC ) dt =ksolse,gasHC,SS (5i) ksolse,H2HC +τse,H2HC ·d(ksolse,H2HC ) dt =ksolse,H2HC,SS (5j) ∀se ∈Separators ProfitSC = U ∑ i=1 pri·HCSC,i− H ∑ i=1 ctHS,i·HSSC,i− RH ∑ i=1 ctLPH,i·LPHSC,i(6) The models were coded in the modeling environment EcosimPro R /PROOSIS R [17], an equation and object oriented (EOO) modern simulation software, with straightforward communication capacity with other software packages, such as MS Excel R and C++. In particular, its capability to model reuse and numerical performance is highly appreciated. A graphical model library with the different components that appear in the hydrogen network was developed as a tool for developing models for the whole network. The main symbols associated with the components of the library can be seen in Fig. 10. Models of the different plants and the hydrogen network were built by interconnecting the appropriate components. After parameterizing them, a partition can be created as a function of the degrees of freedom of the process and finally C++ executable code with all required numerical algorithm is created automatically ready to be run. One example of schematic corresponding to the Petronor hydrogen network can be seen in Fig. 11. 4.2. Moving horizon estimation implementation As mentioned before, on-line use of the simulation models requires proper initialization of the model. Current value of many model parameters can be incorporated from the last data reconciliation run, but the current value of some states may not coincide with the averaged value provided by this module and stored in the process information system. In this context, a module is required to estimate current time unknown states and parameters, based on online and historical measurements. In this way, the RTRS is able to support on-line plant forecasting, aiding operators in their decision-making process for future actions. These might be intended for actual open-loop control action or to support scenario-based decisions, operators training or other forms of operation assessment. Fig. 12 presents a schematic illustrating of all the previous components of the system in question. The state estimation stage is addressed applying the so called, and well known, moving horizon estimation (MHE) technique, which has several successful implementation examples as [18– 21]. For further theoretical reviews and comprehensive analysis on the MHE method refer to [22,23]. Thereafter, starting with current values of states and parameters as a result of the state estimation, the simulation is computed for forecasting future behavior of the system. The dynamic state estimation problem to be solved in MHE is presented next. Given: •a DAE, i.e.: dynamic model (DM), •plant measurements yand information •previous manipulated variables’ (MVs) values, u Estimate state variables at time t-N and possible disturbances for the interval [t-N,t] such that the difference between DM variables response and plant data is minimized along the past 49 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 17. Flow diagrams of case II, hydrogen consumers, i.e.: HDS1-3. (A) HDS1. (B) HDS2. (C) HDS3. are encouraged to consider all potential variables in the analysis. This approach is intended to support operators in their decisionmaking process, such that a negative change of condition is mitigated in the most cost-effective way, considering Profit and process specification. Case II has a homologous set of streams to case I at unit level, with the addition of network streams to interconnect all plants. Thereby, Table 5 presents key variables at network level and their descriptions, rather than a full list, in the interest of conciseness. A summary of statistics of both models is shown in Table 6. These are intended to provide a broad idea of the size of the models in question. 5.2. Assessment of the accuracy Even before studying the results of the RTRS at any given condition it is important to assess the accuracy of the estimation during change of conditions, either manual changes or unexpected. In addition, the values in P,Qand Rof Eq. (12) are adjusted in order to properly set up the parameter and state estimation module. This task requires some level of judgment and knowledge of the process towards which variables ‘‘tighten’’ more than others in the formulation. For instance, purity readings in the recycle loops are key in getting good estimations, while these are the ones that present more erratic readings or discrepancies. Similarly, some gas flowrates are also critical in resolving the system, e.g. recycled gas from separators, however not all process 56 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 18. Case study A (G3) accuracy of parameter and state estimations. A, B, C and D, present the relative error (%∗) of online measurements over time, compared to the estimations computed by RTRS tool. ∗Estimation error over actual value in %. Table 6 Summary of models’ characteristics. Description Case I Case II Equations 645 1305 Boxes (coupled subsystems of equations) 3 5 Linear boxes 2 4 Nonlinear boxes 1 1 Input DATA 290 592 Output EXPLICIT 634 1273 Output DYNAMICS 9 27 Output ALGEBRAICS 2 5 Size of Jacobian matrix (DYNAMIC+ALGEBRAIC). 11 ×11 32 ×32 Integration method IDAS IDAS units have readings in this section. In the end, tuning the state estimation is a balancing act to make the best estimations at reasonable computation costs. First and foremost, predictions are to be useful if the estimations are within a sensible uncertainty range. Although a detailed study of the accuracy of the estimations and MHE calibration is outside the scope of this manuscript, a brief conceptual description is provided along with relative errors (w.r.t. actual values) of key variables tested for G3 (Case I) shown in Fig. 18. Starting from reconciled values of the process, the RTRS is executed offline altering a number of variables such as hydrogen demand, hydrogen purity, HC load, among others. The test consists of simulating several changes in operating condition, both expected and unexpected, for a 2 h period of time. In this way, true values are known beforehand and used for calculating the relative error of variables. Simultaneously, the state estimation block of RTRS is run continuously, outputting estimates of states and parameters. In this way, the MHE is qualitatively validated, prior to its online use for any particular process unit. The main purpose of this validation is to adjust the state estimation routine to calculate values within reasonable error ranges. These results are shown in Fig. 18, quadrants A to D. The state and parameter estimation block of the RTRS presents satisfactory results in terms of estimation accuracy of the method. The most remarkable outcome is probably that, even though errors vary widely across variables most of the errors are below 10% which is considered satisfactory in this type of gaseous industrial networks. Naturally, the more accurate the better, however these figures should only be taken as a first safe reference for validation of the estimations. Adjusting values in R(12) is possible to relax or tighten the error for each measurement in the MHE block (estimation error over actual value in %). Moreover, it is pointed out that key instrumentation should receive greater weight in R in order for achieving the best results. In overall, the estimation itself is considered validated for the purpose of this study. Actual applications should undergo a rigorous validation process which would be fit for purpose, rather than following a general validation criteria. A detailed study of these aspects of the proposed methodology and analysis of the tuning process is out of the scope of this work. It is important to bear in mind that sensible estimations are essential for further state predictions, and plant forecasting. Estimations of future variables, relies on current time estimations. Therefore, a thorough tuning process is advised during commissioning of any RTRS tool. 5.3. Results and discussion Even though a discussion based on the results of the WiA is given for each scenario and case study, the focus is on the methodology and tool purpose, i.e. RTRS, rather than a detailed analysis of all process variables and constraints which is out of the scope of this study. For this reason, only the main affected variables’ results are presented, in order to analyze the method potential as decision support tool for operators. RTRS is run on a PC Intel R CoreTM i7-6500U CPU at 2.50 GHz RAM 16 GB, and takes 26 s and 40 s on average for Case A and 57 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 19. G3 main variables computed at BL, SA and SB. Left, gas purities of streams: recycle gas (AI004), aggregated make-up and purified gas (FI010) and reactor effluent (R1R2). Lower limit violation is pointed with an arrow (AI004LL). Right, gas flowrates of streams: LPH make-up gas (FC009), aggregated make-up and purified gas (FI010), HPH make-up gas (FC233) and membrane feed (FT042). (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) Table 7 Prices and costs considered for the economic valuation of scenarios (6). Description Case I Case II pri(ke/m3) Price of HC produced of quality i, i.e.: Diesel A, Diesel B and GOBA. Represents increase of profit in the process economy balance (6). The same price is used across HC qualities. 1 1 ctHS,i(ke/Nm3) Cost of high purity hydrogen supply of source i. Represents loss of profit in the process economy balance (6). Two high purity hydrogen sources are used across cases (i =1, 2). 1.5E−3, 2.0E−3 1.5E−3, 2.0E−3 ctLPH,i(ke/Nm3) Cost of low purity hydrogen supply of source i. Represents loss of profit in the process economy balance (6). One source of LPH is used across cases (i =1). 1E−4 1E−4 B respectively, per sample time to complete the execution. In addition, costs and prices used in (6) are shown in Table 7. It is worth mentioning that, prices and costs are representative rather than real for confidentiality reasons. 5.3.1. Case I: RTRS at plant level This case study is an example of RTRS at plant level (G3 process unit, Fig. 15). Baseline (BL) process conditions represent an unexpected 15% increase in rdH2SS (H2demand per volume unit of feed) at 0.2 h (see Fig. 16), these change of condition is a consequence of plant feed becoming richer in sulfur components. Moreover, it impacts on the recycled gas purity (AI004,Fig. 19 - left) resulting in a significant drop of this controlled variable. Recycle gas purity lower limit (LL), 77% H2, is violated after the change in H2demand realizes, requiring an action from the operator. In this context, SA shows the effect of increasing the purification membrane load (FT042,Fig. 19 - right). SB presents the impact of using HPH make-up feed instead (FC233,Fig. 15 - right). Note that in Fig. 19 three different purities are portrayed (AI004, FI010 and R1R2), however the process constraint (lower limit) is only imposed on AI004 (in green in Fig. 19) as this is the only actual plant reading. Certainly, it has to be noticed the fact that for both sets of actions profit is lower than for BL. This is explained due to an increase in H2demand in reactors (R1R2, which rises make-up gas demand. Thereby, hydrotreating costs are higher producing the same amount of low sulfur product. For instance, this would be the case when crude oil tanks are changed or HC feed streams change their composition for any other reason. It is seen that, although both SA and SB are effective mitigation actions, towards steering the process within recycle gas constraint (Fig. 19 – left), SA provides the most cost-effective response outweighing SB strategy by around 47% (Fig. 20). This results show the key importance of purification units for addressing the best possible operation. It must be borne in mind that, membranes are rarely operated automatically from the control room, instead, are likely to require manual intervention from a field operator. This is exactly the case of G3 process unit. Therefore, this analysis is valuable as a training example for operators, as well, for it quantifies actual impacts of different mitigation alternatives (Fig. 20). In particular, presenting that is better to address H2demand changes at plant level by manipulating the purification membrane rather than make-up gas. This results are in line with previous finding presented by [16], where a focus on the optimum H2management policy is addressed showing the importance of membranes operation. 5.3.2. Case II: RTRS at network level This case study shows an example of RTRS at network level. BL, presents a H2demand increase due to a HC load rise by 5 m3/h (3.2%) in HDS1 (FC001,Fig. 21 - right), decreasing recycle gas purity of HDS1 below its lower limit (see AI001 in Fig. 18 - right), 68% (AI001LL), requiring an action from the operator. In this context, SA shows the effect of manipulating HPH make-up (FI003,Fig. 21 – left) and FC001, being both mitigation actions 58 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 20. G3 process profit, in ke/h at all scenarios. Profit does not consider operational constraints (14), such as gas purity in reactors. Values are representative rather than actual for confidentiality reasons. Fig. 21. Left: HPH make-up gas streams FI003 (HDS1) and FI004 (HDS2) in Nm3/h. Right: HDS1 hydrocarbon load (FC001) in m3/h. local to HDS1. On the other hand, SB shows corrective actions manipulating HPH make-up in HDS1 and HDS2 (FI004,Fig. 21 – left), being a network-wide strategy. In this case, SA and SB satisfy the recycle gas purity constraint after time 0.2 h, therefore are both deemed to be corrective actions (Fig. 22 – right). However, it is observed a significant negative impact on Profit of SA compared to SB (Fig. 23 – right). The reason for this is that SB copes with HC load changes by purely rearranging H2distribution across the network. Concretely, cutting back H2feeding HDS2, allowing more make-up to HDS1 (Fig. 21 - left). Therefore, impact on process economy is minimized in the sense that production is not reduced. However, SA strategy applies only HDS1 local MVs to mitigate the change of condition, taking a toll on process economy. Moreover, it does not reach the production level of 160 m3/h as required (FC001,Fig. 21 - right). An interesting outcome to point out is that, an operator would rather manipulate variables within his process unit boundaries, not considering the impact of actions in other process units in the network. In this case, it is clear how that approach is not the best possible, presenting an alternative that enables an increased HC load while keeping constraints within limits. Even more, this is an example of how network interactions between plants are key elements for troubleshooting. And RTRS demonstrates its usefulness for addressing this sort of challenges. It must be pointed out that building models at network level is more complex than at plant level. Similarly, the analysis of results and their interpretation requires more knowledge. Thereby, it is sensible to assume that RTRS at network level should be a useful tool for experienced operators or supervisors, while might seem not easy to build up meaningful sets of actions or scenarios for novice operators. Still, for training purposes it should be valuable as well. 59 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 22. Left: LPH streams in Nm3/h. Right: HDS1 recycle (AI001) and reactor effluent (R1) gas purities in H2%. Lower limit violations are pointed with arrows (AI001LL). Fig. 23. Left: gas flowrate to FGH (FI013) in Nm3H2/h. Right: process profit in ke/h (14). 5.3.3. General highlights RTRS methodology has significant versatility, due to its capability of adaptation to several purposes such as analysis based on predefined sets of actions or training. For instance, this paper showcases WiA based on RTRS at two levels in a process network (plant level and network level). Moreover, RTRS presents especial interest as a decision support tool for analyzing mitigation actions due to change of condition. Additionally, control room schematics can be replicated on the RTRS graphic interface for ease of understanding and effective communication of outcomes throughout the organization. Other favorable accountability of RTRS is its complementarity to model predictive control (MPC) and real-time optimization (RTO) layers. Particularly if those are considering the same process system, for example in a refinery H2network the integration would be MPC, RTO and RTRS. MPC and RTO would take care of actual closed-loop control and economic optimization, while RTRS may contribute providing an analysis tool for better understanding and testing of RTO and MPC solutions. Thereby, it might be the case where operators come up with a set of actions with similar impact on profits than RTO, though easier to perform due to model limitations for representing all constraints and casualties. In this dimension, RTRS complements other existing decision-making and control tools in the process industry. However, this aspect requires further exploration, in order to solve interactions of the different tools with ease. Being the ultimate, ideal, aim to efficiently integrate digital information from: process models, business indicators, maintenance monitoring and supply chain, into a decision support framework. Another advantage of RTRS is its intuitiveness, since it is based on well-known techniques (MHE and DAEs computation). Hence, RTRS is relatively easy to replicate and develop for any given dynamic process system. Nonetheless, it could be challenging for systems with complex dynamics, if a previous appropriate components library is not available. In spite of all the previous comments, there are RTRS current limitations to point out as well. Firstly, it is duly noted that single shooting optimization approach has limited effectiveness for handling path constraints or unstable solutions. This shortcoming should be considered in future work, exploring strategies 60 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 24. Example of decision support framework architecture with integration of control layers, simulation and optimization features. REI: resource efficiency indicator. KPI: key performance indicator. DCS: distributed control system. RTO: real-time optimization. MPC: model predictive controller. GUI: graphic user interface. SP: set points. QP: quadratic programming. LP: linear programming. NLP: nonlinear programming. MILP: mixed integer linear programming. MINLP: mixed integer nonlinear programming. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) for automatic finite elements orthogonal collocation and differentiation within a simulation framework. Secondly, RTRS itself is unlikely to provide optimum solutions and run in open-loop, which is generally speaking a downside that comes alongside and at the cost of versatility. However, pairing RTRS with RTO/MPC applications should partly compensate this aspect as mentioned before. 5.3.4. RTRS use in decision support frameworks Decision support frameworks (DSF) with effective integration of RTO, MPC, DCS and RTRS (amongst other decision-making tools), can help decision makers of process operations towards steering processes in the best direction possible. Certainly, this capability depends not only on each individual tool in the DSF, but also on the DSF architecture itself. Therefore, an example of DSF architecture is shown in Fig. 24, which includes all the major players in a DSF envisioned by the authors and how these are linked together. This may help understand in a more general form, the key role of RTRS with respect to digital twins and decision support in process operations. The proposed decision support framework architecture centralizes data management, easing integration of applications and information exchange between levels as well as within same levels in the control pyramid. For instance, planning, scheduling, RTO, MPCs and DCS are of particular relevance in understanding information exchanges across the DSF and its architecture, since these have several levels of hierarchical dependency with data being managed directly between applications. For example, Fig. 24 depicts a DSF configuration including simulation, optimization and control features, which utilizes a centralized data management system using plant historian database. In addition, the proposed architecture in Fig. 24 incorporates simulation and business KPI features to unleash the full potential of the DSF in aiding decision-making in process operation environments. In the following paragraphs, the architecture is described further, focusing on how this enables seamless information and data exchange across individual applications enhancing decision-making capability. Firstly, the historian plays the role of the data management system centralizing all sources of data, such as online process measurements, lab data, equipment monitoring data, and others (see Fig. 24). Furthermore, the historian collects key information (outputs) from traditional control and optimization applications (see green boxes in Fig. 24). These outputs are used automatically or on demand by other applications via historian, automated updates follow the feedback frequency required by each application (see feedback arrows in Fig. 24). In this architecture the historian is critical in keeping one data and information repository, which serves client applications requesting those data. Secondly, the proposed architecture features a digital twin application, which is the root source of models of multiple natures (models repository in Fig. 24). In practice, operates as the library of models concerned to the decision support framework, especially those used in control and optimization tools (see green boxes in Fig. 24). Additionally, the digital twin itself executes automatic state estimation and model update routines using online data pulled from the historian. In fact, the RTRS would be considered within digital twin features to some extent, because it integrates state estimation with real-time simulation as previously discussed. Model updates, estimations and process equipment 61 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 Fig. 25. Enterprise-wide decision support framework, with RTRS highlighted in green. AC&O: advanced control and optimization. CM: condition monitoring. DR: data reconciliation. RTO: real-time optimization. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) information resulting from the digital twin are available for all client applications within the DSF via historian. This architecture helps manage multiple mathematical models since these have the same source which simplifies consistent maintenance and human resource allocation for models maintenance. Thirdly, this architecture features online and offline simulation with multiple graphic user interfaces (GUIs) and What-if analysis capability (see yellow box in Fig. 24). Users with different profiles can access multiple GUIs which allow them to run simulation experiments via digital twin. GUIs should be assigned to users’ profiles to reflect security clearance across users. For example, control room operators should have access to GUIs which replicate DCS dashboards, while process engineers may have clearance to more detailed schematics (including chemical composition of streams, catalyst information, etc.). From GUIs, real-time simulation experiments can be run based on online current data, and RTRS. This provides enhanced forecasting capabilities, which generates results that can be available across the DSF, if necessary (see forecast assessment information, dashed arrow in Fig. 24). Additionally, control actions and other changes can be assessed using What-if analysis capabilities. For instance, optimization outputs from the RTO can be tested in search for simpler control action alternatives from an operating viewpoint with similar results in terms of economic outcome (objective function). Finally, business indicators are received via historian (see gray box in Fig. 24) in the Business KPIs feature, which help manager and executive level decision makers follow critical business trends with respect to process operations. This module comprises simple visualization tools such as dashboards and KPI charts. In overall, there are multiple forms for RTRS to support decision-making processes in manufacturing operations, although this may require thoughtful DSF architectures to make the most out of each individual tool. 6. Conclusions A real-time reconciled simulation tool is presented, aimed at aiding process network operators in their decision-making process, especially under changing plant conditions. RTRS effectively combines dynamic state estimation techniques (MHE) into a simulation environment, which enables both: online data pulling from plant information systems and input of manipulated variables for assessing future conditions. In this context, RTRS is a general concept and virtually applicable to any process network supported on a FPM, given a dynamic library of components is available. In order to evaluate the usefulness of RTRS as a decision support tool for operators, a what-if analysis approach is conducted on two case studies: an individual process unit (case I) and a process network (case II). Case study I, consists in a real plant of Petronor refinery, studied for a baseline condition where hydrogen demand increases by 15% unexpectedly. Two corrective sets of actions are considered for mitigation (SA and SB) and assessed over their economic impact. It is demonstrated that SA is advantageous over SB, due to a more efficient use of hydrogen purification membranes available in G3. In addition, state and parameter estimation results are presented for case study I, showing a satisfactory accuracy for all key instruments with a relative error below 10%. Case study II, consists in a representative hydrogen network, studied for baseline condition where one process unit faces an increase in hydrogen demand due to an ramp-up in hydrocarbon load. It is shown that set of actions SB is a better mitigation action, due to a more efficient hydrogen management across the network rather than at plant level. Generically speaking, RTRS methodology is promising for: its versatility of application and ease of communication, complementarity with current plant-wide control systems (RTO/MPC) and intuitiveness of implementation. On the contrary, absence of optimal mitigation actions guarantee and single shooting sequential optimization, are identified as challenges to overcome. Two additional points are mentioned: one refers to the requirement of the simulation framework of having an HMI able to deal efficiently with thousands of variables and present clear and elaborate information to the users. The other one is the central role played by the process information system (historian), even if this is not a problem in most process industries where a realtime data base like PI is in operation and digitalization takes place since many years ago. RTRS has being presented as part of a decision support and operation framework around MES and MPC layers, in particular, a DSF example of architecture is presented and briefly described. The roles of RTO, MPC, RTRS, Historian, Digital Twin, amongst other tools, are discussed highlighting why the proposed configuration adds value to the decision-making process. In addition, 62 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 RTRS can be visualized in a wider perspective as an enterprisewide decision support framework that includes, for instance, supply chain and production scheduling, machinery condition monitoring and maintenance, to mention only two. In this way, RTRS would take advantage of the most accurate data of machinery performance, or scheduled maintenance when estimating parameters and forecasting future process conditions. Similarly, current time estimations from RTRS may be available in realtime for scheduling and updating data for supply chain operations (Fig. 25). All relevant data from modules within the framework is exchanged through a data management system capable of storing historical data, as well as accessible form several platforms for data search. It is strongly believed, that the integration of tools such as RTRS with other decision-making modules across a business should enhance decision support potential at all levels enterprise-wide. Hence, there is growing interest from process industries in these applications in their transit towards fully digitalized businesses, where digital twins play a central role. Models play a critical role in nearly all decisions as they have different characteristics and complexities, but they should be kept up to date to be used in real-time when needed. Furthermore, in order for models to be successful these should be coherent and compatible with respect to its scale and purpose. In the paper we have highlighted the importance of RTRS enterprise-wide integration with other modular decision support tools. Models, combined with other tools for prediction, analysis and optimization form the core of modern digital twins. Enabling fully interconnected information at all levels, is likely to bring added value to everyone involved and a step forward in the path towards a wisely applied digital twin approach, which is a fruitful line of future research. CRediT authorship contribution statement Anibal Galan: Conceptualization, Formal analysis, Investigation, Methodology, Validation, Writing - original draft. Cesar De Prada: Supervision, Project administration, Resources, Funding acquisition. Gloria Gutierrez: Software, Supervision, Formal analysis, Data curation. Daniel Sarabia: Software, Data curation, Writing review. Rafael Gonzalez: Resources, Formal analysis, Writing review. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgments Financial support is gratefully acknowledged from the Marie Curie Horizon 2020 EID-ITN project ‘‘PROcess NeTwork Optimization for efficient and sustainable operation of Europe’s process industries taking machinery condition and process performance into account – PRONTO’’, Grant agreement No 675215. This work was also supported by project PGC2018-099312-B-C31 (InCO4In) from AEI/FEDER, as well as the Regional Government of Castilla y León and the EU-FEDER (CLU 2017-09 and UIC 233). References [1] C. de Prada, D. Sarabia, Data pre-treatment, in: Resource Efficiency of Processing Plants, Wiley-VCH Verlag GmbH & Co. KGaA, Weinheim, Germany, 2018, pp. 181–210, http://dx.doi.org/10.1002/9783527804153.ch8. [2] L.T. Biegler, Advanced optimization strategies for integrated dynamic process operations, Comput. Chem. Eng 114 (2018) 3–13, http://dx.doi.org/ 10.1016/j.compchemeng.2017.10.016. [3] P. Daoutidis, J.H. Lee, I. Harjunkoski, S. Skogestad, M. Baldea, C. Georgakis, Integrating operations and control: A perspective and roadmap for future research, Comput. Chem. Eng 115 (2018) 179–184, http://dx.doi.org/10. 1016/j.compchemeng.2018.04.011. [4] R. Amrit, J.B. Rawlings, L.T. Biegler, Optimizing process economics online using model predictive control, Comput. Chem. Eng 58 (2013) 334–343, http://dx.doi.org/10.1016/j.compchemeng.2013.07.015. [5] M. Ellis, H. Durand, P.D. Christofides, A tutorial review of economic model predictive control methods, J. Process Control 24 (2014) 1156–1178, http: //dx.doi.org/10.1016/j.jprocont.2014.03.010. [6] M. Ellis, P.D. Christofides, Real-time economic model predictive control of nonlinear process systems, AIChE J. 61 (2015) 555–571, http://dx.doi.org/ 10.1002/aic.14673. [7] C. de Prada, J.L. Pitarch, Real-time optimization (RTO) systems, in: Resource Efficiency of Processing Plants, Wiley Online Books, Wiley-VCH Verlag GmbH & Co. KGaA, Weinheim, Germany, 2018, pp. 265–292, http://dx.doi. org/10.1002/9783527804153.ch11. [8] S. Engell, Feedback control for optimal process operation, J. Process Control 17 (2007) 203–219, http://dx.doi.org/10.1016/j.jprocont.2006.10.011. [9] E.M. Gómez Sayalero, A Study on Modelling, Data Reconciliation and Optimal Operation of Hydrogen Networks in Oil Refineries, Universidad de Valladolid, 2016, http://dx.doi.org/10.35376/10324/16637. [10] OPAF, Open process automationTM forum [WWW Document], 2018, https://www.opengroup.org/forum/open-process-automation-forum (accessed 6.1.20). [11] C.R. Cutler, L.B. Ramaker, Dynamic matrix control— a computer control algorithm, in: AIChE 86th Spring Meeting, Houston, Texas, 1979, Paper No. 51b. [12] C. de Prada, D. Sarabia, E. Gutierrez, S. Marmol, M. Sola, C. Pascual, R. Gonzalez, Integration of RTO and MPC in the hydrogen network of a petrol refinery, Processes 5 (2017) 3, http://dx.doi.org/10.3390/pr5010003. [13] A. Galan, C. de Prada, G. Gutierrez, D. Sarabia, I.E. Grossmann, R. Gonzalez, Implementation of RTO in a large hydrogen network considering uncertainty, Optim. Eng. (2019b) http://dx.doi.org/10.1007/s11081-019-09444- 3. [14] S. Skogestad, Plantwide control: the search for the self-optimizing control structure, J. Process Control 10 (2000) 487–507, http://dx.doi.org/10.1016/ S0959-1524(00)00023-8. [15] D. Sarabia, C. de Prada, E. Gómez, G. Gutierrez, S. Cristea, J.M. Sola, R. Gonzalez, Data reconciliation and optimal management of hydrogen networks in a petrol refinery, Control Eng. Pract. 20 (2012) 343–354, http://dx.doi.org/10.1016/j.conengprac.2011.06.009. [16] A. Galan, C. de Prada, G. Gutierrez, D. Sarabia, R. Gonzalez, M. Sola, S. Marmol, Validation of a hydrogen network RTO application for decision support of refinery operators, IFAC-PapersOnLine 51 (2018) 73–78, http: //dx.doi.org/10.1016/j.ifacol.2018.09.256. [17] EA Internacional, PROOSIS, 2019. [18] A. Alessandri, M. Baglietto, G. Battistelli, V. Zavala, Advances in moving horizon estimation for nonlinear systems, Proc. IEEE Conf. Decis. Control (2010) 5681–5688, http://dx.doi.org/10.1109/CDC.2010.5718126. [19] J.B. Rawlings, State estimation using moving horizon estimation and particle filtering, UW Math. Probab. Semin. (2009) 1–45. [20] J.B. Rawlings, L. Ji, Optimization-based state estimation: Current status and some new results, J. Process Control 22 (2012) 1439–1444, http: //dx.doi.org/10.1016/j.jprocont.2012.03.001. [21] V.M. Zavala, C.D. Laird, L.T. Biegler, A fast moving horizon estimation algorithm based on nonlinear programming sensitivity, J. Process Control 18 (2008) 876–884, http://dx.doi.org/10.1016/j.jprocont.2008.06.003. [22] J.D. Hedengren, A.N. Eaton, Overview of estimation methods for industrial dynamic systems, Optim. Eng. 18 (2017) 155–178, http://dx.doi.org/10. 1007/s11081-015-9295-9. [23] C.V. Rao, J.B. Rawlings, in: F. Allgöwer, A. Zheng (Eds.), Nonlinear Moving Horizon State Estimation BT - Nonlinear Model Predictive Control, Birkhäuser Basel, Basel, 2000, pp. 45–69. [24] N. Arora, L.T. Biegler, Redescending estimators for data reconciliation and parameter estimation, Comput. Chem. Eng 25 (2001) 1585–1599, http: //dx.doi.org/10.1016/S0098-1354(01)00721-9. [25] B. Nicholson, R. López-Negrete, L.T. Biegler, On-line state estimation of nonlinear dynamic systems with gross errors, Comput. Chem. Eng 70 (2014) 149–159, http://dx.doi.org/10.1016/j.compchemeng.2013.11.018. [26] A. Galan, C. De Prada, G. Gutierrez, D. Sarabia, R. Gonzalez, Predictive Simulation Applied To Refinery Hydrogen Networks for Operators’ Decision Support, IFAC-PapersOnLine 52 (2019a) 862–867. [27] L.T. Biegler, Nonlinear Programming, Society for Industrial and Applied Mathematics, Society for Industrial and Applied Mathematics, 2010, http: //dx.doi.org/10.1137/1.9780898719383. [28] Y. Cao, S. Li, L. Petzold, R. Serban, Adjoint sensitivity analysis for differential-algebraic equations: The adjoint DAE system and its numerical solution, SIAM J. Sci. Comput 24 (2003) 1076–1089, http://dx.doi.org/10. 1137/s1064827501380630. 63 A. Galan, C. De Prada, G. Gutierrez et al. Journal of Process Control 100 (2021) 41–64 [29] Y. Cao, S. Li, L. Petzold, Adjoint sensitivity analysis for differential–algebraic equations: Algorithms and software, J. Comput. Appl. Math 149 (2002) 171–191, http://dx.doi.org/10.1016/S0377-0427(02)00528-9. [30] R. Serban, C. Petra, A.C. Hindmarsh, User documentation for idas v3.1.0 (sundials v4.1.0) [WWW Document], 2019, https://computation.llnl.gov/ sites/default/files/public/idas_guide.pdf (accessed 6.18.19). [31] P. Gill, W. Murray, M. Saunders, SNOPT: An SQP algorithm for large-scale constrained optimization, SIAM Rev. 47 (2005) 99–131, http://dx.doi.org/ 10.1137/S0036144504446096. [32] P.E. Gill, W. Murray, M.A. Saunders, E. Wong, User’S Guide for {SNOPT 7.7}: Software for Large-Scale Nonlinear Programming, La Jolla, CA, 2018. 64