Detection of water-quality contamination events based on multi-sensor fusion using an extented Dempster–Shafer method

This study presents a method for detecting contamination events of sources of drinking water based on the Dempster–Shafer (D-S) evidence theory. The detection method has the purpose of protecting water supply systems against accidental and intentional contamination events. This purpose is achieved by first predicting future water-quality parameters using an autoregressive (AR) model. The AR model predicts future water-quality parameters using recent measurements of these parameters made with automated (on-line) water-quality sensors. Next, a probabilistic method assigns probabilities to the time series of residuals formed by comparing predicted water-quality parameters with threshold values. Finally, the D-S fusion method searches for anomalous probabilities of the residuals and uses the result of that search to determine whether the current water quality is normal (that is, free of pollution) or contaminated. The D-S fusion method is extended and improved in this paper by weighted averaging of water-contamination evidence and by the analysis of the persistence of anomalous probabilities of water-quality parameters. The extended D-S fusion method makes determinations that have a high probability of being correct concerning whether or not a source of drinking water has been contaminated. This paper's method for detecting water-contamination events was tested with water-quality time series from automated (on-line) water quality sensors. In addition, a small-scale, experimental, water-pipe network was tested to detect water-contamination events. The two tests demonstrated that the extended D-S fusion method achieves a low false alarm rate and high probabilities of detecting water contamination events.


