Available online at www.sciencedirect.com
Environmental Modelling & Software 23 (2008) 729e740 www.elsevier.com/locate/envsoft
Predicting faecal indicator levels in estuarine receiving waters e An integrated hydrodynamic and ANN modelling approach B. Lin*, M. Syed, R.A. Falconer School of Engineering, Cardiff University, The Parade, Newport Road, Cardiff, Wales CF24 3AA, United Kingdom Received 15 February 2007; received in revised form 19 September 2007; accepted 21 September 2007 Available online 26 November 2007
Abstract A new EU Bathing Water Directive was implemented in March 2006, which sets a series of stringent microbiological standards. One of the main requirements of the new Directive is to provide the public with information on conditions likely to lead to short-term coastal pollution. The paper describes how numerical models have been combined with Artificial Neural Networks (ANNs) to develop an accurate and rapid tool for assessing the bathing water status of the Ribble Estuary, UK. Faecal coliform was used as the water quality indicator. In order to provide enough data for training and testing the neural networks, a calibrated hydrodynamic and water quality model was run for various river flow and tidal conditions. In developing the neural network model a novel data analysis tool called WinGamma was used in the model identification process. WinGamma is capable of determining the data noise level, even with the underlying function unknown, and whether or not a smooth model can be developed. Model predictions based on this technique show a good generalisation ability of the neural networks. Details are given of a series of experiments being undertaken to test the ANN model performance for different numbers of input parameters. The main focus has been to quantify the impact of including time series inputs of faecal coliform on the neural network performance. The response time of the receiving water quality to the river boundary conditions, obtained from the hydrodynamic model, has been shown to provide valuable knowledge for developing accurate and efficient neural networks. 2007 Elsevier Ltd. All rights reserved. Keywords: Bathing water quality; Faecal coliforms; Artificial Neural Networks; Nonlinear data analysis; Numerical models
1. Introduction Many epidemiological investigations of health risk and recreational water use, such as swimming, have suggested a link between water quality and illnesses such as: gastro-intestinal symptoms, eye infection, skin complaints, nose and throat infections (Pruss, 1998). The World Health Organisation (WHO) has been concerned with the health aspects of the management of recreational waters for many years and has established a systematic approach, known as the ‘Annapolis Protocol’ (WHO, 2000), for monitoring the water quality. In Europe the Bathing Water Directive (76/160/EEE) was designed to protect the public from health risks associated with accidental and * Corresponding author. Tel.: þ44 0 29 2087 4696. E-mail address:
[email protected] (B. Lin). 1364-8152/$ - see front matter 2007 Elsevier Ltd. All rights reserved. doi:10.1016/j.envsoft.2007.09.009
pollution incidents that could cause illness from recreational water use. Under the EU Directive the member states are required to designate bathing waters and monitor their quality throughout the bathing season. A revised Bathing Water Directive (06/7/EC) came into operation in March 2006, which sets a series of stringent microbiological standards that all member states must endeavour to observe. One of the main requirements of the Directive is to improve on the provision of public information of conditions likely to lead to short-term pollution, the likelihood of such pollution and its likely duration. These regulations have not only set the binding standards for bathing waters throughout the globe, but have also resulted in increased public awareness. The quality of bathing waters in the UK has become the major concern to water engineers and environmental managers in terms of public health. Pathogenic bacteria have always been
730
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
the principal cause for spreading health related problems and diseases in bathing waters. In dealing with pathogenic bacteria it is a common practice to measure and/or model the concentration levels of selected indictor organisms, since individual pathogens are generally difficult and expensive to measure (Thomann and Mueller, 1987). Faecal coliform (FC) is widely used as one of the key bacterial indicators in assessing the water quality in coastal waters. Bathing water quality is known to be highly variable and it often suffers from short-term deterioration, particularly during storm events. There will always be a time delay between a sample being taken and its microbiological quality being known. Therefore, regular sampling does little in informing the public on the water quality on a given day and the measurements are also of limited value in predicting the water quality conditions in advance. Two- and three-dimensional numerical models are frequently used to predict the concentration distributions of bacterial indicator organisms, and subsequently to assess the compliance of a particular site with the Bathing Water Directive. These models are generally based on numerically solving the equations of mass (fluid and solute), momentum and energy conservation, and they can provide relatively accurate predictions of both the spatial and temporal concentration distributions of pathogenic bacteria. However, these models require detailed boundary data of various hydrodynamic and water quality parameters, which are generally very expensive and time consuming to acquire. Moreover, such numerical models generally take a long time to run, even using modern computers. Therefore, numerical models still cannot be used as real-time decision support tools to predict imminent threats to public health risk caused by a sudden effluent spill, etc. Data driven models can offer an attractive way forward in providing speedy predictions for many such practical problems. Artificial Neural Networks (ANNs) provide one such data driven technique. ANNs have been found to be a powerful tool for solving different problems in a variety of applications, ranging from pattern recognition to prediction of various nonlinear systems. However, as with all data driven techniques, the development of ANN models requires a large amount of data. Hence, they are really useful in situations where a considerable body of good quality data exists. Unfortunately, in bathing water quality studies most of the known survey programmes are carried out either as long-term operations, with sampling being taken at a low frequency (e.g. weekly), or at high frequencies but with the period of data collection being very short (e.g. only a few days). Using only field measurements to obtain the amount of data needed by data driven models, such as the ANNs, is almost prohibitive in terms of effort and cost. Hence, in this study a calibrated numerical model was used to generate the input data for the neural networks. Such a numerical model also provides very useful information about the fate of bacterial organisms, including the dispersion and diffusion of solutes and the influence of the tidal cycle and riverine inflows; all of which have an important role on the bacterial transport and die-off. In using data from a deterministic numerical model the current research focus has been mainly placed on the model accuracy and the applicability of data mining technology in bathing water
quality model predictions. A novel technique called the Gamma Test was used to analyse the data generated by the numerical model and to aid in the construction of the ANN models. In this paper ANNs have been used, based on the time series predictions made by a numerical model, to predict the FC concentration levels at several sites along the Ribble Estuary, located along the north-west Lancashire coast, in England. The overall aim of the study was to develop a modelling tool that could be used by coastal zone managers to predict the bathing water quality in real-time. Thus the public could receive appropriate and timely information on the water quality at key bathing sites. Details are given of: (i) the application of a calibrated numerical model to generate a large data set to cover various hydrological conditions, (ii) the use of a nonlinear technique to analyse the suitability of these data for ANN development, (iii) the ANN model construction based on the results obtained from the data analysis, and (iv) the modelling results. 2. Study area The Ribble Estuary is located along the north-west coast of England, in the county of Lancashire. At the mouth of the estuary there are two well-known seaside resorts, namely Lytham St Annes and Southport, with both being designated EU (European Union) bathing waters. The Fylde Coast, which is bounded between Fleetwood in the north and the Ribble Estuary in the south, includes one of the most famous tourist beaches in England, namely Blackpool, with an average of more than 17 million visitors per annum. The area has four main centres of population, namely Blackpool and Lytham St Annes to the north of the Ribble Estuary, Southport to the south of the Estuary, and the town of Preston, which is inland and straddles the river Ribble at the tidal limit (see Fig. 1). During a previous study six sets of hydrodynamic and water quality data were collected along the Ribble Estuary by the UK Environment Agency. The surveys were conducted for a combination of different weather and tidal conditions, including: three dry and wet weather periods and two neaps, average and spring tidal conditions. During each survey, measurements were taken at all discharge locations and river upstream boundaries (i.e. at the tidal limits) for two consecutive days. A large amount of data was collected, including: water depth, current speed and direction, salinity levels and concentrations of suspended solids, faecal and total coliforms, and faecal streptococci. In total, 34 input sources were identified as contributors to the pollution loads of the estuary. These included: direct discharges of treated wastewater from treatment plants, inputs from the upstream boundary of the three major rivers, and inputs from several smaller rivers and combined sewer overflows (CSOs). More details of the measurements undertaken at these sources for the six surveys are given in Kashefipour et al. (2002). A numerical modelling study was undertaken to establish the water quality of the EU designated bathing waters, located at the mouth of the Ribble Estuary. More details of the numerical model are given in Section 4 of the paper.
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740 433000
731
BlackPool
431000 429000
St Anne’s North
Lytham St Anne’s
StAnne’s 427000
Preston
Fylde Coast
Pier
3milepost
425000 423000 Measuring Water Elevation 421000
Tide Survey Point
Tarleton Lock Douglas River
419000
Southport
Southport
Measuring Discharge Upstream 1-D Boundary Bathing Water Point
417000 415000 413000 Douglas Boundary
411000 326000
330000
334000
338000
342000
346000
350000
354000
358000
362000
Fig. 1. Fylde Coast, Ribble Estuary and its tributaries.
3. Artificial Neural Networks Artificial Neural Networks (ANNs), also referred to as Neural Networks, are a class of artificial intelligence tools that operate analogous to the biological process of a brain. They provide a powerful tool for simulating dependent variables for a wide range of engineering problems, in particular, when there is a nonlinear relationship existing between the variables (Zhang and Patuwo, 1998). Fundamental concepts of neural network can be found in Pham and Liu (1995), Anderson (1996) and Graupe (1997). In recent years ANNs have become widely used for prediction and forecasting tools in a number of areas, including: finance, power generation, medicine, water resources and environmental science. ANNs have also been increasingly used for hydrological modelling, such as rainfallerunoff modelling (Hsu et al., 1995; Han et al., 2007) and flood forecasting (Thirumalaiah and Deo, 1998a,b). For hydrodynamic modelling ANNs have been used for optimising reservoir operation (Solomatine, 1996), river stage forecasting (Raduly et al., 2007) and tidal level forecasting (Tsai and Lee, 1998; Lee and Jheng, 2002). More recently, ANNs have also been used for water quality modelling, such as for predicting the solute distribution in rivers (Lek et al., 1999), blue-green algae (Bowden et al., 2005) and bacterial levels (Kashefipour et al., 2005). In the current study the multilayer perceptron (MLP) method, capable of approximating arbitrary functions, was used to predict the FC levels based on other measured variables. An MLP is typically composed of several layers of nodes, where the nodes in one layer can be connected to nodes in the next layer, the previous layer, the same layer and even to themselves (Agirre-Basurko et al., 2006). This variety of MLP is called a recurrent network. The feed-forward network is a type of MLP where nodes in one layer are only connected
to nodes in the next layer. In a feed-forward network the first layer is an input layer where external information is received, whereas the last layer is an output layer where the problem solution is obtained. The input and output layers are separated by one or more layers called the hidden layers. 4. Numerical model In this study a two-dimensional numerical model named DIVAST (Falconer et al., 2001) was linked to a one-dimensional model named FASTER to predict the bacterial indicator concentration distributions for various conditions. DIVAST was developed for simulating the hydrodynamic, solute and sediment transport processes in estuarine and coastal waters. It has been calibrated and validated against many laboratory and practical field studies over the past 25 years. The hydrodynamic module of the model is based on the solution of the depth integrated NaviereStokes equations and it includes the effects of: local acceleration, advective acceleration, earth’s rotation, pressure gradient, wind stress, bed resistance and turbulent shear stresses. For the water quality module, the advective-diffusion equation (ADE) is solved for a range of water quality indicators, including: salinity, total and faecal coliforms, biochemical oxygen demand, dissolved oxygen, the nitrogen and phosphorous cycles and algal growth. The ADE defines the dynamic distributions of the bacterial indicators due to the flow characteristics, diffusion processes and dieoff rates. The faecal coliform decay rates are expressed as a first order decay model according to Chick’s Law. The hydrodynamic module of the FASTER model is based on the solution of the St Venant equations of mass and momentum conservation. These equations are solved through an implicit finite difference scheme, with a varying grid size and which is set-up over a space-staggered grid. For the water quality
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
732
For the neural network modelling, the flow discharges and concentrations for the rivers, and salinity and depth data at boundaries have been used as the input data, while the FC concentrations at the two selected locations were used as the target data. The data were normalised for construction of the ANN model. The scaling of the network inputs and targets was done by normalisation, based on the mean and standard deviation of the data set. The inputs and targets were normalised in such a way that they would have a zero mean and a unit standard deviation. The outputs of the model were later converted back into their original scales. The specifications of the rivers and the variables are listed in Table 1.
module a finite volume scheme has been applied to solve the advective-diffusion equation for predicting the concentration of solutes and/or suspended sediments. In order to reduce the possible inaccuracies caused by setting up the boundary conditions required by the numerical model, the upstream boundaries were located at the tidal limits of the rivers Ribble, Darwen and Douglas (see Fig. 1) and the downstream boundary was located around the 25 m depth contour in the Irish Sea. The model was verified using the six sets of hydrodynamic and water quality data, at four calibration sites highlighted in Fig. 1. At each site, a survey typically provided 25 data points for calibration. As an example typical results obtained from calibrating the numerical model are presented in Fig. 2. In this figure comparisons between the model predicted and field measured faecal coliform concentrations are shown for two sites. More details regarding this study may be found in Kashefipour et al. (2002). A number of model runs were performed to generate data for the neural networks. The flow and concentration inputs from the Ribble, Darwen and Douglas rivers were used as model inputs, together with the corresponding water elevations, salinity levels and FC concentrations at two selected locations, e.g., 7-milepost (7MP) and 11-milepost (11MP), were specified as the model output locations. For a given boundary condition the model was run for 50 h and the data were collected every 15 min. In total seven such model runs were undertaken.
5. Data analysis As neural networks are data driven, the quality of a network depends primarily on the quality of the data and hence data analysis is very important prior to any model building operation. In the current study a nonlinear data analysis technique, called the Gamma Test, was used. The Gamma Test examines the relationships between the input and output data sets. Suppose we have a set of inputeoutput observations of the form: fðxi ; yi Þj1 i Mg
ð1Þ
where the inputs x˛Rm are vectors confined to some closed bounded set C˛Rm and, without loss of generality, the
(a) Concentration (cfu/100ml)
2.0E+04 1.8E+04
7 miles post
Model Measured
1.6E+04 1.4E+04 1.2E+04 1.0E+04 8.0E+03 6.0E+03 4.0E+03 2.0E+03 0.0E+00
20
22
24
26
28
30
32
34
36
38
40
42
44
46
48
50
52
Simulation time (hr)
Concentration (cfu/100ml)
(b) 3.0E+03 11 miles post
Model Measured
2.5E+03 2.0E+03 1.5E+03 1.0E+03 5.0E+02 0.0E+00
20
22
24
26
28
30
32
34
36
38
40
42
44
46
48
50
52
Simulation time (hr) Fig. 2. Comparison between predicted and measured faecal coliform concentrations for the survey on 19/05/1999, in Ribble Estuary.
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740 Table 1 Variable specifications used for ANNs Variables
Symbol
Flow at Ribble River Flow at Darwen River Flow at Douglas river FC at Ribble River FC at Darwen River FC at Douglas River Water depth at 7-milepost Salinity at 7-milepost Water depth at 11-milepost Salinity at 11-milepost
Qrib Qdar Qdoug FCrib FCdar FCdoug Dep7MP Sal7MP Dep11MP Sal11MP
corresponding outputs y˛R are scalars, then rather than presuppose some particular parametric form for the underlying nonlinear model, it is assumed that it belongs to some general class of functions. In particular, we suppose that the underlying relationship is of the form: y ¼ f ðx1 ; .; xm Þ þ r
733
at the same time. Fig. 5 shows the results for the same location and with the same input parameters, but for a 9 h time lag being specified between the input and output data. It can be seen from these two figures that the value of the Gamma statistic reduced markedly with the addition of the time lag information. This is due to the fact that the travel time of contaminates from the upstream boundaries, particularly the river Ribble, to 7-milepost was around 9 h. Thus the boundary information 9 h in advance would have the most significant impact on the FC level at 7-milepost. This can also be confirmed by plotting the corresponding numerical model results. A very small value of the Gamma statistic means that the noise level in the data is low, indicating that a smooth model can be developed. From Fig. 5 it can be seen that after 420 points the Gamma statistic is fairly stable; this indicates that an adequate model can be built using 420 or more data points. A similar trend can be seen in Fig. 7 for 11-milepost, in which a time lag of 11 h was used. Again, the Gamma statistic became stable after about 420 data points.
ð2Þ 6. ANN model construction
where f is a suitably smooth and unknown function that maps the components of the input vector x to the output y, and g is a stochastic variable which represents noise. The mean of the distribution of g is assumed to be zero. Even though the underlying function f is unknown the Gamma Test can estimate the variance of g, varðgÞ directly from the data. This estimate is called the Gamma statistic and denoted by G. As the number of data samples increases, then the Gamma statistic approaches an asymptotic value, which is the variance in the noise of the particular output. For more details on the theory of the Gamma statistic see Evans and Jones (2002). In the Gamma Test the critical graph first to look at are the scatter plots and the ðdðpÞ; gðpÞÞ regression line. The scatter plot shows point pairs ðd; gÞ, where d is the squared distance of an input (x) from one of its near neighbours. Fig. 3 shows two such scatter plots. It can be seen from Fig. 3(a) that an empty wedge appears at the top left corner of the graph. This indicates that the input and output data are closely related, thus an underlying smooth model exists. On the other hand, there is no wedge at the top left corner in Fig. 3(b), indicating a high level of noise in the data or that there is no smooth underlying model. The reliability of the G statistic is determined by running a series of Gamma Tests for increasing M, to establish the size of data set required to produce a stable asymptote and thus indicates how much data are required to build a model with a mean squared error which approximates the estimated noise variance. This is known as an M-test. The M-test is a method used to determine how the Gamma statistic estimate varies as more data are used to compute this statistic. Figs. 4e7 show the Gamma statistic obtained from running the M-test for both 7-milepost and 11-milepost and for two different sets of data. Fig. 4 shows the results for 7milepost when the values of the flows and FC levels for three rivers were provided, along with the salinity and water depths
The three rivers are the main contributors of FC along the estuary, while the transport of FC to the estuary depends on, among other factors, the velocity or flow of the rivers. Hence the FC levels and the flow of the three rivers were included as inputs in building the neural network model. It was considered that the transport of FC was also heavily affected by the tidal currents, therefore the water depths at the locations in question were also included as inputs. Salinity levels were also included as an input, as salinity has a detrimental effect on FC survival. It would have been ideal to use sunlight data as a parameter, especially since sunlight is an important factor for bacterial decay. However, no sunlight data were recorded during the original surveys, hence this parameter could not be incorporated in the hydrodynamic model. As a result sunlight effects were not included in constructing the neural network models. The data were divided into three subgroups, including: training, validation and testing. The training data were used to find the optimal set of connection weights, the validation data were used to verify the trained network, and the testing data were used to test the true generalisation capability of the model. The way in which these sub divisions were defined can have a significant influence on the model performance. In this study the data set was divided up in such a way that all of the patterns were presented in the calibration set. The ranges of all input parameters were made roughly the same in the three sub data sets. To obtain this goal the data order was randomised by sorting the contiguous block of data using a sequence of random numbers. A total of 840 data points were used. According to the results from the Gamma Test, 1/2 of the data were used as training set, while 1/4 of the data were each used as validation and test data sets. The statistical parameters of the training, validation and test data are shown in Table 2. It can be seen that the training set contains the maximum values for most of the parameters. This is important as some studies reported in the
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
734
Gamma Scatter Plot
(a)
5,000 4,500 4,000
Gamma
3,500 3,000 2,500 2,000 1,500 1,000 500 0 0
1
2
3
4
5
6
7
8
9
10
11
Delta Scatter plot of polynomial equation : y = x+x2+x3 Gamma Scatter Plot
(b) 4.50E+8 4.00E+8 3.50E+8
Gamma
3.00E+8 2.50E+8 2.00E+8 1.50E+8 1.00E+8 5.00E+7 0.00E+0 0
2
4
6
8
10
12
14
16
18
Delta Scatter plot of equation : y = x+x2+x3+ random noise Fig. 3. Gamma Test scatter plots.
literature suggest that ANNs have a poor extrapolation ability, which could result in a sub-optimal model. Although it was also suggested that ANNs have some inherent capability of extrapolation (Mandal et al., 2007), the prediction accuracy generally falls as the input data go beyond the training domain. For real operational predictions it is almost certain that future maximum values will exceed past ones. The numerical model approach can partly solve this problem. Once calibrated, the process based numerical models generally can provide reliable predictions for unforeseen larger events. Thus the numerical model can be used to provide data for larger input data ranges and the results can then be used to train the ANN model for more extreme conditions. After being divided into three subsets the data were then transformed. In the past, it has been commonly perceived
that data standardisation is not necessary for ANN models. However, more recent studies claimed that data standardisation often improved the performance of neural networks (Bowden et al., 2005). The input variables were selected according to the possible relationships between the bacterial concentrations and other key variables. In this study four different experiments have been carried out, based on different combination of parameters. In order to avoid over-training the noise values obtained from the Gamma Test were used as the stopping criteria in the ANN simulations. As mentioned previously, the feed-forward network was used with a back propagation learning algorithm. It has been shown that the number of hidden layers in a network has an effect on the network performance. Hence, a complex network with too many hidden layers may cause a reduction in the
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
Unique Data Points v Gamma Gamma
Gamma
Gamma
Unique Data Points v Gamma 0.20 0.18 0.16 0.14 0.12 0.10 0.08 0.06 0.04 0.02 0.00 -0.02 50
735
0.18 0.16 0.14 0.12 0.10 0.08 0.06 0.04 0.02 0.00 -0.02
Gamma
50 100 150 200 250 300 350 400 450 500 550 600 650 700
100 150 200 250 300 350 400 450 500 550 600
Unique Data Points
Unique Data Points Fig. 4. M-test result at 7-milepost with no time lag information.
Fig. 6. M-test result at 11-milepost with no time lag information.
generalisation ability. It has also been shown that ANNs with one hidden layer can approximate any function, given that sufficient degrees of freedom (i.e. connection weights) are provided (e.g. Hornik et al., 1989). In this study only one layer was used, with the number of nodes in the hidden layer being determined by the method of trial and error. Four different experiments were carried out for this study, with the parameters used in these experiments being listed in Table 3. The first experiment was carried out with eight parameters as inputs, which included the flow discharge and FC concentration levels for the three upstream river boundaries and the salinity level and depth predicted at the two sampling sites. The target was the FC concentrations at these two sites. The second experiment used the same input parameters, but with the FC and discharge values being 9 and 11 h before for 7-milepost and 11-milepost, respectively. As mentioned earlier these were the receiving water response times, or time lags. It has already been established from running the Gamma Test that using the time lag information can improve the correlation between the input and output parameters. Therefore, two more sets of experiments were carried out to quantify the impact of including the time lag formation on the neural network performance. In Experiment 3, time series values of the same input parameters, i.e. 0, 3, 6, 9, 12 and 18 h before, together with
the previous values of the FC concentrations at the sampling locations, i.e. 3, 6, 9, 12 and 18 h before, were used as input parameters. Thus the total number of inputs used for this case was 53. In Experiment 4, the number of input parameters was reduced to 27, but with the timing of the input data being around the time lags found for the two sampling sites. 7. Results and discussion The accuracy of the model predictions was evaluated using the Root Mean Square (RMS) error and the coefficient of determination (CoD). The RMS error measures the deviation of the predicted FC values from the observed values. The CoD value represents the extent to which the observed and predicted FC concentrations ‘‘vary together’’, i.e., whether a positive correlation exists. This is an analysis tool for examining whether large values of predicted FC tend to be associated with large observed FC values, and vice versa. The ideal value for RMS is 0, and the ideal value for CoD is 1. It can be seen from Table 4 that generally the statistical indexes obtained from the testing data set are very close to those from the validation data set, which indicates a good generalisation ability of the neural networks used in this study. This is primarily due to the fact that the noise level in the input
Unique Data Points v Gamma
Unique Data Points v Gamma 0.16 Gamma
0.12
0.10
0.10
0.05 0.00 -0.05
Gamma
0.14
0.15
Gamma
Gamma
0.20
0.08 0.06 0.04 0.02 0.00
-0.10
-0.02 50
100 150 200 250 300 350 400 450 500 550 600
Unique Data Points Fig. 5. M-test result at 7-milepost with 9 h time lag.
50 100 150 200 250 300 350 400 450 500 550 600 650 700
Unique Data Points Fig. 7. M-test result at 11-milepost with 11 h time lag.
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
736
Table 2 Statistical parameters for the training, validation and test data sets after data division Qrib
Qdar
Qdoug
51.92 14.46 134.24 35.73
5.19 1.63 17.58 3.43
Validation Data set Mean 47.70 Min 14.41 Max 133.98 Std Dev 32.40 Test Data set Mean Min Max Std Dev
Training Data set Mean Min Max Std Dev
45.70 14.41 132.33 30.85
FCrib
FCdar
FCdoug
Sal
Dep
3.28 1.51 9.97 1.59
40,117 364 449,000 88,458
29,607 272 257,000 49,261
1,401,337 5,228 34,000,000 4,344,983
10.75 1.06 23.82 7.53
3.89 1.02 6.75 1.92
5.27 1.62 17.70 3.69
3.42 1.52 10.20 1.89
34,069 348 405,000 80,444
29,259 1,178 237,000 48,883
724,573 5,228 19,500,000 2,345,617
10.60 1.06 23.66 7.66
3.69 1.08 6.76 1.95
5.25 1.63 17.70 3.62
3.24 1.51 9.23 1.49
23,535 364 300,000 56,085
25,043 1,360 248,000 44,514
1,166,961 5,408 27,600,000 3,713,009
11.68 1.14 23.71 7.29
4.04 1.08 6.77 1.90
data, which was predicted from the Gamma Test, was used as the stopping criterion in training the ANNs. In this way, the over-training problem, which often makes the ANN testing results significantly worse than the validation results, has been avoided. As the neural networks were intended to be used as a tool for day-to-day management of the bathing water quality, an additional criterion was used to check the accuracy of their predictions of the number of samples that fail to comply
with the standard, given in the EU Bathing Water Directive. For FC the current value is 2000 cfu/100 ml. A comparison between the neural networks predicted number of failed samples and the observed (i.e. from the numerical model results) numbers was made. Table 4 is a summary of the simulation results for the experimental runs. It can be seen from this table that for all cases the CoD correlation is relatively high and the RMS error is reasonably low. For example, for training and validation the
Table 3 Parameters used in the ANN models Site a
7MP
11MP
a
Experiment
Number of parameters
Description
1 2 3
8 8 53
4
27
Qrib, Qdar, Qdoug, FCrib, FCdar, FCdoug, Dep7MP, Sal7MP Qrib-9, Qdar-9, Qdoug-9, FCrib-9, FCdar-9, FCdoug-9, Dep7MP-9, Sal7MP-9, Qrib, Qdar, Qdoug, FCrib, FCdar, FCdoug, Dep7MP, Sal7MP, Qrib-3, Qdar-3, Qdoug-3, FCrib-3, FCdar-3, FCdoug-3, Dep7MP-3, Sal7MP-3, Qrib-6, Qdar-6, Qdoug-6, FCrib-6, FCdar-6, FCdoug-6, Dep7MP-6, Sal7MP-6, Qrib-9, Qdar-9, Qdoug-9, FCrib-9, FCdar-9, FCdoug-9, Dep7MP-9, Sal7MP-9, Qrib-12, Qdar-12, Qdoug-12, FCrib-12, FCdar-12, FCdoug-12, Dep7-12, Sal7MP-12, Qrib-18, Qdar-18, Qdoug-18, FCrib-18, FCdar-18, FCdoug-18, Dep7-18, Sal7MP-18, FC7MP-3, FC7MP-6, FC7MP-12, FC7MP-18 Qrib-9, Qdar-9, Qdoug-9, FCrib-9, FCdar-9, FCdoug-9, Dep7MP-9, Sal7MP-9, Qrib-10, Qdar-10, Qdoug-10, FCrib-10, FCdar-10, FCdoug-10, Dep7MP-10, Sal7MP-10, Qrib-14, Qdar-14, Qdoug-14, FCrib-14, FCdar-14, FCdoug-14, Dep7MP-14, Sal7MP-14, FC7MP-6, FC7MP-8, FC7MP-10
1 2 3
8 8 53
4
27
Qrib, Qdar, Qdoug, FCrib, FCdar, FCdoug, Dep11MP, Sal11MP Qrib-11, Qdar-11, Qdoug-11, FCrib-11, FCdar-11, FCdoug-11, Dep11MP-11, Sal11MP-11 Qrib, Qdar, Qdoug, FCrib, FCdar, FCdoug, Dep11MP, Sal11MP, Qrib-3, Qdar-3, Qdoug-3, FCrib-3, FCdar-3, FCdoug-3, Dep11MP-3, Sal11MP-3, Qrib-6, Qdar-6, Qdoug-6, FCrib-6, FCdar-6, FCdoug-6, Dep11MP-6, Sal11MP-6, Qrib-9, Qdar-9, Qdoug-9, FCrib-9, FCdar-9, FCdoug-9, Dep11MP-9, Sal11MP-9, Qrib-12, Qdar-12, Qdoug-12, FCrib-12, FCdar-12, FCdoug-12, Dep11MP-12, Sal11MP-12, Qrib-18, Qdar-18, Qdoug-18, FCrib-18, FCdar-18, FCdoug-18, Dep11MP-18, Sal11MP-18, FC11MP-3, FC11MP-6, FC11MP-12, FC11MP-18 Qrib-11, Qdar-11, Qdoug-11, FCrib-11, FCdar-11, FCdoug-11, Dep11MP-11, Sal11MP-11, Qrib-12, Qdar-12, Qdoug-12, FCrib-12, FCdar-12, FCdoug-12, Dep11MP-12, Sal11MP-12, Qrib-14, Qdar-14, Qdoug-14, FCrib-14, FCdar-14, FCdoug-14, Dep11MP-14, Sal11MP-14, FC11MP-6, FC11MP-8, FC11MP-10
The numbers ‘-3’, ‘-6’, etc are used to refer to the values at 3 and 6 h before, respectively.
Table 4 Statistical analysis of the result obtained from the trained ANN models Statistical measures CoD Experiment 1: 7-milepost Training 0.936 Validation 0.877 Testing 0.821
11-milepost Training Validation Testing Experiment 3: 7-milepost Training Validation Testing 11-milepost Training Validation Testing Experiment 4: 7-milepost Training Validation Testing 11-milepost Training Validation Testing a
a
RMS (%)
Observed
ANN
SE
5.30 8.27 7.56
168 89 82
186 101 110
129 72 75
737
200000 160000 120000 80000 40000
00
20
00
00
00
00 18
00 16
00
00
00 14
0 12
00
00 0
0 10
0
00 80
0
0
00
162 91 75
60
208 164 107
00
176 91 79
40
3.85 6.75 5.47
20
0.957 0.829 0.869
00
0
0
Observed FC (cfu/100ml) Fig. 8. Scatter plot for test data set at 7MP in Experiment 4.
0.948 0.914 0.889
4.78 6.91 6.35
168 89 82
186 106 91
129 77 56
0.989 0.933 0.881
1.93 4.23 5.23
176 91 79
180 153 117
169 89 77
0.992 0.947 0.926
1.79 5.43 4.84
168 89 82
194 92 87
162 77 75
0.996 0.942 0.885
1.09 3.93 5.13
176 91 79
179 152 102
171 90 79
0.994 0.949 0.928
1.62 5.32 4.78
168 89 82
195 97 84
157 76 72
0.994 0.944 0.953
1.37 3.86 3.28
176 91 79
178 135 107
173 91 74
Occurring in the same event.
values of the correlation coefficient range from 82.9 (Experiment 1, 11-milepost) to 99.6% (Experiment 3, 11-milepost). For model testing, in which unseen data were used, the values of the correlation coefficient range from 82.1 (Experiment 1, 7-milepost) to 95.3% (Experiment 4, 11-milepost). The ANN model performance improves with an increasing number of input parameters. The RMS errors obtained from Experiment 3 are smaller than those obtained from Experiment 1 and the number of predicted failed samples resulting from Experiment 3 is closer to the observation than that resulting from Experiment 1. Similarly, the predictions obtained from Experiment 4 are significantly better than those obtained from Experiment 2. Good correlations were obtained between the predictions made by the neural networks and the observed FC values, see Figs. 8 and 9. From Table 4 it can be seen that the predicted FC concentration level varies from 103 to 106, which shows a similar degree
of variation in the FC level as found in observed data. However, the neural networks generally over predict at low FC concentration levels, while they under predict at very high concentration levels, see Figs. 10 and 11. In particular, the neural networks over predict when the FC concentration levels are around 2000 cfu/100 ml. For day-to-day bathing water quality management, such conservative results may be considered acceptable. From Table 4 it can also be seen that the model results obtained from Experiment 4 are generally similar to those obtained from Experiment 3, even though the number of input parameters used in Experiment 4 was only half of that used in the Experiment 3. The testing CoD values obtained from Experiment 4 are slightly higher than those from Experiment 3, but the average CoD values are both over 90%. On the other hand, the ANN model predicted number of failed samples from Experiment 4 is slightly lower that that from Experiment 3, with the average error from both experiments being lower than 10%. Thus, in constructing ANN models if consideration is given to the transport process then the number of input parameters can be significantly reduced. Also, all of the input data used in Experiment 4 were collected at least 6 h before the prediction time. This is very useful for bathing water managers to enable them to provide advance warning to potential bathers of any adverse water quality characteristics.
Predicted FC (cfu/100ml)
11-milepost Training Validation Testing Experiment 2: 7-milepost Training Validation Testing
Number of failed sample
Predicted FC (cfu/100ml)
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
120000
80000
40000
0 0
20000
40000
60000
80000
100000
120000
Observed FC (cfu/100ml) Fig. 9. Scatter plot for test data set at 11MP in Experiment 4.
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
738 250000
Observed Predicted
FC (count/100ml)
200000
150000
100000
50000
20
40
60
80
100
120
140
160
180
200
Date Sequence 200000
100000
180000 160000
80000
140000 120000
60000
100000 80000
40000
60000 40000
20000
20000 0 45
50
55
60
65
70
75
80
85
0 160
165
170
175
180
185
190
195
200
Fig. 10. Predicted and observed FC concentrations for testing data set at 7MP in Experiment 4.
8. Conclusions In this study an integrated approach, combining a numerical model with Artificial Neural Networks, has been developed for modelling bathing water quality in the Ribble Estuary. The ANNs were used to provide rapid predictions of the FC concentrations at selected locations along the estuary and in the adjacent coastal zone. In order to provide a sufficient number of data sets to cover a range of hydrological conditions, a calibrated hydrodynamic and water quality model was used to generate input data for the neural networks. The analysis of the data suitability for building a smooth model was carried out using an advanced nonlinear data analysis technique, namely the Gamma Test. For a particular data set this technique provides useful information on whether a functional relationship exists between the input and output variables, even though the exact function is unknown. A series of neural network experiments were undertaken, using a different number of input parameters and time lags. The main findings from these experiments can be summarised as follows: 1. The data analysis technique used in this study provides answers to address three important issues for ANN model construction: (i) whether it is possible to build a neural network model based on the available data? (ii) what is the minimum number of data points required for building
a smooth model? and (iii) what is the appropriate stopping criterion in training a neural network to prevent over-training? The statistical indexes obtained from the testing data set are generally very close to those obtained from the validation data set, which indicates a good generalisation ability of the neural networks constructed in this way. 2. The correlation between the ANN predictions and the numerically simulated data is relatively high and the RMS error is reasonably low for all of the cases studied. Further studies are still needed to extend this correlation to the measured data. The performance of the network generally improves when more information is provided to the network. 3. The knowledge of the response time of the receiving water quality to the upstream boundary conditions is very useful in constructing neural networks. It has been shown that with this information being used for model construction, a network can achieve a similar level of performance to those networks with twice as many input parameters. 4. The knowledge of the response time is useful for making forward predictions of water quality, as required by the new EU Bathing Water Directive. This capability will enable coastal zone water quality mangers to provide more reliable information to the public on bathing water conditions.
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
739
120000 Observed Predicted
FC (count/100ml)
100000
80000
60000
40000
20000
20
40
60
80
100
120
140
160
180
200
Date Sequence 35000
120000
30000
100000
25000
80000
20000 60000 15000 40000
10000
20000
5000 0 5
10
15
20
25
30
35
40
0 100
110
120
130
140
Fig. 11. Predicted and observed FC concentrations for testing data set at 11MP in Experiment 4.
Acknowledgement This study was partly sponsored by Halcrow Group Ltd. and partly by a studentship provided by Cardiff University. The authors are grateful to the Environment Agency (North West Region) for making the data available to undertake the model developments. References Agirre-Basurko, E., Ibarra-Berastegi, G., Madariaga, I., 2006. Regression and multilayer perceptron-based models to forecast hourly O3 and NO2 levels in the Bilbao area. Environmental Modelling & Software 21, 430e446. Anderson, J.A., 1996. An Introduction of Neural Network. Massachusetts Institute of Technology, USA. Bowden, G., Dandy, G., Maier, H., 2005. Forecasting cyanobacteria (bluegreen algae) using artificial neural networks. In: Artificial Neural Networks in Water Supply Engineering. Evans, D., Jones, A.J., 2002. A proof of Gamma Test. Proceedings of the Royal Society of London Series A 458, 2759e2799. Falconer, R.A., Lin, B., Kashefipour, S.M., 2001. Modelling water quality processes in riverine systems. In: Anderson, M.G., Bates, P.D. (Eds.), Model Validation: Perspectives in Hydrological Science. John Wiley and Sons Ltd., pp. 357e387 (Chapter 14). Graupe, D., 1997. Principals of Artificial Neural Networks. World Scientific, Singapore, London, New Jersey. Han, D., Kwong, T., Li, S., 2007. Uncertainties in real-time flood forecasting with neural networks. Hydrological Processes 21, 223e228, doi:10.1002/ hyp.6184.
Hornik, K., Stinchcombe, M., White, H., 1989. Multilayer feed forward networks are universal approximators. Neural Networks 2, 359e366. Hsu, K.-L., Gupta, H.V., Sorooshian, S., 1995. Artificial neural network modelling of the rainfallerunoff process. Water Resources Research 31, 2517e2530. Kashefipour, S.M., Lin, B., Falconer, R.A., 2005. Neural networks for predicting seawater bacterial levels. Proceedings of the Institution of Civil Engineers: Water Management 158, 111e118. Kashefipour, S.M., Lin, B., Harris, E.L., Falconer, R.A., 2002. Bathing water quality modelling for Ribble Estuary and Fylde Coast. Water Research, IWA 36, 1854e1868. Lee, T.L., Jheng, D.S., 2002. Application of Artificial neural networks in tide forecasting. Technical Note. Ocean Engineering 29, 1003e1022. Lek, S., Guiresse, M., Giraduel, J.L., 1999. Predicting stream nitrogen concentration from watershed features using neural networks. Water Research 33, 3469e3478. Mandal, S., Sivaprasad, P.V., Venugopal, S., 2007. Capability of a feed-forward artificial neural network to predict the constitutive flow behavior of As cast 304 stainless steel under hot deformation. Journal of Engineering Materials and Technology, ASME 129 (2), 242e247. Pham, D.T., Liu, X., 1995. Neural Networks for Identification, Prediction, and Control. Springer-Verlag, New York. Pruss, A., 1998. Review of epidemiological studies on health effects from exposure to recreational water. International Journal of Epidemiology 27, 1e9. Raduly, B., Gernaey, K.V., Capodaglio, A.G., Mikkelsen, P.S., Henze, M., 2007. Artificial neural networks for rapid WWTP performance evaluation: methodology and case study. Environmental Modelling & Software 22, 1208e1216. Solomatine, D.P., 1996. International Conference on Hydroinformatics. Zu¨rich, September 1996.
740
B. Lin et al. / Environmental Modelling & Software 23 (2008) 729e740
Thirumalaiah, K., Deo, M.C., 1998a. Real-time flood forecasting using neural networks. Computer-aided Civil and Infrastructure Engineering 13, 101e111. Thirumalaiah, K., Deo, M.C., 1998b. River stage forecasting using artificial neural networks. Journal of Hydrologic Engineering 3, 26e32. Thomann, R.V., Mueller, J.A., 1987. Principals of Surface Water Quality Modelling and Control. Harper & Row, New York.
Tsai, C.P., Lee, T.L., 1998. Back-propagation neural network in tidal-level forecasting. Journal of Waterway, Port, Coastal and Ocean Engineering 125, 195e202. WHO, 2000. Monitoring Bathing Waters: a Practical Guide to the Design and Implementation of Assessments and Monitoring Programmes. Zhang, G., Patuwo, B.E., 1998. Forecasting with artificial neural networks: the state of the art. International Journal of Forecasting 14, 35e65.