CN118183886A - Neural network-based water quality model basic parameter dynamic tuning method and device - Google Patents
Neural network-based water quality model basic parameter dynamic tuning method and device Download PDFInfo
- Publication number
- CN118183886A CN118183886A CN202410171554.1A CN202410171554A CN118183886A CN 118183886 A CN118183886 A CN 118183886A CN 202410171554 A CN202410171554 A CN 202410171554A CN 118183886 A CN118183886 A CN 118183886A
- Authority
- CN
- China
- Prior art keywords
- data
- water quality
- weight
- parameter
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 title claims abstract description 266
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 34
- 206010033307 Overweight Diseases 0.000 claims abstract description 160
- 238000012216 screening Methods 0.000 claims abstract description 76
- 230000007246 mechanism Effects 0.000 claims abstract description 30
- 239000010865 sewage Substances 0.000 claims abstract description 29
- 238000012549 training Methods 0.000 claims abstract description 19
- 238000003860 storage Methods 0.000 claims abstract description 15
- 238000004458 analytical method Methods 0.000 claims abstract description 4
- 238000004062 sedimentation Methods 0.000 claims description 83
- 230000006870 function Effects 0.000 claims description 18
- 230000001364 causal effect Effects 0.000 claims description 15
- 238000001514 detection method Methods 0.000 claims description 15
- 108090000623 proteins and genes Proteins 0.000 claims description 11
- 238000005457 optimization Methods 0.000 claims description 10
- 238000012937 correction Methods 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 7
- 238000003062 neural network model Methods 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000010206 sensitivity analysis Methods 0.000 claims description 4
- 238000011161 development Methods 0.000 claims description 2
- 210000004907 gland Anatomy 0.000 claims description 2
- 230000018109 developmental process Effects 0.000 claims 1
- 238000004422 calculation algorithm Methods 0.000 abstract description 7
- 238000004088 simulation Methods 0.000 abstract description 5
- 238000000556 factor analysis Methods 0.000 abstract description 3
- 230000002068 genetic effect Effects 0.000 abstract description 2
- 238000012544 monitoring process Methods 0.000 abstract 1
- 230000000875 corresponding effect Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 4
- 238000010219 correlation analysis Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- IJGRMHOSHXDMSA-UHFFFAOYSA-N Atomic nitrogen Chemical compound N#N IJGRMHOSHXDMSA-UHFFFAOYSA-N 0.000 description 2
- 238000010220 Pearson correlation analysis Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 101150098499 III gene Proteins 0.000 description 1
- OAICVXFJPJFONN-UHFFFAOYSA-N Phosphorus Chemical compound [P] OAICVXFJPJFONN-UHFFFAOYSA-N 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 229910052757 nitrogen Inorganic materials 0.000 description 1
- 229910052698 phosphorus Inorganic materials 0.000 description 1
- 239000011574 phosphorus Substances 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000001556 precipitation Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000004659 sterilization and disinfection Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- C—CHEMISTRY; METALLURGY
- C02—TREATMENT OF WATER, WASTE WATER, SEWAGE, OR SLUDGE
- C02F—TREATMENT OF WATER, WASTE WATER, SEWAGE, OR SLUDGE
- C02F1/00—Treatment of water, waste water, or sewage
- C02F1/008—Control or steering systems not provided for elsewhere in subclass C02F
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/27—Regression, e.g. linear or logistic regression
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/086—Learning methods using evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- C—CHEMISTRY; METALLURGY
- C02—TREATMENT OF WATER, WASTE WATER, SEWAGE, OR SLUDGE
- C02F—TREATMENT OF WATER, WASTE WATER, SEWAGE, OR SLUDGE
- C02F2209/00—Controlling or monitoring parameters in water treatment
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Biophysics (AREA)
- Computing Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Evolutionary Biology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Chemical & Material Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Hydrology & Water Resources (AREA)
- Environmental & Geological Engineering (AREA)
- Water Supply & Treatment (AREA)
- Physiology (AREA)
- Organic Chemistry (AREA)
- Activated Sludge Processes (AREA)
Abstract
The invention discloses a method, a device, a storage medium and equipment for dynamically adjusting basic parameters of a water quality model based on a neural network, which are characterized in that the method, the device, the storage medium and the equipment are used for dynamically monitoring the adjustment parameters by acquiring historical data of a sewage plant, constructing a mechanism model, acquiring a high-weight factor set and an overall high-weight factor by utilizing the constructed mechanism model, acquiring the high-weight parameters according to the high-weight factor set and the overall high-weight factor training, and further adjusting the parameters of water quality; the screening of the high weight is carried out by adopting single factor analysis and multi-factor comprehensive analysis, and a high weight parameter screening model is formed by utilizing a genetic algorithm and a neural network, so that the weight screening is more comprehensive, and the simulation accuracy is improved; the high weight screening is performed based on historical data, and factors such as weather conditions, seasons and water quantity are added as relevant influence factors to obtain a more accurate parameter adjusting result; when the high weight factors are used for adjusting the parameters, the neural network is utilized, and the accuracy of the parameter adjusting result is improved in a combined way; when the method provided by the invention is used, an algorithm model, such as a high-weight parameter screening model and a parameter adjusting model, is obtained by means of historical data, and can be directly carried out according to real-time data when the method is used later, so that dynamic adjustment is carried out.
Description
Technical Field
The invention relates to the technical field of intelligent control equipment of sewage plants, in particular to a water quality model basic parameter dynamic tuning method, device, storage medium and equipment based on a neural network.
Background
In recent years, with the continuous development of economy and society, the population scale of towns is gradually increased, meanwhile, the demand and quality of urban water resources are also improved, and sewage treatment is used as the last ring of urban water resource circulation, so that the sewage treatment plays a vital role in the water use safety of resident production and life, and is particularly critical in protecting urban water environment and reducing pollution.
In order to better treat sewage, the sewage treatment process needs to be simulated, future process data and effluent data are predicted, and when data abnormality is predicted, the data can be treated in time to ensure that the effluent data meet the requirements.
Current simulations of sewage treatment are largely divided into two categories: the method is characterized in that a machine learning related algorithm is directly used, the input of a model is made of the water inlet data which can be monitored, the output of the model is made of the water outlet data, and a prediction result is obtained by optimizing the algorithm, however, the method generally only needs to predict a single model for one or a plurality of water outlet quality or middle process water quality, and besides, the accuracy of the method is poor and the optimization difficulty is high;
Another approach is to simulate the data by means of a mechanism model, such as an ASM model, which is usually performed by using designed water inflow quality, real-time water inflow amount and monitorable water inflow quality, and intermediate process parameters and water outflow parameters can be simulated, but the designed water inflow quality data are usually quite different from actual data, and in addition, the water inflow characteristics are continuously changed due to factors such as weather conditions and seasons, so that the design data are more difficult to match with the actual data, and the simulation result is difficult to be satisfactory.
Therefore, under the condition, comprehensive consideration is carried out, and the accuracy and the simulation speed can be improved by combining the mechanism model and adjusting the designed inflow water quality, namely the water quality basic parameters which cannot be monitored.
Disclosure of Invention
The invention aims to provide a neural network-based water quality model basic parameter dynamic tuning method, a device, a storage medium and equipment, which aim to solve the technical problems in the background art.
In order to achieve the above purpose, the technical scheme of the invention is as follows:
As a first aspect of the present application, a method for dynamically tuning basic parameters of a water quality model based on a neural network, comprising the steps of:
S1, acquiring historical data of a sewage plant, wherein the historical data comprise historical inflow data, historical inflow water quality data, historical secondary sedimentation tank water yield data, historical secondary sedimentation tank water quality data and related influence factor data;
S2, constructing a mechanism model, and fitting according to the mechanism model and the historical data to obtain secondary sedimentation tank water yield data and secondary sedimentation tank water quality data;
S21, constructing a single-factor high-weight parameter screening model, combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the single-factor high-weight parameter screening model to obtain a first parameter screening result, and obtaining a high-weight factor set according to the first parameter screening result, wherein Gao Quanchong factor sets are related to the water quality parameter data;
S22, constructing an overall high-weight parameter screening model, combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the overall high-weight parameter screening model to obtain a second parameter screening result, and screening and combining according to the second parameter to obtain an overall high-weight factor, wherein the overall high-weight factor is related to related influence factor data;
s3, training according to the high weight factor set and the whole high weight factors to obtain high weight parameters;
s4, obtaining a water quality parameter adjusting result according to the high weight parameter.
Further, the relevant influencing factor data includes one or more of temperature data, humidity data and rainfall data.
Further, the step S21 specifically includes:
S211, reading historical data of the sewage plant and corresponding multiple water quality basic parameters in each piece of historical data;
S212, adjusting each water quality basic parameter according to a set adjustment step length to obtain a plurality of adjustment data results;
s213, judging a plurality of adjustment data results corresponding to each water quality basic parameter, and performing relevance judgment and causal detection on water yield data of the secondary sedimentation tank obtained by fitting;
s214, if the correlation judgment is strong, namely the basic parameters of the water quality are high weight factors;
S215, repeating the steps S212-S214, and counting all obtained high weight factors to obtain a factor set in the high weight.
Further, the relevance judgment is one of a pearson relevance analysis judgment or a sensitivity analysis judgment;
the causal detection is one of a gland causal detection or a bayesian causal detection.
Further, the step S22 specifically includes:
Constructing a multi-objective optimization model, and setting water quality parameters corresponding to each piece of historical data in the multi-objective optimization model to be not more than a set range;
Obtaining water quality data of the secondary sedimentation tank by combining the value of the current water quality basic parameter in the gene with the historical data and the mechanism model fitting, and combining the actual water quality data to perform fitness judgment;
Judging whether the water quality basic parameters are integral high-weight genes or not by judging the numerical value of the fitness result, and obtaining integral high-weight factors by counting a plurality of high-weight genes, wherein the integral high-weight factors correspond to a plurality of water quality basic parameters.
Further, the step S3 specifically includes:
Constructing a first neural network model, taking relevant influence factor data, historical inflow data and historical inflow water quality data as inputs of the neural network, taking the probability of the water quality basic parameter being a high weight factor as output of the neural network, taking a high weight factor set and an overall high weight factor as correction objects, and calculating to obtain a loss function;
and training according to the loss function to obtain high weight parameters.
Further, the step S4 specifically includes:
Constructing a second neural network model, taking the historical inflow and the historical inflow water quality data as the neural network input, and taking the parameter adjusting result as the neural network output;
The water yield data of the secondary sedimentation tank and the water quality data of the secondary sedimentation tank, which are fitted by using the mechanism model, are compared with the water yield data of the real secondary sedimentation tank and the water yield data of the real secondary sedimentation tank to be used as correction, and a loss function is calculated and obtained;
and training according to the calculated loss function to obtain a water quality parameter adjusting result.
As a second aspect of the present application, there is provided a device for dynamically adjusting and optimizing water quality parameters of a sewage plant, comprising:
The data acquisition unit is used for acquiring historical data of the sewage plant, wherein the historical data comprise historical inflow data, historical inflow water quality data, historical secondary sedimentation tank water yield data, historical secondary sedimentation tank water quality data and related influence factor data;
The mechanism model construction unit is used for constructing a mechanism model, and obtaining water yield data of the secondary sedimentation tank and water quality data of the secondary sedimentation tank by combining historical data fitting according to the mechanism model;
The single-factor high-weight parameter screening construction subunit is used for constructing a single-factor high-weight parameter screening model, acquiring a first parameter screening result by combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the single-factor high-weight parameter screening model, and acquiring a high-weight factor set according to the first parameter screening result, wherein Gao Quanchong factor sets are related to the water quality parameter data;
the integral high-weight parameter screening subunit is used for constructing an integral high-weight parameter screening model, acquiring a second parameter screening result by combining the fitted secondary sedimentation tank water yield data and the secondary sedimentation tank water quality data in the integral high-weight parameter screening model, and acquiring integral high-weight factors by screening and combining according to the second parameters, wherein the integral high-weight factors are related to relevant influence factor data;
The high weight parameter calculation unit is used for obtaining high weight parameters according to the high weight factor set and the overall high weight factor training;
And the water quality parameter adjusting unit is used for obtaining a water quality parameter adjusting result according to the high weight parameter.
As a third aspect of the present application, there is provided a storage medium having stored therein at least one instruction loaded and executed by a processor to implement a method for dynamically tuning basic parameters of a water quality model as described above.
As a fourth aspect of the present application, there is provided a computer device, characterized in that the computer device comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the method for dynamically adjusting basic parameters of a water quality model as described above.
For a better understanding and implementation, the present invention is described in detail below with reference to the drawings.
Drawings
FIG. 1 is a flow chart of sewage treatment in a sewage plant in a neural network-based dynamic tuning method for basic parameters of a water quality model in the present embodiment;
FIG. 2 is a flow chart of a method for dynamically tuning basic parameters of a neural network-based water quality model in the present embodiment;
FIG. 3 is a schematic diagram showing the screening of single-factor high-weight parameters in the neural network-based dynamic tuning method for basic parameters of a water quality model in the embodiment;
FIG. 4 is a schematic diagram showing the overall high-weight parameter screening in the neural network-based dynamic tuning method for the basic parameters of the water quality model in the embodiment;
FIG. 5 is a block diagram of the device for dynamically adjusting and optimizing the inflow water quality parameters of the sewage plant in the embodiment;
fig. 6 is a block diagram showing a mechanism model construction unit in the device for dynamically adjusting and optimizing the inflow water quality parameters of the sewage plant in the embodiment.
Detailed Description
In order to better illustrate the present invention, the present invention will be described in further detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the application, are intended to be within the scope of the embodiments of the present application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of embodiments of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims. In the description of the present application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Firstly, as shown in fig. 1, a flow chart of sewage treatment in a sewage plant is shown in fig. 1, sewage enters a primary sedimentation tank from a water inlet end after being treated by set water quality parameters, then sequentially enters an anoxic tank, an anaerobic tank and an aerobic tank for treatment, and then enters a secondary sedimentation tank for disinfection treatment to obtain water.
The sewage treatment flow based on the figure 1 obtains the following data, namely, the data comprises water inflow data, water inflow water quality data, secondary sedimentation tank water outflow data and secondary sedimentation tank water outflow data, and corresponding water inflow water quality data and water outflow data, wherein the data can be obtained through statistics and collection, and the data is used as a data base for realizing dynamic adjustment and optimization of water inflow water quality parameters in the application.
According to the prior art, the basic parameters of water quality include COD, total phosphorus, total nitrogen, PH value and the like, and the non-collectable water quality parameters indicated in the application are manually set parameter data, and are acquired in a non-collecting way, namely, the non-collectable water quality parameters.
Based on the above description of a preferred embodiment, in this embodiment, as shown in fig. 2, as a first aspect of the present application, a method for dynamically optimizing basic parameters of a water quality model based on a neural network includes the following steps:
Firstly, step S1, acquiring historical data of a sewage plant, wherein the historical data comprise historical inflow data, historical inflow water quality data, secondary sedimentation tank historical outflow water quantity data, secondary sedimentation tank historical outflow water quality data and related influence factor data;
the historical data mainly comprises historical water inflow data, historical water inflow water quality data, historical water outflow data of the secondary sedimentation tank, historical water outflow water quality data of the secondary sedimentation tank and historical related influence factor data, wherein the related influence factor data is variable which can influence water inflow and outflow water quality of water inflow and outflow, such as temperature data, humidity data, rainfall data and the like.
S2, constructing a mechanism model, and fitting according to the mechanism model and historical data to obtain secondary sedimentation tank water yield data and secondary sedimentation tank water quality data;
in step S2, two steps are included, as follows:
S21, constructing a single-factor high-weight parameter screening model, combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the single-factor high-weight parameter screening model to obtain a first parameter screening result, and obtaining a high-weight factor set according to the first parameter screening result, wherein Gao Quanchong factor sets are related to the water quality parameter data;
Specifically, the method comprises the following steps:
step S211, reading historical data of the sewage plant and corresponding multiple water quality basic parameters in each piece of historical data;
Step S212, adjusting each water quality basic parameter according to a set adjustment step length to obtain a plurality of adjustment data results;
Step S213, judging a plurality of adjustment data results corresponding to each water quality basic parameter, and performing relevance judgment and causal detection on water yield data of the secondary sedimentation tank obtained by fitting;
Step S214, if the correlation judgment is strong, namely the basic parameters of the water quality are high weight factors;
Step S215, repeating the steps S212-S214, and counting all obtained high weight factors to obtain a factor set in the high weight.
Taking one piece of historical data of a sewage plant as an example, as shown in fig. 3, reading a plurality of water quality basic parameters corresponding to the historical data, adjusting each water quality basic parameter, and adjusting and compensating to be one thousandth of a data range to obtain 1000 pieces of result data of each water quality basic parameter, wherein if m water quality basic parameters exist, 1000 pieces of data are obtained;
And respectively inputting each piece of data of the historical data corresponding to each water quality basic parameter into a mechanism model, wherein the mechanism model generally obtains fitted secondary sedimentation tank water yield data and secondary sedimentation tank water quality data according to a mathematical model established by a treatment flow of a sewage plant on water quality regulation and control. The obtained data correspond to each water quality basic parameter of the historical data: 1000 pieces of water quality basic parameter adjustment data and 1000 pieces of fitting water outlet data, wherein the fitting water outlet data comprises fitting water outlet data of the secondary sedimentation tank and fitting water outlet quality data of the secondary sedimentation tank;
And carrying out correlation analysis and causal detection on the water quality basic parameter adjustment data and the fitting water outlet data corresponding to each water quality basic parameter to obtain whether the water quality basic parameter has stronger correlation or stronger hysteresis correlation on the water outlet data, and if the water quality basic parameter has stronger correlation or stronger hysteresis correlation, obtaining a high weight factor.
Specifically, the correlation analysis may be selected from pearson correlation analysis, sensitivity analysis, and the like, and the causal detection may use a glauch causal detection, and determine whether the water quality data is lag-related to the fitted water outlet data according to the corresponding glauch causal detection.
Counting all the high weight factors into a high weight factor set corresponding to the historical data;
After obtaining one high-weight factor set, repeating the steps to obtain high-weight factor sets corresponding to all the historical data, and if n pieces of historical data exist, n pieces of historical data correspond to n high-weight factor sets, and each high-weight factor set corresponds to a plurality of high-weight factors.
In addition, specifically, the pearson correlation analysis result includes a correlation coefficient r and a significance level p, where the calculation formula of the correlation coefficient r is as follows:
Wherein, X i is used for representing water quality basic parameter data, Y i is used for representing fitting water outlet data, X is used for representing the mean value of the water quality basic parameter data, Y is used for representing the mean value of fitting water outlet data, and the result of the correlation coefficient r represents: r is more than 0.8 and less than or equal to 1.0: extremely strong correlations; r is more than 0.6 and less than or equal to 0.8: strong correlation; r is more than 0.4 and less than or equal to 0.6: medium intensity correlation; r is more than 0.2 and less than or equal to 0.4: weak correlation; r is more than or equal to 0 and less than or equal to 0.2: very weakly correlated or uncorrelated.
The original assumption of significance level p, H 0, is that there is no linear correlation between the two variables r=0, the result representing: p < 0.05: two columns of data are related in significance; p is greater than or equal to 0.05: the two columns of data are independent.
Further, sensitivity analysis generally calculates sensitivity:
Wherein x i is basic parameter data of water quality, and y i is fitted with water outlet data, and the sensitivity judgment principle is as follows: s i,j is less than 0.25, and parameters which have no significant influence on the model output result; s i,j is more than or equal to 0.25 and less than 1, and parameters influencing the model output result; parameters with S i,j being more than or equal to 1 and less than 2 and having larger influence on the model output result;
further, the above-mentioned glaring causal detection includes all the information about the predictions of each of the variables fitted to the water output data y and the water quality data x in the time series of these variables, and the test estimates the regression of:
where the white noise u 1t and u 2t are assumed to be uncorrelated, both assume that the current value is correlated with itself and additional values in the past, thereby yielding a hysteresis correlation between the two.
Step S22, constructing an overall high-weight parameter screening model, combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the overall high-weight parameter screening model to obtain a second parameter screening result, and screening and combining according to the second parameter to obtain an overall high-weight factor, wherein the overall high-weight factor is related to related influence factor data;
Specifically, the step S22 specifically includes:
Constructing a multi-objective optimization model, and setting water quality parameters corresponding to each piece of historical data in the multi-objective optimization model to be not more than a set range;
Obtaining water quality data of the secondary sedimentation tank by combining the value of the current water quality basic parameter in the gene with the historical data and the mechanism model fitting, and combining the actual water quality data to perform fitness judgment;
Judging whether the water quality basic parameters are integral high-weight genes or not by judging the numerical value of the fitness result, and obtaining integral high-weight factors by counting a plurality of high-weight genes, wherein the integral high-weight factors correspond to a plurality of water quality basic parameters.
The overall high-weight screening is to combine a plurality of water quality basic parameters into a whole and analyze whether the interaction of the overall parameters is a high-weight parameter, and it should be noted that after the overall high-weight screening combines a plurality of water quality basic parameters into a whole, the overall high-weight screening determines whether the influence factors of the high-weight parameters are single, so that the influence of relevant influence factor data, namely, variables such as temperature data, humidity data and rainfall data which possibly influence the water quality of water inlet and outlet, should be considered in the overall high-weight screening, and the flow is shown in the following figure 4 on the basis of the above.
The screening method uses NSGA III (super multi-objective optimization) to screen out the whole high weight parameter for each piece of historical data;
Specifically, the NSGA III gene is whether the current water quality basic parameter is a high weight parameter or not and the value of the current water quality basic parameter data; when the population is initialized, each water quality basic parameter is guaranteed to be possibly high-weight parameters; the constraint condition is that each water quality basic parameter cannot exceed the data range; when the fitness is calculated, a gap between the fitting water outlet data and the real water outlet data needs to be obtained, and specifically, a variance can be used as a fitness result.
When the fitness is calculated, the water yield data of the secondary sedimentation tank and the water quality data of the water discharged from the secondary sedimentation tank are fitted by utilizing the value of the current water quality basic parameter data in the genes and the historical data and by means of a mechanism model to serve as fitting water outlet data. And finally obtaining the gene with the highest fitness in the NSGA III algorithm, namely obtaining the overall high weight factor corresponding to the historical data, wherein if n pieces of historical data exist, n pieces of overall high weight factors correspond to the n pieces of historical data, and each overall high weight factor corresponds to a plurality of water quality basic parameters.
S3, training according to the high weight factor set and the whole high weight factors to obtain high weight parameters;
Specifically, a first neural network model is built, relevant influence factor data, historical inflow data and historical inflow water quality data are used as inputs of the neural network, the probability that the water quality basic parameter is a high weight factor is the output of the neural network, a high weight factor set and the whole high weight factor are used as correction objects, and a loss function is calculated and obtained;
and training according to the loss function to obtain high weight parameters.
The single-factor high-weight parameter screening can obtain a high-weight factor set corresponding to each piece of historical data, and the whole high-weight factor corresponding to each piece of historical data can be obtained through the whole high-weight parameter screening, and the two high-weight factors are integrated into a high-weight factor set, namely, each piece of historical data corresponds to one high-weight factor set, and meanwhile, each piece of historical data corresponds to different relevant influence factor data, namely, weather data such as temperature, humidity and rainfall and the like.
Taking relevant influence factor data, historical inflow data and historical inflow water quality data as inputs of a neural network, wherein the output of the neural network is the probability that all water quality basic parameters are high weight factors; the data set is proportionally divided into a training set and a testing set, the parameters of which are trained, and the high weight factor set is used as correction to calculate the loss function of the data set. Specifically, the neural network model thereof can adopt LSTM as a basic model.
After training is completed, the high weight parameters only need to be screened out by using the screening model in the subsequent real-time use process.
And S4, obtaining a water quality parameter adjusting result according to the high weight parameter.
Specifically, by constructing a second neural network model, the historical inflow and the historical inflow water quality data are input as a neural network, and the parameter adjusting result is output as the neural network;
The water yield data of the secondary sedimentation tank and the water quality data of the secondary sedimentation tank, which are fitted by using the mechanism model, are compared with the water yield data of the real secondary sedimentation tank and the water yield data of the real secondary sedimentation tank to be used as correction, and a loss function is calculated and obtained;
and training according to the calculated loss function to obtain a water quality parameter adjusting result.
The parameter adjusting module is mainly used for adjusting and optimizing by obtaining the high weight parameters obtained in the high weight screening module, and taking the historical inflow and the historical inflow water quality data as the input of the neural network and the parameter adjusting result as the output of the neural network; and training parameters, fitting the water yield data of the secondary sedimentation tank and the water quality data of the secondary sedimentation tank by using a mechanism model, and comparing the water yield data of the real secondary sedimentation tank and the water yield data of the real secondary sedimentation tank as correction so as to calculate a loss function of the secondary sedimentation tank. Specifically, the parameter tuning model can be performed by adopting LSTM-ATTENTION-SVR.
In summary, in the embodiment, first, the method provided by the invention can be used for screening the high weight factors in real time, and carrying out parameter adjustment on the high weight factors, so that the parameter adjustment results can be stored in real time, the parameter adjustment data can be dynamically monitored, and the change condition and trend of the parameters which cannot be monitored can be perceived;
secondly, the high-weight screening is carried out by adopting single-factor analysis and multi-factor comprehensive analysis instead of single-factor analysis, and a high-weight parameter screening model is formed by utilizing a genetic algorithm and a neural network, so that the weight screening is more comprehensive, and the simulation accuracy is improved;
Thirdly, the high weight screening is performed based on historical data, and factors such as weather conditions, seasons and water quantity are added as relevant influence factors, so that a more accurate parameter adjusting result is obtained;
fourth, the neural network is utilized when the high weight factors are used for adjusting the parameters, and the accuracy of the parameter adjusting result is improved in a combined way;
Fifthly, when the method provided by the invention is used, an algorithm model, such as a high-weight parameter screening model and a parameter adjusting model, is obtained by means of historical data, and can be directly carried out according to real-time data when the method is used later, so that dynamic adjustment is carried out;
Sixth, the water inflow and water inflow quality data are predicted through the water inflow prediction model and the water inflow quality prediction model, meanwhile, the future parameter adjustment result can be predicted by combining the high-weight parameter screening model and the parameter adjustment model, the future water outflow situation can be predicted by means of the parameter adjustment result, whether abnormal situations possibly exist in the future or not can be judged according to the predicted data, and accordingly countermeasure measures, process section adjustment and the like are timely proposed.
In addition, the present embodiment also relates to prediction of future parameters, according to the data adopted by parameter tuning in the present embodiment, i.e. the historical data, and the inflow water quality data part in the historical data is usually set manually when the method of the present embodiment is not adopted, so that prediction of future inflow water quality parameter tuning can be realized when the adjustment of inflow water quality data is manually participated.
For example, water inflow data is acquired from an original data acquisition module;
preprocessing the raw data of the inflow, supplementing missing data, and eliminating extreme data and noise data;
Acquiring influence factor data, carrying out correlation analysis and causal detection on the data and the preprocessed water inflow data, and incorporating the data with strong correlation into exogenous variables;
Training the processed water inflow data and exogenous variable data as the input of a neural network, taking the predicted water inflow data as the output, and dividing the input data set into a training set, a verification set and a test set, wherein the proportion is 8:1:1, a step of;
and predicting future water consumption data according to training results of the neural network.
Specifically, the influence factor data includes weather factor data including temperature, humidity, and precipitation amount data, holiday factor data including judgment data of whether it is a workday, whether it is a rest day, and whether it is a large holiday, and special event factor data, and is performed using the ANFIS-atention-SVR as a base model.
As a second aspect of the present application, there is provided a device 100 for dynamically adjusting and optimizing water quality parameters of a sewage plant, as shown in fig. 5, comprising:
the data acquisition unit 10 is used for acquiring historical data of the sewage plant, wherein the historical data comprises historical water inflow data, historical water inflow quality data, historical water outflow data of the secondary sedimentation tank, historical water outflow quality data of the secondary sedimentation tank and related influence factor data;
The mechanism model construction unit 11 is used for constructing a mechanism model, and obtaining secondary sedimentation tank water yield data and secondary sedimentation tank water quality data according to the mechanism model and historical data fitting;
The single-factor high-weight parameter screening construction subunit 111 is configured to construct a single-factor high-weight parameter screening model, combine the fitted secondary sedimentation tank water yield data and secondary sedimentation tank water quality data in the single-factor high-weight parameter screening model to obtain a first parameter screening result, and obtain a high-weight factor set according to the first parameter screening result, where Gao Quanchong factor sets are related to water quality parameter data;
The overall high weight parameter screening subunit 112 is configured to construct an overall high weight parameter screening model, combine the fitted secondary sedimentation tank water yield data and secondary sedimentation tank water quality data in the overall high weight parameter screening model to obtain a second parameter screening result, and screen and combine according to the second parameter to obtain an overall high weight factor, where the overall high weight factor is related to relevant influence factor data;
a high weight parameter calculation unit 12, configured to obtain a high weight parameter according to the high weight factor set and the overall high weight factor training;
And the water quality parameter adjusting unit 13 is used for obtaining a water quality parameter adjusting result according to the high weight parameter.
As a third aspect of the present application, there is provided a storage medium having stored therein at least one instruction loaded and executed by a processor to implement a method for dynamically tuning basic parameters of a water quality model as described above.
As a fourth aspect of the present application, there is provided a computer device, characterized in that the computer device comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the method for dynamically adjusting basic parameters of a water quality model as described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash memory (flashRAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transitorymedia), such as modulated data signals and carrier waves.
Variations and modifications to the above would be obvious to persons skilled in the art to which the invention pertains from the foregoing description and teachings. Therefore, the invention is not limited to the specific embodiments disclosed and described above, but some modifications and changes of the invention should be also included in the scope of the claims of the invention. In addition, although specific terms are used in the present specification, these terms are for convenience of description only and do not limit the present invention in any way.
Claims (10)
1. A neural network-based dynamic optimization method for basic parameters of a water quality model is characterized by comprising the following steps:
S1, acquiring historical data of a sewage plant, wherein the historical data comprise historical inflow data, historical inflow water quality data, historical secondary sedimentation tank water yield data, historical secondary sedimentation tank water quality data and related influence factor data;
S2, constructing a mechanism model, and fitting according to the mechanism model and the historical data to obtain secondary sedimentation tank water yield data and secondary sedimentation tank water quality data;
S21, constructing a single-factor high-weight parameter screening model, combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the single-factor high-weight parameter screening model to obtain a first parameter screening result, and obtaining a high-weight factor set according to the first parameter screening result, wherein Gao Quanchong factor sets are related to the water quality parameter data;
S22, constructing an overall high-weight parameter screening model, combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the overall high-weight parameter screening model to obtain a second parameter screening result, and screening and combining according to the second parameter to obtain an overall high-weight factor, wherein the overall high-weight factor is related to related influence factor data;
s3, training according to the high weight factor set and the whole high weight factors to obtain high weight parameters;
s4, obtaining a water quality parameter adjusting result according to the high weight parameter.
2. The method for dynamically adjusting and optimizing basic parameters of water quality model according to claim 1, wherein the method comprises the following steps:
the relevant influencing factor data includes one or more of temperature data, humidity data and rainfall data.
3. The method for dynamically adjusting and optimizing the basic parameters of the water quality model according to claim 1, wherein the step S21 specifically comprises:
S211, reading historical data of the sewage plant and corresponding multiple water quality basic parameters in each piece of historical data;
S212, adjusting each water quality basic parameter according to a set adjustment step length to obtain a plurality of adjustment data results;
s213, judging a plurality of adjustment data results corresponding to each water quality basic parameter, and performing relevance judgment and causal detection on water yield data of the secondary sedimentation tank obtained by fitting;
s214, if the correlation judgment is strong, namely the basic parameters of the water quality are high weight factors;
S215, repeating the steps S212-S214, and counting all obtained high weight factors to obtain a factor set in the high weight.
4. The method for dynamically adjusting and optimizing basic parameters of water quality model according to claim 1, wherein the method comprises the following steps:
the relevance judgment is one of a pearson relevance analysis judgment or a sensitivity analysis judgment;
the causal detection is one of a gland causal detection or a bayesian causal detection.
5. The method for dynamically adjusting and optimizing basic parameters of a water quality model according to claim 1, wherein the step S22 specifically comprises:
Constructing a multi-objective optimization model, and setting water quality parameters corresponding to each piece of historical data in the multi-objective optimization model to be not more than a set range;
Obtaining water quality data of the secondary sedimentation tank by combining the value of the current water quality basic parameter in the gene with the historical data and the mechanism model fitting, and combining the actual water quality data to perform fitness judgment;
Judging whether the water quality basic parameters are integral high-weight genes or not by judging the numerical value of the fitness result, and obtaining integral high-weight factors by counting a plurality of high-weight genes, wherein the integral high-weight factors correspond to a plurality of water quality basic parameters.
6. The method for dynamically adjusting and optimizing basic parameters of a water quality model according to claim 1, wherein the step S3 specifically comprises:
Constructing a first neural network model, taking relevant influence factor data, historical inflow data and historical inflow water quality data as inputs of the neural network, taking the probability of the water quality basic parameter being a high weight factor as output of the neural network, taking a high weight factor set and an overall high weight factor as correction objects, and calculating to obtain a loss function;
and training according to the loss function to obtain high weight parameters.
7. The method for dynamically adjusting and optimizing basic parameters of a water quality model according to claim 1, wherein the step S4 specifically comprises:
Constructing a second neural network model, taking the historical inflow and the historical inflow water quality data as the neural network input, and taking the parameter adjusting result as the neural network output;
The water yield data of the secondary sedimentation tank and the water quality data of the secondary sedimentation tank, which are fitted by using the mechanism model, are compared with the water yield data of the real secondary sedimentation tank and the water yield data of the real secondary sedimentation tank to be used as correction, and a loss function is calculated and obtained;
and training according to the calculated loss function to obtain a water quality parameter adjusting result.
8. The utility model provides a sewage plant quality of water parameter developments accent excellent device which characterized in that includes:
The data acquisition unit is used for acquiring historical data of the sewage plant, wherein the historical data comprise historical inflow data, historical inflow water quality data, historical secondary sedimentation tank water yield data, historical secondary sedimentation tank water quality data and related influence factor data;
The mechanism model construction unit is used for constructing a mechanism model, and obtaining water yield data of the secondary sedimentation tank and water quality data of the secondary sedimentation tank by combining historical data fitting according to the mechanism model;
The single-factor high-weight parameter screening construction subunit is used for constructing a single-factor high-weight parameter screening model, acquiring a first parameter screening result by combining the fitted secondary sedimentation tank water yield data and the fitted secondary sedimentation tank water quality data in the single-factor high-weight parameter screening model, and acquiring a high-weight factor set according to the first parameter screening result, wherein Gao Quanchong factor sets are related to the water quality parameter data;
the integral high-weight parameter screening subunit is used for constructing an integral high-weight parameter screening model, acquiring a second parameter screening result by combining the fitted secondary sedimentation tank water yield data and the secondary sedimentation tank water quality data in the integral high-weight parameter screening model, and acquiring integral high-weight factors by screening and combining according to the second parameters, wherein the integral high-weight factors are related to relevant influence factor data;
The high weight parameter calculation unit is used for obtaining high weight parameters according to the high weight factor set and the overall high weight factor training;
And the water quality parameter adjusting unit is used for obtaining a water quality parameter adjusting result according to the high weight parameter.
9. A storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the method of dynamic tuning of water quality model base parameters of any one of claims 1 to 7.
10. A computer device comprising a processor and a memory having stored therein at least one instruction that is loaded and executed by the processor to implement the method of dynamic tuning of base parameters of a water quality model as claimed in any one of claims 1 to 7. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410171554.1A CN118183886A (en) | 2024-02-07 | 2024-02-07 | Neural network-based water quality model basic parameter dynamic tuning method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410171554.1A CN118183886A (en) | 2024-02-07 | 2024-02-07 | Neural network-based water quality model basic parameter dynamic tuning method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118183886A true CN118183886A (en) | 2024-06-14 |
Family
ID=91397315
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410171554.1A Pending CN118183886A (en) | 2024-02-07 | 2024-02-07 | Neural network-based water quality model basic parameter dynamic tuning method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118183886A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118428703A (en) * | 2024-07-05 | 2024-08-02 | 浪潮智慧科技有限公司 | Irrigation demand prediction method, equipment and medium for irrigation area |
CN118838168A (en) * | 2024-06-25 | 2024-10-25 | 扬州大学 | Sewage treatment aeration control method and system based on artificial intelligence and mechanism model |
-
2024
- 2024-02-07 CN CN202410171554.1A patent/CN118183886A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118838168A (en) * | 2024-06-25 | 2024-10-25 | 扬州大学 | Sewage treatment aeration control method and system based on artificial intelligence and mechanism model |
CN118428703A (en) * | 2024-07-05 | 2024-08-02 | 浪潮智慧科技有限公司 | Irrigation demand prediction method, equipment and medium for irrigation area |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Wang et al. | A deep learning based dynamic COD prediction model for urban sewage | |
CN118183886A (en) | Neural network-based water quality model basic parameter dynamic tuning method and device | |
Pisa et al. | LSTM-based wastewater treatment plants operation strategies for effluent quality improvement | |
CN107949814A (en) | System and method for waste water treatment process control | |
CN115356930B (en) | A multi-objective optimization control system and method in sewage treatment process | |
Wang et al. | A full-view management method based on artificial neural networks for energy and material-savings in wastewater treatment plants | |
KR100920522B1 (en) | Sewage Treatment Process Diagnosis and Control System and Method | |
CN117388457B (en) | A method for improving the prediction accuracy of sewage treatment plant effluent by coupling hydraulic retention time | |
CN113268929B (en) | Short-term load interval prediction method and device | |
CN117389142A (en) | Prediction deduction and safe real-time control method for biochemical reaction tank of sewage treatment plant | |
CN116090678B (en) | Data processing method, device and equipment | |
CN118042786A (en) | Data center machine room environment regulation and control method and device and electronic equipment | |
CN117829655A (en) | Sewage treatment plant water inflow quality prediction method based on causal inference | |
CN116956156A (en) | Sewage treatment intelligent aeration method and system based on artificial intelligence | |
CN118878109B (en) | Aeration control method, system, equipment and medium based on support vector regression machine | |
Yu et al. | Enhancing the effluent prediction accuracy with insufficient data based on transfer learning and LSTM algorithm in WWTPs | |
Zhang et al. | Scenario based municipal wastewater estimation: development and application of a dynamic simulation model | |
CN112085459B (en) | Wind power project investment estimation method and device | |
Monday et al. | Incremental machine learning and genetic algorithm for optimization and dynamic aeration control in wastewater treatment plants | |
Bu et al. | An attempt to augment performance of machine learning models in a pilot-scale urban wastewater treatment system | |
CN113627687A (en) | Water supply amount prediction method based on ARIMA-LSTM combined model | |
Juuso et al. | Intelligent analysers and dynamic simulation in a biological water treatment process | |
Kim et al. | A systematic approach to data-driven modeling and soft sensing in a full-scale plant | |
Juuso | Hybrid models in dynamic simulation of a biological water treatment process | |
Li et al. | Innovative multistep and synchronous soft sensing prediction of COD and NH3 in WWTPs via multimodal data and multiple attention mechanisms |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |