You are on page 1of 8

Data Reconciliation with MATLAB

... from actual experience!

Felipe Aristizbal
Department of Chemical Engineering McGill University

Montral, Qubec July 31, 2013

Objectives

We will cover: The basic fundamentals of data reconciliation. Linear and Bilinear systems. MATLAB implementation.

Problem Description
Using mass balances, calculate the value of F6:
FI 101 FI 103 FI 105 FI 106

6 Stream FI-101 FI-102 FI-103 FI-104 FI-105 FI-106 Name F1 F2 F3 F4 F5 F6 kt/h 110.5 60.8 35.0 68.9 38.6 ????

FI 102

FI 104

Many solutions possible. Redundant measurements.

Data Reconciliation
All measurements have errors. Take advantage of redundant information. Formulate as constrained optimization problem. Analytical solution for linear and bilinear constraints. Linear Constraints Minimize: Subject to: Where: y : m by 1 vector of raw measurements. : m by 1 vector of estimates. y V : m by m covariance matrix. A: Incidence matrix - mass balances. )T V 1 (y y ) J ( y ) =(y y =0 Ay

Analytical Solution: Linear Data Reconciliation


Using Lagrange multipliers .... , can be calculated from: ... the estimates, y W = I VAT (AVAT )1 A = Wy y Cov( y ) = WVW T Procedure (MATLAB)
1 2 3 4 5

Create y from measurements Obtain V from measurement standard deviations (V = diag(i2 )) Use mass balances to obtain A Calculate W , y Extra: what are estimates standard deviations, i ? i = diag(Cov( y ))

Example: Linear DR
1 3 5 6

2 Stream No. 1 2 3 4 5 6 Raw Measurement (kt/h) 110.5 60.8 35.0 68.9 38.6 101.4 Standar Deviation, (kt/h) 0.82 0.53 0.46 0.71 0.45 1.20

4 Reconciled Flow (kt/h) 103.2 65.4 37.8 65.4 37.8 103.2 Standar Deviation (kt/h) 0.42 0.37 0.30 0.37 0.30 0.42

Example: Bilinear System


F2 x2,1 x2,2 F1 x1,1 x1,2 Transform to component ow fij = Fi xij F1 f1,1 f1,2 F2 f2,1 f2,2

F3 x3,1 x3,2

F3 f3,1 f3,2

Non-Linear Constraints F1 x1,1 F2 x2,1 F3 x3,1 = 0 x1,1 + x1,2 = 1 ...

Linear Constraints f1,1 f2,1 f3,1 = 0 F1 f1,1 f1,2 = 0 ...

Example: Bilinear System (cont.)


Approximate the variance of the new variables,
2 V (fij ) xij V (Fi ) + Fi2 V (xij )

Variable Name F1 x1,1 x1,2 F2 x2,1 x2,2 F3 x3,1 x3,2

Raw Measurement 1095.5 0.4822 0.5170 478.4 0.9410 0.0501 488.2 0.0197 0.9748

Standar Deviation, 54.8 0.0048 0.0052 23.9 0.0094 0.0005 24.4 0.0002 0.0097

Reconciled Measurement 1010.2 0.4808 0.5192 500.1 0.9518 0.0480 510.1 0.0190 0.9810