A Method for Distributed Pipeline Burst and Leakage Detection in Wireless Sensor Networks Using Transform Analysis

Bursts and leakages have turned out to be one of the most frequent malfunctions in liquid pipeline distribution systems. In recent years, the issue has gained a lot of attention in research community due to associated financial costs, environmental hazards, and safety considerations. Wireless sensor network (WSN) based leakage detection and localization can provide an exceptional level of operational efficiency, safety assurance, and real-time parametric view of the entire pipeline network. In this paper, we propose a transient pressure wave based technique coupled with wavelet analysis to achieve reliable detection and localization of abrupt bursts and leakages. The presented technique uses the information carried in the transient pressure signal. A specific pattern is induced on the pressure traces within the pipeline due to leak; we use wavelet analysis to detect these local singularities. The proposed algorithm is distributed in nature and run on low power sensor nodes. The algorithm is deployed in field on a custom pipeline test bed and performance results are documented for various testing scenarios. A comparison of proposed wavelet technique with other widely used methods has been carried out. The technique provides more than 90% accuracy in a number of deployment scenarios for high noise generating long pipeline networks.


Introduction
According to World Bank's estimate, water loss volume amounts to 48.6 billion m 3 /year worldwide, with a financial loss of approximately 14.6 billion US dollars per year.Almost twenty percent of the US water supply are lost through leaking pipes [1].There exist a variety of commercial leakage detection techniques ranging from physical inspection to using high-performance sensing nodes.Among these techniques, acoustics phenomenon is most widely used; acoustic waves generated due to leakage are recorded using sensors and transducers, though the technique is rendered ineffective if leak is not abrupt or small enough.There are a variety of sensors and transducers used for multiple applications [2][3][4].The performance level of a leak detection system can be established by a series of factors.Some of the criteria that are usually used to evaluate the performance of leak detection systems are the ability to determine location of the leak, the detection speed, and the ability to estimate the size of the leak.
In Table 1, we summarize the most important features of each detection technique and performance evaluation criterion.All these methods require human intervention, are time consuming, and are not customized for energy constrained field deployed wireless sensor devices.
An automated, noninvasive, rapid, and easily deployable method is desirable to embed in wireless sensor network for long range pipeline networks.To decrease false alarm rate effectively and promote detection and location precision, we propose a distributed signal processing technique which employs discrete wavelet transform to extract inflection points of negative pressure wave (NPW), where distributed decision making reduces the base station work load.As a matter of fact, in frequency domain, the faults are pinpointed without losing signal information in frequency domain.However, its applications to unsteady signals neglect the basic assumption of steadiness and can fail in some cases [5].To realize the benefits of analysis in both the frequency and time domains and to improve the effectiveness of the methodology,

Parameters
Acoustic logging [9] Optical [10] Cable sensing [11] GPR [12] Vapor sampling Soil monitoring and tracer gas [13] Guided wave method [14] Ultrasonic flow [15] C  wavelet analysis has been used.Since the faults in the pipeline network introduce particular patterns in pressure signals obtained from transients, the problem of leak detection is to investigate the signal trend over a period of time.Therefore, performance of different types of wavelets is explored for the valuable information corresponding to abrupt transitions which are embedded in pressure signals in the presence of noise.Major contributions of this paper include (i) a distributed wireless sensor network architecture for pipeline monitoring, (ii) pressure signal signature analysis for leakage and bursts detection using wavelets, and (iii) evaluation of proposed technique in a real pipeline testbed.Most of the efforts to date in this domain are simulation based, as found in recent literature [6].A distributed sensing algorithm is integrated with self-designed wireless sensor node and wireless communication, based on a high rate pressure data that ensures long term online operation with respect to safety requirements.The evaluation of the proposed system is done on realistic data obtained from experimentation on field deployed test bed along with systematic analysis of error sources and false positives in the results.The developed system is capable of detecting leakages on its own, thereby informing central control about the locality and intensity of the anomaly using communication protocols for sensor nodes.A comparison with the state-of-the-art techniques is also provided.
A brief summary on state-of-the-art methods for leakage detection and the background on the basis of signal processing and wavelet applications for the stated problem is discussed in Section 2. Successively, an algorithm based on the negative pressure wave (NPW) and wavelets phenomenon for leakage detection and localization in pipelines is proposed.Finally, an experimental validation of the proposed system is presented and working of experimental setup, practical considerations, simulations, and all the aspects that must be taken into account for the spatial localization of the leak are addressed.This paper provides a complete picture of the developed monitoring system known as REMONG for burst and leakage detection extending on works in [7,8].

