Abstract:
The present invention is a method for synchronizing multiple layers of constrained optimization with both layers having some common variables in a to processing plant. The layers of optimization can include Planning, Scheduling, Real-Time Optimization and Model Predictive Control.

Description:
[0001]    This application claims the benefit of U.S. Provisional Application No. 61/384,905 filed Sep. 21, 2010. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    Modern processing plants often have many different layers of optimization, which can include Model Predictive Control, Real-Time Optimization, Planning and Scheduling. The current invention relates to a tighter synchronization of these layers of optimization. 
         [0003]    Model Predictive Control (MPC) are a class of algorithms that use a simplified dynamic model to predict the dependent variables (i.e., outputs) of a dynamical system with respect to changes in the process independent variables (i.e., inputs), and to move the process independent variables in a more optimal fashion. The steady-state targets for the independent variables are often determined by an economic objective function. Frequency of execution is on the order of minutes or seconds. 
         [0004]    Real-time optimization (RTO) are a class of algorithms that use more rigorous process models and economics to find more complicated optima which are difficult or impossible to find using the simplified models from Model Predictive Control. Usually, the economics are updated more regularly than MPC. Frequency of execution is on the order of hours. 
         [0005]    Scheduling programs use a model of the process facility to represent individual unit capabilities, capacities and constraints. An optimizer is used to calculate the timing and disposition of available feeds and products. Frequency of execution is on the order of days or weeks. 
         [0006]    Planning programs use a model of a process facility, or even multiple processing facilities, to represent production capabilities and constraints. An optimizer is used to calculate optimal feedstock procurement, sales strategy and facilities&#39; utilization. Frequency of execution is on the order of weeks or months. 
         [0007]    In general, multiple layers of optimization are used in a hierarchical manner, with results from higher layers sent down as “targets” to lower layers (see  FIG. 1 ). Sometimes shadow values (sensitivity of the economic objective function to changes in constraints) of a higher layer are used to help define the economic objective function(s) of lower layer(s). However, the programs in is different optimization layers are usually run by different people, sometimes in different organizations. The models, objective functions and optimization algorithms can be different, even though they contain common variables. Since higher-level optimization programs are executed at lower frequencies, the targets calculated by an upper layer will become further away from the true optimum when there are process changes or disturbances between upper layer execution cycles. 
         [0008]    The present invention is a method to more tightly synchronize the objective functions of different layers of optimization. It is a general technique that allows different layers with different model types, objective functions, solution types or computing platforms to work toward the same objective. Its innovation is the ability to pass the objectives between layers, rather than just the targets. It can be done manually or automatically with a computer program. 
       SUMMARY OF THE PRESENT INVENTION 
       [0009]    The present invention is a method for reconciling the optimizers of two different layers of optimization, with each layer having a model of the process, and an optimizer with cost sensitivity analysis. The method includes the following steps: a) identifying the active constraints and associated shadow values (cost sensitivities) in the upper optimization layer, b) finding a set of exact and/or approximate matching variables in the lower optimization layer that closely represent the set of upper level optimizer constraints, c) using the model to from the lower level optimizer to solve for the economic inputs that push the process to the chosen set of lower level optimizer constraints, and d) identifying and using targets for variables and values which cannot be reached using only the lower-level optimization economics (see  FIG. 2 ). 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0010]      FIG. 1  is a schematic diagram showing the typical hierarchy of Planning, Scheduling, Real-Time Optimization and Model Predictive Control. 
           [0011]      FIG. 2  is a flow chart showing the steps of the method of the present invention. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
       [0012]    The present invention is a method to connect different layers of optimization in a processing facility so that the economic drivers of both layers are pushing the process in the same direction. Targets for values of variables in the lower optimization layer are defined only for those variables which cannot be reached be reached using economic factors. 
         [0013]    Optimization programs often have some type of sensitivity analysis capability built into the software. A shadow value is a common output from sensitivity analysis—it quantifies the partial derivative of the economic objective function to changes in the value of a constraint. Shadow values are the result of the model, the state of the process and the economic objective function. Shadow values can be calculated for any constrained variable in an optimization program. 
         [0014]    In order for two optimization programs to be synchronized, both programs should have the same set of active constraints, for variables which are common to both models. Simply using the shadow values of an upper level optimizer to define the economics for a lower-level optimizer is appealing at first thought. However, if the models in both optimizers are not identical, the “same” economics can result in a different set of actively constrained variables in the general case. 
         [0015]    In the preferred embodiment of this invention, the linkage between optimization layers is done by calculating economics in the lower layer optimizer to push the lower level optimizer to an identical, or nearly identical set of active constrained variables as the upper level optimizer. Targets, or enforced limits, on lower optimization layer values are used only when those variables cannot be driven to the optimum limit using economics alone. 
         [0016]    Variables which exist in both optimization layers, and are actively constrained in the upper layer, are chosen to be constrained in the lower layer. When an active constraint in the upper optimization layer does not exist in the lower optimization layer, an acceptable substitute, or surrogate, needs to be chosen to represent the upper level constraint. A weighted dot product of model sensitivities is the basic calculation used for this purpose. 
         [0017]    For the purpose of surrogate constraint selection, model sensitivity vectors are calculated for unmatched upper optimization layer constraints and all potential lower optimization layer surrogates. All sensitivity vectors in both layers are calculated against the same set of independent variables. These sensitivity vectors are optionally multiplied by some kind of independent weighting factors. 
         [0018]    The dot product, also known as the scalar product, is an operation which takes two vectors over the real numbers R and returns a real-valued scalar quantity. The dot product of two vectors a=[a 1 , a 2 , . . . , a n ] and b=[b 1 , b 2 , . . . , b n ] is by definition: 
         [0000]    
       
         
           
             
               a 
               · 
               b 
             
             = 
             
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   n 
                 
                  
                 
                   
                     a 
                     i 
                   
                    
                   
                     b 
                     i 
                   
                 
               
               = 
               
                 
                   
                     a 
                     1 
                   
                    
                   
                     b 
                     1 
                   
                 
                 + 
                 
                   
                     a 
                     2 
                   
                    
                   
                     b 
                     2 
                   
                 
                 + 
                 … 
                 + 
                 
                   
                     a 
                     n 
                   
                    
                   
                     b 
                     n 
                   
                 
               
             
           
         
       
     
         [0000]    where Σ denotes summation notation.
 
