Water environment ammonia nitrogen prediction system
By introducing a combination of main ammonia nitrogen acquisition module, auxiliary ammonia nitrogen acquisition module and water quality acquisition module in the water environment ammonia nitrogen prediction system, the data processing module is used for real-time judgment and compensation model correction, which solves the problem of inaccurate data after long-term use of the sensor, and realizes long-term stable detection of the system and accurate output of ammonia nitrogen content in wastewater.
Patent Information
- Application Number
- CN202510283582.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-11
AI Technical Summary
The existing ammonia nitrogen sensors are not cleaned and calibrated in time after long-term use, resulting in the gradual loss of accuracy in the output data, resulting in inaccurate detection of ammonia nitrogen content in wastewater, which may lead to the problem of excessive ammonia nitrogen.
The combination of main ammonia nitrogen acquisition module, auxiliary ammonia nitrogen acquisition module, water quality acquisition module, data processing module and lifting module is used to judge the accuracy of the main ammonia nitrogen acquisition module through the data processing module. When it is inaccurate, the compensation model is used to form a compensation model for data correction, and the sensor is replaced when necessary to ensure the accuracy of detection.
Even if the sensor has not been cleaned and calibrated for a long time, the system can continue to output accurate ammonia nitrogen content data, avoiding excessive ammonia nitrogen in wastewater, and ensuring the stability and accuracy of water detection.
Smart Images

