Next Article in Journal
Freeze–Thaw-Driven Dynamics of Soil Water–Salt and Nitrogen: Effects and Implications for Irrigation Management in the Hetao Irrigation District
Previous Article in Journal
Identifying Fresh Groundwater Potential in Unconfined Aquifers in Arid Central Asia: A Remote Sensing and Geo-Information Modeling Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Bottle Test Free Chlorine Bulk Decay Coefficient Statistical Fitting for Water Supply Systems via State Estimation Techniques

Department of Civil and Building Engineering, University of Castilla-La Mancha, Avda. Camilo José Cela s/n, 13071 Ciudad Real, Spain
*
Author to whom correspondence should be addressed.
Water 2025, 17(20), 2990; https://doi.org/10.3390/w17202990
Submission received: 3 September 2025 / Revised: 1 October 2025 / Accepted: 13 October 2025 / Published: 16 October 2025
(This article belongs to the Section Urban Water Management)

Abstract

Free chlorine residual is the most widely adopted disinfectant residual in water supply systems. Chlorine is usually applied at treatment works, but it decays as water flows and spends time within the network. Chlorine decay is the result of a bulk and a wall decay component. Bulk decay may be considered invariable through the pipe network (it only depends on water composition) and is often characterized at the entrance to the system through bottle tests, which measure chlorine evolution over time in a laboratory environment to then adjust a model (dependent on one or more coefficients) that represents its behavior. Previous studies have acknowledged that the bulk decay coefficient varies widely and that free chlorine measurements are subject to measurement errors, but they have not quantified the impact of these errors on the bulk decay coefficient. The aim of this paper is to provide a methodology that statistically fits chlorine’s bulk decay coefficient based on bottle test results, with appropriate management of uncertainty effects. The proposal is to use state estimation techniques, which combine free chlorine measurements and system knowledge (in this case, a first-order bulk decay model) to provide the most likely chlorine behavior and its associated uncertainty. This approach goes one step beyond previous studies, which report only a single value of the bulk decay coefficient without accounting for randomness, and thus fail to assess true variability, leading to unrepresentative comparisons. Results for water samples from different sources demonstrate the importance of controlling the fitting process through state estimation to understand and compare the bulk decay coefficient.

1. Introduction

Water supply systems often rely on disinfectant residuals to ensure water quality through the network. Free chlorine residual is the most widely adopted disinfectant residual in drinking water supply systems. According to the World Health Organization, the minimum residual concentration of free chlorine at the point of delivery should be 0.2 mg/L [1]. High chlorine levels are associated with issues such as odor/taste problems or disinfection by-product formation (e.g., [2]). Consequently, residual chlorine ranges between 0.2 and 5 mg/L [3] but is most often kept below 1–1.5 mg/L in practice [4].
To ensure adequate chlorine values, free chlorine is commonly measured at strategic points within the supply network and/or at the user tap. Online monitoring presents several advantages [5], but continuous chlorine analyzers are expensive and require systematic maintenance [6]. In practice, many chlorine monitoring plans still mainly rely on manual grab samples, especially in small urban or rural areas. Chlorine sampling at the water distribution system is basically conceived for quality assurance, and few utilities employ a systematic protocol to collect samples [7]. Previous authors have highlighted that sampling procedures could and should be improved beyond regulatory compliance to gain knowledge about network operation [8]. This would be especially interesting to better characterize (and model) the chlorine decay process, which is known to be complex [9].
Chlorine decay is usually divided into a bulk and a wall decay component (e.g., [10,11]). Bulk decay is determined by water quality characteristics only and is not influenced by the pipes within the water distribution system [12]. It is usually characterized at the entrance to the water distribution network through bottle tests [13,14]. Bottle tests involve measuring chlorine evolution over time in a laboratory environment to adjust the equation coefficients that describe the observed decay [15]. Different models can be adopted to simulate bulk decay [16,17], but first-order models (i.e., exponential decay) are most typically assumed (e.g., [9,18,19]). This implies that a single parameter, commonly known as the bulk decay coefficient or k b , must be adjusted. This coefficient varies widely depending on the water source and temperature [18,20]. Wall decay refers to the chlorine reaction with the wall. This includes chlorine interaction with biofilms, corrosion products, and/or any other particles adhered to the wall [17], which may vary in space and time in the water distribution network. Different models have been presented to explain the wall component (e.g., [18,21,22]), but there is still no consensus on which is the best alternative to simulate this complex interaction. In practice, wall decay is often quantified as the difference between measurements of chlorine at a network position and the corresponding values obtained when assuming a bulk-decay (only) model [17,23]. This means that an accurate estimation of bulk decay is also key to characterizing the wall effect [16].
Despite the relevance of chlorine decay for the operation of water supply systems, to the best of the authors’ knowledge, no previous studies have assessed the impact of chlorine measurement errors on k b estimation. This can be problematic because several sources of error coexist when sampling free chlorine [24]. For example, measurement error is affected to some extent by the measurement principle. Either colorimetric methods (measurement of color intensity after applying a reaction product) or amperometric methods (measurement of ions based on electric current or changes in electric current) can be used to measure chlorine. DPD (N,N-diethyl-p-phenylenediamine) or colorimetric methods have typically been the most popular choice for free chlorine measurement (e.g., [5,25,26]) because they are less expensive; however, measurements may be subject to significant measurement errors and/or low repeatability among users [24]. Although less common, disposable sensor amperometry tests—such as those performed with Chlorosense or KEMIO devices [27]—are increasingly being adopted for grab sampling in the water supply (e.g., [28,29,30]) and food (e.g., [31,32]) industries. Previous studies have identified that LaMotte colorimeters (based on colorimetry) and Chlorosense devices (based on chronoamperometry) are associated with 5.1% [24] and 4.8% [26] measurement errors, respectively, under laboratory conditions. Water quality measurement errors (in general) have motivated the measurement of some parameters (such as coliforms) more than once (e.g., [19,33]). However, measurement replication is determined by the minimum accuracy required by regulators, and is not standard practice in the water sector, particularly with respect to chlorine measurements. Most chlorine studies in the water field are based on single measurements (e.g., [34]), and only a few microbiological studies mention replicate measurements in general (e.g., [19,35]) and triplicate measurements in particular (e.g., [36,37,38]). This context highlights that chlorine measurement strategies are varied and associated with different measurement errors. These errors propagate when computing the associated bulk decay coefficient.
Figure 1 provides a conceptual representation of a chlorine bulk decay process, which is usually characterized through standard bottle tests (e.g., [15]). Standard bottle tests rely on individual measurements at each of the observed times, which are then used to adjust k b (best fit to data). This approach provides a single value of k b and does not enable us to account for the impact of chlorine measurements on the bulk decay coefficient. Figure 1a shows that if more than one measurement was taken at each time, there would be several possible curves (i.e., combinations of measurements) that could be fitted to chlorine measurements, i.e., there is a range of possible k b values. This means that, because chlorine measurements are not accurate enough, the bulk decay coefficient should be represented by a distribution function rather than a single value (Figure 1b). To overcome this issue, this work will develop a methodology to statistically characterize the bulk decay coefficient (mean and standard deviation) and will demonstrate with real values (see Results section and related appendices) that the variability of k b is not negligible and should be considered when comparing bulk decay coefficients. This approach could be key to assessing the impact of chlorine measurement and model errors on k b and so to understand chlorine dynamics in water supply systems.
Therefore, the aim of this paper is to develop a methodology that statistically fits chlorine’s bulk decay coefficient (mean value and standard deviation) at water supply systems, tracking uncertainty along the process. Following common practice in the field, the method relies on bottle test data, which in this case are fitted to a first-order bulk decay model; however, it could similarly be adapted to alternative models. The mean value of k b is here computed using state estimation techniques, which apply a non-linear mathematical algorithm to identify the most likely state of a variable (in this case, k b ) while considering (bottle test) measurement errors and system knowledge (in this case, the assumed bulk decay model). The associated standard deviation is computed by propagating measurement errors to the k b solution. This approach provides a solid framework to statistically characterize k b . It goes one step further with respect to previous studies, which only provide one possible k b value (e.g., [18,20]). Systematic statistical fitting of k b (mean value and standard deviation) gives insight into the variability of the bulk decay coefficient, which could be crucial when analyzing changes over time and/or with temperature. Therefore, this work introduces a methodology to understand, monitor, and model chlorine decay processes under varying conditions, including those driven by climate change [39,40]. We want to highlight that this methodology constitutes a first scientific contribution intended to identify (and quantify) a problem that affects both industrial practice and research. The methodology has potential to evolve into a tool that can be operationally used by water utilities (knowledge transfer to industry) once chlorine decay processes are better understood on a scientific level (see Discussion section).

2. Methodology

This section provides a methodology to statistically fit the free chlorine bulk decay coefficient at water supply systems. The proposed method starts by carrying out a bottle test with replicate measurements (Section 2.1) for a bulk water sample taken at the water treatment plant immediately before chlorination. Measurement replication is not strictly necessary to apply the methodology presented in this work; however, it reduces the uncertainty of the bulk decay coefficient (see the Results section), and therefore it is strongly recommended here. Water is chlorinated, and decay is observed in a laboratory-controlled environment. Bottle test data are here adjusted to fit a first-order bulk decay process, which is formulated in Section 2.2. The state estimation mathematical apparatus to estimate the mean bulk decay coefficient is presented in Section 2.3. Section 2.4 presents the uncertainty assessment process to compute the standard deviation of the corresponding bulk decay coefficient. Section 2.5 establishes a framework for outlier detection based on uncertainty results. Figure 2 shows a schematic workflow of the proposed methodology, which will be explained in detail in the following subsections.

2.1. Bottle Tests (With Replicate Measurements)