In Euclidean geometry, the dot product,
 
         [0000]        a·b=|a∥b |cos θ,
 
       Or 
       [0019]    
       
         
           
             
               cos 
                
               
                   
               
                
               θ 
             
             = 
             
               ( 
               
                 
                   a 
                   · 
                   b 
                 
                 
                   
                      
                     a 
                      
                   
                    
                   
                      
                     b 
                      
                   
                 
               
               ) 
             
           
         
       
     
         [0000]    Where |a| and |b| denote the length of a and b, and θ is the angle between them.
 
For a vector a,
 
         [0000]      | a|=√{square root over (a·a)}   
         [0000]    For the purposes of this invention,
 
cos θ is the normalized, weighed dot product
 
a=[a 1 , a 2 , . . . , a n ] is the vector of sensitivities of dependent variable a, to independent variables 1−n, multiplied by optional weighting factors.
 
b=[b 1 , b 2 , . . . , b n ] is the vector of sensitivities of dependent variable b, to independent variables 1−n, multiplied by optional weighting factors.
 
         [0020]    The dot product is used for two purposes, 1) to find the variables that most closely represent the unmatched upper optimization level constraint and 2) verify that the chosen constraint is not too similar to lower optimization level variables already chosen as constrained. 
         [0021]    To find the best surrogate candidates for upper optimization layer unmatched variables, the dot products between the weighted sensitivity vector of an unmatched dependent variable in the upper optimization layer and the sensitivity vectors of all unmatched, potential surrogate variables in the lower optimization layer are calculated. The lower optimization layer dependent variables are sorted based on their dot products, with higher dot products representing better matches. 
         [0022]    The dot product is then calculated between the weighted sensitivity of the best match in the lower layer and all other lower optimization layer variables already chosen as constraints. For this purpoe, a higher dot product is less desirable, since it represents similarity, or collinearity with existing constraints. If none of the dot products exceed the user-defined collinearity threshold, then this variable is chosen as a surrogate. If any of the dot products exceed the user-defined collinearity threshold, then that variable is rejected and the next best match is tested. This process continues until a suitable surrogate is selected. 
         [0023]    Once a suitable set of lower level constraints is chosen and finalized, the next step is to choose a set of lower optimization layer economic tuning parameters that will cause the optimizer to push the process to that set of selected constraints. 
         [0024]    Normally, an optimization program user will define the model and the economics, and the program will find the set of active constraints and calculate the economic sensitivities (shadow values) for the active constraint set. In the preferred embodiment for this invention, the process is reversed. The set of active constraints for the lower optimization layer is calculated based on upper optimization results, as per the above description. Then shadow values are assigned to these constrained variables, based on the economic sensitivity analysis of the upper layer. Finally, lower level optimization layer economics are calculated to push the desired set of constraints, with the defined set of shadow values, using the lower optimization layer model. 
         [0025]    The example formula for steady state cost calculation, where costs are only assigned to lower optimization layer, linear, independent variables, is the following: 
         [0000]    
       
         
           
             
               Cost 
               i 
             
             = 
             
               - 
               
                 ( 
                 
                   
                     ISV 
                     i 
                   
                   + 
                   
                     
                       ∑ 
                       
                         j 
                         = 
                         1 
                       
                       
                         j 
                         = 
                         n 
                       
                     
                      
                     
                       
                         G 
                         ij 
                       
                        
                       
                         DSV 
                         j 
                       
                     
                   
                 
                 ) 
               
             
           
         
       
     
       Where: 
       [0026]    Cost i  is the calculated economic cost for lower optimization layer objective function 
         [0027]    G ij  is the sensitivity (gain) of the lower optimization layer dependent variable j, to independent variable i. 
         [0028]    ISV i  is the shadow value of the independent variable i 
         [0029]    DSV j  is the shadow value of the dependent variable j 
         [0030]    n=number of constrained dependent variables in the lower optimization problem 
         [0031]    The formula may be obtained from the following: 
         [0000]    
       
         
           
             
               Δ 
                
               
                   
               
                
               
                 CV 
                 _ 
               
             
             = 
             
               
                 [ 
                 G 
                 ] 
               
                
               Δ 
                
               
                   
               
                
               
                 MV 
                 _ 
               
             
           
         
       
       
         
           
             
               Δ 
                
               
                   
               
                
               Objective 
             
             = 
             
               
                 
                   - 
                   
                     Cost 
                     _ 
                   
                 
                 · 
                 Δ 
               
                
               
                 MV 
                 _ 
               
             
           
         
       
       
         
           
             also 
              
             
               : 
             
           
         
       
       
         
           
             
               Δ 
                
               
                   
               
                
               Objective 
             
             = 
             
               
                 
                   
                     
                       
                         MVSV 
                         _ 
                       
                       · 
                       Δ 
                     
                      
                     
                         
                     
                      
                     
                       MV 
                       _ 
                     
                   
                   + 
                   
                     
                       
                         CVSV 
                         _ 
                       
                       · 
                       Δ 
                     
                      
                     
                         
                     
                      
                     
                       CV 
                       _ 
                     
                   
                 
                  
                 
                   
 
                 
                 ∴ 
                 
                   
                     
                       
                         - 
                         Cost 
                       
                       _ 
                     
                     · 
                     Δ 
                   
                    
                   
                       
                   
                    
                   
                     MV 
                     _ 
                   
                 
               
               = 
               
                 
                   
                     
                       
                         MVSV 
                         · 
                         Δ 
                       
                        
                       
                           
                       
                        
                       
                         MV 
                         _ 
                       
                     
                     + 
                     
                       
                         
                           CVSV 
                           _ 
                         
                         · 
                         Δ 
                       
                        
                       
                           
                       
                        
                       
                         CV 
                         _ 
                       
                     
                   
                    
                   
                     
 
                   
                   ∴ 
                   
                     
                       
                         
                           - 
                           Cost 
                         
                         _ 
                       
                       · 
                       Δ 
                     
                      
                     
                         
                     
                      
                     
                       MV 
                       _ 
                     
                   
                 
                 = 
                 
                   
                     
                       
                         
                           
                             MVSV 
                             _ 
                           
                           · 
                           Δ 
                         
                          
                         
                             
                         
                          
                         
                           MV 
                           _ 
                         
                       
                       + 
                       
                         
                           
                             CVSV 
                             _ 
                           
                           · 
                           
                             [ 
                             G 
                             ] 
                           
                         
                          
                         Δ 
                          
                         
                             
                         
                          
                         
                           MV 
                           _ 
                         
                       
                     
                      
                     
                       
 
                     
                     ∴ 
                     
                       
                         - 
                         Cost 
                       
                       _ 
                     
                   
                   = 
                   
                     
                       MVSV 
                       _ 
                     
                     + 
                     
                       
                         
                           [ 
                           G 
                           ] 
                         
                         T 
                       
                        
                       
                         CVSV 
                         _ 
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             or 
             , 
             
               
 
             
              
             
               
                 ∴ 
                 
                   Cost 
                   i 
                 
               
               = 
               
                 - 
                 
                   ( 
                   
                     
                       MVSV 
                       i 
                     
                     + 
                     
                       
                         ∑ 
                         
                           j 
                           = 
                           1 
                         
                         
                           j 
                           = 
                           n 
                         
                       
                        
                       
                         
                           G 
                           ij 
                         
                          
                         
                           CVSV 
                           j 
                         
                       
                     
                   
                   ) 
                 
               
             
           
         
       
     
         [0032]    The shadow value is assigned a negative value if the active constraint is a lower limit and positive value if the constraint is an upper limit. 
         [0033]    Normally, the shadow values from the upper layer are used unchanged  15  for the constrained variables on the lower optimization layer that are directly matched. However, it is possible to scale shadow values for surrogate variables on the lower layer based on ratio of the norms of the sensitivity vectors. It is also possible to get the same desired solution by scaling all shadow values by an equal factor. 
         [0034]    The formula would be different if the MPC objective function were expressed in terms of values instead of costs, or if costs/values could be applied to dependent (controlled) variables also. However, the objective of this step is independent of the particular objective function of the lower optimization layer. The objective is to calculate lower layer economics such that the controller will push the designated constraints with the desired economic sensitivity (shadow costs). 
         [0035]    Ideally, we would push all the desired constraints with economics only. However, there are times when the difference between limits and optimization functions makes that impossible. The preferred embodiment of this invention utilizes numerical targets for those constraints that cannot be pushed with economic tuning alone. Two examples are presented, one for different limits, and one for different optimization functions. 
         [0036]    Ideally, the same constrained variable, represented in two different optimization layers, has the same upper and lower limits. In the general case, however, it is possible that the upper optimization layer has more restricted limits than the lower optimization layer. If that is the case, the calculated economics in the lower will potentially push the process beyond the limits specified in the upper optimization layer. To avoid that problem, a target on the lower optimization layer is set equal to the more restrictive value of the upper optimization layer. 
         [0037]    Sometimes an upper optimization layer is capable of finding more complicated optimum points that cannot be replicated on a lower layer optimizer. For example, a quadratic program in a real-time optimizer may find a peak optimum, a point of economic tradeoff where the profit decreases if it moves in either direction. If the lower optimization layer, a model predictive controller for example, has a linear program optimizer, it will not be able to recognize, calculate or drive to peak optima. A numerical target is set equal to the peak optimum value on the lower layer to account for this problem. 
       Example 
     Real-Time Optimization and Model Predictive Control Applied to a Distillation Column 
       [0038]    In this example a multivariable process controller (MPC) and a real-time optimizer (RTO) are used to control and optimize a simple distillation column. The RTO application uses a sophisticated, sequential quadratic program (SQP) optimizer to find a global optimum operating point for the process. The optimum from the SQP can be against process constraints, or at peak optimum points between constraints, where the objective function loses profitability moving in either direction. The MPC has a simpler linear program (LP) optimizer, which is good for pushing the process against constraints, but is unable to recognize or stop at peak optima. 
         [0039]    The controller&#39;s manipulated (independent) and controlled (dependent) variables, along with current values and upper/lower limits, are listed in Table-1 below. 
         [0000]    
       
         
               
             
               
               
               
               
               
             
               
               
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 MPC Configuration and State Information 
               
             
          
           
               
                   
                 Manipulate (MV)/ 
                   
                 Lower 
                 Upper 
               
               
                 Variable 
                 Controlled (CV) 
                 Value 
                 Limit 
                 Limit 
               
               
                   
               
             
          
           
               
                 FEED FLOW 
                 MV 
                 150 
                 100 
                 180 
               
               
                 REFLUX 
                 MV 
                 50 
                 30 
                 80 
               
               
                 COLUMN PRESSURE 
                 MV 
                 197 
                 180 
                 238 
               
               
                 BOTTOM TEMP 
                 MV 
                 125 
                 120 
                 160 
               
               
                 STEAM VALVE 
                 CV 
                 65 
                 10 
                 90 
               
               
                 PUMP AMP 
                 CV 
                 230 
                 0 
                 260 
               
               
                 PRESSURE VALVE 
                 CV 
                 35 
                 10 
                 90 
               
               
                 BOTTOM IMPURITY 
                 CV 
                 1 
                 0.1 
                 2 
               
               
                 TOP IMPURITY 
                 CV 
                 2 
                 0.2 
                 3 
               
               
                 TOWER DP 
                 CV 
                 20 
                 0 
                 28 
               
               
                 TOP TRAY TEMP 
                 CV 
                 100 
                 92 
                 110 
               
               
                   
               
             
          
         
       
     
         [0040]    The MPC has a set of sensitivities, or gains, relating changes in the controlled variables (CVs) to changes in the manipulated variables (MVs). This matrix of gains (G) is shown in Table-2 below. Using these gains and user-defined economics, MPC computes directional setpoints and combination of manipulated variable values to achieve them. 
         [0000]    
       
         
               
             
           
               
                 TABLE 2 
               
               
                   
               
             
             
               
                 Raw MPC Gains (G) 
               
               
                 
                   
                             
                     
                         
                         
                     
                   
                 
               
               
                   
               
             
          
         
       
     
         [0041]    The RTO similarly has a set of sensitivities, or gains, relating changes in the controlled variables to changes in manipulated variables. Usually the RTO model is nonlinear, and the sensitivities are a local linearization that can change depending on the current state of the process. This matrix of gains (G′) for a given linearization is shown in Table-3 below. Note that the RTO includes all of the variables in the MPC and some additional variables. Also, the matrix of gains (G′) in the RTO need not be same as matrix of gains (G) in the MPC. Using these gains and true economics, RTO solves for the process optimum. The optimum set of constraints, and their economic sensitivity (shadow values), computed by RTO are displayed in the Table-4 below: 
         [0000]    
       
         
               
             
           
               
                 TABLE 3 
               
               
                   
               
             
             
               
                 RAW RTO Gains (G′) 
               
               
                 
                   
                             
                     
                         
                         
                     
                   
                 
               
               
                   
               
               
                 (*) Indicates optimum constraint 
               
             
          
         
       
     
         [0000]    
       
         
               
             
               
               
               
               
               
               
             
               
               
               
               
               
               
             
           
               
                 TABLE 4 
               
             
             
               
                   
               
               
                 Optimum Constraint Set 
               
             
          
           
               
                 CONSTRAINED 
                 VARIABLE 
                   
                 CONSTRAINT 
                 OPTIMUM 
                 SHADOW 
               
               
                 VARIABLE 
                 TYPE 
                 In MPC? 
                 TYPE 
                 VALUE 
                 VALUE 
               
               
                   
               
             
          
           
               
                 COLUMN PRESSURE 
                 MV 
                 Y 
                 LOWER 
                 195.5 
                 −23.7 
               
               
                 BOTTOM IMPURITY 
                 CV 
                 Y 
                 UPPER 
                 2 
                 412.2 
               
               
                 TOP IMPURITY 
                 CV 
                 Y 
                 PEAK 
                 0.8 
                 0 
               
               
                 CORROSION 
                 CV 
                 N 
                 UPPER 
                 227 
                 89.9 
               
               
                   
               
             
          
         
       
     
         [0042]    The first three constraints are variables which exist in both RTO and MPC layers, so we will choose these same three variables to be constrained also in the MPC layer. The CORROSION variable exists only in the RTO layer, so a suitable surrogate constraint must be chosen from among the MPC variables. 
         [0043]    The weighted dot product is used evaluate potential surrogate constraints. In order to compute a dot-product, the two vectors must have same number of elements. That is straightforward for MPC CVs, since both sensitivity matrices, G and G′ have the same set of MVs. However, it is also possible to evaluate MVs as potential surrogate constraints. To do this, we create shadow CVs for the MVs we wish to evaluate, with a unity (1.0) gain for the MV itself, and zero gains for all other elements. There is no need to evaluate the three constraints that are already chosen. The augmented matrix, showing the remaining unconstrained CVs and shadow CVs, is displayed in Table-5. 
         [0044]    (Note: In this example, we evaluate potential surrogates by calculating the dot product with the gains in the MPC matrix. In another embodiment of this invention, potential surrogates can be evaluated by calculating the dot product with the gains in the RTO matrix, of variables which also exist in the MPC application.) 
         [0000]    
       
         
               
             
           
               
                 TABLE 5 
               
               
                   
               
             
             
               
                 Augmented Raw MPC Gains 
               
               
                 
                   
                             
                     
                         
                         
                     
                   
                 
               
               
                   
               
             
          
         
       
     
         [0045]    Since each manipulated variable represents a different physical quantity measured in different units, and has different range of allowable movement, the raw gain matrix is converted to a scaled gain matrix using a set of scaling factors. Table-6 below demonstrates use of “Typical Move Size” as scaling factors for STM VALVE vector from MPC gain matrix, and CORROSION vector from RTO gain matrix. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
             
               
               
               
               
               
               
             
           
               
                 TABLE 6 
               
             
             
               
                   
               
               
                 Scaled MPC and RTO Gains for Selected Pair of Variables 
               
             
          
           
               
                   
                   
                 RAW MPC GAIN 
                 SCALED MPC 
                 RAW RTO GAIN 
                 Scaled RTO 
               
               
                   
                   
                 (B) (From 
                 GAIN (C) = 
                 (B) ′  (From 
                 GAIN (C) ′  = 
               
               
                   
                 TYPICAL MOVE 
                 Table-2 above) 
                 (A) * (B) 
                 Table-3 above) 
                 (A) * (B) ′   
               
               
                 VARIABLE 
                 SIZE (A) 
                 STM VALVE 
                 STM VALVE 
                 CORROSION 
                 CORROSION 
               
               
                   
               
             
          
           
               
                 FEED FLOW 
                 3 
                 0.400 
                 1.2 
                 −0.121 
                 −0.363 
               
               
                 REFLUX 
                 1 
                 0.220 
                 0.22 
                 1.442 
                 1.4422 
               
               
                 COLUMN PRESSURE 
                 25 
                 0.000 
                 0 
                 −0.036 
                 −0.9 
               
               
                 BOTTOM TEMP 
                 2 
                 0.100 
                 0.2 
                 −0.212 
                 −0.424 
               
               
                   
               
             
          
         
       
     
         [0046]    The dot-product of two vectors is the sum of the products of the individual elements of the two vectors. For the scaled STM VALVE and CORROSION vectors: 
         [0000]      STM VALVE·CORROSION=(1.2)(−0.363)+(0.22)(1.4422)+(0.0)(−0.0)+(0.2)(−0.424)=−0.2031
 
         [0047]    The 2-norm of the weighted vectors, denoted by |Name|, is calculated by taking the square root of the sum of the square of all the individual elements. For the scaled STM VALVE and CORROSION vectors: 
         [0000]      |STMVALVE|=√{square root over (1.2 2 +0.22 2 +0.0 2 +0.02 2 )}=1.236
 
         [0000]    
       
         
           
             
               
                 
                   
                      
                     CORROSION 
                      
                   
                   = 
                     
                    
                   
                     
                       
                         
                           ( 
                           
                             - 
                             0.363 
                           
                           ) 
                         
                         2 
                       
                       + 
                       
                         1.4422 
                         2 
                       
                       + 
                       
                         
                           ( 
                           
                             - 
                             0.9 
                           
                           ) 
                         
                         2 
                       
                       + 
                       
                         
                           ( 
                           
                             - 
                             0.424 
                           
                           ) 
                         
                         2 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   1.789 
                 
               
             
           
         
       
     
         [0048]    Cosine of the angle between two vectors (normalized, weighted dot product) is computed by dividing the dot-product of two vectors with 2-norms of both vectors: 
         [0000]      COS(STM VALVE·CORROSION)=−0.2031/(1.236*1.789)=−0.0918
 
         [0049]    Cosine of the angle closer to “1” or “−1” indicate that two vectors are very similar (1          in the same direction; 1          in the opposite direction), and hence, selected variable is the best surrogate for optimum constraint variable. 
         [0050]    We calculate the weighted, normalized dot-product between the CORROSION variable and all other unmatched/unconstrained variables in the MPC. Results of this exercise are shown in Table-7 below: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
           
               
                 TABLE 7 
               
             
             
               
                   
               
               
                 2-Norms and Dot Products of Various CVs with CORROSION 
               
             
          
           
               
                   
                 2-norm (based on 
                 Cosine of the angle 
               
               
                 Variable 
                 scaled MPC gains) 
                 with CORROSION 
               
               
                   
               
             
          
           
               
                 FEED FLOW 
                 3 
                 −0.203 
               
               
                 REFLUX 
                 1 
                 0.806 
               
               
                 BOTTOM TEMP 
                 2 
                 −0.237 
               
               
                 STM VALVE 
                 1.236 
                 −0.092 
               
               
                 PUMP AMP 
                 1.03 
                 −0.422 
               
               
                 PRESSURE VALVE 
                 117.5 
                 0.513 
               
               
                 TOWER DP 
                 2.7 
                 0.635 
               
               
                 TOP TRAY TEMP 
                 2.934 
                 −0.990 
               
               
                   
               
             
          
         
       
     
         [0051]    Based on these results, TOP TRAY TEMP is the best candidate as surrogate for CORROSION. 
         [0052]    Although TOP TRAY TEMP is the unconstrained variable most similar to CORROSION, we want to verify that it is NOT too similar to other optimum constraint variables already chosen. We now calculate the dot-products between TOP TRAY TEMP and all other optimum constraint variables. Results of this exercise are presented in Table-8 below. 
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 8 
               
             
             
               
                   
               
               
                 Dot-product of CVs in Optimum Constraint Set 
               
               
                 with Potential Surrogate (TOP TRAY TEMP) 
               
             
          
           
               
                   
                   
                   
                 Cosine of the angle with 
               
               
                   
                 Variable 
                 Type 
                 TOP TRAY TEMP 
               
               
                   
                   
               
             
          
           
               
                   
                 COLUMN PRESSURE 
                 MV 
                 0.597 
               
               
                   
                 BOTTOM IMPURITY 
                 CV 
                 0.540 
               
               
                   
                 TOP IMPURITY 
                 CV 
                 −0.435 
               
               
                   
                   
               
             
          
         
       
     
         [0053]    Since none of these dot products are too close to 1 or −1, we confirm TOP TRAY TEMP as the surrogate constraint for the “CORROSION” variable. 
         [0054]    For CORROSION, the constraint type was UPPER. Since the cosine of the angle between CORROSION and TOP TRAY TEMP is negative, we target constraint type LOWER for TOP TRAY TEMP. 
         [0055]    We now have the information we need for the “target” part of the algorithm. Our MPC layer is unable to find peak optimal points, so we put an UPPER and LOWER target of 0.8 on the peak optimum constraint TOP IMPURITY. We also put a LOWER target on the TOP TRAY TEMP at the value which corresponds to the CORROSION optimum value (97 in this example). 
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 9 
               
             
             
               
                   
               
               
                 Algorithm Targets 
               
             
          
           
               
                   
                 Variable 
                 Target Type 
                 Value 
               
               
                   
                   
               
             
          
           
               
                   
                 TOP TRAY TEMP 
                 Lower 
                 97 
               
               
                   
                 TOP IMPURITY 
                 Peak (Lower and Upper) 
                 0.8 
               
               
                   
                   
               
             
          
         
       
     
         [0056]    We have chosen which constraints should be active in the MPC. The second part of the algorithm is to solve for the economic parameters in the MPC which push the desired constraints, with the desired shadow values. 
         [0057]    The shadow values for the variables which exist in both layers will remain the same in the MPC layer as it was in the RTO layer. For the surrogate variable, we need to flip the sign, as a minimum, to account for the negative angle in the dot product. Optionally, we also choose to scale the shadow value according to the 2-norms of the two vectors in the equation below: 
         [0000]    
       
         
           
             
               TOP 
                
               
                   
               
                
               TRAY 
                
               
                   
               
                
               
                 TEMP 
                 ShadowValue 
               
             
             = 
             
               
                 
                   CORROSION 
                   ShadowValue 
                 
                  
                 
                   
                      
                     CORROSION 
                      
                   
                   
                      
                     
                       TOP 
                        
                       
                           
                       
                        
                       TRAY 
                        
                       
                           
                       
                        
                       TEMP 
                     
                      
                   
                 
               
               = 
               
                 
                   
                     - 
                     89.9 
                   
                    
                   
                     1.789 
                     2.934 
                   
                 
                 = 
                 
                   - 
                   54.8 
                 
               
             
           
         
       
     
         [0058]    We now have all the information needed to calculate the MPC economic parameters listed in Table 10. 
         [0000]    
       
         
               
             
               
               
               
               
               
             
               
               
               
               
               
             
           
               
                 TABLE 10 
               
             
             
               
                   
               
               
                 Modified Optimum Constraint Set 
               
             
          
           
               
                   
                   
                 CON- 
                   
                   
               
               
                 CONSTRAINED 
                 VARIABLE 
                 STRAINT 
                 OPTIMUM 
                 SHADOW 
               
               
                 VARIABLE 
                 TYPE 
                 TYPE 
                 VALUE 
                 VALUE 
               
               
                   
               
             
          
           
               
                 COLUMN 
                 MV 
                 LOW 
                 195.5 
                 −23.7 
               
               
                 PRESSURE 
               
               
                 BOTTOM 
                 CV 
                 UPPER 
                 2 
                 412.2 
               
               
                 IMPURITY 
               
               
                 TOP IMPURITY 
                 CV 
                 PEAK 
                 0.8 
                 0 
               
               
                 TOP TRAY TEMP 
                 CV 
                 LOWER 
                 97 
                 −54.8 
               
               
                 (as surrogate 
               
               
                 for CORROSION) 
               
               
                   
               
             
          
         
       
     
         [0059]    For a MPC optimization layer, using a LP objective function, with costs assigned to manipulated variables only, the MPC economic drivers are calculated according to the formula below: 
         [0000]    
       
         
           
             
               Cost 
               i 
             
             = 
             
               - 
               
                 ( 
                 
                   
                     ISV 
                     i 
                   
                   + 
                   
                     
                       ∑ 
                       
                         j 
                         = 
                         1 
                       
                       
                         j 
                         = 
                         n 
                       
                     
                      
                     
                       
                         G 
                         ij 
                       
                        
                       
                         DSV 
                         j 
                       
                     
                   
                 
                 ) 
               
             
           
         
       
     
         [0060]    In this formula, Cost i  is the cost associated with manipulated variable ‘i’, ISV i  is the shadow value for manipulated variable ‘i’ (Table-9 above), G ij  is gain of a controlled variable ‘j’ with respect to manipulated variable ‘i’ (Table-5 above), and DSV j  the shadow value for controlled variable ‘j’ (Table-9 above). 
         [0061]    As an example, cost for the COLUMN PRESSURE variable is calculated as: 
         [0000]      Cost i =−(−23.7+0.22*412.2+(−0.11)*(0)+0.07*(−54.8))=−63.15
 
         [0062]    Results of repeating the process for all manipulated variables, are shown in the Table-11 below: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
           
               
                 TABLE 11 
               
             
             
               
                   
               
               
                 Economic Drivers (Cost) for MVs in MPC 
               
             
          
           
               
                   
                 Variable 
                 Cost 
               
               
                   
                   
               
             
          
           
               
                   
                 FEED FLOW 
                 2.716 
               
               
                   
                 REFLUX 
                 −98.592 
               
               
                   
                 COLUMN PRESSURE 
                 −63.148 
               
               
                   
                 BOTTOM TEMP 
                 230.212 
               
               
                   
                   
               
             
          
         
       
     
         [0063]    Table 9 and Table 11 are the results of this algorithm. When these values are entered and simulated in the MPC application, it results in the MPC pushing the desired constraints, with the desired economic sensitivity (shadow values) exactly as listed in Table 10. 
         [0064]    The normalized, weighted dot product can also be used to evaluate and compare the consistency of the models for variables which co-exist in multiple optimization layers. The normalized, weighted dot product of a vector of model sensitivities of a variable in an upper optimization layer with the vector of model sensitivities for the same variable in a lower optimization layer represents the angle between the two vectors. Ideally, this number would be exactly “1” if our models were perfectly consistent. The deviation from “1” is an indication of potential model problems in one or both layers. 
         [0065]    Results of the normalized, weighted dot product for model checking are shown in Table 12 below: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
           
               
                 TABLE 12 
               
             
             
               
                   
               
               
                 Model Consistency Check Using Dot Product 
               
             
          
           
               
                   
                 Dependent Variable 
                 Normalized Weighted Dot Product 
               
               
                   
                   
               
             
          
           
               
                   
                 STM VALVE 
                 1 
               
               
                   
                 PUMP AMP 
                 0.988758075 
               
               
                   
                 PRESSURE VALVE 
                 1 
               
               
                   
                 BOTTOM IMPURITY 
                 0.998368982 
               
               
                   
                 TOP IMPURITY 
                 0.999398415 
               
               
                   
                 TOWER DP 
                 1 
               
               
                   
                 TOP TRAY TEMP 
                 0.989908178 
               
               
                   
                   
               
             
          
         
       
     
         [0066]    For this example, all the dot products are very close to “1”. In a more realistic example, we may find dot products that are closer to zero, or even negative.