Pressure-Based Leakage Detection Techniques
Various pressure-based techniques exist for detection and localization of leaks.Figure 1 provides a nature based classification of such techniques.Some of them are elaborated as follows.
Leak reflection method (LRM) uses information of transient wave to identify leakage.LRM methods are so far used only in single pipeline and laminar flow networks [16,[22][23][24].Impulse response analysis (IRA) converts reflections to sharp impulses with well-defined time delays.Impulse response is useful in mechanical pipeline systems where sharp reflections are not produced [19,25].Transient damping method (TDM) [21,26,27] can be easily implemented, although this approach is less expensive.In a practical system, noise is a major concern which must be filtered out for such techniques [28].Time domain reflectometry (TDR) requires battery powered system including TDR instrument to measure reflectometry coefficient which is the ratio between the amplitude of the signal reflected and TDR response [29,30].This method reduces the inspection time to a certain amount as compared to other traditional methods due to its high sensitivity to impedance variations.One factor which should be taken care of is the rusting between the interconnections of the pipeline, which may lead to errors for leakage location estimation.TDR techniques are good for a single pipeline system where small leak gives rise to high pressure wave which can be investigated in laboratory experiments [31].The methods described above belong to time domain transient modeling.
Analysis of the signal in time domain requires system transient response at multiple locations while in frequency International Journal of Distributed Sensor Networks 3  [21] domain only one transient response is enough to study the behavioral changes and detection of anomalies.Frequency domain analysis is direct and less computationally intensive [26].Several researches analyzing transient signals in frequency domain for leakage detection are as follows.Mpesha et al. [32] proposed presence of leak or anomalies revealed by amplitude peaks in frequency response diagram of pressure signals.These peaks have comparatively lower amplitude than leak free system.The change in amplitude of peaks shows pressure drop due to presence of leak [33].Lee et al. [21] introduced inverse resonant and peaksequencing method (PSM) which is based on the fact that leak produces sinusoid patterns on peaks of FRDs (frequency response diagram).Although friction also causes attenuation, it has a smooth distinguishable pattern in leak induced signals which does not affect this approach much [33].Some performance parameters like inspection range detection and detectable leakage sizes have been compared in Table 2. Li et al. presented correlation-based location method in leak detection of the pipelines assuming that the acoustic speed has been known and constant.The time difference of arrival and the corresponding frequency are used to analyze the acoustic signals.However, it is difficult to pinpoint small leakages in presence of high background noise [9,34].Recently, in [6], a method has been presented to detect bursts in pipelines.In this study, statistical analysis and hydraulic modeling are used to pinpoint leakages and bursts which are applicable to detection of local leakages in small scale distribution systems in which the leaks are often masked by flow variations.The measurement errors from field observations and potential bad data are neglected in this study, which are very important in real-time monitoring networks.
Most of the approaches described previously utilized the supervisory control and data acquisition (SCADA) field monitoring data to calibrate system parameters representing leakage/burst and are based on simulations.In this paper, we present an alternative leakage and burst identification method, with the advantages of computationally efficient detection algorithm and its distributed implementation in WSN.The proposed algorithm is based on wavelet transform (WT) which decomposes a signal into its frequency components just as Fourier transform but provides a global representation of signal.WT was developed to overcome the shortcomings of the short time Fourier transform (STFT).STFT provides constant resolution on all frequency levels while WT uses multiresolution technique, which analyzes different signal frequencies with different resolution [22].The wavelet transform, at high frequencies, gives good time resolution and poor frequency resolution, while at low frequencies the wavelet transform gives good frequency resolution and poor time resolution.CWT cannot be used effectively unless discretized [32].This algorithm is successfully integrated in wireless sensor network for pipeline health monitoring.The results show that the proposed method is useful for pinpointing the pipeline bursts and leakages in real time.

Distributed Bursts and Leakage Detection in Wireless Sensing Network
For long range oil/water distribution networks, environment monitoring up to several kilometers and burst/leakage detection are made possible by wireless sensor networks (WSNs).
In general, there are two types of data processing in WSN.
One is the centralized processing, which collects all data to a central node for processing.These systems have high cost, centralized control, and proprietary network protocol.Centralized approach is similar to SCADA (supervisory control and data acquisition) which is used to monitor realtime data in industries.However, centralized approach in WSNs has high data rate and node density as compared to SCADA [35].For reliable detection of bursts and leakages, it is required to distribute the cardinal control of base station among the wireless sensor network nodes.The second type is the node level distributed processing, which collects raw data on sensor nodes for local decisions and global decision is taken by high tier nodes based on these local decisions.
It can be noticed that when the number of sensing nodes is smaller, the total energy of the centralized and distributed network increases linearly and slightly differs to each other.However, the increase in number of sensing nodes results in remarkable increase in the consumed energy.This trend is due to the fact that when a large number of nodes start computation and communication with base station, it consumes much more energy than a few nodes transmitting the local decisions to base station.
Most algorithms for sensor networks proposed in literature are meant to be executed by the sensor nodes during the detection.Wireless distributed computing (WDC) offers robustness, increased performance, and operational efficiency.The goals are to reduce the per node and network resource requirements and to speed up bursts and leakage detection process.Major steps involved in WDC are real-time critical data capture, processing, and dissemination.There are many advantages of using distributed computing in WSN as compared to wired networks with LAN.If a node fails in wired network, the complete system is destroyed while in WSNs the system can rely on other sensor nodes.In order to increase the efficiency of local decisions at a particular International Journal of Distributed Sensor Networks location, additional sensor nodes can be included in sensor network without the cost of wires and system reconfiguration.
Leakages and bursts introduce transition in pressure wave travelling along fluid inside the pipeline which is absent in the intact system.These transients travel along the length of pipeline.Figure 2 shows that a leakage point generates two transient waves equal in magnitude but in opposite direction.Due to high pressure in the fluids, the leakage causes some attenuation in the transient signal thereby causing a negative pressure wave (NPW) [36].This scenario has been shown in Figure 3.In this figure, pressure signals are plotted with presence and absence of leakages.The pressure profile of leak signal in Figure 3(b) refers to comparatively large leak size of 3.5 inches which can be identified by visual inspection while in case of small and slow leakages it is not possible to visually identify the leak.Slow and small leakages are challenging to identify thus an algorithm is needed which can identify small leakages with precision.The position of disturbance indicates the arrival time of leak reflected signals and can be used to measure the time for transient signal to travel from its source [37].
The behavior of NPW can be sensed by wireless sensor nodes across several zones of the pipeline network.A number of clustering approaches are discussed in literature for ad hoc wireless sensor networks [38].A linear and hierarchical infrastructure layout is required for WSN node deployment in our case, in which adjacent sensors nodes are grouped to form node communities.Once the features of negative pressure waves are acquired, they are transmitted to cluster heads over several hops and kilometers to be transmitted by long haul transmission protocol.Important parameters considered for deployment of WSN in pipeline infrastructures include coverage distance, number of hops, number of nodes, and sampling and energy harvesting rates.NPW related information can be transmitted over a number of cluster nodes depending upon the size of the network until fusion center is reached.The data aggregated at this level is sent for inference to base station (highest tier node), where alarm is generated for warning.With the increase in number of nodes in network, error debugging and fault tolerance become complex due to high transmission rate of data packets.
We consider a 1 −  wireless sensor network, where six sensor nodes are placed over the pipeline distribution system depending upon the communication range.Each node takes about 100 ms to send or receive a message containing NPW features and transmission or reception takes 10-20 ms.The communication range is less than 100 meters in indoor environment and around 100 to 200 meters in outdoor with 1mW power.The location of the th sensor node in the network is   = d,  = {1, 2, 3, . . ., }, where   shows the distance of th node and  is the identity number for the node.Distributed leakage and burst detection approach includes single-node processing and multinode collaboration for event detection.The detection algorithm is divided into three tasks, which are shown with different shapes in Figure 4.There are two main blocks in this figure.Block "A" shows the data collection and local inference module whereas block "B" shows the global inference module.There are six nodes Practical pipeline distribution systems face some serious issues like noise due to the presence of multiple communication devices in the environment.In order to clean the raw data, we compute moving average filter, which eliminates the noise sparks.This reduces the chance for false alarm of event detection.The cluster heads perform noise removal and leakage/burst detection algorithm.For the local trending at each sensor node, we capture the temporal pattern of pressure measurements.Leakage and burst detection algorithm utilizes collaboration of neighboring wireless sensor nodes to reach a consensus for leakage presence.The local decision of the nodes is matched with a number of neighbouring nodes in the network.To identify the leakage in the pipeline, behaviour of the sensor data is analyzed and the decision on the cluster head node is send to base station after consensus, where wavelet transform and NPW algorithm are performed.The decision of performing noise removal on the cluster heads is taken to reduce the time required for the transmission of noisy data.For this purpose we consider the testing problem where the observation at the th sensor node is given by In ( 1) and ( 2),  0 and  1 show observation of signal on the sensor nodes, with and without the presence of noise which is shown by .If noise removal is not performed on the sensing nodes, then according to (2) the required transmission time will be more than observation in (1) which is noise free.So instead of transmitting the scrap to next hierarchical level in network it is better to remove it on the cluster nodes.If the moving average filter is implemented for noise removal and "" is the length of the weighted moving window, therefore order of the filter is ().A symmetric weighted moving average filter of window length 2 + 1 is given by where   shows weights and   shows pressure signal samples.Leakage and burst detection algorithm involves signal downsampling, coefficients multiplication, and upsampling.If the "" level decomposition is performed, it will include upsampling, downsampling, signal splitting, and signal grouping for all these levels including inverse transform computation.Thus this part of computing has ( +1 ) order and consumes more energy than noise removal and data collection.Thus, it is implemented on base station which has large resources than network nodes.The major component of this board is microcontroller, to which several integrated circuit components and interfaces are connected through different protocols as mentioned in Figure 5.

Proposed Pressure-Based Leakage Detection System
A 32-bit microcontroller based on the high-performance RISC core operating at a frequency of up to 160 MHz is used in board design.It incorporates high-speed embedded memories and an extensive range of enhanced I/Os and peripherals.The board is characterized with low power monitoring with a set of power-saving modes including the sleep and hibernate for transceiver.There is an interface for application specific sensors; we have used digital pressure and temperature sensors which are specially designed for oil and gas industry to measure pressure and temperature of the pipeline fluid.The sensor power requirements are kept at 5 V, 25 mA (max).These sensors can communicate using RS-485, RS-23, or SPI interface.
For pipeline infrastructure monitoring, a linear and hierarchical layout is required for sensor node deployment in whole network (Figure 6).The sensory information of several zones of the pipeline is monitored and transmitted to cluster heads over several hops and kilometers.There are some important parameters to be considered for deployment of WSN in pipeline networks including number of hops, coverage distance, number of nodes, and sampling and energy harvesting rates.In the linear pipeline monitoring topology, gateway or end nodes cannot communicate with other nodes more than one or two hops away.When the node wants to establish communication and transfer packets with each other, it will send out broadcasts asking for the RSSI of other nodes in its vicinity, and a table will be formed with RSSI of the neighboring nodes.In sensor network, whenever a sensor node is awake, it collects pressure data and calculates local decision from this piece of information.

Signal Processing and Decision Making Module.
When a leakage takes place, pressure inside and outside the pipeline would be different which results in a negative pressure wave (NPW) propagating at a particular velocity.The location of leakage can be predicted if the time delay between NPW and the normal pressure waves inside the pipeline is known.The layout of the pipeline system has been shown in Figure 2. The location of leakage can be found by the following equation: In this equation : the distance between leakage point and pressure transducer; : the distances between two pressure transducers; V: negative pressure wave propagating velocity in liquid medium piping system of m/s; and : time difference of the pressure wave getting to both pressure transducers on the pipeline [40].
Wavelet transform has great advantages in the analysis and processing of nonstable and nonlinear signals.Negative pressure wave signals are nonstable and nonlinear which can be decomposed in different frequency bands with different resolutions.Thus, eigenvector of the signals can be extracted.In the leakage detection and localization system, wavelet transform is applied to distinguish different sources that cause pressure drop.Effect of a leak on a transient signal measured for a reservoir-pipe-valve system is shown in Figure 7.In essence, the hydraulic transient puts the system through a succession of different states or events.
Wavelet transform is used to extract the information of instantaneous change in the pressure signal.Once these characteristic points are known, leakage presence can be predicted satisfactorily.A mathematical definition of continuous wavelet transform (CWT) is shown in [29] CWT In this expression, () is a square-integrable function at a scale  ≥ 1,  is a continuous function in both the time domain and the frequency domain called the mother wavelet, the asterisk ( * ) denotes a complex conjugate and the multiplication is for energy normalization, and (), () are dilating and translating coefficients, respectively.WT decomposes the signal into different scales with different levels of resolution by dilating the mother wavelet.One drawback of CWT is that the representation of signal is redundant, since  and  are continuous over , where  is the set of real numbers: Scaling function satisfies conditions defined in (6).When discrete wavelet transform (DWT) is applied to a data set of  data points, the DWT transforms  data points into  wavelet coefficients.The original data can be expressed as a linear sum of products of wavelet coefficients and their corresponding basis functions.One of the major challenges in this approach is the system noise which complicates the analysis of the leak signal in the presence of such disturbances.Thus, it becomes very difficult to correctly identify the presence and location of the leakage.Reduction of noise has been one of the main focus areas of research for few years.There exist multiple possibilities to identify the presence of slow leaks in pipelines [41].
To overcome this problem, short time Fourier transform is used due to its narrowband and wideband transforms nature.It offers an alternative view of pressure signals, but while it can shed light on some aspects of system diagnosis, its application to unsteady signals neglects the basic assumption of steadiness and can fail in some cases.Short time Fourier transform provides either good time resolution or frequency resolution depending upon the width of window, though the limitation of a fixed resolution still persists.This is one of the reasons for the creation of multiresolution analysis which can provide both good time resolution and frequency resolution.Noise removal requires multiresolution analysis of local frequency contents.To realize the advantages of analysis in both the frequency and time domains and to improve the effectiveness of the methodology, wavelet analysis has been applied [42].
Wavelet analysis proves to be a great resource to remove signal noise and provide insight into frequency content of the signal.First of all, a data object is transformed into the wavelet domain.Then, some coefficients are selected and zero-filled or shrunk/truncated by a certain criterion.At the end, the shrunken or processed coefficients are inversely transformed to the original domain; this is the denoised data.The pressure data signal of NPW is transformed to wavelets and then wavelet compression and denoising are performed, respectively, followed by the event detection algorithm.Denoising is the problem of signal recovery from noisy data.The denoising objective is to suppress the noise part of the signal and to recover original signal.All steps for using wavelets are shown in Figure 9.In this figure, "" is the original signal and "" is noise.
The denoising procedure proceeds in three steps.
Compute the wavelet decomposition of the signal s at level .
(2) Threshold detail coefficients: for each level from 1 to , select a threshold and apply soft thresholding to the detail coefficients.
International Journal of Distributed Sensor Networks (3) Reconstruct: compute wavelet reconstruction base on the original approximation coefficients of level .
A wavelet function is a small oscillatory wave which contains both the analysis and the window function.Discrete wavelet transform uses filter banks for the analysis and synthesis of a signal.The filter banks contain wavelet filters and extract the frequency content of the signal in various subbands.Figure 8 shows the pressure signal taken from the pipeline test bed in an intact state and compares its response in presence of a leak.This pressure signal is then denoised using wavelet packet transform.Wavelet compression is based on the concept that regular signal components can be approximated using small number of approximation coefficients and some detail coefficients.
The compression procedure proceeds in three steps: decompose, threshold detail coefficients, and reconstruction which is the same as denoising.The only difference with the denoising procedure is found in threshold, that is, step 2, where compression selects the largest absolute value coefficient.The wavelet packet method is a generalization of wavelet decomposition that offers a rich multiresolution analysis.Wavelet packet atoms are waveforms indexed by position and scale for a given orthogonal wavelet function.Figure 10 shows level 5 decomposition, where " 5 " is the coefficient signal, "" is the original signal, and " 1 " to " 5 " are all decomposition levels for practical signal recorded from pipeline test bed.All these decomposition levels and coefficient signal are added to obtain original signal.The wavelet packets can be used for numerous expansions of a given signal.We select the most suitable decomposition of signal with respect to entropy.
A single decomposition using wavelet packets generates a large number of bases.The generic step splits the approximation coefficients into two parts.After splitting, we obtain a vector of approximation coefficients and a vector of detail coefficients, both at a coarser scale.The information lost between two successive approximations is captured in detail coefficients.Next step consists of splitting the new approximation coefficient vector.Each detail coefficient vector is also decomposed into two parts using the same approach as in approximation vector splitting.Complete binary tree decomposition is produced as shown in Figure 11.In this figure,   is the sampling frequency."ℎ" and "" are decomposition filters and ℎ  and   are reconstruction filters.↑ shows upsampling and ↓ shows downsampling of signal.↑ 2 and ↓ 2 depict upsampling and downsampling by factor 2, respectively.

Results and Discussion
Figure 12 shows a schematic diagram of the pipeline testbed.Figure 13 shows the test bed for experimentation.Figure 13(a) provides an overall view of test bed whereas Figure 13(b) shows different valves embedded in the pipeline.It comprises 14.2 m long GI (galvanized iron) pipes with an internal diameter of 2 inches with a horizontal placement of pipeline.A water tank is used as supply reservoir.The pipeline is connected with the tank and a motor to provide water flow.There are four valves in the layout to create artificial leaks for experimentation.Honeywell sensors are used as pressure transducers sending data to waspmotes.The pressure transducers can be mounted at any location on the pipeline.The waspmotes used have the following attributes: (i) microcontroller: AT mega 1281; (ii) frequency: 8 MHz; (iii) SRAM: 8 Kb; (iv) EEPROM: 4 KB; (v) flash: 128 Kb.
Waspmotes report data to a custom built data aggregator board.A number of scenarios with different size of leaks were observed to calculate the leak probability using apparatus.Result is tabulated after applying signal processing at individual cluster head motes as well as on base station.
We evaluated detection accuracy using four experiments in pipeline setup.Valve 3 is opened at 30 degrees, 50 degrees, 60 degrees, and 90 degrees accurately using digital compass as shown in Figure 14.The red colored window shows the presence of leak and the signal part which needs to be focused on for accurately finding samples where leak occurs.Once samples are correctly identified using the time information, we can find the location of leak in the pipeline network.System's natural response is also recorded to make comparison.
The trace set obtained by this experimental setup contains four pressure transient signals.We have used five waspmotes to make wireless mesh network in a tree topology.There are two cluster head nodes and one base station.All traces are analyzed with both wavelet transform analysis for three different wavelet types like haar, symlet, and daubechies wavelets.Noise removal has been performed on network nodes and leakage detection algorithm has been performed on base station.Waspmotes pass the noise free critical pressure information to other cluster head nodes and consequently an alarm is generated on the base station as a leak detection warning.
Here, we present the results from experimental evaluation of distributed leakage detection algorithm.Some statistical measures are evaluated for the performance of the said technique.Sensitivity measures the proportion of correctly identified samples for event detection whereas specificity measures the quantity of false events which are correctly identified; these two measures are closely related.In Figure 15 some performance measures have been plotted.In this figure the -axis shows instances.From 1-4 on -axis, wavelet denoising along with 30%, 50%, 75%, and 90% opening of two-inch valve has been used to detect leakage and corresponding performance parameter is plotted.Similarly, from 4-8 on -axis, wavelet compression along with 30%, 50%, 75%, and 90% opening of two-inch valve has been used to detect leakage.The experiment has been repeated ten to twenty times and the averages of the results obtained are plotted for each instance.In Figure 15(a), specificity of detection algorithm has been shown with three different types of wavelets.Specificity for the daubechies and symlet is much higher than haar wavelets due to comparatively complex decomposition in both wavelets.Daubechies wavelets are the most popular wavelets.These are also called Maxflat wavelets as their frequency responses have maximum flatness at frequencies 0 and .
The optimum wavelet decomposition level can be chosen by estimating the SNR in wireless transmission system [43].Further it can be made adaptive.The results of simulation for different level of daubechies wavelet decomposition are shown in Figure 15(f).It can be clearly seen that eight-level decomposition shows much better performance than the two-, four-, or six-level wavelet analysis for leakage detection.For eighth level, mean value of decomposition signal reduces significantly and as a result, the SNR performance is increased.In wireless communications, two-level decomposition has not been so effective in its SNR performance.Through extensive simulation results, we find SNR of sixlevel decomposition showing better performance in reducing noise.Thus, six-level wavelet decomposition is considered to be the best wavelet decomposition for denoising in our case.
To differentiate between bursts and leakages, another trace set is acquired.The test bed for varying leakage size is shown in Figure 13(b).This figure shows five valves of different sizes, which are embedded in the pipeline structure at two different positions.The sizes of valves are 0.25 inches, 0.5 inches, 0.75 inches, 1.0 inches, and 1.5 inches.Different sized valves have been selected not only to create different sizes of leakages but also to create samples for bursts.This trace set is used to evaluate the proposed algorithm for bursts and leakages detection.The small sizes of valves are used to model bursts whereas large sizes of valves are used for slow leakages.In Figure 16, it can be noticed that burst (Figure 16(a)) and leakage (Figure 16(b)) profiles obtained from the test bed are quite different.The burst sample is collected by opening the smallest size valve, that is, 0.25 inches, whereas the leakage sample is collected by opening 1.5-inch valve.Theses traces are collected over a time span of thirty-five seconds each at 500-700 Hz frequency.A high sampling frequency of pressure measurements is required because the NPW speed can be as high as several meters per second but, due to sensor node memory constraint, we keep it to be 500-700 Hz.Burst shows a rapid transition and it regains its normal response when the valve is closed, whereas a leakage signal makes a clear profile and takes time to come back to normal flow.Our algorithm caters for both bursts and leakages.We have collected fifty samples for each leakage size using five valves.The average accuracy of detection algorithm using daubechies wavelet has been plotted in Figure 17.The size of individual valve can be discretized further to generate a variety of leakage size and bursts.It can be observed in this figure that there is an increasing trend of accuracy of algorithm with the increase in the leakage size.There is a dip in range 0.5-1.0inches leakage size; the reason can be communication error among sensor nodes or small data set.However, the curve follows ±4% bounds of linearly increasing curve which is acceptable range.With the increase in the number of samples of each leakage size, the accuracy curve will follow the linear fashion.
False alarms can be generated when the pressure/volume in the pipeline decreases due to change in flow through pump and maintenance operations.In order to avoid this type of false alarm, we created an offline dictionary that contains    The choice of wavelet depends upon the shape and their ability to analyze the signal in a particular application.Similarly, sensitivity and positive prediction values undergo the same behaviour as specificity but, in case of negative prediction value, symlet performs better than daubechies in some scenarios.One of the reasons for this deviation is the practical proof of concept.Accuracy percentage shows how much the leakage detection result is close to the expected values as found by the signal.It can be seen in the accuracy plot that, for all the eight scenarios of wavelet compression and  denoising, performance is better using daubechies wavelets.For scenario 3, haar wavelet performs better than symlet and daubechies using wavelet denoising.Three-level wavelet decomposition has been used in this case because signal noise has been removed already on the waspmotes using low pass filter.
From the above discussion and practical results for distributed leakage detection as shown in Figure 15, daubechies wavelet gives the best results in our case, with maximum achievable accuracy in leakage detection as compared to other types of wavelets and transforms.The accuracy of leak detection grows as we move on to scenario axis.As mentioned before, scenarios 4-8 belong to wavelet compression.Thus daubechies wavelet provides better accuracy performance in leakage detection by removing noise due to its optimum decomposition, denoising, and compression property while rest of the wavelets produce quite satisfactory results.Wavelet transform is preferred to short time Fourier transform because wavelet transform provides multiresolution in frequency domain.Multiresolution transform allows comprehensive analysis of signal at different levels in frequency domain.
Wavelets provide multiresolution analysis of frequency components of the signal.Through the results, we have shown practically that wavelet transform can play an effective role to detect leakage from the noisy pressure signal for wireless sensor network data.Moreover, it is interesting to note that, for lower noise densities, single level of DWT decomposition is sufficient, while, for higher noise densities, second level of DWT decomposition is required and so on.Wirelessly deployed sensor nodes may have higher possibility for presence of noise which can corrupt the signal.Wavelets not only reduce noise but also at each decomposition level apply a filter bank and make the leak event easily detectable with accuracy.
The choice of decomposition levels of wavelets depends upon the signal to noise ratio.Single level wavelet decomposition is sufficient for less corrupted signal, while, for signals corrupted with higher noise densities, a second level of wavelet decomposition is required and so on.SNR, mean, and standard deviation are plotted for a number of decomposition levels of wavelets in Figure 15.Optimum level of wavelet decomposition shows better performance in noisy signal transmission in wireless communications.NPW has been considered by many researches for leakage detection; it may not be all that could determine leak accurately.Wavelet transform helps to indicate the presence of a leak by providing insight to multiple signal frequencies with time information.When the algorithm is integrated in sensor nodes for distributed event detection in WSN, the energy consumed in the network is far less than when all readings are sent to base station in a centralized network.As we discussed in Section 1, most of the methods addressed in literature are SCADA based; we see that distributed event detection consumes less energy resources.If we compare the total energies of the centralized and distributed network, Figure 18 shows a trade-off between number of the sensor nodes used in the network and the energy consumed during communication.These results are obtained in real-time scenarios, where three battery powered sensor nodes, two cluster heads, and one base station are used for leakage and bursts detection.This energy is consumed for communication between sensor nodes for consensus on event reporting and on-mote processing involved in algorithm.For large number of nodes, energy is calculated using the simulation tools.
Furthermore, final real world deployment of system achieves an overall accuracy of 90% against multiple scenarios of slow and fast bursts/leakages detection.With the increase in size of leakage/bursts, the accuracy of the proposed algorithm increases and follows ±4% bounds of linearly increasing curve.It is found that daubechies and symlet wavelets perform very well than haar wavelets due to comparatively complex decomposition in both wavelets.The higher decomposition levels are more accurate specifically to leak detection application.It has been noticed that eight-level decomposition shows much better performance than low level wavelet analysis for leakage detection.For eighth level wavelet decomposition, the signal to noise ratio is higher than its low level decomposition.Through extensive experimentation results, we found that SNR of six-level decomposition shows satisfactory performance for denoising in our system considering the memory constraint of wireless sensor nodes.All these findings prove the validity and effectiveness of our proposed monitoring system.

Conclusion
In this paper, we described how leakage and bursts detection in WSNs come with several different techniques, each with its specifications.The overall dominating factor is the trade-off between energy efficiency and leakage/burst event detection accuracy.Systems that operate distributedly pave the way towards deployments that can both provide highly accurate event detection and save redundant wireless communication.
Our leak/burst detection and localization technique combines wavelet transform and optimal filtration coupled with distributed processing of our leak detection algorithm in WSN.Very few efforts exist in this regard.The results are very encouraging and we were able to achieve detection accuracy up to 90 percent under different deployment scenarios.The leakage detection algorithm has been implemented in a distributed manner in WSNs to support the above statement.The proposed method has the desirable features of distributed computing and efficient leak detection.The wavelet transform proves to be an analytical tool for feature extraction for analysis and adjustment of noisy signals in WSNs.It can be seen that proposed leakage detection algorithm demonstrated outstanding performance in terms of distance range, accuracy, and detection time.
The algorithm and results presented in this paper are based on sets of experiments where slow and fast bursts/leakages are emulated above ground using manual valves.The results indicate that the proposed techniques hold promise for extension to more challenging scenarios.In next program of tests, we plan to include leakage localization, size estimation, and distance calculation from source along with emulation of underground pipeline bursts/leakages.An interesting area to investigate is extension of leakage detection algorithms in machine learning domain requiring little or no prior training for detection of leakages.Authors have the same work as one of the future works in progress.

Figure 1 :
Figure 1: Signal processing approaches for leakage detection.

Figure 3 :Figure 4 :
Figure 3: Pressure evolution of leakage along the pipeline as a function of time.(a) Pressure profile in the absence of leak.(b) Pressure profile in the presence of a 3.5-inch leak size.

Figure 5 :Figure 6 :Figure 7 :
Figure 5: The sensor board microcontroller with peripherals and interfaces for data collection and communication.

Figure 8 :Figure 9 :
Figure 8: Original pressure signal, wavelet denoised signal, and wavelet compressed signal with a sampling rate of 38.4 kbps.

Figure 12 :
Figure 12: Schematic diagram of the pipeline testbed.

Figure 15 :
Figure 15: Performance parameters of distributed leakage detection algorithm under different scenarios.

Figure 16 :Figure 17 :
Figure 16: Pressure signature of leakage and burst pipeline as a function of time.

Figure 18 :
Figure 18: Energy of network versus number of sensing nodes.
Architecture of our test pipeline system. in this network.Four of them are end nodes designated as  1 ,  2 ,  3 ,  4 and two are cluster head nodes.Waspmote has been used as sensor node in the network[39].All these sensor nodes have a number of sensors like temperature, pressure and humidity sensors, and so forth.Some of the features of waspmote are microcontroller: AT mega 1281, frequency: 8 MHz, SRAM: 8 Kb, EEPROM: 4 KB, and flash: 128 Kb.In order to check the validity of sensor reading, we cross-check data in a predefined offline dictionary to separate the garbage data.In this way readings from the pressure sensors are obtained along with the battery status of node.The data acquisition is performed by nodes  1 ,  2 ,  3 , and  4 .
ForInternational Journal of Distributed Sensor Networks pipeline orientation monitoring, a precision accelerometer is embedded on the board.The board is powered by a rechargeable battery.A 2-cell 7.4 V lithium polymer battery pack is used with the high capacity of 13,500 mAh.The wireless sensor data aggregator board is designed in such a way that it minimizes current leakages in circuitry.This board is capable of working under high industrial temperature range (−40 to 85 ∘ C), with the LCD operation till −75 degrees.
transceiver can provide an outdoor range of 3200 m (2 miles), indoor range of 90 m (300 ft), transmit power of +18 dBm, and receiver sensitivity of −102 dBm.A touchscreen color LCD interface is provided for user input to set tunable parameters and display them for user interaction.The LCD is 2.4  diagonal in size, has 240 × 320 pixels with white LED back light, and can operate in the range of −75 to +70 ∘ C.