Bottle tests are conceived to measure chlorine’s bulk decay in a laboratory-controlled environment. The general procedure described by [15] is followed in this work, although it is here adapted to include several measurements at each time. As explained in the Introduction, measurement replication is not common in the water supply field, but it will help to gain confidence in chlorine measurements, which, according to the literature, may be subjected to significant errors [24,26]. Palintest’s KEMIO is used in this work to measure free chlorine because, as explained in the Introduction, it is associated with lower errors and greater repeatability compared to colorimetric methods.
Bottle test key steps are now summarized as follows:
  • Test preparation. Lab material is cleaned with 5% sodium hypochlorite (NaClO) solution and rinsed at least three times with MilliQ water. An isothermal bath is set to the goal temperature for the bottle test at least 2 h before taking the sample to ensure thermal equilibrium. If the isothermal bath can only heat (not refrigerate) the water sample, the goal temperature should be greater than the laboratory temperature (considering seasonal variability). The goal temperature should be kept below 30 °C to minimize sodium hypochlorite potential instabilities (e.g., [41,42]) and deviations in decay rate estimations ([13,43]). In this work, all bottle tests are carried out at 24 °C.
  • Grab sample. A bulk water grab sample is taken at the water treatment plant immediately before chlorination. The water sample must be transported to the laboratory as soon as possible. Once at the laboratory, the temperature, pH, and Total Organic Carbon (TOC) of the sample are measured. Water is then transferred to a 3.8 L Winchester bottle, which is introduced in the isothermal bath for at least 2 h to ensure thermal equilibrium before chlorination.
  • Chlorination. Temperature is measured before chlorination to confirm that the goal temperature has been reached. Sodium hypochlorite solution is added to the bottle for chlorination (80 μ L of 5% solution) with a high-resolution micropipette. This dose of solution leads to an Initial Chlorine Concentration (ICC) of approximately 1 mg/L for the grab samples considered in this work. Only one ICC is tested in this work, but different temperatures and ICC values could be explored if considered necessary as in [13].
  • Distribution in subsamples. The bottle is agitated several times to ensure mixing. The total volume of the bottle is distributed in 125 mL amber glass bottles (30 subsamples in total). Each jar is leveled off, hermetically sealed, and submerged in the isothermal bath again. This whole process usually takes less than 15 min. ICC and pH are measured again for the remaining water in the Winchester bottle to validate previous measurements. ICC values measured in Steps 3 and 4 are averaged in this work for subsequent analysis.
  • Chlorine measurements. Chlorine measurements are taken after approximately 1 h, 3 h, 10 h, 24 h, 48 h, and 96 h (or more depending on the observed decay from previous measurements). The concentration of free chlorine at 1 h is measured in this work for the sake of control, but is systematically excluded from the bulk decay coefficient analysis to avoid any potential particularities associated with the fast reactions that take place at treatment works after the first contact with the disinfectant [44]. At each time, 4 amber glass bottles are used to obtain 4 independent measurements (less than 10 min apart). Results are carefully noted down for later analysis (see Section 2.3). If available, extra subsamples can be used whenever a measurement is clearly off. These extra bottles are used when measurements at one time are more than 0.2 mg/L apart and/or when chlorine measurement values are below 0.1 mg/L (lower measurement range of the meter).
  • A bottle test is considered finished when all measurements are made at the last time considered for the analysis (a maximum of 7 times) or when chlorine measurements reach 0 mg/L.

2.2. Bulk Decay Model

The methodology presented in this work (state estimation with uncertainty assessment) could be combined with any chlorine decay model. The first-order bulk decay model, which has been widely used in the literature (e.g., [9,18,19]), will be assumed in this work to facilitate notation and understanding. Appendix A.1 presents the formulation of the first-order bulk decay model, which assumes an exponential decay for free chlorine residual. The appendix derives that chlorine measurements, generally denoted as C m e a s u r e [mg/L] can be expressed for each time t and measurement replication i as C m e a s u r e t , i ; t , i :
C m e a s u r e t , i = C f , m o d e l + C 0 , m o d e l C f , m o d e l · e k b · t + E m o d e l ( t ) + E m e a s u r e ( t , i )
where C 0 , m o d e l [mg/L] represents the initial chlorine concentration according to the adopted model, t [hours] refers to the water age or time of residence (in this case, within the bottle test), and k b [1/h] is the chlorine decay bulk coefficient. It must be highlighted that the standard exponential equation [9] is here affected by a free chlorine concentration asymptote C f , m o d e l [mg/L] to represent that chlorine values may not reach 0 mg/L even after very long bottle tests. For example, chlorine concentrations do not reach 0 mg/L even after almost 400 h of testing in [17]. Since such a high-water age value (>16 days) is unlikely in most pipes within a water distribution system [45], C f , m o d e l is introduced here to generalize the traditional exponential model. Also, measured (rather than modeled) values are provided by Equation (1), so two additional errors must be included: the model error at each time t , E m o d e l ( t ) [mg/L], and the error in chlorine measurements at each time t and for each replication i , E m e a s u r e ( t , i ) [mg/L]. The model error E m o d e l ( t ) exists because the model does not reproduce real behavior exactly, and deviations may take place at each of the sampled times during the bottle test. Similarly, E m e a s u r e ( t , i ) represents the error in chlorine measurements, which is different every time that chlorine is measured during the test. Both errors explain the difference between measured chlorine concentrations (as represented by Equation (1)) and modeled chlorine concentrations (as provided by the first two summation terms in Equation (1)).
Equation (1) is the fundamental decay equation assumed here to derive the state estimation (and uncertainty assessment) formulation that feeds from bottle test data (with replicate measurements) as described in Section 2.1. Equation (1) could be modified (and the state estimation formulation adapted) if more complex decay models, such as those proposed by [16,44] or [46], were adopted.

2.3. State Estimation

State estimation (SE) techniques provide the best estimate of the state of a process by combining measurements of the process state and a mathematical representation of the process [47]. State estimation techniques were developed in the 1970s in the field of power supply and control systems (e.g., [48,49]) but have been systematically applied to address other complex non-linear problems, such as those related to structural systems (e.g., [50]), traffic systems (e.g., [51]) and water supply systems (e.g., [52,53]) to name a few.

2.3.1. General Formulation

The SE problem can generally be formulated as an unconstrained weighted least squares optimization problem [54]:
min x f o b j ( x ) = 1 2 ϵ x T W ϵ x = 1 2 z g x T W z g ( x )
where f o b j is the objective function to minimize. The objective function depends on a vector of state variables x R n , where n is the number of state variables. State variables are the minimum subset of independent variables needed to compute the state of the system [55]. Vector ϵ x R m represents the error or difference between measurements, which are represented by vector z R m ( m is the number of measurements), and modeled values through the non-linear relationship g ( x ) : R n R m . Matrix W R m × m is a diagonal matrix for measurement weights, which is equal to the inverse of the measurement error variance-covariance matrix W = C o v z 1 . This matrix is typically diagonal (only variance values) because measurements are usually assumed independent (no covariance).
The state estimation problem described by Equation (2) is frequently solved algebraically. This means that the optimization problem is solved iteratively by relying on the normal equation method [52]:
x ( v + 1 ) = x v + x ( v + 1 )
x ( v + 1 ) = J ( v ) T C o v z 1 J ( v ) 1 J ( v ) T C o v z 1 ϵ x v
where v represents an iteration counter. Equation (3) implies that the state variable vector is updated at each iteration according to the vector of total variation for each state variable per iteration (as computed with Equation (4)). The iterative process finishes when the norm of the x vector is lower than a tolerance ( t o l = 1 × 10−6 in this work) or when the iteration counter reaches a maximum number of iterations ( N m a x = 100 in this work), leading to an optimal solution x ^ . Equation (4) involves the Jacobian matrix at each iteration J ( v ) R m × n , which represents the derivative of measurements with respect to the state variables.

2.3.2. Adaptation for Bottle Test Free Chlorine Bulk Decay Coefficient Statistical Fitting

The general state estimation formulation (as defined in Section 2.3.1) should be adapted to fit the bulk decay coefficient k b . Equation (1) represents chlorine measurements in terms of the assumed first-order decay model and model/chlorine measurement errors (full derivation in Appendix A.1). Equation (1) can easily be rearranged to express chlorine measurement errors (i.e., difference between chlorine measurements and model estimations) as:
E m e a s u r e t , i = C m e a s u r e t , i C f , m o d e l + C 0 , m o d e l C f , m o d e l · e k b · t + E m o d e l ( t )
It must be noted that measurement errors are embedded in the SE problem (Equation (2)) through the vector of measurements z R m . This vector can intuitively be associated with chlorine measurements C m e a s u r e t , i . However, to be precise, the z vector may include chlorine measurements as represented by C m e a s u r e t , i (vector z m e a s u r e R m c , where m c is the number of chlorine measurements) and any other possible pseudomeasurements (vector z p s e u d o R m p , where m p is the number of pseudomeasurements). Pseudomeasurements are estimations based on prior knowledge (e.g., [56]). It is reasonable to assume that we can have first (or a priori) estimations of some involved variables, such as the initial chlorine concentration C 0 , m o d e l or the final chlorine concentration C f , m o d e l . This means that, in general, z = [ z p s e u d o ; z m e a s u r e ] and m = m p + m c .
Starting with chlorine measurements, it should be noted that chlorine values and measurement errors have been represented as dependent on time t and replication i in Equations (1) and (5) to facilitate the connection with the bottle test procedure described in Section 2.1. However, chlorine errors/values can also be expressed as vectors only dependent on the number of measurements m c , without making explicit the time t and replication i . Therefore, Equation (5) can be rewritten as:
E m e a s u r e = C m e a s u r e C f , m o d e l + C 0 , m o d e l C f , m o d e l · e k b · t + E m o d e l
where E m e a s u r e R m c represents the vector of measurement errors, C m e a s u r e R m c is the vector of measured chlorine concentrations, and E m o d e l R n t i m e s is the vector of error models (one for each time), which is consistent with the time vector t R n t i m e s .
In this work, we assume that the rest of the variables involved in the first-order bulk chlorine decay model embedded in Equation (6) ( C 0 , m o d e l , C f , m o d e l and k b ) are pseudomeasured. The pseudomeasurement error vector can be generally written as:
E p s e u d o = z p s e u d o g ( x )
The error vector ϵ x in Equation (2) can therefore be particularized for this case as:
ϵ x = [ E p s e u d o , E m e a s u r e ]
It is important to define the set of state variables represented by vector x . Different sets of state variables are possible in any state estimation formulation [53]. In this work, the initial concentration of chlorine ( C 0 , m o d e l ), the final concentration of chlorine ( C f , m o d e l ), the chlorine decay bulk coefficient ( k b ) and the vector of model errors ( E m o d e l ) are considered state variables. The bulk decay coefficient is the main motivation for this formulation (it is the coefficient that we want to fit to the bottle test data), but additional variables are needed to estimate chlorine values/errors according to the assumed model. This assumption implies that there are n = 3 + n t i m e s state variables:
x = [ C 0 , m o d e l ;   C f , m o d e l ;   k b ;   E m o d e l   ]
Equations (8) and (9) (which also involve Equations (6) and (7)) adapt the SE problem described in Section 2.3.1 to adjust the bulk decay coefficient k b from the bottle test data.
It should be noted that the algebraic solution for the SE problem (Equations (3) and (4)) requires that the Jacobian matrix is of full rank. A necessary condition for this is that the number of measurements ( m ) is greater than the number of state variables ( n ). Several observations should be made regarding the number and characteristics of measurements/pseudomeasurements and state variables in this case:
  • Measurements/pseudomeasurements. It has been assumed that a first (a priori) estimation of C 0 , m o d e l , C f , m o d e l , k b and E m o d e l is available for SE purposes. This means that the number of pseudomeasurements equals the number of state variables ( m p = n ) and ensures that the number of measurements m = m p + m c = n + m c is always greater than the number of state variables n . Pseudomeasurements are generally associated with high uncertainty (i.e., high standard deviation or variance) to allow measurements (with lower uncertainty) to condition state estimation results [54]. Assigning a high variance for pseudomeasurements implies a low weight, and so a low contribution to the state estimation process described by Equations (2)–(4). Because measurements have greater relative importance (i.e., they are associated with a lower error), the uncertainty of state variables as computed with state estimation (a posteriori) should be significantly lower than that assumed for pseudomeasurements (a priori). If this was not the case, measurements would not provide any additional information about the value of that variable. This will be highlighted when results are presented in Section 3. Pseudomeasurements are also measurements, but the term is used specifically to refer to those that are not well-known a priori and so should be associated with a higher variance to represent the lack of knowledge (e.g., [53,56]). Table 1 summarizes the default values (mean and variance) that are adopted in this work for state variable pseudomeasurements. Mean values are used in this work as initial values for the corresponding state variables x ( 0 ) . Standard deviations are assumed to be low for variables that inspire relative confidence in the mean value. For example, we assume 0.01 mg/L for the standard deviation of C f , m o d e l (because chlorine concentration is expected to tend to zero), and E m o d e l t ; t = 1 , 2 , , n t i m e s (because the first-order bulk decay model is frequently adopted in the literature). On the contrary, standard deviations are considered high when there is low confidence in the assumed mean values. This is the case of C 0 , m o d e l (we assume 0.50 mg/L) because free chlorine measurements at the beginning of the bottle test (ICC measurements in Steps 3 and 4 in Section 2.1) have been found to vary noticeably. It is also the case of the bulk decay coefficient k b , which is difficult to anticipate before the bottle test because it varies widely with the water source and temperature (e.g., [18,20]). A high standard deviation there (0.50 1/h) implies conceding low credibility to this first estimation. These default values may be changed depending on the SE results (see Figure 2) as discussed in the Results section.
  • State variables. It has already been explained that n = 3 + n t i m e s (Equation (9)). This means that the number of state variables (and so the number of total measurements) depends on the number of times considered for the analysis. At each time (i.e., approximately 3 h, 10 h, 24 h, 48 h, and 96 h or more), measurements are replicated at least four times. Since the time window for all replications is smaller than 5 min, the average time of measurement is considered here. This implies that n t i m e s keeps relatively low in a bottle test (most likely between 5 and 7, depending on the chlorine decay evolution and the number of replications), and so there is more measurement redundancy, which is positive for state estimation applications [57].
  • Table 1 gathers the mean and standard deviation assumed in this work for state variable pseudomeasurements. It also includes the assumed standard deviation for chlorine measurements. Free chlorine measurement error could either be assumed (according to previous works) or quantified. In this work, free chlorine measurement error (using the KEMIO device) characterization tests have been carried out as described in Appendix A.2 (which includes Figure A1).
