An intelligent approach of controlled variable selection for constrained process self-optimizing control

ABSTRACT Self-optimizing control (SOC) is a technique for selecting appropriate controlled variables (CVs) and maintaining them constant such that the plant runs at its best. Some tough challenges in this subject, such as how to select CVs when the active constraint set changes remains unsolved since the notion of SOC was presented. Previous work had some drawbacks such as structural complexity and control inaccuracy when dealing with constrained SOC problems due to the elaborate control structures or the limitation of local SOC. In order to overcome the deficiency of previous methods, this paper developed a constrained global SOC (cgSOC) approach to implement self-optimizing controlled variable selection and control structure design. The constrained variables that may change between inactive and active are represented as a nonlinear function of available measurement variables under optimal operations. The unknown function is then intelligently learnt over the whole operating region through neural network training. The difference between the nonlinear function and the actual constrained variables measured in real-time is then used as CVs. When the CVs are controlled at zero in real-time, near-optimal operation can be ensured globally whenever active constraint changes. The efficacy of the proposed approach is demonstrated through an evaporator case study.


Introduction
Process optimization is important in chemical production. However, under numerous disturbances and uncertainties, operation optimization is challenging to achieve. Real-time optimization (RTO) is a quite popular technique that solves the problem by doing online optimization runs repeatedly. However, it has to wait for a quite long time, e.g. hours, until the system reaches the steady state between two optimization runs. Repeated optimization with a complicated process model also means a heavy computation load. Furthermore, since the RTO is implemented in an open-loop form, it is not reliable when the uncertainty in the system is not well estimated. Due to these drawbacks, the true real-time optimization may not be achieved (Rangaiah & Kariwala, 2012). As a contrast, self-optimizing control (SOC) (Skogestad, 2000) concentrates on selecting appropriate controlled variables (CVs) which are maintained constant through feedback control, then automatically, the plant can reach optimal or near optimal operation (the economic loss is acceptable) under various disturbances and uncertainties. In SOC method, the key is to select CVs. The self-optimizing CVs are generally selected offline by solving optimizing problems which is a time-consuming and computation-intensive procedure. Since this procedure is accomplished offline in SOC and only simple feedback calculation is required online, the online computational burden is greatly reduced compared to RTO. In addition, the selected CVs are maintained constant online through a control system such that the plant operation is optimal or near optimal in real-time.
The CV selection methodology in SOC has been studied for many years (Jäschke et al., 2017). Halvorsen et al. (2003) derived an exact local method based on the second-order Taylor approximation of the economic objective function around the nominal optimal point and then the CVs are found as the optimal linear combination of available measurement variables. Kariwala (2007) and Kariwala et al. (2008) introduced eigenvalue decomposition techniques for minimizing the local worst-case and average losses, respectively, to determine the analytical optimum linear combination matrix H for local SOC. Meanwhile, Alstad and Skogestad (2007) and Alstad et al. (2009) proposed null space and extended null space methods to get explicit expression of H by minimizing the loss without and with measurement noise. The null space method obtains H as the left null space of optimal sensitivity matrix which is the gradient of optimal measurements with respect to disturbances, while in its extended version, the optimal H is obtained by utilizing the additional degrees of freedom to reduce the loss resulted from measurement noise.
However, all of the works mentioned above were created within the context of the exact local method which relies on local linearization, and hence may be not satisfactory when the variation range of disturbances becomes large in the whole operating region. Therefore, some researchers have attempted to solve the problem by developing new methods to determine the CVs. Ye et al. (2013) chose the necessary conditions of optimality (NCO) as CVs which were controlled at zero to keep optimality. The unmeasured NCO was approximated by optimal measurements sampled over the whole operating region. It realized good global performance of SOC and provided a way to find nonlinear CVs (nonlinear combination function of measurements). Nevertheless, the NCO is exact zero at the optimum and the regression problem can be singular. Ye et al. (2015) proposed a new global SOC (gSOC) method to find globally optimal CVs by minimizing average economic loss during the whole space. The loss function is reformulated as a quadratic form explicitly against the CVs based on the second-order Taylor expansion at many independent disturbance scenarios within the whole space, rather than a single reference point in the local method. Then the optimal H can be derived by minimizing the quadratic economic loss function.
Aforementioned local and global methods are assumed that the active constraint set is unchanging. Whereas, some constraints may reach their limits under different disturbances in practice, leading to the unconstrained degrees of freedom varying among different disturbance regions. Manum and Skogestad (2012) applied the null space method (Alstad & Skogestad, 2007) in different regions specified by a parameric program. A switching strategy was developed for different regions. One of the weakness of the method is it has different CVs in different regions and the switching strategy also gains the complexity in application. Cao (2004) developed a cascade control structure to deal with the active set changing problem by controlling the self-optimizing CVs (such as the gradient of the cost function) in the outer loop at constant setpoints and the conditionally active constraints in the inner loop. There is a saturation block in the inner loop to ensure the constrained variables would not exceed their limits. Nonetheless, this structure demands that the number of CVs should be more than the number of constrained variables that may change between inactive and active. This is because one constrained variable in the inner loop corresponds to one CV in the outer loop. Hu et al. (2012) presented the explicit constraint handling approach to select CVs while assuring all of the constraints are satisfied, but the approach is based on the exact local method with worst-case constraints, which may cause poor performance in the global sense.
From the above discussion, existing methods associated with active constraint set changing are still not well developed. This paper proposes a novel constrained gSOC (cgSOC) method to solve the above concerns. It achieves the aim by finding globally optimal CVs through offline neural network training. The intelligently determined CVs are then controlled constantly online to achieve optimal or near optimal operation under the circumstance that the active constraint set may change. The main contribution of this work is to derive an intelligentlearnt self-optimizing CVs which are applicable to cases of varying constraint activeness. The proposed cgSOC method is compared with NCO approximation method  to prove its superiority.
The paper is constructed as follows. Section 2 presents the mathematical formulation of constrained gSOC problem and also the method for CV selection. Section 3 employs the proposed cgSOC method to an evaporator case study for its application. Finally, the paper is concluded in Section 4.

