Water Monitoring Sys

download Water Monitoring Sys

of 13

Transcript of Water Monitoring Sys

  • 8/13/2019 Water Monitoring Sys

    1/13

    NAWMS: Nonintrusive Autonomous Water MonitoringSystem

    Younghun Kim, Thomas Schmid, Zainul M. Charbiwala,

    Jonathan Friedman, Mani B. Srivastava

    Networked and Embedded Systems Lab.Electrical Engineering Department

    University of California, Los Angeles, CA 90095, USA{kimyh,thomas.schmid,zainul,jf,mbs}@ucla.edu

    ABSTRACT

    Water is natures most precious resource and growing de-mand is pushing fresh water supplies to the brink of non-renewability. New technological and social initiatives thatenhance conservation and reduce waste are needed. Provid-ing consumers with fine-grained real-time information hasyielded b enefits in conservation of p ower and gasoline. Ex-tending this philosophy to water conservation, we introducea novel water monitoring system, NAWMS, that similarlyempowers users.

    The goal of our work is to furnish users with an easy-to-install self-calibrating system that provides information onwhen, where, and how much water they are using. The sys-tem uses wireless vibration sensors attached to pipes and,thus, neither plumbing nor special expertise is necessaryfor its installation. By implementing a non-intrusive, au-tonomous, and adaptive system using commodity hardware,we believe it is cost-effective and widely deployable.

    NAWMS makes use of the existing household water flowmeter, which is considered accurate, but lacks spatial granu-

    larity, and adds vibration sensors on individual water pipesto estimate the water flow to each individual outlet. Com-pensating for manufacturing, installation, and material vari-abilities requires calibration of these low cost sensors toachieve a reasonable level of accuracy. We have devisedan adaptive auto-calibration procedure, which attempts tosolve a two phase linear programming and mixed linear ge-ometric programming problem.

    We show through experiments on a three pipe testbedthat such a system is indeed feasible and adapts well tominimize error in the water usage estimate. We report anaccuracy, over likely domestic flow-rate scenarios, with long-term stability and a mean absolute error of 7%.

    Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.SenSys08,November 57, 2008, Raleigh, North Carolina, USA.Copyright 2008 ACM 978-1-59593-990-6/08/11 ...$5.00.

    Categories and Subject Descriptors

    H.4 [Information Systems Applications]: Miscellaneous

    General Terms

    Algorithms, Design, Experimentation, Human Factors, Mea-

    surement, Performance, Theory

    Keywords

    Adaptive Sensor Calibration, Machine Learning, Water FlowRate Estimation, Nonintrusive and Spatially DistributedSensing, Tiered Information Architecture, Parameter Esti-mation via Optimization

    1. INTRODUCTIONBob hears about water conservation all the time. He is

    told that if every citizen consumed water moderately, oursupplies would last forever. But, what is moderate? Ishe wasting water? He decides to consult his utility bill,but quickly realizes that the monthly usage is for the wholehouse. What he needs is a system that can tell him notjust how much water is being used, but where it gets used,when, and by whom. Having a system prompt him in real-time about usage for every outlet in the house puts him ina better position to discover wastage and make corrections.

    The problem Bob faces applies to any resource a house-hold consumes. Most utilities do not provide the spatial andtemporal granularity needed for household members to ef-fectively reduce their resource consumption, since it wouldmean higher installation and infrastructure cost. The sys-tems currently in place are adequate for their billing pur-poses.

    McMakin [28], Ester [18] and Stern [38] show in theirstudies that providing fine-grained consumption information

    helps consumers pinpoint waste, and enables improved ef-ficiency. They also show that consumers are motivated toconserve, do the right thing, and reduce expenses. At amacroscopic level, conservation improves a countrys overallresource management. For example, the U.S. Environmen-tal Protection Agency claims that 3 trillion gallons of wa-ter could be saved each year if every household in the U.S.decreased its water consumption by 30 p ercent [41]. Thisresults in a dollar-volume saving of $49.3 million per day, ormore than $18 billion a year! Water conservation is of evengreater financial significance as increasing purification cost

  • 8/13/2019 Water Monitoring Sys

    2/13

    is being compounded by rapid demand growth. Americanpublic water supply and treatment facilities consume about56 billion kWh per year enough electricity to power over5 million homes [41]. To make things worse, higher globaltemperatures are affecting our fresh water reserves in ice andsnow caps. The Water Poverty Index [10] illustrates that anurgent global initiative toward conservation is necessary.

    The first step toward conservation is measurement [18,28,38]. For electricity, small power monitoring sensors have

    emerged [15], but they are too expensive to be installed onevery electric appliance. For water, there is nothing anal-ogous available. Current consumer-grade water flow me-ters are meant to be installed inline, requiring non-trivialplumbing, best handled by a professional. Thus, conven-tional means of deriving high resolution data would comewith high installation cost. In some cases, where spatiallydense water monitoring systems are essential for correct op-eration, this is justifiable (e.g. irrigation systems [9] or phar-maceutical manufacturing plants).

    The challenge is designing a system that provides the sameresolution at a cost and effort that is reasonable for house-hold use. To this end, we propose NAWMS: a scalable watermonitoring system capable of estimating water flow rate us-

    ing wireless sensor network technology. NAWMS uses inex-pensive vibration sensors attached externally to pipes. Thisreduces both cost and effort of installation. Inexpensive sen-sors and their un-controlled installation, however, introducenoise and variability in the measurements. NAWMS uses anovel feedback optimization formulation that continuouslyrecalibrates the sensors, thus minimizing the estimation er-ror for the total water consumption.

    The contribution of this paper is three fold:

    Well Defined Tiered Information Architecture:We introduce a well defined tiered information archi-tecture. The first tier is accurate but spatially coarsegrained. The second tier is less accurate but spatiallyfine grained. We exploit the two-tiered information

    architecture to achieve spatially fine grained and ac-curate results(Fig. 1).

    Realistic Modeling of a Water Monitoring System:

    A sensor system needs to capture realistic constraintssuch as external noise, physical limitations and char-acteristics, and performance requirements. Our modeltakes these into account in order to compensate forside-effects.

    Autonomous and Adaptive Calibration:A sensor system often suffers from complex calibration,and its periodic recalibration increases maintenancecost. A well defined performance metric that evaluates

    the system on the fly, and an optimization problemformulation that yields calibration parameters, enablethe system to autonomously and adaptively calibratethe water monitoring system while regulating its per-formance.

    The rest of the paper is structured as follows. Section 2presents related work. We continue by describing the con-ceptual system architecture of NAWMS in Section 3. InSection 4 we formulate the mathematical challenges and in-troduce several optimization problems to solve them. Our

    system evaluation can be found in Section 6, where we de-scribe our prototype and present the achieved system perfor-mance. Finally, Section 7 contains future work for NAWMS.

    2. RELATED WORKThere are two broad classes of related work: (a) Infras-

    tructure monitoring for activity classification and mainte-nance, and (b) water flow rate measurement techniques.

    Infrastructure provides useful behavioral information aboutits inhabitants and often times this information can be ex-tracted through simple interfaces and means. For example,Patel [31] monitors the electrical noise within the power-lines of a house. They exploit the fact that each applianceintroduces a unique noise signature. By detecting and iden-tifying this signature, they can infer if an appliance is onor off but not its actual p ower consumption. Fogarty [21]investigated monitoring of the plumbing system by usingmicrophones on pipes to infer water activity in a household.Both systems are easy to install but employ complex cali-bration mechanisms in order to learn the detection patterns.Though these systems capture user behavior, we considerthem incomplete for conservation because they do not esti-mate actual consumption numbers.

    At a larger scale, cities are struggling with the mainte-nance of aging water distribution and treatment systems.Stoianov [39] describes an interesting prototype sensor net-work that can monitor different water characteristics in real-time. In a lab setup, they demonstrated how one can detecta water leak in a pipe, by analyzing the frequency spectrumof an accelerometer. Even though they use similar hard-ware, Stoianovs system has a completely different goal anduses a different mathematical approach.

    Methods to measure the water flow rate, or more gener-ally the flow of liquid in pipes, is of great interest to manyfields. For example, chemical processes often require precisecontrol over fluid flow [37], agricultural irrigation networksneed monitoring to avoid over-watering [36], and utility com-panies deploy inline water flow meters for billing purposes.The methods could be divided into two categories: (a) openchannel water monitoring/discharged water monitoring and(b) water flow rate estimation in closed pipes.

    Large scale irrigation systems generally use open channelsto distribute water to different areas. Trimmer [40] describesa way to estimate the discharged water flow rate by observ-ing the water level and pipe diameter. Bankston [3] provideslook-up tables that map manually obtained observations tothe flow rate of an open channel. Unfortunately, this methodis laborious and lacks real-time response.

    Modern irrigation networks leverage wireless sensor net-work technology to monitor the water flow rate in each waterchannel. Additionally, they use this information to regu-late the flow rate in real-time. These distributed irrigation

    control systems are a showcase for wireless sensors and ac-tuators that deliver optimal water volume for agriculturalirrigation [9].

    Measuring the flow rate of a liquid in a closed pipe is fur-ther divided into two categories: inline direct flow measure-ment and non-intrusive flow estimation. The most commonexample of inline flow measurement is the main water flowmeter in a household that utility companies install. Thesemeters use a mechanical turbine that spins at an angularvelocity proportional to water flow rate. The constant ofproportionality is the exact diameter of the flow chamber,

  • 8/13/2019 Water Monitoring Sys

    3/13

    Figure 1: NAWMS system and information architecture

    which is estimated though factory calibration. Thus, count-ing the number of rotations of the turbine yields directly theflow rate in the pipe. The disadvantage of this technique isthat it needs to be installed between pipes segments, re-quiring plumbing expertise. This is feasible during initialconstruction, but retrofitting pipes is tedious and expensive.

    Several techniques for a non-intrusive flow rate estima-tion exist. The most common one uses ultrasound [19].This technique is based on an ultrasound transmitter andreceiver pair that either measures the induced doppler shiftin the received signal, or the transmission time within theliquid medium. Unfortunately, commercially available de-vices [16] cost over $1000 a unit and require delicate instal-lation. Thus, they are reserved for industrial, or diagnostictesting purposes.

    An innovative technique described by Evans [20] exploitsthe vibration induced by the flow of liquid in pipes. Thistechnique is potentially cost-effective, since it uses an ac-celerometer, and the data processing is trivial. However, itrequires careful calibration because the vibrations dependheavily on the pipe material used and the sensor-to-pipe at-

    tachment.NAWMS combines the pre-installed inline flow meter (first

    information tier) with non-intrusive inexpensive vibrationbased sensors (second information tier) in order to providean accurate per pipe flow rate. NAWMS exploits the highaccuracy of the first information tier to autonomously cali-brate the less precise, though spatially finer grained, secondinformation tier.

    3. NAWMS SYSTEM ARCHITECTUREA sensor usually measures a physical phenomenon indi-

    rectly. For example, a temperature sensor exploits thermalvariation of resistance, a light sensor measures photo con-ductivity, etc. Due to this indirectness, a sensor needs cali-

    bration to establish a mathematical mapping between sensorreadings and the physical phenomena. Some sensors can bebought factory calibrated, and some dont even need cali-bration. One example is the inline water flow meter. Sinceits package dimensions are known during fabrication, thereis a well defined relation between turbine speed and flowrate. Unfortunately, it is infeasible to retrofit a householdor an entire building with these sensors. For this reason, weneed a system that indirectly measures water flow within apipe.

    3.1 Tiered Information ArchitectureWe propose NAWMS, a two tiered information architec-

    ture that consists of one accurate pre-calibrated sensor thatprovides us with the sum of all flows and an uncalibratedvibration sensor for each individual pipe (Fig. 1). This ar-chitecture has three characteristics:

    The first tier is reliable, and the service provider main-tains it. A user does not have to worry about its ac-

    curacy or correct operation.

    The calibration of the non-intrusive vibration basedwater flow sensors can be automated considering thecorrelation between the first and second tier informa-tion sources.

    The first tier is ground truth that is always available.This allows the system to compute and adapt the cal-ibration parameters continuously.

    3.2 Hardware and Software ArchitectureThe system consists of three main hardware and software

    components with the following associated challenges:

    Tapping Into Existing Infrastructure: The main watermeter provides accurate water flow rate for the entirehousehold. However, a mechanism is needed to extractreadings with high fidelity for the NAWMS system.

    Spatially Distributed Vibration Based Water Flow RateSensors: Accelerometers measure the vibrations ac-cording to the microscopic water flow model in a pipe.These accelerometers need to be calibrated in order toachieve a good estimate.

    Information Fusion Algorithm: Calibration requires alot of time and human intervention. In this paper wepropose several optimization formulations that enablethe system to calibrate its parameters and coefficientsautomatically using an open source optimization tool-box.

    3.2.1 Tapping Into Existing Infrastructure

    There are several commercially available products [1, 2,25] that allow one to interrogate the main water meter inreal-time. Various types of pulsers [25] provide a pulsetrain that is proportional to the water flow rate in the pipe.A microcontroller based circuit, such as a sensor moteutilizing its built-in interrupts and timers, can easily decodesuch a signal providing real-time water flow information.

    Another approach was described by Chueng [12]. Histechnique uses a hall effect sensor that picks up a varyingmagnetic field produced by the spinning collector unit. Hereports volume measurements with a resolution of 0.005 gal-

    lon.Fortunately, a better solution is expected in the near fu-

    ture. The Automatic Meter Reading Association [2] andthe American Water Works Association [1] are developinga system that relays real-time meter information wirelesslyfor billing purposes. Two products, one from Germany [17],and another from the UK [35] are already available. Follow-ing the trend of utility companies simplifying their billingsystems through wireless technologies, we believe that ex-tracting data from the main water meter of a household inreal-time will soon be commonplace.

  • 8/13/2019 Water Monitoring Sys

    4/13

    Figure 2: Microscopic view of the water flow in a pipe.

    3.2.2 Non-intrusive Water Flow Rate MeasurementUsing Vibration Sensors

    As Evans described in [20], the flow rate in a pipe is pro-portional to the vibration of a pipe. We describe this ef-fect in further detail in Section 4.1. A sensor network nodeequipped with a one dimensional accelerometer is adequateto capture this signal since variance in the measured accel-eration is a measure of vibration. Estimating variance iscomputationally simple, and thus can be done locally. Thisresults in low communication load. We describe other de-tails of the prototype used in Section 6.

    3.2.3 Information Fusion, Optimization Toolbox, andAggregation Unit

    The data collected by the vibration sensors is sent to thefusion center, where the samples and the reading from themain meter are fused to solve the mathematical optimiza-tion problems introduced in Section 4.2. The solution calcu-lates the calibration parameters for the individual vibrationsensors, which can then be used to map to real-time flow ineach pipe.

    Many ready-to-use optimization problem solvers exist. Inour implementation, we use the CVX toolbox [8,14], an opensource convex optimization tool. Other advanced tools, suchas MOSEK [29], could also be used.

    4. PROBLEM DESCRIPTION ANDFORMULATION

    This section is further decomposed into the underlyingpipe dynamic theories, their application to household plumb-ing, and the resulting formal optimization problem state-ments.

    4.1 Water Flow Rate Estimation usingVibration Sensors

    4.1.1 Theory of Operation

    To understand how flow rate and vibration in a pipe arerelated, we cover the basics of its micro-model. Water mole-cules on average all travel in the main direction of flow,

    as depicted in Figure 2. However, many molecules collideagainst the pipe wall. According to the first law of thermo-dynamics, some part of this kinetic energy converts to heatas the turbulent eddies dissipate, but most of it translatesinto potential energy in the form of pressure [32]. The pipe,in turn, deforms converting potential to kinetic (during de-formation) and back to potential as deformation completes.The elasticity of the pipe material applies a restoring force.Evans shows [20] that vibration in a pipe results from thisenergy conversion cycle and is proportional to the averageflow rate within the pipe.

    0 0.5 1 1.5 2 2.5 30

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    Vibration to Water Flow Rate

    Vibration

    WaterFlowRate(L/s)

    Figure 3: Measured pipe vibration for different flow ratesfor a 3/4 copper pipe.

    The main result of Evans work is based on the fact thatthe velocity of a fluid at a point in the pipe can be decom-

    posed into the time average velocity(u, v) and fluctuatingvelocity(u, v). Although there is no net flow in the perpen-dicular direction to the pipe axis, the time averaged velocityin that direction v is zero, the time average of their productuv are, in general, negative.

    From a non-trivial derivation by Evan et. al., we see

    2y

    t2 =CE I

    4y

    x4 =Cp(x) (1)

    where,C= g

    A

    A : cross sectional area of the beam : specific weight of the beamg : gravity

    EI : flexural rigidity.This essentially indicates that the transverse accelerationof the pipe is proportional to the pressure fluctuations in thefluid.

    The principle of operation is based on the relationshipbetween the standard deviation of the pipe vibration and themean flow rate of the fluid in the pipe. Blake stated in [5]that the generation of vibration by fluid motion involves thereaction of fluids and solids to stresses imposed by time-varying flow. For dynamically similar flows, the ratio of theflow fluctuations to the average flow is constant. Bird shows[4] this relationship by noting that the oscillatory term is thetime average of the absolute magnitude of the oscillation,given by

    mwhere m = u2. They define this as intensity

    of turbulence, which is a measure of the magnitude of the

    turbulent disturbance, and is given by mu .From the definition of turbulent flow, the intensity of tur-

    bulence expression is rearranged as

    m

    u2 =

    1

    N

    PNi=1

    [ui(t) u]2u2

    (2)

    where,u: average velocityu: instantaneous velocity.

  • 8/13/2019 Water Monitoring Sys

    5/13

    0 2 4 6 8 10 120

    0.05

    0.1

    0.15

    0.2

    0.25

    Vibration to Water Flow Rate

    Vibration

    WaterFlowRate(L/s)

    Figure 4: Measured pipe vibration for different flow ratesfor a 3/4 PVC pipe.

    Multiplying both side by the number of points Nand u2,and dividing by N1, we get

    1

    N1NXi=1

    [ui(t) u]2 = N CN1 u

    2 =Ku2 (3)

    This shows that the flow fluctuations are proportional tothe pressure fluctuations and the pressure fluctuations areproportional to the pipe vibration. It follows that the stan-dard deviation of the pipe vibration is proportional to theaverage flow rate. This result does not necessarily implythat the water flow rate in a pipe is linearly proportionalto the vibration of the pipe. Instead, it implies that it hasa non-linear but proportional relation due to the non-linearcharacteristics of vibration sensors, pipe structure, turbu-lence, etc.

    The end result eq. 3 gives an important point that regard-less of the pipe mounting methods, shape, and topology, atany exposed point on a pipe we can find a signal that isstrongly correlated with the water flow rate at that point.

    4.1.2 Vibration to Flow Rate Model

    To verify the theory explained in Section 4.1.1 we con-ducted a simple experiment. We attached accelerometerson two different pipes, a copper and a PVC pipe. We mea-sured the vibration occurring on the pipes while changingthe flow rate of the water running through it. Figure 3 and4 illustrate the result. To find a mathematical relationshipbetween vibration and flow rate, we tested the applicabilityof various models, details of which we cover in Section 6.1.1.We found that a third order root function,

    f(t) = 3p

    v(t) +p

    v(t) +v(t) +, (4)

    where f(t) is the water flow rate, and v(t) the measuredvibration, fit the measured data well. We use this functionhenceforth to map the measured vibration to the actual wa-ter flow rate in the pipe.

    4.2 Simple Pipe StructureIn this section, we formulate the large scale water flow

    rate monitoring system for the pipe topology depicted inFigure 5. The system consists of the main water meter,

    Figure 5: Simple pipe topology where one main pipe withflow rate M(t) splits up into N subpipes.

    and one vibration sensor on each of the N sub-pipes. Thewater meter provides the system with the real-time waterflowM(t), an accurate measurement for the main pipe. Wedenote the flow rate in each sub-pipe i, fi(t). Since all thesub-pipes are connected to the main pipe (assuming no leaksin the system), we have

    M(t) =N

    Xi=1 fi(t). (5)where,fi(t) = i 3

    pvi(t)+i

    pvi(t)+ivi(t)+ias defined

    in the last section.The goal of the calibration is to find the calibration pa-

    rameters i, i, i and i for each sub-pipe. One possibilitywould be to attach a flow meter to each sub-pipe and cali-brate each pipe individually. But this is tedious and involvesmanual effort. A better way is formulating a mathematicaloptimization problem that estimates these parameters si-multaneously.

    Assume that the sensors are synchronized, and that theysample the vibration every t seconds. Thus, Equation 5in discrete-time becomes M(kt) =

    PNi=1

    fi(kt). Aftercollecting K samples of M(t) every t second, we get Kequalities

    M(kt) =NXi=1

    fi(kt) for k = 1, 2, 3,...,K. (6)

    We define

    M def

    = [M(t), M(2t),...,M(Kt)]T

    F def

    =

    " NXi=1

    fi(t),NXi=1

    fi(2t), ...,NXi=1

    fi(Kt)

    #T.

    We now formulate Equation 6 as an optimization problembecause M = F holds true, unless there is water leakage.Thus, the optimization problem is written as

    min ||M F||1

    sub ject to 0fi(kt)fi,max. (7)Note that M(kt) and vi(kt) are measurements from

    the sensors, and i, i, i and i are the decision variables.Additionally, the problem consists of linear constraints only,and its objective function is also be expressed as a linearfunction [6]. Therefore, any available Linear Programmingsolver can solve this problem very efficiently, and it guaran-tees a global optimum.

  • 8/13/2019 Water Monitoring Sys

    6/13

    Figure 6: More realistic pipe topology where sub pipes cansplit up into sub-sub pipes.

    The solution to the problem yields the calibration param-eters for each individual pipe. Thus, no human interventionis necessary in order to calibrate the system, since every-thing is be automated.

    4.3 General Pipe StructureThe plumbing system in a typical household is far more

    complicated than the simplified structure assumed in theprevious section. We show in this section how even a com-plex structure can be reduced into several optimization prob-lems, and that each of these problems is similar to Equation7. This allows us to focus on the simple structure thereafterwithout loss of generality.

    Consider the pipe structure depicted in Figure 6. Assum-ing no leakage, the total flow rate M(t) is equal to the sumof the flow rates of each sub pipe. Similarly, the flow rate ofeach sub pipe is to the sum of the flow rate of its sub-subpipes. Thus, from the law of mass conservation, we get thefollowing equalities:

    fi(t) =

    JiXj=1

    fi,j(t)

    M(t) =NXi=1

    fi(t), (8)

    where, fi,j is the flow of sub-sub pipe j of sub pipe i andJi is the number of sub-sub pipes of sub pipe i. Similar

    to fi(t), we define fi,j(t) def

    = i,j 3p

    vi,j(t) + i,jp

    vi,j(t) +i,jvi,j(t) + i,j.With these equations, we formulate a newoptimization problem similar to Equation 7:

    min ||M F||1

    sub ject to 0

    fi(kt)

    fi,max (9)

    where

    fi(kt) =

    8