Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
Chapter 4:Steady-State Data Reconciliation for
Bilinear Systems
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.1 Bilinear System
In industrial plants, process streams often contain several species or components. Besides the stream flow rates measured, the compositions of some of the streams are also measured. If we wish to simultaneously reconcile flow and composition measurements, then component mass balanceshave to be included as constraints in the data reconciliation problem. Since these constraints contain the products of flow rate and composition variables, the term bilinear data reconciliation is consequently used.
Another bilinear DR problem comes from reconciling flow rates and temperatures, in which the enthalpy of the stream is only a function of the temperature. In this case the energy balancesare the constraints in the optimization.
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.1 Bilinear System
To illustrate a typical bilinear data reconciliation problem, consider a simple example of reconciling flows and compositions of a binary distillation column which is commonly used in chemical industries, as shown in Figure 4.1.
Figure 4.1: Schematic diagram of a binary distillation column
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
Feed flow, F1
Distillate flow, F2
Bottom flow, F3
x1,1x1,2
x2,1x2,2
x3,1x3,2
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.1 Bilinear System
The measurements of the feed, distillate, and bottom flows, along with their compositions are listed in Table 4.1.
Table 4.1: Measurements of a binary distillation column
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
24.4488.23F3
0.00020.0197x3,1
0.00970.9748x3,2
23.9478.40F2
0.00940.9410x2,1
0.00050.0501x2,2
0.00520.004854.8
Standard deviation
0.5170x1,2
0.4822x1,1
1095.47F1
Raw MeasurementVariables
F1
F2
F3
x1,1x1,2
x2,1x2,2
x3,1x3,2
Figure 4.1
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
In Table 4.1, the flow measurements are in kg/h, and the compositions are in mass fraction.
At steady-state, the bilinear data reconciliation for the distillation column can be formulated as:
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
1 1 1 1 1T T
F x
2 2 2 2 2
ˆ ˆˆ ˆ ˆ( , ) ( ) ( ) ( ) (ˆ ˆ
J − −⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤= − − + − −⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦
1 1x x x x xF F F V F F V
x x x x xC,1ˆ =AF 0C,2ˆ =AF 0
Minimize (4.1)
subject to
1 2ˆ ˆ+ =x x 1
where F is the vector of the measured flow rates, , Vf and Vx are the variance matrices corresponding to the measurements of the flow rates and the compositions, respectively, and x1 and x2 are the composition vectors
[ ]T
1 2 3F F F=F
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
corresponding to components 1 and 2, and they are defined as:
and are the vectors of the component flow rates, defined as:
,
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
[ ]1,1 1,2
1 2 2,1 2,2
3,1 3,2
x xx xx x
⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦
x x1
2
3Component 1 2
Stream
C,1F C,2F
C,1
1 1 1,1
C,1 C,1
2 2 2,1
C,1
3 3 3,1
ˆ ˆ ˆF Fxˆ ˆ ˆ ˆF F x
ˆ ˆ ˆF F x
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦
F
C,2
1 1 1,2
C,2 C,2
2 2 2,2
C,2
3 3 3,2
ˆ ˆ ˆF Fxˆ ˆ ˆ ˆF F x
ˆ ˆ ˆF F x
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦
F
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
and are the component mass balances of components 1 and 2 , respectively. A is the incidence matrix, . are the normalization equations for the compositions in each flow where 1 denotes the vector, .
The above formulation of the DR problem is in terms of flows rates and composition variables. Alternatively, we can also formulate it in terms of overall flow and component flow variables. In this case, the normalization equations can be written as:
It should be noted that the constraints are linear in terms of the flow variables, .
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
C,1ˆ =AF 0 C,2ˆ =AF 0
[ ]1 1 1= − −A1 2
ˆ ˆ+ =x x 1
[ ]T1 1 1=1
C,1 C,2ˆ ˆ ˆ− − =F F F 0
C,1 C,2ˆ ˆ, and F F F
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
Although, the constraints are linear in terms of the flow variables, the objective function (4.1) contains composition variables. In order to overcome this problem, the objective function is modified to minimize the sum of squares of the adjustments made to flows and component flow variables, by:
minimizing (4.2)
subject to
where V is the variance matrix of the “measurements” having the form:
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
T
C,1 C,1 C,1 -1 C,1 C,1
C,2 C,2 C,2 C,2 C,2
ˆ ˆ ˆˆ ˆ ˆ( )ˆ ˆ ˆ
J⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥= − −⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦⎣ ⎦ ⎣ ⎦ ⎣ ⎦⎣ ⎦ ⎣ ⎦
F F F F FF F F V F FF F F F F
C,1ˆ =AF 0C,2ˆ =AF 0
C,1 C,2ˆ ˆ ˆ− − =F F F 0
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
(4.3)
In (4.3), is the variance matrix of the “measured” component flows. However, the elements in can’t be directly obtained from the raw measurements.
The estimation of the variance of the component flows in (4.3) can be obtained by linearizing the term, Fk xi,j , using a first order Taylor’s series:
(4.4)
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
CFV
CFV
* * * * * *
k i,j k i,j i,j k k k i,j i,jF x F x x (F F ) F (x x )≈ + − + −* 2 * 2
k i,j i,j k k i,jVar(F x ) (x ) Var(F ) (F ) Var(x )≈ +
C
F
F
⎡ ⎤= ⎢ ⎥⎣ ⎦
V 0V
0 V
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
where the superscript, * , denotes the value of the measurements.
The modified objective function (4.2), subject to the linear constraints in the flow variables, results in a linear DR problem. The estimates of the flows can be obtained analytically by Equation (2.7).
After the data reconciliation of the flow estimates, the values of the compositions can be obtained by:
(4.5)
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
C,1
1,1 1 1
C,1
2,1 2 2
C,1
3,1 3 3
ˆx F /Fˆx F /F ,ˆx F /F
⎡ ⎤⎡ ⎤⎢ ⎥⎢ ⎥ = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎣ ⎦
C,2
1,2 1 1
C,2
2,2 2 2
C,2
3,2 3 3
ˆx F /Fˆx F /F .ˆx F /F
⎡ ⎤⎡ ⎤⎢ ⎥⎢ ⎥ = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎣ ⎦
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
For the illustrative example of the distillation column, the vector of the stream flows is given by:
The “raw measurements” of the component flows are given by:
Using Equation (4.4), the variance matrix is calculated as:
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
1095.47478.40488.23
⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦
F
1 1,1
C,1
2 2,1
3 3,1
Fx 528.24F x 450.17F x 9.62
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦
F1 1,2
C,2
2 2,2
3 3,2
Fx 566.36F x 23.97F x 475.93
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦
F
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
Write the linear constraint equations in Equation (4.2) in the matrix form:
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
3003.0571.2 0
595.4725.0
V 526.00.241
0 835.11.491
588.2
C,1
C,2
,− −⎡ ⎤ ⎡ ⎤
⎢ ⎥ ⎢ ⎥ =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦
I I I F0 A 0 F 00 0 A F
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
Using Equation (2.7), the reconciled flows by MATLAB are:
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
C,1
C,2
1 0 0 1 0 0 1 0 00 1 0 0 1 0 0 1 0
.0 0 1 0 0 1 0 0 10 0 0 1 1 1 0 0 00 0 0 0 0 0 1 1 1
− −⎡ ⎤⎢ ⎥− − ⎡ ⎤⎢ ⎥ ⎢ ⎥ =− −⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥− − ⎣ ⎦⎢ ⎥⎢ ⎥− −⎣ ⎦
FF 0F
1
2
3
1 1,1
2 2,1
3 3,1
1 1,2
2 2,2
3 3,2
F
F
Fˆ ˆFxˆ .ˆF xˆ ˆF x
Fx
F x
F x
⎡ ⎤⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥ ⎣ ⎦⎢ ⎥⎣ ⎦
1010.2500.1510.1485.7
= 476.09.7
524.524.0
500.5
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
It can be justified that the reconciled flows satisfy overall mass balances and component mass balances around the distillation column.
Using Equation (4.5), the calculated compositions are:
Note that the reconciled compositions satisfy the normalization equations. For comparison, the reconciled values along with their raw measurements are listed in Table 4.2.
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
1,1
2,1
3,1
x 0.4808x 0.9518x 0.0190
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦
1,2
2,2
3,2
x 0.5192x 0.0480x 0.9810
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
Table 4.2: Results of bilinear data reconciliation for a binarydistillation column.
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
0.98100.0190510.10.04800.9518500.10.51920.48081010.2
Reconciled
4.29488.23F3
3.680.0197x3,1
0.630.9748x3,2
4.34478.40F2
1.130.9410x2,1
-4.370.0501x2,2
0.42-0.29-8.44
Adjustment, %
0.5170x1,2
0.4822x1,1
1095.47F1
RawVariables
F1
F2
F3
x1,1x1,2
x2,1x2,2
x3,1x3,2
Figure 4.1
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
To summarize, the constraints of a bilinear data reconciliation problem contain products of two variables (flow and composition, or flow and temperature). With all variables measured, the bilinear DR problem can be reduced to a linear DR problem by introducing the “measured” compound flows (component flows or energy flows).
♣
Often, there are some flows or compositions that are unmeasured in a process. The presence of unmeasured flow or composition variables introduces complications in the bilinear data reconciliation problem. Crowe (1989) proposed a method, a two-stage projection matrix method, to handle this problem. This method is summarized in the following steps:
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.2 Solution to Bilinear Data Reconciliation
Step 1: Unmeasured composition variables are eliminated though Q-R factorization.
Step 2: Reconcile flow and composition measurements and estimate unmeasured total flow rates.
Step 3: Estimate unmeasured compositions.
Because the model constraints in bilinear DR are intrinsically nonlinear, an alternative method to solve a bilinear data reconciliation problem is to use Nonlinear Programming (NLP)techniques that can give the estimates for the measured and unmeasured variables simultaneously . Details of nonlinear data reconciliation problems will be discussed in the next chapter.
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.3 Quiz
Consider a heat-exchanger process as shown in Figure 4.2. All the flows and temperatures for the streams are measured, and the heat capacity, Cp, for all streams is constant.
Figure 4.2: A heat-exchanger process.
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems Hot stream
Hot stream return Cold stream
Cold stream return
F1, T1
F2, T2
F3, T3
F4, T4
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.3 Quiz
Question 1:The mass balances used in the reconciliation of the eight raw measurements are
(a)(b)
(c)
(d)
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
1 2 4 3ˆ ˆ ˆ ˆF - F + F - F = 0
1 2ˆ ˆF - F = 0
4 3ˆ ˆF - F = 0
1 3ˆ ˆF - F = 0
4 2ˆ ˆF - F = 0
1 2 4 3ˆ ˆ ˆ ˆF - F + F - F = 0
1 3ˆ ˆF - F = 0
4 2ˆ ˆF - F = 0
F1, T1
F2, T2
F3, T3
F4, T4
Figure 4.2
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.3 Quiz
Question 2:The heat balances used in the reconciliation of the eight raw measurements are
(a)(b)
(c)
(d) either (a), (b), or (c)
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
F1, T1
F2, T2
F3, T3
F4, T4
Figure 4.2
1 1 2 2 4 4 3 3ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆFT - F T + F T - F T = 0
1 1 2 2ˆ ˆ ˆ ˆFT - F T = 0
4 4 3 3ˆ ˆ ˆ ˆF T - F T = 0
1 1 3 3ˆ ˆ ˆ ˆFT - F T = 0
4 4 2 2ˆ ˆ ˆ ˆF T - F T = 0
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.3 Quiz
Question 3:The eight raw measurements and their standard deviations are listed as in the table. Calculate the reconciled values for each variable.
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
F1, T1
F2, T2
F3, T3
F4, T4
Figure 4.25.7 t/h450.0 t/hF4
1.1 oC30.0 oCT4
6.8 t/h460.6 t/hF3
1.8 oC44.8 oCT3
3.0 t/h153.66 t/hF2
1.2 oC45.4 oCT2
1.5 oC4.5 t/h
Standard deviation
90.7 oCT1
150.89 t/hF1
Raw measurementsVariables
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
4.4 Suggested Readings
Crowe, C.M. (1989). Reconciliation of process flow rates by matrix projection, II: Nonlinear case. AIChE J., 32, 616-623.
Schraa, O.J. and Crowe, C. M. (1996). The numerical solution of bilinear data reconciliation problems using unconstrained optimization methods. Comp. and Chem. Engng, 20 , Supp. A, S727.
Narasimhan, S. and Jordache, C. (2000). “Data Reconciliation & Gross Error Detection, An Intelligent Use of Process Data”. Gulf Publishing, Houston, Texas.
CHAPTER 4
Steady-State Data Reconciliation for Bilinear Systems
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
Chapter 5:Steady-State Nonlinear Data
Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.1 Formulation of Nonlinear Steady-State Data reconciliation
In most cases, the steady-state equality constraints that are used to describe the physical system of a process are nonlinear. For example, in the bilinear case, the constraints of component balances are nonlinear.
Moreover, if we take thermodynamic equilibrium relationships and complex correlations for thermodynamic and physical properties as constraints, then nonlinear data reconciliationtechniques have to be used.
If we impose bounds on the estimates, for example, the mass fraction of a component must be in the interval [0, 1]. This gives rise to inequality constraints in the data reconciliation problem which can only be solved using nonlinear data reconciliation techniques.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.1 Formulation of Nonlinear Steady-State Data reconciliation
The nonlinear data reconciliation problem can be formulated as an optimization problem by:
minimizing (5.1)subject to
where y and z are the vectors of measured and unmeasured variables, and f and g are the function vectors of equality and inequality model constraints including simple lower and upper bounds.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Tˆ ˆ ˆ ˆ( , ) ( ) ( )J −= − −1y z y y V y yˆ ˆ( , ) =f y z 0ˆ ˆ( , ) ≥g y z 0
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
The method developed for solving the linear data reconciliation problem introduced in Chapters 2 and 3 can be extended to handle the nonlinear constraints. The idea is that the nonlinear constraints, , can be linearized using a first-order Taylor’s series around an estimation of the variables.
The linearized system of the constraint equations obtained can be written in the form:
(5.2)
where
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
ˆ ˆ( , )f y z
y zˆ ˆ+ =A y A z b
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive LinearizationCHAPTER 5
Steady-State Nonlinear Data Reconciliation
i i
1 1 1
1 2 M
2 2 2
1 2 My i i
ˆ ˆ,
C C C
1 2 M
f f f...ˆ ˆ ˆy y yf f f...ˆ ˆ ˆy y y ˆ ˆ ˆat and , (5.3)
ˆ...
f f f...ˆ ˆ ˆy y y
∂ ∂ ∂⎡ ⎤⎢ ⎥∂ ∂ ∂⎢ ⎥
∂ ∂ ∂⎢ ⎥∂ ⎢ ⎥∂ ∂ ∂= = = =⎢ ⎥∂
⎢ ⎥⎢ ⎥∂ ∂ ∂⎢ ⎥∂ ∂ ∂⎢ ⎥⎣ ⎦
y z
fA y y z zy
M M M
i i
1 1 1
1 2 N
2 2 2
1 2 Nz i i
ˆ ˆ,
C C C
1 2 N
f f f...ˆ ˆ ˆz z zf f f...ˆ ˆ ˆz z z ˆ ˆ ˆat and , (5.4)
ˆ...
f f f...ˆ ˆ ˆz z z
∂ ∂ ∂⎡ ⎤⎢ ⎥∂ ∂ ∂⎢ ⎥
∂ ∂ ∂⎢ ⎥∂ ⎢ ⎥∂ ∂ ∂= = = =⎢ ⎥∂
⎢ ⎥⎢ ⎥∂ ∂ ∂⎢ ⎥∂ ∂ ∂⎢ ⎥⎣ ⎦
y z
fA y y z zz
M M M
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
(5.5)
and are the vectors of estimates corresponding to measured and unmeasured variables.
It should be noted that, in Equation 5.3 and Equation 5.4, M is the number of measured variables, N is the number of unmeasured variables, C is the total number of equality constraints, and i is the ith iteration during the successive linearization.
The matrices Ay and Az are also known as Jacobian matrices.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
y i z i i iˆ ˆ ˆ ˆ( , ),= + −b A y A z f y z
ˆ ˆ, y z
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
In general, the raw measurements are used as initial estimates for the measured variables in the first iteration. At each iteration, the estimates of process variables are obtained by:
minimizing (5.6)subject to
Following the procedures to solve the linear DR problems described in Chapter 3, the unmeasured variables, , in Equation 5.6 are first eliminated using a projection matrix via Q-R factorization of Az. Then, the subset of constraint equations contains only measured variables, and the problem becomes:
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Tˆ ˆ ˆ ˆ( , ) ( ) ( )J −= − −1y z y y V y yy zˆ ˆ+ =A y A z b
z
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
minimizing (5.7)subject to
where Q2T is the projection matrix. The solution to (5.7) can be
given as:
(5.8)
and the solution to the unmeasured variables can be given as:
(5.9)
In (5.7), (5.8), and (5.9), the matrices Q1, Q2, R1, and R2 are the corresponding submatrices of the Q-R factorization of Az .
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Tˆ ˆ ˆ( ) ( ) ( )J −= − −1y y y V y yT T
2 y 2ˆ =Q A y Q b
1T T T T T T T
2 y 2 y 2 y 2 y 2ˆ ( ) ( ) ( ) ( )
−
= − −⎡ ⎤⎣ ⎦y y V Q A Q A V Q A Q A y Q b
-1 T -1 T -1
1 1 1 1 y 1 2 N-rˆ ˆ= − −z R Q b R Q A y R R z
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
When the new estimates for measured and unmeasured variables are obtained, the next iteration begins. The functions
and the Jacobian matrices, Ay and Az are reevaluated. Equation 5.6 is re-formulated, and solved with Equations 5.8 and 5.9. The iterations continue until
satisfy some small tolerance criteria.
♣
In order to demonstrate the strategies for solving the nonlineardata reconciliation problem, let’s take the distillation column discussed in Chapter 4 as an illustrative example.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
ˆ ˆ( , )f y z
ˆ ˆ ˆ ˆ(n) - (n-1) and (n) - (n-1)y y z z
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Suppose the compositions of component 2 in the distillate and bottom product streams, x2,2 and x3,2, are unmeasured. For convenience, the distillation column is reproduced in Figure 5.1.
Figure 5.1: Distillation column with unmeasured variables
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Feed flow, F1
Distillate flow, F2
Bottom flow, F3
x1,1x1,2
x2,1x2,2
x3,1x3,2
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
For the distillation column, the vectors of measured and unmeasured variable are defined as:
The data reconciliation problem for this column, then, can be formulated as:
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
11
22
33
1,14
1,25
2,16
3,17
FyFyFyx ,yxyxyxy
⎡ ⎤⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥= = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎣ ⎦
y 2,21
3,22
xz.
xz⎡ ⎤⎡ ⎤= = ⎢ ⎥⎢ ⎥
⎣ ⎦ ⎣ ⎦z
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
minimizing (5.10)
subject to
For this problem, using Equations 5.3 and 5.4, the Jacobianmatrices corresponding to the measured and unmeasured variables can be evaluated as:
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Tˆ ˆ ˆ( ) ( ) ( )J −= − −1y y y V y y
1 4 2 6 3 7ˆ ˆ ˆ ˆ ˆ ˆy y y y y y 0− − =
1 5 2 1 3 2ˆ ˆ ˆ ˆ ˆ ˆy y y z y z 0− − =
4 5ˆ ˆy y 1 0+ − =
6 1ˆ ˆy z 1 0+ − =
7 2ˆ ˆy z 1 0+ − =
Component balances
Normalization equationsF1
F2
F3
x1,1x1,2
x2,1x2,2
x3,1x3,2
Figure 5.1
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
The functions of the constraint equations can be given as:
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
4 6 7 1 2 3
5 1 2 1
ˆ ˆ ˆ ˆ ˆ ˆy -y -y y 0 -y -yˆ ˆ ˆ ˆy -z -z 0 y 0 0
,0 0 0 1 1 0 0ˆ
0 0 0 0 0 1 00 0 0 0 0 0 1
⎡ ⎤⎢ ⎥⎢ ⎥∂ = ⎢ ⎥
∂ ⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
fy
2 3
0 0ˆ ˆy y
.0 0ˆ
1 00 1
⎡ ⎤⎢ ⎥− −⎢ ⎥∂ = ⎢ ⎥
∂ ⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
fz
1 4 2 6 3 7
1 5 2 1 3 2
4 5
6 1
7 2
ˆ ˆ ˆ ˆ ˆ ˆy y y y y yˆ ˆ ˆ ˆ ˆ ˆy y y z y z
ˆ ˆ ˆ ˆ( , ) .y y 1ˆ ˆy z 1ˆ ˆy z 1
− −⎡ ⎤⎢ ⎥− −⎢ ⎥
= + −⎢ ⎥⎢ ⎥+ −⎢ ⎥⎢ ⎥+ −⎣ ⎦
f y z
(5.11)
(5.12)
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
In order to bring the measurements of flows and compositions into the same order of magnitude for the DR, the flow measurements are scaled down by dividing by 1000. Referring to Table 4.1, the initial estimates for the reconciled values are given as:
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
0
1.095470.4784
0.48823, and 0.4822
0.5170.941
0.0197
⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥= ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
y0
0.05.
0.98⎡ ⎤= ⎢ ⎥⎣ ⎦
z
24.4488.23F3
0.00020.0197x3,1
N/Aunmeasuredx3,2
23.9478.40F2
0.00940.9410x2,1
N/Aunmeasuredx2,2
0.0052
0.0048
54.8
Standard deviation
0.5170x1,2
0.4822x1,1
1095.47F1
Raw Measurement
Variables
Table 4.1
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Iteration 1:With these initial values, using Equation 5.11, the linearizedmatrices can be given as:
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
0 0y ,
,
⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
y z
0.4822 -0.941 -0.0197 1.09547 0 -0.4784 -0.488230.517 -0.0588 -0.9803 0 1.09547 0 0
A 0 0 0 1 1 0 00 0 0 0 0 1 00 0 0 0 0 0 1
0 0z ,
0 00.4784 0.48823
.0 01 00 1
⎡ ⎤⎢ ⎥− −⎢ ⎥
= ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
y zA
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Using Equation 5.12, the values of the constraint functions are evaluated as:
.
Using Equation 5.5, the right hand vector of the linearized equations is evaluated as:
.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
0 0
0.06840.0640
ˆ ˆ( , ) 0.00080.00900.0003
⎡ ⎤⎢ ⎥⎢ ⎥
= −⎢ ⎥⎢ ⎥−⎢ ⎥⎢ ⎥−⎣ ⎦
f y z
0 0 0 00 , 0 , 0 0 0
0.06840.064
ˆ ˆ ˆ ˆ( , ) 111
⎡ ⎤⎢ ⎥⎢ ⎥
= + − = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
y z y zb A y A z f y z
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
The results of the Q-R factorization of the matrix are
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
0 0z ,y zA
0 0 0 -0.9571 0.28960.4316 -0.3636 0 0.2391 0.7902
0 0 1 0 00.9021 0.1739 0 0.1144 0.378
0 0.9152 0 0.1167 0.3858
⎡ ⎤⎢ ⎥⎢ ⎥
= ⎢ ⎥⎢ ⎥− −⎢ ⎥⎢ ⎥⎣ ⎦
Q
1.1085 -0.21070 1.09270 00 00 0
−⎡ ⎤⎢ ⎥⎢ ⎥
= ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
R
Q1 Q2
R1
0
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Note that the matrix R only contains R1, implying that all the unmeasured variables are observable. Applying Equation 5.8, the estimated measured variables for the first iteration are:
Applying Equation 5.9, the estimates for the unmeasured variables for the first iteration are:
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
1
1.00220.50260.4999
ˆ .0.48220.51780.94210.0197
⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥= ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
y
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Iteration 2:Repeating the procedure above using and as the new initial values results in:
Note that there are only very small changes for the estimates in the second iteration.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
1
0.0579ˆ .
0.9803⎡ ⎤= ⎢ ⎥⎣ ⎦
z
1y 1z
2
1.00240.50260.4997
ˆ ,0.48220.51780.94210.0197
⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥= ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
y2
0.0579ˆ .
0.9803⎡ ⎤= ⎢ ⎥⎣ ⎦
z
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Iteration 3 converges the estimates at the values shown in Table 5.1.
Table 5.1: Results of nonlinear DR for a distillation column
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
0.98030.0197499.70.05790.9421502.60.51780.48221002.4
Reconciled (Estimated)
488.23F3
0.0197x3,1
Unmeasuredx3,2
478.40F2
0.9410x2,1
Unmeasuredx2,2
0.5170x1,2
0.4822x1,1
1095.47F1
RawVariables
F1
F2
F3
x1,1x1,2
x2,1x2,2
x3,1x3,2
Figure 5.1
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
The MATLAB code used for the successive linearizationmethod is listed below.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
*********************************************************
f=[0;0;0;0;0];
Q1=[0 0;0 0;0 0;0 0;0 0];
Q2=[0 0 0;0 0 0;0 0 0;0 0 0;0 0 0];
V=[0 0 0 0 0 0 0;0 0 0 0 0 0 0;0 0 0 0 0 0 0;0 0 0 0 0 0 0;0 0 0 0 0 0 0;0 0 0 0 0 0 0;0 0 0 0 0 0 0];
V(1,1)=0.0548^2;
V(2,2)=0.0239^2;
V(3,3)=0.0244^2;
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
V(4,4)=0.0048^2;
V(5,5)=0.0052^2;
V(6,6)=0.0094^2;
V(7,7)=0.0002^2;
y=[1.09547;0.4784;0.48823;0.4822;0.517;0.941;0.0197];
z=[0.05;0.98];
flag=1;
while flag>0,
SSEy=0;
SSEz=0;
Ay=[y(4) -y(6) -y(7) y(1) 0 -y(2) -y(3);y(5) -z(1) -z(2) 0 y(1) 0 0;0 0 0 1 1 0 0;0 0 0 0 0 1 0;0 0 0 0 0 0 1];
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Az=[0 0;-y(2) -y(3);0 0;1 0;0 1];
f(1)=y(1)*y(4)-y(2)*y(6)-y(3)*y(7);
f(2)=y(1)*y(5)-y(2)*z(1)-y(3)*z(2);
f(3)=y(4)+y(5)-1;
f(4)=y(6)+z(1)-1;
f(5)=y(7)+z(2)-1;
b=Ay*y+Az*z-f;
[Q,R]=qr(Az);
for I=1:5,
Q1(I,1)=Q(I,1);
Q1(I,2)=Q(I,2);
end;
for I=1:5,
for J=3:5,
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
Q2(I,J-2)=Q(I,J);
end;
end;
for I=1:2,
for J=1:2,
R1(I,J)=R(I,J);
end;
end;
yhat=y-V*(Q2'*Ay)'*inv((Q2'*Ay)*V*(Q2'*Ay)') *(Q2'*Ay*y-Q2'*b);
zhat=inv(R1)*Q1'*b-inv(R1)*Q1'*Ay*yhat;
yhat
zhat
for I=1:7,
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.2 Successive Linearization
SSEy=SSEy+(y(I)-yhat(I))^2;
end;
for I=1:2,
SSEz=SSEz+(z(I)-zhat(I))^2;
end;
if and(SSEy<1.0e-6,SSEz<1.0e-6),flag=-1;
end;
y=yhat;
z=zhat;
end
**********************************************
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.3 Nonlinear Program
The method of successive linearization introduced in Section 5.2 has the advantage of relative simplicity and fast calculation. However, variable bounds can’t be handled with this method.
Nonlinear programming (NLP) algorithms allow for a general nonlinear objective function, not just a weighted least square objective function. They can explicitly handle nonlinear constraints, inequality constraints, and variable bounds.
Typical algorithms of NLP include sequential quadratic programming (SQP) techniques, such as NPSOL code, and generalized reduced gradient (GRG) methods, such as GRG2code.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.3 Nonlinear Program
Nonlinear programming codes are now commercially available, and they have proved to be numerically robust and reliable for large-scale industrial problems.
The disadvantages of these NLP algorithms is the large amount of computation time required relative to the successive linearization algorithm. However, their range of application is wider, and they are able to manage inequality constraints and bounds on variables.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.4 Quiz
Question 1:The constraints of a nonlinear data reconciliation problem can contain(a) material balances. (b) energy balances.(c) physical property correlations.(d) inequality constraints.
Question 2:The method of successive linearization(a) linearizes the objective function. (b) linearizes the equality constraints. (c) linearizes the inequality constraints.(d) has less computational time.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.4 Quiz
Question 3:Nonlinear data reconciliation problems which contain inequality constraints can be solved by(a) using the successive linearization method. (b) using sequential quadratic programming.(c) using the generalized reduced gradient method.(d) using other nonlinear programming techniques.
Question 4:The estimates for the measured and unmeasured variables in a nonlinear DR problem are(a) definitely biased. (b) definitely unbiased. (c) perhaps biased.(d) perhaps unbiased.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation
Basic Concepts in Data ReconciliationBasic Concepts in Data Reconciliation
© North Carolina State University, USA © University of Ottawa, Canada, 2003
5.5 Suggested Readings
Edgar, T.F.; Himmelblau D.M. and Lasdon, L. S. (2001). “Optimization of Chemical Processes”, 2nd Ed., McGraw Hill, New York.
Lasdon, LS. And Waren, A.D. (1978). Generalized reduced gradient software for linearly and nonlinearly constrained problems, in Design and Implementation of OptimizationSoftware, Sijthoff and Noordhoff, Holland: H. Greenberg, Ed..
Romagnoli, J.A. and Sanchez, M.C. (2000). “Data Processing and Reconciliation for Chemical Process Operations”. Academic Press, San Diego.
Vasantharajan, S. and Biegler, L.T. (1988). Large-scale decomposition for successive quadratic programming, Computers Chem. Engng., 12, 1087-1101.
CHAPTER 5
Steady-State Nonlinear Data Reconciliation