Abstract

In the water environment, construction, and civil engineering industries, digital twins have gradually become a popular solution in recent years, and in digital twins, accurate data prediction and category recognition are important parts of it. Artificial neural network (ANN), a widely used data-driven model, can accurately identify nonlinear relationships in the water environment. In this paper, a recognition model for black-odorous water bodies based on ANN was established to directly identify the sensory description of water bodies. This study used water quality data and sensory description (color and odor) as samples to train backpropagation (BP) neural networks. The training results show that the accuracy of the color and odor models reaches 86.7% and 85.8%, respectively. It can thus be suggested that the sensory description can be accurately recognized by BP neural network. The application results indicate that all seven rivers had black-odorous phenomenon within a year. The recognition models have been instrumental in water resource management. Meanwhile, the models provide a reference for the evaluation and early warning of black-odorous water bodies in other regions.

1. Introduction

Digital twins can take the real data of the physical world as the input, and the generated data can be used to predict and identify the physical object, so as to know how the system is affected by these inputs. At the same time, technologies related to the Internet of Things are gradually being promoted [1]. In the water environment industry, digital twins have gradually become a popular solution in recent years. Besides, at present, more and more attention has been paid to the researches on water resources in sustainable cities. Because the black-odorous water bodies cause serious pollution to cities, it is particularly important to accurately identify the degree of the black-odorous water bodies. Urban rivers are an important part of urban ecology, but they are often used as a way to discharge sewage due to the inconsistency between urbanization and sewage treatment [2], and a considerable amount of sewage was discharged into urban rivers. The water quality of urban rivers deteriorates with the accumulation of pollutants, which makes urban rivers turn black with an odor. The identification and evaluation of black-odorous water bodies is the prerequisite for water resource management. Water quality index or pollution index are common methods for water quality assessment. However, the weights of index change with the regions, which leads to the geographical limitation of the index-based methods. Moreover, it is difficult for an index to describe the black-odorous phenomenon intuitively. Therefore, a concise model without geographical limitations for describing black-odorous water is necessary. “Black-odor” is a sensory description of polluted rivers [3]. Chinese Ministry of Housing and Urban-rural Development defines black-odorous waters as urban water bodies with unpleasant colors and odors (working guidelines for the treatment of urban black-odorous water issued by Chinese Ministry of Housing and Urban-rural Development). Therefore, the color and odor, the concern of residents, can directly express the black-odorous phenomenon of water. Environmental protection departments have a large amount of water quality monitoring data, but only after site visits can obtain an objective description of water bodies, it is obviously difficult to perform continuous site investigations. Therefore, finding out the nonlinear mapping between the water quality monitoring data and the sensory description of the water body can use the existing monitoring data to directly identify the color and odor of water body, which can greatly facilitate water resource management.

Machine learning methods have been gradually applied in various fields in recent years [4]. Artificial neural network (ANN) can identify the nonlinear mapping by adjusting the interconnected relationship between internal nodes. ANN has the ability to learn autonomously and find optimal solutions rapidly, so it has been widely used in water environment.

The aim of this study is to explore the relationship between water quality monitoring data and water sensory description. For this purpose, a recognition model for black-odorous water bodies based on ANN was established. The water quality monitoring data and sensory description (color and odor) of an inland river system in Linyi were selected as samples to train the models. The models proposed in this study can directly use existing monitoring data to identify black-odorous water bodies, which provide a reference for identifying black-odorous water bodies in other regions and facilitate water resource management. The rest of the paper is structured as follows. Section 2 introduces the related research of black-odorous water and ANN. Section 3 introduces the data and method for building the model. The results and conclusions are presented in the Sections 4 and 5.

2.1. Black-Odrous Water Bodies

Sustainable development is an essential part of the smart city construction. And water pollution is a key factor hindering the sustainable development of smart cities. The black color and odor of rivers are caused by a series of biogeochemical processes mainly related to Fe, Mn, S, N, and C [5]; among them, the biological transformations related to the sulfur cycle are the main reason. FeS and MnS blacken the water, and volatile sulfur compounds make water smelly [3, 6]. The sources of these pollutants are mainly from urban sewage and other natural factors, such as dissolved organic matter from large plant litter [7]. The rapid proliferation of algae and bacteria caused by the above phenomena has greatly reduced the dissolved oxygen (DO) in the water and exacerbate the deterioration of water quality [8, 9]. Moreover, bottom sediments of black-odorous water bodies may cause secondary pollution [10]. The primary task to solve such environmental problems is to identify and evaluate black-odorous water bodies. Ji et al. [11] evaluated the black-odorous river by calculating the Nemerow index. Wei et al. [12] monitored and evaluated two black-odorous rivers in Wuhan based on the Nemerow index and remote-sensing technology. Moreover, the evaluation of black-odorous rivers belongs to the water quality assessment, so methods of water quality assessment are also valuable.