Description of constrained gSOC problem
The following constrained static nonlinear optimization problem is considered when optimizing the operation of chemical processes where J is a to-be-minimized scalar objective (economic cost) function. f : R n u ×n d → R n y and g : R n u ×n d → R n g are the input-output model function and constraint function, respectively. The constraints g are generally associated with the operational safety or product quality. u ∈ R n u , y m ∈ R n y and y ∈ R n y are the manipulated variables, measured and true measurements, respectively. d ∈ R n d and n ∈ R n y , are the disturbances and measurement noises. All the elements in d and n are assumed to be distributed independently and identically. The allowable range for the scaled d and n, i.e. d and n , is [d T n T ] T ∼ N(0, 1) for Gaussian distributions, or [d T n T ] T ∞ ≤ 1 for uniform distributions. In addition, the economic loss is defined as the difference between the actual economic cost and its optimal value. In practice, during the whole operating region, the operational constraints g under optimal operations can be categorized into three types: (i) g 1 : always active; (ii) g 2 : always inactive; (iii) g 3 : change between active and inactive. The g 1 constraints should be tightly controlled by adjusting the corresponding manipulated variables, hence the same number of degrees of freedom in u is consumed. Therefore, the original optimization problem can be simplified into an unconstrained one, and thus the optimal CVs can be easily found using previously mentioned SOC methods. For the second type, the g 2 constraints can be simply ignored because they have no effect when solving the optimization problem. On the contrary, special attention needs to be paid to the g 3 constraints. The symbol g is referred to g 3 in the following without loss of generality. This work focuses on how to select CVs when the third type constraints exist. For simplicity, it is assumed that the degrees of freedom of the system are equal to the number of such constraints.

An artificial neural network learning approach
The key of SOC is that the appropriate self-optimizing CVs c need to be found, and by controlling c at constant setpoints the optimal operation (1) can be easily achieved without the necessity to calculate optimal u by solving the nonlinear optimization problem repeatedly. For constrained SOC problem, an additional requirement for c is to guarantee the constraints hold within the whole operating space. However, by enforcing all the constrained variables in the worst-case to be strictly within their allowable boundaries may result in large deviation from the optimal operation. This is because the optimality of the system is sacrificed to make sure that the constraints are strictly satisfied and thus this way is rather conservative.
In order to reduce the conservatism of this method, the constrained variables should track their optimal values as close as possible over the entire operating space, and meanwhile the economic loss should still be acceptable. Since the optimal values of constrained variables occasionally reach the upper limits, or reach the lower limits or fall in between, they cannot simply be controlled at constant setpoints. Therefore, this work proposes to derive an intelligently-learnt self-optimizing CVs using artificial neural network (ANN) which can approximate any function with a certain basic network structure (Bishop, 1995).
The feedforward neural network is a simple and widely-used type of ANN. It generally contains input, output and hidden layer with a certain number of neurons respectively. The approximated outputô is associated with input x as followŝ where W 1 , W 2 , b 1 and b 2 are the input weight, output weight, input bias and output bias, respectively. Every element of σ is an activation function and the sigmoid function is the most commonly used which is described as where n h is the number of neurons in the hidden layer. The process of training ANN is to determine W 1 , W 2 , b 1 and b 2 by minimizing the mean square error (MSE) defined as where o i,j is the target of the ith sample of the jth output of ANN, and N and n o are the number of samples and outputs respectively. One of the most common training algorithms is back-propagation, which is accomplished through iteratively repeated backward propagation of the error function, i.e. MSE until reaching the maximum number of iterations or the error is acceptably small.

Constrained gSOC method
The overall procedure for implementation of the proposed constrained gSOC (cgSOC) method can be divided into two parts, hence offline CV selection and online SOC implementation. For offline CV selection, in the whole operating space, Monte Carlo simulation is used to randomly generate N samples in the disturbance range. For each d i (i = 1, . . . , N), the optimization problem (1) can be solved based on numerical algorithms, such as interior point, the sequential quadratic programming (SQP), etc. Then the optimal data set including optimal values of measurement variables y i and constrained variables g i , i.e. y opt i and g opt i (i = 1, . . . , N) can be obtained. Within the optimal data set, the optimal values of the constrained variables can be represented by a nonlinear function of the optimal values of measurement variables through ANN training. The nonlinear function can be represented as g opt = h(y opt , θ). The off-line learnt function can then be used online to construct a CV as explained below.
For online implementation, values of measurement variables and constrained variables are measured in real time from sensors, i.e. y m and g m . In order to keep the constrained variables g m at their optimal values in real time, the off-line learnt function h(y m , θ) with real-time measurements y m can be taken as dynamic setpoints for g m to track. In other words, c = h(y m , θ ) − g m are the CVs. Since the number of such CVs is equal to the degrees of freedom of the system and the relationship is learnt from the optimum, when these CVs are controlled at zero, the system will operate at optimum or near optimum.
This procedure is vividly presented in Figure 1 and the algorithm to implement the proposed cgSOC method is summarized in Algorithm 1.  (2) Determine the entire operating region, and sample the whole space using randomly and independently generated disturbances based on Monte Carlo simulation method.

Case study
To prove the efficacy of the proposed cgSOC method, a forced-circulation evaporator process (Newell & Lee, 1988;Ye et al., 2013) was employed. Figure 2 illustrates the process. In the process, through a vertical heat exchanger and condensate reflux, the solvent in the feed stream is evaporated and the concentration of the dilute liquor is increased. The detailed model equations can be found in the Appendix. The state variables, manipulated variables, disturbance variables and all available measurement variables can be clearly listed as follows The range of variation of disturbances are set to be ±20 % of their nominal values d * = [10 5 40 25] T . The measurement noises of pressure and flow are set to be ±2.5 % and ±2 % of their nominal values respectively, and as for temperature, it is ±1 • C. The cost scalar function ($/h) of the evaporation process can be defined as follows (Cao, 2004) The process constraints related to the safety and quality are listed as follows 40 kPa ≤ P 2 ≤ 80 kPa (6) P 100 ≤ 400 kPa (7) The nominal values of all the 20 process variables and the cost objective function can be obtained by minimizing J satisfying all the constraints (5)-(9), and they are listed in Table 1. Then the analysis of degrees of freedom is required. The constraints in (8) and (9) are always satisfied and inactive, and thus can be ignored. The constraints in (5) and (6) are always active during the whole disturbance scenarios. Besides, the P 2 constraint varies between active and inactive in the entire operating space and is the only constrained variable needed to be considered. The physical explanation can refer to Cao (2004). Therefore, the two active constraints plus the separate level L 2 which has no steady-state effect should be maintained at their nominal values, and thus three corresponding degrees of freedom are consumed in total. In the following, the remaining degree of freedom is given as u = F 200 without loss of generality. Therefore, it is needed to select one more variable as the self-optimizing CV.
The Monte Carlo simulation is applied to produce 1000 random samples in the predefined set of disturbance variation, followed by numerical optimization to obtain optimal values of measurement and constraint variables at each sampling point. There are totally 10 measurement variables and it is not necessary to choose them all (Ye et al., 2015). Optimal measurement subsets can be selected using exhaustive search or branch and bound algorithm Kariwala & Cao, 2009, 2010Kariwala et al., 2013). One of the best subsets of four measurements is considered as below The optimal values of the four measurements y and the constrained variables P 2 , i.e. y opt and P opt 2 are the input and output data, respectively, to train ANN. There are three layers in the ANN, namely, the input layer, the  , θ).
Then the online expression of the self-optimizing CV is c = h(y, θ ) − P 2 , which is kept at zero through feedback control. The Monte Carlo simulation is carried out with 100 randomly generated samples in the set of disturbance variation. To confirm the superiority of the proposed cgSOC method, a previous method, the necessary condition of optimality (NCO) approximation using ANN , is compared with the proposed cgSOC method, and the simulation results are depicted in Figure 3. The 100 samples are arranged in ascending order of optimal values of P 2 . From Figure 3(a), it is can be seen that the average, maximum and standard deviation of the economic loss of NCO approximation method are all comparatively larger than that of cgSOC method, which are detailedly listed in Table 2. Meanwhile, the deviation of P 2 from its optima calculated by NCO approximation method is relatively greater than that by cgSOC method, which means the constrained variable P 2 in cgSOC method better tracks the optimal values as well as ensuring the optimality of the system.

Conclusions
This paper proposed a novel CV selection methodology using intelligent approach to handle the problem of conditionally changed active constraint set occurred in self-optimizing control of a plant. In the method, the constrained variables that may change between inactive and active are presented by a nonlinear function of selected measurement variables through ANN training during the whole optimal operating space. Then the difference between the intelligently learnt function and the constrained variables is chosen as the self-optimizing CVs. The optimality of the system can be guaranteed through a feedback control of the CVs at zero setpoints.
However, only a single activeness varying constraint is considered in this work. To extend the idea to more general cases will be investigated in future.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Funding
This work was supported by the Institute of Zhejiang University-Quzhou Science and Technology Project (IZQ2019-KJ-021).