Model Predictive Control (herein referred to as “MPC”) is a technology utilized in various Advanced Process Control (herein referred to as “APC”) systems. MPC-based systems have been implemented on thousands of refining and chemical processes over the past two decades. DMCplus®, and the earlier version, DMC, (both available from Aspen Technology, Inc. of Cambridge, Mass.) is a widely used MPC-based system. In an MPC-based system, a model is used to predict the future behavior of a process, given the current and history input information (e.g., measurements of process conditions). An optimized control plan is calculated such that the predicted future response and the control action needed to achieve the response will satisfy certain predefined criteria. Once the calculated control plan is implemented (e.g., after the first point of the control move is implemented), the process measurements are collected and fed back to the controller to update the model predictions. A new control plan calculation is then initiated.
In an MPC-based controller, the model plays a central role. The model not only dictates the accuracy of the predictions, but it also affects the control actions. Model uncertainty is inevitable in practice, so the quality of the model should be evaluated based on its relevant application (i.e., not just the model's predictive ability, but also its control performance).
Collinearity in the model impacts control performance significantly. Excessive control action is one problem associated with unsolved collinearity in a model. The action of the controller, at least to some extent, mirrors the response from the model universe. When the model is nearly collinear, but is not perfectly collinear, excess control action may be generated in response to changes in system constraints or to achieve insignificant objective function improvements. A second problem associated with unsolved collinearity is that of unstable closed-loop control. If both the model and the underneath process are nearly collinear, but they have different directionality, the closed-loop system will become unstable. A third problem associated with unsolved collinearity is poor process performance. If the underlying process being modeled is not collinear, but the model is, then the controller will treat the process as if it has fewer degrees of freedom in the controlled variables and will not explore the full potential of the process. Poor control performance can even cause damage to the normal operation of the process.
Numerous attempts have been made to alleviate the problems posed by collinearity to MPC implementations. For example, some tools developed by the APC community detect a collinear model, or model subsets, through the use of either Relative Gain Array (herein referred to as RGA) or Singular Value Decomposition (herein referred to as SVD) to detect a collinear model or model subsets. See, for example, J. M. Maciejowski's “Multivariable Feedback Design,” published by Addison-Wesley Publishing Company, 1990, ISBN 0-201-18243-2, the entire teachings of which, are incorporated herein by reference. Some of those tools also adjust the model to minimize the RGA number; however, those approaches are limited to a 2×2 system.
A need exists for methods and articles for systematically detecting, verifying, and repairing collinear models.
This invention provides systematic methods to detect, verify, and repair the collinearity of a model or its subsets (also referred to as “sub-matrices”), such as models used for MPC-based control.
In one embodiment of the invention, a method first uses SVD to search over a given model matrix and identify all nearly collinear model subsets based on give condition number thresholds. Then the method estimates the control action aggressiveness or magnitude should the model be used for MPC-based control.
The method recommends a directional plant test to excite the process in its weak direction. After the directional plant test, a new model identification is conducted on the transformed space spanned by singular vectors. The transformed identification result is used to verify if the underneath process is truly collinear. If the verification concludes that the process, or a part of the process, is nearly collinear, then a “Collinerization” procedure is implemented. If the verification indicates that the process is not close to collinearity, then an “Uncollinearization” procedure is implemented.
In Collinearization, the smallest singular values of each selected subset of the model are set to exactly zeros while keeping the directionality unchanged (i.e., same singular vectors). If more than one solution is available, the one which is closest to the original model is selected and the deviation is minimized. In Uncollinearization, the condition numbers of each selected subset of the model are maximized through the adjustment of the model while keeping the directionality unchanged. In either case, the model is adjusted subject to the given constraints (e.g., model uncertainty bounds or any linear equations).
In some embodiments, this invention includes a systematic methodology to detect, verify, and repair collinearity or near collinearity in a model used for Model Predictive Control purposes.
In further embodiments, this invention includes a method of detecting, verifying, and repairing collinearity or near collinearity in a model. In one example, the method comprising the steps of defining bounds for a gain matrix, specifying a collinear threshold, examining the matrix to identify all near-collinear sub-matrices, scaling at least one weak output for each near-collinear sub-matrix, adjusting a control action magnitude, determining what type of model repair would be desirable, constructing a quadratic programming problem, and solving the quadratic programming problem to generate a new model matrix.
In yet another embodiment, this invention includes the use of an optimization formula, to make a selected sub-model perfectly collinear while the same directionality is maintained and the model deviation is minimized.
In still more embodiments, this invention includes the use of an optimization formula, to make a selected sub-model less collinear while the same directionality is maintained and the model deviation is minimized.
In some embodiments, this invention includes a computer program product, comprising a computer usable medium, and a set of computer program instructions embodied on the computer useable medium for detecting, verifying, and repairing collinearity or near collinearity in a model used for Model Predictive Control purposes.
In other embodiments, this invention includes a computer system to detect, verify, and repair collinearity or near collinearity in a model used for Model Predictive Control purposes. In one example, the computer system comprises a data transfer means for transferring data among components of a computer, a digital processor coupled to receive input from the data transfer means, and an output means coupled to the digital processor. The digital processor executes a method for analyzing a model used for Model Predictive Control purposes. The model detects collinearity or near collinearity in the model, verifies the collinearity or near collinearity in the model, and repairs the collinearity or near collinearity in the model. The output means provides to a user the analyzed model.
In still more embodiments, this invention features a chemical species manufactured by a process that includes a modeling method, wherein the modeling method is analyzed to detect, verify, and repair collinearity or near collinearity.
The methods of this invention can be applied simultaneously to more than one model subset, which is advantageous when dealing with multiple model subsets that share common elements. There is no limitation on the size of the collinear models or collinear subsets (at least 2×2, 3×3, 4×4, 5×5, 6×6, or more than 6×6). Both collinearization and uncollinearization are posed as a Quadratic Programming (QP) problem, and hence have unique solutions and can be solved efficiently. Additionally, this invention allows the imposition of constraints model gain(s) while the changes in the gain(s) is minimized. For example, some constrains that can be imposed are high and/or low bounds, material and/or energy balances, and the like.
The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.
A description of preferred embodiments of the invention follows. While this invention has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.
In order to describe the methods and articles of this invention in detail, an exemplar system will first be defined. It will be apparent to those of skill in the art that these definitions are for illustrative purposes only and that this invention includes additional methods not illustrated herein. It will also be apparent to those of skill in the art that this invention is applicable to systems and models that are not illustrated and/or do not comport with the definitions listed herein.
Definitions
Consider a model (G) which relates manipulated variables (MV) to controlled variables (CV), such that CV=G*MV or:
The model G can be, for example, the steady-state gain matrix or the frequency domain transfer functions. In the later case, the we consider the collinearity issue for a given frequency.
Assume n≧m and that the matrix G has the following singular values from SVD calculations:
σ1,σ2, . . . , σm where σ1>=σ2>=. . . >=σm>=0.
The original gain matrix can then be represented by Equation 2:
G=U*Diag(σi)*V′ Equation 2
Here, Unxm and Vmxm are both unitary matrices, and Ui and Vi represent the ith column of U and V, respectively. From the property of SVD, we have the following relationships (collectively referred to herein as “Equation 3”):
The maximum is achieved when MV moves along the direction defined by V1 (herein referred to as “the strong direction”), and the minimum is achieved when MV moves along the direction defined by Vm (herein referred to as “the weak direction”).
From Equation 2, each element in G can be expressed by Equation 4:
For a square system (i.e., where n=m), the relationship defined by Equation 2 can be reversed as shown in Equation 5:
Diag(σi)=U′*G *V Equation 5
Given the threshold s>0, a model matrix has a rank of r(s) if:
σr/σ1>=s and σr+1/σ1<s.
r(s)≧0 and r(s)≦m. If r(s)=m, then the given system has a full rank and the matrix is not “collinear.” If r(s)<m and σm=0, the system is “collinear” or “perfectly collinear.” If r(s)<m and σm=0, then the system is “nearly collinear.”
A transformed input vector MT and a transformed output vector CT as follows:
MT=V′*MV Equation 6
CT=U′*CV Equation 6.1
Then the transformed input and output variables have the following relationship:
cti=σi*mti, i =1, . . . , m Equation 7
G(sm) is a square sub-matrix derived from G, where sm=1, . . . , p and p is the number of all possible square sub-matrices. The dimension of G(sm) ranges from 2×2, 3×3, . . . , to m×m. When dealing with collinearity, the focus can be placed on square sub-matrices because if a n×m matrix is collinear (where n>m), then all its m×m sub-matrices must be collinear too.
Collinearity Detection
For a given model matrix G, and a given threshold s, a search over all sub-matrices G(sm), where sm=1, . . . , p, is conducted and the sub-matrices are sorted into three groups: 1) a not collinear group, Gn(sm); 2) a nearly collinear group, Gnc(sm); and, 3) a collinear group, Gc(sm).
If the Gnc(sm) group is empty, the method can be stopped. Alternatively, the threshold value can be modified and the method of the invention begun again. If the Gnc(sm) group is not empty, the collinearity of the sub-matrixes in that group is verified.
Collinearity Verification
When a sub-matrix falls into the nearly collinear group, the available degree of freedom is then either recognized or ignored even though the extra capability may be limited. In order to determine the best course of action for a given application, the collinearity can be verified. This verification includes determining whether the control action is acceptably aggressive for the needs of the given application, and controlling as described below:
Control Action Magnitude
When a system is nearly collinear, the associated control action for certain CV targets will be aggressive, since the control action is, to some extent, proportional to the response of the model inverse. The most significant magnitude (in the sense of 2-norm) of MV change happens when the CV move along the weak direction, that is,
CV=α*Um, αεR Equation 8
MV=(α/σm)*Vm Equation 9
α can be used as a scaling number so that the CV change will be in a desired range, and then the required MV change can be estimated from Equation 9. Based on the knowledge of the process, a practitioner can make a judgment if the control action required to achieve the targets is reasonable. If it is determined that the control action is desirable, then the near collinearity is acceptable and no model adjustment is necessary. If it is determined that the action is not desirable, a directional test and identification is performed.
Directional Test and Identification
As shown in Equation 7, for a nearly collinear process, the transformed outputs cti, i=r+1, . . . , m will have a relatively small response to the transformed inputs mti, i=r+1, . . . , m. Moreover, their corresponding singular value σi is similar to the gain between the transformed input and the transformed output. This relationship provides an opportunity to verify if the real process is the case, by employing the following procedure:
When conducting the directional test, all inputs are perturbed simultaneously with their direction and magnitude defined by the singular vector. As such, the inputs are highly correlated. Therefore, the identification is done either on the transformed space or the new data after it has been merged with the existing data.
One benefit from doing the test and identification in the transformed space is that a less conservative uncertainty bound can be estimated. Normally, each model curve has its own uncertainty bound and is independent from each other or univariate. This kind of uncertainty bound can be overly conservative. With the identification in the transformed space (since the singular vectors are unitary, their role is very similar to using latent variables), we are able to get an uncertainty described by a linear inequality (multivariate). This may result in a less conservative uncertainty description.
The relationship between the transformed variable and the original variables is as follows. Assume
A gain k is identified for (mt,ct). That is,
In the original space, the inputs and outputs satisfy the following equation:
Combining the above two equations, we have
Each mvi is independent, and:
Knowing the uncertainty bound on k allows the translation of this bound into a constraint on the original gain matrix (a linear inequality) with the use of Equation 10. This additional constraint can contribute to a less conservative uncertainty description and can be incorporated into the Collinearization and Uncollinearization procedures, as discussed subsequent.
Collinearization
If the process is deemed nearly collinear, then it can be desirable to make the corresponding model to be perfectly collinear. In another word, a practitioner can reduce the degree of freedom shown in the model matrix so that the controller will behave safer or in a more desirable manner. To accomplish this, the smallest singular value can be zeroed out using one of two approaches.
Direct Approach
Using Equation 4 can force σr+i=0, i=1, . . . m−r and then a new model K can be recalculated from
Since the dropped singular values are relatively small, the new model K will be similar to the original model G.
Optimization Based Approach
In some applications, the direct approach may not be appropriate. For example, if the original elements gij are very close to 0, the direct approach can results in an adjusted model kij having the opposite sign as the original model. In some applications, such a change in sign value can make it difficult to determine if the new model can be used safely. In another example, a collinear sub-matrix may share common elements with another collinear sub-matrix in matrices that are larger than 2×2, so that when one sub-matrix is adjusted, the adjustment adversely affects the other sub-matrix.
Furthermore, if the sub-matrices are repaired one by one, it can result in a never ending loop with the repairs to one sub-matrix giving rise to a need for more repairs to the other sub-matrix. In addition, changes in the directionality of the model can adversely affect the controller more than the original collinearity.
Also, it can be desirable to impose constraints on how the model can be adjusted. For instance, a gain should not flip its sign and it should stay within its uncertainty bound, etc.
To address these concerns, the following optimization formula is created:
subject to:
i,j=1, . . . , m(sm), sm=1, . . . , p
G(0) represents the nominal model, G+ and G− represent the allowed upper and lower bound of the model. σij− and σij+ are allowed upper and lower bound for the singular values. m(sm) is the dimension of the sub-matrix sm. p is the total number of nearly collinear sub-matrices Gnc(sm).
Equation 10 is the objective function. The objective function minimizes deviation from the nominal model as long as the required perfect collinearlity can be achieved. Constraint 10.1 represents the allowed variation for each model element. Constraint 10.2 is contributed from each nearly collinear sub-matrix. All uli(sm) and vli(sm) are the singular vectors calculated from the original sub-matrix Gnc(sm), and hence the same directionality is always maintained.
In some embodiments, σij− and σij+ are set to
Finally, Equation 10 is a standard QP formula and can be solved globally and efficiently.
Uncollinearization
If the process is not collinear, or is nearly collinear but needs the controller to fully explore its capability, then adjustments to the model can be made to improve the condition number so that an improved robustness can be achieved.
Uncollinearization should satisfy the following requirements:
gij+ and gij− denote the upper and lower bounds of the allowed model adjustment, σi− and σi+ are upper and lower bounds on the singular values, σr+i(0) represents the original singular value, and m(sm) is the dimension of the sub-matrix sm. p is the total number of nearly collinear sub-matrices Gnc(sm). Additional explanation of Equation 11 is provided below.
The objective function is to maximize the portion of the smaller singular values of all nearly collinear sub-matrices. The weighting factor, 1/σr(sm)+i(0), means the smaller the original singular value, the more improvement the optimizer will attempt to obtain. Constraint 11.1 represents the allowed variation for each model element. All uik(sm) and vjk(sm) (as well as uik(q) , vjk(q) , uik(t), and vjk(t)) are the singular vectors calculated from the original sub-matrix Gnc(sm) (or Gnc(q), Gnc(t)), and hence the same directionality is always maintained. Constraint 11.2 is the allowed singular value variation range, which is discussed further below.
Constraint 11.3 is needed if there are two sub-matrices who share the same element in the original model matrix. In this case, any adjustment made for one sub-matrix will automatically be coordinated with another associated sub-matrix, and hence remove the “zigzag problem.”
The final goal is to maximize the condition number. Equation 11 does not explicitly employ a condition number because directly optimizing a condition number will pose a computation problem so difficult as to be unrealistic. As such, an approximation is made by maximizing the portion of the smaller singular values, while keeping the other singular values from dropping too low. For this purpose, the bounds for each singular value should be set as follows:
Equation 11 is a standard QP formula, and hence, can be solved globally and efficiently.
At Step 2, the upper and lower bounds for the gain matrix are defined. For example, this can be the previously discussed uncertainty bounds or the percentage of gain variation allowed. Then a collinear threshold is specified at Step 3.
At Step 4, the matrix is examined to identify all near-collinear sub-matrices. In some embodiments, this is accomplished with the use of Equation 5. Before any SVD calculation is carried out, a sub-matrix can be scaled so that the scaled sub-matrix has a condition number close to its optimal value.
Step 5 includes presenting the following results to the user:
Step 6 includes providing a scaling factor for each near-collinear sub-matrix so that the user can scale the weak outputs to a more meaningful or desired range. The control action magnitude is then automatically adjusted accordingly. In some embodiments, this is accomplished with the use of Equation 8.
At Step 7, the practitioner specifies what kind of model repair should be taken (e.g., Collinearization or Uncollinearizaton), and then selects which sub-matrix will participate in the repairs.
Then at Step 8, the optimization program constructs a QP problem based on the inputs (e.g., submatrices that are to be repaired) and runs a QP solver to produce a new model gain matrix. In some embodiments, this is accomplished with the use of Equations 10 and/or 11.
At Step 9, the results are evaluated and if the results are not satisfactory, Process 15 is repeated, starting at Step 4, with the newly generated model matrix. This loop is repeated until satisfactory results are obtained.
With satisfactory results, the threshold or uncertainty bounds are modified at Step 10, and the method is started again. Once the nearly collinear submatrices are repaired to the extent desired, then a practitioner proceeds to Step 11, which includes exporting the new model matrix.
The present invention also includes computer implementation of methods to detect, verify, and repair the collinearity of a model or its subsets, such as models used for MPC-based control.
Some examples are provided here to illustrate the methodology described above. The examples are not to be interpreted as limiting in any way.
Consider a 2×2 distillation process with the following configuration:
The process is simulated by linear dynamics shown in
In the simulated process, certain colored noise is added to the output signals.
First, a regular step test is carried out and the test data is shown in
A collinearity check on the identified gain matrix is run, and the SVD calculation shows the following result:
Based on the weak direction (using Equations 8 and 9 with α=−1), to achieve a delta change in
would need a control action of
This control action may be too aggressive from the engineering point of view and hence the process may have collinearity issues. To verify if the real process is the case, a directional test is carried out defined by the weak direction. That is,
Δmv1/Δmv2=(−0.7421)/(−0.6703)=1.1071
The test data is shown in
The transformed input and output are:
mt=−0.7421*mv1−0.6703*mv2
ct=0.7222*cv1+0.6917*cv2
A model for (mt,ct) is identified using the directional test data and is shown in
To illustrate the importance of directional testing to a nearly collinear process, an identification is run in the same transformed space, but with the regular test data (i.e., without the directional test).
An improved model can be identified if both data sets (obtained from the regular test and the directional test) are utilized. The new model has a gain matrix of
Let's consider a gain matrix shown below:
Given a threshold of s=0.0001, the following three sub-matrices are identified to be collinear:
with singular values σ=(0.831627 7.57818e−5)
with singular values σ=(3.44311 6.69126e−5)
with singular values σ=(3.2117 1.89876 0.60946 3.5965e−5)
Assuming that each gain element is allowed to vary no more than 10% from its nominal value.
The Collinearization results:
with singular values σ=(0.831509 0)
with singular values σ=(3.44302 0)
with singular
values σ=(3.21072 1.89861 0.602891 0)
The uncollinearization result:
with singular values σ=(0.905079 0.0169216)
with singular values σ=(3.64152 0.0666536)
with singular
values σ=(3.23766 1.9333 0.648371 0.00239357).
This application claims the benefit of U.S. Provisional Application No. 60/457,060, filed on Mar. 21, 2003. The entire teachings of that application are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
20040249481 A1 | Dec 2004 | US |
Number | Date | Country | |
---|---|---|---|
60457060 | Mar 2003 | US |