Ind. Eng. Chem. Res. 1999, 38, 2391-2399
2391
A Strategy for Detection of Gross Errors in Nonlinear Processes T. Renganathan and Shankar Narasimhan* Department of Chemical Engineering, Indian Institute of Technology Madras, Chennai 600 036, India
Gross error detection (GED) is an important function in automated processing of plant data. All GED tests developed so far are based on a linear theory and can be applied to nonlinear processes only after suitable linearization of the process constraints. In this paper, we propose a test for GED in nonlinear processes which does not require the constraints to be linearized. Although the proposed test does not have a rigorous statistical basis, it is entirely analogous to the generalized maximum likelihood ratio test. This test is combined with different existing strategies for multiple GED to determine the best possible method. Simulation results show that for a significantly nonlinear system the proposed test performs better than tests which rely on linearizing the constraints. However, for mildly nonlinear systems such as those with only bilinear constraints, the performances are comparable. The simple serial compensation strategy is shown to be better than its modified version as well as the serial elimination strategy, especially when the aim is to maximize accuracy of the final estimates. Introduction In a modern chemical plant, a large number of measurements are available as a result of digital data acquisition systems and reliable low-cost sensors. Such data are important for process monitoring, model identification, operational optimization, and control. Generally all of these measurements are corrupted by random errors arising from power fluctuations and disturbances in ambient conditions. Thus, measured data are not consistent; that is, they do not satisfy the mass and energy balance equations exactly and hence may result in improper control and optimization of the process. Data reconciliation (DR) is a technique that has been developed and refined over the past 35 years to obtain accurate and consistent estimates of variables from measured data. However, some measurements may also contain systematic biases (gross errors) resulting from sources such as a process leak, improper instrument calibration, or malfunctioning sensors, which can adversely affect the performance of DR. The technique of gross error detection (GED) has been developed to identify and eliminate measurements containing gross errors. Because measurements are always assumed to contain random errors, GED tests have been developed using a statistical basis. Various tests such as the global test,1 the nodal test,2 the measurement test,3 the generalized likelihood ratio (GLR) test,4 the Bonferroni test,5 and the principal component test6 have been developed. Among these, the GLR test has the capability of directly identifying the gross error location and distinguishing between different types of gross errors such as leaks and biases. Furthermore, it is also the most powerful statistical test under the assumption that at most one gross error is present in the data.7 All of the above tests can strictly be applied only to linear systems. For nonlinear processes, a linear approximation of the constraints has to be used before the tests can be applied. Relatively, less work has been done on the development of GED tests for nonlinear pro* To whom correspondence should be addressed. E-mail:
[email protected].
cesses. Rollins and Roelfs8 developed a GED method restricted to bilinear processes. Terry and Himmelblau9 addressed the problem of rectifying data containing gross errors in nonlinear processes using artificial neural networks but did not specifically address the GED problem. Kim et al.10 used a nonlinear programming technique along with a measurement test to improve GED in nonlinear systems; however, the GED is still based on a test statistic obtained by linearizing the constraints. In this paper, a GED test for nonlinear processes is proposed which does not require the constraints to be linearized. A preliminary version of this test was proposed by Mukherjee and Narasimhan11 for leak detection in pipeline networks. While the main focus of this paper is to develop the GED test for nonlinear processes, we also derive new results concerning the theoretical equivalence of different strategies used for identification of gross errors. Currently, for multiple identification of gross errors two strategies are available, the serial elimination strategy and the serial compensation strategy. Both strategies detect gross errors serially, one at each successive application (iteration) of the GED test. In the serial elimination strategy originally proposed by Ripps1 and later modified by Nogita,12 at each iteration the measurement identified as containing a gross error is eliminated, and the GED test is applied to the remaining measurements for detecting more gross errors. In the serial compensation strategy proposed by Narasimhan and Mah,4 the measurement identified as containing a gross error is compensated using its estimated magnitude and the GED test is again applied to the compensated set of measurements for detecting more gross errors. The serial compensation strategy was shown to make a large number of mispredictions especially when the number of gross errors in the data increases or when the gross error magnitudes are large.5,13 To overcome this limitation, the serial compensation strategy was later modified by Keller et al.13 In the modified strategy, only the types and locations of gross errors identified in previous iterations are assumed to be correct and the next gross error is identified without compensating the measurements.
10.1021/ie980546i CCC: $18.00 © 1999 American Chemical Society Published on Web 05/12/1999
2392 Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999
In this paper the proposed GED test for nonlinear processes is combined with each of the above multiple GED strategies, and the performance of each of these combinations for detecting measurement biases in nonlinear systems is investigated. As a reference, the performance of the GLR test (using the original and modified serial compensation strategy) based on linearizing the constraints is also compared. Three simulation examples are used to extensively compare the performance of the different methods. The proposed GED test performs better than the GLR test based on linearized constraints for a continuous stirred tank reactor which represents a significantly nonlinear process. However, for a mildly nonlinear system, such as a mineral beneficiation process or a heat exchanger network, the performances are identical. The modified serial compensation strategy (or equivalently, the serial elimination strategy) is better than the simple serial compensation strategy in terms of GED performance (that is, it makes a larger percentage of correct predictions and fewer mispredictions) especially for large gross error magnitudes. However, surprisingly in terms of data reconciliation performance (that is, in terms of the accuracy of the final estimates), the simple serial compensation strategy outperforms the other strategies compared in this study. Problem Formulation We start with a brief review of the GLR test as applied to a linear system to motivate the development of the GED test for nonlinear processes. We restrict our consideration to gross errors caused by sensor biases. Measurement Model. In the absence of gross errors, the measurement model is given by
y)x+v
(2)
where ei is a vector with unity in position i and zero elsewhere. Process Model. For a linear process the variables x are expected to obey the steady-state constraints given by
Ax ) c
(3)
where A is the constraint matrix and c is a constant vector of known values. In the above model, it has been implicitly assumed that there are no unmeasured variables. If there are unmeasured variables, then they can be eliminated using Crowe’s projection matrix14 and the constraints reduced to the form of eq 3. Generalized Likelihood Ratio (GLR) Test. The GLR test statistic for a hypothesized gross error in a measurement is given by4
T ) sup {r′V-1r - (r - bfi)′V-1(r - bfi)} b,fi
(4)
r ) Ay - c
(5)
V ) AQA′
(6)
fi ) Aei
(7)
If T exceeds a specified threshold (obtained from the χ2 distribution with 1 degree of freedom for a specified level of significance), then a gross error is detected and identified in the position which leads to the maximum value in eq 4. Application of the GLR Test for Nonlinear Systems Using Linearization. In the case of a nonlinear process, the linear constraints given by eq 3 are replaced by nonlinear constraints described by
F(x) ) 0
(8)
where F is a vector of m nonlinear functions which represent the mass (component) and energy balance equations. Although the GLR test is strictly applicable to linear systems, it may be used for nonlinear systems by employing the following linearization technique. In this technique, the nonlinear process constraints are linearized around some estimates of the variables. These estimates are usually chosen to be the reconciled values of the measured variables before GED is performed, that is, the estimates obtained by performing the following DR problem (in the following optimization problem and all subsequent ones, only the objective function is defined and the constraints on the variables are assumed to be given by eq 8 unless otherwise explicitly stated).
Problem P1
(1)
where y is the vector of n measurements, x is the vector of true values of measured variables, and v is the vector of random measurement errors. The measurement errors are assumed to be normally distributed with mean 0 and known covariance matrix Q. If a bias of unknown magnitude b in measuring instrument i is present, then the measurement model is given by
y ) x + v + bei
where
Min (y - x)′Q-1(y - x) x
Let xˆ be the solution of the above problem obtained as given in Pai and Fisher15 satisfying
F(xˆ ) ) 0
(9)
We use these estimates to linearize eq 8 to obtain
F(x) = Jxˆ (x - xˆ )
(10)
where Jxˆ is the Jacobian of F with respect to measured variables evaluated at the final solution xˆ . Rearranging, we get
Jxˆ x ) d
(11)
d ) Jxˆ xˆ
(12)
where
Equation 11 is of the same form as eq 3. Hence, the GLR test can be applied as in the linear case using the above approximate equations. There are two disadvantages with this linearization approach. First, due to linearization, there can be a degradation in the performance of the GLR method. Second, the estimates around which the constraints are linearized are derived based on a DR of the measurements under the assumption that none of them contain any gross error. To overcome these disadvantages, we propose a nonlinear test based on the method suggested
Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999 2393
by Mukherjee and Narasimhan11 for leak detection in nonlinear processes. GED Test for Nonlinear Processes We motivate the development of the GED test for nonlinear processes by analyzing the principle used in the GLR test for linear systems. Principle of the GLR Test. In the GLR test statistic given by eq 4, the first term on the right-hand side is the optimal value of the objective function (OF) obtained by solving the linear DR problem under the assumption that no gross errors are present, that is,
Problem P2 Min (y - x)′Q-1(y - x) x
s.t.
error model. Thus, the critical value acts as a threshold in the sense that unless there is an acceptable difference in the OF values, the no gross error model is deemed to fit the observed data better. The original derivation of the GLR test4 makes use of the statistical distributions of the constraint residuals in the absence and presence of a gross error. The gross error signature vectors fi for different gross errors are obtained and used in their derivation. Alternatively, we have shown above that the GLR test statistic for each gross error can be derived from the solutions of two data reconciliation problems which differ only with respect to their OFs. We use this insight to develop a GED test for nonlinear processes. Nonlinear Test. For nonlinear processes, the basic principle of the GLR test described in the preceding section is used to develop a new GED test. The statistic T used in this nonlinear test (NT) is given by
Ax ) c
T ) max Ti i
To prove this result, we note that the solution to the above DR problem is given by16
xˆ ) y - QA′V-1r
(13)
When this solution is substituted, the optimal value of the OF is found to be equal to r′V-1r, which is identical to the first term on the right-hand side of eq 4. The second term on the right-hand side of eq 4 is the optimal value of the OF of the DR problem under the assumption that a gross error of unknown magnitude b is present in variable i, that is, the OF value obtained in the following least-squares minimization problem:
Problem P3 (y - bei - x)′Q-1(y - bei - x) Min x,b s.t.
Ax ) c
The solution to the above DR problem can be obtained using a Lagrange multiplier technique and is given by
xˆ ) y - bˆ ei - QA′V-1(r - bˆ fi)
(14)
bˆ ) (f ′iV-1fi)-1(f ′iV-1r)
(15)
and
When this solution is substituted, the optimal value of the OF is obtained as (r - bˆ fi)′V-1(r - bˆ fi) which is identical to the second term on the right-hand side of eq 4. Thus, the GLR test statistic is identical to the difference in the OF values of DR for the no gross error model and the gross error model. In the GLR test, the maximum difference between the OF values over all of the gross errors hypothesized is obtained. If this difference exceeds a critical value then a gross error is detected and is identified in the variable which gives the maximum OF difference. In other words, the gross error model that gives the minimum least-squares OF value is selected, which means that the gross error model that best fits the observed data is selected as the most likely possibility. It should be noted that the OF value for the no gross error model will be larger than the OF value for any gross error model because there is an extra parameter (degree of freedom) b in the gross
(16)
where
Ti ) OF for the no gross error model OF for the ith gross error model (17) The OF for the no gross error model is obtained by solving the nonlinear DR problem given by problem P1, whereas the OF for the ith gross error model is obtained by solving the nonlinear DR problem obtained by replacing the linear constraints with the nonlinear constraints, eq 8, in problem P3. The test statistic is compared with a prespecified threshold (critical value) , and a gross error is detected if it exceeds . This means that the corresponding gross error model best fits the data, and so the variable corresponding to that gross error model is identified to be biased. The magnitude of the bias is obtained as part of the solution of the nonlinear DR problem. It should be noted that in this approach the nonlinear constraints are treated as such and not approximated by a linear form. Although we have not explicitly considered bounds on variables such as nonnegativity constraints on variables they can be included in the problem formulation, and the GED test can still be applied as described above because it uses only the optimal OF values. Selection of Critical Value. For linear processes, the critical value is typically chosen using the distribution of the test statistic under the null hypothesis (no gross errors are present), so that the probability of type I error is less than or equal to a specified value. For nonlinear processes, the exact statistical distribution of the test statistic cannot be obtained. However, the same critical value as in the linear case is usually chosen even though it may not theoretically ensure the probability of type I error to be below a specified value. For the proposed nonlinear test also, we recommend the same procedure be used, that is, the critical value be chosen 2 where as χ1,1-β
β ) 1 - (1 - R)1/p
(18)
and p is the number of gross errors hypothesized3. Our experience with different nonlinear processes indicates that the use of this critical value does give a probability of type I error less than or equal to R.
2394 Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999
Multiple GED The NT as described above can be applied to detect at most one gross error. This test can be combined with serial strategies for multiple GED as described below. Simple Serial Compensation Strategy (SSCS). In the SSCS, at each stage we apply the NT after compensating the measurements using the estimated magnitude of bias. This process is repeated until no further gross errors are detected. Mathematically, the test statistic at stage k + 1 (after detecting k gross errors) is obtained as the maximum difference in OF values between the no gross error model and the gross error model for variable i that is hypothesized at stage k + 1, that is, i Tk+1 ) Max i
(19)
errors. To eliminate this disadvantage, a modified version of the serial compensation strategy was proposed by Keller et al.13 In the MSCS, at each stage of application of the test, only the locations of previously detected gross errors are assumed to be correct, but the estimates of all of the gross error magnitudes are assumed to be unknown and are therefore estimated simultaneously. This process is repeated until no further gross errors are detected. Applying this strategy along with the NT, we obtain the test statistic at stage k + 1 as in eqs 19 and 20, but the OF values at stage k + 1 for the no gross error model and the gross error model for variable i are respectively obtained by solving the following problems:
Problem P6 Min (y - E/kBk - x)′Q-1(y - E/kBk - x) x,Bk
where
Problem P7 i Tk+1 ) OF for the no gross error model at stage k + 1 - OF value for the ith gross error model at stage k + 1 (20)
Min (y - E/kBk - bei - x)′Q-1(y - E/kBk - bei - x)
x,Bk,b
where The OF for the no gross error model at stage k + 1 is obtained by solving the nonlinear data reconciliation problem given by
Problem P4 Min (yk - x)′Q-1(yk - x) x
whereas the OF for the ith gross error model at stage k + 1 is obtained by the following constrained leastsquares minimization problem:
Problem P5 Min (yk - bei - x)′Q-1(yk - bei - x) x,b
where yk is the compensated measurements at the end of stage k given by
yk ) y - E/k B/k
(21)
E/k ) [e/1, ..., e/k]
(22)
B/k ) [b/1, ..., b/k]′
(23)
where
where e/j and b/j are the unit vector and magnitude, respectively, corresponding to the gross error identified in stage j. The use of compensated measurements for computing the OF values for the no gross error model and the gross error model implicitly assumes that the gross errors identified in the previous stages are actually present in the data and the actual magnitudes of these gross errors are equal to the estimated magnitudes, which are in fact the premises for the hypotheses in SSCS. Modified Serial Compensation Strategy (MSCS). The SSCS has a disadvantage because it compensates the measurements using estimated magnitudes of gross errors which themselves may have large estimation
Bk ) [b1, ..., bk]′
(24)
where bj is the unknown magnitude of the gross error identified in stage j. The use of original measurements and minimization with respect to the unknown magnitudes of gross errors Bk for computing the OF values implies that only the locations of gross errors identified in the previous stages are assumed to be correct but their magnitudes have to be estimated simultaneously along with the gross error hypothesized in the present stage, which are actually the premises for the hypotheses in MSCS. Serial Elimination Strategy (SES). In the SES, the test statistic at any stage k + 1 is obtained after eliminating all measurements in which gross errors have been identified in the preceding k stages. For a linear process, Crowe17 has proved that the square of the maximum power measurement test statistic (or equivalently the GLR test statistic) for a measurement is equal to the reduction in the DR OF value obtained by deleting the corresponding measurement. On the other hand, we have proved earlier that the GLR test statistic for a measurement is equal to the reduction in the DR OF value obtained by retaining all of the measurements along with an unknown bias parameter in the corresponding measurement. It therefore follows that the OF value of a DR problem solved by discarding the measurement of variable i is the same as the OF value obtained by solving problem P3, in which the measurement i is included along with an unknown bias which is also estimated. This implies that for a linear system the MSCS proposed by Keller et al.13 is exactly equivalent to the SES. However, for a nonlinear process, this equivalence cannot be proved theoretically. However, because their identification strategies are equivalent, we can expect the MSCS and SES to exhibit almost the same performance characteristics for nonlinear processes also. The NT can be used along with a SES as follows. Here the test statistic at stage k + 1 is obtained as in eq 19
Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999 2395
where i Tk+1 ) OF obtained by eliminating k measurements in which gross errors have been identified in preceding stages - OF obtained by eliminating k measurements in which gross errors have been identified in preceding stages and the ith measurement in which a gross error is hypothesized at stage k + 1 (25)
The OF values can be obtained by solving the standard DR problem as posed in problem P1, with the variables whose measurements are eliminated being treated as unmeasured variables. Selection of the Critical Value in Serial Strategies. When using a serial strategy for GED, the number of gross errors hypothesized at each stage decreases by 1. Because the critical value calculated based on the modified level of significance (eq 18) depends on the number of gross errors hypothesized, Keller et al.13 recommended that the critical value at each stage of application of the serial strategy also be changed accordingly. Thus, at stage k + 1, the critical value may 2 where be chosen as χ1-β k+1
βk+1 ) 1 - (1 - R)1/(p-k)
(26)
However, there may not be any particular advantage in changing the critical value at each stage, and for simplicity the same critical value as that used in the first stage can be chosen for all subsequent stages also.
Figure 1. Adiabatic CSTR. Table 1. Physical Data and True Values for the CSTR System R ) 1.987 cal/(mol K) C1 ) 5000 s-1 C-1 ) 1 000 000 s-1 Q1 ) 10 000 cal/mol Q-1 ) 15 000 cal/mol ∆Hr ) -5000 cal/mol F ) 1.0 g/L Cp ) 1000 cal/(g K)
τ ) 60 s A0 ) 0.9 mol/L B0 ) 0.1 mol/L T0 ) 427.1 K A ) 0.4744 mol/L B ) 0.5256 mol/L T ) 429.2 K
Adiabatic CSTR. This example is chosen to compare the performance for a relatively significant nonlinear system. This nonlinear process shown in Figure 1 consists of six variables and three constraints. The six measured variables are the inlet concentrations, A0 and B0, the inlet temperature, T0, the outlet concentrations, A and B, and the outlet temperature, T. The reaction carried out is k1
Performance Evaluation using Simulation We have shown in the preceding sections how the different multiple GED strategies may be combined with the NT. The same strategies can also be combined with the GLR test for linear systems. When the performance of a GED method is evaluated, it is important to identify clearly whether the gain or loss in performance is due to the GED test or due to the multiple GED strategy being used. Unfortunately, in the literature this distinction has not always been brought out very clearly. In the simulation results that we present in this section, we have clearly identified the component of the GED method which contributes to performance improvement or degradation. We have evaluated the performance of the five different GED methods denoted for convenience as SSCS, MSCS, NT-SSCS, NT-MSCS, and NT-SES, by simulation of three different nonlinear processes of varying degrees of nonlinearity. In SSCS and MSCS, the GLR test is applied using a linearization of the constraints as described in the Problem Formulation section. The SSCS uses the simple serial compensation strategy while MSCS uses the modified serial compensation strategy (which is equivalent to the SES) for multiple GED. The other three methods use the proposed NT combined with one of the three multiple GED strategies as indicated in Nomenclature section. Simulation Examples. Simulation experiments are performed on an adiabatic CSTR process drawn from Kim et al.,10 a mineral beneficiation process (MBP) drawn from Rao and Narasimhan,18 and a heat exchanger network (HEN) which forms a part of a refinery crude preheat train example given in Ravikumar et al.19 These examples are more fully described below.
A {\ }B k -1
The three algebraic constraints are the two component balances and one energy balance given by
(A0 - A)/τ - k1A + k-1B ) 0 (B0 - B)/τ + k1A - k-1B ) 0 (T0 - T)/τ - ∆Hr(k1A - k-1B)/FCp ) 0 where k1 ) C1 exp(-Q1/RT) and k-1 ) C-1 exp(-Q-1/ RT). The numerical values for the model parameters, physical constants, and true values of the variables are given in Table 1. Mineral Beneficiation Process (MBP). The second example is a MBP (Figure 2) chosen to compare the performance for a mildly nonlinear and relatively large practical system. This is a typical example encountered in mineral processing industries, where one component (the gangue material) is unmeasured in all of the streams. In this example, there are 7 units connected by 12 streams with 4 components. This system consists of 60 variables. Out of these, 12 are total flow variables, and the remaining 48 variables are all component mass percentage variables. The total flows are unmeasured in all but the feed stream, which is kept constant during reconciliation. Component 4, which is the gangue material, is unmeasured in all streams while all of the other compositions are measured. Thus, the system consists of 36 measured variables, 1 constant measured variable, and 23 unmeasured variables. The model of this process consists of linear constraints of flow balances and normalization
2396 Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999 Table 3. True Values and Cp Data for the Heat Exchanger Network stream no.
flow rate (tons/h)
temp (°C)
Cp equationa (kcal/kg °C)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
399.7 246.1 246.1 246.1 246.1 153.6 153.6 153.6 153.6 399.7 58.6 58.6 54.5 54.5 54.5 106.5 106.5 106.5 106.5 170.2 170.2
126.4 126.4 136.2 143.0 151.9 126.4 184.8 192.5 223.5 180.9 195.5 168.7 301.2 266.6 227.5 242.8 158.7 206.2 194.9 268.4 240.6
0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.444 + 0.00101t 0.446 + 0.00101t 0.446 + 0.00101t 0.414 + 0.00096t 0.414 + 0.00096t 0.414 + 0.00096t 0.409 + 0.00096t 0.409 + 0.00096t 0.429 + 0.00099t 0.429 + 0.00099t 0.414 + 0.00096t 0.414 + 0.00096t
Figure 2. Mineral beneficiation process.
a
Figure 3. Heat exchanger network: H1-H6, heat exchangers; S, splitter; M, mixer. Table 2. True Values for the Mineral Beneficiation Process true values of variables composition (mass %) stream no.
flow (tons/h)
1
2
3
4
1 2 3 4 5 6 7 8 9 10 11 12
691.7 712.5 699.5 687.0 20.81 12.48 13.02 8.33 17.19 4.17 4.69 8.86
0.418 0.705 0.309 0.100 10.25 11.81 21.98 7.91 22.20 22.90 46.93 35.63
2.78 2.81 2.80 2.78 3.98 3.85 3.58 4.18 3.87 4.78 2.53 3.59
4.29 4.53 4.39 4.25 12.54 12.30 11.93 12.90 12.59 14.67 10.19 12.3
92.52 91.96 92.50 92.88 73.23 72.05 62.51 75.00 61.33 57.65 40.35 48.49
equations and bilinear constraints of component balances, giving a total of 40 constraints. The true values of all of the variables are given in Table 2. Heat Exchanger Network (HEN). The last example is a HEN shown in Figure 3. In this network, there are six heat exchangers, a mixer, and a splitter which form part of a crude preheat train of a refinery. There are 21 streams (petroleum), whose specific heat capacity relation is given in Table 3. The flow rate and temperature of all streams are measured. This system consists of 42 variables (21 flow-rate and 21 temperature variables) all of which are measured. The model for this process consists of linear constraints of flow balances and nonlinear constraints of energy balances (using the average value of specific heat
t in °C.
capacities calculated at the inlet and outlet temperature), giving a total of 23 constraints. The true values of all variables are also given in Table 3. Simulation Procedure. The performance of the different strategies is compared using computer simulation experiments in which known errors are introduced into the data, as clearly described in Iordache et al.,20 and the ability of the schemes to identify and correct the errors is evaluated. The performance is averaged over a suitable number of trials, chosen depending on the computing time requirements. The standard deviations of random errors in measurements are chosen to be a fixed percentage of the true values, and a specified number of gross errors are added to obtain the measurement vector. The locations of the gross errors are uniformly and randomly selected over the set of measured variables, while the magnitudes of the gross errors are uniformly and randomly chosen between specified upper and lower bounds. The sign of the gross error is also chosen randomly. The parameters used for the different simulation runs are shown in Table 4. The level of significance R for all runs (except for runs C5 and C6) was chosen to obtain an average number of type I errors of 0.1 under the null hypothesis. For the CSTR process, the critical value is based on the significance level β calculated according to eq 18 and maintained constant during the application of the serial strategies for all methods. For the MBP and HEN, the critical value for each stage of the serial strategy is changed according to the modified level of significance given by eq 26. Two specific runs C5 and C6 for the CSTR system are performed in which only gross errors are simulated and no random errors are generated in the measurements. These runs are made to examine the statistical consistency of the nonlinear test and to compare the different strategies in this limiting deterministic case. Although random errors are not simulated in the measurements, the DR OF is still posed as a weighted least-squares OF, with the standard deviations of variables (given in Table 4) being used to obtain the weighting factors as in other simulation runs. This is necessary to nondimensionalize all of the variables and obtain meaningful
Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999 2397 Table 4. Parameters of Simulationa run no. details
C1
C2
C3
C4
C5
C6
M1
M2
M3
H1
system NST σ NGE UB, LB R
CSTR 1000 1 1 5, 15 0.121
CSTR 1000 1 2 5, 15 0.121
CSTR 1000 0.1 1 5, 15 0.125
CSTR 1000 0.1 2 5, 15 0.125
CSTR 1000 1 1 5, 15 NA
CSTR 1000 1 2 5, 15 NA
MBP 200 1 2 5, 15 0.10
MBP 100 1 9 5, 15 0.10
MBP 200 0.1 2 5, 15 0.10
HEN 100 1 10 5, 15 0.115
a NST ) Number of simulation trials. σ ) standard deviation as a percent of true value. NGE ) Number of gross errors generated per simulation trial. UB, LB ) upper and lower bounds for gross error magnitudes as a percent of x + v. R ) significance level. NA ) not applicable.
Table 5. Simulation Results for the CSTR System run no.
NGE
C1
1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 2
C2
C3
C4
C5
C6
a
GED method SSCS MSCS NT-SSCS NT-MSCS NT-SES SSCS MSCS NT-SSCS NT-MSCS NT-SES SSCS MSCS NT-SSCS NT-MSCS NT-SES SSCS MSCS NT-SSCS NT-MSCS NT-SES SSCS MSCS NT-SSCS NT-MSCS NT-SES SSCS MSCS NT-SSCS NT-MSCS NT-SES
overall power
AVTI
selectivity
AEE (%)
AER (%)
CPU time (s)
0.82 0.82 0.82 0.82 0.82 0.54 0.55 0.56 0.56 0.56 0.996 0.996 0.996 0.996 0.996 0.74 0.65 0.79 0.73 0.73 1.0 1.0 1.0 1.0 1.0 0.93 0.71 0.93 0.77 0.77
0.19 0.21 0.08 0.09 0.09 0.71 0.65 0.59 0.56 0.55 1.1 0.62 0.05 0.06 0.06 2.2 1.2 1.4 0.66 0.67 2.5 0.88 0.0 0.0 0.0 3.4 1.3 2.8 0.73 0.73
0.81 0.80 0.91 0.90 0.90 0.61 0.63 0.65 0.67 0.67 0.47 0.62 0.95 0.94 0.94 0.40 0.53 0.54 0.69 0.69 0.29 0.53 1.0 1.0 1.0 0.35 0.52 0.40 0.68 0.68
17 22 13 13 14 39 62 28 55 39 10 18 2.5 2.7 2.7 40 60 25 29 27 9 18 0.09 0.09 0.09 53 47 36 12 12
54 36 57 53 53 -50 -130 -43 -121 -116 84 50 96 96 96 -49 -138 -21 -105 -105a 85 54 99.9 99.9 99.9 -54 -120 -27 -104 -104
0.48 0.54 1.63 1.70 1.40 0.53 0.60 2.21 2.35 1.79 0.49 0.54 1.23 1.29 1.30 0.51 0.57 1.88 1.94 1.88 0.47 0.52 1.23 1.28 1.27 0.49 0.55 2.08 1.93 1.89
A few trials in which the estimates were significantly incorrect because of numerical instability were ignored in obtaining the average.
solutions. Furthermore, because no random errors are generated, the critical value for all methods can theoretically be chosen as zero. However, in practice, an allowance for numerical computation errors should be made. The critical value for these two simulation runs was chosen as 10-4 based on the level of accuracy of our solutions. Performance Measures. The different performance measures generally used to evaluate GED performance11,21 are also used here to evaluate the different methods. These are the overall power, the average number of type I errors (AVTI), selectivity, the average error in estimation of gross error magnitude (AEE), and the average error reduction (AER) achieved after DR and GED. All of the performance measures are as defined in the references quoted above. Simulation Results and Discussion. The simulation results for runs C1-C6 on the CSTR system, runs M1-M3 on the MBP, and run H1 on the HEN are given in Tables 5-7, respectively. In these tables, the first column indicates the run number. The second column specifies the number of gross errors generated per simulation trial. The third column shows the method of GED. Overall power, AVTI, selectivity, AEE, and
AER are given in columns 4-8. The average CPU time per simulation trial (on a 133-MHz Pentium, 32-bit FORTRAN compiler) is shown in the last column. We first compare the improvement that the MSCS gives over SSCS. The first two rows of runs C1-C6 in Table 5, runs M1-M3 in Table 6, and run H1 in Table 7 are used for this comparison. For the case of the CSTR system, it is observed that MSCS makes less mispredictions (AVTI) and hence has higher selectivity when the magnitudes of gross errors are large compared to the standard deviations of measurement errors. For MBP also, while there is a decrease in AVTI for the case of two gross errors of large magnitudes, there is almost no improvement in AVTI even for nine gross errors when the magnitude is small. Similarly for the HEN, AVTI is almost the same even for 10 gross errors of small magnitudes. Thus, MSCS shows improved performance only if gross errors of large magnitudes are present in the data. A rather surprising result in all of the runs except M3 and C6 is that the estimates of the gross error magnitudes obtained are poorer than those obtained by SSCS. This could be due to the reason that, not all gross errors identified in a trial are correct and hence large errors are introduced even in the estimates
2398 Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999 Table 6. Simulation Results for the Mineral Beneficiation Process run no.
NGE
M1
2 2 2 2 2 9 9 9 9 9 2 2 2 2 2
M2
M3
GED method SSCS MSCS NT-SSCS NT-MSCS NT-SES SSCS MSCS NT-SSCS NT-MSCS NT-SES SSCS MSCS NT-SSCS NT-MSCS NT-SES
overall power
AVTI
selectivity
AEE (%)
AER (%)
CPU time (s)
0.68 0.69 0.68 0.69 0.69 0.47 0.47 0.48 0.47 0.47 0.91 0.93 0.91 0.93 0.93
0.45 0.45 0.45 0.45 0.45 2.1 2.0 2.0 2.0 2.1 1.1 0.41 1.1 0.41 0.41
0.75 0.75 0.75 0.75 0.75 0.67 0.68 0.68 0.68 0.67 0.64 0.82 0.64 0.82 0.82
18 18 13 13 13 37 59 36 54 54 9 3.7 8 2.4 2.4
29 29 32 32 32 -10 -34 -12 -55 -54 71 82 71 82 82
8.0 8.3 275 250 246 10.8 11.9 733 701 686 9.0 9.4 316 290 300
Table 7. Simulation Results for the Heat Exchanger Network run no.
NGE
H1
10 10 10 10 10
a
GED method SSCS MSCS NT-SSCS NT-MSCS NT-SES
overall power
AVTI
selectivity
AEE (%)
AER (%)
CPU time (s)
0.58 0.58 0.58 0.58 0.58
2.2 2.2 2.1 2.1 2.1
0.72 0.72 0.73 0.73 0.73
25 39 24 39 39a
20 -19 21 -15 -15a
5.7 8.2 645 580 587
One trial in which the estimates were significantly incorrect because of numerical instability was ignored in obtaining the average.
of correctly identified gross errors when simultaneous estimation is used. Consequently, the result is that the overall improvement in accuracy of DR estimates is worse for MSCS than SSCS (except for run M3) as observed from a lower positive AER or higher negative AER. Thus, if the objective of DR and GED is to obtain accurate estimates of all variables, then the SSCS is recommended, whereas if the aim is to obtain good GED performance, then the MSCS is recommended. These conclusions also carry over when NT is used as the GED test, as observed by comparing rows 3 and 4 of the different runs. It was argued that SES and MSCS are likely to give almost identical performances when used along with NT, and this is borne out by comparison of results presented in the last two rows of each run. We now compare the performance of using the proposed NT with that of the GLR test based on constraint linearization (for the same choice of multiple GED strategy in both cases). This can be done by comparing the results of SSCS and NT-SSCS shown in rows 1 and 3 of all of the runs. As seen from the results of runs C1-C6 for the CSTR system, the improvement achieved by the nonlinear test is clearly evident in terms of equal or improved power, reduced AVTI (hence higher selectivity), decreased AEE, and improved AER. However, results from runs M1-M3 on the MBP show almost identical performances for both two gross errors of large magnitude and nine gross errors of small magnitude. Similarly, run H1 on HEN shows an almost identical performance even for 10 gross errors of small magnitude. It is evident that NT-SSCS performs better than SSCS especially for a highly nonlinear system like the CSTR system where the equations involving exponential terms are more nonlinear than those encountered in the MBP model where the nonlinearity in the system is at most only of the form of bilinear constraints or in the HEN model where the constraints are almost bilinear. Thus the nonlinear test is recommended especially for highly nonlinear systems. It should be noted that improvement in the performance of a gross error identification method can be the
result of using a new GED test or due to a new strategy for multiple gross error identification. The performance improvement that we have discussed in the second paragraph of this section is due to the multiple gross error identification strategy because comparisons are made between methods that use the same GED test. On the other hand, the performance improvement discussed in the preceding paragraph is solely due to the GED test being used because comparisons are made between methods that use the same multiple gross error identification strategy. This is further brought out if we compare rows 1, 3, and 4 of runs C4 and C6. The performance improvement from row 1 to row 3 is due to the use of the NT. A further improvement in performance from row 3 to row 4 is due to the use of MSCS. In fact, the results of all of the runs indicate that if there is a performance improvement due to the use of MSCS instead of SSCS, then this improvement carries over if we use the NT instead of the GLR test in the overall gross error identification method. The results of simulation runs C5 and C6, which pertain to the deterministic cases where no random errors are simulated in the measurements, are also consistent with the other four stochastic simulation runs for the CSTR system. It is observed from the simulation results that all serial strategies for multiple gross error identification give rise to an unacceptably high value of AVTI as the number of gross errors increases. This is because serial strategies are based on the hypothesis of at most one gross error in the measurements. It may be possible to reduce AVTI and improve performance by using alternative multiple gross error identification strategies such as that used in the unbiased estimation technique of Rollins and Davis,5 who start with the hypothesis that a maximum identifiable number of gross errors may be present in the measurements and then eliminate those that do not contain gross errors. This strategy may as well be combined with the NT though the development of such a method is left for future research. The computation time for the nonlinear test is 1-2 orders of magnitude more than that for tests based on linear-
Ind. Eng. Chem. Res., Vol. 38, No. 6, 1999 2399
ization, since it requires the solution of a nonlinear DR problem for every gross error hypothesis. However, in practical applications, GED and DR are generally applied to time-averaged plant data only once in a few hours, and the increase in computation time for the nonlinear test may not be a serious disadvantage especially because powerful computers are available now.
MSCS ) modified serial compensation strategy NT ) nonlinear test NT-MSCS ) NT combined with MSCS NT-SES ) NT combined with SES NT-SSCS ) NT combined with SSCS OF ) objective function (value) SES ) serial elimination strategy SSCS ) simple serial compensation strategy
Conclusions
Literature Cited
A nonlinear GED test is proposed in this work which does not require linearization of process constraints. The proposed test is found to give better GED performance especially when the constraints have a high degree of nonlinearity. For multiple GED, the MSCS (or equivalently the SES) gives better GED performance. However, if the objective is to obtain more accurate final reconciled estimates, then SSCS is recommended.
(1) Ripps, D. L. Adjustment of Experimental Data. Chem. Eng. Prog. Symp. Ser. 55 1965, 61, 8. (2) Mah, R. S. H.; et al. Reconciliation and Rectification of Process Flow and Inventory Data. Ind. Eng. Chem. Process Des. Dev. 1976, 15 (1), 175. (3) Mah, R. S. H.; Tamhane, A. C. Detection of Gross Errors in Process Data. AIChE J. 1982, 28, 828. (4) Narasimhan, S.; Mah, R. S. H. Generalized Likelihood Ratio Method for Gross Error Identification. AIChE J. 1987, 33, 1514. (5) Rollins, D. K.; Davis, J. F. Unbiased Estimation of Gross Errors in Process Measurements. AIChE J. 1992, 38, 563. (6) Tong, H.; Crowe, C. M. Detection of Gross Errors in Data Reconciliation by Principal Component Analysis. AIChE J. 1995, 41, 1712. (7) Narasimhan, S. Maximum Power Tests for Gross Error Detection Using Likelihood Ratios. AIChE J. 1990, 36, 1589. (8) Rollins, D. K.; Roelfs, S. D. Gross Error Detection when Constraints are Bilinear. AIChE J. 1992, 38, 1295. (9) Terry, P. A.; Himmelblau, D. M. Data Rectification and Gross Error Detection in a Steady-State Process via Artificial Neural Networks. Ind. Eng. Chem. Res. 1993, 32, 3020. (10) Kim, I.; et al. Robust Data Reconciliation and Gross Error Detection: The Modified IMT using NLP. Comput. Chem. Eng. 1997, 21, 775. (11) Mukherjee, J.; Narasimhan, S. Leak Detection in Networks of Pipelines by the Generalized Likelihood Ratio Method. Ind. Eng. Chem. Res. 1996, 35, 1886. (12) Nogita, S. Statistical Test and Adjustment of Process Data. Ind. Eng. Chem. Process Des. Dev. 1972, 11, 197. (13) Keller, J. Y.; et al. Fault Detection of Multiple Biases or Process Leaks in Linear Steady State Systems. Comput. Chem. Eng. 1994, 18, 1001. (14) Crowe, C. M.; et al. Reconciliation of Process Flow Rates by Matrix Projection. Part I: Linear Case. AIChE J. 1983, 29, 881. (15) Pai, C. C. D.; Fisher, G. D. Application of Broyden’s Method to Reconciliation of Nonlinearly Constrained Data. AIChE J. 1988, 34, 873. (16) Mah, R. S. H. Chemical Process Structures and Information Flows; Butterworth: Stoneham, MA, 1990. (17) Crowe, C. M. Recursive Identification of Gross Errors in Linear Data Reconciliation. AIChE J. 1988, 34, 541. (18) Rao, R.; Narasimhan, S. Comparison of Techniques for Data Reconciliation of Multicomponent Processes. Ind. Eng. Chem. Res. 1996, 35, 1362. (19) Ravikumar, V. R.; et al. RAGEsA Software Tool for Data Reconciliation and Gross Error Detection. Proceedings of the Second International Conference on FOCAPO, Crested Butte, CO, 1993. (20) Iordache, C.; et al. Performance Studies of the Measurement Test for Detection of Gross Errors in Process Data. AIChE J. 1985, 31, 1187. (21) Serth, R. W.; et al. Detection of Gross Errors in Nonlinearly Constrained Data: A Case Study. Chem. Eng. Commun. 1987, 51, 89.
Nomenclature A ) process constraints matrix b ) bias magnitude bˆ ) estimate of bias magnitude Bk ) vector of bias magnitudes c ) constant vector of known values ei ) ith unit vector fi ) gross error vector for the ith variable F ) vector of nonlinear functions m ) number of constraints n ) number of measured variables p ) number of gross errors hypothesized Q ) covariance matrix of measurement errors r ) vector of constraint residuals t ) temperature Tk+1 ) maximum test statistic at stage k + 1 i Tk+1 ) test statistic for ith variable at stage k + 1 v ) vector of random errors V ) covariance matrix of constraint residuals x ) vector of true values of measured variables xˆ ) vector of reconciled values of measured variables y ) vector of measurements yk ) vector of compensated measurements after k stages of detection 0 ) vector of zeros Greek Letters R ) level of significance βk+1 ) adjusted level of significance at stage k + 1 σ ) standard deviation Other Symbol 2 χ1-β ) upper 1 - β quantile of χ2 distribution with 1 degree of freedom
Abbreviations AEE ) average error in estimation of gross error magnitudes AER ) average (rms) error reduction (final) AVTI ) average number of type I errors DR ) data reconciliation GED ) gross error detection GLR ) generalized likelihood ratio HEN ) heat exchanger network MBP ) mineral beneficiation process
Received for review August 17, 1998 Revised manuscript received March 18, 1999 Accepted March 19, 1999 IE980546I