**3.1. Problem definition**

260 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

*Aq* + *Q* ≤

*Aq* + *Q* ≤

\* *AC A T* + *Q* ≤

*T*

**Figure 11.** The flow chat of flow rate calculation

*<sup>T</sup>*

ξ2

3

ξ

ξ1 A section of the steam network named "S2" for an iron &steel plant in China is shown in figure 12. In the figure, N1-N7 represent the different production processes. The arrows point to the direction of steam flow, the variables Xi or Xij on behalf of the real steam mass flow. The electric valves are remotely controlled by the operators. Many industrial steam systems are similar in structure to this system, but the scale is much larger.

**Figure 12.** A section diagram of steam network

If all of the variables above have been measured, suppose that the electric valves are fixed at a certain position, and the pipeline leakage and the amount of condensate water can be neglected, the constraint equations can be written out on the basis of the mass balance.

$$\begin{cases} X1 - X11 - X12 = 0 \\ X2 - X21 - X22 = 0 \\ X3 - X31 - X32 = 0 \\ X4 - X41 - X42 = 0 \\ X5 + X6 - X51 - X52 = 0 \end{cases} \tag{51}$$

Data Processing Approaches for the Measurements of Steam Pipe Networks in Iron and Steel Enterprises 263

By gross error detection, the systematic errors in the measurements can be removed, and by data reconciliation the random errors can be reduced. However, if the gross errors are not removed, the gross errors in some variables will propagate to other accurately measured variables in the procedure of data reconciliation. So gross error detection had better be adopted in advance.There are two basic types of gross error detection methods, they are

Detection based on test of residuals belongs to the statistical test and has been termed and

**Step 1.** Apply the least-squares routine by using equation (58) (59) to compute \* *X*ˆ and *e* .

On the hypothesis that the measured value in the jth stream doesn't contain gross error,

**Step 3.** Compare *<sup>j</sup> z* with a critical test value *<sup>c</sup> z* . If *<sup>j</sup> <sup>c</sup> z z* > , denote stream j as a bad

= , the 1 /2 <sup>−</sup>

1/ 1 (1 ) *<sup>n</sup>*

 α

probability of a type I error for each individual test. Denote by S the set of bad streams found by the above procedure. The measurement ,*<sup>j</sup> y j S* ∈ is considered to contain gross

**Step 4.** If S is empty, proceed to step 7. Otherwise, remove the streams contained in S and aggregate the nodes connected with the stream. This process yields a system of lower dimension with compressed incidence matrix *A*′ , measurement vector*Y*′ , and weighed

β

β

value is 0.05) is the overall probability of a type I error for all tests, and

matrix *Q*′ . Denote T as the set of streams with the measurement data in*Y*′ .

β

Where n is the number of measurements tested (currently, n=18),

based on measurement test (MT) and nodal imbalance test (NT).

**3.2. Gross error detection based on test of residuals** 

evaluated [11]. Measurement test[12] is the basic algorithm.

**Step 2.** Compute the variable for each pipe (or stream)

*<sup>j</sup> z* follows standard normal distribution.

stream. *<sup>c</sup> z* recommended[12] *<sup>c</sup>* 1 /2 *z z* <sup>−</sup>

ˆ \* 1 ( ) *T T e Y X QA AQA AY* <sup>−</sup> =− = (59)

/ *<sup>j</sup> j jj ze v* = (60)

( ) *T T V QA AQA AQ* = (61)

=− − (62)

α

point of the standard normal