2.2. Water Quality Assessment and Early Warning

Yan et al. [13] proposed a weighted comprehensive index based on the geometric weighting method to evaluate water bodies in Shanghai. Pan et al. [14] proposed a multivariate statistical method that can assess the spatial variations of groundwater quality. Miao et al. [15] established a correlation model between water quality index and satellite data based on Canadian water quality index and remote sensing to evaluate surface water quality. Liu et al. [16] integrated Bayesian regression and isolation forest algorithms to predict the trend of water quality. However, from the formulas of above models change with regions, the established models cannot be generalized to other water bodies.

2.3. Artificial Neural Network

In the study of water quality assessment, Wu et al. [17] utilized an unsupervised learning ANN to evaluate the impact of seasonal factors and human activities on water quality. Bo et al. [18] established a risk assessment model for groundwater pollution based on ANN. Gebler et al. [19] evaluated the ecological status of rivers by using ANN models. Bansal and Ganesan [20] proposed an ANN-based water quality index calculation method.

ANN can make accurate predictions through a mass of data [21]. Yang et al. [22] established a turbidity early warning system using ANN and probability analysis. Delpla et al. [23] used trend analysis and ANN to predict major events and daily time series of turbidity. Jin et al. [24] analyzed the internal trend of surface water quality based on ANN integrated with improved genetic algorithm. Azimi et al. [25] applied ANN and fuzzy clustering to predict probability of adverse changes in drinking water quality.

ANN is widely applied in simulation [26]. Jiang et al. [27] used a combination of Monte Carlo simulation and ANN to assess water quality risks. Wang et al. [28] utilized a least squares support vector machine to quantitatively determine the concentration of pollutants. Salari et al. [29] applied polynomial least squares method and feedforward neural network to simulate the concentration of DO, total dissolved solids, and other indicators. Garcia-Alba et al. [30] built an ANN based on a spatiotemporal evolution model for analyzing estuary water quality. Pradhan et al. [31] took ANN to simulate daily runoff.

The studies mentioned above show that ANN can deal with nonlinear problems in environmental science. Therefore, the nonlinear mapping between the water quality monitoring data and the sensory description can be recognized by the ANN. In addition, the established model can directly use the the monitoring data on water quality, which greatly facilitates the management of water resources.

3. Materials and Methods

3.1. Data and Samples

Bacteria consume a large amount of DO due to the high content of dissolved organic carbon, which makes the water body turns black with an odor [8], so DO is an important indicator. In fact, the black-odor phenomenon is caused by a series of biochemical reactions related to Fe, Mn, S, N, and C. Moreover, N and P are important causes of eutrophication of water bodies. Therefore, it is unreasonable to select DO as the only indicator. However, sulfur-containing organic compounds, Fe and Mn sulfides, are not conventional water quality monitoring items. Only the selection of conventional water quality indicators can improve the applicability of black-odorous water identification models. This paper refers to the indicators of black-odorous water bodies in several studies [3235] and working guidelines for the treatment of urban black-odorous water (Chinese Ministry of Housing and Urban-rural Development); meanwhile, this paper considers the correlation between indicators and black-odorous water bodies, and the universality of monitoring items, DO, COD (chemical oxygen demand), (biochemical oxygen demand), (ammonia nitrogen), and TP (total phosphorus) are selected as the indicators of black-odorous water.

The sensory description of the water body is also added to the model. In this study, two apparent elements, color and odor, are selected as the outputs. The water color is divided into yellow-green, dark green, gray-black, and black; the odor is divided into odorless, slight, odor, and severe. The odor is judged at 1 m from the river bank. In the on-site investigation, full consideration is given to the diversities in perception, and 20 experimenters provided the sensory data (water color and odor) at the same time. The results are determined by majority principle. The mean and standard deviation (SD) of water quality monitoring data are shown in Tables 1 and 2 (the unit of the mean value is ).

3.2. BP Neural Network

BP neural network, using backpropagation learning algorithm, is a classic feedforward neural network. Theoretically, it has been proved that a three-layer neural network can achieve arbitrary accuracy with approximate functions. In this paper, the BP neural network is used to build two models: color model and odor model.

