Article pubs.acs.org/IECR
A New Target Function for Robust Data Reconciliation Siyi Jin,* Xuewen Li, Zhaojie Huang, and Meng Liu College of Chemical Engineering, Qingdao University of Science and Technology, Qingdao 266042, China ABSTRACT: To detect the gross errors efficiently in the process of data reconciliation, a new target function is proposed based on robust M-estimators. Robustness of this new target function is evaluated through the influence function. Then, the performance of the new target function is illustrated through a linear data reconciliation example and a nonlinear one. Simulation results show that the new target function gives promising results for data reconciliation and gross error detection. Besides, the proposed new target function has an advantage over the Cauchy and Huber functions on detecting small gross error.
1. BACKGROUND Reliable and accurate process measurements are crucial for the control, simulation, and management of a process. However, there are random errors and gross errors in the measurements. The random errors are commonly assumed to be independently and normally distributed with zero mean, while the gross errors rarely exist and do not obey the normal distribution. The gross errors are usually caused by nonrandom events such as leaks, depositions, measurement biases, and malfunctioning instruments. Due to these errors, measurements will not obey the laws of conservation. Data reconciliation is a procedure of optimally adjusting measured data so that the adjusted values obey the conservation laws and other constraints.1 The conventional method for data reconciliation is based on least-squares problem, and measurements are assumed to follow the normal distribution. In fact, it is often difficult to determine the distribution of data corrupted with gross errors, thus the use of estimators derived from a fixed probability distribution is not justified. The analogy between data reconciliation and parameter regression made it possible that results in robust identification can be applied to data reconciliation. In robust parameter estimation, one uses an objective function in the minimization that, due to its mathematical nature, is insensitive to deviations from the ideal assumptions on errors, especially to outliers. Important classes of robust estimators are maximum likelihood estimators or M-estimators. These are commonly of two types, Huber estimators and Hampel estimators. The former significantly reduces the effect of large outliers whereas the latter nullifies their effect.2 Ö zyurt and Pike3 have compared some robust data reconciliation techniques based on the Cauchy distribution, Lorentzian distribution, contaminated normal distribution, and so on. Zhou4 has used the equivalent weights method to transform the nonlinear robust data reconciliation problem into a least-squares estimator problem, so the problem can be solved by a linear iterative algorithm, avoiding the use of nonlinear programming. Wang and Romagnoli5 have provided, using a generalized objective function within a probabilistic approach, a unified view on robust data reconciliation and revealed the conditions of robustness as well as efficiency by investigating a set of objective functions in the optimization and their associated influence functions. Ragot and Chadli6 have © 2012 American Chemical Society
presented a robust approach for data reconciliation using a cost function that is less sensitive to the outlying observations than that of least-squares. Tjoa and Biegler7 have proposed redescending estimators of Hampel and compared its performance with a Huber estimator and the Fair function. Prata and Pinto8 have presented a comparative performance analysis of various robust estimators used for nonlinear dynamic data reconciliation process subject to gross error. Valdetaro and Schirru9 have presented a model selection, robust data reconciliation, and outlier detection method. The new method directly minimizes the robust akaike information criteria and does not need a separate procedure to tune the first redescending estimator and later perform the data reconciliation and gross error detection method. In this paper, a new target function is proposed based on robust M-estimators10 and the performance of the new target function is illustrated through a linear data reconciliation example and a nonlinear one.
2. NEW TARGET FUNCTION BASED ON THE M-ESTIMATOR When there are gross errors in the measurements, the accuracy of the reconciled data based on conventional weighted leastsquares method is affected. However, robust estimators can significantly reduce the effect of gross errors. The most important robust estimators for data reconciliation belong to the class of M-estimators, which are generalizations of the maximum likelihood estimator. The robust data reconciliation problem can be presented in the form n
min ∑ ρ( i=0
xî − xi , u) = σi
n
∑ ρ(ri , u) i=0
(1)
Subject to F(x , u) = 0
Where xi and x̂i are vectors of the measured and reconciled variables; σi and ri are vectors of standard deviations and Received: Revised: Accepted: Published: 10220
August 19, 2011 June 21, 2012 July 13, 2012 July 13, 2012 dx.doi.org/10.1021/ie2030773 | Ind. Eng. Chem. Res. 2012, 51, 10220−10224
Industrial & Engineering Chemistry Research
Article
relative residuals of the measured variable xi; u is the vector of parameter estimates; The model constraints of stead-state data reconciliation are represented by functions F. ρ represents a robust function (estimator) used for formulation of the data reconciliation problem. As measurement errors are commonly assumed to follow normal distributions, the plot of robust estimation function should be similar to that of the conventional weighted leastsquares function. On the basis of robust M-estimation theory, robust estimation function must give less weight to a large value of r than weighted least-squares function form r2, so that the Mestimator will down-weight or ignore the contribution of the large errors in the data reconciliation. A number of robust estimators can be chosen as the robust estimation function. In robust estimation, influence function defined by I(r) = (dρ(r))/ dr is the usual tool for comparing the robustness of alternative M-estimators. Criteria for influence function are that it is (a) bounded, (b) continuous, and (c) I(r) should approach to a constant when r → ∞. The new robust M-estimator proposed in this paper can be established according to the above robustness requirements. The new target function is as follow. ⎧ 2⎛ ⎪ c ⎜1 − ⎪6⎜ ρ (r ) = ⎨ ⎝ ⎪ r2 ⎪ ⎪ A ln 2 ⎩ c
of 28 and 2000 simulation runs. When efficiency values are approximately 90%, tuning constants of the proposed new target function in the paper, Cauchy function, and Huber function are c = 3, a = 0.65; u = 1.75; k = 1.0, respectively. To weigh the robustness of the new target function, the partial derivative of the new target function is calculated. The influence function is marked as I(r), and the formula of the influence function is as follows: ⎧ ⎛ 2 ⎞2 ⎪ ar ⎜1 − a r ⎟ if |r | ≤ c ⎪ ⎝ c2 ⎠ I (r ) = ⎨ ⎪ A if |r | ≥ c ⎪2 ⎩ r
(5)
The regularity of the influence function which changed with r is shown in Figure 1.
3⎞ ⎛ r2 ⎞ ⎜1 − a 2 ⎟ ⎟⎟ if |r | ≤ c ⎝ c ⎠⎠
+B
if |r | ≥ c
(2)
Where A = (c2a(1 − a)2)/2, B = (c2(1 − (1 − a)3))/6, a is a tuning constant and chosen between 0 and 1, and c is a critical value. If |ri| ≤ c, there is no gross error in the measurement; otherwise, there is a gross error. As ri is commonly assumed to be independently and normally distributed with zero mean, for a given level of significance β, the value of c should be equal to the critical point Z1−β/2(Z ∼ N(0,1)). The common levels of significance β are equal to 0.1, 0.05, 0.01, and 0.002, and the corresponding critical points Z1−β/2 are respectively equal to 1.645, 1.960, 2.576, and 3.090. So, the value of c can be chosen between 1.645 and 3.090. In addition, we have studied Cauchy and Huber function; the forms of their functions are as follows: Cauchy ⎛ r2 ⎞ ρ(r ) = u 2 ln⎜1 + 2 ⎟ ⎝ u ⎠
Figure 1. Plot of influence functions of several estimators for various relative residuals.
In this figure, the abscissa represents the relative residual and the ordinate represents different influence functions. The influence functions of the Huber and Cauchy functions are chosen to compare with that of the new target function. Figure 1 shows how influence functions depend on the relative residual for the Cauchy, Huber, and new functions. The effect of larger errors is reduced for the ρ function of the Cauchy Mestimator, shown by the gradually decreasing influence function in the region of the relative error greater than 1.75. The effect of larger errors is steady for the ρ function of the Huber Mestimator, shown by not changing the value of the influence function in the region of the relative error greater than 1.0. To the influence function of the new target function, as the relative residual increases, the calculated value of the influence function increases at first, then becomes small; when the relative residual is greater than 3.0, the value of influence function is close to zero. So the influence of gross error can be eliminated more effectively than the Huber and Cauchy functions. Thus, the new target function has stronger robustness than the Huber and Cauchy functions.
(3)
Huber ⎧ r2 ⎪ |r | ≤ k ⎪2 ρ (r ) = ⎨ ⎪ k2 |r | ≥ k ⎪ k |r | − ⎩ 2
(4)
Here, u and k act as a tuning parameter for performance of the Cauchy and Huber estimators. To compare the data reconciliation and gross error detection performance of these robust functions, they were first standardized by properly tuning their parameters. These robust functions have their tuning constants given as a function of asymptotic efficiency. Therefore, approximate finite sample variances and consecutively relative efficiencies were calculated by simulation and Monte Carlo studies.11 We performed a similar study for the above ρ(r) functions with a sample size
3. EXAMPLES OF DATA RECONCILATION In this paper, two examples are used to compare the performance of the new target function with that of the 10221
dx.doi.org/10.1021/ie2030773 | Ind. Eng. Chem. Res. 2012, 51, 10220−10224
Industrial & Engineering Chemistry Research
Article
Huber and Cauchy functions. The first example considers a linear model, while the second one uses a nonlinear model. Sum-of-squared errors (SSE) and total error reduction (TER)13 are chosen as the performance criteria for data reconciliation. The definition and formula of SSE and TER are as follows: n
∑i = 1 ((xi − xit)/ri)2 −
TER =
Table 1. Results of Data Reconciliation for Linear Example parameters X2
n
∑i = 1 ((xi* − xit)/ri)2
X2 X5
n
∑i = 1 ((xi − xit)/ri)2 X2 X5 X7
(6)
SSE =
∑ (x* − x t)2 + ∑ (u* − u t)2
(7)
Where the superscript t represents the true value, the superscript * represents the reconciled estimates, u represents unmeasured estimates, and x represents measured variables. According to the meaning of the formulas, if SSE becomes small or TER increases, the reconciled value will be closer to the true value. Performance measures to evaluate different gross error detection criteria employed are the overall power (OP): OP =
SSE
TER
OP
AVTI
0.1194 0.1240 0.1331 0.1563 0.1860 0.3040 0.2909 1.4193 3.3703
0.7374 0.7349 0.7307 0.8012 0.7851 0.7438 0.7812 0.5088 0.1884
0.9667 0.9578 0.9545 0.9531 0.9267 0.9046 0.9133 0.6678 0.4101
0.0104 0.0120 0.0142 0.0158 0.0224 0.0763 0.0558 0.4614 1.1445
decrease. When there are three gross errors in this example, the reconciled values and four criteria based on the Huber and Cauchy functions weaken. In other words, as the number of the gross errors increases, the robustness of the Huber and Cauchy functions decreases. To the new target function, SSE, TER, OP, and AVTI are more stable and satisfactory, so the number of gross errors has little influence on the new target function compared with the Huber and Cauchy functions. Thus, the new target function has stronger robustness than the Huber and Cauchy functions. In addition, we have also studied the influence of the magnitudes of the biases on the performance of gross error detection when there is only one gross error. The calculated process is as follow. The magnitudes of the biases are taken to be between 3σ and 10σ, then the corresponding OP is calculated respectively. Each case is run 10 000 times to get a statistic result of OP. The calculated results are shown in Figure 3.
number of gross errors correctly identified number of gross errors simulated
and average number of type I errors (AVTI):13 AVTI =
N C H N C H N C H
number of gross errors wrongly identified number of simulation trials made
3.1. Linear Example. A process network14 with four nodes and seven streams is chosen for simulation study. Figure 2 is a
Figure 2. Measurement network.
schematic diagram of the process network. The true values of the measurements are the following: x = [5,15,15,5,10,5,5]T. Standard deviations σ of the observations are taken to be 2.5% of the true value of the variables. The measurements only containing random errors are generated by adding normal noise from N(0,σ) to the true values. There are three cases of the example: one gross error, two gross errors, and three gross errors. The locations of gross errors are randomly chosen. The magnitudes of the biases are taken to be between 3σ and 10σ. The calculated results are shown in Table 1. The labels N, H, and C represent the new target function, Huber function, and Cauchy function, respectively. Each case is run 10 000 times. From Table 1, it can be seen that when there is one or two gross errors, SSE and AVTI of the new target function are smaller than the results of the Huber and Cauchy functions, while TER and OP are larger. These results indicate that the reconciled value of new target function is more accurate than those of the Huber and Cauchy functions. When there are three gross errors, it is obvious that the results of the new robust function for data reconciliation and gross error detection are better than those of the Huber and Cauchy functions. It can be found that as the number of gross errors increases, SSE and AVTI based on the Huber and Cauchy functions increase, while TER and OP based on the two functions
Figure 3. OP for bias between 3σ and 10σ.
From Figure 3, it can be found that OPs of the three functions all gradually increase between 3σ and 5σ, but OP of the new target function is still higher than the others. Besides, OP of the new target function is 56% when the magnitude of the bias is equal to 3.1σ, while OPs of the Cauchy and Huber functions are 33% and 14.5%, respectively. This indicates that the new target function has great advantage over the Cauchy and Huber functions on detecting small gross error. 3.2. Nonlinear Example. The example that has been used by Biegler7 is chosen for simulation study. There are 5 measurements, 3 unmeasured variables, and 6 nonlinear process constraint equations in this example. The process constraint equations are as follows: 10222
dx.doi.org/10.1021/ie2030773 | Ind. Eng. Chem. Res. 2012, 51, 10220−10224
Industrial & Engineering Chemistry Research ⎧ 0.5x 2 − 0.7x + x u + x 2u u + 2x u 2 1 2 3 1 2 1 2 3 3 ⎪ − 255.8 = 0 ⎪ ⎪ ⎪ x1 − 2x 2 + 3x1x3 − 2x 2u1 − x 2u 2u3 + 111.2 ⎪ =0 ⎪ ⎪ ⎨ x3u1 − x1 + 3x 2 + x1u 2 − x3 u3 − 33.57 ⎪ ⎪ =0 ⎪ x − x − x 2 + u + 3u = 0 1 3 2 3 ⎪ 4 ⎪ x5 − 2x3u 2u3 = 0 ⎪ ⎪ 2x + x x u + u − u − 126.6 = 0 ⎩ 1 2 3 1 2 3
Article
is also studied. The calculated process is the same as the linear example. The calculated results are shown in Figure 4.
(8)
Where, x represents measured variables and u represents unmeasured estimates. The true value of measurements and unmeasured estimates are respectively as follows:
Figure 4. OP for bias between 3σ and 10σ.
xexact = [4.5124, 5.5819, 1.9260, 1.4560, 4.8545]T
From Figure 4, it can be found that OP of the three functions all gradually increase between 3σ and 5σ, but OP of the new target function is still higher than the others. Besides, the performance of gross error detection of new target function is superior to those of the Cauchy and Huber functions between 3σ and 4σ. This indicates the new target function has a great advantage over the Cauchy and Huber functions on detecting small gross error. When the magnitudes of the biases are about between 7σ and 10σ, OPs of the Cauchy and Huber functions begin to descend while those of the new target function still keep a higher level. The reason is that there are three observable unmeasured variables and one measured variable with gross error in the nonlinear example, which increases the complexity of the example. In addition, there exists stronger relevance among measurements in this example. Thus, gross errors are shared among measurements when the magnitudes of the biases are greater than7σ. So the performance of data reconciliation and gross error detection becomes weak. The influence function of the proposed new target function in this paper become very small and even is closer to zero as relative residual gradually increases. So the new target function has stronger robustness and reduces the share of gross errors among measurements and can effectively detect gross errors.
T
uexact = [11.070, 0.6147, 2.0504]
The standard deviations of the measurements are as follows: SD = [0.0902, 0.1116, 0.0386, 0.0292, 0.097]T
There are three cases of the example: one gross error, two gross errors, and three gross errors. The locations of gross errors are randomly chosen. The magnitudes of the bias are taken to be between 3σ and 10σ. The measurements only containing random errors are generated by adding normal noise from N(0,σ) to the true values. Each case is run 10 000 times. The calculated results are shown in Table 2, and the meanings of the symbols in Table 2 are same with the symbols in Table 1. Table 2. Results of Data Reconciliation for the Nonlinear Example parameters X3
X2 X3
X2 X3 X4
N C H N C H N C H
SSE
TER
OP
AVTI
0.0567 0.0577 0.0602 0.0887 0.0963 0.5948 0.1222 0.1858 0.3304
0.7977 0.7950 0.7932 0.8475 0.8364 0.7524 0.6568 0.4988 0.4170
0.9843 0.9788 0.9761 0.9678 0.9540 0.8863 0.8147 0.6734 0.6157
0.0096 0.0151 0.0235 0.0008 0.0013 0.0026 0.0000 0.0000 0.0000
4. CONCLUSION Based on robust M-estimators and the principle of data reconciliation, a new target function for robust data reconciliation is proposed in this paper. By analyzing the results from two data reconciliation examples and comparing the new target function with the classical Huber function and Cauchy function, some conclusions can be drawn as follows. For the linear and the nonlinear data reconciliation problem, when there are one or two gross errors, the results of new target function for data reconciliation and gross error detection are obviously more accurate than the results of the Cauchy and Huber functions. When there are three gross errors, results of the new target function are more stable and satisfactory than those of the Cauchy and Huber functions, so the number of gross errors has little influence on the new target function compared with the Cauchy and Huber functions. Thus, the new target function has stronger robustness. When the magnitudes of the biases are different, the performance of gross error detection is different. According to the results of the linear example and the nonlinear example,
From Table 2, it can be found that when there is one or two gross errors, performances of the new target function are superior to the Cauchy and Huber functions in data reconciliation and gross error detection. When there appear three gross errors, OP of the three functions all descend obviously and the rate of descent of the new function is slower than those of the Cauchy and Huber functions, but OP of the new function is still higher than the others. These results reveal that the influence of multiple gross errors on detection performance of the new target function is weaker than those of the Cauchy and Huber functions. Thus, the new target function has stronger robustness than the Huber and Cauchy function for a nonlinear example. The influence of the magnitudes of the biases on the performance of gross error detection for the nonlinear example 10223
dx.doi.org/10.1021/ie2030773 | Ind. Eng. Chem. Res. 2012, 51, 10220−10224
Industrial & Engineering Chemistry Research
Article
the performance of gross error detection of the new target function is superior to those of the Cauchy and Huber functions between 3σ and 4σ. This indicates that the new target function has a great advantage over the Cauchy and Hubers function on detecting small gross error.
■
AUTHOR INFORMATION
Corresponding Author
*Tel.: +86 053284022957. E-mail:
[email protected]. Notes
The authors declare no competing financial interest.
■
ACKNOWLEDGMENTS The authors are grateful for financial support from the project of State Key Laboratory of Heavy Oil Processing and the National Nature Science Foundation of China.
■
REFERENCES
(1) Narasimhan, S.; Jordache, S. Data reconciliation & gross error detection: an intelligent use of process data; Gulf Publishing Company: Houston, TX, 2000. (2) Arora, N.; Biegler, L. T. Redescending estimators for data reconciliation and parameter estimation. Comput. Chem. Eng. 2001, 25, 1585−1599. (3) Ö zyurt, D. B.; Pike, R. W. Theory and practice of simultaneous data reconciliation and gross error detection for chemical processes. Comput. Chem. Eng. 2004, 28, 381−402. (4) Zhou, L. K.; Su, H. Y.; Chu, J. A new method to solve robust data reconciliation in nonlinear process. Chin. J. Chem. Eng. 2006, 14 (3), 357−363. (5) Wang, D.; Romagnoli, J. A. A Framework for Robust Data Reconciliation Based on a Generalized Objective Function. Ind. Eng. Chem. Res. 2003, 42, 3075−3084. (6) Ragot, J.; Chadli, M.; Maquin, D. Mass Balance Equilibration: A Robust Approach Using Contaminated Distribution. AIChE J. 2005, 51 (5), 1569−1575. (7) Tjoa, I. B.; Biegler, L. T. Simultaneous strategies for data reconciliation and gross error detect ion of nonlinear systems. Comput. Chem. Eng. 1991, 15, 679−690. (8) Prata, D. M.; Pinto, J. C.; Lima, E. L. Comparative analysis of robust estimators on nonlinear dynamic data reconciliation. Comput.Aided Chem. Eng. 2008, 25, 501−506. (9) Valdetaro, E. D.; Schirru, R. Simultaneous model selection, robust data reconciliation and outlier detection with swarm intelligence in a thermal reactor power calculation. Annal. Nuclear Energy 2011, 38, 1820−1832. (10) Tukey, J. W. Explortary Data Analysis. Addison-Wesley: Reading, MA, 1977. (11) Hampel, F. R. The breakdown points of the mean combined with some rejection rules. Technometrics 1985, 27 (2), 95−107. (12) Huber, P. J. Robust statistics; Wiley: New York, 1981. (13) Serth, R. W.; Valero, C. M.; Heenan, W. A. Detection of gross error in nonlinearly constrained data: A a case study. Chem. Eng. Commun. 1987, 51, 89−104. (14) Rosenberg, J.; Mah, R. S. H.; Iordache, C. Evaluation of schemes for detecting and identifying gross errors in process data. Ind. Eng. Chem. Res. 1987, 26, 555−564.
10224
dx.doi.org/10.1021/ie2030773 | Ind. Eng. Chem. Res. 2012, 51, 10220−10224