(the recommended

β

is the

The vector of residuals *e*

In the equation,

distribution.

error.

The overall balance equation can also be written out as:

$$X5 + X6 + X4 + X3 - X1 - X2 - X01 - X02 = 0\tag{52}$$

If we remark

$$\mathbf{X} = (\mathbf{X}01, \mathbf{X}02, \mathbf{X}1, \mathbf{X}11, \mathbf{X}12, \mathbf{X}2, \mathbf{X}21, \mathbf{X}22, \mathbf{X}3, \mathbf{X}31, \mathbf{X}32, \mathbf{X}4, \mathbf{X}41, \mathbf{X}42, \mathbf{X}5, \mathbf{X}6)^T = (\mathbf{X}\_1, \mathbf{X}\_2, \dots, \mathbf{X}\_{18})^T \tag{53}$$

as the vector of mass flow rates in the steam network.(51) (52) can be abbreviated as:

$$AX = 0\tag{54}$$

In (54), A is the incidence matrix. The matrix is composed by the elements of 1, -1, and 0.

If Y represents the vector of measured flow rates and X is the vector of true flow rates , then:

$$Y = X + W + \varepsilon \tag{55}$$

In the equation, *W* is the vector of the measurement gross errors (or systematic errors), and ε is the vector of random measurement errors with each element being normally distributed with zero means and known covariance matrix, Q. The approaches to detect and remove the gross error from the measurements are to be discussed in this section.

When there is no gross error in the measurement vector, finding a set of adjustments to the measured flow rates to satisfy equation (54) is the problem of data reconciliation. Denote the adjustment vector as *a* , and the adjusted flow rate vector as *X*ˆ , we get:

$$
\hat{X} = Y + a \tag{56}
$$

Applying Least squares method, it can be stated as the constrained least-squares problems:

$$\min a^T Q^{-1} a \text{ subject to } A\hat{X} = 0$$

Q is the weighed parameter matrix. Usually, Q is selected as:

$$Q = \operatorname{diag}(\sigma\_1^2, \sigma\_2^2, \dots, \sigma\_{18}^2) \tag{57}$$

(1 18) *<sup>i</sup>* σ≤ ≤*i* is the deviation of the measurement variable (1 18) *X i <sup>i</sup>* ≤ ≤ .

The solution \* *X*ˆ to the problem can be obtained by Largrange multipliers[10]

$$\hat{X}^\* = \mathbf{Y} - Q\mathbf{A}^T (AQ\mathbf{A}^T)^{-1} A\mathbf{Y} \tag{58}$$

Data Processing Approaches for the Measurements of Steam Pipe Networks in Iron and Steel Enterprises 263

The vector of residuals *e*

262 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

The overall balance equation can also be written out as:

If we remark

ε

(1 18)

*i* σ

1 11 12 0 2 21 22 0 3 31 32 0 4 41 42 0 5 6 51 52 0

1 2 18 ( 01, 02, 1, 11, 12, 2, 21, 22, 3, 31, 32, 4, 41, 42, 5, 6) ( , ,..., ) *T T X X X XX X X X X X X X X X X X X XX X* = = (53)

as the vector of mass flow rates in the steam network.(51) (52) can be abbreviated as:

In (54), A is the incidence matrix. The matrix is composed by the elements of 1, -1, and 0.

If Y represents the vector of measured flow rates and X is the vector of true flow rates , then:

*Y XW* =+ +

In the equation, *W* is the vector of the measurement gross errors (or systematic errors), and

 is the vector of random measurement errors with each element being normally distributed with zero means and known covariance matrix, Q. The approaches to detect and remove the

When there is no gross error in the measurement vector, finding a set of adjustments to the measured flow rates to satisfy equation (54) is the problem of data reconciliation. Denote the

*XYa*

Applying Least squares method, it can be stated as the constrained least-squares problems:

*aQ a* <sup>−</sup> subject to ˆ *AX* = 0

22 2 1 2 18 *Q diag* = ( , ,..., ) σσ

 σ

gross error from the measurements are to be discussed in this section.

adjustment vector as *a* , and the adjusted flow rate vector as *X*ˆ , we get:

<sup>1</sup> min *<sup>T</sup>*

 ≤ ≤*i* is the deviation of the measurement variable (1 18) *X i <sup>i</sup>* ≤ ≤ . The solution \* *X*ˆ to the problem can be obtained by Largrange multipliers[10]

Q is the weighed parameter matrix. Usually, Q is selected as:

ε

*XXX XXXX X* 5 6 4 3 1 2 01 02 0 + + + −− − − = (52)

*AX* = 0 (54)

ˆ = + (56)

ˆ \* 1 ( ) *T T X Y QA AQA AY* <sup>−</sup> = − (58)

(57)

(55)

(51)

*XX X XX X XX X XX X XXX X*

−−= −−=

 −−= −−= +− − =

$$e = Y - \hat{X}^\* = QA^T (AQA^T)^{-1} AY \tag{59}$$

By gross error detection, the systematic errors in the measurements can be removed, and by data reconciliation the random errors can be reduced. However, if the gross errors are not removed, the gross errors in some variables will propagate to other accurately measured variables in the procedure of data reconciliation. So gross error detection had better be adopted in advance.There are two basic types of gross error detection methods, they are based on measurement test (MT) and nodal imbalance test (NT).

#### **3.2. Gross error detection based on test of residuals**

Detection based on test of residuals belongs to the statistical test and has been termed and evaluated [11]. Measurement test[12] is the basic algorithm.

**Step 1.** Apply the least-squares routine by using equation (58) (59) to compute \* *X*ˆ and *e* . **Step 2.** Compute the variable for each pipe (or stream)

$$z\_j = e\_j \land \sqrt{v\_{jj}} \tag{60}$$

In the equation,

$$V = QA^T (AQA^T) AQ \tag{61}$$

On the hypothesis that the measured value in the jth stream doesn't contain gross error, *<sup>j</sup> z* follows standard normal distribution.

**Step 3.** Compare *<sup>j</sup> z* with a critical test value *<sup>c</sup> z* . If *<sup>j</sup> <sup>c</sup> z z* > , denote stream j as a bad stream. *<sup>c</sup> z* recommended[12] *<sup>c</sup>* 1 /2 *z z* <sup>−</sup>β = , the 1 /2 <sup>−</sup> β point of the standard normal distribution.

$$
\beta = 1 - (1 - \alpha)^{1/n} \tag{62}
$$

Where n is the number of measurements tested (currently, n=18), α (the recommended value is 0.05) is the overall probability of a type I error for all tests, and β is the probability of a type I error for each individual test. Denote by S the set of bad streams found by the above procedure. The measurement ,*<sup>j</sup> y j S* ∈ is considered to contain gross error.

**Step 4.** If S is empty, proceed to step 7. Otherwise, remove the streams contained in S and aggregate the nodes connected with the stream. This process yields a system of lower dimension with compressed incidence matrix *A*′ , measurement vector*Y*′ , and weighed matrix *Q*′ . Denote T as the set of streams with the measurement data in*Y*′ .


Notations to the algorithm:


#### **3.3. Gross error detection based on nodal imbalance test**

The algorithms of gross error detection based on statistical test of nodal imbalance are mainly based on the work of literature [14]. Applying nodal imbalance test to each node and the aggregation node (ie. pseudonode) to locate and remove the gross errors. The basic algorithm named Method of pseudo nodes (MP) is listed as:

**Step 1.** Compute the nodal imbalances vector *r* and the statistical testing variable vector *z* . On the assumption that no systematic error exits, the defined variable *<sup>i</sup> z* are standard normal distributed.

$$r = AY \tag{63}$$

Data Processing Approaches for the Measurements of Steam Pipe Networks in Iron and Steel Enterprises 265

**Step 3.** If no bad nodes are detected in step 2, proceed to step5. Otherwise, repeat steps 1 ,2 (changing the matrices and vectors accordingly) for pseudonodes containing 2, 3… m

**Step 4.** Denote the set of all streams not denoted as good in the previous steps by S. The

1. The principle assumption is that the errors in two or more measurements do not cancel. 2. In step 3, m is chosen by the effect of locating the gross errors. If the increasing of m

3. By applying graph-theoretical rules[14] some streams can be determined as bad measured streams. The additional identification may be useful for the procedure of MP.

4. Equation (62) is not applied in the algorithm to control type I error. The probability of a type I error in the nodal imbalance test is not necessarily equal to the probability of

5. If the set S obtained in step 4 is empty, but there is one or more nodes are truly bad. Usually the instances happen when there's leak in the network system or the measured errors canceling each other. To solve the problem, the Modified MP (MMP), MT-NT

As the above two methods shown, gross data detection and data reconciliation are inherently combined together. Gross errors detection is proceeded with the help of the least-

Just as mentioned in section 3, the data reconciliation problem is expressed as the solution of the constrained least-squares problems.However, the assumptions, the constraint equations,

Suppose that the electric valves are fixed at a certain position, and the mass flow rate in each steam has been close to a constant for a period of time. So the constraint equation (54) can be written out on the basis of the balance for all the nodes (including real nodes and pseudonode) and the solution of the problem can be in accordance with the actual

measurements , *<sup>i</sup> y i S* ∈ are considered containing gross errors. **Steps 5-8.** The procedure is the same as the steps 4-7 of the MT algorithm.

doesn't gain any improvement, the step can be stopped.

square routine, which actually can obtained the optimal estimates.

rejecting a good measurement in MT [15].

combined methods [16] are proposed.

**4.1. The basic problems of data reconciliation** 

and the weighted parameter matrix have to be discussed.

*4.1.1. On the assumptions of data reconciliation in the present application* 

1. The process is at the steady state or approximately steady state.

For the application of the steam network, there are four latent assumptions. They are:

nodes.

Notations to the algorithm:

**4. Data reconciliation** 

state.

$$z\_i = r\_i \land \sqrt{\mathbb{g}\_{ii}} \tag{64}$$

Where

$$\mathbf{G} = \mathbf{A}\mathbf{Q}\mathbf{A}^T\tag{65}$$

**Step 2.** Compare each *<sup>i</sup> z* with a critical test value *<sup>c</sup>* 1 /2 *z z* <sup>−</sup>α = , which corresponding to the point of the significance testing level(1 / 2) −α . For the instance a test at the 95% significance level, α = 0.05 and 1.96 *<sup>c</sup> z* = . If *i c z z* ≤ is satisfied, the ith node is regarded as a good node and denote all streams connected to the node i as good streams.


Notations to the algorithm:

264 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

squares estimates in T applying equation (58).

rectification of the measured data is completed in step 1.

are generally not independent. It's not always applied [13].

However, the main frames are the same with MT.

**3.3. Gross error detection based on nodal imbalance test** 

algorithm named Method of pseudo nodes (MP) is listed as:

**Step 2.** Compare each *<sup>i</sup> z* with a critical test value *<sup>c</sup>* 1 /2 *z z* <sup>−</sup>

point of the significance testing level(1 / 2) −

α

1. In step 4, it's possible to remove the good streams into S in some cases.

3. The different significance levels will induce different results and effects.

is the all stream set.

Notations to the algorithm:

normal distributed.

significance level,

Where

**Step 5.** Replace A, Y, and Q with *A*′ ,*Y*′ , and*Q*′ respectively and Compute the least-

**Step 6.** Solve equation (54) to Compute the rectified values of the streams in S by substituting the estimated values computed in step 5 with the data of the steams in T. The original measured data are used for the streams in the set *RU ST* =−∪ ( ) , where U

**Step 7.** The vector comprised of the results from steps 5, 6 and the original measured data for the streams in R is the rectified measurement vector. If S is empty, then ˆ \* *Y X*ˆ = , the

2. The equation (62) and critical level value provides a conservative test since the residuals

4. For the shortage of MT that it tends to spread the gross errors over all the measurement and obtain unreasonable (negative or absurd) reconciled data, The Iterative Measurement Test (IMT) method and Modified IMT (MIMT) method were proposed.

The algorithms of gross error detection based on statistical test of nodal imbalance are mainly based on the work of literature [14]. Applying nodal imbalance test to each node and the aggregation node (ie. pseudonode) to locate and remove the gross errors. The basic

**Step 1.** Compute the nodal imbalances vector *r* and the statistical testing variable vector *z* . On the assumption that no systematic error exits, the defined variable *<sup>i</sup> z* are standard

α

as a good node and denote all streams connected to the node i as good streams.

*r AY* = (63)

/ *i i ii zr g* = (64)

*<sup>T</sup> G AQA* = (65)

= , which corresponding to the

. For the instance a test at the 95%

α

= 0.05 and 1.96 *<sup>c</sup> z* = . If *i c z z* ≤ is satisfied, the ith node is regarded


As the above two methods shown, gross data detection and data reconciliation are inherently combined together. Gross errors detection is proceeded with the help of the leastsquare routine, which actually can obtained the optimal estimates.