In both the color and odor model, the input variables are the monitoring data, including DO, COD, , , and TP, so the input layer has five nodes. The output results are I, II, III, and IV indicating the degree of water color and odor. In the color model, I to IV indicate yellow-green, dark green, gray-black, and black; in the odor model, I to IV indicate odorless, slight, odorous, and severe. The number of hidden layer nodes were determined by trial and error. The topology of color model is shown in Figure 1. The topology of odor model is shown in Figure 2.

The rectified linear unit (ReLU) is an activation function with a simple structure (equation (1)), where and represent weight and bias. It has no saturation region, so there is no problem of gradient disappearance in ReLU. In addition, its unilateral inhibition mechanism is consistent with the neurobiological mechanisms, which makes it have a faster convergence rate than Sigmoid and tanh function. Therefore, ReLU was selected as the activation function of the input layer. The activation function of the output layer used the Softmax function, which can express the results of multiple classifications in the form of probability (equations (2) and (3)), where represents probability, is the output of the prestage unit, and and indicate the category index and the total number of categories. In the case of single classification problem, N categories are in the form of one-hot encoding, only one category  = 1, and the other N−1 categories are 0. The Softmax cross-entropy loss function (equation (4)) was chosen to represent the model error:

3.3. Application

The established model was applied to an inland river system composed of seven rivers in Linyi City. The inland river system is located between Yi River and Shu River, and it is composed of Ligong River, Xiaobudong River, Yubai River, Pengbai River, Xiebai River, Xiaodungou River, and Huangbai River. Those rivers form a complex river system with different functions [36]. The main pollutants in those rivers are DO, COD, , , TP, fluoride, petroleum, sulfide, etc. Among them, DO, COD, , , TP, and petroleum often exceed the standard; as a result, black-odorous phenomenon occasionally occurs in those rivers. The data of this study are from the routine monitoring data of 12 monitoring sections (June 2016 to May 2017). And the locations of the monitoring sections in the rivers are shown in Figure 3.

4. Results and Discussion

4.1. Training Results of Models

The samples were divided into a train set and a test set at a ratio of 8: 2, and the models were trained to have the ability to recognize the color and odor of water bodies. The color and odor models have been trained 50,000 times. We used the ratio of the number of correctly predicted results to the number of total samples to represent the accuracy of the models. In the color model, the accuracy of train set reached 86.7%, the accuracy of test set reached 84.6%, and the error (loss) is shown in Figure 4. In the odor model, the accuracy of train set reached 85.8%, and the accuracy of test set reached 83.3%, and the error (loss) is shown in Figure 4. The training results confirm that the above two models meet the requirements and can accurately identify the color and odor of the water body through the water quality monitoring data.

4.2. Applications of Models

The models were applied to identify the color and odor of seven rivers in Linyi Development Zone, and the outputs are shown in Figure 5. Overall, the color and odor of the same river have almost the same trend. This paper regards class III as black-odorous rivers. The output results show that all seven rivers had a black-odorous phenomenon within a year. Among them, the variation trend of color and odor in the Yubai River, Pengbai River, Xiaobudong River, and Huangbai River is highly correlated with the seasons; in the wet season, the water quality tends to deteriorate, while in the dry season, the water quality tends to improve. This is because farmland, and farms are distributed along the rivers, and the polluted soil will enter the river channels with rainwater, which caused the rivers to turn black with an odor. By contrast, the water quality of the Ligong River also changes with the seasons, but the Ligong river is prone to be black-odorous river in the dry season; this inconsistency may be due to the direct discharge of sewage in some regions. The results of Xiebai River and Xiaodungou River have no obvious correlation with the seasons; they are likely to be related to the discharge of wastewater from the surrounding industrial parks. Therefore, the drainage system of the study area needs to be improved. In addition, the walls of the rivers need to be constructed.

5. Conclusion

This paper established recognition models for black-odorous water bodies based on BP neural network. The input variables are the conventional water quality monitoring indicators; they are DO, COD, , , and TP, and the outputs are water color and have odor. The accuracy of the color and odor models reached 86.7% and 85.8%, respectively. The results show that the models can accurately recognize the color and odor of water bodies based on water quality monitoring data. The models were applied to seven rivers in Linyi City. The application results show that black-odor phenomenon occurred in those rivers from June 2016 to May 2017. This is the first study to use water quality data to identify the color and odor of black-odorous water bodies, which provides new insights into water resource management.

Being limited to data, this study lacks enough samples, and the accuracy of the models can be improved. In addition, the BP neural network has limited ability to identify nonlinear relationship, so the advanced algorithms should be applied to the research.

Data Availability

The datasets used and analyzed during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.