scieee AI-readable full text Open interactive document viewer

Steady-State Optimality Analysis of MPC Controllers

Jozef Vargan; Jakub, Puk; Karol, Ľubušký; Miroslav, Fikar

Abstract

Due to their complexity, production units and equipment in petrochemical plants need to be controlled by advanced process controllers (APC). The optimality of APC control is closely connected with the setting of constraints, while their inappropriate setting leads to a loss of the generated profit. In order to inform the operator in time, we create a tool that analyses the effectiveness of constraints setting. We design a copy of the APC model as a static optimization problem with the implementation of soft constraints. Two methods are employed: local sensitivity analysis using Lagrange multipliers and non-local sensitivity analysis. An ordered list of recommendations is created for plant engineers, providing information on the effectiveness of constraint setting for a single point of operation or during a specific time interval.

Full text

Flavio Manenti, Gintaras V. Reklaitis (Eds.), Proceedings of the 34th European Symposium on Computer Aided Process Engineering / 15th International Symposium on Process Systems Engineering (ESCAPE34/PSE24), June 2-6, 2024, Florence, Italy © 2024 Elsevier B.V. All rights reserved. Acknowledgments: This work is funded by the Slovak Research and Development Agency (project no. APVV-21-0019), by the Scientific Grant Agency of the Slovak Republic (grant no. 1/0691/21), and by the European Union under Horizon Europe Grant Agreement number 101079342 (Fostering Opportunities Towards Slovak Excellence in Advanced Control for Smart Industries). Steady-State Optimality Analysis of MPC Controllers Jozef Vargan,a* Jakub Puk,b Karol Ľubušký,c Miroslav Fikar,a aSlovak University of Technology in Bratislava, Bratislava 81237, Slovakia bATP spol. s.r.o., Bratislava 841 01, Slovakia cSlovnaft, a.s., Bratislava 82412, Slovakia jozef.varga[email protected] Abstract Due to their complexity, production units and equipment in petrochemical plants need to be controlled by advanced process controllers (APC). The optimality of APC control is closely connected with the setting of constraints, while their inappropriate setting leads to a loss of the generated profit. To inform the operator in time, we create a tool that analyses the effectiveness of constraints setting. We design a copy of the APC model as a static optimization problem with the implementation of soft constraints. Two methods are employed: local sensitivity analysis using Lagrange multipliers and non-local sensitivity analysis. An ordered list of recommendations is created for plant engineers, providing information on the effectiveness of constraint setting for a single point of operation or during a specific time interval. Keywords: MPC Maintenance, FCC Unit, Optimal Steady-State, Constraints Analysis 1. Introduction Model Predictive Control (MPC) represents an advanced process control strategy routinely applied in refineries nowadays (Lee, 2011; Schwenzer et al., 2021). This is due to increasing demand for profit increase, reduction of variability of products, or a reduced amount of off-specification products. In addition, it is possible to control multivariable units with dozens of input and output variables where manual control or a series of singlevariable loops is either impractical or not realizable. All these favorable properties come with a price, which is the complexity of MPC controllers. Therefore, optimal operation is only guaranteed if all controller tuning knobs are set correctly and properly maintained (Arumugasamy and Ahmad, 2012). MPC monitoring, assessment, diagnostics, and maintenance have a firm place in industrial packages that come along with the controller. Industrial view of performance monitoring and future trends can be found in Qin and Badgwell (2003); Forbes et al. (2015). There are several approaches to the sustainability of MPC performance. Some of these are outlined in Guerlain et al. (2002) where a decision system support is described and improvements in user interface are proposed for various hard-to-detect issues. Approaches to analyzing, interpreting, and visualizing the controller decisions are studied by Elnawawi et al. (2022). The patent of Peterson et al. (2011) uses pivoting of unconstrained and constrained variables to analyze allowable steady-state moves until some constraint is reached and to determine the sensitivity of the constraints on the profitability of the controller. Control performance improvements have been suggested and compared in Botelho et al. (2016); Godoy et al. (2017) using some global indicators. Continuous performance assessment concerning the MPC constraints, and their tuning was suggested in Agarwal et al. (2007). J. Vargan et al. This work studies the effect of limit tightening by the operator’s actions due to some operating conditions. As a case study, we will investigate a fluid catalytic cracking (FCC) production unit with many input/output signals where the effects of such changes cannot easily be evaluated. The result intended for the plant engineers is a priority list of constraints that should be returned to their factory values to guarantee plant profitability. Two methods are applied and compared: a precise but computationally less effective nonlocal sensitivity analysis and information provided by Lagrange multipliers that is only valid locally. 2. Design of APC Model The examined device is a distillation column in a fluid catalytic cracking production unit. It consists of two parts – a fractionator (located at the head of the column) and six doubleshaped floors (circular and disc). The coke trap ensures the purity of the products drained off at the bottom of the column. The heavy oil feed is fed to the first floor at the boiling temperature. The contact between the liquid and vapor phases results in the separation of the components of the reaction mixture, divided into several fractions – wet gases and naphtha at the top of the column, light (LCO) and heavy (HCO) circulation oils and products at the bottom of the main column (MCB). Wet gases are cooled and removed as a naphtha product or returned as heavy-side circulation naphtha (HCN). Ratio control is applied. LCOs are regulated via a withdrawal, with LCO maximized against HCO. HCO is similar to LCO, controlled via a withdrawal. MCB is subject to dual regulatory mechanisms, including control through flow rate and a ratio control that governs its withdrawal of MCB and subsequent recirculation. This unit’s Advanced process control is implemented using Honeywell’s RMPCT Profit controller (Honeywell, 2012) to guarantee overall performance. The controller handles a total of 47 controlled (CV), manipulated (MV), and disturbance (DV) variables. These are constrained using hard (HC) and soft (SC) constraints. While the HCs must not be violated, placing SCs within HCs creates a buffer, making it difficult for variables to reach the HC. In addition, to improve the feasibility of the optimal solution, the high limits of HC are not defined for CVs (Vargan, 2023). Following the limits' objectives, we distinguish between two types of constraints: • Ideal constraint (IC) – the value of which is determined by the technical documentation for the APC control, • Real constraint (RC) – temporarily set by the operators. Real constraints are usually applied to mitigate the influence of some disturbance on the plant to stabilize some part of the process. Real constraints usually tighten the ideal constraints, but it can also happen that the operators relax some of the constraints. Once the disturbance terminates, the operator should return the control mode from RC to IC. Failing to do so, some RCs can “throttle” the controlled system, thus degrading the optimality of the operation. For a large process such as FCC, it is not always easy to detect suboptimal operation by visually inspecting all RMPCT parameters. The original problem solved by RMPCT controller in each sampling time is specified by a quadratic cost function, equality constraints resulting from a dynamical process model and inequality constraints on all process variables defining the hard and soft constraints. The process model is characterized by a matrix of all transfer functions between inputs and outputs. To simplify the analysis, we concentrate on static operation in our approach to systematic detection of control performance degradation due to constraints changes. This simplifies Steady-state Optimality Analysis of MPC Controllers the dynamic optimization formulation of the original problem to quadratic programming. The soft constraints are implemented using slack variables and absolute value penalties in the cost function. Quadratic penalties were also tested but were more difficult to tune. The mathematical formulation of the problem is defined as follows: min 𝑥𝐽(𝑥)=∑𝑏𝐶𝑉,𝑖 𝑠 𝑖=1 𝐶𝑉𝑖+∑𝑎𝐶𝑉,𝑖 2 𝑠 𝑖=1 (𝐶𝑉𝑖−𝐶𝑉0,𝑖)2+∑𝑏𝑀𝑉,𝑗 𝑡 𝑗=1 𝑀𝑉𝑗+∑𝑎𝑀𝑉,𝑗 2 𝑡 𝑗=1 (𝑀𝑉𝑗−𝑀𝑉0,𝑗)2 (1a) +∑𝑄𝐶𝑉,𝐻,𝑖 𝑠 𝑖=1 𝐸𝐶𝑉,𝐻,𝑖 +∑𝑄𝐶𝑉,𝐿,𝑖 𝑠 𝑖=1 𝐸𝐶𝑉,𝐿,𝑖 +∑𝑄𝑀𝑉,𝐻,𝑗 𝑡 𝑗=1 𝐸𝑀𝑉,𝐻,𝑗 +∑𝑄𝑀𝑉,𝐿,𝑗 𝑡 𝑗=1 𝐸𝑀𝑉,𝐿,𝑗 𝑠.𝑡. 𝐶𝑉𝑖−𝐶𝑉𝑖𝑆𝑆 =∑𝐾𝑖,𝑗 𝑡 𝑗=1 (𝑀𝑉𝑗−𝑀𝑉𝑗𝑆𝑆), (1b) 𝐶𝑉𝐿,𝑖 +∆𝐶𝑉𝐿,𝑖 −𝜀𝐶𝑉,𝐿,𝑖 ≤𝐶𝑉𝑖≤𝐶𝑉𝐻,𝑖 +∆𝐶𝑉𝐻,𝑖 −𝜀𝐶𝑉,𝐻,𝑖, (1c) 𝑀𝑉𝐿,𝑗 +∆𝑀𝑉𝐿,𝑗 −𝜀𝑀𝑉,𝐿,𝑗 ≤𝑀𝑉𝑗≤𝑀𝑉𝐻,𝑗 +∆𝑀𝑉𝐻,𝑗 −𝜀𝑀𝑉,𝐻,𝑗, (1d) 0 ≤𝜀𝐶𝑉,𝐻,𝑖, 0≤𝜀𝐶𝑉,𝐿,𝑖, (1e) 0 ≤𝜀𝑀𝑉,𝐻,𝑗 ≤∆𝑀𝑉𝐻,𝑗, 0≤𝜀𝑀𝑉,𝐿,𝑗 ≤∆𝑀𝑉𝐿,𝑗, (1f) −𝐸𝐶𝑉,𝐻,𝑖 ≤𝜀𝐶𝑉,𝐻,𝑖 ≤𝐸𝐶𝑉,𝐻,𝑖, − 𝐸𝐶𝑉,𝐿,𝑖 ≤𝜀𝐶𝑉,𝐿,𝑖 ≤ 𝐸𝐶𝑉,𝐿,𝑖 (1g) −𝐸𝑀𝑉,𝐻,𝑗 ≤𝜀𝑀𝑉,𝐻,𝑗 ≤𝐸𝑀𝑉,𝐻,𝑗, − 𝐸𝑀𝑉,𝐿,𝑗 ≤𝜀𝑀𝑉,𝐿,𝑗 ≤𝐸𝑀𝑉,𝐿,𝑗 (1h) where x = {CV, MV, ε, E} are the optimized variables, i and j are indices of the i-th controlled (s in total) and j-th manipulated (t in total) variable. The original RMPCT quadratic cost function is contained in the first line of Eq. (1a), CV0,i and MV0,j are setpoints, bCV,i, bMV,j and aCV,i, aMV,j are penalties of linear and quadratic terms. QCV,H,i, QCV,L,i, QMV,H,j and QMV,L,j are the penalty matrices of the auxiliary variables ECV,H,i, ECV,L,i, EMV,H,j and EMV,L,j, which determine the absolute values of the slack variables εCV,H,i, εCV,L,i, εMV,H,j and εMV,L,j. Eq. (1b) represents a steady-state model with CViSS and MVjSS being the measured steady states, Ki,j are coefficients of the the steady-state gain matrix. Eqs. (1c) and (1d) are inequality constraints on CVs and MVs, where ΔCVH,i, ΔCVL,i, ΔMVH,j and ΔMVL,j represent tightening the original constraints, CVH,i, CVL,i, MVH,j and MVL,j. Slacks ε may violate the tightened constraints (if the solution for ε = 0 is not feasible), thus creating soft constraints – εMV,H,j and εMV,L,j are constrained by MVH,j and MVL,j in Eq. (1f). CV slack variables εCV,H,i and εCV,L,i can even violate limits CVH,i and CVL,i in Eq. (1e) – to maintain the feasibility of the solution. Eqs. (1g), (1h) are the constraints of the absolute penalty in a linear form. A pair of slack variables belong to each CV and MV, a total of 78 constraints. Each slack variable is from the interval of auxiliary variables [EL, EH], forming additional 116 constraints. Along with 58 soft CVs and MVs constraints, the optimization problem consists of 252 inequality constraints. Variables CVL,i, CVH,i, MVL,j, MVH,j can represent ideal or real constraints. Using either real or ideal constraints, the solution of Eq. (1) yields valuable insights into the optimal configuration of controlled and manipulated variables. Subsequent analysis of this data enables the identification and analysis of active constraints and the need to transform restrictive real constraints into ideal ones. 3. Constraint Sensitivity Analysis Sensitivity analysis is a powerful tool that can be used to investigate the properties of the optimal solution in Eq. (1). Two approaches are applied in this contribution: local and nonlocal sensitivity analysis (Boyd and Vandenberghe, 2004; Bertsekas, 2009). Local sensitivity analysis (LSA) utilizes optimal Lagrange multipliers, denoted as λ * provided by the nominal solution of Eq. (1) with the real constraints: Jreal(x * ). Each Lagrange multiplier is related to the gradient of the optimal cost function with respect to J. Vargan et al. the change of the respective constraint. It is the local sensitivity and thus exact only theoretically with infinitesimal constraint perturbations. However, it is obtained at no cost as supplementary information of the nominal solution. Table 1: List of recommendations (Point 26). Priority Constraint Name Constraint Type Lagrange Multiplier Verbal Recommendation 1 MV 2 HL 2.4·107 Keep the constraint in place 2 CV 10 LL 2.1·107 Keep the constraint in place 3 MV 4 LL 8.1·105 Keep the constraint in place 4 CV 20 HL 9,999.0 Move the real constraint to the ideal 5 CV 8 HL 9,999.0 Move the real constraint to the ideal 6 CV 14 LL 1,380.4 Keep the constraint in place 7 CV 1 HL 100.0 Move the real constraint to the ideal Conversely, non-local sensitivity analysis (NSA) approximates the gradient using both the nominal solution and the solution with the real constraint replaced by the corresponding ideal one: 𝜆 󰆻𝑖 ∗=𝐽𝑟𝑒𝑎𝑙(𝑥∗)−𝐽𝑖𝑑𝑒𝑎𝑙,𝑖(𝑥∗) 𝑅𝐶𝑖−𝐼𝐶𝑖 (2) This gives a precise characterization of the suboptimality related to the respective constraint. On the other hand, one additional optimization problem needs to be solved for each real constraint. We study the optimal operation of the column for 48 hours and explain the procedure on the data denoted as Point 26 in Figure 1. From 58 defined constraints (high and low limits of 19 CV and 10 MV pairs), eight are saturated, and the corresponding multipliers are nonzero. Among these, the constraint CV 7 does not fall into the soft constraint region (violates the high soft limit), so it is not considered in further analysis. Therefore, seven constraints remain, and the values of their Lagrange multipliers are employed to formulate recommendations. In both LSA and NSA approaches, a list of constraints can be produced that is sorted in descending order of Lagrange multipliers (Table 1). It contains the constraint name and its type (HL/LL – high/low limit), the value of the Lagrange multiplier, and a verbal recommendation to process engineers. Based on the characteristics of real and ideal constraints, the verbal recommendation can be as follows: • Keep the constraint in place – the Lagrange multiplier is non-zero, but the real constraint is the same as the ideal constraint (additional recommendations). • Move the real constraint to the ideal – the Lagrange multiplier is non-zero and the real constraint differs from the ideal constraint (real recommendations). Both local and non-local sensitivity analyses are distinguished by positive and negative characteristics that can influence the final recommendations. To determine the applicability of the approaches in industrial conditions, we compare both using the edit distance method. It produces a numerical representation indicative of the accuracy in the arrangement of elements within the two lists (recommendations). The chosen method for determining the edit distance is the Levenshtein distance (Levenshtein, 1966). The data units under comparison consist of combinations of variable names (e.g., CV 20, CV 8) + constraint types (e.g., HL – high limit). The results in Point 26 can be seen in Table 2, with the edit distance equal to 0. Moreover, the edit distance value is zero across the considered time interval. When comparing the values of Lagrange multipliers for NSA and LSA, all values practically coincide except for Steady-state Optimality Analysis of MPC Controllers Figure 1: Long-term loss evolution. the CV 1 high limit (6.8 % difference). The size of the change from the real to the ideal constraint, which ranges from 0.28 to 1.83 %, does not have a noticeable effect on the accuracy of the multipliers. If the differences were more significant, it can be expected that the structure of the optimal solution would change substantially, including a possible different order of the multipliers (and recommendations) for NSA and LSA. Therefore, it would be up to the control engineer to choose the more accurate NSA method for obtaining recommendations or to rely on the accuracy of the less computationally demanding LSA. A similar analysis is conducted for the data from the studied time span. We provide graphical information on the detected long-term losses Jreal(x * ) − Jideal,i(x * ). A process engineer can verify the course of the loss from an inefficiently set constraint, including (approximate) loss value and the time frame of its duration. Figure 1 shows the loss in a logarithmic scale. The data period is an hour. We notice that the operator modified the constraint CV 20 HL for 12 hours of operation and then returned to its ideal position. On the other hand, the other two constraints should be investigated more closely. When analysing the data, several solvers are examined in Python programming language – CPLEX, CVXOPT, Gurobi, MOSEK, OSQP, and Xpress. All these solvers are available within the convex optimization modelling framework CVXPY (Diamond and Boyd, 2016). We investigate the computation time of the optimization problem and the maximum Python memory allocation. The complete calculation time is considered – loading input data, solving the optimization problem, and communicating the recommendations to the process engineer. At one operating point (OOP) of the local sensitivity analysis, the average calculation time is 6 seconds (initial time information, ITI). The time for solving the optimization problem is significantly shorter. The values for individual solvers range from 0.013 (Gurobi) to 0.138 (CVXOPT) seconds. For a maximum memory allocation, the optimization solver needs from 12 to 144 Kbs (CVXOPT to CPLEX). When analysing the entire time interval of data (2 days, 48 data points), one operating point takes about 7 seconds using the Gurobi solver. In the case of non-local sensitivity analysis, Table 2: Edit distance comparison of Lagrange multipliers obtained by local (LSA) and non-local (NSA) sensitivity analysis. Priority Constraint Lagrange Multiplier Constraint Change Constraint Edit NSA LSA Real Ideal Distance 1 MV 20 HL 9,999.0 9,999.0 1.0 368.0 369.0 0 2 CV 8 HL 9,999.0 9,999.0 10.0 316.0 326.0 3 CV 1 HL 93.2 100.0 3.5 191.5 195.0 J. Vargan et al. the overhead for additional optimization calculations is practically negligible as there are on average only three constraints to be investigated. Nevertheless, the local method provides two advantages: sufficient accuracy of recommendation calculations and shorter computation time. 4. Conclusions We treated the maintenance problem of advanced process controllers related to constraints on manipulated and controlled variables. The case study investigated the fluid catalytic cracking production unit controlled by the RMPCT Profit controller by Honeywell. The problem comprises 47 variables. We applied two sensitivity analysis methods: local using the optimal Lagrange multipliers and non-local based on actual values of ideal and real constraints settings. Edit distance metric was employed to compare both approaches. It was shown that local analysis can be used in industrial conditions as careful constraint tightening by the operators rarely significantly changes the structure of the optimal solution. On the other hand, non-local analysis was not significantly slower for the investigated case study plant. We provide a list of ordered recommendations to process engineers and operators for actual operation or analysis on a longer time window. Open-source tools using Python programming language are proposed and the implemented procedure is used at the refinery. Further profiling of the script will be required to shorten the overall calculation time and to make it possible to analyse longer time intervals of operation. References N. Agarwal, B. Huang, E. C. Tamayo, 2007, Assessing model prediction control (MPC) performance. 1. probabilistic approach for constraint analysis, Industrial & Engineering Chemistry Research 46, 24, 8101–8111 S. K. Arumugasamy, Z. Ahmad, 2012, Model predictive control (MPC) and its current issues in chemical engineering, Chemical Engineering Communications 199, 4, 472–511 D. P. Bertsekas, 2009, Convex Optimization Theory, Athena Scientific V. Botelho, J. O. Trierweiler, M. Farenzena, R. Duraiski, 2016, Perspectives and challenges in performance assessment of model predictive control, The Canadian Journal of Chemical Engineering 94, 7, 1225–1241 S. Boyd, L. Vandenberghe, 2004, Convex Optimization, Cambridge University Press S. Diamond, S. Boyd, 2016, CVXPY: A Python-embedded modeling language for convex optimization, Journal of Machine Learning Research 17, 83, 1–5 S. Elnawawi, L. C. Siang, D. L. O’Connor, R. B. Gopaluni, 2022, Interactive visualization for diagnosis of industrial model predictive controllers with steady-state optimizers, Control Engineering Practice 121, 105056 M. G. Forbes, R. S. Patwardhan, H. Hamadah, R. B. Gopaluni, 2015, Model predictive control in industry: Challenges and opportunities, IFAC-PapersOnLine 48, 8, 531–538 J. Godoy, A. Ferramosca, A. González, 2017, Economic performance assessment and monitoring in LP-DMC type controller applications, Journal of Process Control 57, 26–37 S. Guerlain, G. A. Jamieson, P. Bullemer, R. Blair, 2002, The MPC elucidator: a case study in the design for human-automation interaction, IEEE Transactions on Systems, Man, and Cybernetics – Part A: Systems and Humans 32, 1, 25–40 Honeywell, 2012, Advanced Process Control – Profit Controller, Concepts Reference Guide, Honeywell International Inc. J. H. Lee, 2011, Model predictive control: Review of the three decades of development, International Journal of Control, Automation and Systems 9, 3, 415–424 V. I. Levenshtein, 1966, Binary codes capable of correcting deletions, insertions, and reversals, Soviet Physics Doklady 10, 8, 707–710 T. J. Peterson, A. R. Punuru, K. F. Emigholz, R. K. Wang, D. Barrett-Payton, 2011, Model predictive controller solution analysis process, US Patent 7,949,417 S. J. Qin, T. A. Badgwell, 2003, A survey of industrial model predictive control technology, Control Engineering Practice 11, 7, 733–764 M. Schwenzer, M. Ay, T. Bergs, D. Abel, 2021, Review on model predictive control: an engineering perspective, The International Journal of Advanced Manufacturing Technology 117, 1327–1349 J. Vargan, 2023. Optimality analysis of MPC controller, Master thesis, UIAM FCFT STU in Bratislava, Radlinského 9, 812 37 Bratislava