data-driven approach to short-term forecasting of ... · data-driven approach to short-term...

8
CCWI 2017 – Computing and Control for the Water Industry Sheffield 5 th - 7 th September 2017 Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network Gregory Meyers 1 , Zoran Kapelan 2 , Edward Keedwell 3 1,2,3 Centre for Water Systems, University of Exeter, Exeter, EX4 4QJ, UK 1 [email protected] ABSTRACT Water discolouration is an increasingly important and expensive issue due stricter regulatory demands and ageing Water Distribution Systems (WDSs) in the UK and abroad. This paper presents a turbidity forecasting methodology capable of aiding operational staff and enabling proactive management strategies. The methodology presented here does not require a hydraulic or water quality network model that can be expensive to build and maintain. The methodology is tested and verified on a real UK trunk main network with observed turbidity measurement data. Results obtained show that the classification based forecasts of turbidity can reliably detect if discolouration material is mobilised up to 5 hours ahead. The methodology could be used as an early warning system to enable a range of proactive management strategies as an alternative to regular trunk mains cleaning. Keywords: Discolouration, Machine Learning, Random Forrest 1. INTRODUCTION Water discolouration is an increasingly important issue due to ageing water distribution systems in the UK and abroad. With ever stricter regulatory standards on discolouration contacts there is an increasing need for improved turbidity modelling tools. This has been reflected by regulatory bodies placing heavier incentives and penalties for water quality related issues [1]. While improvements have been made to reduce discolouration, it is still often dealt with in a reactive way by water companies [2], [3]. This is typically done in the form of cleaning parts of the network once a number of discolouration contacts are reported in that area. Discolouration is complex and not completely understood with bulk water quality, temperature, network layout, pipe material and age all believed to be contributing factors [4]–[8]. Trunk mains have been categorized as especially high discolouration risks as their size allows for them to act as a form of a reservoir for discolouration material build up [9]. Trunk mains can take on a passive role of slowly sending material downstream to build up in other distribution pipes or an active role by virtue of a widespread high consequence discolouration event if the discolouration material is rapidly mobilised. However, the substantial consequences and logistical complexities related to trunk mains mean that corresponding cleaning programs are expensive and hard to implement. This has resulted in rare trunk main cleaning programs typically carried out only in situations where the benefits are clearly apparent [10]–[12].

Upload: truongngoc

Post on 06-Sep-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017

Data-driven Approach to Short-Term Forecasting of Turbidity in aTrunk Main Network

Gregory Meyers1, Zoran Kapelan2, Edward Keedwell3

1,2,3Centre for Water Systems, University of Exeter, Exeter, EX4 4QJ, [email protected]

ABSTRACT

Water discolouration is an increasingly important and expensive issue due stricter regulatorydemands and ageing Water Distribution Systems (WDSs) in the UK and abroad. This paperpresents a turbidity forecasting methodology capable of aiding operational staff and enablingproactive management strategies. The methodology presented here does not require a hydraulic orwater quality network model that can be expensive to build and maintain. The methodology istested and verified on a real UK trunk main network with observed turbidity measurement data.Results obtained show that the classification based forecasts of turbidity can reliably detect ifdiscolouration material is mobilised up to 5 hours ahead. The methodology could be used as anearly warning system to enable a range of proactive management strategies as an alternative toregular trunk mains cleaning.

Keywords: Discolouration, Machine Learning, Random Forrest

1. INTRODUCTION

Water discolouration is an increasingly important issue due to ageing water distribution systems inthe UK and abroad. With ever stricter regulatory standards on discolouration contacts there is anincreasing need for improved turbidity modelling tools. This has been reflected by regulatory bodiesplacing heavier incentives and penalties for water quality related issues [1].

While improvements have been made to reduce discolouration, it is still often dealt with in areactive way by water companies [2], [3]. This is typically done in the form of cleaning parts of thenetwork once a number of discolouration contacts are reported in that area.

Discolouration is complex and not completely understood with bulk water quality, temperature,network layout, pipe material and age all believed to be contributing factors [4]–[8].

Trunk mains have been categorized as especially high discolouration risks as their size allows forthem to act as a form of a reservoir for discolouration material build up [9]. Trunk mains can takeon a passive role of slowly sending material downstream to build up in other distribution pipes or anactive role by virtue of a widespread high consequence discolouration event if the discolourationmaterial is rapidly mobilised. However, the substantial consequences and logistical complexitiesrelated to trunk mains mean that corresponding cleaning programs are expensive and hard toimplement. This has resulted in rare trunk main cleaning programs typically carried out only insituations where the benefits are clearly apparent [10]–[12].

