<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">A SCADA Expansion for Leak Detection in a Pipeline *</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Rolando</forename><surname>Carrera</surname></persName>
							<email>rcarrera@unam.mx</email>
							<affiliation key="aff0">
								<orgName type="department">Instituto de Ingeniería</orgName>
								<orgName type="institution">Universidad Nacional Autónoma de México</orgName>
							</affiliation>
							<affiliation key="aff1">
								<orgName type="department">Posgrado de Ingeniería</orgName>
								<orgName type="institution">Universidad Nacional Autónoma de México</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Cristina</forename><surname>Verde</surname></persName>
							<email>verde@unam.mx</email>
							<affiliation key="aff0">
								<orgName type="department">Instituto de Ingeniería</orgName>
								<orgName type="institution">Universidad Nacional Autónoma de México</orgName>
							</affiliation>
							<affiliation key="aff1">
								<orgName type="department">Posgrado de Ingeniería</orgName>
								<orgName type="institution">Universidad Nacional Autónoma de México</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Raúl</forename><surname>Cayetano</surname></persName>
							<email>rcayetanos@ii.unam.mx</email>
							<affiliation key="aff0">
								<orgName type="department">Instituto de Ingeniería</orgName>
								<orgName type="institution">Universidad Nacional Autónoma de México</orgName>
							</affiliation>
							<affiliation key="aff1">
								<orgName type="department">Posgrado de Ingeniería</orgName>
								<orgName type="institution">Universidad Nacional Autónoma de México</orgName>
							</affiliation>
						</author>
						<title level="a" type="main">A SCADA Expansion for Leak Detection in a Pipeline *</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">3C5FA9FDA2BE06F79D5486FF073705D3</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-19T15:59+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>A solution for expanding an already existing pipeline SCADA for real time leak detection is presented. The work consisted in attaching a FDI scheme to an industrial SCADA that regulates liquid distribution from its source to end user. For isolation of the leak a lateral extraction is proposed instead of the traditional pressure profile of the pipeline. Friction value is a function of pipe physical parameters, but on line friction estimation achieved better results. Aspects that were important in the integration of the FDI scheme into the SCADA were the non synchrony of pipeline variables (flow, pressure) and their accessibility, that leaded to data extrapolation and the use of data base techniques. Vulnerability of the location algorithm due to sensors bandwidth and sensitivity is showed, so the importance of selecting them. The FDI scheme was programmed in Lab-VIEW and executed in a personal computer.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Leak detection and isolation in pipelines is an old problem that has attracted the attention of the scientific community since decades. A paradigmatic example is the oil leakage in the Siberian region <ref type="bibr" target="#b0">[1]</ref>, where the effects on the surrounding nature have been disastrous. In Mexico, a semi desert country, there is the need to transport water to the population on long distances via aqueducts; this requires complex supervision systems that detect leakages in early ways. Also, there exist a complex net of pipelines that transport oil and its by-products; in this net, besides the leakage problem, there exist also the illegal extraction of the product transported in the pipeline; this forces that the distribution system should have a leak detection and location monitoring system.</p><p>Since the 1970's years have been issued several works that have been fundamental for the detection and location of leakages as the one of Siebert <ref type="bibr" target="#b1">[2]</ref>, where on the basis of the steady state pressure profile along the pipeline simple expressions are derived, based on correlations,that detect and locate a leakage. Later Isermann <ref type="bibr" target="#b2">[3]</ref> published a survey showing the state of the art on fault detection by using the plant model and parameter identification. Recently, Verde published a book <ref type="bibr" target="#b3">[4]</ref> making emphasis on signal processing, But all the later is pure academical, our aim here is to share some of our practical experiences acquired during a re-engineering project that consisted on adding a real time leak detection and location layer to an already existing SCADA. The original objectives of that SCADA were the administration and delivery of some products, through pipelines, from the source to the end user. As it was our first approach to integrating a FDI to an existing SCADA and that we didn't have experience on this subject, we proposed a solution that involves simple algorithms for detecting and locating a leak. In future work we'll use more elaborate algorithms as dedicated observers or detecting two simultaneous leaks.</p><p>In order to show how we solved the targets of the project we divided the solution in five major parts (each one included in sections 2 to 6 down here). Some of them are extracted from available theory, as the dynamical model for 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 of sensors, and finally the data acquisition imposed by the nature of the available SCADA.</p><p>Delivering a fluid to clients means steady operation, then our solution required a suitable model for that condition, section two describes how to achieve a simple steady state model for a pipeline. Once the model is at hand an appropriate expression for leak location is needed, for that purpose in section three a simple method for locating a leak is presented. From our experience, pipe friction plays a fundamental role in the exact location of the leak and that real time estimated friction is better than a beforehand constant one; an on-line expression for calculating the pipeline friction is showed in section four. In this project we didn't have the option to choose sensors, but we consider appropriate to share here our experience in this matter, a comparative study on how different type of sensors affect the leak location is presented in section five. The data acquisition system of the SCADA is based on a MODBUS system and a database with the information of the pipe variables, we didn't have the right to get into the MODBUS but in the database, section six shows how the indirect measurement of pipe variables issue was solved by using ethernet and data bases, also, the extrapolation of data of non existing data during sample times is presented. Finally, the concluding remarks of this work are presented in section seven.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Pipeline steady state model</head><p>In most applications a dynamical model of the system is required but not here because of the steady operation of the pipeline, then a steady state model is more suitable. Besides, the pipeline lies buried in the field and has an irregular topography, but it is possible to derive a model that handles it like a horizontal one. This model is simpler as will be showed.</p><p>In the following we modify the model of a pipeline with topographical profile as showed in Figure <ref type="figure" target="#fig_1">1</ref> into one with a right profile piezometric head, where the pressure variable depends on a reference value h, as is the hight over sea level along the pipeline. Consider the one dimension simplified flow model in a pipeline with n sections <ref type="bibr" target="#b4">[5]</ref>,</p><formula xml:id="formula_0">1 A i ∂Q i (z i , t) ∂t + g ∂H i (z i , t) ∂z i + f Q i (z i , t)|Q i (z i , t)| 2D i (A i ) 2 + g sin α i = 0<label>(1)</label></formula><formula xml:id="formula_1">∂H i (z i , t) ∂t + b 2 gA i ∂Q i (z i , t) ∂z i = 0<label>(2)</label></formula><p>which assumes that fluid is slightly compressible, pipe walls are slightly deformable and negligible convective changes in velocity. Q is volumetric flow, H is pressure head, A is pipe cross-sectional area, g is gravity, f<ref type="foot" target="#foot_1">1</ref> is the D'Arcy-Weissbach friction <ref type="bibr" target="#b5">[6]</ref>, b is the velocity of pressure wave,D is pipe diameter, z is distance variable and t the time. Super index i = 1, 2, ..., n indicates pipeline section characterized by its slop with angle α i , n is the total number of sections.  We start with the following hypothesis: the system works in steady state and that the pipeline lay on an horizontal surface. Therefore we need a steady state model that takes into account these conditions.</p><p>In order to describe the behaviour of the pressure head H i (z i , t) along a section without branches it is assumed steady state flow, so from (2) one gets</p><formula xml:id="formula_2">∂Q i (z i , t) ∂z i = 0 ⇒ Q i constant<label>(3)</label></formula><p>Combining ( <ref type="formula" target="#formula_0">1</ref>) and (2)</p><formula xml:id="formula_3">dH i (z i ) dz i + M i (Q i ) = 0,<label>(4)</label></formula><p>with</p><formula xml:id="formula_4">M i (Q i ) = µ i Q i |Q i | + sin(α i ) = m i (Q i ) + sin(α i ) (5)</formula><p>that is independent of the spacial coordinate z i , and µ i := f i /2D i (A i ) 2 g. Then the solution of (4) reduces to</p><formula xml:id="formula_5">H i (z i ) = −M i (Q i )z i + H i (0) for 0 ≤ z i ≤ L i (6)</formula><p>with H i (0) the pressure head at the beginning of section i. Defining boundary conditions for section i in terms of pressure at the ends: <ref type="formula">7</ref>) with ( <ref type="formula">7</ref>) in <ref type="bibr" target="#b5">(6)</ref>, we obtain</p><formula xml:id="formula_6">H i (z i = 0) := H i in H i (z i = L i ) := H i out . (</formula><formula xml:id="formula_7">H i in − H i out = M i (Q i )L i = m i (Q i )L i + ∆H i ,<label>(8)</label></formula><p>where</p><formula xml:id="formula_8">∆H i = L i sin(α i ) is the height difference between section ends.</formula><p>It is reported in <ref type="bibr" target="#b6">[7]</ref> and <ref type="bibr" target="#b7">[8]</ref> that the pressure head</p><formula xml:id="formula_9">H i (z i ) = P i (z i ) ρg<label>(9)</label></formula><p>can be written in terms of the piezometric head Hi (z i ), wich depends on a heigth h that can be related to sea level, i.e.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Hi (z</head><formula xml:id="formula_10">i ) = H i (z i ) + h(z i ),<label>(10)</label></formula><p>h(z i ) in m over reference datum or sea level, ρ is fluid density. Then the profile pressure ( <ref type="formula" target="#formula_7">8</ref>) is equivalent to</p><formula xml:id="formula_11">Hi in − Hi out = m i (Q i )L i<label>(11)</label></formula><p>for section i and sea level h(z i ) along the section. Finally, considering that boundary conditions are related by</p><formula xml:id="formula_12">Hi out = Hi+1 in ,<label>(12)</label></formula><p>from this equation and ( <ref type="formula" target="#formula_11">11</ref>) one gets</p><formula xml:id="formula_13">H1 in − Hn out = n ∑ i=1 L i m i (Q i )<label>(13)</label></formula><p>which is function of the piezometric head for a pipeline with n sections without branches. The profile of Figure <ref type="figure" target="#fig_1">1</ref> corresponds to the topography of the pipeline under study. The pressure head H(z) and the resulting piezometric head H(z) are shown in Figures <ref type="figure">2 and  3</ref>, respectively. Take into account the uniformity of H(z) similar to the one of a horizontal pipeline. The reference datum was the height of the first sensors location.</p><p>As a consequence, if H1 in = Hin and Hn out = Hout , be-</p><formula xml:id="formula_14">sides if m i (Q i ) = m(Q) = M (Q) for all i, then Equation (13) becomes Hin − H(z) = LM (Q) (<label>14</label></formula><formula xml:id="formula_15">)</formula><p>where L = ∑ n i=1 L i the total length of the pipeline. Equation ( <ref type="formula" target="#formula_14">14</ref>) is the steady state piezometric model for the pipeline viewed as a horizontal one.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Leak location</head><p>We consider a leakage as an outlet pipe at the leak location as is shown in Figure <ref type="figure" target="#fig_4">4</ref>. A branch or lateral pipe in section i breaks the continuity of variables Q(z, t) and H(z, t), therefore new boundary conditions must be satisfied <ref type="bibr" target="#b8">[9]</ref>. In  particular, the union of three pipes is associated to a geometry shown in Figure <ref type="figure" target="#fig_4">4</ref> and the corresponding conditions that describe the action of separating flow are reduced to</p><formula xml:id="formula_16">H 2 = H 1 + κ 12 (H 2 , H 1 )<label>(15)</label></formula><formula xml:id="formula_17">H 3 = H 1 + κ 13 (H 3 , H 1 )<label>(16)</label></formula><p>where H 2 and H 3 are pressures at the beginning of pipes 2 and 3 and the functions κ 1η (•, •) with η = 2, 3 represent losses caused by friction and change of flow direction. For adjusting the order of magnitude of these functions flow simulations were held with Pipelinestudio <ref type="bibr" target="#b9">[10]</ref> with the topology of the study case shown in Figure <ref type="figure" target="#fig_1">1</ref>. Simulation reported that terms κ 12 and κ 13 were negligible, then </p><formula xml:id="formula_18">H 1 = H 2 = H 3 .</formula><p>Thereafter in the study was included only the balance</p><formula xml:id="formula_19">Q 1 − Q 2 − Q 3 = 0,<label>(17)</label></formula><p>as consequence,</p><formula xml:id="formula_20">Q 1 = Q in , Q 3 = Q out (18)</formula><p>with Q in y Q out flows at the ends of the pipeline. So the differential equation ( <ref type="formula" target="#formula_3">4</ref>) transforms in two equations</p><formula xml:id="formula_21">dH 1 (z) dz − M (Q 1 ) = 0; for 0 ≤ z ≤ z b dH 3 (z) dz − M (Q 3 ) = 0; for z b &lt; z ≤ L,<label>(19)</label></formula><p>describing the pressure head along the section with a branch in point z b . As the equations ( <ref type="formula" target="#formula_21">19</ref>) have the same form as (4), their solutions also have the same as <ref type="bibr" target="#b5">(6)</ref>. Therefore, with boundary conditions:</p><formula xml:id="formula_22">1. H 1 (z = 0) = H in , 2. H 3 (z = L) = H out , 3. Q in = Q out + Q z b and 4. H z b − ϵ = H z b + ϵ with ϵ → 0</formula><p>Assuming that all pipes have same diameters, solutions of (19) evaluated at the ends are reduced to</p><formula xml:id="formula_23">H in − H z b z b − M (Q in ) = 0 H z b − H out L − z b − M (Q out ) = 0.<label>(20)</label></formula><p>Obtaining the variable z b associated to the position of the branch</p><formula xml:id="formula_24">z b = M (Q out )L i + H out − H in M (Q out ) − M (Q in ) = L sin α + m(Q out )L + H out − H in m(Q out ) − m(Q in ) ,<label>(21)</label></formula><p>in terms of the piezometric head</p><formula xml:id="formula_25">z b = m(Q out )L + Hout − Hin m(Q out ) − m(Q in ) . (<label>22</label></formula><formula xml:id="formula_26">)</formula><p>Equation ( <ref type="formula" target="#formula_25">22</ref>) is the key for leak isolation. In order to see the performance of this leak location method some experiments were held in our pipe prototype <ref type="bibr" target="#b10">[11]</ref>, which is an iron pipe of 200 m long, 4 inches diameter and six valves attached to it for leak simulations. Table <ref type="table" target="#tab_0">1</ref> shows the percent deviations of locating the leak position. In each experiment a valve was fully open. Coriolis sensors were used.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Pipeline friction</head><p>The D'Arcy-Weissbach friction is a function of the pipe parameters, <ref type="bibr" target="#b5">[6]</ref> and <ref type="bibr" target="#b11">[12]</ref>, 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 inner surface imperfections and attachments (nipples, elbows, etc.)-, therefore using a previous fixed value of f is of no use in Equation (1). To overcome the problem of not having the friction right value, we proposed a solution that was an on line friction estimation. In the following we show how to calculate this friction. For that, we part from the steady state momentum equation, Equation <ref type="bibr" target="#b3">(4)</ref>. Turning back the original parameters we get</p><formula xml:id="formula_27">g dH dz + f 2DA 2 Q |Q| + gsinα = 0 (<label>23</label></formula><formula xml:id="formula_28">)</formula><p>solving the integral, considering that H 0 and H L are pressures at he beginning and at the end of the pipeline and L the length, results</p><formula xml:id="formula_29">g(H L − H 0 ) = −( f 2DA 2 Q 2 ∞ + gsinα)L (24)</formula><p>where Q ∞ is volumetric flow in steady state, the absolute term disappears when flow goes in one direction only. Friction has the following expression</p><formula xml:id="formula_30">f = 2DA 2 g L (H 0 − H L − Lsinα) Q 2 ∞ (25)</formula><p>Equation ( <ref type="formula">25</ref>) is used to calculate on line the friction value, as is shown in Figure <ref type="figure" target="#fig_5">5</ref>, experiment realized in our pipeline prototype. The calculated friction has a considerable amount of noise, but this noise can be attenuated via weighted mean value with forgetting factor (MVFF, continuous line in figure). Actually, we are working on the use of recursive identification procedures for a better friction estimated. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Influence of sensors on location</head><p>Flow measurement in a pipeline is fundamental for leak location, in view that most of the pipeline leak detection meth-ods are based on processing a residual that is a flow difference. Due to our lack of experience, and by suggestion of a supplier, we start our flow measurements with a paddle wheel flow sensor <ref type="bibr" target="#b12">[13]</ref>. Later on, as ultrasonic sensors are widely used in the field, we decide to change to them <ref type="bibr" target="#b13">[14]</ref>, thinking that our measurements would be better. Finally, we reached the conclusion that success on leak detection and location depends strongly on the sensors quality (make and sensing principle), so we acquired sensors based on the Coriolis effect <ref type="bibr" target="#b14">[15]</ref>. An experiment that we made in our pipe prototype was to cause a leakage (outflow in a extraction point) and estimate the location with the measurements of the three sensors. Figure <ref type="figure" target="#fig_7">6</ref> shows the deviation of the calculated location depending on the type of sensor. Oscillations are observed around the operating point, which leads to the necessity of signal filtering in the diagnosis process. Table <ref type="table" target="#tab_1">2</ref> shows the error leak location, Paddle Wheel and Coriolis sensors have similar error, but standard deviation is bigger with the Paddle Wheel. In order to compare performance in the fourth column the accuracy of the instruments are presented; remark that Coriolis error standard deviation is about seventy times bigger than sensor accuracy. The observation here is that the quality of the results depends more on the behavior of the flow than on the accuracy of the instrument used.   One of our goals in the SCADA expansion project was to deliver results in real time. For this, sensors experiments were performed to determine which one would have the faster response. An index to take into account is the time response, it can be appreciated in Figure <ref type="figure" target="#fig_7">6</ref> but is practically 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 indicates the time when the leakage valve is opened to 100%. In Table <ref type="table" target="#tab_2">3</ref> are the measured times, being the ultrasonic sensor which requires more time (this by the number of points used to calculate a mean value).  Considering the settling time and noise in measurements (taking the STD as the measure for that), Coriolis sensor has the best performance. Experiments showed in this section were made with 1 s sampling period.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Asynchronous data and data bases</head><p>In the academy, we are used to work with benchmark systems or laboratory facilities with ad hoc data acquisition systems, sufficient sensors, controlled environments, etc. But these conditions are not necessarily in the practice, as was the case of the SCADA expansion, where the access to flow and pressure sensors of the pipeline were not available, but through a database. So the solution adopted was as follows:</p><p>1. The leak locator is on a dedicated computer, independent of the system that regulates de distribution of the fluid, it connects to the database server, see Figure <ref type="figure" target="#fig_9">10</ref>, via intranet or VPN (Virtual Private Network) connection in a LAN (Local Area Network) system.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">With proper permission a program, task performed</head><p>with Visual Studio 2010 tool that runs every minute (it is a program without GUI -Graphic User Interfacerthat runs silently), brings system data and creates a database with pipeline flow and pressure information, data required by the locator for proper operation. 3. The locator program (made in the LabVIEW platform, <ref type="bibr" target="#b15">[16]</ref>) periodically takes data (through SQL data server of Microsoft), applies the detection algorithm and when detects a leak proceeds to locate it, displays on the screen the location of the leak (Figures <ref type="figure" target="#fig_13">12 and  13</ref>), generates a visual warning and creates a file with data leakage. But the data acquisition system of SCADA do not meet the condition of sampling the system variables with constant sampling period. The nominal sampling period was 3 min, but in reality this varies from one to several tens of minutes. On the other hand, the locator was assigned a sampling period of 3 min, determined by the condition that nominally SCADA performs a polling of all measuring stations in that time span. To solve the problem of having a value of flow and pressure of each station at all sampling time, it was added to the localizer an algorithm that extrapolates the missing data when it is not available. Two algorithms were tested, one that retains the last data in the following sampling periods and one that generates straight line with the last two values available, that when the value of the variable that is brought from the database is not a new one, then the one determined by straight line is used. In order to compare results with both proposals a simulation with real data with three leaks was carried on, in Figure <ref type="figure" target="#fig_11">11</ref> the real and extrapolated input flow data are shown. It can be seen that at certain 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 region of validity. In Figure <ref type="figure" target="#fig_12">12</ref> the location of a leak is shown when extrapolated data are used and in Figure <ref type="figure" target="#fig_13">13</ref> when retained data are used. The pipe length is about 20 km, so that retention has outperformed extrapolation, since the latter yields higher values than the length of the pipe. Original leak location was about 10 km.    </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.1">Alternate database communication</head><p>As part of the project requirements, an alternate way of communication with the SCADA database was experimented. In previous section the communication between leak locator and database was direct trough a LAN system, the alternate way was through a third party via internet and VPN connection. Figure <ref type="figure" target="#fig_14">14</ref> shows the principal elements of this scheme.</p><p>The client is the computer with the locator program build in LabVIEW platform that performs basically two activities: leak detection and location, and request and sending data to communications broker using JSON strings. The remote client interface is a Java process that runs locally and handles communication, authentication, data formatting, encryption and security of the communication with data server.</p><p>It connects to the database in the SCADA through TCP sockets and VPN. For data handling JSON format is used, which is broadly used for information interchange trough internet. JSON (Java Script Object Notation) is a data interchange text format, easy for humans to read and write <ref type="bibr" target="#b16">[17]</ref>. JSON is a collection of pairs {variable name : value}, realized as an object, record, structure, dictionary, hash table, keyed list, or associated array, see in Figure <ref type="figure" target="#fig_5">15</ref> an object example.</p><p>Figure <ref type="figure" target="#fig_5">15</ref>: 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, "EventID":XXX, "Quantity":XXX, "PipeID":XXX, "Location":XXX, "TimeEvent":"yyyymmddhhmmss"} } } Communications broker attends clients requests (leaks locator is not the only one) and also SCADA requests. The database attached to the broker contains not only pipeline data but also data generated by the other clients. At the end, the SCADA has an interface in which information of leakage events is displayed.</p><p>Figure <ref type="figure" target="#fig_15">16</ref> shows a test ran with real data but off line. That experience showed that locator not always received answers from the broker. But this communications scheme is still in development. An interesting result is that a pipeline with certain topography may be analyzed as an horizontal pipe in which the piezometric head is a sum of measurements and terrain heights, Equation ( <ref type="formula" target="#formula_10">10</ref>), as seen in section 2.</p><p>Compared with traditional methods for locating a leak in a pipe, the method shown here, Equation ( <ref type="formula" target="#formula_25">22</ref>), requires less computational effort and has a simple expression for calculating it.</p><p>Another relevant result is the expression for on line calculation of the pipeline friction, Equation (25), as it is enough to measure pressure at the ends and steady state flow. The value of friction was found to be a key parameter for the exact location of the leak. It is to remark that when a leak occurs the pressures change modifying the friction value; in order to avoid wrong location of the leak we keep a delayed value of friction that is frozen when leak alarm occurs.</p><p>On the other hand, is to highlight the importance of choosing the appropriate sensor. It is not enough to choose a sensor capable of measuring a certain physical variable, also must be included in the selection process the purpose for which the measurements are needed.</p><p>The world of measurements for control targets is not limited to direct measurement of the physical variable, it is possible to achieve the control objectives with indirect measurements, as was the case of reading the variables from the plant via the network to a database. Also, with the partial absence of data we cannot use the plant model to predict data, then the use of extrapolation methods proves to be a powerful tool that helped to achieve the goal of this project; in this paper we use two simple methods, but this is an area that we continue to explore.</p><p>The experience with JSON format strings showed that it is easier to work with text characters than with specialized database commands and, no matter the VPN connection and data encryption, the scheme depends strongly on internet conditions. If internet fails leak detection scheme fails, situation that scarcely appears when the locator connects with database through a LAN system.</p><p>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.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: 60 km Pipeline topographical layout</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 2 :Figure 3 :</head><label>23</label><figDesc>Figure 2: Pipeline pressure head profile H(z)</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Figure 4 :</head><label>4</label><figDesc>Figure 4: Union of three branches in point z b of pipeline with transversal section areas A 1 , A 2 and A 3</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Figure 5 :</head><label>5</label><figDesc>Figure 5: Friction estimated, raw and filtered</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head>Figure 6 :</head><label>6</label><figDesc>Figure 6: Leak location with the three sensors</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_8"><head>Figure 7 :Figure 8 :Figure 9 :</head><label>789</label><figDesc>Figure 7: Flow measurement at the pipe ends, paddle wheel sensors</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_9"><head>Figure 10 :</head><label>10</label><figDesc>Figure 10: Communication scheme between leak locator and database</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_11"><head>Figure 11 :</head><label>11</label><figDesc>Figure 11: Graphics with original, extrapolated and retained data of input flow with three leaks</figDesc><graphic coords="6,53.82,386.16,236.75,64.81" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_12"><head>Figure 12 :</head><label>12</label><figDesc>Figure 12: Leaks location with extrapolated data</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_13"><head>Figure 13 :</head><label>13</label><figDesc>Figure 13: Leaks location with retained data</figDesc><graphic coords="6,52.39,491.60,238.36,62.71" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_14"><head>Figure 14 :</head><label>14</label><figDesc>Figure 14: Communications between client and database</figDesc><graphic coords="6,359.46,83.27,141.47,181.17" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_15"><head>Figure 16 :</head><label>16</label><figDesc>Figure 16: Off line experiment with real data. Detail of the graph, y axis is leak location in km</figDesc><graphic coords="7,99.29,-297.18,878.25,493.85" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1 :</head><label>1</label><figDesc>Location error in percentage of total pipe length Experiment ∆z b [%]</figDesc><table><row><cell>1 2 3 4 5 6 Mean</cell><cell>1.66 2.93 0.135 0.54 0.375 3.42 1.0</cell><cell>Valve position [m] 11.54 49.83 80.36 118.37 148.93 186.95</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 2 :</head><label>2</label><figDesc></figDesc><table><row><cell>Leak location errors Error Error STD Accuracy [%] [%] [% FS] Paddle wheel -0.28 Sensor 3.36 0.50 Ultrasonic 2.12 1.39 2.00 Coriolis 0.28 0.84 0.05</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head>Table 3 :</head><label>3</label><figDesc>Sensors settling time Sensor t s [s]</figDesc><table><row><cell></cell><cell></cell><cell></cell><cell cols="3">Paddle wheel Ultrasonic Coriolis</cell><cell>3 35 4</cell><cell></cell><cell></cell></row><row><cell></cell><cell>21</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>Qe</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>Qs</cell></row><row><cell></cell><cell>20</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell></cell><cell>19</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell>Flow [L/s]</cell><cell>18</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell></cell><cell>17</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell></cell><cell>16</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell></cell><cell></cell><cell>leak start</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell></cell><cell>20 15</cell><cell>40</cell><cell>60</cell><cell>80</cell><cell>100 Time [min]</cell><cell>120</cell><cell>140</cell><cell>160</cell><cell>180</cell></row></table></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0">Proceedings of the 26 th International Workshop on Principles of Diagnosis</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_1">This friction characterizes the shear stress exerted by the conduit walls on the flowing fluid.</note>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8">Acknowledgments</head><p>Authors are very thankful to Jonathán Velázquez who helped us by solving the database issues emerged in this project.</p></div>
			</div>


			<div type="funding">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>* Supported by II-UNAM and IT100414-DGAPA-UNAM. pattern recognition and analytical models for failure diagnosis.</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Proceedings of the 26 th International Workshop on Principles of Diagnosis</head></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<author>
			<persName><forename type="first">I</forename><surname>Bazilescu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Lyhus</surname></persName>
		</author>
		<ptr target="http://www1.american.edu/ted/KOMI.HTM" />
		<title level="m">Russia oil spill</title>
				<imprint>
			<date type="published" when="1994">1994</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Leckerkennung undlokalisierung bei pipelines durch on-line-korrelation mit einem prozessrechner</title>
		<author>
			<persName><forename type="first">H</forename><surname>Siebert</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Isermann</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Regelugnstechnik</title>
		<imprint>
			<biblScope unit="volume">25</biblScope>
			<biblScope unit="page" from="69" to="74" />
			<date type="published" when="1977">1977</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Process fault detection based on modeling and estimation methods -a survey</title>
		<author>
			<persName><forename type="first">R</forename><surname>Isermann</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Automatica</title>
		<imprint>
			<biblScope unit="volume">20</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page" from="387" to="404" />
			<date type="published" when="1984-07">July 1984</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<monogr>
		<author>
			<persName><forename type="first">C</forename><surname>Verde</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Gentil</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Morales</surname></persName>
		</author>
		<title level="m">Monitoreo y diagnóstico automático de fallas en sistemas diámicos</title>
				<imprint>
			<publisher>Trillas</publisher>
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<title level="m" type="main">Applied Hydraulic Transients</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">Hanif</forename><surname>Chaudhry</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2014">2014</date>
			<publisher>Springer</publisher>
		</imprint>
	</monogr>
	<note>third edition</note>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Experiments with fluid friction in roughened pipes</title>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">F</forename><surname>Colebrook</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">M</forename><surname>White</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Royal Society of London</title>
				<meeting>the Royal Society of London</meeting>
		<imprint>
			<date type="published" when="1937">1937</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<author>
			<persName><forename type="first">J</forename><surname>Saldarriaga</surname></persName>
		</author>
		<title level="m">Hidráulica de acueductos</title>
				<imprint>
			<publisher>Mc Graw-Hill</publisher>
			<date type="published" when="2003">2003</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<author>
			<persName><forename type="first">R</forename><surname>Bansal</surname></persName>
		</author>
		<title level="m">Fluid mechanics and hydraulic machines</title>
				<imprint>
			<publisher>P) LTD</publisher>
			<date type="published" when="2005">2005</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Modelling outflow following rupture in pipeline networks</title>
		<author>
			<persName><forename type="first">A</forename><surname>Oke</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Mahgerefteh</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Atti</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Chemical Engineering Science</title>
		<imprint>
			<biblScope unit="volume">61</biblScope>
			<biblScope unit="page" from="1811" to="1818" />
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<ptr target="http://www.energy-solutions.com/" />
		<title level="m">Software in energy solutions international</title>
				<imprint>
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
	<note>PipelineStudio</note>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<title level="m" type="main">Prototype for leak detection in pipelines: Users Manual</title>
		<author>
			<persName><forename type="first">R</forename><surname>Carrera</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Verde</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2010-11">Noviembre 2010</date>
			<pubPlace>Ciudad Universitaria, D.F.</pubPlace>
		</imprint>
		<respStmt>
			<orgName>Instituto de Ingeniería, UNAM</orgName>
		</respStmt>
	</monogr>
	<note>In Spanish</note>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">A new explicit relation for the friction coefficient in the darcy-weisbach equation</title>
		<author>
			<persName><forename type="first">C</forename><surname>Tzimopoulos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Papaevangelou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Evangelides</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">PRE10: Protection and Restoration of the Environment</title>
				<meeting><address><addrLine>Corfu</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2010-07-09">05-09 July, 2010. 2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<monogr>
		<author>
			<persName><forename type="first">G</forename><surname>Fisher</surname></persName>
		</author>
		<title level="m">Signet 2540 high performance flow sensor</title>
				<meeting><address><addrLine>El Monte, CA</addrLine></address></meeting>
		<imprint>
			<publisher>Georg Fisher Signet LLC</publisher>
			<date type="published" when="2004">2004</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<monogr>
		<author>
			<persName><surname>Panametrics</surname></persName>
		</author>
		<title level="m">Two-Channel TransPort Mod. 2PT868 Portable Flowmeter. User&apos;s Manual</title>
				<meeting><address><addrLine>Waltham, MA, USA</addrLine></address></meeting>
		<imprint>
			<publisher>PANAMET-RICS, Inc</publisher>
			<date type="published" when="1997">1997</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<author>
			<persName><surname>E+h</surname></persName>
		</author>
		<title level="m">Proline Promass 83 Operating Instructions</title>
				<meeting><address><addrLine>Greenwood, IN, USA</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
	<note>Endress + Hauser Flowtec</note>
</biblStruct>

<biblStruct xml:id="b15">
	<monogr>
		<title level="m" type="main">LabVIEW user manual</title>
		<imprint>
			<date type="published" when="2013">2013</date>
			<publisher>National Instruments Corporation</publisher>
			<pubPlace>Austin</pubPlace>
		</imprint>
		<respStmt>
			<orgName>National Instruments</orgName>
		</respStmt>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<monogr>
		<ptr target="http://www.json.org/" />
		<title level="m">Ecma-404 the json data interchange standard</title>
				<imprint/>
	</monogr>
	<note>JSON Organization</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
