A Novel Optimization Algorithm for Calibrating Pollutant Degradation Coefficient in Deep Tunnel Based on Storm Water Management Model ()
1. Introduction
Combined sewer systems (CSS) are designed to discharge excess wastewater directly to nearby water bodies. These combined sewer overflows (CSO) can seriously impair the ecological quality of receiving water (Yu et al., 2022), which may cause short-term and long-term negative impacts on the surrounding environment. The long-term negative impacts include sediment contamination of river beds and the eutrophication in the downstream sea (Barone et al., 2019; Riechel et al., 2020; Wu et al., 2019), while short-term impacts are more concerned, such as hydraulic stress, ammonia toxicity, and acute oxygen depressions (Komínková et al., 2018; Poopipattana et al., 2021; Riechel et al., 2016) for they may lead to lethal conditions for aquatic organisms (Crocetti et al., 2021).
For alleviating such damage as well as urban flood, some practices are utilized at the local level to moderate intensity storms (Yang and Chui, 2018) like Green Infrastructures (GI). However, the deep tunnel system can be deemed as a better large-scale solution to flooding damage and water pollution under severe storms (Owusu et al., 2013) for the differences in its construction size (i.e., the spatial scale of the overall system and geometric characteristics of the structures), regionalized geographical and topographical properties (Luo et al., 2021). Meanwhile, the deep tunnel system can store excessive stormwater temporarily and drain them afterwards to avoid flood peaks, thus it’s regarded as a new method for solving urban water problems.
Among the complicated dynamic process of water flow in deep tunnels, the mechanism of pollutant transferring, diffusion and degradation can be quite significant. For describing its inner status, the one-dimensional convection-diffusion equation has been widely used under such conditions and the contaminant degradation coefficient of it can be a quite key parameter to be calibrated. This coefficient reflects the ability of the specific water body to degrade pollutants at a certain time and space. Furthermore, it can calculate the water environment capacity and the sewage carrying capacity, thus it plays an important role in the total-amount-control of pollution within certain area, the scientific allocation of the total loads, and the management of controlling methods (Huang et al., 2017).
An accurate degradation coefficient can be quite key under such circumstances. Generally, methods commonly used to determine the contaminant degradation coefficient include the empirical formula estimation method, the data analysis analogy method, and the indoor experiment and prototype observation method (Ren, 2009). While it’s hard for the traditional method to reflect the influencing factors of the degradation process, such as the water temperature, the pollutant characteristics, the microbial magnitude and species, the aquatic plant absorption and sediment adsorption (Hua et al., 2013; Liu et al., 2008; Wang et al., 2015). Hence, a new process of calculating the degradation parameter is to be put forward for improving its accuracy.
Storm Water Management Model (SWMM) has been widely applied to simulate the mechanism of pipeline flowing and pollutant degradation. Compared with the Info Works ICM, MIKE URBAN and other software, SWMM offers its source codes to be modified and developed, thus we can improve the degrading process accordingly. As for the research works of SWMM source codes, Li et al. (2022) construct the flow transmission chain (FTC) based on the relationship between inflow and outflow of each pipe junction to improve the computational efficiency, thus to simulate the outflow at the outfall of the region of interest with SWMM-FTC. Shojaeizadeh et al. (2021) put forward GIP-SWMM by combining the spatial allocation methods of GI (Green Infrastructure) with SWMM mechanism, and the integrated model has incorporated concerns of the cost and efficiency of GI practices. Similarly, Baek et al. (2020) develop the SWMM-HYDRUS-1D to simulate the hydrological and hydraulic processes of stormwater in urban areas, thus the mechanism can be more precise and convincing.
Considering the existence of timer within SWMM, the pollutant degradation coefficient can be refreshed according to its measured value under various patterns. In contrast with the traditional fitting method, this work introduces a novel algorithm to calculate this parameter by combining clock time with measured data and output new pollutant degradation coefficient in real time. Meanwhile, some error value of measured data can be detected and filtered with this mechanism, and the time consumption can be lowered with the gradient descendant process. Furthermore, this algorithm could assist to realize parameter refresh in real time with abundant measured data, thus it’s of certain value.
2. Materials and Methods
2.1. Overview of Study Area
Qianhai Cooperation Zone is located in the southwest part of Shenzhen, where is east to Pearl River Bay area and opposite to Hong Kong SAR as shown in Figure 1. As a prominent platform for realizing Guangdong-Hong Kong-Macao cooperative strategy, Qianhai has developed infrastructure construction and prosperous economical level, thus drawing increasing attention in recent years. This area belongs to subtropical monsoon climate, with an annual average rainfall of 1593 mm and an average temperature of 22.2˚C. Substantial rainfall brings large amount of surface runoff and several rivers flow into bay area therein.
Figure 1. Overview of study area.
With frequent events of urban flood and aquatic pollution, the existed pipelines system of Qianhai can’t deal with the problem of stormwater effectively. Due to the increasing water level of outfall and rainwater flowing, local pump stations fail to drain out all rainwater in time, and pollutant loads will also surpass environmental standards under certain conditions. Hence, a more developed and effective drainage system can be essential therein.
Deep tunnel system has been regarded as the large-scale solution to flooding damage and water pollution due to severe storms (Owusu et al., 2013). Besides the differences in structural characteristics and topographical properties, these systems may share similar functionality and architectural configuration. Namely, the excessive inflow that overwhelms interceptors may overflow through flow diversion and splitting structures to deep tunnels draining to storage reservoirs further downstream. Flow regulators were installed to manage flow rates to the tunnels based on water levels in the system. The deep tunnel system provides temporary storage of the combined sewage which will be pumped and delivered to nearby WTPs for treatment (Luo et al., 2021).
2.2. Methodology
2.2.1. Fitting Method
The fitting method is based on the fitting process between the pollutant convective diffusion equation and observed data, aims to work out corresponding parameters to describe the process of pollutant degradation. The original convective diffusion equation can be demonstrated as Equation (1), where A is the area of cross-section, C is the pollutant concentration, T is the amount of mass conduction, x is the axis direction, K is the degradation coefficient of pollutant, Cs is the concentration of source, and q is the flow of source.
(1)
Considering the unchanged condition of the observed environment, the amount of mass conduction T is neglected. If the variable AC is replaced by u, the equation can be expressed as Equation (2), which is a first-order nonhomogeneous differential equation, with the form of general solution as Equation (3):
(2)
(3)
Furtherly, the equation can be demonstrated as Equation (4) and Equation (5), thus the purpose of the fitting method is to work out the best parameters to fit the observed data.
(4)
(5)
2.2.2. Optimized Algorithm
Compared with the traditional method of calibrating parameters between pollutant concentration and elapsed time, this work puts forward a novel algorithm to calculate degradation coefficient K under certain moment of Equation (1) and substitute it to SWMM source code for pollutant concentration computation. This optimized algorithm consists of three processes and mechanisms: the Main process, the Outlier filtration mechanism and the Gradient descent mechanism. Among which the Outlier filtration mechanism aims to improve the calculation precision and except the influence of outlier, and the Gradient descent mechanism could achieve better calculation efficiency. By obtaining the current time t of SWMM, this algorithm can treat it as an input variable and output the pollutant degradation coefficient K, then return it to the SWMM source code and keep computing for the next moment. The diagram (as shown in Figure 2) and demonstration of this algorithm are as follows:
![]()
Figure 2. Diagram of the optimized algorithm.
1) Main process
a) The algorithm reads the elapsed time t of SWMM and the observed data with certain time;
b) Remove outlier with the mechanism (discussed later) and calculate the upper and lower limited concentration value C0 and C after filtering outliers;
c) Calculate degradation coefficient K with the Gradient descent mechanism (discussed later), return K to SWMM source code and output the concentration of COD, NH3-N, TN, TP of time t;
d) Refresh time t.
2) Outlier filtration mechanism
a) Obtain the observed data of time t, and traverse the sequence of concentration C;
b) For each Ci, calculate the average concentration after removing Ci;
c) Set the allowable error range a, calculate concentration window [C', C''] with Equation (6) and Judge if Ci is in this window;
(6)
where a represents the allowable range of error, [C', C''] is the allowable concentration window, C' is the upper limit of this window, C'' is the lower limit of this window and
is the average concentration after removing Ci;
d) If Ci is not in the allowable concentration window, remove it as an outlier and back to b), otherwise continue to calculate the next Ci of this series;
e) Judge if the dataset has changed, if not then output the average value C of the filtrated series and return this
to the Main process.
3) Gradient descent mechanism
a) After obtaining the upper and lower limited concentration value C0 and C after filtering outliers, set the initial K, variant range b, and define gradient expression f(K) with the above concentration;
b) Calculate K' and K'' after variation with Equation (7), and obtain gradient after variation f(K'), f(K'')
(7)
where K' is the upper limit of the variation value, K'' is the lower limit of the variation value.
c) Judge if min(f(K'), f(K'')) has reached the allowed error range, if not then set K matches min(f(K'), f(K'')), otherwise refresh K and back to b).
3. Results and Discussions
3.1. Rainfall Series
The rainfall series of study area is based on the rainfall intensity formula of Shenzhen, which is demonstrated in Equation (8). By obtaining such rainfall model, the corresponding rainfall series is input into SWMM for simulation, and results are output for validating the accuracy of this model.
(8)
where i is the rainfall intensity, mm/min; P is the rainfall recurrence period, a; t is the rainfall time, min.
3.2. Results Analysis
3.2.1. Error Analysis
As discussed in 2.2.2, the allowable error range a can be regarded as a key parameter for validating the efficiency of this algorithm: if this range is set too vast then such mechanism won’t filter the outlier effectively, while if the range gets too narrow it may delete some ordinary value. Therefore, various parameter a was set to simulate and generate results.
Meanwhile, simulation results of fitting method can also be incorporated to compare the simulated value and observed value, thus to validate the accuracy of this study. For furtherly carrying error analysis, the indicators of RMSE, MSE and MAE are selected as indicators to present the efficiency (Equation (9)-Equation (11)).
(9)
(10)
(11)
where
represents the observed data,
represents the value of prediction and
is the average value of the observed data.
During the water quality experiments, COD, NH3-N, TN and TP are chosen as pollutant indicators of the observed data. Accordingly, the aforementioned indicators are simulated and output in SWMM by substituting different allowable error range a into the source code. Experiment data of laboratory is regarded as observed value and modelling data of SWMM is treated as simulated value. All the error analysis results are presented in Figure 3.
(a) (b)
(c) (d)
Figure 3. Error analysis results between fitting method and algorithm with various allowable error range a: (a) COD; (b) NH3-N; (c) TN; (d) TP.
As shown in Figure 3, the varying trend of simulation error tends to increase before decreasing with a increases, and reaches its peak when a equals 0.3, which matches with the facts mentioned before. Furtherly, nearly all pollutant indicators have the least error value when a equals 0.5, and commonly behave better than the fitting method. Although the amount of data is limited, such algorithm has still obtained ideal results as for simulation accuracy compared with the fitting method, thus it’s expected to work better with substantial observed data.
3.2.2. Efficiency Analysis
The optimized algorithm utilizes an iterative method to work out the best pollutant degradation coefficient K, while the fitting method directly calculates such a parameter, thus the algorithm may increase the computation consumption accordingly. For solving this problem, the gradient descent mechanism is put forward to decrease iterative times. To present the effect of optimization, the average iterative amounts and average iterative time are selected as representative indicators to demonstrate, the comparing results between the gradient descent mechanism and the ordinary iterative method are shown in Figure 4.
As shown in Figure 4, the gradient descent mechanism has obvious optimized effects compared with the common iterative method. In terms of iterative amounts, the gradient descent mechanism has about 2500 times of iteration for four pollutant indicators, while that of the common iterative method is about 33,000, thus the gradient descent mechanism nearly reduces 92.42% of the amounts. As for the iterative time, the gradient descent mechanism takes nearly 0.004s to converge while that of the common iterative method approaches 0.22 s, which denotes such an optimized algorithm improves 55 times of the computation efficiency. Similarly, the amount of data has constrained the function of this algorithm as discussed in the Section 3.2.1, while it still shows ideal performance as for the comparative results, thus it may harvest more in the latter research.
4. Conclusion
Aiming at working out a more accurate pollutant degradation coefficient K of the
(a) (b)
Figure 4. The comparing results between the gradient descent mechanism and the ordinary iterative method: (a) iterative amounts; (b) iterative time.
deep tunnel system, this work puts forward a novel optimized algorithm to calibrate such coefficient and compare it with the ordinary fitting method. The calibration result is substituted into SWMM source codes to validate its effectiveness between simulated and observed data. COD, NH3-N, TN and TP are chosen as pollutant indicators, with the RMSE, MSE and MAE selected as error indicators to present the accuracy. The results show that:
1) Nearly all pollutant indicators have the least error value when the allowable error range a equals to 0.5, and commonly behave better than the fitting method, which denotes such algorithm obtains an ideal performance and the outlier filtration mechanism works.
2) The gradient descent mechanism nearly reduces 92.42% of the iterative amounts and improves 55 times of the computation efficiency than the ordinary iterative method, thus obviously decreasing the computation consumption.
3) Although the amount of laboratory observed data is limited, this optimized algorithm has still obtained ideal results as for simulation accuracy and efficiency, hence it’s expected to function better with substantial observed data.
Author Contributions
Conceptualization and methodology, K.Z.; Simulation and analysis, K.Z.; writing—original draft preparation, K.Z.; writing—review and editing, Y.Z.; supervision, Y.Z. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the National Key Research and Development Program of China [2020YFC1808002], the Natural Science Foundation of Guangdong Province [2022A1515011776], the Guangxi Key R & D Program [2021AB25056].
Data Availability Statement
The data used to support the findings of this study are available from the corresponding author upon request.
Appendix
All the codes of this work have been uploaded to GitHub in Python, which includes two parts:
1) The calibration algorithm for degradation coefficient K;
2) Error analysis and results output (RMSE, MSE, MAE, etc.).
Opensource address:
https://github.com/kyzheng196/Calibration-algorithm-for-degradation-coefficient-K