These assumptions regarding measurements/pseudomeasurements and state variables are key to constructing the Jacobian matrix for this application. Jacobian matrix components are calculated by computing the derivatives of pseudomeasurements/measurements with respect to state variables. Appendix A.3 provides the formulation of matrix components for the assumed bulk decay model (see Figure A2). This formulation ensures that once the SE iterative process finishes (Equations (3) and (4)), the optimal solution x ^ represents the most likely value of the state variables. This vector includes the bulk decay coefficient (Equation (9)), so the expected value of k ^ b (and the rest of the state variables) is obtained (see Figure 2). The mean value of chlorine concentrations at each time (here denoted as C ^ R n t i m e s ) can be obtained by substituting x ^ values in Equation (1).

2.4. Uncertainty Assessment

State variable uncertainty is typically computed according to the First-Order Second-Moment (FOSM) formulation [54]:
C o v x ^ = J T C o v z 1 J 1
where C o v x ^ R n × n represents the state variable variance-covariance matrix. This matrix must be computed with the Jacobian matrix at the optimal solution x ^ . The diagonal of the matrix C o v x ^ contains the variance of the state variable vector, which includes the variance of the bulk decay coefficient k ^ b (see Figure 2) in third position (Equation (9)).
The uncertainty of any other set of network variables can be computed by applying the FOSM again [58]. For example, the variance-covariance matrix of chlorine values at each time C o v C ^ R n t i m e s × n t i m e s can be computed as:
C o v C ^ = K C o v x ^ K T
where K R n t i m e s × n is the Jacobian matrix of chlorine values at each time. It can be obtained by extracting the corresponding rows of the Jacobian matrix J at the optimal solution x ^ . The diagonal of matrix C o v C ^ gathers the variance of estimated chlorine values at each of the n t i m e s .

2.5. Outlier Detection

The error or difference between measurements and estimated variables is crucial for outlier detection. In this work, standardized errors are computed for all measurements. This includes state variable pseudomeasurements and chlorine measurements, generally denoted as ϵ x ^ (see Equation (8)). Measurement errors are standardized ϵ ¯ x ^ according to their initial variance, which is gathered in the measurement variance-covariance matrix C o v z :
ϵ ¯ x ^ = ϵ x ^ · C o v z 1
Outliers can be identified by comparing standardized errors and confidence intervals. Different thresholds have been explored, but in this work, the tipping point is determined by the α = 99% Confidence Interval (CI), which is computed as:
C I z = ± Φ 1 1 α 2
where Φ 1 represents the inverse of the normal Cumulative Distribution Function (CDF). If the measurement standardized error (obtained from Equation (12)) is greater than the positive threshold or lower than the negative threshold of CI (Equation (13)), measurements can be identified as outliers. If any pseudomeasurement is identified as an outlier, the hypothesis behind this estimation should be revisited (see Figure 2). Chlorine measurement outliers represent measurement anomalies, which should be excluded from the state estimation process (i.e., SE should be re-run without conflictive chlorine measurements). We recommend removing outliers (i.e., deleting chlorine measurements) one by one to minimize data erasing (see Figure 2). The first outlier to be removed should be the one associated with the greatest standardized error in absolute value. State estimation results after removing each outlier should be assessed to decide if additional outliers should be removed. In case of doubt, all outliers identified when running state estimation for the first time should be removed.
Confidence intervals can also be derived for the most likely chlorine concentrations at each time. It has already been explained that the expected chlorine values C ^ can be obtained by substituting the optimal SE solution x ^ in Equation (1). The chlorine confidence interval here is computed as:
C I C ^ = C ^ ± Φ 1 1 α 2 · d i a g ( C o v C ^ )
where d i a g ( ) indicates the diagonal selection of a matrix, in this case, the chlorine variance-covariance matrix C o v C ^ (Equation (11)).
Finally, it must be highlighted that the chlorine confidence interval provided by Equation (14) considers the error associated with the real estimate of chlorine values through C o v C ^ . This confidence interval does not consider measurement error, only the uncertainty of state variables. Since measurement error is inherent to chlorine measurements, C I C ^ could be expanded by considering the total variance of chlorine, which includes that associated with SE results (represented by C o v C ^ ) and measurement variance ( σ C m e a s u r e 2 ):
T C I C ^ = C ^ ± Φ 1 1 α 2 · d i a g C o v C ^ + σ C m e a s u r e 2
where σ C m e a s u r e 2 = 0.065 2 (mg/L)2 according to Table 1 (see details in Appendix A.2). Both C I C ^ and T C I C ^ will be computed in Section 3 to identify any potential bottle test measurement anomalies.

3. Results

The methodology described in Section 2 is applied in this work to characterize the bulk decay coefficient of three different water sources (A, B, and C). Water grab samples are taken immediately before chlorination at three treatment works in the region of Castilla-La Mancha (Spain). In order to assess the repeatability of the process and to highlight the physical meaning of state estimation/uncertainty assessment results, each bottle test is carried out three times (in parallel) in the exact same way for the water sample from each source. Replicated bottle tests will be denoted as “X-E01”, “X-E02”, and “X-E03”, with “X” being “A”, “B”, or “C” depending on the water source. This means that each grab sample presents a volume of approximately 12 L, and the laboratory process described in Section 2.1 is carried out in three parallel isothermal baths (i.e., chlorination happens at three different 3.8 L Winchester bottles) for each water source. Time blocks are slightly displaced among the 3 tests to ensure that the same person can carry out the triplicate lab test in parallel. Only one bottle test is needed to compute the uncertainty of the bulk decay coefficient with the methodology presented in this paper, but replication is carried out for these three samples to validate the method and to illustrate its relevance.
Table 2 summarizes the main characteristics of the grab samples from each of the three sources/treatment works when processed at the laboratory before starting the bottle test. TOC is measured only once for the total volume of water (12 L), but temperature, pH and ICC are measured for each parallel bottle test (3.8 L) following the procedure described in Section 2.1. Table 2 shows that TOC is higher for treatment works A compared to B and C. Treatment works A receives the water from a reservoir (surface water), whereas treatment works B and C run on groundwater. Grab samples are taken in all three cases after water has gone through all treatment stages (except chlorination), so it can be assumed that source A is richer in organic matter than sources B and C (there was virtually no organic matter at source C when the sample was taken). The higher TOC for source A justifies the lower ICC values compared to sources B and C (chlorine reacts faster due to the greater presence of organic matter, lowering the ICC). pH values are slightly higher for treatment works A (7.0–7.2) and C (7.4–7.5) compared to B (6.0–6.3), but remain below 8, which is the maximum recommended pH for drinking water [59].
Table 3 gathers free chlorine measurements (with replications) over time for the three parallel bottle tests carried out with grab samples from sources A, B and C. Measurements for the first average time are represented in gray font and will be disregarded for the k b analysis as explained in Section 2.1. It should be noted that the number of average times ( n t i m e s ) varies depending on the rate at which chlorine decays (4 effective times for A, 6 effective times for B and C). Chlorine decays faster for sample A due to its higher TOC. Measurements included in Table 3 are analyzed in the next subsections for samples A, B, and C (respectively) according to the procedure described in the methodology.

3.1. Treatment Works A

State estimation (Section 2.3), uncertainty quantification (Section 2.4), and outlier detection (Section 2.5) formulations are applied in this subsection to bottle test chlorine measurements for treatment works A (surface water). Figure 3 gathers the results for the first replication of the bottle test (A-E01). Figure 3a provides a representation of bottle test chlorine measurements and the adjusted first-order bulk decay model (with confidence intervals). This figure shows that there are four sets of chlorine measurements for each of the four average times included in Table 3 (disregarding the first hour values in gray). As expected, the confidence interval T C I C ^ (Equation (15)) is wider than C I C ^ (Equation (14)). For A-E01, all chlorine measurements lie within the expanded confidence interval T C I C ^ . The estimated chlorine concentrations are approximately in the middle of the range of chlorine measurements at different times and reach 0 mg/L in less than 2 days. Figure 3a also includes the mean (0.0638 1/h), standard deviation (0.0088 1/h), and coefficient of variation (13.84%) of the bulk decay coefficient. The mean value lies within the range of bulk decay coefficients summarized by [20]. The coefficient of variation, 13.84% shows that there is a non-negligible uncertainty associated with the bulk decay coefficient.
Figure 3b shows the standardized errors of pseudomeasurements (i.e., state variables) as provided by Equation (12). The threshold value for outlier detection in this case (99% C I z = ± 2.58 ) is clearly greater than error values, which are low for the first three state variables ( C ^ 0 , m o d e l , C ^ f , m o d e l and k ^ b ) and the remaining E ^ m o d e l state variables (4 because 4 average times are being considered). This is reasonable given that pseudomeasurements are a priori estimations of expected state variable values. Figure 3c presents the measurement (free chlorine) standardized errors as provided by Equation (12) as well. The threshold value for outlier detection is higher than the corresponding errors, so no outliers are detected.
State estimation confidence intervals may be compared with standard bottle test results. As explained in the Introduction, standard bottle tests rely on taking one measurement at a time and conveniently adjusting the assumed model (in this case, an exponential fit for a first-order bulk decay model). Figure 4a shows that each combination of measurement replications leads to different fitted lines (in red) and k b values. There are 400 combinations for the 18 measurements taken in A-E01 (4 times with 4 or 5 replications). All fitted lines from these combinations (in red) fall within the T C I C ^ (Equation (15)). Figure 4b gathers the relative histogram of the bulk decay coefficients obtained from these combinations. This histogram is consistent with state estimation results (mean 0.0638 1/h, standard deviation 0.0088 1/h). Overall, Figure 4 (which is consistent with conceptual Figure 1) proves that chlorine measurement errors have an impact on the estimated bulk decay coefficient. State estimation presents added value with respect to the traditional approach because it consistently propagates uncertainty. The state estimation formulation characterizes the distribution of fitting curves affected by the uncertainty of the fitting data. Therefore, it is the most effective way to evaluate the fitting data uncertainty effect.
Table 4 gathers basic statistical properties for all state variables and bottle tests from source A. The mean and standard deviation are included for all state variables, but the coefficient of variation (CV) is only included for those state variables whose mean value is expected to be different from zero (initial chlorine concentration and bulk decay coefficient according to Table 1). Table 4 shows that the mean initial chlorine concentration for the model varies between 0.59 and 0.89 mg/L depending on the bottle test. Its standard deviation varies between 0.05 and 0.06 mg/L, a range that is considerably lower than the standard deviation assumed for the corresponding pseudomeasurement (0.50 mg/L, see Table 1). This occurs because chlorine measurements (and the assumed model) help reduce the standard deviation of the pseudomeasured initial chlorine concentration (and the rest of the state variables) through the state estimation process. The mean of the final concentration (according to the model) and model errors tend to be zero, with a standard deviation consistent with the assumed 0.01 mg/L value (Table 1). The mean bulk decay coefficient adjusted for these replicate tests varies between 0.0638 and 0.0860 1/h. Its standard deviation is roughly 0.01 1/h, a value once again considerably lower than the standard deviation assumed a priori for the corresponding pseudomeasurement (0.50 1/h, see Table 1). Assuming a 99% level of confidence ( ± 2.58 ), the range of values for k b would be 0.0411–0.0865 1/h (A-E01), 0.0576–0.1144 1/h (A-E02), and 0.0360–0.1066 1/h (A-E03). The fact that there is some degree of overlap between the three replications (0.0576–0.0865 1/h) validates the state estimation approach presented here. The empirical coefficient of variation computed considering the three k b values adjusted with SE is 15.32%. This value is consistent with the CV values obtained for k b from SE (12.79–19.19%, average 15.27%). No outliers have been identified according to Equations (12)–(15) for these bottle tests.