Page 2: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017In this paper, a classification based data driven methodology for short-term forecasting of turbidityis presented and validated on a real UK trunk main network. Prior work has showed that aregression based data driven methodology for forecasting turbidity was possible [13]. However, theArtificial Neural Network (ANN) model showed limited accuracy while only forecasting 15minutes ahead. This paper investigates an alternative classification approach by only predicting ifturbidity will be above or below a preselected turbidity threshold at a specific time horizon in thefuture. Multiple significantly longer forecast horizons will also be examined.

2. METHODOLOGY

2.1. Turbidity Forecast

The model predicts if turbidity will be above or below a preselected turbidity threshold at a specifictime in the future at the analysed location in the WDS, where turbidity meter is located. This wayall the turbidity observations are put into one of two classes, Positive or Negative. If the turbiditymeasurement is above the preselected threshold then it is counted as positive, otherwise it islabelled as negative. A model then predicts if the turbidity at a specific time in the future is positiveor negative.

After the model has predicted a class, the prediction is further divided into True or False dependingon if the prediction made was correct or not. A True Positive (TP) and True Negative (TN) is aprediction made by the model that was correct for their respective classes, while a False Positive(FP) and False Negative (FN) were incorrect predictions.

2.2. Model Input Variables

The data presented as inputs to the model is measurement data from the flow and turbidity metersupstream of the location where turbidity is forecasted. Recent historical data of flow and turbidity isneeded for the model to accurately predict the amount of discolouration material that has beenmobilised and length of time it will take that material to reach the downstream turbidity meter.However, the greater the number of inputs given to the model, the higher the likelihood that it willoverfit on the calibration data. Therefore a fixed number of time-lagged meter measurements aregiven to the model as an input at any one time, this is known as the sliding window method [14],[15]. Choosing too small a window size will not provide the models with enough information toaccurately reproduce the modelled system’s dynamics resulting in poor prediction performance.However, too large a window size can result in the overfitting described earlier and will requireincreased training times [16], [17]. The False Nearest Neighbours (FNN) algorithm was used tochoose the optimal window size for each meter [18].

In addition to the time lagged meter measurements, the peak flow and turbidity values of theprevious days and weeks for each meter was also given to the model as separate inputs. This hasbeen shown to improve forecast accuracy with only a relatively small increase in model complexity[13]. Forrest

2.3. Random Forest

A Random Forest (RF) was the chosen method to forecast turbidity as described above due to itsability to generalise complex non-linear relationships between potentially noisy inputs and outputs[19]. RFs can be considered as an ensemble of decision trees where each separate decision tree is aweak classifier. Good performance, scalability and generalisation can be achieved through anensemble of decision trees and the ‘bootstrapping’ of data. The Extra Trees RF variant was used

Page 3: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017here to further reduce the chance of overfitting on the calibration data [20]. The entropy splittingcriterion and 1000 weak classifiers were used in the RF. The only 10% of features were consideredwhen looking for the best tree split and the maximum depth of each tree was limited to 3.

2.4. Model Performance Metrics

As little to no discolouration can appear for numerous weeks at a time, less than 1% of the recordedturbidity observations are above 1 NTU. Because of this significantly disproportionate number ofnegatives (i.e. non-discoloration events), most error metrics that use the number of negatives as afactor in calculations are likely to be misleading. An example of this would be the Accuracy metricthat is the percentage of total observations that are correctly classified. However, a model that onlypredicts ‘negative’ would achieve at least 99% accuracy even though the model predicts nodiscolouration events.

The True Positive Rate (TPR) is the probability that the model will predict positive class valuescorrectly (i.e. turbidity above pre-specified threshold). For example, a TPR of 0.8 for a modelmeans that of the positive class values, the model will correctly detect 80% and miss 20% of actualevents.

FNTP

TPTPR

(1)

The False Discovery Rate (FDR) is the probability a model predicts a positive (i.e. a discolourationevent, as defined above) when in reality no such event occurred (also known as a false alarm). It isimportant to keep FDR low to ensure that operational staff maintain confidence in the system whenan alarm sounds.

TPFP

FPFDR

(2)

3. CASE STUDY

3.1. Description

Flow and turbidity measurements were taken from a section of a trunk main network over 11months, starting from 01/09/2013 to 01/08/2014. As shown in Figure 1Error: Reference source notfound, in addition to a flow meter placed just downstream of the upstream service reservoir, sixflow meters were placed at each network branch. The turbidity meter was placed just upstream of aflow meter at the inlet to the downstream service reservoir. The trunk main network is comprisedprimarily of ductile iron.

Page 4: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017

Figure 1. A trunk main network schematic showing the placement of flow and turbidity meters.

The flow and turbidity data was logged at 15 minute intervals with flow being recorded as the sumof water through the flow meter during that 15 minute interval. Turbidity was recorded as thecurrent turbidity passing through that turbidity meter exactly at the 15 minute interval.

