1. Introduction
Today, the chemical industry faces a huge challenge: the transition to reduced CO
2 footprints and enhanced sustainability while staying competitive. Optimizing the operation of plants and processes that cannot be directly replaced by sustainable alternatives is an important factor in reducing the industry’s emissions. One example of large-scale energy intensive processes is the production of polyurethanes and their precursors, which are used, e.g., in the production of foams. These foams are used in applications ranging from shoes and mattresses to refrigerators, building insulation, and cars [
1].
The most widely used precursor of polyurethanes is diphenylmethane diisocyanate (MDI). In the current production process, large heat inputs are needed, which are mainly provided in the form of steam and transferred to the process via heat exchangers. Fouling in the heat exchangers reduces their efficiency and eventually leads to the need of cleaning and plant shutdowns. The rate of fouling depends on the operating conditions of the process. Consequently, there is a strong interest to optimize the operation of the heat exchangers to reduce the fouling while maintaining high productivity levels [
2].
This task is within the scope of real-time optimization (RTO), where numerical optimization is typically employed at relatively long sampling times to optimize the stationary operating conditions of, e.g., a chemical plant. For RTO, a mathematical model of the process is needed that accurately describes the plant and can be coupled with modern optimization solvers [
3]. For many large-scale production processes, detailed steady-state simulation models are available in designated software: so-called flow-sheet simulators. These are either commercial products or in-house tools of the producing companies. Such simulators are designed for the interactive use by process designers and the emphasis is on very detailed and accurate descriptions of the behaviour of the processes, at the expense of computational efficiency. Moreover, convergence problems may occur and often, there is no option offered to couple them directly to real-time data acquisition and process control systems. In [
4], employing artificial neural networks (ANNs) as surrogate models was proposed, which approximate the detailed flow-sheet simulation of complex processes, as well as using these surrogate models in an RTO scheme. Thus, the flow-sheet simulator acts as an offline data source or digital twin for the identification of the ANN models, which are then employed in the online application of RTO. The combination of surrogate modeling and digital twins enables the fast execution of the underlying models as well as the integration of measured data or only partly understood phenomena into optimization [
5]. The idea is to use surrogate models of flow-sheet simulators for large-scale optimization [
6].
Generally, RTO schemes need to handle the inevitable mismatch between the optimization model and the real behaviour of the plant; due to this discrepancy, the application of the optimal set-points that were computed for the plant model may not lead to an optimal operation of the real plant. This can result in sub-optimal performance or even infeasible operating conditions [
7]. Several approaches have been proposed to address the issue of plant–model mismatch. The best known and most widely used approach is the two-step approach, see, e.g., [
8], where, at each sampling time or at longer intervals, some parameters of the plant model are updated based on the available measurements and the optimization is performed using the updated model. The number of parameters that can be estimated depends on the available information. The two-step approach is tailored to the situation where the model is structurally correct so that it can represent the true plant behaviour for a suitable set of parameters. However, strictly speaking, this is never true, and practically, there may be significant unmodelled effects and phenomena. In this case, parameter updates may even lead to worse results than using a nominal model [
9] and in general, the true optimum may not be achieved. Nonetheless, the two-step approach is the standard RTO methodology in industry, especially in the petroleum industry [
10]. Often, it is applied in combination with (linear) model predictive control. Therefore, the economics are optimized via RTO and constraint satisfaction is enforced by a model predictive controller [
11].
In Modifier Adaptation (MA), instead of adapting model parameters, the optimization problem itself is updated. Zeroth-order (bias) and first-order (gradient) correction terms, also called modifiers, are added to the cost and constraint functions to match the Karush-Kuhn-Tucker conditions (KKT) and to achieve the true plant optimum up on convergence. This was first proposed by Tatjewski [
12] and extended to problems with constraints in [
13]. While bias correction is well-known and easy to implement, the estimation of the gradients of the cost function and of the constraints of the real plant is the most challenging element of the MA approach. They can be approximated by finite difference (FD) methods, as discussed in [
13,
14], making use of available measurements rather than perturbing the plant at each iteration possible. However, using finite differences leads to a high sensitivity to measurement noise or disturbances for small step sizes and to inaccurate approximations for larger step sizes. To cope with this problem, in [
15], a new technique, called Modifier Adaptation With Quadratic Approximations (MAWQA), was proposed where the cost and constraint functions of the plant are approximated by quadratic functions. The required gradients are then calculated based on the quadratic approximations. Due to the smoothing effect of the least-squares minimization in the identification of the approximations, MAWQA is more robust to noise. MAWQA was inspired by “derivative-free optimization” as proposed in [
16] and incorporates techniques for data-point selection [
17], the use of trust regions, and a model quality check. MAWQA has been successfully implemented to lab- and pilot-scale plants, as shown in [
18,
19,
20,
21]. A combination of MAWQA and Effective Model Adaptation (EMA) was successfully demonstrated at a lab-scale membrane plant. In EMA, the model parameters are updated while enforcing its adequacy for the optimization [
22].
A drawback of MAWQA is that the minimum number of data points that are needed to compute the quadratic approximations is a quadratic function of the number of inputs. This limits its application to large-scale plants, where the efficient quadratic approximations can only be used for the first time after a relatively large number of probing steps and iterations have been performed, e.g., 21 plant evaluations for five inputs that are optimized. This problem can be addressed by combining Modifier Adaptation with distributed optimization. The goal of the application of decomposition techniques is to split the optimization problem into a set of smaller problems, each with fewer inputs. In [
23], Modifier Adaptation was investigated in the context of distributed optimization. Three different algorithms were presented, which exchange different amounts of information between the subsystems. In all three algorithms, the modifiers are identified globally with respect to all decision variables. The focus of the study was on assuring privacy between the different subsystem operators (e.g., different plants in a chemical site), which is paid for by reducing the speed of convergence. In [
24], a similar approach was successfully applied to gas compressor stations both in simulations and lab-scale settings. The modifiers are estimated locally on a subsystem-level and finite differences are used for the gradient estimation. In [
25], the same approach was applied to output Modifier Adaptation (MAy). In MAy, the model outputs rather than the objective and constraint functions are adapted. Consequently, the modifiers of the sub-models can be computed individually and the modified outputs are then fed into the global constraint and objective functions.
Another approach was presented by [
26]. Here, distributed feedback optimizing control is used to apply RTO to a gas-lifted oil well rig in simulation. The RTO problem is stated as a cascaded control structure that resembles the dual descent method. In the inner loop, the gradients of the Lagrangian are controlled to be zero, while in the slower outer loop, the Lagrange multipliers are updated to satisfy the constraints. However the poor scalability in combination with the complex control structure design for larger systems limits its application [
27]. In [
28], the approach was applied to a lab-scale gas-lifted oil rig.
Ref. [
29] proposed using Gaussian processes in Modifier Adaptation. This was demonstrated in the optimization of wind farms [
30] and for a lab-scale gas-lifted oil-rig [
31].
Ref. [
32] proposed another method to reduce the number of gradients that are estimated with the goal of enabling the application of MA to larger systems. The plant gradients are only computed with respect to few privileged directions in the inputs space, which are identified based on the sensitivity of the Lagrangian with respect to some uncertain parameters. The scheme was successfully applied to optimize the trajectory of an airborne energy system. It has not yet been investigated though as to how this could be generalized to structural plant–model mismatch. Despite all these advances in Modifier Adaptation and beyond, it still lacks acceptance and application in the industry [
10].
In this work, MAWQA is combined with distributed estimation of the required modifiers to enable its application to large-scale systems. The problem is decomposed by means of introducing coupling variables while retaining a centralized optimization to ensure rapid convergence. Moreover, it avoids the convergence problems of distributed optimization algorithms (see, e.g., [
33]). In this way, decomposition is performed only for the identification of the local quadratic approximations for the estimation of local modifiers. In addition, the decision between solving the modified optimization problem and an optimization problem based on the quadratic approximation, the trust-region constraints, and potentially required additional perturbations are handled on the subsystem level. The distribution of the modifier estimation problem thereby exploits the structure of the plant at hand. Hence, the required number of perturbations can be reduced and the speed of convergence to the true optimum of the overall plant can be improved. If the decomposition is conducted with respect to subunits of a plant, there is usually no need to respect limitations of the sharing of data; hence, an integrated optimization is feasible. The method presented in this paper has successfully been applied to the operator training simulator of the MDI-production process of the MDI producer Covestro, which provides an accurate digital twin of the real plant. The model of the OTS is structurally different from the model used in the flowsheet simulator and shows a different behaviour. In comparison to previous work [
4], faster convergence is achieved. The distributed MAWQA method was first been proposed in [
34]. In this paper, we extend this work and provide a detailed analysis for a small case study as well as for the MDI process.
The remainder of the paper is structured as follows:
Section 2 describes the concepts of Modifier Adaptation and MAWQA, as well as the distributed estimation of modifiers. In addition, the distributed scheme is applied to a small case study.
Section 3 provides an overview of the investigated MDI process.
Section 4 and
Section 5 present the application of the distributed MAWQA scheme to the MDI process and the results obtained. Finally,
Section 6 provides a conclusion to the paper and directions for further research.
3. Isocyanate Production Process
Here, we consider one process stage of the production of diphenylmethane diisocyanate (MDI), as described in [
4]. In the 1930s, the industrial production of MDI became important after the addition polymerization of difunctional isocyanates was discovered by O. Bayer. Methylene diphenyl diisocyanates are important feedstocks for the production of polyurethanes, and diphenylmethane diisocyanate (MDI) is the most widely used precoursor of polyurethanes [
1]. Polyurethanes are a main component in the foam production with end-user applications ranging from mattresses and footwear to refrigerators, insulation panels, and cars.
In the process stage that is considered here, methylenedianiline (MDA) reacts to MDI in several reactors. Thereafter, MDI is separated from other gaseous reaction products. During the reaction and the separation step, several heat exchangers transfer heat to the process that is provided in the form of steam [
4]. The objective of this work is to improve the energy efficiency of the MDI process and reduce its downtime by optimally distributing the total heat required in this process stage among the available heat exchangers, so that fouling on the process side is minimized and cleaning operations are needed as infrequently as possible [
2]. The speed of the fouling processes is directly correlated to the pressure and temperature of the steam. If the steam temperature in a heat exchanger is high, fouling processes are accelerated on the process side of that heat exchanger. In order to be able to transfer the same amount of heat for this state of increased fouling, the steam temperature has to be increased, which results in more accelerated fouling such that cleaning activities are soon unavoidable. Rather than applying the same amount of heat input to the heat exchangers subject to increased fouling, it is preferable to transfer part of the required heat via the heat exchangers subject to less fouling. This leads to the goal that the steam pressures of all heat exchangers remain close to their clean values. In this manner, not only is the overall steam demand reduced but the time until the next cleaning activities are necessary is also extended.
The process consists of two stages. In the reaction stage, MDA reacts to MDI in multiple reactors that are operated in parallel. The outlet streams of the reactors are mixed and further processed in the separation stage, where multiple units are operated in sequence. In each unit, heat is supplied via heat exchangers.
Figure 7a shows the scheme of the MDI-plant. Each heat exchanger is equipped with a cascaded control structure, see
Figure 7b, that consists of a temperature controller in the outer loop and a pressure controller in the inner loop.
3.1. Surrogate Modeling of the MDI Process
In order to implement a model-based RTO scheme, a mathematical model that represents the process under consideration is needed. A physics- and chemistry-based steady-state model of the complete MDI production process is available in Covestro’s in-house simulator. The model comprises about 160,000 equations and is an accurate representation of the process that is used for design studies. However, it cannot be directly coupled with an optimization algorithm and its execution time is too long for real-time applications. As proposed in [
4], artificial neural networks (ANNs) can be used as a surrogate model of the flowsheet simulation. For the training of the ANN model, the simulator acts as a data generator.
In this case, several ANNs are combined to represent the full plant that is presented in
Figure 7a. All quantities of interest, which are the heat duties or steam pressures in the heat exchangers, are modelled individually for each subsystem as represented formally by Equations (
43) and (
44). The quantities,
X, in the reaction stage depend only on the temperature set-point
and the load
of the corresponding
i-th heat exchanger. For the separation stage, the independent variables are the corresponding temperature set-points
, the mixing temperature
, and the load
.
is the temperature of the mixed outlets streams that enter the separation stage. The load describes the mass flow entering the unit operation. In the remainder of the work, the load argument is dropped for better readability.
The manipulated variables (e.g., temperature set-points) and the plant load were sampled on an equidistant grid and the outputs
X calculated by the flow-sheet simulator. All models were identified using the Levenverg–Marquardt algorithm in Matlab’s deep learning toolbox [
36]. The networks consist of one layer with 8–32 neurons where the
-activation function and a linear output layer are employed. Further information on the training of the surrogate models can be found in [
4].
3.2. Operator Training Simulator
As a representation (or digital twin) of the real plant, an operator training simulator (OTS) is used. Operator training simulators are utilized to train new plant operators and to enhance the abilities of plant operators to handle abnormal operating conditions, which leads to less activation of interlocks and less unplanned shutdowns. The OTS is also utilized to test new process control schemes. This has the advantage that the tests can be performed independent of the production schedule and can be carried out under specified and repeatable conditions. Furthermore, the obtained simulation results can be used to increase the understanding and acceptance of advanced process control methods among plant personnel.
The OTS consists of an emulated version of the distributed control system of the real plant and a semi-rigorous dynamic process model. The dynamic process model is defined and implemented in a manner such that the OTS is able to simulate the process in a numerically stable way for a large set of operating conditions including start-up and shutdown scenarios in real time. The accuracy must be sufficient to make the operators feel as if they control the real plant. The OTS of the MDI plant is realized in the Workforce Competency framework by Honeywell Forge. One the one hand, the OTS model contains much more detail of the plant (e.g., controllers) and on the other hand, the model of the physics and chemistry of the plant is simpler than the stationary model in the flowsheet simulator; there is a significant mismatch between the stationary behaviour of the OTS and the flowsheet simulator. In addition, noise is present in the simulation. This is shown in detail in [
4].
4. Application to the Process
The MAWQA scheme presented in
Section 2.3 is applied to the MDI production process (
Section 3). The OTS is used as a substitute of the real plant as experiments are possible with the OTS and the operators accept it as a faithful representation of the behaviour of the plant. The computed set-points were entered manually to the OTS after every iteration of the MAWQA scheme and the average time to steady-state is 2–4 h. For the initialization of the algorithm, a case-specific probing sequence is used, which is described in
Section 4. Two different scenarios are investigated. In the first scenario, the RTO algorithm is started from a standard operating point of the plant to find optimal operation conditions that minimize the fouling in the heat exchangers. After the algorithm has converged, the total load of the plant is changed, which acts as a known disturbance. In the second trial, the algorithm is started from a different operating point and the process is disturbed after convergence by a change in the heat transfer coefficients of a subset of the heat exchangers, which represents an unmeasured change in the behaviour of the plant. In between the two experiments, the OTS was updated by Covestro in the course of regular maintenance, which leads to small differences in the initial steps of the algorithms. In all experiments, the same formulation of the optimization problem ((
46)–(
51)) is used and the required models for
and
are identified as described in
Section 3.1.
and
are the set-points of the heat exchangers of the reactors and of the separators.
is the temperature of the stream that enters the separation section, which acts as a coupling variable.
is based on a mixing rule and is determined by Equation (
51). The vector of weighting factors
depends on the heat capacities, mass flows, and temperatures of the outgoing streams of all reactors. The function
, cf. Equation (
22), is thus linear. The subscripts
I identifies the reactors and the subscript
II identifies the separators. The differences of the stream pressures in the heat exchangers
and the desired reference values
are penalized quadratically. The numbers of reactors and separators are
and
.
are the heat duties, and the total heat duty of all reactors and separators is bounded by the lower bound
and upper bound
. The bounds depend on the total load of the production plant
. In addition, there is an upper bound
of the available steam pressure. All temperature set-points must be in the range between
and
. All optimization problems were solved in Matlab [
36] using IPOPT [
38] within the OPTI toolbox [
37].
Initial Probing Sequence
Before bias and gradient correction are applied in MA or MAWQA, the system must be probed to collect enough data points to allow estimation of the plant gradients. Initially, finite differences are used; thereafter, quadratic approximations provide more robust gradient estimates. The structure of the MDI-plant can be exploited to reduce the length of the initial probing sequence, as the probing actions for the reaction and separation stages can be decoupled. Ref. [
13] proposed maximizing the inverse condition number
to yield a good approximation by finite differences. An optimization problem is solved to compute probing actions when the identification matrix
becomes nearly singular; in this work, the initial probing sequence also was determined by solving the optimization problem
with
As
, only two perturbations, designated as
, are required to estimate all plant gradients. The superscript
k indicates the perturbation number. The perturbations are added to the initial inputs
for the reaction stage (
I) and the separation stage (
). The mixing temperature
is calculated according to Equation (
54).
and
are user-defined parameters that control the minimum and maximum step-size. An exemplary result for the initial probing sequence can be seen in
Figure 8. The initial set-points and the two perturbations are plotted for the models in the reaction stage (lower graph) and separation stage (upper graph). The set-points of the separation stage are placed to ensure a good approximation using FD as there are two inputs. After applying two vectors of set-points to the reaction stage, the quadratic approximations can already be computed as the models only have one input. Due to the parallel structure in the reaction stage, only two trajectories are visible as the individual trajectories of the reactors lie on top of each other.