3.2. Treatment Works B

SE results for bottle tests B are now presented. Figure 5a gathers state estimation results for the first bottle test (B-E01). Figure 5a is comparable to Figure 3a for test A-E01. In general, the adjusted model does not fit well to the range of chlorine measurements at each time, and this is especially visible at the third, fifth, and sixth effective times (there is one outlier at the third average time). Appendix B shows that pseudomeasurement errors (Figure A3a) keep within the CI range, but measurement 9 is an outlier (Figure A3b, Table 3). As already explained in Section 2.5, this chlorine measurement should be removed, and SE should be re-run. It is also interesting to highlight that chlorine measurements after almost 250 h are still clearly different from zero in Figure 5a. As mentioned in Section 2.2, tests longer than 250–300 h are out of practical interest because water age values over 10 days are unlikely in most pipes within a water distribution system, and this work intends to adjust a model useful to support network operation. Chlorine concentrations do not reach 0 mg/L for B-E01 (values between 0.25 and 0.44 mg/L at the last average time according to Table 3), B-E02 (0.48–0.62 mg/L), nor B-E03 (0.30–0.55 mg/L). These values pinpoint that it may be worth reconsidering the assumed statistical properties for the final chlorine concentration of the model. By default, we recommend assuming a mean value of 0 mg/L and a standard deviation of 0.01 mg/L for C f , m o d e l (Table 1), but it does not seem to be the best assumption for samples from source B.
Figure 5b shows the updated version of Figure 5a once chlorine measurement 9 (outlier) has been disregarded, and the standard deviation assumed for the final concentration of chlorine C f , m o d e l has been increased to 0.50 mg/L. This standard deviation shows a lack of confidence in the assumed final concentration (like for C 0 , m o d e l and k b ) and should allow the final chlorine concentration to differ from zero. Figure 5b (together with Figure A4a,b, see Appendix B) shows that there are no outliers after these changes are implemented, and there is a better fit for chlorine measurements overall. Removing the outlier does not have a significant effect on the estimated k b , but increasing the standard deviation of C f , m o d e l significantly affects the mean bulk decay coefficient, which increases from 0.0046 1/h (Figure 5a) to 0.0133 1/h (Figure 5b). This change in assumption also implies a significant increase in the bulk decay coefficient standard deviation (from 0.0004 to 0.0026 1/h) and CV (from 9.30 to 19.80%). However, it is the most realistic approach given that chlorine concentrations during the bottle test do not reach 0 mg/L.
Table 5 gathers the basic statistical properties for all state variables in bottle tests B. All results have been computed with the increased standard deviation for the final chlorine concentration pseudomeasurement ( C f , m o d e l ). Apart from the outlier removed for B-E01 (previously explained), one outlier is removed for B-E02 (measurement 21) and B-E03 (measurement 22), as highlighted in Table 3. Table 5 shows that the initial chlorine concentration for the model varies between 0.94 and 1.01 mg/L depending on the bottle test replication. Its standard deviation has reduced with respect to the pseudomeasurement assumption (0.50 mg/L, see Table 1), as happened for sample A. The mean of the final concentration (according to the model) varies between 0.32 and 0.52 mg/L. Its standard deviation varies between 0.04 and 0.06 mg/L. This range is considerably lower than the standard deviation now assumed for C f , m o d e l (0.50 mg/L) but greater than the initially assumed 0.01 mg/L (see Table 1). The mean bulk decay coefficient adjusted for these replicate tests varies between 0.0107 and 0.0168 1/h. Its deviation ranges 0.0025–0.0038 1/h, narrowing down the uncertainty initially assumed for this pseudomeasurement (0.50 1/h). Like for source A, there is an overlap in the confidence intervals for k b . The empirical coefficient of variation computed considering the three bulk decay coefficient values adjusted with SE is 22.51%. This value is greater than that obtained from A grab sample (15.32%), but it is still consistent with the CV values that are being obtained from SE for k ^ b (19.80–23.70%, average 22.12%).

3.3. Treatment Works C

Figure 6a shows state estimation results for the first bottle test (C-E01). There are no outliers in this bottle test. However, the assumption of the final chlorine concentration reaching zero is dubious again (concentrations 0.55–0.70 mg/L after almost 300 h according to Table 3). Figure 6b shows the corresponding plot after increasing the assumed standard deviation for the final concentration of chlorine C f , m o d e l to 0.50 mg/L (as already performed for treatment works B). Releasing the asymptote condition leads to a more defined curvature and provides a better fit for the data. The k b coefficient increases (from 0.0019 1/h to 0.0054 1/h) but is still low in absolute terms. It is lower than the coefficients for treatment works A and B, and on the lower end of values in [20]. The increased standard deviation for the final chlorine concentration translates into a greater CV for k b (from 10.35% to 46.68%). This might suggest that different average times should be studied when analyzing bulk decay coefficients of water samples with low TOC to better capture the curvature and asymptote of the curve.
Table 6 provides a summary of SE results for bottle tests C, considering an increased standard deviation of 0.5 mg/L for the final chlorine concentration in all cases. Only one outlier has been removed for test C-E03 (measurement 13, see Table 3). Table 6 shows that the estimated mean final chlorine concentration is clearly above zero for C-E01 (0.49 mg/L) and C-E03 (0.60 mg/L) but remains close to zero for C-E02 (−0.03 mg/L). This happens because chlorine measurements present an almost linear behavior for the average times that have been analyzed in the bottle test. This means that the k b value is very low (the exponent of the exponential model tends to zero), and there is no clear asymptote for the final chlorine concentration. This is reinforced by the variation in estimated bulk decay coefficients across the three tests (from 0.0014 1/h to 0.0104 1/h). These results suggest that the low content of organic matter for treatment works C (i.e., negligible TOC) leads to more random results in terms of the bulk decay coefficient. This phenomenon can be attributed to the increased randomness of the inherently unstable chlorine reaction, which could be further exacerbated by the uneven distribution of organic matter across subsamples. Note that the CV obtained for estimated k ^ b results (36.40–60.84%, average 47.97%) is lower than the coefficient of variation obtained when considering the three mean k ^ b values adjusted with SE (78.65%). This means that three replications of the bottle test are not enough, i.e., there is some additional uncertainty due to the low representativeness of the samples.

4. Discussion