The turbidity and flow data was split into calibration and validation sets where the first sevenmonths (01/09/2013 to 31/03/2014) were used for calibration and the following four months(01/04/2014 to 01/08/2014) were used for validation. As each meter logged once every 15 minutes,the 11 months of measurement data resulted in 32,160 15 minute timesteps with seven flow and oneturbidity measurement per timestep.

Two models with different preselected turbidity threshold values of 2 NTU and 4 NTU weredeveloped, tested and validated in the case study. The 2 NTU threshold was chosen as it issignificantly above normal turbidity levels and could be indicative of a discolouration event couldsoon occur. The 4 NTU threshold was chosen as it is the UK regulatory turbidity limit at customers’taps and a thus a 4 NTU warning would indicate a failure to meet this regulatory limit.

3.2. Results and Discussion

All results and figures shown below are from the unseen (i.e. validation or testing) data sets byusing models calibrated on seen (i.e. training) data sets.

Figure 2 shows the resulting TPRs and FDRs values for the 2 NTU and 4 NTU threshold models atdifferent forecasting horizons ranging from 1 to 7 hours. It can be observed here that it is possible toobtain high TPR values (e.g. values above 0.9) for forecast horizons of over 5 hours. At forecasthorizons of over 5 hours, the TPR shows a sharp drop for the 2 NTU threshold model. The FDRsimilarly shows a sharp increase for the 2 NTU threshold model and a minor increase for the 4 NTUthreshold model.

Page 5: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017

Figure 2. The validation performances of the 2 and 4 NTU threshold models across a range offorecasting horizons. The True Positive Rate (TPR) shows how well a model can detect events and

the False Detection Rate (FDR) gives the probability of a positive detection turning out to be afalse positive. Perfect results would show a TPR=1 and FDR=0.

The FDR can be misleadingly high as the majority of FPs that make up the FDR are not randomlyoccurring, but instead occur before and after real turbidity events. This is shown in Figure 3 wherethe 4 NTU threshold model is shown forecasting 5 hours and 20 minutes ahead. As it can be seenfrom this figure, the model correctly forecasts that turbidity will exceed the 4 NTU threshold hoursbefore any turbidity increase is observed. This clearly shows that the model is able to detect themobilisation of discolouration material via flow meter observations alone. However, the highnumber of FPs before and after the turbidity event shows that the model struggles to predict exactlywhen the discolouration material will reach the downstream turbidity meter. Because the modelsaccurately detected the mobilisation of discolouration material but struggled to estimate its traveltime to the downstream turbidity meter, the models learned to predict positive for all values close towhen the discolouration material was estimated to arrive.

While the prediction of positive for all values method ensures that TPs are not missed whichenables the models to have high TPRs for long lead times, it also means that many FPs aregenerated which significantly raises the FDRs. For the 4 NTU threshold model forecasting 5 hoursand 20 minutes ahead, the FPs that occur in the window of 6 hours before and after all actual eventsaccount for 88% of FPs.

Page 6: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017

Figure 3. The 4 NTU threshold model forecasting 5 hours and 20 minutes ahead over a typicalevent in the validation set.

The largest reliable forecasting time horizon for both models in this trunk main network isdetermined to be just over 5 hours. This should provide water company operational staff with asufficient lead time to act on limiting or mitigating the discolouration event. This could be done byimmediately reducing flow rates to prevent further discolouration mobilisation or discarding thediscoloured water before it enters the downstream distribution network.

4. CONCLUSIONS

The methodology presented here takes current and past flow and turbidity measurements at anumber of upstream locations in the WDS to classify the turbidity at the downstream location asbeing above (or not) a pre-specified threshold. Two threshold values of 2 and 4 NTU and forecasthorizons ranging from 1 to 7 hours ahead were examined in the analyses. The methodology wastested and verified on a real water system in the UK with flow and turbidity measurement dataavailable for 11 months.

The results obtained showed it is possible to accurately forecast occurrence of turbidity above somepre-specified threshold and hence detect the corresponding discoloration event in a real system byusing a data-driven (i.e. non-physically based) methodology only. In a real water system analysedhere, accurate forecasts of turbidity events were be made up to 5 hours ahead. While the modelswere capable of accurately detecting if discolouration material was mobilized, they struggled toapproximate how long the material will take to reach the downstream turbidity meter.

The turbidity forecasting methodology developed and presented here is data-driven and hence doesnot require hydraulic or water quality (turbidity) type network model. Only readily available flowand turbidity data is needed from the trunk main network to forecast turbidity. This means the

Page 7: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017methodology has the potential to be transferable to WDS that have suitable meters installed andsufficient historical data already captured.

The methodology presented here can be used as an early warning system for discolouration eventswhich could enable a multitude of cost beneficial proactive management strategies that can beimplemented as an alternative to expensive trunk mains cleaning programs.

