<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JWARP</journal-id><journal-title-group><journal-title>Journal of Water Resource and Protection</journal-title></journal-title-group><issn pub-type="epub">1945-3094</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jwarp.2014.615132</article-id><article-id pub-id-type="publisher-id">JWARP-51682</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Earth&amp;Environmental Sciences</subject></subj-group></article-categories><title-group><article-title>
 
 
  Synthetic Reconstruction of Water Demand Time Series for Real Time Demand Forecasting
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>runo</surname><given-names>M. Brentan</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Lubienska</surname><given-names>C. L. J. Ribeiro</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Edevar</surname><given-names>Luvizotto Jr.</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Danilo</surname><given-names>C. Mendonça</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>José</surname><given-names>M. Guidi</given-names></name><xref ref-type="aff" rid="aff3"><sup>3</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Water Recourses Department, School of Civil Engineering, Unicamp, Campinas, Brazil</addr-line></aff><aff id="aff3"><addr-line>Company of Water Supply of Sao Paulo, Franca, Brazil</addr-line></aff><aff id="aff2"><addr-line>School of Technology, Unicamp, Limeira, Brazil</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>brunocivil08@gmail.com(RMB)</email>;<email>lubi@ft.unicamp.br(LCLJR)</email>;<email>josemguidi@gmail.com(JMG)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>19</day><month>11</month><year>2014</year></pub-date><volume>06</volume><issue>15</issue><fpage>1437</fpage><lpage>1443</lpage><history><date date-type="received"><day>11</day>	<month>September</month>	<year>2014</year></date><date date-type="rev-recd"><day>8</day>	<month>October</month>	<year>2014</year>	</date><date date-type="accepted"><day>2</day>	<month>November</month>	<year>2014</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  The forecasting of the demand applied to water supply systems has been an important tool to realize time control. The use of the time series to do the forecasting of the demand is the main way that has been used by researchers. By this way, the need of a complete time demand series increases. This work presents two ways to reconstruct the water demand time series synthetically, using the Average Reconstruction Method and Fourier Method. Both the methods were considered interesting to do the synthetic reconstruction and able to complete the time series, but the Fourier Method showed better results and a better fitness to approximation of the water consumption pattern.
 