Results from Section 3 show that the bulk decay coefficient varies with the water source. The average bulk decay coefficient considering triplicate bottle tests is 0.0737 1/h (source A, surface water), 0.0136 1/h (source B, groundwater), and 0.0057 1/h (source C, groundwater) for the three-treatment works, respectively. These results reinforce the idea that k b increases with TOC (e.g., [15,18]). In this case, high TOC values correspond to surface water (A), but additional tests should be carried out at different locations to validate that this is always the case. For high k b values (A), the curvature of the exponential function is better defined, and chlorine values steadily approximate 0 mg/L without any outliers. This happens because chlorine measurements clearly decrease from time to time during the bottle test. However, for low k b values (B and C), the curvature is less defined, and chlorine values may not even reach 0 mg/L within a reasonable bottle test duration (<250–300 h). Since measurement values do not change clearly over time, the methodology depicted in Figure 2 (which includes measurement replication, state estimation, uncertainty quantification, outlier detection, and revision of pseudomeasurement assumptions) is essential for processing bottle test data from this type of water source. We must acknowledge that, based on the results, it seems that very low TOC values seem to be associated with very low bulk coefficients (as in treatment works C). This implies that chlorine will decay slowly through the network, and so the risk of falling below the recommended 0.2 mg/L free chlorine threshold will be low. The proposed methodology enables the identification of this type of water source by systematically computing the uncertainty of the bulk decay coefficient.
It should be noted that estimated bulk decay coefficients are associated with a non-negligible standard deviation (and CV). The average CV (according to k ^ b SE results) considering triplicate bottle tests are 15.27%, 22.12% and 47.97% for sources A (surface water) and B/C (groundwater), respectively. The CV of grab sample B is higher than A mainly because of the need to increase the assumed standard deviation for the final concentration of the model, a decision that comes determined by chlorine measurements evolution over the bottle test, which do not tend to zero in the time window considered. The CV of grab sample C is even greater due to the low repeatability of bottle tests in water samples with low content of organic matter. Figure 7 summarizes bottle test chlorine measurements, adjusted first-order bulk decay models, and associated confidence intervals for grab samples A (Figure 7a), B (Figure 7b), and C (Figure 7c). Figure 7a presents a greater dispersion at the beginning of the bottle test due to the assumed high standard deviation for ICC (see Table 1). Figure 7b presents a greater dispersion at the end of the bottle test because of the increased standard deviation for C f , m o d e l . Figure 7c presents a greater dispersion in between due to the additional sampling uncertainty. There is some degree of overlap in all of them.
High standard deviations for k b happen because, as proved by the triplicate bottle tests, the chemical reaction of chlorine does not always happen in the exact same way. This is especially noticeable when there is a low content of organic matter. Figure 7 highlights these differences by representing results for each replicate bottle test in different colors (black for E01, blue for E02, red for E03). Chlorine decays over time in different ways due to factors that are not included in the assumed model, which is not perfect. Also, sodium hypochlorite is known to experience instabilities (e.g., [41,42]), and this adds complexity to the chemical reaction. This work has proved that deviations are intrinsic to chlorine decay processes when they happen in bottles in a laboratory (controlled environment). Additional factors interact in service reservoirs or network tanks (e.g., irregular agitation, poorly preserved reactive agents, etc.). This does not mean that bottle tests should be systematically replicated in practice to estimate the associated dispersion, but it underscores that specific procedures (like state estimation and uncertainty assessment) should be implemented to process the results of a single bottle test. In this work, we have repeated each experiment three times to validate that the resulting k b   distributions overlap, and so the methodology is consistent to identify the potential range of k b . Our recommendation is to carry out only one bottle test with several replicate chlorine measurements at each time, and then quantify the uncertainty of k b with an appropriate statistical fitting process, as conceptually illustrated in Figure 1.
The most interesting aspect of the presented methodology is that the state estimation approach tracks the uncertainty of all involved variables regardless of the model adopted or the measurements available. This is crucial because results show that the uncertainty of the bulk decay coefficient is non-negligible, even with measurement replications, which reduce measurement error effects. The uncertainty of the bulk decay coefficient depends on the number of replications. The method presented in this work can be applied to compute the most likely value of k b with less data, without replications, or with fewer measurements over time, quantifying the impact of each of these scenarios in terms of uncertainty. Applying a standard statistical fit process to bottle test data without quantifying the associated uncertainty (traditional bottle test approach) may lead to bulk decay coefficients that are apparently inconsistent. The fact that a consistent procedure to compute the bulk decay coefficient has not been applied before could partly explain the wide range of bulk decay coefficient values registered for different water sources and/or temperatures in the past [18,20]. The CVs above 15% obtained here underscore that uncertainty is noticeable and should be considered when analyzing temporal shifts in k b , for example, due to potential mixtures of water sources, seasonal variability, temperature changes, etc. Disregarding this uncertainty may lead to false conclusions. It should also be considered when evaluating chlorine decay at the wall, which is typically computed as the difference between the total decay and the modeled bulk decay [17,23]. This could, in turn, be useful to better understand biofilm formation and detachment processes [37,40]. The methodology presented here is developed to explain part of the observed behavior and is aligned with the general effort that is currently being made to systematically process and understand water quality data/dynamics in water distribution systems (e.g., [6,60,61,62,63,64]). At this stage, the proposed approach should be regarded as a methodology rather than a practical tool, requiring expert analysis and interpretation of results (research domain). More research is needed before establishing practical recommendations for implementation. For example, the methodology should be applied to a wider range of water compositions (beyond A, B, and C) and different chlorine measurement technologies/procedures (other than KEMIO and the proposed bottle test with replications). Moreover, all uncertainty sources should be mapped and their impacts assessed. In any case, this framework—combining state estimation and uncertainty assessment—has the potential to evolve into an operational tool for water utilities (knowledge transfer to industry) once the chlorine decay process is better understood.

5. Conclusions

This work highlights the importance of measurement uncertainty when computing the bulk chlorine decay coefficient k b . Moreover, it provides a methodology to statistically fit the bulk chlorine decay coefficient k b (mean and standard deviation) from the bottle test results. The process starts by carrying out bottle tests (standard practice in the field) with replicate measurements. Then, state estimation is used to compute the mean value of the bulk decay coefficient by combining bottle test free chlorine measurements, a decay model (in this case, first-order bulk decay), and some a priori estimations or pseudomeasurements. The uncertainty (i.e., standard deviation) of all variables is then quantified by implementing the FOSM method, which enables computation of confidence intervals that can be used to identify measurement outliers and/or incorrect assumptions.
The method is applied to statistically fit the bulk decay coefficient at three treatment works (A, B, and C). Results (for triplicate bottle tests) validate the method and show that k b presents non-negligible uncertainty in some cases (>15%). The uncertainty of the bulk decay coefficient increases in this work for groundwater grab samples, which are associated with a lower content of organic matter. Computed k b standard deviations could further increase depending on the sampling strategy, measurement principle, etc. The state estimation approach presented in this work is designed to cope with a wide range of scenarios, assumptions, and/or models, so it provides a systematic methodology to effectively analyze and compare (considering uncertainty) bulk decay coefficients from different sources, at different moments, with different temperatures, etc. This approach may play a crucial role in explaining the variability of the bulk decay coefficient reported in previous works and could be essential to understand, monitor, and/or model chlorine decay at water supply systems.

Author Contributions

Conceptualization, S.D. and J.G.; methodology, E.C., S.D. and J.G.; investigation, E.C.; visualization, E.C. and S.D.; writing—original draft preparation, E.C. and S.D.; writing—review and editing, J.G. All authors have read and agreed to the published version of the manuscript.

Funding

The authors thank the financial support provided by the Spanish Ministry of Science, Innovation and Universities—State Research Agency (Grant PID2019-111506RB-I00 funded by MCIU/AEI/10.13039/501100011033; Grant TED2021-131136B-100 funded by MCIU/AEI/10.13039/501100011033 and European Union NextGenerationEU/PRTR; Grant PID2023-152371OB-IOO funded by MICIU/AEI/10.13039/501100011033 and ERDF A way of making Europe), Junta de Comunidades de Castilla-La Mancha (Grant SBPLY/19/180501/000162 funded by Junta de Comunidades de Castilla-La Mancha and ERDF A way of making Europe) and the Department of Civil and Building Engineering at UCLM. Elena Cejas thanks the support of FPI Grant PRE2020-095769 funded by MCIN/AEI/10.13039/501100011033 and “ESF Investing in your future”.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author(s).

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Methodology Support

Appendix A.1. Formulation of the First Order-Bulk Decay Model

Bottle test chlorine measurements are used in this work to fit a first-order bulk decay process and compute the associated bulk decay coefficient ( k b ). First-order bulk decay can generally be written as [18]:
C m o d e l t = k b · C m o d e l
where C m o d e l [mg/L] is the chlorine concentration according to the assumed model, t [hours] refers to the water age or time of residence (in this case, within the bottle test) and k b [1/h] is the chlorine decay bulk coefficient. Integrating Equation (A1) leads to a general expression for chlorine evolution over time C m o d e l ( t ) [mg/L]:
C m o d e l t = C 0 , m o d e l · e k b · t
where C 0 , m o d e l [mg/L] represents the initial chlorine concentration according to the adopted model. This expression implies that chlorine concentration reaches 0 mg/L when sufficient time has passed. Previous studies have identified that for some water samples and initial concentration values, chlorine concentrations do not reach 0 mg/L even after 400 h tests [17]. Since such a high-water age value (>16 days) is unlikely in most pipes within a water distribution system [45], Equation (A2) is here written in a more general way as:
C m o d e l t = C f , m o d e l + C 0 , m o d e l C f , m o d e l · e k b · t
where C f , m o d e l [mg/L] represents the free chlorine concentration asymptote.
In this work, bottle tests involve several measurements at each time (see Section 2.1). This implies that different chlorine values are possible at each time C m e a s u r e t , i ; i according to the number of replications i . Equation (A3) can be modified to represent measured (rather than modeled) chlorine concentrations by including two additional errors: the model error at each time t , E m o d e l ( t ) [mg/L], and the error in chlorine measurements at each time t and for each replication i , E m e a s u r e ( t , i ) [mg/L]):
C m e a s u r e t , i = C m o d e l t + E m o d e l t + E m e a s u r e t , i
Note that E m o d e l ( t ) exists because the model does not reproduce real behavior exactly, and deviations may take place at each of the sampled times during the bottle test. Similarly, E m e a s u r e ( t , i ) represents the error in chlorine measurements, which is different every time that chlorine is measured during the test. Both errors explain the difference between measured and modeled chlorine concentrations.
Equation (A4) can be combined with Equation (A3) to provide a complete equation for chlorine measurements:
C m e a s u r e t , i = C f , m o d e l + C 0 , m o d e l C f , m o d e l · e k b · t + E m o d e l ( t ) + E m e a s u r e ( t , i )
Equation (A5), which corresponds to Equation (1) in the main body of the article, is considered the starting point to derive the state estimation (and uncertainty assessment) formulations in this work.

Appendix A.2. Free-Chlorine Measurement Error Characterization Tests

The free-chlorine measurement error characterization tests carried out in this work consist of measuring chlorine repeatedly (and as continuously as reasonably possible with KEMIO) over 15 min time windows for different water samples. Time windows are selected so that different parts of the chlorine decay curve are assessed.
Table A1 gathers free chlorine measurements ( C m e a s u r e values) over 8 different tests. The number of measurements varies between 12 and 15 because it is difficult to ensure the same number of measurements over each 15 min time window (it takes approximately 1 min to make a measurement, but it is easy to experience slight delays due to laboratory maneuvers). Basic statistics for each test (mean, standard deviation, Coefficient of Variation (CV), and time correlation coefficient) are also included in the table. Different mean values represent the effort to characterize different parts of the curve. High average concentrations (such as those in tests 5 and 8) are associated with the first stages of chlorine decay, and lower concentrations (such as those in tests 2, 6, or 7) are associated with the asymptotic behavior within the exponential curve. The coefficient of variation for measurements is higher than the 5% measurement error previously published in the literature for one type of colorimeter [24] or Chlorosense [26]. The changing sign of the time correlation coefficient hints that there is no clear pattern in each test and that chlorine measurement errors are non-negligible.
Table A1. Free chlorine measurement error characterization. Repeated chlorine measurements over 15 min time windows in 8 independent tests.
Table A1. Free chlorine measurement error characterization. Repeated chlorine measurements over 15 min time windows in 8 independent tests.
Chlorine   Measurements   C m e a s u r e (mg/L)
Measurement NumberTest 1Test 2Test 3Test 4Test 5Test 6Test 7Test 8
10.600.410.500.640.740.430.310.87
20.590.410.480.590.820.430.360.83
30.650.380.560.560.830.480.340.77
40.610.360.460.570.850.460.340.84
50.610.380.460.570.850.540.290.89
60.590.380.450.650.800.490.250.86
70.590.360.420.530.880.290.290.80
80.580.330.360.580.770.180.260.83
90.710.390.570.580.990.420.430.97
100.630.360.390.570.800.470.320.98
110.690.380.570.600.670.250.280.90
120.640.440.390.490.840.220.320.83
130.640.49 0.480.700.490.32
140.590.43 0.31
150.590.38
Mean (mg/L)0.620.390.470.570.810.400.320.86
Standard deviation (mg/L)0.040.040.070.050.080.120.050.06
CV (%)6.3110.0315.408.6210.0929.8814.267.29
Time correlation coefficient (−)0.180.31−0.24−0.59−0.18−0.39−0.080.41
In this work, data for each test have been standardized (measurements are discounted by the mean value for each test) and then ranked. Figure A1a shows how ranked standardized values (in ascending order) vary (107 measurements in total). The average and standard deviation for these standardized values are μ C m e a s u r e = 1.3 × 10−17 mg/L (i.e., virtually zero) and σ C m e a s u r e 2 = 0.065 mg/L, respectively. It has also been checked that standardized values are consistent with a normal probability plot. For this purpose, cumulative probability is computed for each rank position as ( P o s r 0.5 ) / 107 ; r = 1 , 2 , , 107 . Then, for each cumulative probability value, the ordinate value of the normal distribution (assuming μ C m e a s u r e and σ C m e a s u r e 2 ) is computed. Figure A1b shows the scatter plot of the cumulative probability vs. the normal distribution value. Since all points approximately follow a straight line with a slope of 1, it can be concluded that measurement errors follow a normal distribution. This analysis justifies the standard deviation assumed for free chlorine measurements in state estimation ( σ C m e a s u r e 2 = 0.065 mg/L) as included in Table 1.
Figure A1. Free chlorine measurement characterization: (a) ranked standardized values (in ascending order), and (b) normal probability plot.
Figure A1. Free chlorine measurement characterization: (a) ranked standardized values (in ascending order), and (b) normal probability plot.
Water 17 02990 g0a1