Introduction
Early warning systems (EWS) for water quality are becoming more frequently used by drinking-water purveyors Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. and water-quality monitoring agencies. In 2005, the US Environmental Protection Agency (USEPA) defined EWS as 'an integrated system for monitoring, analyzing, interpreting, and communicating data, which can then be used to make decisions that are protective of public health and minimize unnecessary concern and inconvenience to the public' [1]. Most water-quality EWS detect water contamination events based on water-quality criteria. In other words, a water contamination event is declared when real-time water quality data are outside the expected range of allowable waterquality criteria, at which point an alert is issued. Such exceedance-criteria event detection method, however, may overlook implicit information present in the water quality measurements and may cause a high false alarm rate (FAR) and false negative rate (FNR) [2,3].
In 2005, Hall et al [4] demonstrated that changes in waterquality parameters, which potentially indicate contamination, can be detected using real-or near real-time sensors. Empirical evidence shows that water quality parameters, such as pH, conductivity, total or free chlorine and TOC (total organic carbon), are sensitive indicators of nicotine, arsenic trioxide, aldicarb and Escherichia coli contaminants. Motivated by this type of empirical evidence, a class of methods named anomaly-based water-contamination event detection has garnered increasing attention. The existing methods for anomaly detection of water-contamination events based on online measurements of water-quality parameters are mainly divided into three categories, namely, statistical, artificial intelligence and data mining methods. Statistical methods are based on time-series prediction with fixed-length moving-time window and a single water quality parameter, which cannot track well trends present in water quality data [2,3,[5][6][7]. Artificial intelligence (AI) methods, such as artificial neural networks (ANN) and support vector machines (SVM), classify water quality data into normal and anomalous classes after supervised learning training [2,3,8]. Data-mining methods, such as K-means classification and the multivariate nearest-neighbor (MV-NN) algorithm, which combine different water-quality parameters and location information, are also used for protecting drinking water systems [2,5,6,9,10]. In addition to the above three categories, several researchers introduced data-fusion methods to combine various types of information, for example, operational data [11], additional station-specific features [8] and data from multiple monitoring stations [12] to improve the detection of water-contamination events. Although research on water-contamination event detection has proliferated in recent years, careful analysis of those methods reveals that many of them still have several shortcomings. Specially, they (1) have a high rate of false alarms and false negatives in practical applications due to the complexity and incompleteness of water quality data; (2) could not realize multi-feature fusion to obtain a comprehensive evaluating result; (3) are cumbersome, computationally demanding and unsuitable for online detection; (4) need a large number of real water-quality contamination events for model training, yet the latter events are rare.
Considering the shortcomings commonly found in existing methods, this study proposes a water-contamination event detector based on an extension and improvement of the Dempster-Shafer (D-S) evidence theory. D-S evidence theory can be regarded as an extension of classical probabilistic reasoning, which makes inferences from incomplete and uncertain knowledge, provided by different independent knowledge sources. A key advantage of D-S evidence theory is its ability to deal with lack of knowledge and missing information about a phenomenon of interest. In particular, it provides explicit estimation of the imprecision and conflicts that may exist among different sources of information [14]. Furthermore, D-S evidence theory is less computationally intensive than other competing methods [15]. Given the referred advantages, D-S evidence theory has been widely applied in the field of event detection, multi-sensor networks [16], pattern classification [17] and hyperspectral imagery processing [18]. Sentz and Ferson [14] presented several applications of the D-S evidenced theory in detail. Among these applications one can cite network anomaly detection [13,19], failure detection [20,21] and road traffic accident detection [22]. These applications have shown that D-S evidence theory has been successful in solving detection problems where differences in some characteristics of the evidence are not enough to distinguish 'normal' evidence or 'anomalous' evidence [13].
In this study, the improved D-S theory for the detection of water-contamination events relies on the times series of residuals of water-quality parameters predictions and the use of weighted-averaging and time-dimension information to resolve conflicts or ambiguities that arise when attempting to detect water-contamination events. Such conflicts or ambiguities are named herein evidence conflicts. Simulated and experimental water-contamination events of different severity are used to test the proposed approach for detecting water-contamination events.

D-S evidence theory
The D-S theory of evidence is based on the classic works of Dempster [23] and Shafer [24]. The D-S theory offers an alternative to the traditional probabilistic theory for the mathematical representation of uncertainty [14]. The D-S theory's applications range from expert decision support systems to multi-attribute decision-making and data fusion. In this section, the main concepts underlying the D-S theory of evidence are summarized, and basic notation is introduced.
Let be a finite set of mutually exclusive and exhaustive hypotheses, called the frame of discernment. Let A be a subset of hypotheses in (A ⊆ ). A basic probability assignment (BPA) is a function m from 2 to (0, 1) satisfying For any subset A ⊆ , the BPA m(A) represents our confidence in the hypotheses A, given a certain piece of evidence. The subsets A of such that m(A) > 0 are called the focal elements of m. Equation (1) assigns a value of zero to the empty set . Equation (2) states that the sum of functions m(A) for all subsets A equals 1.
Two BPAs m 1 and m 2 on , induced by two independent items of evidence, can be combined by Dempster's rule of combination to yield a new BPA m = m 1 ⊕ m 2 , where the symbol ⊕ denotes the orthogonal sum of m 1 and m 2 , defined as follows (the symbol ∩ denotes the intersection of sets): where B and C are subsets of hypotheses in . K ∈ (0, 1) is a normalization constant and can be viewed as a measure of conflict between two sets of evidence. The higher the K, the greater the conflict between two pieces of evidence concerning an event of interest (in our case, water contamination). Usually, the comparison of the evidence conflict coefficient K with the evidence consistency coefficient, the latter denoted by K c , is used to determine whether evidence is in conflict. The evidence consistency coefficient K c is defined as follows: The combination rule of D-S evidence theory can blend measures of evidence from multiple different sources [25,26]. Suppose m 1 , m 2 , . . . , m n are n independent BPAs on . The generalized combinatorial rule of D-S theory is defined as follows: And the evidence consistency coefficient K c is defined as Equations (

Water-contamination event detection by using D-S evidence theory
In this study, D-S evidence theory is used to develop a fusion method to resolve conflicts that may arise when there is multisource evidence from early warning systems (EWS) deployed to detect water contamination. Conflict resolution by the fusion method is intended to improve the probability of detecting a water contamination event when such an event has indeed occurred.

The fusion method.
This study proposes a method for water-contamination event detection based on D-S evidence theory. The method has six stages: (1) waterquality monitoring; (2) data preprocessing, (3) data prediction, (4) sensitive parameter extraction, (5) D-S evidence fusion, (6) water-quality contamination event reporting (that is, determination that water is not contaminated and no response is necessary, or determination that water has been contaminated and a response is necessary). Figure 1 shows the stages of the proposed method.
Water-quality monitoring relies on a network of strategically located sensors that collect, store and transmit data in real time to system managers. In the pre-processing stage, data regularization and missing value treatment are completed and the nearest numerical value is used to represent the missing value. The autoregressive (AR) model [27,28] is used for parameter prediction in the data-prediction stage, with the Bayesian information criterion (BIC) and least-squares method implemented for model parameter calibration. In the fourth stage, sensitive parameter extraction is performed by selecting several parameters according to the descending order of their residuals. Specifically, the three parameters that induce the highest degrees of residuals are chosen as fusion evidence. This is because the resolution of conflicts of evidence is usually not feasible with less than three sets of evidence. In the D-S fusion stage, the fusion result of anomalous probabilities of three sensitive parameters are calculated and compared with a constant threshold, such as 0.9, to determine the current state of water quality, be it normal or an anomaly, completing the last stage of the fusion method whose flowchart is shown in figure 1.
Data fusion within D-S evidence theory requires the determination of (1) the discernment framework, (2) the basic probability assignment function and (3) the combination rules.
The discernment framework for water quality event detection can be defined as means the confidence assigned to a 'normal' state of a certain water quality parameter given a piece of evidence. m({A}) means the confidence assigned to an 'anomalous' state of a certain water quality parameter given a piece of evidence. m({N, A}) means evidence cannot support either a 'normal' or 'anomaly' state of water quality, that is, the confidence assigned to an 'unknown' state of water quality. m({N, A}) = 0 in this study. Note that the confidence about any state of water quality S, or m({S}), has an equivalent numerical value (or probability assignment) between 0 and 1. An objective probability distribution function is used to evaluate the value of m({A}). Using combination rules of D-S evidence theory, a fusion probability assignment m 1 ⊕ m 2 ⊕ . . . ⊕ m n ({A}) converts the confidence of an 'anomalous' state of water quality arising from different evidence sources into a fraction in (0, 1). Different sources of evidence may lead to evidence conflicts concerning the state of water quality. Therefore, such conflicts must be resolved to arrive at a confidence or determination about the state of water quality that has a high probability of being correct when a watercontamination event has indeed occurred [4].

Basic probability assignment.
The derivation of the basic probability assignment (BPA) function is the most crucial step in D-S evidence theory because it determines the reliability of conclusions following evidence combination. There is no generally accepted definition of the BPA function. Expert knowledge, fuzzy approach and statistical evidence are the three most common ways of defining the BPA. Among the three ways, using statistical evidence to construct a BPA can minimize the impact of subjectivity [29]. In this work, the BPA is estimated using the statistical characteristics of long-term water quality. In other words, the BPA estimation is based on the assumption that the probability distribution of the residuals is asymptotically normal [30].
The state estimation method [2], which is used for predicting the value of water quality parameters, has good predictor tracking performance. The residuals usually exhibit smooth fluctuations in the absence of contamination events. In this case x is defined as the residual, and P(x) as the prior probability which assigns evidence to a proposition (hypothesis) and corresponds to the basic probability evaluation m({N}). The basic probability assignment function is then expressed as follows: where F is a constant coefficient, μ and σ are the mean and standard deviation, which are calculated from the longterm data series of residuals. Equation (9) is the normal distribution function when F = 2. For the same x, the smaller the constant coefficient F, the larger the anomalous probability. The selection of F will be discussed in section 3.3.3.

Resolution of evidence conflicts.
This study adopts the weighted average method combined with time dimensional analysis to resolve evidence conflicts. The main idea of the weighted average method is to assign different weights to different evidence sources [14,21,31]. Suppose m 1 , m 2 , . . . , m n are n independent BPAs on , the similarity measure between any two sets of evidence is defined as [31]: where d BPA (m i , m j ) is the distance between m i and m j (defined by Jousselme [32]). The smaller the distance d BPA (m i , m j ), the more similar two sets of evidence are. Each set of evidence is then given a credibility rating as follows: where If a set of evidence is strongly supported over others, its credibility degree Crd i is high, and this evidence will be given more weight and have greater effect on the modified combinatorial rule (see below). Then, the basic probability m i in equations (6) The multi-evidence combinatorial rule becomes where Equations (15)-(16) represent the weighted-average fusion equations. The weighted average approach may fail sometimes. For instance, the D-S fusion method would often judge water as being normal when less than n water-quality parameters change in response to a contaminant. In this case, time-dimensional analysis is helpful in resolving the evidence conflict problem because water-quality events usually persist for some time. The weighted-average method with timedimensional analysis is as follows: suppose that an anomalous probability is detected according to the D-S fusion, m (k) ⊕ m (k−1) ({A}) (k is the current time step, k−1 is the previous time step). Then, it can be ascertained (or believed) that a water contamination event has occurred. In this case, the final result of multi-sensor fusion is calculated by the basic fusion equations (6)-(8) at the nearest time steps k, k−1, k−2. The merging of the weighted average method with timedimensional analysis represents this paper's improvement of D-S theory in resolving evidence conflicts that arise in the detection of water contamination.

The implementation of real-time detection of watercontamination events.
To support real-time detection, a series of calculations must be conducted consecutively at time step k. These calculations include water-quality monitoring, data pre-processing, prediction, calculation of residuals, D Hou et al Step 4: Extraction of sensitive parameters

R_1(k), R_2(k), R_3(k) Weighted Average D-S Fusion m({A})= m R_1 (k) ⊕m R_2 (k)⊕m R_3 (k) ({A}) (Eqs. 15, 16)
Step 1: Monitoring and pre-processing Step 2: Prediction Step  R_3(k) are defined as the three largest residuals corresponding to three sensitive parameters. Although there may be simultaneous disturbances for individual sensitive parameters, the probability is very small when all three sensitive parameters are caused by disturbances at the same time, and disturbances for single sensitive parameters can be reduced by evidence fusion.
If the residuals from three sensitive parameters do not conflict with each other, the basic D-S fusion method based on equations (6) and (7) is used to obtain the final (water-contamination) event probability. Otherwise, an additional test is introduced that can be expressed as follows: where m R_i (k − j) denotes the probability assigned to the ith (where i denotes one of the three largest) residuals at time step kj, j = 0, 1, 2. P denotes the constant threshold usually set equal to 0.8 or 0.9. The selection of P will be discussed in section 3.7. If a sensitive parameter i exists that meets the inequalities (17) above, then the following equation, which can be calculated according to the D-S fusion method, is the probability of a water-contamination event: Else, the weighted average approach based on equations (15) and (16) is used for D-S fusion and to obtain the final event probability. It is evident that the residuals of the three selected sensitive parameters are used as evidence sources for D-S fusion, and the fusion's result is the probability of a water contamination event. Figure 2 depicts the steps of the extended fusion method with weight averaging and time-dimensional analysis.

Testing of the D-S fusion method with simulated events
This section presents a test of the extended D-S fusion method of section 2 using simulated water-contamination events. This test is intended to serve as a preliminary assessment of the method's performance.

Geometric patterns of water-contamination events
The geometry of the time series of water-quality parameter values during water-contamination events has been found to follow three generic patterns. These are the U-shaped loss, inverse U-shaped and V-shaped patterns [9]. Inverse U-shaped patterns, such as Gaussian patterns [33], square patterns [6,33], sine wave patterns [6] and other user-defined geometric patterns [2] are commonly used. Figure 3 shows an inverted U-shaped pattern with a square shape applicable to the water-contamination events entertained in this paper. The pattern of figure 3 features a maximum event strength equal to 1, and ten time steps of the water-contamination events. The event strength is defined as the Euclidean norm (or 'distance') of the deviation between the predicted and measured values of a water-quality parameter.

Water-quality background data
A total of 3000 measurements of pH, conductivity and ammonia as nitrogen (NH 3 -N) made at the location of a drinking-water monitoring system at Dongguan (China) are used as the water-quality background (that is, water quality occurring in the absence of water-contamination events) in the present example. Figure 4 shows parts of the time series of pH, conductivity and NH 3 -N during 400 time steps, each time step having 2 min duration.
The background water quality data are first normalized because the event strength is measured in standard deviations of Euclidean norm (or 'distance'), and because the different water quality parameters are expressed in unequal units. A typical geometric pattern is then applied to the normalized measurements at the specified location. Figure 5 displays inverted U-shaped patterns applied to the normalized waterquality parameters as colored columns. The event strength of the inverted U-shaped (square) patterns and event duration equal 1.5 and 10 time steps, respectively. The inverted U-shaped patterns were then applied every 100 time steps to test the D-S fusion method for detecting water contamination.

Performance of AR modeling
The first 500 measurements of 3000 measurements of pH, conductivity and NH 3 -N were used for AR model calibration. Predictions of the three water-quality parameters were made for the remaining 2500 time steps using the calibrated AR model, whereby the prediction of a water-quality parameter for the current time step k was based on several previous measurements of that parameter.
The Bayesian information criterion (BIC) is introduced to determine the order of the AR prediction model for water quality parameters. The models with the minimum value of BIC are selected as the optimal models [34]. Figure 6 shows the relation between the order of model and BIC value corresponding to pH, conductivity and NH 3 -N, respectively. The model order of optimal prediction models of pH, conductivity and NH 3 -N is selected as 8, 20, 5 when the minimum values of BIC are reached. The least-squares method is implemented for model parameter calibration based on the model orders obtained above. After that, the training phase of the AR model is completed. Figures 7, 8 and 9 show that the prediction performance of the AR model for 400 data points of pH, conductivity and NH 3 -N, respectively. The curves of the measured and   predicted values resemble each other well except when the U-shaped patterns are added. Residual curves show that anomaly variations will be more significant after AR prediction, while random changes will be weakened.

Example of BPA calculation and conflict resolution
An example of real-time calculation of the BPA and the subsequent conflict resolution is presented using electrical conductivity. It is stated in section 2.2.2 that the constant    coefficient F, mean deviation μ and standard deviation σ in equation (9) should be predetermined before real-time calculations of the D-S fusion method. In this case, F is selected as 2 (see section 3.6); μ and σ are also predetermined from a long-term data series (10 000 time steps) of residuals in the same monitoring system and calculated to be 0.253 and 0.228, respectively. Figure 10 shows the residuals of conductivity in 100 time steps and the corresponding probability assignment of waterquality events m({A}). It is seen in figure 10 that m({A}) close to 1.0 has relatively large residuals, and that m({A}) close to 0.0 is associated with small residuals. Evidently, there is a relation between the magnitude of m({A}) and that of the residuals.
Using the calculated residuals and BPA, the extended D-S fusion method is implemented for detecting water contamination. To show how the weighted average method is calculated and resolves a conflict of evidence, a specific example case of a conflict resolution is given below. Figure 10 shows that conductivity exhibits a disturbance at time step 99, so that an abnormal phenomenon is suspected. Suppose that the water is non-contaminated at this time step so other water-quality parameters remain stable. The resolution of the evidence conflict between conductivity and other water-quality parameters (e.g. pH) is analyzed. In this example case, the values of the BPA are as follows: where the S matrix denotes the similarity measure matrix of two or more sets of evidence [31]. The fusion of the results of the two methods shows that the weighted average method does a better job at resolving the conflict of evidence than the basic D-S fusion method.

Performance of the D-S fusion method
This section discusses the performance of the extended D-S fusion method. Figure 11 shows the time series of anomalous probability for pH, conductivity, NH 3 -N and the fused probabilities obtained with the D-S fusion method (with weighted averaging) over 400 time steps. It is seen in figure 11 that the D-S fusion method (with weighted averaging) is effective when there is minor conflict of evidence.
An additional inverted U-shaped pattern (with a 10time step duration) was applied to NH 3 -N at time step 200 to simulate an evidence-conflicting situation where only a single water-quality parameter is sensitive to the water contamination. It is seen in figure 11 that the probability for NH 3 -N is anomalous at time step 200, depicted by the symbol '①'. The anomalous probability of NH 3 -N at time step 200 is an indication that there has been water contamination, because NH 3 -N is the only water-quality responsive to contamination in this example. Yet, the value of the fusion probability at time step 200 is near zero, and not anomalous, as depicted by the symbol '②' in figure 11. Evidently, the low value of the fusion probability at time step 200 would produce a false negative that arises when the probabilities of the non-responsive parameters (pH and conductivity) are fused with those of the responsive parameter (NH 3 -N), that is, the fusion method would lead to the determination that there is no water contamination when, in fact, there is.
The conflict of evidence is resolved in this case by assessing the temporal persistence of anomalous probability of a responsive parameter. In other words, suppose that a conflict of evidence occurs as depicted in figure 12 by the probabilities associated with symbols '①' and '②'. That is, the probability of a responsive water-quality parameter is anomalous, yet, the value of the fusion probabilities of the water-quality parameters is not anomalous in the same period.  The rule for the resolution of the conflict of evidence in this instance is to replace the value of the fused probabilities with the probability of the responsive water-quality parameter when the latter exceeds a threshold P (usually set equally to 0.8 or 0.9) during three consecutive periods. Otherwise, use the fusion probability as the best metric for determining the waterquality condition. Figure 12 shows the results of the extended D-S fusion method with weighted averaging and considering temporal persistence (with P = 0.9) in the resolution of evidence conflicts.
High probability of detection (PD) and low false alarm rates (FAR) are two key indicators of the performance of the D-S event-detection method. 1000 data points of the parameters pH, conductivity and NH 3 -N were generated for simulation testing and calculation of the PD and FAR. 500 of those data points had inverted U-shaped patterns (each Ushaped pattern with a duration of 10 time steps) every 100 time steps on all three parameters. An additional 500 data points had inverted U-shaped patterns every 100 time steps just on the NH 3 -N series. Table 1 shows the comparison of the performance of the method for values of the event strengths equal to 1.0, 1.2 and 1.5. In table 1 'AR : pH', 'AR : CON' and 'AR : NH 3 -N' denote the D-S event-detection method based on the time series of the anomalous probabilities calculated with the AR (autoregressive) model used in conjunction with pH, conductivity and NH 3 -N, respectively. A threshold P equal to 0.8 was used to calculate the values for this algorithm based on the AR model. The threshold value has been found to perform well for anomalous detection of single water-quality parameters. Fusion 1 denotes the D-S fusion method without any resolution for evidence conflicts; fusion 2 denotes the D-S fusion method with weighted-averaging for resolving evidence conflicts; fusion 3 denotes the D-S fusion method with only the time-dimension method (with P = 0.9) for resolving evidence conflicts; fusion 4 denotes the D-S fusion method combining the weighted-averaging (with P = 0.9) and time-dimension methods for resolving evidence conflicts, which is herein called the extended D-S fusion method. It is seen in table 1 that the fusion 4 algorithm (extended D-S fusion) produces the lowest FAR and highest PD for all cases of event strengths, and that it performs better than other fusion methods. The best performance of the fusion 4 algorithm was PD = 0.96 and FAR = 0.01, which was achieved for an event strength equal to 1.5. The fusion 3 method produces a good PD which can be as high as that of the fusion 4 method in some instances; however, its FAR is consistently higher than that of the fusion 4 method. The fusion 1 and fusion 2 methods performed poorly in anomaly detection when only a single water-quality parameter is sensitive to the water contamination, as shown by their low PDs and high FARs in table 1.
Receiver operating characteristic (ROC) curves were introduced to test the ability of each approach to discriminate between normal and anomalous water quality using several thresholds and simulated anomalous events for visualizing the performance of different detection algorithms. Unlike PD and FAR indicators influenced by different thresholds, ROC curves reveal the tradeoff between the PD and the FAR for any given value of the threshold [33]. At high threshold values, few anomalies are detected, but those that are detected are almost always true anomalies. As the threshold is lowered, making the anomaly detection algorithm more conservative, the number of anomalies detected increases, but a larger proportion of false alarms are encountered. The area under the ROC curve is used as a measure of the quality of the change detection algorithm with an area of 1.0 corresponding to a perfect sensor and an area of 0.5 indicating results no better than random detection.
Three different event strengths (1.0, 1.2, 1.5) were examined and the area under the ROC curve provides a quantitative basis of comparison across the four fusion algorithms, as shown in figure 13. The fusion 4 algorithm yielded the largest area under the ROC curve in all cases, and the ROC curve areas for strengths 1.0, 1.2 and 1.5 were 0.869, 0.956 and 0.973, respectively, which proves that higher anomaly detection accuracy is obtained with the fusion 4 method. Also, the ROC curves of the fusion 4 method show a rapid rise from (0, 0), which indicates a very low FAR.

Selection of constant coefficient F
An appropriate constant coefficient F in equation (9) must be selected before the BPA calculation. For the same x, the smaller the constant coefficient F is, the larger the anomalous probability. Usually, an appropriate value of F can be determined with several practical testing cases. Relationship curves of F and m({N}) are shown in figure 14. Large F leads to a more uniform distribution of basic probability (corresponds to curve F = 100), which will weaken the event support strength of real anomalous evidence and the probability of detection will be reduced. Otherwise, small F leads to a more concentrated distribution of basic probability (corresponds to curve F = 0.1), which will increase the event support strength of real normal evidence and the FAR is greatly increased.
The relationship between a series-specific value of F and the PD and FAR was calculated to obtain an optimal value of F in the testing cases. The testing data were the same as section 3.5 where 1000 data points of pH, conductivity and NH 3 -N were introduced for simulation testing. Figure 15 shows the relation curves between PD-FAR of the fusion 4 method and the coefficient F where the constant threshold P in equation (17) was selected to equal 0.9. It is clearly that as F increases from 1 to 10, the PD and FAR become lower. To balance the PD and FAR, F = 2 would be an optimal choice in this testing case with PD reaching 96% while FAR being as low as 1%.

Selection of constant threshold P
The constant threshold P in equation (17) was selected to compare with the fusion results between two adjacent pieces of evidence of some water quality parameter, which also represents the consistency of evidence. It was proved that conflicts of any two pieces of evidence will still exist unless the consistency is greater than 0.5. Therefore, the constant threshold P must be greater than 0.5. If P is too large, watercontamination events with a single sensitive parameter and small strength will not comply with equation (17) and the probability of detection is reduced. Otherwise, if P is too small, the fusion results between two adjacent pieces of evidence of single water quality parameter are more vulnerable to the effects of noise, and equation (17) will be easy to meet and the false alarm rate will be increased. The testing data of P was the same as in section 3.5. The fusion 4 method was used to calculate the fusion results with the constant coefficient F equal to 2. Using a series with P ranging from 0.55 to 0.95, the PD and FAR of the fusion 4 method were calculated and shown in figure 16. Figure 16 shows that the PD reached 1.0 when P is in the range (0.55, 0.65), but with a FAR reaching an unacceptable value over 35%. Usually, a FAR less than 10% and a PD higher than 90% will be accepted in practical applications. Therefore, a constant threshold P in (0.8, 0.9) will be a good choice and the testing cases in this paper set P equal to 0.9.

Water contaminants and water-quality parameters
The example of this section relies on real-time measurements of water-quality parameters to test the performance of the extended D-S fusion method in detecting water-contamination events. Two toxic compounds were injected in water flowing through an experimental pipe network. The contaminants are potassium ferricyanide (K 3 [Fe(CN) 6 ]) and ferric ammonium sulfate (NH 4 Fe(SO 4 ) 2 · 12 H 2 O, also known as iron alum). Potassium ferricyanide is used primarily in manufacturing   paints, inks, pigments, pharmaceuticals, metal heat treatments, salts, anti-caking agents and food additives. Potassium ferricyanide's main toxic effect in humans is kidney damage. Ferric ammonium sulfate is an alkaline, corrosive substance  used mainly as an analytic reagent, and in the manufacturing of drugs and raw materials. Skin and eye contact with this substance can cause burns. Its toxic internal effects are burning of digestive organs, bleeding, and shock. Real-time measurements of water-quality parameters were made in the pipe network with the aim of gathering data useful to test the performance of the extended D-S method in detecting the two injected contaminants. The measured water-quality parameters are (electrical) conductivity, pH, free chlorine, total chlorine, NH 3 -N, sulfate (SO 2− 4 ), chemical oxygen demand (COD) and total organic carbon demand (TOC). Table 2 lists the water-quality parameters and measurement method and sensors used in this example.
The responsiveness of the water-quality parameters to the presence of potassium ferricyanide and ferric ammonium sulfate was tested by the authors and was found to vary among the parameters. Figures 17 and 18 show the response curves to concentrations of potassium ferricyanide and ferric ammonium sulfate, respectively, for the water-quality parameters. It was found that free chlorine, total chlorine, NH 3 -N and conductivity were most responsive to potassium ferricyanide. This is shown by the response curves in figure 17. SO 2− 4 , pH, NH 3 -N and conductivity were found be most responsive to ferric ammonium sulfate, as shown in figure 18.   Figure 19 shows that free chlorine and total chlorine responses to potassium ferricyanide are appreciable and highly correlated with each other. Therefore, only one of these parameters must be kept for further fusion analysis. In addition, it is seen in figure 19 that the responsiveness of NH 3 -N and conductivity to potassium ferricyanide are too small to be considered for further analysis. The normalized response curves to ferric ammonium sulfate shown in figure 20 establish that SO 2− 4 , pH and NH 3 -N are responsive, whereas electrical conductivity is not.

Experimental design and method
Contaminant injection in water, transport, monitoring and detection testing was conducted in an experimental water distribution system shown in figure 21. It contains a ductile  iron water-distribution pipe 50 m long with 20 mm internal diameter. The experimental water system includes a tap-water tank, contaminant solution tank, solenoid valve, contaminant injection point, contaminant monitoring points and PLC (programmable logic controller). The PLC controls the flow rates of tap water and contaminant solution into the pipe in all experiments. There are two contaminant injection methods: one is injection with a contaminant solution tank, and the other is injection through a contaminant injection point. The first injection method was used to obtain the relation between a certain contaminant concentration and the probability of detection (PD).
Tap water was run through the experimental pipe for 100 min at which point the contaminant solution was injected into the pipe's flow of tap water for 20 min. The contaminant solution had specified concentrations of potassium ferricyanide and ferric ammonium sulfate. Thereafter, the contaminant solution was injected into the pipe of tap water at the contaminant injection point for 20 min every 2 h. Subsequent water-quality changes were measured at stations downstream from the injection port. The water quality sampling frequency with the sensors listed in table 2 at the monitoring point D was one measurement every 2 min. Potassium ferricyanide was tested at injected concentrations of 0.4, 0.5 and 0.6 mg L −1 , whereas ferric ammonium sulfate was tested at injected concentrations of 0.8, 0.9 and 1.0 mg L −1 .

Results and discussion
Free chlorine, NH 3 -N and conductivity measurements reached stable concentrations equal to 0.08 mg L −1 , 0.02 mg L −1 and 1.4 μS cm −1 , respectively, when the injected concentration of the potassium ferricyanide solution equaled 0.6 mg L −1 . SO 2− 4 , pH and NH 3 -N measurements reached a stable concentration equal to 2.0, 0.05 and 0.06 mg L −1 , respectively, when the concentration of the ferric ammonium sulfate solution was 1.0 mg L −1 . These responses of the water-quality parameters were within the allowable range specified by the 'Standards for drinking water quality of China GB 5749-2006'. Therefore, if an exceedance criteria event had been used to detect the presence of contaminants, no contamination event would have been declared. Figures 22 and 23 show the relations between the time series of anomalous probability for the waterquality parameters and the D-S anomalous fusion probabilities corresponding to the injection of potassium ferricyanide at a concentration equal to 0.6 mg L −1 and ferric ammonium sulfate at a concentration equal to 1.0 mg L −1 over a period of 400 time steps (each time step with a duration of 2 min). This period included several detected events, depicted by the red columns in the bottom pane corresponding to the anomalous fusion probabilities. The probability of detection (PD) and false alarm rates (FAR) are high and low with the (extended) D-S fusion method applied in this example. Water-contamination detection with the multi-sensor fusion algorithm MV-NN [33,6] was implemented for comparison with this paper's extended D-S fusion method. The MV-NN algorithm compares the Euclidean distance between the current measured water quality and any water quality measurement within the recent past in multivariate space. The comparison results are shown in table 3. It is seen in table 3 that when the concentrations of the potassium ferricyanide and ferric ammonium sulfate solutions were 0.4 mg L −1 and 0.7 mg L −1 , respectively, the extended D-S fusion algorithm (that is, with analysis of the temporal persistence of anomalous probabilities of water-quality parameters) exhibited relatively poor detection performance as measured by the PD and the FAR. Yet, the D-S fusion performance was comparable to that of the MV-NN method when the contaminant concentrations were low. The poor detection performance of the extended D-S fusion and the MV-NN fusion are explained by the fact that the degree of water contamination was within the range of the normal fluctuations in the background water quality. However, the extended D-S fusion method shows a significant ability of reducing the FAR. It is also shown in table 3 that a PD larger than 80% and FAR lower than 4% will be achieved with the extended D-S fusion method when the concentration of the potassium ferricyanide solution is equal to or higher than 0.5 mg L −1 and the ferric ammonium sulfate solution is equal to or higher than 0.9 mg L −1 , which shows better performance (higher PD and lower FAR) than MV-NN in most test cases. The relation curves between PD-FAR and the contaminant concentration are shown in figure 24. It is clear that the extended D-S fusion method has higher PD and FAR performance than the MV-NN algorithm in most of the testing concentrations of potassium ferricyanide and ferric ammonium.

Conclusions
An effective multi-sensor fusion method for watercontamination detection based on an extended D-S evidence theory has been presented in this study. The proposed method combines residuals for water-quality parameters with an autoregressive (AR) model. The method combines weighted averaging of evidence with the analysis of the temporal persistence of anomalous probabilities of waterquality parameters to resolve conflicts of evidence and make resolutions about the occurrence of water-contamination events. The extended D-S fusion method presented in this paper was tested with simulated and real-time monitored water-quality data. Our results show that the proposed extended D-S fusion method can detect water-contamination events with simulated strengths larger than 1.2 and using real-time monitoring of water quality. This paper's proposed extended D-S fusion method has been proven capable of effectively detecting water-contamination events. It also performs well compared to alternative detection methods. The implementation of the proposed extended D-S fusion method to drinking water systems in conjunction with early warning systems operating in real time would require (1) developing a reliable library of contaminant-sensitive parameters, and (2) integrating daily operational data to reduce false alarms.