Future work will focus on further testing and validation of the methodology presented here onadditional real systems.

Acknowledgements

The authors are grateful to the Engineering and Physical Sciences Research Council (EPSRC) forproviding the financial support as part of the STREAM EngD project.

References

[1] OFWAT, ‘Serviceability outputs for PR09 final determinations’, 2009.[2] D. M. Cook, P. S. Husband, and J. B. Boxall, ‘Operational management of trunk main

discolouration risk’, Urban Water J., vol. 13, no. 4, pp. 382–395, 2015.

[3] E. J. M. Blokker, ‘Stochastic water demand modelling for a better understanding of hydraulicsin water distribution networks’, TU Delft, Delft University of Technology, 2010.

[4] E. J. M. Blokker and P. G. Schaap, ‘Temperature Influences Discolouration risk’, ProcediaEng., vol. 119, pp. 280–289, 2015.

[5] J. van Summeren, B. Raterman, E. Vonk, M. Blokker, J. van Erp, and D. Vries, ‘Influence ofTemperature, Network Diagnostics, and Demographic Factors on Discoloration-RelatedCustomer Reports’, Procedia Eng., vol. 119, pp. 416–425, 2015.

[6] J. H. G. Vreeburg, D. Schippers, J. Q. J. C. Verberk, and J. C. van Dijk, ‘Impact of particles onsediment accumulation in a drinking water distribution system’, Water Res., vol. 42, no. 16,pp. 4233–4242, Oct. 2008.

[7] S. Husband and J. Boxall, ‘Understanding and managing discolouration risk in trunk mains’,Water Res., vol. 107, pp. 127–140, 2016.

[8] K. Fish, A. M. Osborn, and J. B. Boxall, ‘Biofilm structures (EPS and bacterial communities)in drinking water distribution systems are conditioned by hydraulics and influencediscolouration’, Sci. Total Environ., vol. 593–594, pp. 571–580, Sep. 2017.

[9] D. M. Cook and J. B. Boxall, ‘Discoloration Material Accumulation in Water DistributionSystems’, J. Pipeline Syst. Eng. Pract., vol. 2, no. 4, pp. 113–122, 2011.

[10] S. Husband, R. Williams, and J. B. Boxall, ‘Discolouration risk management for trunk mains’,in Proceedings of the Water Distribution System Analysis Conference, Tucson, Arizona, ASCEConf. Proc., doi, 2010, vol. 10, p. 425.

[11] I. J. H. G. Vreeburg and D. J. B. Boxall, ‘Discolouration in potable water distribution systems:A review’, Water Res., vol. 41, no. 3, pp. 519–529, Feb. 2007.

[12] P. S. Husband, J. Whitehead, and J. B. Boxall, ‘The role of trunk mains in discolouration’,Proc. Inst. Civ. Eng. - Water Manag., vol. 163, no. 8, pp. 397–406, Sep. 2010.

[13] G. Meyers, Z. Kapelan, E. Keedwell, and M. Randall-Smith, ‘Short-term Forecasting ofTurbidity in a UK Water Distribution System’, Procedia Eng., vol. 154, pp. 1140–1147, 2016.

[14] T. G. Dietterich, ‘Machine Learning for Sequential Data: A Review’, in Structural, Syntactic,and Statistical Pattern Recognition, 2002, pp. 15–30.

Page 8: Data-driven Approach to Short-Term Forecasting of ... · Data-driven Approach to Short-Term Forecasting of Turbidity in a Trunk Main Network ... important and expensive issue due

CCWI 2017 – Computing and Control for the Water Industry Sheffield 5th - 7th September 2017[15] N. A. Gershenfeld, A. S. Weigend, and others, ‘The future of time series: learning and

understanding’, 1993.[16] H. D. I. Abarbanel, R. Brown, J. J. Sidorowich, and L. S. Tsimring, ‘The analysis of observed

chaotic data in physical systems’, Rev. Mod. Phys., vol. 65, no. 4, pp. 1331–1392, Oct. 1993.

[17] R. J. Frank, N. Davey, and S. P. Hunt, ‘Time Series Prediction and Neural Networks’, J.Intell. Robot. Syst., vol. 31, no. 1–3, pp. 91–103, May 2001.

[18] C. Rhodes and M. Morari, ‘The false nearest neighbors algorithm: An overview’, Comput.Chem. Eng., vol. 21, pp. S1149–S1154, 1997.

[19] L. Breiman, ‘Random Forests’, Mach. Learn., vol. 45, no. 1, pp. 5–32, Oct. 2001.[20] P. Geurts, D. Ernst, and L. Wehenkel, ‘Extremely randomized trees’, Mach. Learn., vol. 63,

no. 1, pp. 3–42, Apr. 2006.