0% found this document useful (0 votes)
29 views6 pages

Flownetwork Problem

This document describes a process monitoring and data reconciliation experiment. The objective is to analyze sensor data from a mixing process to identify any sensors that may not be functioning correctly. The data from various temperature and flow rate sensors is loaded and cleaned. Mass and energy balances are used to detect inconsistencies and identify sensors with potential gross errors.

Uploaded by

Ridwan Mahfuz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views6 pages

Flownetwork Problem

This document describes a process monitoring and data reconciliation experiment. The objective is to analyze sensor data from a mixing process to identify any sensors that may not be functioning correctly. The data from various temperature and flow rate sensors is loaded and cleaned. Mass and energy balances are used to detect inconsistencies and identify sensors with potential gross errors.

Uploaded by

Ridwan Mahfuz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Flow Network Problem - Data Reconciliation

ChE - 310 : Numerical Methods

OBJECTIVE:
• To get comfortable in ‘playing’ with process data in Matlab. Remem-
ber the first step in successful process data analysis is to enjoy playing
with data.

• To illustrate the analysis and treatment of process data using very


simple methods.

• To verify that the data does indeed make sense. Appropriate balance
equations (mass, energy) can be used to identify sensors which may not
be functioning correctly. This exercise is also known in the literature
as ‘data reconciliation’ or ‘data validation’.
Basic Theory: Consider a reactor temperature at steady state (i.e.
constant with time). Ideally, the temperature reading (as measured by a
temperature sensor, say a thermocouple) should be constant. However, in
practice this will not be the case, and the sensor measurement will typically
be corrupted with noise (sensor noise, process noise, etc.). The measurement
equation can then be written as:

Tm = T + ε (1)

where T is the true (unknown) temperature value (the value which the
temperature would have if there were no noise), and ε is noise, assumed to
be Normally distributed with mean 0.
An example of repeated measurement as given by equation (??) is shown
in Figure 1 below (the true value is 100 0 C).
Noise in the sensor (as characterized by equation 1) is unavoidable. How-
ever, sometimes the sensors suffer from what are called as “gross errors” or
“bias errors” apart from normally distributed noise. For example, a sensor
which is wrongly calibrated (always shows a value which is 50 C more than
the true value) can have a bias. Another common reason for gross error can
be incorrect installation of the sensor. In presence of gross error, the sensor
equation can be written as:

Tm = T + δ + ε (2)

where δ is the (fixed but unknown) value of gross error. An example of a


temperature sensor suffering from a gross error is shown in Figure 2 below.

1
103

102

101

100
Temperature

99

98

97

96
0 50 100 150 200 250
time

Figure 1: Temperature readings in presence of normally distributed noise


(true value 100 0 C)

104.5

104

103.5

103

102.5
Temperature

102

101.5

101

100.5

100

99.5
0 50 100 150 200 250
time

Figure 2: Temperature (true value=100 0 C) with a gross error of 2 0 C.


Notice that the mean now appears to be around 102 0 C.

2
If sufficient measurements are present in the process, then by using
process balance equations (mass balance, energy balance), gross errors in
some sensors can be detected. For instance in the above example, if there is
another thermocouple close to the temperature sensor and there is no addi-
tion or loss of heat between the two points then there will exist a relation:
Tm -Tnew =0. This relation can be used to detect gross error in any of these
two temperature sensors.
Problem:
A “process monitoring and data reconciliation” experiment has been
designed for evaluating the performance of various sensors and detecting
sensor malfunctions.
The equipment consists of a cold and hot water stream mixing at a
’T’ junction, as shown in the schematic below. The temperatures and flow
rates are measured by thermocouples and orifice meters respectively. The
equipment is interfaced to a personal computer and all variables are logged
every 2 sec. Several thousand data points have been collected and have been
stored in the file “data.txt”. The data file is provided in the course website.
Load the data into your Matlab workspace using ”load data.txt” com-
mand (change the directory or the path if necessary). You should have a
variable called “data” with size 2990X8 in the workspace. Data columns are
as follows:

• Column 1: Time(sec)

• Column 2:T1(degrees C)

• Column 3:T2(degrees C)

• Column 4:T4 (degrees C)

• Column 5:T5 (degrees C)

• Column 6:Flow-cold(Volts)

• Column 7:Flow-hot(Volts)

• Column 8:Flow-total(Volts)

Using the experimental data perform the following:


