Page 115 - Intelligent Digital Oil And Gas Fields
P. 115
Data Filtering and Conditioning 83
good value is held for a specific number of cycles. The test takes the current
value and a user-entered tolerance and window to check if the current
value has frozen and will set the output value according to the following
logic:
If FRZ_test ¼ off ,then skipthis test
“ ”
Þ > tolerance for timewindow ,then
Y tðÞ ¼ If ABS X tðÞ X t 1ð
ð error and set alarmÞ,elseX tðÞ and set alarmand counter ¼ 0:0
Þ elseY tðÞ ,and increment counter
Y tðÞ ¼ If Y tðÞ ¼ error,then Y t 1ð
If counter > user limit reset Y tðÞ ¼ error
3.2.1.4 Statistical Detection and Value Hold
This algorithm includes a test and a valid value setting procedure. This test is
used to detect a fast-cycle instrument drift. The first step is to calculate the sig-
nal’s mean and standard deviation (σ) over a time window in the past. The test
algorithmchecksifthecurrentsignalvalueexceedsthemean 3timesthestan-
darddeviation.Ifthetestpasses,thenthecurrentvalueispassedalong.Ifthetest
fails,thenthelastgoodvalueisheldforaspecificnumberofcycles.Thetesttakes
the current value and a user-entered window for statistical calculations. The
calculation logic for statistical process control (SPC):
If SPC_test ¼ off ,then skip this test
Mean X ¼ Mean x, time windowð Þ and σ x ¼ σ x, time , windowÞ
ð
Y ¼ If X > Mean x +3 σ x then error and set alarm,else x ,and set alarm ¼ 0:0
t ðÞ
t ðÞ
t ðÞ
Y ¼ If X < Mean x 3 σ x then error and set alarm,else x ,and set alarm ¼ 0:0
t ðÞ
t ðÞ
t ðÞ
Y ¼ If Y ¼ error,then Y else Y ,and increment counter
t ðÞ t ðÞ ð t 1Þ t ðÞ
If counter > user limit reset Y ¼ error
t ðÞ
3.2.1.5 Filtering
The data conditioning system uses a simple exponential moving average or
low-pass filter. The filter takes a filter constant, in time, the current data
reading, and the last filtered result to calculate the current filtered result
according to the following algorithm:
Þ + C f X and
Y tðÞ ¼ 1 C f Y t 1ð
C f ¼ 1 Exp ð t s =aÞ
where t s is the time window and a is the user entered filter time constant.
Other averaging schemes or filter transforms may be used by operators.