Figure CN119807856A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ammonia nitrogen prediction, and in particular to a system for predicting ammonia nitrogen in a water environment. Background Art
[0002] Ammonia nitrogen is a form of nitrogen in water, mainly including free ammonia and ammonium ions. Its content is one of the important indicators for measuring water environment quality. Ammonia nitrogen comes from a wide range of sources, mainly including domestic sewage, industrial wastewater discharge, and agricultural non-point source pollution. The level of ammonia nitrogen in water not only reflects the degree of water pollution, but also affects the health of aquatic ecosystems. When the concentration of ammonia nitrogen is too high, it will have toxic effects on aquatic organisms, especially damage the respiratory system of organisms such as fish, and may also cause eutrophication of water bodies.
[0003] At present, the main methods for determining the ammonia nitrogen content in water environment include spectrophotometry, gas phase molecular absorption spectroscopy, ion selective electrode method, etc. Among them, spectrophotometry is one of the most commonly used methods, including Nessler reagent spectrophotometry and salicylic acid spectrophotometry. Nessler reagent spectrophotometry is a method of generating a light reddish brown complex through the reaction of Nessler reagent with ammonia nitrogen, and its absorbance is proportional to the ammonia nitrogen content, thereby achieving quantitative prediction of ammonia nitrogen. This method has the advantages of simple operation and high sensitivity, but it should be noted that there may be interference factors such as suspended matter and metal ions in the water sample, and pretreatment is required. In addition, methods such as gas phase molecular absorption spectroscopy and ion selective electrode method are also constantly developing and being used, each with its own advantages and scope of application.
[0004] In actual water environment monitoring, accurate determination of ammonia nitrogen content is of great significance for assessing water pollution conditions, formulating pollution prevention and control measures, and protecting aquatic ecosystems.
[0005] Therefore, at present, the ammonia nitrogen content in the water environment is often detected through an online monitoring system. In particular, in the fertilizer industry, papermaking industry, pharmaceutical industry, and even printing and dyeing industry, during the production and processing process, and due to a series of different factors such as production volume and changes in the types of products produced and processed, the ammonia nitrogen content in the discharged wastewater changes frequently. Although the ammonia nitrogen sensor in the online monitoring system is used to detect the ammonia nitrogen content in the water in real time, it is more accurate. However, with the long-term use of the ammonia nitrogen sensor, it is not cleaned and calibrated regularly. Then, the data output by the ammonia nitrogen sensor in the online monitoring system will gradually begin to lose its accuracy, and the ammonia nitrogen sensor will become less and less sensitive to changes in the ammonia nitrogen content in the water, so the final output data will return to stability, and eventually the water discharged will have excessive ammonia nitrogen.
[0006] Therefore, a water environment ammonia nitrogen prediction system is proposed to solve or alleviate the above problems. Summary of the invention
[0007] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a water environment ammonia nitrogen prediction system.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions: A water environment ammonia nitrogen prediction system, comprising a main ammonia nitrogen collection module, a plurality of auxiliary ammonia nitrogen collection modules, a water quality collection module, a data processing module, a control module, and a plurality of lifting modules, wherein the number of the lifting modules is the same as the number of the main ammonia nitrogen collection modules and the auxiliary ammonia nitrogen collection modules, the main ammonia nitrogen collection module, the auxiliary ammonia nitrogen collection module, and the water quality collection module are all arranged on the active end of each lifting module, the control module is coupled to the lifting module, the main ammonia nitrogen collection module, the auxiliary ammonia nitrogen collection module, and the water quality collection module are all coupled to the data processing module, and the data processing module is coupled to the control module; The main ammonia nitrogen collection module collects ammonia nitrogen data and feeds back the data, and when the variance of the ammonia nitrogen data fed back by the main ammonia nitrogen collection module is less than a first threshold, the data processing module determines that the output result of the main ammonia nitrogen collection module is inaccurate; When the output result is inaccurate, the lifting module drives one of the auxiliary ammonia nitrogen collection modules or the water quality collection module to move and collect multiple water body data, and maintains the main ammonia nitrogen collection module after the data processing module forms a compensation model based on the multiple water body data; When the variance of the ammonia nitrogen data corrected by the compensation model fed back by the main ammonia nitrogen collection module is less than the second threshold, the lifting module drives one of the auxiliary ammonia nitrogen collection modules to move and replace the main ammonia nitrogen collection module to collect ammonia nitrogen data in the water and feed it back.
[0009] Preferably, the main ammonia nitrogen collection module and the auxiliary ammonia nitrogen collection module both include an ammonia nitrogen sensor, the lifting module includes an electric push rod, the push rod of the electric push rod is set as the active end of the lifting module, the data processing module includes a processor, and the control module includes a controller.
[0010] Preferably, when the variance of the ammonia nitrogen data fed back by the main ammonia nitrogen collection module is less than the first threshold, the data processing module determines that the output result of the main ammonia nitrogen collection module is inaccurate, including the following steps: The main ammonia nitrogen collection module continuously collects ammonia nitrogen data of the water body at the same time interval and obtains an ammonia nitrogen data set; The ammonia nitrogen data variance is calculated through the ammonia nitrogen data set, and the ammonia nitrogen data variance is compared with the first threshold. If the ammonia nitrogen data variance is greater than the first threshold, the output result of the main ammonia nitrogen acquisition module is judged to be accurate; if the ammonia nitrogen data variance is less than the first threshold, the output result of the main ammonia nitrogen acquisition module is judged to be inaccurate.
[0011] Preferably, when the variance of the ammonia nitrogen data corrected by the compensation model fed back by the main ammonia nitrogen collection module is less than the second threshold, the lifting module drives one of the auxiliary ammonia nitrogen collection modules to move and replace the main ammonia nitrogen collection module to collect ammonia nitrogen data in water and feed it back, including the following steps: The main ammonia nitrogen collection module continuously collects ammonia nitrogen data of the water body at the same time interval and obtains a corrected ammonia nitrogen data set after correction by the compensation model; The corrected ammonia nitrogen data variance is calculated by correcting the ammonia nitrogen data set, and the corrected ammonia nitrogen data variance is compared with the second threshold value. If the corrected ammonia nitrogen data variance is greater than the second threshold value, the main ammonia nitrogen collection module is still maintained in operation. If the corrected ammonia nitrogen data variance is less than the second threshold value, the lifting module drives one of the auxiliary ammonia nitrogen collection modules to move and replace the main ammonia nitrogen collection module to collect ammonia nitrogen data in the water and feedback it.
[0012] Preferably, the method for the water quality acquisition module to collect multiple water body data comprises the following steps: The water quality collection module collects the pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, conductivity, and ammonia nitrogen content of historical water bodies to form a historical data set; Standardize the historical data set to remove outliers; Calculate the Pearson correlation coefficient between each parameter and ammonia nitrogen content, and screen the significantly correlated variables; Establish a multiple linear regression model; The least squares method is used to estimate the regression coefficients, with the goal of minimizing the residual sum of squares; Model fit was assessed by the coefficient of determination; The water quality collection module collects real-time water pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, and conductivity, and imports them into the multivariate linear regression model to output the ammonia nitrogen content as water body data.
[0013] Preferably, the method for establishing the compensation model when collecting multiple water body data through the auxiliary ammonia nitrogen collection module comprises the following steps: Perform difference processing on the ammonia nitrogen content data output by the main ammonia nitrogen collection module and the auxiliary ammonia nitrogen collection module to complete time alignment; The z-score method was used to remove outliers; Assume that the ammonia nitrogen content data output by the main ammonia nitrogen collection module and the auxiliary ammonia nitrogen collection module have a linear relationship; Recursive least squares parameter estimation, initialization parameters; Real-time compensation calculation and sliding window variance detection parameter stability; Carry out residual prediction, calculate dynamic performance indicators, and complete compensation effect evaluation; When the auxiliary ammonia nitrogen collection module is in use, parameter update is performed. When the auxiliary ammonia nitrogen collection module is not in use, the ammonia nitrogen data output by the main ammonia nitrogen collection module is corrected.
[0014] Preferably, the method for establishing the compensation model when collecting multiple water body data through the water quality collection module comprises the following steps: The water quality collection module collects the pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, conductivity, and ammonia nitrogen content of historical water bodies to form a data set; The data set is preprocessed, and outliers are removed using Tukey's Fences method for outlier processing. The input features are Z-score standardized, and the interactive features between sensor readings and other parameters are generated to complete the feature construction. Use the mutual information method to screen key features and retain feature combinations whose mutual information values with the target variable exceed the preset threshold; Construct a gradient boosting decision tree model, whose objective function is defined as the sum of the mean square error between the predicted value and the true value and the decision tree complexity regularization term; Adopt online learning strategy to dynamically update model parameters, and realize incremental model optimization through adaptive learning rate adjustment algorithm; Weighted compensation based on feature importance, outputting the final compensation formula; An error feedback loop is established to perform adaptive parameter adjustments.
[0015] The present invention has the following beneficial effects: In the actual process of detecting water bodies, the present invention mainly uses the main ammonia nitrogen collection module to detect the ammonia nitrogen content in the water body, and outputs the corresponding water body data to the data processing module. However, if the water body data received by the data processing module from the main ammonia nitrogen collection module continues to maintain a certain steady state, it means that the detection accuracy of the main ammonia nitrogen collection module has begun to have problems, and it needs to be cleaned and positioned and calibrated in time. However, at this time, there is no need to disassemble the main ammonia nitrogen collection module, but only needs to control the lifting module through the control module to drive the auxiliary ammonia nitrogen collection module and the water quality collection module to lift and displace, so that the auxiliary ammonia nitrogen collection module or the water quality collection module is displaced and multiple water body data are collected, and a compensation model is formed by multiple water body data collected by the auxiliary ammonia nitrogen collection module or the water quality collection module, so that the ammonia nitrogen content of the water body can still be detected through the main ammonia nitrogen collection module in the future, only The ammonia nitrogen content fed back by the main ammonia nitrogen collection module needs to be corrected by the compensation model to ensure that the ammonia nitrogen content finally output from this system is more accurate. If the ammonia nitrogen data corrected by the compensation model also has the problem of maintaining a certain steady state, then it means that the main ammonia nitrogen collection module can no longer continue to work through the compensation model, but needs to be replaced by another module for detection. Therefore, the lifting module drives one of the auxiliary ammonia nitrogen collection modules to move and replace the main ammonia nitrogen collection module to collect ammonia nitrogen data in the water and feedback it, so that the entire water environment ammonia nitrogen prediction system can continue to detect ammonia nitrogen in the water body. Even if the ammonia nitrogen sensor is not cleaned and positioned and calibrated for a long time, it can continue to work, avoiding the problem that the data output by the ammonia nitrogen sensor in the system will gradually begin to lose its accuracy, and avoiding the problem of excessive ammonia nitrogen in the wastewater discharged in the end. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 It is a structural block diagram of the present invention.
[0018] 1. Main ammonia nitrogen collection module; 2. Auxiliary ammonia nitrogen collection module; 3. Water quality collection module; 4. Data processing module; 5. Control module; 6. Lifting module. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0020] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0022] In the description of the present invention, it should be understood that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the product of the invention is conventionally placed when in use, or are the orientations or positional relationships conventionally understood by those skilled in the art. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0023] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0024] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0025] A water environment ammonia nitrogen prediction system, such as Figure 1As shown, it includes a main ammonia nitrogen collection module 1, several auxiliary ammonia nitrogen collection modules 2, a water quality collection module 3, a data processing module 4, a control module 5, and several lifting modules 6. The main ammonia nitrogen collection module 1 and the auxiliary ammonia nitrogen collection module 2 both include ammonia nitrogen sensors, the lifting module 6 includes an electric push rod, the push rod of the electric push rod is set as the active end of the lifting module 6, the data processing module 4 includes a processor, and the control module 5 includes a controller.
[0026] The number of lifting modules 6 is the same as the number of the main ammonia nitrogen collection module 1 and the auxiliary ammonia nitrogen collection module 2. The main ammonia nitrogen collection module 1, the auxiliary ammonia nitrogen collection module 2, and the water quality collection module 3 are all arranged on the active end of each lifting module 6. The control module 5 is coupled to the lifting module 6. The main ammonia nitrogen collection module 1, the auxiliary ammonia nitrogen collection module 2, and the water quality collection module 3 are all coupled to the data processing module 4, and the data processing module 4 is coupled to the control module 5; The main ammonia nitrogen collection module 1 collects ammonia nitrogen data and feeds back the data. When the variance of the ammonia nitrogen data fed back by the main ammonia nitrogen collection module 1 is less than the first threshold value, the data processing module 4 determines that the output result of the main ammonia nitrogen collection module 1 is inaccurate. When the output result is inaccurate, the lifting module 6 drives one of the auxiliary ammonia nitrogen collection modules 2 or the water quality collection module 3 to move and collect multiple water body data, and after the data processing module 4 forms a compensation model based on the multiple water body data, the main ammonia nitrogen collection module 1 is maintained to work; When the variance of the ammonia nitrogen data corrected by the compensation model fed back by the main ammonia nitrogen collection module 1 is less than the second threshold, the lifting module 6 drives one of the auxiliary ammonia nitrogen collection modules 2 to move and replace the main ammonia nitrogen collection module 1 to collect ammonia nitrogen data in the water and feed it back.
[0027] The core of the system in the present invention lies in the "detection-judgment-compensation-replacement" closed-loop control logic. After the ammonia nitrogen sensor of the main ammonia nitrogen acquisition module 1 continuously collects data, the data processing module 4 evaluates the sensor state by variance calculation to reflect the data volatility. The variance is lower than the threshold, indicating that the sensor is slow to respond and the data tends to be stable. At this time, the system mobilizes the ammonia nitrogen sensor or water quality module of the auxiliary ammonia nitrogen acquisition module 2 through the lifting module 6 to collect multi-source data, uses historical data to build a compensation model, and dynamically corrects the ammonia nitrogen sensor data of the main ammonia nitrogen acquisition module 1. If the corrected data still does not meet the standard, that is, the variance is twice lower than the threshold, the ammonia nitrogen sensor of the main ammonia nitrogen acquisition module 1 is physically replaced, so that the system can achieve long-term stable detection, avoid data inaccuracy due to the failure to clean or calibrate the sensor in time, thereby preventing the wastewater from exceeding the ammonia nitrogen standard.
[0028] Preferably, when the variance of the ammonia nitrogen data fed back by the main ammonia nitrogen collection module 1 is less than the first threshold value, the data processing module 4 determines that the output result of the main ammonia nitrogen collection module 1 is inaccurate, including the following steps: The main ammonia nitrogen collection module 1 continuously collects ammonia nitrogen data of the water body at the same time interval and obtains an ammonia nitrogen data set; The ammonia nitrogen data variance is calculated through the ammonia nitrogen data set, and the ammonia nitrogen data variance is compared with the first threshold. If the ammonia nitrogen data variance is greater than the first threshold, the output result of the main ammonia nitrogen collection module 1 is judged to be accurate; if the ammonia nitrogen data variance is less than the first threshold, the output result of the main ammonia nitrogen collection module 1 is judged to be inaccurate.
[0029] When the variance of the ammonia nitrogen data corrected by the compensation model fed back by the main ammonia nitrogen collection module 1 is less than the second threshold, the lifting module 6 drives one of the auxiliary ammonia nitrogen collection modules 2 to move and replace the main ammonia nitrogen collection module 1 to collect ammonia nitrogen data in water and feed it back, including the following steps: The main ammonia nitrogen collection module 1 continuously collects ammonia nitrogen data of the water body at the same time interval and obtains a corrected ammonia nitrogen data set after correction by the compensation model; The corrected ammonia nitrogen data variance is calculated by correcting the ammonia nitrogen data set, and the corrected ammonia nitrogen data variance is compared with the second threshold value. If the corrected ammonia nitrogen data variance is greater than the second threshold value, the main ammonia nitrogen collection module 1 is still maintained in operation. If the corrected ammonia nitrogen data variance is less than the second threshold value, the lifting module 6 drives one of the auxiliary ammonia nitrogen collection modules 2 to move and replace the main ammonia nitrogen collection module 1 to collect ammonia nitrogen data in the water and feedback it.
[0030] Preferably, the method for the water quality acquisition module 3 to collect multiple water body data comprises the following steps: The water quality collection module 3 collects the pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, conductivity, and ammonia nitrogen content of the historical water body to form a historical data set; Standardize the historical data set to remove outliers. ,in, is the mean, is the standard value; Calculate the Pearson correlation coefficient between each parameter and ammonia nitrogen content, screen the significantly correlated variables, ,reserve The parameters are used as input variables; Establish a multiple linear regression model. ,in, is the ammonia nitrogen concentration, is the intercept of the regression model, They are the regression coefficients of pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, and conductivity. is a random error term, which follows a normal distribution with a mean of 0; The least squares method is used to estimate the regression coefficients, with the goal of minimizing the residual sum of squares. , specifically, , where X is the design matrix and Y is the ammonia nitrogen content vector; By determination coefficient Assessing model fit ,in, This indicates that the model is highly effective; The water quality acquisition module 3 collects the real-time pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, and conductivity of the water body, and imports them into the multivariate linear regression model to output the ammonia nitrogen content as water body data.
[0031] Estimation of regression coefficients by least squares method , the goal is to minimize the residual sum of squares between the predicted value and the true value. Before building the model, data standardization is required to make the mean of each parameter 0 and the variance 1 to eliminate dimensional differences. The Pearson correlation coefficient is used to screen parameters significantly correlated with ammonia nitrogen, eliminate irrelevant variables, and determine the coefficient of Evaluate the goodness of fit of the model to ensure the reliability of the prediction. During real-time monitoring, substitute the current water quality parameters into the model and output the estimated ammonia nitrogen value. Through the above method steps, the chemical detection problem is transformed into a statistical prediction problem, providing an emergency data source when the sensor fails.
[0032] Preferably, the method for establishing the compensation model when collecting multiple water body data through the auxiliary ammonia nitrogen collection module 2 includes the following steps: The ammonia nitrogen content data output by the main ammonia nitrogen collection module 1 and the auxiliary ammonia nitrogen collection module 2 are subjected to difference processing to complete time alignment. ; Use z-score method to remove outliers ; Assuming that the ammonia nitrogen content data output by the main ammonia nitrogen collection module 1 and the auxiliary ammonia nitrogen collection module 2 are linearly related, ,in, The measured value of the main ammonia nitrogen collection module 1 at the kth moment, is the measurement value of auxiliary ammonia nitrogen collection module 2 at the kth moment, and is the time-varying compensation parameter; Recursive least squares parameter estimation, initialization parameters, , parameter update process, ,in, , For the forgetting factor, is the Kalman gain matrix; Real-time compensation calculation And use sliding window variance to detect parameter stability , among which, when Freeze parameter updates when ; Make residual predictions , calculate dynamic performance indicators , complete the compensation effect evaluation; When auxiliary ammonia nitrogen collection module 2 is used, execute parameter update When the auxiliary ammonia nitrogen collection module 2 is not in use, the ammonia nitrogen data output by the main ammonia nitrogen collection module 1 is corrected .
[0033] The compensation model assumes that there is a linear relationship between the outputs of the main and auxiliary sensors, and estimates k and b online through the recursive least squares method. RLS updates parameters iteratively to avoid the resource consumption of traditional batch computing, and the sliding window variance, such as the window size N=100, monitors the stability of parameters k and b. If the variance exceeds the threshold, the model is considered invalid and needs to be retrained. Residual prediction, such as white noise test, verifies the rationality of the model assumptions. Through the above method steps, the system has a certain degree of real-time and adaptability, and can dynamically adjust the compensation coefficient as the characteristics of the ammonia nitrogen sensor change.
[0034] Preferably, the method for establishing the compensation model when collecting multiple water body data through the water quality collection module 3 includes the following steps: The water quality collection module 3 collects the pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, conductivity, and ammonia nitrogen content of the historical water body to form a data set; Preprocess the data set and use Tukey's Fences method to remove outliers for outlier processing , perform Z-score standardization on the input features , generate interactive features between sensor readings and other parameters to complete feature construction ; Use the mutual information method to screen key features and retain feature combinations with mutual information values exceeding the preset threshold with the target variable ; Construct a gradient boosting decision tree model, whose objective function is defined as the sum of the mean square error between the predicted value and the true value and the decision tree complexity regularization term ,in, , For decision tree, is the regularization term; Dynamically update model parameters using online learning strategies , by adaptive learning rate adjustment algorithm Enable incremental model optimization; Weighted compensation based on feature importance , output the final compensation formula ,in, The confidence coefficient of the main ammonia nitrogen collection module 1, ; Creating an Error Feedback Loop , perform parameter adaptive adjustment .
[0035] In the above method steps, multiple weak learners are iteratively trained to gradually reduce the prediction error. The objective function includes a loss function, such as mean square error and regularization terms, such as controlling tree complexity. Each round of iteration generates a new tree to fit the current residual, and the final prediction value is the sum of the outputs of each tree.
[0036] The online learning strategy adopts an adaptive learning rate to balance the convergence speed and stability. The feature importance is calculated through the information gain during statistical splitting. The error feedback loop, such as the moving average error, dynamically adjusts the model hyperparameters, such as the learning rate and tree depth, to form a closed-loop optimization of "prediction, evaluation, and adjustment". This method combines machine learning with modern signal processing technology to achieve high-precision and adaptive ammonia nitrogen concentration compensation.
[0037] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A water environment ammonia nitrogen prediction system, characterized in that: The invention comprises a main ammonia nitrogen collection module (1), a plurality of auxiliary ammonia nitrogen collection modules (2), a water quality collection module (3), a data processing module (4), a control module (5), and a plurality of lifting modules (6); the number of the lifting modules (6) is the same as the number of the main ammonia nitrogen collection modules (1) and the auxiliary ammonia nitrogen collection modules (2); the main ammonia nitrogen collection modules (1), the auxiliary ammonia nitrogen collection modules (2), and the water quality collection modules (3) are all arranged on the active end of each lifting module (6); the control module (5) is coupled to the lifting module (6); the main ammonia nitrogen collection module (1), the auxiliary ammonia nitrogen collection modules (2), and the water quality collection module (3) are all coupled to the data processing module (4); and the data processing module (4) is coupled to the control module (5); The main ammonia nitrogen collection module (1) collects ammonia nitrogen data and feeds back the data, and when the variance of the ammonia nitrogen data fed back by the main ammonia nitrogen collection module (1) is less than a first threshold value, the data processing module (4) determines that the output result of the main ammonia nitrogen collection module (1) is inaccurate; When the output result is inaccurate, the lifting module (6) drives one of the auxiliary ammonia nitrogen collection modules (2) or the water quality collection module (3) to move and collect multiple water body data, and after the data processing module (4) forms a compensation model based on the multiple water body data, the main ammonia nitrogen collection module (1) is maintained in operation; When the variance of the ammonia nitrogen data fed back by the main ammonia nitrogen collection module (1) after correction by the compensation model is less than a second threshold value, the lifting module (6) drives one of the auxiliary ammonia nitrogen collection modules (2) to move and replace the main ammonia nitrogen collection module (1) to collect ammonia nitrogen data in the water and feed it back.
2. A water environment ammonia nitrogen prediction system according to claim 1, characterized in that: The main ammonia nitrogen collection module (1) and the auxiliary ammonia nitrogen collection module (2) both include an ammonia nitrogen sensor, the lifting module (6) includes an electric push rod, the push rod of the electric push rod is arranged as the movable end of the lifting module (6), the data processing module (4) includes a processor, and the control module (5) includes a controller.
3. A water environment ammonia nitrogen prediction system according to claim 1, characterized in that: When the variance of the ammonia nitrogen data fed back by the main ammonia nitrogen collection module (1) is less than a first threshold value, the data processing module (4) determines that the output result of the main ammonia nitrogen collection module (1) is inaccurate, comprising the following steps: The main ammonia nitrogen collection module (1) continuously collects ammonia nitrogen data of the water body at the same time interval and obtains an ammonia nitrogen data set; The ammonia nitrogen data variance is calculated using the ammonia nitrogen data set, and the ammonia nitrogen data variance is compared with a first threshold value. If the ammonia nitrogen data variance is greater than the first threshold value, the output result of the main ammonia nitrogen collection module (1) is judged to be accurate; if the ammonia nitrogen data variance is less than the first threshold value, the output result of the main ammonia nitrogen collection module (1) is judged to be inaccurate.
4. A water environment ammonia nitrogen prediction system according to claim 3, characterized in that: When the variance of the ammonia nitrogen data corrected by the compensation model fed back by the main ammonia nitrogen collection module (1) is less than a second threshold value, the lifting module (6) drives one of the auxiliary ammonia nitrogen collection modules (2) to move and replace the main ammonia nitrogen collection module (1) to collect ammonia nitrogen data in water and feed it back, comprising the following steps: The main ammonia nitrogen collection module (1) continuously collects ammonia nitrogen data of the water body at the same time interval and obtains a corrected ammonia nitrogen data set after correction by the compensation model; The corrected ammonia nitrogen data variance is calculated by correcting the ammonia nitrogen data set, and the corrected ammonia nitrogen data variance is compared with a second threshold value. If the corrected ammonia nitrogen data variance is greater than the second threshold value, the main ammonia nitrogen collection module (1) is still maintained in operation. If the corrected ammonia nitrogen data variance is less than the second threshold value, the lifting module (6) drives one of the auxiliary ammonia nitrogen collection modules (2) to move and replace the main ammonia nitrogen collection module (1) to collect ammonia nitrogen data in water and feedback it.
5. A water environment ammonia nitrogen prediction system according to claim 1, characterized in that: The method for the water quality acquisition module (3) to collect multiple water body data comprises the following steps: The water quality collection module (3) collects historical water body pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, conductivity, and ammonia nitrogen content to form a historical data set; Standardize the historical data set to remove outliers; Calculate the Pearson correlation coefficient between each parameter and ammonia nitrogen content, and screen the significantly correlated variables; Establish a multiple linear regression model; The least squares method is used to estimate the regression coefficients, with the goal of minimizing the residual sum of squares; Model fit was assessed by the coefficient of determination; The water quality acquisition module (3) collects the real-time pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, and conductivity of the water body and imports them into the multivariate linear regression model to output the ammonia nitrogen content as water body data.
6. A water environment ammonia nitrogen prediction system according to claim 1, characterized in that: The method for establishing the compensation model when collecting multiple water body data through the auxiliary ammonia nitrogen collection module (2) comprises the following steps: Performing difference processing on the ammonia nitrogen content data output by the main ammonia nitrogen collection module (1) and the auxiliary ammonia nitrogen collection module (2) to complete time alignment; The z-score method was used to remove outliers; Assume that the ammonia nitrogen content data output by the main ammonia nitrogen collection module (1) and the auxiliary ammonia nitrogen collection module (2) have a linear relationship; Recursive least squares parameter estimation, initialization parameters; Real-time compensation calculation and sliding window variance detection parameter stability; Carry out residual prediction, calculate dynamic performance indicators, and complete compensation effect evaluation; When the auxiliary ammonia nitrogen collection module (2) is in use, parameter update is performed; when the auxiliary ammonia nitrogen collection module (2) is not in use, the ammonia nitrogen data output by the main ammonia nitrogen collection module (1) is corrected.
7. A water environment ammonia nitrogen prediction system according to claim 5 or 6, characterized in that: The method for establishing the compensation model when collecting multiple water body data through the water quality collection module (3) comprises the following steps: The water quality collection module (3) collects historical water body pH value, temperature, dissolved oxygen, chemical oxygen demand, redox potential, nitrate concentration, nitrite concentration, conductivity, and ammonia nitrogen content to form a data set; The data set is preprocessed, and outliers are removed using Tukey's Fences method for outlier processing. The input features are Z-score standardized, and the interactive features between sensor readings and other parameters are generated to complete the feature construction. Use the mutual information method to screen key features and retain feature combinations whose mutual information values with the target variable exceed the preset threshold; Construct a gradient boosting decision tree model, whose objective function is defined as the sum of the mean square error between the predicted value and the true value and the decision tree complexity regularization term; Adopt online learning strategy to dynamically update model parameters, and realize incremental model optimization through adaptive learning rate adjustment algorithm; Weighted compensation based on feature importance, outputting the final compensation formula; An error feedback loop is established to perform adaptive parameter adjustments.
Citation Information
Patent Citations
Aquaculture dissolved oxygen concentration online forecasting method and system
CN102183621A
Ammonia nitrogen / nitrite content prediction system and method for multi-source information fusion in aquaculture environment
CN108647831A
Intelligent aeration setting method for sewage treatment
CN116253446A
Detection method for total nitrogen concentration in aquaculture water and application
CN116754503A
Deepwater drilling overflow early warning device and method
CN119221910A
Cited By
Multi-parameter online collaborative monitoring method in ammonia water production
CN120778990A