a) Convert the flow data from volts (as given in the data file) to kg/h
using the following calibration equations:

ṁcw (kg/h) = 1.256 + 89.016 volts

3
Fcw Ft
T1 T4 T5
cold
water

Fhw

hot
water T2

Figure 3: Schematic of a mixing process. “F” stands for flowrate, and “T”
stands for temperature


ṁhw (kg/h) = 1.444 + 181.574 volts

ṁt (kg/h) = −2.319 + 355.822 volts
b) Plot the flow rate data (each of the three flow rates) by plotting it in units
of kg/h versus time. Calculate the mean and the variance of each of the three
flow rates. Note that under steady state assumptions, the sensor readings
should ideally be constant. However, due to presence of noise (experimental
errors, sensor noise, etc.) the sensor values are not constant, but fluctuate
around a mean value. Does the data seem to make sense?
c) Clean outliers from the flow rate data set (i.e. replace all data points
which are outside the mean ± 3*standard deviation band by the correspond-
ing variable mean and save this data for use in part d) and onwards. Show
the plots of the clean flow rate data.
[The idea here is that if noise is normally distributed with mean 0,
then the probability of getting a measurement which is outside the mean
± 3*standard deviation limit is practically zero (0.001). Hence, it is as-
sumed that values outside this limit are a result of some malfunction, such
as a sudden voltage spike, or a wrong recording (if a human is involved)
and these values need to be replaced by a reasonable estimate (which is the
mean) in our analysis].
For the remaining parts, work with the clean flow rates (free of outliers)

1. Under steady state assumption, the following mass balance should


hold:

4
0 = ṁt − ṁhw − ṁcw
However, due to noise in the measurements, the LHS of above equation will
not exactly be zero, and the above eqn. can be rewritten as:

εm = ṁt − ṁhw − ṁcw

The quantity εm is termed as the mass balance closure error.


Compute the mass balance closure error for (i) the first 1500 data points
and (ii) the last 1000 data points (use the clean data). Plot histograms
and compute means and variances of the two sets of errors. Which of these
two data sets appears to give a zero closure error with a high degree of
confidence? Do the flow sensors appear to give consistent results? (Hint:
Check the cold water flow rate sensor carefully).
e) Plot the time profiles of T4 and T5 measurements. Plot the distribution
or the histogram of these variables. Compute the mean and the variance
of these measurements and comment as to why the variance of one of the
temperature measurements is different than the other.
f) Compute the following:
We want to now write energy balance equations. But these will involve
flow rate values as well. Based on the previous analysis of flowrates, if you
think any of the hot, cold or total flowrate sensor has a problem, then get a
better estimate of the wrong values using the mass balance equation.
1) Now, from the schematic you can see that ideally T4 values should be
equal to T5. But because of measurement errors, they will not exactly be
equal. So, one energy balance we can write is:

0 = Cp4 T4 − Cp5 T 5

Compute the closure error for the above equation (make simplifying assump-
tions about the heat capacities, for example you can assume that they are
insensitive to temperature variations and hence just cancel them from the
above equation).
Construct the histogram of this closure error and calculate its mean and
variance. Do you think there is a gross error with either one of T4 or T5
sensors?
2) If your answer to the previous question is “yes there is a gross error
in either T4 or T5 sensor”, then we need to detect which one of the two has
a gross error. For that, let’s write down overall energy balance equations.
We can write two separate equations: one with T4 and one with T5 as:

5
0 = ṁcw Cp1 T1 + ṁhw Cp2 T2 − ṁt Cp3 T4 and

0 = ṁcw Cp1 T1 + ṁhw Cp2 T2 − ṁt Cp3 T5

(You can make appropriate assumptions for the CP values of the different
streams as before). Similar to mass balance closure errors, the LHS will not
be exactly zero.
(a) Plot the histograms of the two closure errors, and compute their
means and variances. (b) Which of the above energy balances gives the
most reasonable closure errors? Based on this which of T4 or T5 sensor is
likely to contain gross error?
[Note: In the energy balance equations, we have made simplifying as-
sumptions, such as no loss of energy to the surroundings, and ignored po-
tential energy, kinetic energy, and work done].
Answering the above problems:
For each of the above question, provide relevant plots with appropriate
labels (plots without labels will not get any credit), discuss the plots and
comment on the results. Also, try to be precise and technical when answering
these questions.

You might also like