</p></abstract><kwd-group><kwd>Water Demand Forecasting</kwd><kwd> Synthetic Reconstruction</kwd><kwd> Water Supply Systems</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The increase of the demand on the urban water supply systems and the need of accuracy on the control of these systems require an increase at the precision of the forecasting of the water demand. According to [<xref ref-type="bibr" rid="scirp.51682-ref1">1</xref>] , this activity in water supply systems becomes an essential tool for the design, operation, and management. The activities of operation and management of these systems require a short-term demand forecasting because these activities are done at real time or near real time and this control needed more information of the demand to supply the consumers with more quality and safety.</p><p>The short term forecasting can be done by the analysis of measured time series of consumption at the sector that is being controlled and managed, and the time demand series can be obtained by the measurement of water flow at consumption points or outflow of reservoirs or tanks for example.</p><p>Sometimes, these measurements are done by electronic apparatus which are subject to troubles such as electrical fail or data storage that jeopardize the data consistency and can harm the temporal series analysis.</p><p>Several methods to forecasting the water consumption have been proposed by researchers. [<xref ref-type="bibr" rid="scirp.51682-ref2">2</xref>] - [<xref ref-type="bibr" rid="scirp.51682-ref5">5</xref>] mostly use temporal series analysis and cross-relation. But a few works have been proposed to treat the problem of the synthetic complete of these series. To complete the fails occurred during the measurement of the demand data, this work proposes two methods: one based on daily average and monthly averages, another based on Fourier Series.</p></sec><sec id="s2"><title>2. The Demand Analysis</title><p>If a time series of water demand is observed, it is possible to see a periodic oscillation on the consumption of water. Furthermore, if the sector that is being managed is a residential sector, the oscillation is more known, because the consumption of water at a residential sector is widely studied. So it is possible to confirm that this oscillation will be repeated with a few variations at the values in a week [<xref ref-type="bibr" rid="scirp.51682-ref6">6</xref>] .</p><p>Another observation that is possible to do: the behavior of the demand follows a pattern according the day of the week. By this way, if a value of the demand is known at one time of one weekday, it’s expected a repeat of any value near of the known demand. The deviation of the expected demand can be justified because the value of the demand is affected by the weather factors such as rain, temperature variation, relative humidity [<xref ref-type="bibr" rid="scirp.51682-ref7">7</xref>] .</p><p>For this work, the analysis of the water demand was done using a real time series obtained with a measurement of the consumption of water in a residential urban sector at Franca, a city of the state of S&#227;o Paulo, Brazil. The measurement was done for 26 months every 20 minutes of all days.</p><p>The graphic at <xref ref-type="fig" rid="fig1">Figure 1</xref> and <xref ref-type="fig" rid="fig2">Figure 2</xref> can illustrate the behavior of the water demand at 24 hours for 5 days. The first shows the variation for 5 days at the same week and the second graphic shows the variation of the demand for the 5 same weekdays. At this work, the determination of the observation period of the water demand behavior was done with the analysis of a day that will be used for a validation of the purposed methods. Taking this day as a d-day, it is possible to take two days after and two days next with them measured demands and plotting these demands, it is possible to obtain the follow curves. These figures can help the analysis of the variation of the demand, confirming the repetition of the pattern of consumption said above.</p><p>At <xref ref-type="fig" rid="fig1">Figure 1</xref>, it is possible to observe a bigger variation of the demand among the days. The main information that the week of the analyzed day is the local variation of the demand by the weather factors. Looking for the week, it is possible to see the increase or decrease of the demand.</p><p><xref ref-type="fig" rid="fig2">Figure 2</xref> confirms the idea of the correlated behavior of the demand with the weekday. Take this information can be important to determine the reconstruction of the water time series because the pattern of the demand is repeated at a weekday.</p></sec><sec id="s3"><title>3. Average Reconstruction Method</title><p>The method of Averaged Reconstruction was developed based on the methods of synthetic reconstruction of rain time series and considering the demand variation showed above. The method uses the week pattern of consumption and the weekday pattern of consumption. With the measured demand of the two days after the analyzed day and two days next, it is possible to calculate the average consumption for each day and with this value, for each time of measurement, it is possible to determine a factor f<sub>1</sub>, which means the deviation between the demand of each measurement time and the average value.</p><disp-formula id="scirp.51682-formula1365"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x5.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x6.png" xlink:type="simple"/></inline-formula> is the week factor for day d to time-measurement i. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x7.png" xlink:type="simple"/></inline-formula>is the water demand measured at day d, at time i. And <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x8.png" xlink:type="simple"/></inline-formula> is the average water consumption for day d.</p><p>After, it is possible to calculate the average<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x9.png" xlink:type="simple"/></inline-formula>, called<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x10.png" xlink:type="simple"/></inline-formula>, and with this value, multiplying by the average demand it is possible to obtain an estimated value<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x11.png" xlink:type="simple"/></inline-formula>, the demand for each time of measurement i.</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Daily variation of water consumption in a week (considering 5 days)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/6-9402301x12.png"/></fig><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Week daily variation of water consumption for a Tuesday</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/6-9402301x13.png"/></fig><p>After the calculation of the<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x14.png" xlink:type="simple"/></inline-formula>, it can take two weekday ago and two weekday after the analyzed day that it wants to reconstruct the time series. Doing the same process to calculate<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x15.png" xlink:type="simple"/></inline-formula>, it can obtain another estimated value<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x16.png" xlink:type="simple"/></inline-formula>.</p><p>So is possible to compose a final demand <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x17.png" xlink:type="simple"/></inline-formula> with<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x18.png" xlink:type="simple"/></inline-formula>, and demand<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x19.png" xlink:type="simple"/></inline-formula>, as follow:</p><disp-formula id="scirp.51682-formula1366"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x20.png"  xlink:type="simple"/></disp-formula><p>where D<sub>i</sub> is the reconstructed water demand for the time i and w is the weight of the demand<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x21.png" xlink:type="simple"/></inline-formula>. This weight tries to ponder the importance of the information of the week compared with the information of the weekday.</p><p>With the value of the demand D<sub>i</sub>, it is possible to calculate the error E according the Equation (3):</p><disp-formula id="scirp.51682-formula1367"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x22.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x23.png" xlink:type="simple"/></inline-formula> is the measured demand for the time i.</p><p>The value of w is determined by a minimization of E, which shows the factor most important at composition of the final demand using the solver of the MS Excel 2007<sup>&#174;</sup>.</p><p>To validate this method, the work purposes a reconstruction of two days that was full measured and by this way evaluate the final value of E. <xref ref-type="table" rid="table1">Table 1</xref> shows the value of the function E for the two tested days.</p><p>Considering the method of the calculation the demand D<sub>1</sub> (Week average) and D<sub>2</sub> (Weekday average) the <xref ref-type="fig" rid="fig3">Figure 3</xref> and <xref ref-type="fig" rid="fig4">Figure 4</xref> above show the behavior of these reconstructed demands and the final demand D.</p><p>It is possible to observe the method can do a good reconstruction of the time series but it is not able to reproduce the big variation of the demand all day along as observed at time 35 (<xref ref-type="fig" rid="fig3">Figure 3</xref>) or 55 (<xref ref-type="fig" rid="fig4">Figure 4</xref>).</p></sec><sec id="s4"><title>4. Fourier Series Method</title><p>Knowing the repetition of the oscillation on the demand, this second method purposes the use of the Fourier series to reconstruct the time series of the water demand. The method uses a combination of sine and cosine those will be approximate the function to the measured data. The application of the Fourier series was inspired on the work of [<xref ref-type="bibr" rid="scirp.51682-ref8">8</xref>] that applies this method to model the behavior of the electrical residential demand, as well the water demand has a typical oscillation all day along.</p><p>The demand D<sub>i</sub> can be written as:</p><disp-formula id="scirp.51682-formula1368"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x24.png"  xlink:type="simple"/></disp-formula><p>The index j corresponds to the number of the terms of Fourier series. At this work, as showed at <xref ref-type="fig" rid="fig5">Figure 5</xref> and <xref ref-type="fig" rid="fig6">Figure 6</xref>, the number of terms was chosen as four because, like it is possible to observe at figures, there is a few</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Squatter error of the averaged method applied for two days</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Analyzed Day</th><th align="center" valign="middle" >Error (l/s)</th></tr></thead><tr><td align="center" valign="middle" >06/05/2012</td><td align="center" valign="middle" >0.19</td></tr><tr><td align="center" valign="middle" >07/28/2012</td><td align="center" valign="middle" >0.16</td></tr></tbody></table></table-wrap><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Behavior of the reconstructed demand for day 06/05/2012</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/6-9402301x25.png"/></fig><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> Behavior of the reconstructed demand for day 06/05/2012</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/6-9402301x26.png"/></fig><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> Behavior of the reconstructed demand for day 06/05/2012?Fourier Method</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/6-9402301x27.png"/></fig><p>improvements on the capacity of reproduction of the time series when the number of terms is changed of 3 for 4 terms (value of j). The value of x<sub>i</sub> can be obtained doing a transformation with the value i, the time of measurement, according the Equation (9).</p><p>According to [<xref ref-type="bibr" rid="scirp.51682-ref9">9</xref>] , it is possible to determine the coefficients of the Fourier series as follow:</p><disp-formula id="scirp.51682-formula1369"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x28.png"  xlink:type="simple"/></disp-formula><fig id="fig6"  position="float"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> Behavior of the reconstructed demand for day 07/28/2012</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/6-9402301x29.png"/></fig><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Squatter error of the Fourier Method applied for two days</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Analyzed Day</th><th align="center" valign="middle" >Error (l/s)</th></tr></thead><tr><td align="center" valign="middle" >06/05/2012</td><td align="center" valign="middle" >0.085</td></tr><tr><td align="center" valign="middle" >07/28/2012</td><td align="center" valign="middle" >0.087</td></tr></tbody></table></table-wrap><disp-formula id="scirp.51682-formula1370"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x30.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.51682-formula1371"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x31.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.51682-formula1372"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-9402301x32.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-9402301x33.png" xlink:type="simple"/></inline-formula> is the demand at time i for the day that want to do the reconstruction. Using the same days those was used to validate the Average Reconstruction Method, it was done a reconstruction of a measured time series. Below, the <xref ref-type="table" rid="table2">Table 2</xref> shows the value of the E function for this method.</p><p>The Fourier Method was more effective to reconstruct the time series of water demand. Besides the reduction of the squatter error, the graphic shows the less deviation at the shape of the behavior of the demand. The capacity of this method to represent de oscillation of the demand can justify the better results.</p></sec><sec id="s5"><title>5. Conclusions</title><p>The forecasting of demand, mainly the short term forecasting has been more important to definition of the operation at real time on the water-supply systems. The measurement of the demand to generation of a forecasting model, sometimes, has any fails that can give troubles to determine a reliable model. By this way, this work purposed two methods to do a synthetic reconstruction of water demand time series.</p><p>At first, the Averaged Reconstruction Method, whose fitness could be considered acceptable, though for some times, it is possible to observe a significant deviation between the measured data and the synthetic data. This deviation is observed because the technique was not able to complete all time series along. By <xref ref-type="fig" rid="fig3">Figure 3</xref> and <xref ref-type="fig" rid="fig4">Figure 4</xref> it is also possible to observe the improvement at fitness using the composition of the final demand by the reduction of this deviation.</p><p>The second method, Fourier Series Method, was able to determine with more accuracy the behavior of the demand all day along. The advantage of the Fourier method is the reduction of the deviation between the reconstructed demand and the measurement. But also this method was not able to reproduce the extreme variation of the demand some times of the day.</p><p>All methods can be applied to compose the study of the time series of the demand. Maybe the Fourier Method can be more efficient to define the unknown demands and can give more reliable forecasting model.</p></sec></body><back><ref-list><title>References</title><ref id="scirp.51682-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Herrera, M., Torgo, L., Izqueirdo, J. and Perez-Garcia, R. (2010) Predictive Models for Forecasting Hourly Urban Water Demand. Journal of Hidrology, 387, 141-150. http://dx.doi.org/10.1016/j.jhydrol.2010.04.005</mixed-citation></ref><ref id="scirp.51682-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Adamowski, J. (2008) Peak Daily Water Demand Forecast Modeling Using Artificial Neural Networks. Journal of Water Resources Planning and Management, 134, 119-128. http://dx.doi.org/10.1061/(ASCE)0733-9496(2008)134:2(119)</mixed-citation></ref><ref id="scirp.51682-ref3"><label>3</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Perry</surname><given-names> P.F. </given-names></name>,<etal>et al</etal>. (<year>1981</year>)<article-title>Demand Forecasting in Water Supply Systems</article-title><source> Journal of the Hydraulics Division</source><volume> 107</volume>,<fpage> 1077</fpage>-<lpage>1087</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.51682-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Santos, C.C. (2011) Forecast of Water Demand in the Metropolitan Region of San Paul with Artificial Neural Networks and Socio-Environmental and Weather Conditions. Doctor Theses, EPUSP, San Paul.</mixed-citation></ref><ref id="scirp.51682-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Silva, C.S. (2003) Multivariate Forecast of Water Demand in Urban Water Supply Systems. Previsao multivariada de demanda de água em sistemas urbanos de abastecimento. Doctor Theses, Unicamp, Campinas.</mixed-citation></ref><ref id="scirp.51682-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">An, A., Shan, C.C., Cercone, N. and Ziarko, W. (1995) Discovering Rules from Data for Water Demand Prediction. Proceedings in the Workshop on Machine Learning and Expert System (IJCAI’95), 187-202.</mixed-citation></ref><ref id="scirp.51682-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Lucas, S.A., Coombes, P.J. and Sharma, A.K. (2010) The Impact of Diurnal Water Use Patterns, Demand Management and Rainwater Tanks on Water Supply Network Design. Water Science &amp; Technology: Water Supply—WSTWS, 10, 69-80.</mixed-citation></ref><ref id="scirp.51682-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Magnano, L. and Boland, J.W. (2007) Generation of Synthetic Sequences of Electricity Demand. Application at South Australia. Energy, 32, 2230-2243. http://dx.doi.org/10.1016/j.energy.2007.04.001</mixed-citation></ref><ref id="scirp.51682-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Luvizotto, E.J. (1992) Analytical Representation of Characteristic Curves of Hydraulic Machines for Use in Computer Simulations routines. MSc. Thesis, EPUSP, San Paul.</mixed-citation></ref></ref-list></back></article>