=Paper= {{Paper |id=Vol-1507/dx15paper19 |storemode=property |title=A SCADA Expansion for Leak Detection in a Pipeline |pdfUrl=https://ceur-ws.org/Vol-1507/dx15paper19.pdf |volume=Vol-1507 |dblpUrl=https://dblp.org/rec/conf/safeprocess/CarreraVC15 }} ==A SCADA Expansion for Leak Detection in a Pipeline== https://ceur-ws.org/Vol-1507/dx15paper19.pdf
                           Proceedings of the 26th International Workshop on Principles of Diagnosis




                       A SCADA Expansion for Leak Detection in a Pipeline∗

                           Rolando Carrera∗ Cristina Verde∗ and Raúl Cayetano∗∗
                       ∗
                         Universidad Nacional Autónoma de México, Instituto de Ingeniería
                                   e-mail: rcarrera@unam.mx, verde@unam.mx
                      ∗∗
                         Universidad Nacional Autónoma de México, Posgrado de Ingeniería
                                          email: rcayetanos@ii.unam.mx


                           Abstract                                 pattern recognition and analytical models for failure diagno-
                                                                    sis.
       A solution for expanding an already existing
       pipeline SCADA for real time leak detection is                  But all the later is pure academical, our aim here is
       presented. The work consisted in attaching a FDI             to share some of our practical experiences acquired dur-
       scheme to an industrial SCADA that regulates liq-            ing a re-engineering project that consisted on adding a real
       uid distribution from its source to end user. For            time leak detection and location layer to an already exist-
       isolation of the leak a lateral extraction is pro-           ing SCADA. The original objectives of that SCADA were
       posed instead of the traditional pressure profile of         the administration and delivery of some products, through
       the pipeline. Friction value is a function of pipe           pipelines, from the source to the end user. As it was our first
       physical parameters, but on line friction estima-            approach to integrating a FDI to an existing SCADA and
       tion achieved better results. Aspects that were im-          that we didn’t have experience on this subject, we proposed
       portant in the integration of the FDI scheme into            a solution that involves simple algorithms for detecting and
       the SCADA were the non synchrony of pipeline                 locating a leak. In future work we’ll use more elaborate
       variables (flow, pressure) and their accessibility,          algorithms as dedicated observers or detecting two simulta-
       that leaded to data extrapolation and the use of             neous leaks.
       data base techniques. Vulnerability of the loca-                In order to show how we solved the targets of the project
       tion algorithm due to sensors bandwidth and sen-             we divided the solution in five major parts (each one in-
       sitivity is showed, so the importance of selecting           cluded in sections 2 to 6 down here). Some of them are
       them. The FDI scheme was programmed in Lab-                  extracted from available theory, as the dynamical model for
       VIEW and executed in a personal computer.                    a flow in a pipe and the expression for leak location, and
                                                                    others are consequence of the experience achieved in our lab
                                                                    facilities, as the calculus of pipe friction and and the choice
1 Introduction                                                      of sensors, and finally the data acquisition imposed by the
                                                                    nature of the available SCADA.
Leak detection and isolation in pipelines is an old problem
that has attracted the attention of the scientific community           Delivering a fluid to clients means steady operation, then
since decades. A paradigmatic example is the oil leakage in         our solution required a suitable model for that condition,
the Siberian region [1], where the effects on the surrounding       section two describes how to achieve a simple steady state
nature have been disastrous. In Mexico, a semi desert coun-         model for a pipeline. Once the model is at hand an appro-
try, there is the need to transport water to the population on      priate expression for leak location is needed, for that pur-
long distances via aqueducts; this requires complex supervi-        pose in section three a simple method for locating a leak is
sion systems that detect leakages in early ways. Also, there        presented. From our experience, pipe friction plays a fun-
exist a complex net of pipelines that transport oil and its         damental role in the exact location of the leak and that real
by-products; in this net, besides the leakage problem, there        time estimated friction is better than a beforehand constant
exist also the illegal extraction of the product transported in     one; an on-line expression for calculating the pipeline fric-
the pipeline; this forces that the distribution system should       tion is showed in section four. In this project we didn’t have
have a leak detection and location monitoring system.               the option to choose sensors, but we consider appropriate to
   Since the 1970’s years have been issued several works            share here our experience in this matter, a comparative study
that have been fundamental for the detection and location           on how different type of sensors affect the leak location is
of leakages as the one of Siebert [2], where on the basis           presented in section five. The data acquisition system of
of the steady state pressure profile along the pipeline sim-        the SCADA is based on a MODBUS system and a database
ple expressions are derived, based on correlations,that detect      with the information of the pipe variables, we didn’t have
and locate a leakage. Later Isermann [3] published a survey         the right to get into the MODBUS but in the database, sec-
showing the state of the art on fault detection by using the        tion six shows how the indirect measurement of pipe vari-
plant model and parameter identification. Recently, Verde           ables issue was solved by using ethernet and data bases,
published a book [4] making emphasis on signal processing,          also, the extrapolation of data of non existing data during
                                                                    sample times is presented. Finally, the concluding remarks
   ∗
       Supported by II-UNAM and IT100414-DGAPA-UNAM.                of this work are presented in section seven.




                                                              145
                                                            Proceedings of the 26th International Workshop on Principles of Diagnosis


2 Pipeline steady state model                                                                                   with
In most applications a dynamical model of the system is re-                                                      M i (Qi ) = µi Qi |Qi | + sin(αi ) = mi (Qi ) + sin(αi ) (5)
quired but not here because of the steady operation of the
pipeline, then a steady state model is more suitable. Be-                                                       that is independent of the spacial coordinate z i , and µi :=
sides, the pipeline lies buried in the field and has an irregular                                               f i /2Di (Ai )2 g. Then the solution of (4) reduces to
topography, but it is possible to derive a model that handles
it like a horizontal one. This model is simpler as will be                                                        H i (z i ) = −M i (Qi )z i + H i (0)        for 0 ≤ z i ≤ Li (6)
showed.                                                                                                         with H i (0) the pressure head at the beginning of section
   In the following we modify the model of a pipeline with                                                      i. Defining boundary conditions for section i in terms of
topographical profile as showed in Figure 1 into one with a                                                     pressure at the ends:
right profile piezometric head, where the pressure variable
depends on a reference value h, as is the hight over sea level                                                         H i (z i = 0) := Hin
                                                                                                                                         i
                                                                                                                                                      H i (z i = Li ) := Hout
                                                                                                                                                                          i
                                                                                                                                                                              .    (7)
along the pipeline. Consider the one dimension simplified
                                                                                                                with (7) in (6), we obtain
flow model in a pipeline with n sections [5],
                                                                                                                     i     i
                                                    1 ∂Qi (z i , t)    ∂H i (z i , t)                               Hin − Hout = M i (Qi )Li = mi (Qi )Li + ∆Hi ,                  (8)
                                                                    +g
                                                   A  i    ∂t              ∂z i
                                                                                                        (1)     where ∆Hi = L sin(α ) is the height difference between
                                                                                                                                   i        i
                                                i i       i i
                                             f Q (z , t)|Q (z , t)|                                             section ends.
                                           +                        + g sin αi = 0                                It is reported in [7] and [8] that the pressure head
                                                  2Di (Ai )2
             ∂H i (z i , t)    b2 ∂Qi (z i , t)                                                                                                       P i (z i )
                            +                   =0          (2)                                                                        H i (z i ) =                                (9)
                   ∂t         gAi      ∂z i                                                                                                             ρg
which assumes that fluid is slightly compressible, pipe walls
are slightly deformable and negligible convective changes                                                       can be written in terms of the piezometric head H̃ i (z i ), wich
in velocity. Q is volumetric flow, H is pressure head, A                                                        depends on a heigth h that can be related to sea level, i.e.
is pipe cross-sectional area, g is gravity, f 1 is the D’Arcy-                                                                    H̃ i (z i ) = H i (z i ) + h(z i ),             (10)
Weissbach friction [6], b is the velocity of pressure wave,D
is pipe diameter, z is distance variable and t the time. Super                                                  h(z i ) in m over reference datum or sea level, ρ is fluid den-
index i = 1, 2, ..., n indicates pipeline section characterized                                                 sity. Then the profile pressure (8) is equivalent to
by its slop with angle αi , n is the total number of sections.                                                                      i      i
                                                                                                                                  H̃in − H̃out = mi (Qi )Li                       (11)
                                   2340
                                                                                                                for section i and sea level h(z i ) along the section. Finally,
                                   2320
                                                     Sensors locations                                          considering that boundary conditions are related by
       Heigth over sea level [m]




                                                                                                                                           i       i+1
                                   2300                                                                                                  H̃out = H̃in  ,                          (12)
                                   2280                                                                         from this equation and (11) one gets
                                                                                                                                                    n
                                                                                                                                                    ∑
                                   2260                                                                                           1      n
                                                                                                                                H̃in − H̃out =              Li mi (Qi )           (13)
                                   2240                                                                                                               i=1

                                   2220                                                                         which is function of the piezometric head for a pipeline with
                                                                                                                n sections without branches.
                                   2200
                                       0          1          2        3        4         5          6              The profile of Figure 1 corresponds to the topography of
                                                                  Length [m]                    4
                                                                                             x 10               the pipeline under study. The pressure head H(z) and the
                                                                                                                resulting piezometric head H̃(z) are shown in Figures 2 and
                                   Figure 1: 60 km Pipeline topographical layout                                3, respectively. Take into account the uniformity of H̃(z)
                                                                                                                similar to the one of a horizontal pipeline. The reference
   We start with the following hypothesis: the system works                                                     datum was the height of the first sensors location.
in steady state and that the pipeline lay on an horizontal sur-                                                    As a consequence, if H̃in1
                                                                                                                                              = H̃in and H̃out
                                                                                                                                                             n
                                                                                                                                                                 = H̃out , be-
face. Therefore we need a steady state model that takes into                                                    sides if m (Q ) = m(Q) = M (Q) for all i, then Equation
                                                                                                                           i  i

account these conditions.                                                                                       (13) becomes
   In order to describe the behaviour of the pressure head
H i (z i , t) along a section without branches it is assumed                                                                       H̃in − H̃(z) = LM (Q)                          (14)
steady state flow, so from (2) one gets                                                                                      ∑n
                                                                                                                where L = i=1 Li the total length of the pipeline. Equa-
           ∂Q (z , t)                            i     i                                                        tion (14) is the steady state piezometric model for the
                      =0                                                 ⇒ Qi constant                  (3)     pipeline viewed as a horizontal one.
               ∂z i
Combining (1) and (2)
                                                                                                                3 Leak location
                                                  dH i (z i )
                                                              + M i (Qi ) = 0,                          (4)     We consider a leakage as an outlet pipe at the leak location
                                                    dz i                                                        as is shown in Figure 4. A branch or lateral pipe in sec-
   1
     This friction characterizes the shear stress exerted by the con-                                           tion i breaks the continuity of variables Q(z, t) and H(z, t),
duit walls on the flowing fluid.                                                                                therefore new boundary conditions must be satisfied [9]. In




                                                                                                          146
                                                  Proceedings of the 26th International Workshop on Principles of Diagnosis


                        1000                                                                     H1 = H2 = H3 . Thereafter in the study was included only
                                                                                                 the balance
                        950                                                                                      Q1 − Q2 − Q3 = 0,                   (17)
                                                                                                 as consequence,
    Pressure head [m]




                        900
                                                                                                                   Q1 = Qin ,        Q3 = Qout             (18)

                        850
                                                                                                 with Qin y Qout flows at the ends of the pipeline. So the
                                                                                                 differential equation (4) transforms in two equations
                        800                                                                          dH 1 (z)
                                                                                                              − M (Q1 )       = 0;     for 0 ≤ z ≤ zb
                                                                                                       dz
                        750
                                                                                                                                                          (19)
                           0             1        2       3         4      5           6              dH 3 (z)
                                                      Length [m]
                                                                                x 10
                                                                                       4
                                                                                                                − M (Q3 ) = 0; for zb < z ≤ L,
                                                                                                         dz
                         Figure 2: Pipeline pressure head profile H(z)                           describing the pressure head along the section with a branch
                                                                                                 in point zb . As the equations (19) have the same form as (4),
                                                                                                 their solutions also have the same as (6). Therefore, with
                        980
                                                                                                 boundary conditions:
                        960
                                                                                                   1. H 1 (z = 0) = Hin ,
                        940
                                                                                                   2. H 3 (z = L) = Hout ,
     Piezometric head




                        920                                                                        3. Qin = Qout + Qzb and
                        900                                                                        4. Hzb − ϵ = Hzb + ϵ with ϵ → 0
                        880                                                                      Assuming that all pipes have same diameters, solutions of
                                                                                                 (19) evaluated at the ends are reduced to
                        860
                                                                                                                  Hin − Hzb
                        840                                                                                                 − M (Qin ) = 0
                                                                                                                      zb
                        820
                           0            1         2       3         4     5            6                                                                   (20)
                                                      Length [m]                   4
                                                                                x 10                             Hzb − Hout
                                                                                                                            − M (Qout ) = 0.
                                                                                                                   L − zb
                        Figure 3: Profile of the piezometric head H̃(z)
                                                                                                 Obtaining the variable zb associated to the position of the
                                                                                                 branch
particular, the union of three pipes is associated to a geome-                                                    M (Qout )Li + Hout − Hin
try shown in Figure 4 and the corresponding conditions that                                            zb   =
                                                                                                                     M (Qout ) − M (Qin )
describe the action of separating flow are reduced to
                                                                                                                  L sin α + m(Qout )L + Hout − Hin
                                        H2    = H1 + κ12 (H2 , H1 )                    (15)                 =                                      , (21)
                                                                                                                          m(Qout ) − m(Qin )
                                        H3    = H1 + κ13 (H3 , H1 )                    (16)
                                                                                                 in terms of the piezometric head
where H2 and H3 are pressures at the beginning of pipes
2 and 3 and the functions κ1η (·, ·) with η = 2, 3 repre-                                                              m(Qout )L + H̃out − H̃in
                                                                                                                zb =                            .          (22)
sent losses caused by friction and change of flow direc-                                                                 m(Qout ) − m(Qin )
tion. For adjusting the order of magnitude of these func-
tions flow simulations were held with Pipelinestudio [10]                                           Equation (22) is the key for leak isolation. In order to see
with the topology of the study case shown in Figure 1. Sim-                                      the performance of this leak location method some experi-
ulation reported that terms κ12 and κ13 were negligible, then                                    ments were held in our pipe prototype [11], which is an iron
                                                                                                 pipe of 200 m long, 4 inches diameter and six valves at-
                                                                                                 tached to it for leak simulations. Table 1 shows the percent
                                                                                                 deviations of locating the leak position. In each experiment
                                                                                                 a valve was fully open. Coriolis sensors were used.
                                                               ࡽ૛
                                                                                                 4 Pipeline friction
                               ‹’‡ͳ                ࡴ૛                 ‹’‡͵
                                                                                                 The D’Arcy-Weissbach friction is a function of the pipe
                                                                                                 parameters, [6] and [12], and operation conditions, as the
                              ࡽ૚             ࡴ૚                                                  Reynolds number. For practical purposes the friction f is
                                                        ࡴ૜          ࡽ૜
                                                                                                 obtained from tables provided by the pipe manufacturers.
                                                                                                 But we observed that that value differs from the real one of a
                                   ࢠ࢈                        ࡸ െ ࢠ࢈                              working pipeline where, no matter that is working in steady
   ࢠൌ૙                                                                         ࢠൌࡸ
                                                                                                 state, the value is influenced by noise -caused by pipe in-
                                                                                                 ner surface imperfections and attachments (nipples, elbows,
Figure 4: Union of three branches in point zb of pipeline                                        etc.)-, therefore using a previous fixed value of f is of no
with transversal section areas A1 , A2 and A3                                                    use in Equation (1).




                                                                                           147
                                   Proceedings of the 26th International Workshop on Principles of Diagnosis


                                                                              ods are based on processing a residual that is a flow differ-
 Table 1: Location error in percentage of total pipe length                   ence. Due to our lack of experience, and by suggestion of
       Experiment ∆zb [%] Valve position [m]                                  a supplier, we start our flow measurements with a paddle
            1          1.66             11.54                                 wheel flow sensor [13]. Later on, as ultrasonic sensors are
            2          2.93             49.83                                 widely used in the field, we decide to change to them [14],
            3          0.135            80.36                                 thinking that our measurements would be better. Finally,
            4          0.54            118.37                                 we reached the conclusion that success on leak detection
            5          0.375           148.93                                 and location depends strongly on the sensors quality (make
            6          3.42            186.95                                 and sensing principle), so we acquired sensors based on the
          Mean          1.0                                                   Coriolis effect [15].
                                                                                 An experiment that we made in our pipe prototype was
                                                                              to cause a leakage (outflow in a extraction point) and esti-
   To overcome the problem of not having the friction right                   mate the location with the measurements of the three sen-
value, we proposed a solution that was an on line friction                    sors. Figure 6 shows the deviation of the calculated location
estimation. In the following we show how to calculate this                    depending on the type of sensor. Oscillations are observed
friction. For that, we part from the steady state momentum                    around the operating point, which leads to the necessity of
equation, Equation (4). Turning back the original parame-                     signal filtering in the diagnosis process. Table 2 shows the
ters we get                                                                   error leak location, Paddle Wheel and Coriolis sensors have
                                                                              similar error, but standard deviation is bigger with the Pad-
               dH         f                                                   dle Wheel. In order to compare performance in the fourth
                    +  g      Q |Q| + gsinα = 0          (23)
               dz     2DA2                                                    column the accuracy of the instruments are presented; re-
   solving the integral, considering that H0 and HL are pres-                 mark that Coriolis error standard deviation is about seventy
sures at he beginning and at the end of the pipeline and L                    times bigger than sensor accuracy. The observation here is
the length, results                                                           that the quality of the results depends more on the behavior
                                                                              of the flow than on the accuracy of the instrument used.
                               f
                  g(HL − H0 ) = −( Q2 + gsinα)L       (24)                                                   Leak location (Real position= 49.8 m)
                            2DA2 ∞                                                                60
   where Q∞ is volumetric flow in steady state, the abso-
lute term disappears when flow goes in one direction only.                                        50

Friction has the following expression                                                             40
                                                                                                                                           Coriolis
                                                                                  Location [m]




                               2                                                                                                           Paddle wheel
                  2DA g (H0 − HL − Lsinα)                                                         30
             f=                                           (25)                                                                             Ultrasonic
                      L            Q2∞
                                                                                                  20
   Equation (25) is used to calculate on line the friction
value, as is shown in Figure 5, experiment realized in our                                        10
pipeline prototype. The calculated friction has a consider-
                                                                                                   0
able amount of noise, but this noise can be attenuated via
weighted mean value with forgetting factor (MVFF, contin-                                        −10
                                                                                                    0     1000   2000   3000   4000      5000    6000     7000
uous line in figure). Actually, we are working on the use of                                                              Samples
recursive identification procedures for a better friction esti-
mated.                                                                                            Figure 6: Leak location with the three sensors
               0.026
                                                          Unfiltered
                                                          MVFF
                                                                                                          Table 2: Leak location errors
               0.025
                                                                                                 Sensor          Error Error STD Accuracy
                                                                                                                 [%]        [%]         [% FS]
                                                                                                 Paddle wheel -0.28         3.36         0.50
    Friction




               0.024
                                                                                                 Ultrasonic      2.12       1.39         2.00
                                                                                                 Coriolis        0.28       0.84         0.05
               0.023


                                                                                 One of our goals in the SCADA expansion project was to
               0.022
                                                                              deliver results in real time. For this, sensors experiments
                   0        100           200       300           400         were performed to determine which one would have the
                                        Samples                               faster response. An index to take into account is the time
                                                                              response, it can be appreciated in Figure 6 but is practically
                Figure 5: Friction estimated, raw and filtered                the same, therefore we measured the settling time from the
                                                                              moment when the leakage valve is opened. In Figures 7,
                                                                              8 and 9 the flow development is observed, dotted line indi-
                                                                              cates the time when the leakage valve is opened to 100%. In
5 Influence of sensors on location                                            Table 3 are the measured times, being the ultrasonic sensor
Flow measurement in a pipeline is fundamental for leak lo-                    which requires more time (this by the number of points used
cation, in view that most of the pipeline leak detection meth-                to calculate a mean value).




                                                                        148
                                             Proceedings of the 26th International Workshop on Principles of Diagnosis


                                                                                                Considering the settling time and noise in measurements
                             Table 3: Sensors settling time                                  (taking the STD as the measure for that), Coriolis sensor has
                                 Sensor           ts [s]                                     the best performance. Experiments showed in this section
                                 Paddle wheel        3                                       were made with 1 s sampling period.
                                 Ultrasonic         35
                                 Coriolis            4                                       6 Asynchronous data and data bases
                                                                                             In the academy, we are used to work with benchmark sys-
                                                                                             tems or laboratory facilities with ad hoc data acquisition
                                                                                             systems, sufficient sensors, controlled environments, etc.
                21
                                                                                Qe           But these conditions are not necessarily in the practice, as
                                                                                Qs           was the case of the SCADA expansion, where the access
                20
                                                                                             to flow and pressure sensors of the pipeline were not avail-
                                                                                             able, but through a database. So the solution adopted was as
                19
                                                                                             follows:
   Flow [L/s]




                18                                                                             1. The leak locator is on a dedicated computer, indepen-
                                                                                                   dent of the system that regulates de distribution of the
                17                                                                                 fluid, it connects to the database server, see Figure 10,
                                                                                                   via intranet or VPN (Virtual Private Network) connec-
                16                                                                                 tion in a LAN (Local Area Network) system.
                                                                                               2. With proper permission a program, task performed
                        leak start


                15
                 20     40             60    80      100     120    140   160    180               with Visual Studio 2010 tool that runs every minute
                                                  Time [min]                                       (it is a program without GUI -Graphic User Interfacer-
                                                                                                   that runs silently), brings system data and creates a
Figure 7: Flow measurement at the pipe ends, paddle wheel                                          database with pipeline flow and pressure information,
sensors                                                                                            data required by the locator for proper operation.
                                                                                               3. The locator program (made in the LabVIEW plat-
                                                                                                   form, [16]) periodically takes data (through SQL data
                 19
                                                                                Qe                 server of Microsoft), applies the detection algorithm
                                                                                Qs                 and when detects a leak proceeds to locate it, displays
                18.5                                                                               on the screen the location of the leak (Figures 12 and
                                                                                                   13), generates a visual warning and creates a file with
                 18                                                                                data leakage.
   Flow [l/s]




                17.5


                 17

                         leak start

                16.5
                   20     40            60    80      100     120   140   160    180
                                                   Time [min]


Figure 8: Flow measurement at the pipe ends, ultrasonic
sensors
                                                                                             Figure 10: Communication scheme between leak locator
                                                                                             and database
                19.5
                                                                                Qe              But the data acquisition system of SCADA do not meet
                 19
                                                                                Qs           the condition of sampling the system variables with con-
                                                                                             stant sampling period. The nominal sampling period was
                18.5                                                                         3 min, but in reality this varies from one to several tens of
                                                                                             minutes. On the other hand, the locator was assigned a sam-
   Flow [l/s]




                 18
                                                                                             pling period of 3 min, determined by the condition that nom-
                17.5                                                                         inally SCADA performs a polling of all measuring stations
                                                                                             in that time span. To solve the problem of having a value
                 17                                                                          of flow and pressure of each station at all sampling time, it
                                                                                             was added to the localizer an algorithm that extrapolates the
                16.5
                          leak start
                                                                                             missing data when it is not available. Two algorithms were
                 16                                                                          tested, one that retains the last data in the following sam-
                  20       40           60    80      100     120   140   160    180
                                                   Time [min]                                pling periods and one that generates straight line with the
                                                                                             last two values available, that when the value of the variable
Figure 9: Flow measurement at the pipe ends, Coriolis sen-                                   that is brought from the database is not a new one, then the
sors                                                                                         one determined by straight line is used. In order to compare
                                                                                             results with both proposals a simulation with real data with




                                                                                       149
                                   Proceedings of the 26th International Workshop on Principles of Diagnosis


three leaks was carried on, in Figure 11 the real and extrapo-                  It connects to the database in the SCADA through TCP
lated input flow data are shown. It can be seen that at certain                 sockets and VPN.
intervals the extrapolation by a straight line delivers values
that may be beyond the normal range of measurements, this
situation is exacerbated in large intervals with empty data as
the line grows monotonically delivering data outside the re-
gion of validity. In Figure 12 the location of a leak is shown
when extrapolated data are used and in Figure 13 when re-
tained data are used. The pipe length is about 20 km, so
that retention has outperformed extrapolation, since the lat-
ter yields higher values than the length of the pipe. Original
leak location was about 10 km.

                   17.5                                   Extrapolation
                                                          Retained
                                                          Real
                    17
   Flow [m3/min]




                   16.5



                    16                                                           Figure 14: Communications between client and database


                   15.5
                                                                                   For data handling JSON format is used, which is broadly
                       0      50        100
                                        Time [min]
                                                   150       200                used for information interchange trough internet. JSON
                                                                                (Java Script Object Notation) is a data interchange text for-
                                                                                mat, easy for humans to read and write [17]. JSON is a
Figure 11: Graphics with original, extrapolated and retained                    collection of pairs {variable name : value}, realized as an
data of input flow with three leaks                                             object, record, structure, dictionary, hash table, keyed list,
                                                                                or associated array, see in Figure 15 an object example.




             Figure 12: Leaks location with extrapolated data                            Figure 15: JSON data format for an object

                                                                                   An example of a JSON string for reporting a leak is the
                                                                                following:
                                                                                {"service":"event",
                                                                                "options": {
                                                                                  "action":"new",
                                                                                  "vector": {
                                                                                     "Module":XXX,
                    Figure 13: Leaks location with retained data                     "EventID":XXX,
                                                                                     "Quantity":XXX,
6.1 Alternate database communication                                                 "PipeID":XXX,
                                                                                     "Location":XXX,
As part of the project requirements, an alternate way of com-                        "TimeEvent":"yyyymmddhhmmss"}
munication with the SCADA database was experimented. In                         }}
previous section the communication between leak locator
and database was direct trough a LAN system, the alternate                         Communications broker attends clients requests (leaks lo-
way was through a third party via internet and VPN connec-                      cator is not the only one) and also SCADA requests. The
tion. Figure 14 shows the principal elements of this scheme.                    database attached to the broker contains not only pipeline
   The client is the computer with the locator program build                    data but also data generated by the other clients. At the end,
in LabVIEW platform that performs basically two activities:                     the SCADA has an interface in which information of leak-
leak detection and location, and request and sending data                       age events is displayed.
to communications broker using JSON strings. The remote                            Figure 16 shows a test ran with real data but off line. That
client interface is a Java process that runs locally and han-                   experience showed that locator not always received answers
dles communication, authentication, data formatting, en-                        from the broker. But this communications scheme is still in
cryption and security of the communication with data server.                    development.




                                                                          150
                        Proceedings of the 26th International Workshop on Principles of Diagnosis


                                                                    References
                                                                    [1] I. Bazilescu and B. Lyhus.            Russia oil spill.
                                                                         http://www1.american.edu/ted/KOMI.HTM, 1994.
                                                                    [2] H. Siebert and R. Isermann. Leckerkennung und -
                                                                         lokalisierung bei pipelines durch on-line-korrelation
                                                                         mit einem prozessrechner. Regelugnstechnik, 25:69–
                                                                         74, 1977.
                                                                    [3] R. Isermann. Process fault detection based on mod-
                                                                         eling and estimation methods - a survey. Automatica,
Figure 16: Off line experiment with real data. Detail of the             20(4):387–404, July 1984.
graph, y axis is leak location in km                                [4] C. Verde, S. Gentil, and R. Morales. Monitoreo y di-
                                                                         agnóstico automático de fallas en sistemas diámicos.
                                                                         Trillas, 2013.
7 Conclusions
                                                                    [5] M. Hanif Chaudhry. Applied Hydraulic Transients.
An interesting result is that a pipeline with certain topog-             Springer, third edition, 2014.
raphy may be analyzed as an horizontal pipe in which the            [6] C. F. Colebrook and C. M. White. Experiments with
piezometric head is a sum of measurements and terrain                    fluid friction in roughened pipes. Proceedings of the
heights, Equation (10), as seen in section 2.                            Royal Society of London, 1937.
   Compared with traditional methods for locating a leak in
                                                                    [7] J. Saldarriaga. Hidráulica de acueductos. Mc Graw-
a pipe, the method shown here, Equation (22), requires less
computational effort and has a simple expression for calcu-              Hill, 2003.
lating it.                                                          [8] R. Bansal. Fluid mechanics and hydraulic machines.
   Another relevant result is the expression for on line calcu-          Laxmi Publications (P) LTD, 2005.
lation of the pipeline friction, Equation (25), as it is enough     [9] Oke A. Mahgerefteh, H. and O. Atti. Modelling out-
to measure pressure at the ends and steady state flow. The               flow following rupture in pipeline networks. Chemical
value of friction was found to be a key parameter for the                Engineering Science, (61):1811–1818, 2006.
exact location of the leak. It is to remark that when a leak
                                                                    [10] PipelineStudio. Software in energy solutions interna-
occurs the pressures change modifying the friction value; in
order to avoid wrong location of the leak we keep a delayed              tional. http://www.energy-solutions.com/, 2010.
value of friction that is frozen when leak alarm occurs.            [11] R. Carrera and C. Verde. Prototype for leak detection
   On the other hand, is to highlight the importance of                  in pipelines: Users Manual. Instituto de Ingeniería,
choosing the appropriate sensor. It is not enough to choose              UNAM, Ciudad Universitaria, D.F., Noviembre 2010.
a sensor capable of measuring a certain physical variable,               In Spanish.
also must be included in the selection process the purpose          [12] C. Tzimopoulos G. Papaevangelou, C. Evangelides.
for which the measurements are needed.                                   A new explicit relation for the friction coefficient in
   The world of measurements for control targets is not lim-             the darcy-weisbach equation. In PRE10: Protection
ited to direct measurement of the physical variable, it is               and Restoration of the Environment, Corfu, 05-09 July,
possible to achieve the control objectives with indirect mea-            2010, 2010.
surements, as was the case of reading the variables from the        [13] G. Fisher. Signet 2540 high performance flow sensor.
plant via the network to a database. Also, with the partial              Georg Fisher Signet LLC, El Monte, CA, 2004.
absence of data we cannot use the plant model to predict
data, then the use of extrapolation methods proves to be a          [14] Panametrics. Two-Channel TransPort Mod. 2PT868
powerful tool that helped to achieve the goal of this project;           Portable Flowmeter. User’s Manual. PANAMET-
in this paper we use two simple methods, but this is an area             RICS, Inc., Waltham, MA, USA, 1997.
that we continue to explore.                                        [15] E+H. Proline Promass 83 Operating Instructions. En-
   The experience with JSON format strings showed that it                dress + Hauser Flowtec, Greenwood, IN, USA, 2010.
is easier to work with text characters than with specialized        [16] National Instruments. LabVIEW user manual. Na-
database commands and, no matter the VPN connection and                  tional Instruments Corporation, Austin, 2013.
data encryption, the scheme depends strongly on internet
conditions. If internet fails leak detection scheme fails, sit-     [17] JSON Organization. Ecma-404 the json data inter-
uation that scarcely appears when the locator connects with              change standard. http://www.json.org/.
database through a LAN system.
   To the moment this paper was written our FDI system
is in the proof stage at the SCADA facilities and we are
waiting for in the field results.

8 Acknowledgments
Authors are very thankful to Jonathán Velázquez who
helped us by solving the database issues emerged in this
project.




                                                              151
Proceedings of the 26th International Workshop on Principles of Diagnosis




                                  152