Appendix A.3. Jacobian Matrix for Bottle Test Free Chlorine Bulk Decay Coefficient Statistical Fitting

Jacobian matrix components are calculated by computing the derivatives of measurements with respect to state variables. The first block of measurements corresponds to pseudomeasured state variables, so it is associated with an identity matrix I R n × n . The following rows, which represent the derivative of chlorine measured values with respect to state variables, are populated by calculating the partial derivatives of Equation (1) or (A5):
C m e a s u r e C 0 , m o d e l = e k b · t
C m e a s u r e C f , m o d e l = 1 e k b · t
C m e a s u r e k b = t · C 0 , m o d e l C f , m o d e l · e k b · t
C m e a s u r e E m o d e l t = 1 a t   t h e   c o r r e s p o n d i n g   t i m e 0 e l s e w h e r e
The sparse structure of this matrix is represented in Figure A2. This matrix must be updated at every iteration v to account for the change in state variables (Equations (3) and (4)). It should be noted that every chlorine measurement associated with the same time (i.e., replicate measurements) presents identical rows. Time and replication indices are provided at the right-hand side of Figure A2 for guidance.
Figure A2. Jacobian matrix structure.
Figure A2. Jacobian matrix structure.
Water 17 02990 g0a2

Appendix B. Additional Results

Figure A3. State estimation results for bottle tests B-E01: (a) standardized pseudomeasurement errors, and (b) standardized measurement errors.
Figure A3. State estimation results for bottle tests B-E01: (a) standardized pseudomeasurement errors, and (b) standardized measurement errors.
Water 17 02990 g0a3
Figure A4. State estimation results for bottle tests B-E01 (after outlier removal and revisited pseudomeasurement assumptions): (a) standardized pseudomeasurement errors, and (b) standardized measurement errors.
Figure A4. State estimation results for bottle tests B-E01 (after outlier removal and revisited pseudomeasurement assumptions): (a) standardized pseudomeasurement errors, and (b) standardized measurement errors.
Water 17 02990 g0a4

References

  1. WHO. Guidelines for Drinking Water Quality, 4th ed.; Incorporating the 1st and 2nd Addenda; World Health Organization: Geneva, Switzerland, 2022.
  2. Ma, C.; Shi, W.; Wang, L.; Zhao, X.; Zhao, B.; Guo, X.; Zhang, Z.; Zhang, H. Effect of disinfection method on odor and disinfection byproduct control in drinking water treatment. Desalination Water Treat. 2016, 57, 7753–7762. [Google Scholar] [CrossRef]
  3. Onyutha, S.; Kwio-Tamale, J.C. Modelling chlorine residuals in drinking water: A review. Int. J. Environ. Sci. Technol. 2022, 19, 11613–11630. [Google Scholar] [CrossRef]
  4. Blokker, M.; Vreeburg, J.; Speight, V. Residual chlorine in the extremities of the drinking water distribution system: The influence of stochastic water demands. Procedia Eng. 2014, 70, 172–180. [Google Scholar] [CrossRef]
  5. WRF. Probabilistic Modeling Framework for Assessing Water Quality Sampling Programs; Water Research Foundation: Washington, DC, USA, 2009. [Google Scholar]
  6. Gleeson, K.; Husband, S.; Gaffney, J.; Boxall, J. A data quality assessment framework for drinking water distribution system water quality time series datasets. AQUA—Water Infrastruct. Ecosyst. Soc. 2023, 72, 329–347. [Google Scholar] [CrossRef]
  7. Speight, V.; Kaslbeek, W.D.; DiGiano, F.A. Randomized stratified sampling methodology for water quality in distribution systems. J. Water Resour. Plan. Manag. 2004, 130, 330–338. [Google Scholar] [CrossRef]
  8. Da Luz, N.; Kumpel, E. Evaluating the impact of sampling design on drinking water quality monitoring program outcomes. Water Res. 2020, 185, 116217. [Google Scholar] [CrossRef]
  9. Díaz, S.; González, J. The importance of water temperature in water supply systems. Ing. Agua 2022, 26, 107–123. (In Spanish) [Google Scholar] [CrossRef]
  10. Rossman, L.A.; Clark, R.M.; Grayman, W.M. Modeling chlorine residuals in drinking-water distribution systems. J. Environ. Eng. 1994, 120, 803–820. [Google Scholar] [CrossRef]
  11. USEPA. EPANET 2.2 User Manual; US Environmental Protection Agency: Cincinnati, OH, USA, 2020; Available online: https://usepa.github.io/EPANET2.2/ (accessed on 12 October 2025).
  12. Vieira, P.; Coelho, S.T.; Loureiro, D. Accounting for the influence of initial chlorine concentration, TOC, iron and temperature when modelling chlorine decay in water supply. J. Water Supply Res. Technol.—AQUA 2004, 53, 453–467. [Google Scholar] [CrossRef]
  13. Fisher, I.; Kastl, G.; Sathasivan, A. A suitable model of combined effects of temperature and initial condition on chlorine bulk decay in water distribution systems. Water Res. 2012, 46, 3293–3303. [Google Scholar] [CrossRef]
  14. Monteiro, L.; Figuereido, D.; Covas, D.; Menaia, J. Integrating water temperature in chlorine decay modelling: A case study. Urban Water J. 2017, 14, 1097–1101. [Google Scholar] [CrossRef]
  15. Powell, J.C.; Hallam, N.B.; West, J.R.; Forster, C.F.; Simms, J. Factors which control bulk chlorine decay rates. Water Res. 2000, 34, 117–126. [Google Scholar] [CrossRef]
  16. Fisher, I.; Kastl, G.; Sathasivan, A.; Jegatheesan, V. Suitability of chlorine bulk decay models for planning and management of water distribution systems. Crit. Rev. Environ. Sci. Technol. 2011, 41, 1843–1882. [Google Scholar] [CrossRef]
  17. Fisher, I.; Kastl, G.; Sathasivan, A. Evaluation of suitable chlorine bulk-decay models for water distribution systems. Water Res. 2011, 45, 4896–4908. [Google Scholar] [CrossRef]
  18. Vasconcelos, J.J.; Rossman, L.A.; Grayman, W.M.; Boulos, P.F.; Clark, R.M. Kinetics of chlorine decay. J. Am. Water Work. Assoc. 1997, 89, 54–65. [Google Scholar] [CrossRef]
  19. Vargas, T.F.; Baía, C.C.; Machado, T.L.S.; Dórea, C.C.; Bastos, W.R. Decay of free residual chlorine in wells water of northern Brazil. Water 2021, 13, 992. [Google Scholar] [CrossRef]
  20. Speight, V.; Boxall, J. Current perspectives on disinfectant modelling. Procedia Eng. 2015, 119, 434–441. [Google Scholar] [CrossRef]
  21. Hallam, N.B.; West, J.R.; Forster, C.F.; Powell, J.C.; Spencer, I. The decay of chlorine associated with the pipe wall in water distribution systems. Water Res. 2002, 36, 3479–3488. [Google Scholar] [CrossRef]
  22. Fisher, I.; Kastl, G.; Sathasivan, A. New model of chlorine-wall reaction for simulating chlorine concentration in drinking water distribution systems. Water Res. 2017, 125, 427–437. [Google Scholar] [CrossRef]
  23. Fawzer, M.F.; Kastl, G.; Krishna, K.C.B.; Fisher, I.; Sathasivan, A. Bulk water microbes could accelerate chlorine decay at low chlorine concentrations. Water 2025, 17, 624. [Google Scholar] [CrossRef]
  24. Murray, A.; Lantagne, D. Accuracy, precision, usability, and cost of free chlorine residual testing methods. J. Water Health 2015, 13, 79–90. [Google Scholar] [CrossRef]
  25. Moberg, L.; Karlberg, B. An improved N,N’-diethyl-p-phenylenediamine (DPD) method for the determination of free chlorine based on multiple wavelength detection. Anal. Chim. Acta 2000, 407, 127–133. [Google Scholar] [CrossRef]
  26. Palintest. Measuring Free Chlorine: Kemio vs. DPD. 2024. Available online: https://www.palintest.com/measuring-free-chlorine-kemio-vs-dpd-2/ (accessed on 14 February 2025).
  27. Palintest. Free and Total Chlorine in Drinking Water by Amperometry Using Disposable Sensors; Palintest Ltd.: Golden, CO, USA, 2020. Available online: https://downloads.regulations.gov/EPA-HQ-OW-2021-0079-0038/content.pdf (accessed on 14 February 2025).
  28. Beeharry, S.; Sihota, S.; Kelly, C. Profiling chlorine residuals using DPD and amperometric field test kits in a chlorinated small drinking water system with ammonia present in source water. Environ. Health Rev. 2018, 61, 39–49. [Google Scholar] [CrossRef]
  29. Calero, C.; Husband, S.; Boxall, J.; del Olmo, G.; Soria-Carrasco, V.; Maeng, S.K.; Douterelo, I. Intermittent water supply impacts on distribution system biofilms and water quality. Water Res. 2021, 201, 117372. [Google Scholar] [CrossRef]
  30. USEPA. Analytical Methods Approved for Drinking Water Compliance Monitoring Under the Disinfection Byproduct Rules; USEPA: USA, 2024. Available online: https://www.epa.gov/system/files/documents/2024-02/dbp-rules-methods-table.pdf (accessed on 14 February 2025).
  31. Fu, T.J.; Li, Y.; Awad, D.; Zhou, T.Y.; Liu, L. Factors affecting the performance and monitoring of a chlorine wash in preventing Escherichia coli O157:H7 cross-contamination during postharvest washing of cut lettuce. Food Control 2018, 94, 212–221. [Google Scholar] [CrossRef]
  32. Falcó, I.; Tudela, J.A.; Hernández, N.; Pérez-Cataluña, A.; García, M.R.; Truchado, P.; Garrido, A.; Allende, A.; Sánchez, G.; Gil, M.I. Antiviral capacity of sanitizers against infectious viruses in process water from the produce industry under batch and continuous conditions. Food Control 2023, 159, 109738. [Google Scholar] [CrossRef]
  33. LeChevallier, M.W.; Welch, N.J.; Smith, D.B. Full-scale studies of factors related to coliform regrowth in drinking water. Appl. Environ. Microbiol. 1996, 62, 2201–2211. [Google Scholar] [CrossRef] [PubMed]
  34. Brown, D.; Bridgeman, J.; West, J.R. Predicting chlorine decay and THM formation in water supply systems. Rev. Environ. Sci. Bio/Technol. 2011, 10, 79–99. [Google Scholar] [CrossRef]
  35. Helbling, D.E.; VanBriese, J.M. Free chlorine demand and cell survival of microbial suspensions. Water Res. 2007, 41, 4424–4434. [Google Scholar] [CrossRef]
  36. Sharpe, R.L.; Smith, C.J.; Biggs, C.A.; Boxall, J.B. Pilot scale laboratory investigations into the impact of steady state conditioning flow on potable water discolouration. In Proceedings of the 12th Annual Conference on Water Distribution Systems Analysis 2010, Tucson, AZ, USA, 12–15 September 2010. [Google Scholar]
  37. Fish, K.E.; Reeves-McLaren, N.; Husband, S.; Boxall, J. Uncharted waters: The unintended impacts of residual chlorine on water quality and biofilms. NPJ Biofilms Microbiomes 2020, 6, 34. [Google Scholar] [CrossRef]
  38. Carneiro, I.; Fish, K.; Jarvis, P.; Haley, J.; Webber, F.; Gaskin, P.; Boxall, J. Regrowth of microorganisms from treatment to tap in operational drinking water supply networks. Eng. Proc. 2024, 69, 136. [Google Scholar] [CrossRef]
  39. Agudelo-Vera, C.; Avvedimento, S.; Boxall, J.; Creaco, E.; de Kater, H.; Di Nardo, A.; Djukic, A.; Douterelo, I.; Fish, K.E.; Iglesias-Rey, P.L.; et al. Drinking water temperature around the globe: Understanding, Policies, challenges and opportunities. Water 2020, 12, 1049. [Google Scholar] [CrossRef]
  40. Díaz, S.; Boxall, J.; Lamarche, L.; González, J. The impact of ground heat capacity on drinking water temperature. J. Water Resour. Plan. Manag. 2023, 149, 04023012. [Google Scholar] [CrossRef]
  41. ISO 7393-1:2000; Water Quality. Determination of Free Chlorine and Total Chlorine. Part 1: Titrimetric Method Using N,N-diethyl-1,4-phenylenediamine. AENOR: Madrid, Spain, 2000. Available online: https://www.intertekinform.com/en-au/standards/une-en-iso-7393-1-2000-13565_saig_une_une_30274/ (accessed on 17 February 2025). (In Spanish)
  42. Fundación Canal. Drinking Water Disinfection Treatment. 2005. Available online: https://www.fundacioncanal.com/canaleduca/wp-content/uploads/2015/08/Tratamiento-de-desinfeccion-del-agua-potable2.pdf (accessed on 17 February 2025). (In Spanish).
  43. Furst, K.E.; Graham, K.E.; Weisman, R.J.; Adusei, K.B. It’s getting hot in here: Effects of heat on temperature, disinfection, and opportunistic pathogens in drinking water distribution systems. Water Res. 2024, 260, 121913. [Google Scholar] [CrossRef]
  44. Boccelli, D.; Tryby, M.; Uber, J.; Summers, S. A reactive species model for chlorine decay and THM formation under rechlorination conditions. Water Res. 2003, 37, 2654–2666. [Google Scholar] [CrossRef]
  45. Díaz, S.; González, J. Framework for the statistical characterization of supplied water age in water distribution networks. Water Resour. Manag. 2025, 39, 4335–4359. [Google Scholar] [CrossRef]
  46. Fisher, I.H. Integrated EPANET-MSX process models of chlorine and its by-products in drinking water distribution systems. Water Environ. Res. 2023, 95, e10949. [Google Scholar] [CrossRef]
  47. Cao, L.; Chen, X.; Xiao, B. Predictive Filtering for Microsatellite Control System; Elsevier: Amsterdam, the Netherlands; Academic Press: Cambridge, MA, USA, 2020. [Google Scholar]
  48. Schweppe, F.C.; Wildes, J. Power system static state estimation. Part I: Exact model. IEEE Trans. Power Appar. Syst. 1970, 89, 120–125. [Google Scholar] [CrossRef]
  49. Abur, A.; Expósito, A.G. Electric Power System State Estimation. Theory and Implementations; Marcel Dekker: New York, NY, USA, 2004. [Google Scholar]
  50. Hernández, E.M.; Bernal, D. State estimation in structural systems with model uncertainties. J. Eng. Mech. 2008, 134, 252–257. [Google Scholar] [CrossRef]
  51. Seo, T.; Bayen, A.M.; Kusakabe, T.; Asakura, Y. Traffic state estimation on highway: A comprehensive survey. Annu. Rev. Control 2017, 43, 128–151. [Google Scholar] [CrossRef]
  52. Díaz, S.; González, J.; Mínguez, R. Observability analysis in water transport networks: Algebraic approach. J. Water Resour. Plan. Manag. 2015, 142, 04015071. [Google Scholar] [CrossRef]
  53. Ruiz, E.; Díaz, S.; González, J. State variable implications on hydraulic state estimation. Water Resour. Manag. 2022, 36, 2549–2569. [Google Scholar] [CrossRef]
  54. Díaz, S.; González, J.; Mínguez, J. Uncertainty evaluation for constrained state estimation in water distribution systems. J. Water Resour. Plan. Manag. 2016, 142, 06016004. [Google Scholar] [CrossRef]
  55. Sterling, M.J.H.; Bargiela, A. Minimum norm state estimation for computer control of water distribution systems. IEE Proc. D (Control. Theory Appl.) 1984, 131, 57–63. [Google Scholar] [CrossRef]
  56. Bargiela, A.; Hainsworth, D. Pressure and flow uncertainty in water systems. J. Water Resour. Plan. Manag. 1989, 115, 212–229. [Google Scholar] [CrossRef]
  57. Ruiz, E.; Díaz, S.; González, J. Hydraulic state estimation: Pilot implementation in a water distribution system. In Proceedings of the 2nd International Joint Conference on Water Distribution Systems Analysis & Computing and Control in the Water Industry, Valencia, Spain, 18–22 July 2022. [Google Scholar] [CrossRef]
  58. Ruiz, E.; Díaz, S.; González, J. Decomposed uncertainty evaluation for hydraulic state estimation in water supply systems. J. Water Resour. Plan. Manag. 2023, 149, 04023006. [Google Scholar] [CrossRef]
  59. WHO. Principles and Practices of Drinking-Water Chlorination. A Guide to strengthening chlorination practices in Small- to Medium-Sized Water Supplies. World Health Organization: Geneva, Switzerland, 2017. [Google Scholar]
  60. Mounce, S.R.; Gaffney, J.W.; Boult, S.; Boxall, J. Automated data-driven approaches to evaluating and interpreting water quality time series data from water distribution systems. J. Water Resour. Plan. Manag. 2015, 141, 04015026. [Google Scholar] [CrossRef]
  61. Talagala, P.D.; Hyndman, R.J.; Leigh, C.; Mengersen, K.; Smith-Miles, K. A feature-based procedure for detecting technical outliers in water-quality data from in situ sensors. Water Resour. Res. 2019, 55, 8547–8568. [Google Scholar] [CrossRef]
  62. Kyritsakas, G.; Boxall, J.B.; Speight, V.L. A big data framework for actionable information to manage drinking water quality. AQUA—Water Infrastruct. Ecosyst. Soc. 2023, 72, 701–720. [Google Scholar] [CrossRef]
  63. Xiong, X.; Wang, Y. Uncertainty analysis of water quality in water distribution system. AQUA—Water Infrastruct. Ecosyst. Soc. 2022, 71, 1453–1468. [Google Scholar] [CrossRef]
  64. Olortegui-Artica, C.; Martínez-Solano, F.J.; Sánchez-Briones, C.; Iglesias-Rey, P.L. Improving water quality by means of programmed flushing in the drinking water network of Valencia. Ing. Agua 2024, 28, 106–122. (In Spanish) [Google Scholar] [CrossRef]
