Hydrogen sulfide monitoring and control method and system for urban drainage system based on kan model
By constructing a multi-source data acquisition and processing system based on the KAN model, accurate prediction and automated control of hydrogen sulfide concentration were achieved, solving the problems of sensor drift and model redundancy in existing technologies, and improving the safety and management efficiency of drainage systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-12
Smart Images

Figure CN122201491A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drainage network monitoring technology, specifically to a method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model. Background Technology
[0002] With the continuous acceleration of urbanization, urban drainage systems, as an important part of urban infrastructure, undertake the key functions of rainwater discharge, sewage transportation, and flood control and drainage. The safety and stability of their operation are directly related to the public health safety and ecological environment quality of the city. Therefore, comprehensive intelligent monitoring of drainage systems has become an inevitable requirement for modern urban management. By monitoring the system's operating status in real time, potential risks can be identified in a timely manner and countermeasures can be taken. This plays an irreplaceable role in ensuring the normal operation of the city and the quality of life of residents. The application of intelligent monitoring technology can significantly improve management efficiency and reduce operation and maintenance costs, thereby achieving refined management of urban drainage systems.
[0003] Among the many monitoring indicators of urban drainage systems, monitoring hydrogen sulfide gas is particularly critical. This is because hydrogen sulfide is not only highly toxic and has a foul odor, seriously threatening the lives of maintenance personnel, but the sulfuric acid it forms when dissolved in water can also cause severe corrosion to concrete pipes and metal equipment, leading to structural damage and shortened lifespan. Therefore, accurate monitoring of hydrogen sulfide concentration is essential for ensuring the long-term operation of drainage systems. By understanding the patterns of hydrogen sulfide concentration changes, we can effectively guide corrosion prevention work, avoid pipe ruptures and environmental pollution accidents caused by corrosion, and ensure that drainage facilities maintain good working condition even in harsh environments, thereby extending the service life of infrastructure and reducing economic losses.
[0004] Existing hydrogen sulfide monitoring methods mainly rely on traditional electrochemical sensors for periodic detection or prediction models based on ordinary neural networks. However, electrochemical sensors are susceptible to drift and poisoning due to harsh environments, and their maintenance costs are high, making it impossible to provide continuous and reliable monitoring data. Ordinary neural network models often suffer from redundant model parameters, weak generalization ability, and insufficient prediction accuracy when processing complex nonlinear biochemical reaction data, making it difficult to meet the needs of real-time and accurate early warning. This results in a lack of effective countermeasures when dealing with sudden hydrogen sulfide concentration exceedances, leaving drainage systems in a state of passive maintenance for a long time and failing to fundamentally solve the safety hazards caused by hydrogen sulfide. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model, in order to solve the problems of existing technologies that rely on electrochemical sensors, which are easily affected by harsh environments and drift, resulting in lagging monitoring data, and the problems of traditional neural network models having redundant model parameters, weak generalization ability and insufficient prediction accuracy when processing complex nonlinear biochemical reaction data.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] 1. A method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model, characterized by comprising the following steps: S1. Data Acquisition: Combine offline sampling and online monitoring methods to acquire water quality parameters, environmental parameters and hydraulic data during the operation of the drainage system, and aggregate the collected hydrogen sulfide concentration baseline data and real-time monitoring data to the edge computing gateway; S2. Data Processing: Cleaning and preprocessing the collected raw multi-source heterogeneous data to form the final model input dataset; S3. Model Building: Construct a hydrogen sulfide concentration prediction model based on KAN and train the model using the acquired multi-source data; S4. Closed-loop control: Input the real-time collected data into the trained model, output the predicted value of hydrogen sulfide concentration for a preset time period in the future, and trigger the early warning mechanism or automatically start the control equipment based on the comparison result between the predicted value and the preset safety threshold.
[0008] Further, step S1 includes: S11. Manual sampling is carried out at preset time intervals in typical manholes or key pipe sections of the drainage network. The samples are quantitatively analyzed using a dedicated hydrogen sulfide detection instrument to obtain accurate baseline data on hydrogen sulfide concentration. S12. Real-time water quality parameters are collected by electrochemical sensors deployed at key nodes, including at least one of pH value, dissolved oxygen, oxidation-reduction potential, conductivity, turbidity, suspended solids concentration, nitrate nitrogen, ammonium nitrogen and sulfate. S13. Use environmental monitoring sensors to synchronously collect environmental parameters inside the pipeline, including at least one of the following: ambient temperature, ambient humidity, gas flow rate inside the pipeline, gas pressure, gas phase oxygen concentration, and ventilation frequency. S14. Collect hydraulic data of pipeline operation using level gauges and flow meters, obtain at least one of instantaneous liquid level height and sewage flow data, and aggregate and transmit all the collected data to the edge computing gateway.
[0009] Further, step S2 includes: S21. Perform outlier detection and processing on the original data, and use linear interpolation to supplement the missing data segments; S22. Normalize data of different dimensions and orders of magnitude; S23. Construct time-series features based on time windows, use correlation analysis to select the key feature vectors with the highest correlation to hydrogen sulfide concentration, and construct the final model input dataset.
[0010] Furthermore, in step S23, the Pearson correlation coefficient analysis method is used, and the calculation formula is as follows:
[0011] The meanings of the variables involved in the formula: : Represents the Pearson correlation coefficient, which ranges from -1 to 1 and is used to measure the degree of correlation; : Represents the feature observation value of the i-th sample point; : Represents the arithmetic mean of the characteristic observation values of all sample points; : Represents the observed value of hydrogen sulfide concentration at the i-th sample point; : Represents the arithmetic mean of the observed hydrogen sulfide concentration values at all sample points.
[0012] Further, step S3 includes: S31. Construct the basic architecture of the KAN network, set the number of layers, the number of neurons in each layer, and the number and order of the B-spline function grid, and initialize the network parameters. S32. Divide the processed dataset into a training set and a validation set, define the loss function as the mean square error between the predicted value and the true value, and configure the Adam optimizer to update the parameters. S33. Input the training set data into the KAN model to perform forward propagation to calculate the predicted hydrogen sulfide concentration of the output layer, and update the coefficients of the B-spline function and the network weights through the backpropagation algorithm. S34. Monitor model performance using the validation set, adopt an early stopping strategy to prevent model overfitting, save model parameters when the loss function no longer decreases, and generate the optimal hydrogen sulfide prediction model.
[0013] Further, step S4 includes: S41. Input the real-time collected water quality, environmental and hydraulic data into the KAN model, and output the predicted value of hydrogen sulfide concentration for the future preset time period after model calculation. S42. Compare the predicted value of hydrogen sulfide concentration with the preset safety threshold to determine whether the early warning mechanism is triggered. If the predicted value exceeds the low threshold, a first-level early warning signal is issued. S43. If the predicted value exceeds the high threshold, the system will automatically generate a control command to start the ventilation equipment or administer a deodorizer.
[0014] Furthermore, it also includes step S44: collecting actual hydrogen sulfide concentration data after implementing the corresponding control measures and feeding it back to the database for periodic online fine-tuning and updating of the KAN model.
[0015] Furthermore, in step S3, the Kolmogorov-Arnold representation theorem is used, and its mathematical expression is:
[0016] In this formula, The function uses B-spline functions for parameterized fitting to achieve high-precision approximation; its specific expansion is as follows: The meanings of the variables involved in the formula: : Represents the output prediction of hydrogen sulfide concentration by the KAN model; : Represents the feature vector of the input model, which includes various preprocessed parameters; : Represents the number of neurons in the output layer and the current hidden layer of the KAN network; : Represents the number of dimensions of the input feature vector; : Represents the first A learnable univariate function corresponding to each neuron node; : Represents the first The input feature to the first Learnable edge functions between neurons; : Represents the number of grid intervals defined by the B-spline function; : Represents the first Learnable coefficient parameters corresponding to each B-spline basis function; : Represents the first A B-spline basis function at input The calculated value at that location.
[0017] Furthermore, in step S4, if the predicted value exceeds the first threshold, an early warning signal is issued; If the predicted value exceeds the second threshold, the control equipment will be automatically activated. The control equipment includes ventilation equipment and / or deodorant dispensing device.
[0018] This invention relates to a hydrogen sulfide monitoring and control system for urban drainage systems based on the KAN model, comprising: The data acquisition unit is deployed at the nodes of the drainage network to collect water quality parameters, environmental parameters, and hydraulic data. A control processor, connected to the data acquisition unit, includes: The data processing unit is used to preprocess the collected data to form the model input dataset; The KAN prediction model unit has a built-in prediction model based on KAN. The model uses learnable functions to replace traditional linear weights at the nodes, and outputs the predicted value of hydrogen sulfide concentration based on the input dataset of the model. The control execution unit is used to compare the predicted value with a preset safety threshold and issue an early warning signal or activate the control device based on the comparison result.
[0019] The beneficial effects of this invention are: This invention uses a KAN model architecture to set learnable functions on nodes to replace traditional linear weights, and uses B-spline functions to update and optimize network parameters, which improves the model's prediction accuracy and generalization ability for complex nonlinear biochemical reaction data. Through a closed-loop control strategy, ventilation or chemical dosing operations are automatically executed based on the prediction results, reducing the risk of pipeline corrosion and equipment maintenance costs, and maintaining the safe operation of the urban drainage system. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a method for monitoring and controlling hydrogen sulfide in an urban drainage system based on the KAN model, according to the present invention. Figure 2 This is a block diagram of a hydrogen sulfide monitoring and control system for urban drainage systems based on the KAN model, according to the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.
[0022] Embodiments of the present invention: like Figure 1 and 2 As shown, a method for monitoring and controlling hydrogen sulfide in an urban drainage system based on the KAN model includes the following steps: Step S1: Data Acquisition A multi-dimensional data acquisition system is constructed to comprehensively perceive the environmental status within the drainage network. This step involves synchronously collecting water quality parameters, environmental parameters, and hydraulic data through a sensor network deployed at key nodes. The system then aggregates real-time monitoring data with baseline data acquired through offline sampling to an edge computing gateway.
[0023] Furthermore, step S1 includes the following steps: S11. Hydrogen sulfide concentration data were acquired through offline sampling. Manual sampling was conducted at preset time intervals in typical manholes or key pipe sections of the drainage network. Quantitative analysis of the samples was performed using dedicated gas and liquid phase hydrogen sulfide detection instruments, thereby obtaining accurate and reliable baseline data on hydrogen sulfide concentration. This data was used to calibrate the online sensor and provide a true value label for the model, ensuring the accuracy of subsequent training data.
[0024] S12. Water quality parameters are collected in real time using electrochemical sensors deployed at key nodes of the drainage network. Specific parameters collected online include pH, dissolved oxygen (DO), oxidation-reduction potential (ORP), conductivity (EC), turbidity, suspended solids (SS), nitrate nitrogen, ammonium nitrogen, and sulfate. The sensors transmit the collected data in real time to an edge computing gateway for initial storage and aggregation.
[0025] S13. Environmental parameters within the pipeline are synchronously collected using environmental monitoring sensors. Monitoring indicators include ambient temperature, ambient humidity, gas flow rate within the pipeline, gas pressure, gaseous oxygen concentration, and ventilation frequency. The environmental sensors are synchronized with the water quality sensors to ensure that the collected environmental data accurately corresponds to the water quality and hydraulic data in terms of timestamps, forming a complete data sample.
[0026] S14. Collect hydraulic data of pipeline operation through level gauges and flow meters. The collected data includes instantaneous liquid level height and sewage flow rate data. The system aggregates all the collected water quality parameters, environmental parameters, and hydraulic data to the edge computing gateway. The gateway is responsible for time alignment and packaging of multi-source heterogeneous data, and then uploading it to the central database for unified processing and storage.
[0027] The aforementioned water quality parameters, environmental parameters, and hydraulic data indicators collectively constitute a complete data acquisition system that comprehensively reflects the operational status of the drainage network. All collected raw data is transmitted in real time to the edge computing gateway, which is responsible for the initial data aggregation, multi-source time alignment, and format packaging. The data is then uploaded to the central database for subsequent model training and analysis, ensuring data synchronization and integrity.
[0028] Step S2: Data Processing The collected raw, multi-source, heterogeneous data is cleaned and preprocessed to eliminate noise interference and extract effective features. Statistical methods are used to remove outliers caused by sensor malfunctions, and interpolation is employed to supplement missing data. The system normalizes data of different dimensions and orders of magnitude, mapping all features to a unified interval. The system constructs time-series features based on time windows and uses correlation analysis to select the key feature vectors with the highest correlation to hydrogen sulfide concentration, forming the final model input dataset.
[0029] Furthermore, step S2 includes the following steps: S21. Outlier detection and processing of the raw data. The system uses the Laida criterion, or the three-standard-deviation principle, to identify outliers in the dataset. These outliers are usually caused by sensor malfunctions or signal transmission interference. After identification, the system removes these outliers and uses linear interpolation to supplement the missing data segments based on the preceding and following normal data points to ensure data continuity.
[0030] S22. Normalize data with different dimensions and orders of magnitude. Since data collected by different sensors have different physical units and orders of magnitude, directly inputting them into the model will affect the convergence speed. This step linearly maps all feature variables to the interval between 0 and 1. Normalization can eliminate the influence of dimensional differences on model calculation, accelerate the model training process, and improve the stability of predictions.
[0031] The normalization process uses the range standardization algorithm to linearly map data of different dimensions to the interval [0,1]. The calculation formula is as follows:
[0032] The specific definitions of the variables involved in the formula are as follows: : Represents the feature value after normalization, which is dimensionless and between 0 and 1; : Represents the raw, unprocessed feature values, which have the original physical dimensions; : Represents the minimum value of this feature in the entire dataset; : Represents the maximum value of this feature across the entire dataset; S23. Construct time-series features based on time windows and select key feature vectors. The system uses Pearson correlation coefficient analysis to calculate the correlation coefficient between each feature and hydrogen sulfide concentration. The calculation formula is as follows:
[0033] The meanings of the variables involved in the formula: : Represents the Pearson correlation coefficient, which ranges from -1 to 1 and is used to measure the degree of correlation; : Represents the feature observation value of the i-th sample point; : Represents the arithmetic mean of the characteristic observation values of all sample points; : Represents the observed value of hydrogen sulfide concentration at the i-th sample point; : Represents the arithmetic mean of the observed hydrogen sulfide concentration values at all sample points.
[0034] Based on the calculation results, the key features most strongly correlated with hydrogen sulfide concentration were selected. The selected feature vectors were combined to form the final model input dataset, removing redundant information and improving model efficiency.
[0035] Step S3: Model Building A prediction model based on Kolmogorov-Arnold Networks (KAN) is constructed and trained, leveraging the KAN architecture's ability to use learnable functions on nodes instead of traditional linear weights to improve prediction accuracy. This step involves setting the number of network layers, the number of neurons per layer, and the number and order of the B-spline function grids, thus initializing the network parameters. The system divides the processed dataset into training and validation sets, defines the mean squared error loss function, and configures the Adam optimizer. The system iteratively updates the parameters through forward and backpropagation, monitors performance using the validation set, and saves the optimal model.
[0036] Furthermore, step S3 includes the following steps: S31. Construct the basic architecture of the KAN network and initialize its parameters. This includes setting the network's depth (number of layers), the number of neurons per layer, and the number and order of the B-spline function grid. The initialization process assigns initial values to the learnable spline coefficients and weights in the network. This architecture design utilizes the Kolmogorov-Arnold theorem to approximate complex multivariable functions through a combination of learnable univariate functions, laying the foundation for high-precision prediction.
[0037] The core computation of the KAN model is based on the Kolmogorov-Arnold representation theorem, and its mathematical expression is:
[0038] In this formula, The function uses B-spline functions for parameterized fitting to achieve high-precision approximation; its specific expansion is as follows: The specific definitions of the variables involved in the formula are as follows: : Represents the output prediction of hydrogen sulfide concentration by the KAN model; : Represents the feature vector of the input model, which includes various preprocessed parameters; : Represents the number of neurons in the output layer and the current hidden layer of the KAN network; : Represents the number of dimensions of the input feature vector; : Represents the first A learnable univariate function corresponding to each neuron node; : Represents the first The input feature to the first Learnable edge functions between neurons; : Represents the number of grid intervals defined by the B-spline function; : Represents the first Learnable coefficient parameters corresponding to each B-spline basis function; : Represents the first A B-spline basis function at input The calculated value at that location.
[0039] S32. Prepare the training environment and configure model parameters. Divide the processed dataset into training and validation sets according to a preset ratio. Define the loss function as the mean squared error (MSE) between the predicted and true values to measure the model's prediction error. Simultaneously, configure the Adam optimizer for parameter updates and set hyperparameters such as the learning rate. These configurations ensure that the model can effectively converge and optimize prediction performance during training.
[0040] Furthermore, the initial range of hyperparameters of the KAN model needs to be adjusted as follows: the learning rate is usually controlled within the range of 0.0005 to 0.001, with a recommended initial learning rate of 0.001, dynamically adjusted in conjunction with an exponential decay strategy; the batch size is generally set between 32 and 256, with the optimal value usually being 64 or 128 to balance gradient stability and computational efficiency; the hidden layer width can be set to 32 to 128 basis function units, with 64 recommended to balance expressive power and overfitting risk; the weight decay coefficient is recommended to be between 0.000001 and 0.001, with a commonly used optimal value of 0.0001; the number of training epochs is usually between 100 and 500; the order of the B-spline basis function is generally taken as 3 to 5, and the number of nodes is controlled between 10 and 30.
[0041] S33. Execute the model training process. Input the training set data into the KAN model for forward propagation and calculate the predicted hydrogen sulfide concentration of the output layer. Calculate the prediction error based on the loss function and calculate the gradient using the backpropagation algorithm. Use the gradient information to update the coefficients of the B-spline function and the network weights, continuously adjusting the network parameters to reduce the prediction error, thereby improving the model's ability to fit changes in hydrogen sulfide concentration.
[0042] S34. Verify model performance and save the optimal model. During training, monitor the model's performance on unseen data using the validation set. Employ an early stopping strategy to prevent overfitting; stop training when the loss function on the validation set no longer decreases after several consecutive training rounds. At this point, save the model parameters to generate a fully trained hydrogen sulfide prediction model with optimal generalization ability for subsequent real-world prediction tasks.
[0043] The KAN model structure used in this embodiment consists of multiple stacked Kolmogorov-Arnold network layers, each containing several neurons. Unlike traditional neural networks, the KAN model learns at the edges, meaning each connection weight is replaced by a learnable univariate function, typically using B-spline functions as basis functions. The network input layer receives a preprocessed feature vector, which undergoes nonlinear transformation through multiple hidden layers, ultimately outputting the predicted value of hydrogen sulfide concentration at the output layer. The model fits the data by adjusting the coefficients of the B-spline function, resulting in higher parameter efficiency and interpretability. This structure eliminates traditional neuron activation functions, achieving nonlinear mapping entirely through the composition of learnable functions, enabling more flexible adaptation to complex biochemical reaction data characteristics and providing high-precision time-series prediction results.
[0044] Step S4: Closed-loop control Automated control is achieved using the prediction results of a trained KAN model, forming a closed loop of monitoring, early warning, and regulation. This step inputs the latest real-time environmental and hydraulic data into the model, outputting predicted hydrogen sulfide concentrations for a preset future time period. The system compares the predicted values with preset safety thresholds to determine whether to trigger an early warning mechanism. If the predicted value exceeds the high threshold, the system automatically generates control commands to activate ventilation equipment and administer deodorizing agents. The system collects the actual data after control and feeds it back to the database for model fine-tuning.
[0045] Furthermore, step S4 includes the following steps: S41. Input the latest real-time environmental and hydraulic data into the optimal KAN model. The data undergoes the same preprocessing steps as in the training phase before being input into the model. The model outputs a predicted hydrogen sulfide concentration for a preset future time period. This predicted value reflects the changing trend of hydrogen sulfide concentration in the drainage network under current environmental and hydraulic conditions over a future period, providing a basis for subsequent early warning and control decisions.
[0046] S42. Compare the predicted hydrogen sulfide concentration with the preset safety thresholds. The system sets multiple safety threshold levels, including low and high thresholds. If the predicted value exceeds the low threshold, the system issues a level one warning to alert maintenance personnel. If the predicted value does not exceed any threshold, the system continues to operate normally. Through real-time comparison, the system can issue an alarm before the hydrogen sulfide concentration reaches a dangerous level, ensuring operational safety.
[0047] S43. If the predicted value exceeds the high threshold, the system automatically generates a control command. The command is sent to the field control equipment, automatically activating the ventilation equipment and injecting deodorizer into the pipeline. These control measures aim to rapidly reduce the hydrogen sulfide concentration in the pipeline, inhibiting further gas generation and diffusion, thereby avoiding safety accidents or equipment corrosion caused by excessive concentration, and achieving proactive automated risk management.
[0048] S44. Collect actual hydrogen sulfide concentration data after the implementation of control measures. The system compares the actual data with the previous predicted values and feeds the actual data back to the database. This newly added data is used to periodically fine-tune and update the KAN model online. By continuously introducing the latest actual operating data, the model can adapt to changes in the pipeline network environment, maintain high-precision prediction capabilities, and achieve self-optimization of the control system.
[0049] This invention relates to a hydrogen sulfide monitoring and control system for urban drainage systems based on the KAN model, comprising: The data acquisition unit is deployed at key nodes of the drainage network to collect water quality parameters, environmental parameters, and hydraulic data; specifically, it includes a manual sampling and uploading module, a water quality parameter monitoring module, an environmental parameter monitoring module, and a hydraulic parameter monitoring module. A control processor, connected to the data acquisition unit, includes: The data processing unit is used to preprocess the collected data to form the model input dataset; specifically, it includes an outlier removal module, a data normalization module, a time series feature construction module, and a correlation screening module. The KAN prediction model unit incorporates a prediction model built on Kolmogorov-Arnold Networks. The model uses learnable functions to replace traditional linear weights at the nodes to output predicted values of hydrogen sulfide concentration based on the input dataset. Specifically, it includes a KAN model building and training module and a hydrogen sulfide concentration prediction output module. The control execution unit is used to compare the predicted value with a preset safety threshold, and issue an early warning signal or activate the control equipment based on the comparison result. Specifically, it includes a threshold judgment module and a field control module. The safety threshold is set to multiple levels. If the predicted value exceeds the first threshold, an early warning signal is issued. If the predicted value exceeds the second threshold (the second threshold is greater than the first threshold), the control equipment is automatically activated. The control equipment includes ventilation equipment and deodorant dispensing device, or at least one of them.
[0050] It also includes a feedback update module. By collecting actual hydrogen sulfide concentration data after the implementation of control measures, the system compares the actual data with the previous predicted values and feeds the actual data back to the database. The newly added data is used to periodically fine-tune and update the KAN model online.
[0051] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other.
[0052] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are only used for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0053] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0054] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model, characterized in that, Includes the following steps: S1. Data Acquisition: Combine offline sampling and online monitoring methods to acquire water quality parameters, environmental parameters and hydraulic data during the operation of the drainage system, and aggregate the collected hydrogen sulfide concentration baseline data and real-time monitoring data to the edge computing gateway; S2. Data Processing: Cleaning and preprocessing the collected raw multi-source heterogeneous data to form the final model input dataset; S3. Model Building: Construct a hydrogen sulfide concentration prediction model based on KAN and train the model using the acquired multi-source data; S4. Closed-loop control: Input the real-time collected data into the trained model, output the predicted value of hydrogen sulfide concentration for a preset time period in the future, and trigger the early warning mechanism or automatically start the control equipment based on the comparison result between the predicted value and the preset safety threshold.
2. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 1, characterized in that, Step S1 includes: S11. Manual sampling is carried out at preset time intervals in typical manholes or key pipe sections of the drainage network. The samples are quantitatively analyzed using a dedicated hydrogen sulfide detection instrument to obtain accurate baseline data on hydrogen sulfide concentration. S12. Real-time water quality parameters are collected by electrochemical sensors deployed at key nodes, including at least one of pH value, dissolved oxygen, oxidation-reduction potential, conductivity, turbidity, suspended solids concentration, nitrate nitrogen, ammonium nitrogen and sulfate. S13. Use environmental monitoring sensors to synchronously collect environmental parameters inside the pipeline, including at least one of the following: ambient temperature, ambient humidity, gas flow rate inside the pipeline, gas pressure, gas phase oxygen concentration, and ventilation frequency. S14. Collect hydraulic data of pipeline operation using level gauges and flow meters, obtain at least one of instantaneous liquid level height and sewage flow data, and aggregate and transmit all the collected data to the edge computing gateway.
3. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 1, characterized in that, Step S2 includes: S21. Perform outlier detection and processing on the original data, and use linear interpolation to supplement the missing data segments; S22. Normalize data of different dimensions and orders of magnitude; S23. Construct time-series features based on time windows, use correlation analysis to select the key feature vectors with the highest correlation to hydrogen sulfide concentration, and construct the final model input dataset.
4. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 3, characterized in that, In step S23, the Pearson correlation coefficient analysis method is used, and the calculation formula is as follows: The meanings of the variables involved in the formula: : Represents the Pearson correlation coefficient, which ranges from -1 to 1 and is used to measure the degree of correlation; : Represents the feature observation value of the i-th sample point; : Represents the arithmetic mean of the characteristic observation values of all sample points; : Represents the observed value of hydrogen sulfide concentration at the i-th sample point; : Represents the arithmetic mean of the observed hydrogen sulfide concentration values at all sample points.
5. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 1, characterized in that, Step S3 includes: S31. Construct the basic architecture of the KAN network, set the number of layers, the number of neurons in each layer, and the number and order of the B-spline function grid, and initialize the network parameters. S32. Divide the processed dataset into a training set and a validation set, define the loss function as the mean square error between the predicted value and the true value, and configure the Adam optimizer to update the parameters. S33. Input the training set data into the KAN model to perform forward propagation to calculate the predicted hydrogen sulfide concentration of the output layer, and update the coefficients of the B-spline function and the network weights through the backpropagation algorithm. S34. Monitor model performance using the validation set, adopt an early stopping strategy to prevent model overfitting, save model parameters when the loss function no longer decreases, and generate the optimal hydrogen sulfide prediction model.
6. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 1, characterized in that, Step S4 includes: S41. Input the real-time collected water quality, environmental and hydraulic data into the KAN model, and output the predicted value of hydrogen sulfide concentration for the future preset time period after model calculation. S42. Compare the predicted value of hydrogen sulfide concentration with the preset safety threshold to determine whether the early warning mechanism is triggered. If the predicted value exceeds the low threshold, a first-level early warning signal is issued. S43. If the predicted value exceeds the high threshold, the system will automatically generate a control command to start the ventilation equipment or administer a deodorizer.
7. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 6, characterized in that, It also includes step S44: collecting actual hydrogen sulfide concentration data after implementing the corresponding control measures and feeding it back to the database for periodic online fine-tuning and updating of the KAN model.
8. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 1, characterized in that: In step S3, the Kolmogorov-Arnold representation theorem is used, and its mathematical expression is: In this formula, The function uses B-spline functions for parameterized fitting to achieve high-precision approximation; its specific expansion is as follows: The meanings of the variables involved in the formula: : Represents the output prediction of hydrogen sulfide concentration by the KAN model; : Represents the feature vector of the input model, which includes various preprocessed parameters; : Represents the number of neurons in the output layer and the current hidden layer of the KAN network; : Represents the number of dimensions of the input feature vector; : Represents the first A learnable univariate function corresponding to each neuron node; : Represents the first The input feature to the first Learnable edge functions between neurons; : Represents the number of grid intervals defined by the B-spline function; : Represents the first Learnable coefficient parameters corresponding to each B-spline basis function; : Represents the first A B-spline basis function at input The calculated value at that location.
9. The method for monitoring and controlling hydrogen sulfide in urban drainage systems based on the KAN model according to claim 1, characterized in that: In step S4, if the predicted value exceeds the first threshold, an early warning signal is issued; If the predicted value exceeds the second threshold, the control equipment will be automatically activated. The control equipment includes ventilation equipment and / or deodorant dispensing device.
10. A hydrogen sulfide monitoring and control system for urban drainage systems based on the KAN model, characterized in that, include: The data acquisition unit is deployed at the nodes of the drainage network to collect water quality parameters, environmental parameters, and hydraulic data. A control processor, connected to the data acquisition unit, includes: The data processing unit is used to preprocess the collected data to form the model input dataset; The KAN prediction model unit has a built-in prediction model based on KAN. The model uses learnable functions to replace traditional linear weights at the nodes, and outputs the predicted value of hydrogen sulfide concentration based on the input dataset of the model. The control execution unit is used to compare the predicted value with a preset safety threshold and issue an early warning signal or activate the control device based on the comparison result.