Figure 1. Conceptual representation of a chlorine bulk decay process: (a) possible measurement combinations (in colors) for a bottle test with measurement replications, and (b) associated bulk decay coefficient distribution function.
Figure 1. Conceptual representation of a chlorine bulk decay process: (a) possible measurement combinations (in colors) for a bottle test with measurement replications, and (b) associated bulk decay coefficient distribution function.
Water 17 02990 g001
Figure 2. Workflow of bottle test free chlorine bulk decay coefficient statistical fitting for water supply systems. Input default values (in gray) are explained in Section 2.3.
Figure 2. Workflow of bottle test free chlorine bulk decay coefficient statistical fitting for water supply systems. Input default values (in gray) are explained in Section 2.3.
Water 17 02990 g002
Figure 3. State estimation results for bottle tests A-E01: (a) chlorine measurements and adjusted first-order decay model, (b) standardized pseudomeasurement errors, and (c) standardized measurement errors.
Figure 3. State estimation results for bottle tests A-E01: (a) chlorine measurements and adjusted first-order decay model, (b) standardized pseudomeasurement errors, and (c) standardized measurement errors.
Water 17 02990 g003
Figure 4. Standard bottle test results for A-E01: (a) fit for different chlorine measurement combinations (vs SE confidence intervals), and (b) associated bulk decay coefficient relative histogram.
Figure 4. Standard bottle test results for A-E01: (a) fit for different chlorine measurement combinations (vs SE confidence intervals), and (b) associated bulk decay coefficient relative histogram.
Water 17 02990 g004
Figure 5. State estimation results (chlorine measurements and adjusted first-order decay model) for bottle tests B-E01: (a) original and (b) after outlier removal and revisited pseudomeasurement assumptions.
Figure 5. State estimation results (chlorine measurements and adjusted first-order decay model) for bottle tests B-E01: (a) original and (b) after outlier removal and revisited pseudomeasurement assumptions.
Water 17 02990 g005
Figure 6. State estimation results (chlorine measurements and adjusted first-order decay model) for bottle tests C-E01: (a) original and (b) revisited pseudomeasurement assumptions.
Figure 6. State estimation results (chlorine measurements and adjusted first-order decay model) for bottle tests C-E01: (a) original and (b) revisited pseudomeasurement assumptions.
Water 17 02990 g006
Figure 7. State estimation results: Chlorine measurements and adjusted first-order decay model for bottle tests from treatment works (a) A, (b) B and (c) C.
Figure 7. State estimation results: Chlorine measurements and adjusted first-order decay model for bottle tests from treatment works (a) A, (b) B and (c) C.
Water 17 02990 g007aWater 17 02990 g007b
Table 1. Default values for state variable pseudomeasurements and free chlorine measurements (KEMIO).
Table 1. Default values for state variable pseudomeasurements and free chlorine measurements (KEMIO).
Type Variable Notation Mean   μ or Expected Value Standard   Deviation   σ
PseudomeasurementInitial chlorine concentration according to the model [mg/L] C 0 , m o d e l ICC 10.50
Final chlorine concentration according to the model [mg/L] C f , m o d e l 00.01
First-order bulk decay coefficient [1/h] k b 0.010.50
Error model at each time [mg/L] E m o d e l t ;
t = 1 , 2 , , n t i m e s
00.01
MeasurementFree chlorine concentration [mg/L] C m e a s u r e Variable 20.065 3
1 As measured in the lab—average of ICC values from Steps 3 and 4 in Section 2.1. 2 As measured in the lab—Step 5 in Section 2.1. 3 According to measurement error characterization tests using KEMIO equipment (Appendix A.2).
Table 2. Grab sample characteristics from sources A, B, and C.
Table 2. Grab sample characteristics from sources A, B, and C.
Source/Treatment WorksReplicationTOC (mg/L)Temperature (°C)ICC (mg/L)pH (-)
A (surface water)E015.2024.00.927.0
E02 24.00.957.2
E03 24.00.977.2
B (groundwater)E010.8324.01.006.0
E02 24.01.066.3
E03 24.01.036.2
C (groundwater)E010.0024.01.067.4
E02 24.01.127.5
E03 24.01.087.4
Table 3. Free chlorine measurements (with replications) during parallel bottle tests for: (a) treatment works A, (b) treatment works B and (c) treatment works C. Measurements from the first average time are in gray font. Outlier measurements are shaded in gray.
Table 3. Free chlorine measurements (with replications) during parallel bottle tests for: (a) treatment works A, (b) treatment works B and (c) treatment works C. Measurements from the first average time are in gray font. Outlier measurements are shaded in gray.
(a) Treatment works A
A-E01A-E02A-E03
Meas. No. Avg. Time [h]Free Chlorine [mg/L] Avg. Time [h]Free Chlorine [mg/L] Avg. Time [h]Free Chlorine [mg/L]
0 1.250.74 1.210.87 1.030.67
0 1.250.79 1.210.79 1.030.79
0 1.250.75 1.210.88 1.030.77
0 1.250.78 1.210.75 1.030.79
1 3.170.57 2.940.72 2.770.50
2 3.170.61 2.940.67 2.770.43
3 3.170.59 2.940.62 2.770.46
4 3.170.60 2.940.83 2.770.49
5 8.490.53 2.940.64 8.070.31
6 8.490.36 8.270.40 8.070.35
7 8.490.36 8.270.45 8.070.35
8 8.490.40 8.270.39 8.070.37
9 8.490.54 8.270.49 26.060.09
10 26.470.06 26.250.06 26.060.08
11 26.470.15 26.250.15 26.060.06
12 26.470.07 26.250.07 26.060.07
13 26.470.15 26.250.11 45.560.02
14 26.470.25 26.250.09 45.560.02
15 46.090.02 26.250.08 45.560.07
16 46.090.02 45.840.05 45.560.02
17 46.090.02 45.840.05
18 46.090.02 45.840.07
19 45.840.02
(b) Treatment works B
B-E01B-E02B-E03
Meas. No. Avg. Time [h]Free Chlorine [mg/L] Avg. Time [h]Free Chlorine [mg/L] Avg. Time [h]Free Chlorine [mg/L]
0 1.151.00 1.050.98 1.030.99
0 1.150.96 1.050.98 1.031.12
0 1.151.00 1.050.99 1.031.04
0 1.150.98 1.051.03 1.031.02
1 2.880.97 2.650.96 2.501.03
2 2.880.91 2.650.98 2.500.98
3 2.880.92 2.650.99 2.500.97
4 2.880.92 2.651.04 2.501.01
5 8.020.91 2.650.99 7.410.93
6 8.020.86 7.730.95 7.410.99
7 8.020.86 7.730.99 7.410.89
8 8.020.84 7.730.98 7.410.94
9 25.220.43 7.730.89 7.410.93
10 25.220.85 24.980.75 24.800.82
11 25.220.77 24.980.79 24.800.86
12 25.220.61 24.980.86 24.800.77
13 25.220.77 24.980.89 24.800.86
14 45.870.76 24.980.85 45.460.75
15 45.870.67 45.630.80 45.460.78
16 45.870.64 45.630.76 45.460.77
17 45.870.64 45.630.80 45.460.75
18 95.840.52 45.630.77 95.440.67
19 95.840.43 95.600.64 95.440.49
20 95.840.47 95.600.59 95.440.69
21 95.840.53 95.600.50 95.440.58
22 248.050.37 95.600.54 95.440.39
23 248.050.40 247.780.56 247.600.50
24 248.050.27 247.780.48 247.600.34
25 248.050.44 247.780.49 247.600.30
26 248.050.25 247.780.62 247.600.55
(c) Treatment works C
C-E01C-E02C-E03
Meas. No. Avg. Time [h]Free Chlorine [mg/L] Avg. Time [h]Free Chlorine [mg/L] Avg. Time [h]Free Chlorine [mg/L]
0 1.200.98 1.151.02 1.100.99
0 1.201.15 1.150.99 1.101.00
0 1.201.00 1.150.97 1.100.94
0 1.201.08 1.150.99 1.101.04
1 2.971.03 2.900.95 2.670.91
2 2.971.01 2.900.95 2.670.96
3 2.970.97 2.900.98 2.670.97
4 2.971.00 2.900.87 2.671.01
5 8.830.94 8.521.12 8.100.95
6 8.830.98 8.520.86 8.100.93
7 8.831.04 8.520.86 8.100.97
8 8.830.96 8.521.00 8.100.97
9 23.950.98 23.870.97 23.800.88
10 23.950.94 23.870.92 23.800.84
11 23.950.99 23.870.95 23.800.98
12 23.951.04 23.871.00 23.800.98
13 48.770.88 48.520.88 48.520.53
14 48.770.84 48.520.88 48.520.85
15 48.770.95 48.520.89 48.520.90
16 48.770.99 48.520.90 48.520.84
17 120.100.70 119.880.80 48.520.69
18 120.100.84 119.880.77 119.580.86
19 120.100.68 119.880.91 119.580.65
20 120.100.73 119.880.80 119.580.56
21 293.470.61 119.880.78 119.580.78
22 293.470.55 293.050.73 293.410.54
23 293.470.70 293.050.55 293.410.67
24 293.470.57 293.050.65 293.410.67
25 293.470.60 293.050.57 293.410.63
26 293.050.62
Table 4. SE Results—Basic statistical properties for all state variables in bottle tests A.
Table 4. SE Results—Basic statistical properties for all state variables in bottle tests A.
State Variable StatisticA-E01A-E02A-E03
Initial   chlorine   concentration   C ^ 0 , m o d e l Mean   μ (mg/L)0.740.890.59
Std   σ (mg/L)0.050.060.05
CV (%)6.766.198.80
Final   chlorine   concentration   C ^ f , m o d e l Mean   μ (mg/L)−0.000.000.00
Std   σ (mg/L)0.010.010.01
Bulk   decay   coefficient   k ^ b Mean   μ (1/h)0.06380.08600.0713
Std   σ (1/h)0.00880.01100.0137
CV (%)13.8412.7919.19
Model   error   E ^ m o d e l Time 2 Mean   μ (mg/L)−0.00080.0003−0.0009
Std   σ (mg/L)0.00990.00990.0099
Time 3 Mean   μ (mg/L)0.0011−0.00060.0014
Std   σ (mg/L)0.00970.00980.0098
Time 4 Mean   μ (mg/L)0.0001−0.0002−0.0014
Std   σ (mg/L)0.00980.00970.0098
Time 5 Mean   μ (mg/L)−0.00150.00240.0008
Std   σ (mg/L)0.00960.00960.0096
Table 5. SE Results—Basic statistical properties for all state variables in bottle tests B.
Table 5. SE Results—Basic statistical properties for all state variables in bottle tests B.
State Variable StatisticB-E01B-E02B-E03
Initial   chlorine   concentration   C ^ 0 , m o d e l Mean   μ (mg/L)0.941.010.99
Std   σ (mg/L)0.030.030.03
CV (%)2.992.732.60
Final   chlorine   concentration   C ^ f , m o d e l Mean   μ (mg/L)0.320.520.38
Std   σ (mg/L)0.040.040.06
CV (%)13.017.2914.94
Bulk   decay   coefficient   k ^ b Mean   μ (1/h)0.01330.01680.0107
Std   σ (1/h)0.00260.00380.0025
CV (%)19.8022.8523.70
Model   error   E ^ m o d e l Time 2 Mean   μ (mg/L)0.00100.00010.0018
Std   σ (mg/L)0.00980.00980.0098
Time 3 Mean   μ (mg/L)−0.00100.0000−0.0010
Std   σ (mg/L)0.00970.00970.0097
Time 4 Mean   μ (mg/L)−0.0013−0.0017−0.0019
Std   σ (mg/L)0.00970.00960.0097
Time 5 Mean   μ (mg/L)0.00170.00290.0006
Std   σ (mg/L)0.00970.00980.0097
Time 6 Mean   μ (mg/L)−0.0006−0.00190.0007
Std   σ (mg/L)0.00980.00980.0098
Time 7 Mean   μ (mg/L)0.00020.0008−0.0000
Std   σ (mg/L)0.01000.01000.0100
Table 6. SE Results—basic statistical properties for all state variables in bottle tests C.
Table 6. SE Results—basic statistical properties for all state variables in bottle tests C.
State Variable StatisticC-E01C-E02C-E03
Initial   chlorine   concentration   C ^ 0 , m o d e l Mean   μ (mg/L)1.020.970.98
Std   σ (mg/L)0.020.020.03
CV (%)2.401.972.69
Final   chlorine   concentration   C ^ f , m o d e l Mean   μ (mg/L)0.49−0.030.60
Std   σ (mg/L)0.120.480.05
CV (%)24.56−1908.628.15
Bulk   decay   coefficient   k ^ b Mean   μ (1/h)0.00540.00140.0104
Std   σ (1/h)0.00250.00090.0038
CV (%)46.6860.8436.40
Model   error   E ^ m o d e l Time 2 Mean   μ (mg/L)−0.0010−0.0021−0.0009
Std   σ (mg/L)0.00980.00970.0098
Time 3 Mean   μ (mg/L)−0.00150.00050.0002
Std   σ (mg/L)0.00970.00970.0097
Time 4 Mean   μ (mg/L)0.00260.00240.0017
Std   σ (mg/L)0.00970.00970.0097
Time 5 Mean   μ (mg/L)0.0015−0.0010−0.0011
Std   σ (mg/L)0.00970.00960.0097
Time 6 Mean   μ (mg/L)−0.00250.0003−0.0001
Std   σ (mg/L)0.00980.00960.0098
Time 7 Mean   μ (mg/L)0.0010−0.00020.0004
Std   σ (mg/L)0.01000.00990.0100
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Cejas, E.; Díaz, S.; González, J. Bottle Test Free Chlorine Bulk Decay Coefficient Statistical Fitting for Water Supply Systems via State Estimation Techniques. Water 2025, 17, 2990. https://doi.org/10.3390/w17202990

AMA Style

Cejas E, Díaz S, González J. Bottle Test Free Chlorine Bulk Decay Coefficient Statistical Fitting for Water Supply Systems via State Estimation Techniques. Water. 2025; 17(20):2990. https://doi.org/10.3390/w17202990

Chicago/Turabian Style

Cejas, Elena, Sarai Díaz, and Javier González. 2025. "Bottle Test Free Chlorine Bulk Decay Coefficient Statistical Fitting for Water Supply Systems via State Estimation Techniques" Water 17, no. 20: 2990. https://doi.org/10.3390/w17202990

APA Style

Cejas, E., Díaz, S., & González, J. (2025). Bottle Test Free Chlorine Bulk Decay Coefficient Statistical Fitting for Water Supply Systems via State Estimation Techniques. Water, 17(20), 2990. https://doi.org/10.3390/w17202990

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop