Storage, sewage treatment process ATP prediction method, device and equipment
Through the integration of neural network model and particle swarm PSO algorithm, the problem of ATP online measurement during sewage treatment is solved, high-precision prediction of ATP is achieved, the characteristics of activated sludge are obtained, and the real-time monitoring and control capabilities of sewage treatment are improved. .
Patent Information
- Application Number
- CN202110172902.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-02-08
AI Technical Summary
The prior art cannot realize the online measurement of ATP during sewage treatment, which affects the effective acquisition of activated sludge characteristics and real-time monitoring of sewage treatment conditions.
The integrated neural network model is adopted to pre-process data by selecting characteristic variables in the wastewater treatment process, and dynamically adjusting the inertia weights using the particle swarm PSO algorithm to establish an ATP prediction model to achieve high-precision prediction of ATP.
The online measurement and high-precision prediction of ATP during sewage treatment are realized, the characteristics of activated sludge are obtained, and the real-time monitoring and control capabilities of sewage treatment are improved.
Smart Images

Figure CN114913933B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sewage treatment, and in particular to an ATP prediction method and device for a sewage treatment process. Background Art
[0002] The activated sludge method is one of the commonly used treatment methods in the sewage treatment process. Its principle is to use the metabolic capacity of microorganisms to degrade organic pollutants in sewage. The change of sludge biological activity in the biochemical unit directly affects the effect of sewage treatment. Therefore, the detection of microbial activity in activated sludge is an effective means to master the sewage treatment capacity. Adenosine triphosphate (ATP) is a high-energy compound produced in the process of microbial energy conversion. It releases a large amount of energy during hydrolysis. It is the most direct source of energy in organisms and one of the important means to reflect the life activities of microorganisms. When the influent water quality changes or the concentration of toxic substances changes sharply, the microorganisms in the sludge will be dormant and their biological activity will also decrease. However, ATP is a sign of the life and vitality of microbial cells. The activity of microorganisms can be indirectly reflected through ATP, and then the metabolic status of microorganisms can be obtained. Therefore, ATP is also used as one of the important parameters reflecting the activity of microorganisms in the sewage treatment process.
[0003] ATP detection methods usually include color reaction, fluorescence, chemiluminescence or isotope methods. The chemiluminescence method for detecting ATP is based on the efficient luminescence reaction of luciferase catalyzing the oxidation of luciferin and consuming ATP to emit photons. The above detection methods are all obtained through laboratory analysis and cannot be directly obtained online. Although ATP is an effective sludge activity detection tool, the ATP detection process is complicated and ATP detection has not been widely used. Currently, few sewage treatment plants use ATP to determine the treatment status of sewage.
[0004] With the advancement of science and technology, soft measurement detection methods based on neural networks continue to emerge, and soft measurement methods can greatly improve the detection efficiency of ATP. At present, the soft measurement research on ATP is still in its infancy, and the process variables related to ATP cannot be fully mastered. Further experimental exploration is needed to obtain relevant process variables.
[0005] Compared with ATP, which can reflect the activity of microorganisms, the sludge volume index (SVI) is a key indicator to characterize the looseness and sedimentation performance of the biochemical unit sludge in the sewage treatment process, and is also an important basis for judging whether the sludge has expanded. The high or low SVI value can also reflect the activity of the sludge to a certain extent. Therefore, most sewage treatment plants judge the activity of the sludge by detecting the SVI concentration value, and use the SVI concentration value as one of the means to identify and predict sludge expansion. However, judging the properties of activated sludge by SVI is often not accurate enough because it contains inactive substances that are not related to water purification. However, ATP can measure the number of microorganisms and the activity of the cells themselves, and can more truly reflect the characteristics of activated sludge. At the same time, many research results show that there is a certain relationship between SVI and ATP. The changes in SVI concentration values and ATP are of great significance for exploring the activity of sludge in the sewage treatment process.
[0006] Chinese patent CN102494979B discloses a soft measurement method for sludge settling volume index SVI. This prior art uses a soft measurement method based on a self-organizing RBF neural network to solve the problem that the sludge settling volume index SVI cannot be measured online during sewage treatment. The self-organizing RBF neural network is used to perform online soft measurement of the sludge settling volume index SVI during sewage treatment, thereby ensuring the normal operation of sewage treatment and providing timely monitoring parameters for closed-loop control of the sewage treatment process. Although this solution takes into account the soft measurement of SVI, it does not involve the prediction of ATP.
[0007] Therefore, there is an urgent need for an ATP prediction method for sewage treatment processes in order to better obtain the characteristics of activated sludge in sewage treatment processes.
[0008] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0009] The purpose of the present invention is to provide an ATP prediction method for a sewage treatment process, which can effectively obtain the characteristics of activated sludge in the sewage treatment process, adopt key variables closely related to ATP, establish an ATP prediction model, and realize soft measurement of ATP.
[0010] Another object of the present invention is to achieve effective training and learning of the ATP prediction model through an algorithm model, thereby further improving the accuracy of ATP prediction.
[0011] To achieve the above-mentioned purpose, according to the first aspect of the present invention, the present invention provides an ATP prediction method for a sewage treatment process, comprising the following steps: selecting characteristic variables of the ATP of the sewage treatment process and performing data preprocessing on the characteristic variables; using the characteristic variables after data preprocessing as the input of the first subnetwork of the prediction model and obtaining the SVI prediction result; using the SVI prediction result and the characteristic variables as the input of the second subnetwork of the prediction model and obtaining the ATP prediction result.
[0012] Furthermore, in the above technical solution, the method also includes the following steps: after establishing the prediction model, dynamically adjusting the inertia weight through the particle swarm PSO algorithm to realize the training of the prediction model.
[0013] Furthermore, in the above technical scheme, the characteristic variables may include: inlet COD concentration, effluent COD concentration, biochemical pool MLSS concentration, biochemical pool DO concentration, inlet ammonia nitrogen concentration, effluent ammonia nitrogen concentration, biochemical pool sulfide concentration, biochemical pool volatile phenol concentration, inlet BOD concentration and / or effluent BOD concentration.
[0014] Furthermore, in the above technical solution, data preprocessing may include abnormal data removal, data normalization and / or principal component analysis of characteristic variables.
[0015] Furthermore, in the above technical solution, the prediction model may be an ATP prediction model based on an integrated neural network.
[0016] Furthermore, in the above technical solution, the topological structure of the first sub-network can be divided into a first input layer, a first hidden layer and a first output layer, and the connection mode of the three layers is expressed as: nJ-1;
[0017] The expression of the first input layer is: u(t) = [u 1 (t),u 2 (t),u 3 (t),...,u n (t)] T , formula (1);
[0018] Where n is the number of neurons in the first input layer, that is, the number of input variables; u(t) is the concentration value of the input variable of the first sub-network at time t;
[0019] The first hidden layer contains J neurons, and the output of the jth hidden layer neuron is:
[0020]
[0021] Among them, c 1j (t) is the center vector of the jth neuron in the first sub-network, σ 1j (t) is the width of the jth neuron in the first sub-network;
[0022] The neuron expression of the first output layer is:
[0023]
[0024] Among them, w 1 (t) is the connection weight vector between the first hidden layer and the first output layer; θ 1 (t) is the output vector of the first hidden layer neuron; θ 1j (t) is the output of the jth hidden layer neuron; w 1j (t) is the connection weight between the jth hidden layer neuron and the output neuron; y 1 (t) is the output SVI prediction value of the first sub-network at time t.
[0025] Furthermore, in the above technical solution, the topological structure of the second sub-network can be divided into a second input layer, a second hidden layer and a second output layer, and the connection mode of the three layers is expressed as: n+1-Q-1;
[0026] The expression of the second input layer is:
[0027] u 2q (t)=[u 1 (t),u 2 (t),u 3 (t),...,u n (t), y 1 (t)] T , formula (4);
[0028] Where n is the number of neurons in the first input layer, that is, the number of input variables; u 1 (t) is the concentration value of the first input variable of the first sub-network at time t; y 1 (t) is the output SVI prediction value of the first sub-network at time t; u 2q (t) is the input variable of the qth neuron in the second sub-network;
[0029] The second hidden layer contains Q neurons, and the output of the qth hidden layer neuron is:
[0030]
[0031] Among them, c 2q (t) is the center vector of the qth neuron in the second sub-network; σ 2q (t) is the width of the qth neuron in the second sub-network;
[0032] The neuron expression of the second output layer is:
[0033]
[0034] Among them, w 2 (t) is the connection weight vector between the second hidden layer and the second output layer, θ 2 (t) is the output vector of the second hidden layer neurons; θ 2q (t) is the output of the qth hidden layer neuron; w 2q (t) is the connection weight between the qth hidden layer neuron and the output neuron; y 2 (t) is the output ATP prediction value of the second sub-network at time t.
[0035] Furthermore, in the above technical solution, the training of the prediction model is based on the error function, and the particle swarm PSO algorithm can be used to perform iterative calculations until the calculation result of the error function is within the ideal error range; the error function is:
[0036]
[0037] Where M is the number of training samples; y 2d (t) is the expected output of ATP of the second sub-network at time t; y 2 (t) is the actual ATP output of the second sub-network at time t; e(t) is the error of the ATP prediction model at time t.
[0038] Furthermore, in the above technical solution, the iterative calculation by the particle swarm PSO algorithm can be specifically as follows:
[0039] The position update of the i-th particle is expressed as: i (k+1)=x i (k)+v i (k+1) Formula (8);
[0040] The velocity update of the i-th particle is expressed as:
[0041]
[0042] Among them, ω(k) is the inertia weight; ε 1 and ε 2 is the learning factor; R 1 and R 2 is a random value between [0,1]; p i (k) is the historical optimal position of the particle at the kth iteration; g d (k) is the global optimal position found by the entire population in the kth iteration; x i (k) is the position of the i-th particle at the k-th iteration; v i (k) is the velocity of the i-th particle at the k-th iteration;
[0043] The dynamic inertia weight update of the i-th particle is expressed as:
[0044]
[0045]
[0046] Among them, ω i (k) is the inertia weight of the i-th particle at the k-th iteration; B i (k+1) is the inertia factor of the i-th particle at the k+1th iteration; p i (k+1) is the historical optimal position of the i-th particle at the k+1th iteration; h(p i (k+1)) is the fitness value of the i-th particle at the k+1th iteration; g d (k+1) is the global optimal position found by the entire population in the k+1th iteration; x i (k+1) is the position of the i-th particle at the k+1th iteration.
[0047] Furthermore, in the above technical solution, based on the calculation of the error function, the accuracy of the prediction model is further evaluated by the prediction accuracy P, and the calculation formula of the prediction accuracy P is:
[0048]
[0049] Among them, N is the number of samples predicted, y 2d (t) is the expected ATP output of the second sub-network at time t; y 2 (t) is the actual ATP output of the second sub-network at time t.
[0050] To achieve the above-mentioned purpose, according to the second aspect of the present invention, the present invention provides an ATP prediction device for a sewage treatment process, comprising: a variable selection and preprocessing module, used to select characteristic variables of the ATP of the sewage treatment process and perform data preprocessing on the characteristic variables; an SVI prediction module, used to use the characteristic variables after data preprocessing as the input of the first sub-network of the prediction model and obtain the SVI prediction result; an ATP prediction module, used to use the SVI prediction result and the characteristic variables as the input of the second sub-network of the prediction model and obtain the ATP prediction result.
[0051] Furthermore, in the above technical solution, the device also includes: a prediction model training module, which is used to dynamically adjust the inertia weight through a particle swarm PSO algorithm after the prediction model is established to achieve prediction model training.
[0052] To achieve the above objective, according to a third aspect of the present invention, the present invention provides a memory including an instruction set, wherein the instruction set is suitable for a processor to execute the steps in the aforementioned ATP prediction method for a sewage treatment process.
[0053] To achieve the above-mentioned purpose, according to the fourth aspect of the present invention, the present invention provides an ATP prediction device for a sewage treatment process, comprising a bus, an input device, an output device, a processor and the aforementioned memory; the bus is used to connect the memory, the input device, the output device and the processor; the input device and the output device are used to realize interaction with a user; the processor is used to execute an instruction set in the memory.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] 1) The ATP prediction method for sewage treatment process of the present invention solves the problem that the prior art cannot realize online measurement of ATP in sewage treatment process, and can be used to predict and obtain the characteristics of activated sludge in sewage treatment process with high accuracy;
[0056] 2) For characteristic variables that are difficult to measure directly and are closely related to ATP, the first sub-network of the integrated neural network is used to obtain the SVI prediction value, and then the second sub-network is used to predict ATP, which can make the prediction result more accurate;
[0057] 3) After the prediction model is established, the self-organizing particle swarm optimization (PSO) algorithm is used to train and learn the prediction model, especially by dynamically adjusting the inertia weight to further improve the prediction speed and accuracy.
[0058] Further features and aspects of the present invention will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0060] Figure 1 This is a schematic diagram of the process of ATP prediction method for sewage treatment process according to Example 1 of the present invention;
[0061] Figure 2 Schematic diagram of the structure of the ATP prediction model based on the integrated neural network of the present invention;
[0062] Figure 3 Schematic diagram of comparison between actual output value and expected output value of ATP prediction model in Embodiment 2 of the present invention (specific example of Method Embodiment 1);
[0063] Figure 4 It is a structural schematic diagram of the ATP prediction device for the sewage treatment process of the present invention;
[0064] Figure 5It is a schematic diagram of the structure of the ATP prediction device for the sewage treatment process of the present invention. DETAILED DESCRIPTION
[0065] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.
[0066] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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. 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. Unless otherwise expressly stated, throughout the specification and claims, the term "including" or its variations such as "comprising" or "including" will be understood to include the stated elements or components, without excluding other elements or other components.
[0067] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0068] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can also be implemented without certain specific details. In some examples, methods, means, and elements well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.
[0069] Example 1
[0070] In order to more accurately obtain the characteristics of activated sludge in the sewage treatment process, the present invention proposes a sewage treatment process ATP prediction method, which uses an integrated neural network method to achieve ATP prediction. First, the method of the present invention selects parameters that are easy to obtain online (i.e., characteristic variables) as input variables of the integrated neural network; then, for variables that are difficult to measure directly and are closely related to ATP, the sub-network of the integrated neural network is used to achieve SVI online prediction; after the prediction model is established, the training and learning of the soft measurement model is achieved based on the self-organizing particle swarm optimization (PSO) algorithm; finally, the prediction of ATP in the sewage treatment process is achieved.
[0071] like Figure 1 As shown, the ATP prediction method for sewage treatment process of the present invention in Example 1 specifically includes the following steps:
[0072] Step S101, select characteristic variables of ATP in the sewage treatment process and perform data preprocessing on these characteristic variables. Specifically, the inlet and outlet water parameters and related process parameters in the biochemical unit of the sewage treatment process can be obtained through online instruments, and these parameters include but are not limited to: inlet COD (chemical oxygen demand) concentration, outlet COD concentration, biochemical pool MLSS (mixed liquor suspended solids) concentration, biochemical pool DO (dissolved oxygen) concentration, inlet ammonia nitrogen concentration, outlet ammonia nitrogen concentration, biochemical pool sulfide concentration, biochemical pool volatile phenol concentration, inlet BOD (biochemical oxygen demand) concentration, outlet BOD concentration, etc. The data of all the parameters (i.e. characteristic variables) obtained are subjected to data preprocessing operations. Data preprocessing includes but is not limited to: eliminating abnormal data, which can be done by making a box plot of the variable data and deleting the abnormal values shown in the plot; normalizing the data, normalizing the variables to values between 0 and 1, and eliminating the impact of differences in dimensions and orders of magnitude on the model training process; using principal component analysis to analyze the collected parameters and obtain variables related to ATP as input variables of the prediction model.
[0073] Step S102, establish an ATP prediction model for the sewage treatment process, use the characteristic variables that have undergone data preprocessing as the input of the first sub-network of the prediction model and obtain the SVI prediction result. Specifically, the prediction model of the present invention is an ATP prediction model based on an integrated neural network, and the integrated neural network is divided into two sub-networks, namely the first sub-network and the second sub-network. Figure 2 .
[0074] The topological structure of the first sub-network is divided into the first input layer, the first hidden layer and the first output layer. The connection mode of the three layers can be expressed as: nJ-1;
[0075] The expression of the first input layer is: u(t) = [u 1 (t),u 2 (t),u 3 (t),...,u n (t)] T , formula (1);
[0076] Where n is the number of neurons in the first input layer (i.e. Figure 2 The left vertical column of neurons in the first sub-network in the t-th sub-network is the number of input variables; u(t) is the concentration value of the input variable of the first sub-network at time t, for example Figure 2 COD, DO, MLSS concentration, etc.
[0077] The first hidden layer contains J neurons (i.e. Figure 2 The output of the jth hidden layer neuron can be expressed as:
[0078]
[0079] Among them, c 1j (t) is the center vector of the jth neuron in the first sub-network, σ 1j (t) is the width of the jth neuron in the first sub-network.
[0080] The neurons in the first output layer (i.e. Figure 2 The expression of a single neuron on the right side of the first sub-network is:
[0081]
[0082] Among them, w 1 (t) is the connection weight vector between the first hidden layer and the first output layer; θ 1 (t) is the output vector of the first hidden layer neuron; θ 1j (t) is the output of the jth hidden layer neuron; w 1j (t) is the connection weight between the jth hidden layer neuron and the output neuron; y 1 (t) is the output SVI prediction value of the first sub-network at time t.
[0083] At this point, the first subnetwork of the ATP prediction model of the present invention can obtain the SVI prediction result by using the selected feature variables as the input of the first subnetwork of the model, such as Figure 2 shown.
[0084] Step S103, the SVI prediction result obtained in step S102 and the aforementioned selected characteristic variables are used as inputs of the second sub-network of the prediction model and the ATP prediction result is obtained. Specifically, the topological structure of the second sub-network is divided into a second input layer, a second hidden layer and a second output layer, and the connection mode of the three layers is expressed as: n+1-Q-1, where n+1 indicates that in addition to the number of input variables n of the aforementioned first sub-network, it also includes an SVI prediction value of the output of the first sub-network.
[0085] The expression of the second input layer is:
[0086] u 2q (t)=[u 1 (t),u 2 (t),u 3 (t),...,u n (t), y 1 (t)] T , formula (4);
[0087] Where n is the number of neurons in the first input layer (the input of the first sub-network is also used as the input of the second sub-network), that is, the number of input variables; u(t) is the concentration value of the input variable of the first sub-network at time t; y 1 (t) is the output SVI prediction value of the first sub-network at time t. The neurons in the second input layer are Figure 2 The left vertical column of neurons in the second sub-network (n+1 in total).
[0088] The second hidden layer contains Q neurons (i.e. Figure 2 The output of the qth hidden layer neuron is:
[0089]
[0090] Among them, c 2q (t) is the center vector of the qth neuron in the second sub-network; σ 2q (t) is the width of the qth neuron in the second sub-network.
[0091] The neurons in the second output layer (i.e. Figure 2 The expression of a single neuron on the right side of the second sub-network is:
[0092]
[0093] Among them, w 2 (t) is the connection weight vector between the second hidden layer and the second output layer, θ 2 (t) is the output vector of the second hidden layer neurons; θ 2q (t) is the output of the qth hidden layer neuron; w 2q (t) is the connection weight between the qth hidden layer neuron and the output neuron; y 2 (t) is the output ATP prediction value of the second sub-network at time t.
[0094] At this point, the second sub-network of the ATP prediction model of the present invention can use the SVI prediction value output by the first sub-network and all the inputs of the first sub-network as the input of the second sub-network of the model, and finally obtain the ATP prediction result, such as Figure 2 shown.
[0095] Step S104, after the prediction model of step S103 is established, the prediction model can be trained by the particle swarm PSO algorithm. The self-organizing PSO algorithm based on dynamic inertia weight of the present invention can more effectively improve the convergence speed and accuracy of the PSO algorithm by dynamically adjusting the inertia weight. The training of the prediction model is based on the error function, and the particle swarm PSO algorithm is used to perform iterative calculations until the calculation result of the error function is within the ideal error range. The error function can be expressed as:
[0096]
[0097] Where M is the number of training samples; y 2d (t) is the expected output of ATP of the second sub-network at time t (i.e., the measured value of ATP); y 2 (t) is the actual ATP output of the second sub-network at time t (i.e., the output value of the ATP prediction model); e(t) is the error of the ATP prediction model at time t.
[0098] The calculation process of the particle swarm PSO algorithm adopted in the present invention is as follows:
[0099] The particle swarm algorithm is used to train the ATP prediction model based on the integrated neural network. The parameters of the integrated neural network are represented as particles in the particle swarm, which is specifically expressed as:
[0100] x i =[c 2q,i ,σ 2q,i ,w 2q,i , c 2q,i ,σ 2q,i ,w 2q,i ...c 2q,i ,σ 2q,i ,w 2q,i ]
[0101] Among them, x i represents the position of the ith particle, c 2q,i is the central value of the qth neuron in the second subnetwork of the ith particle; σ 2q,i is the width of the qth neuron in the second subnetwork of the ith particle; w 2q,i is the connection weight of the qth neuron in the second sub-network of the ith particle.
[0102] The position update of the i-th particle can be expressed as:
[0103] x i (k+1)=x i (k)+v i (k+1) Formula (8);
[0104] The velocity update of the i-th particle can be expressed as:
[0105]
[0106] Among them, ω(k) is the inertia weight; ε 1 and ε 2 is the learning factor; R 1 and R 2 is a random value between [0,1]; pi (k) is the historical optimal position of the particle at the kth iteration; g d (k) is the global optimal position found by the entire population in the kth iteration; x i (k) is the position of the i-th particle at the k-th iteration; v i (k) is the velocity of the i-th particle at the k-th iteration;
[0107] The dynamic inertia weight update of the i-th particle is expressed as:
[0108]
[0109]
[0110] Among them, ω i (k) is the inertia weight of the i-th particle at the k-th iteration; B i (k+1) is the inertia factor of the i-th particle at the k+1th iteration; p i (k+1) is the historical optimal position of the i-th particle at the k+1th iteration; h(p i (k+1)) is the fitness value of the i-th particle at the k+1th iteration; g d (k+1) is the global optimal position found by the entire population in the k+1th iteration; x i (k+1) is the position of the i-th particle at the k+1th iteration.
[0111] After the model training of the above PSO algorithm, the performance of the prediction model can be evaluated by calculating the two indicators of model prediction error e(t) and prediction accuracy P. The calculation formula of prediction accuracy P is:
[0112]
[0113] Among them, N is the number of samples predicted, y 2d (t) is the expected ATP output of the second sub-network at time t; y 2 (t) is the actual ATP output of the second sub-network at time t.
[0114] The ATP prediction method for sewage treatment process of the present invention solves the problem that the prior art cannot realize online measurement of ATP in sewage treatment process, and can be used to predict and obtain the characteristics of activated sludge in sewage treatment process with high precision. For characteristic variables that are difficult to measure directly and are closely related to ATP, after obtaining the SVI prediction value by using the sub-network of the integrated neural network, the prediction of ATP is realized, which can make the prediction result more accurate. After the prediction model is established, the self-organizing particle swarm optimization (PSO) algorithm is used to realize the training and learning of the prediction model, and the prediction speed and accuracy are further improved by dynamically adjusting the inertia weight.
[0115] Example 2
[0116] Embodiment 2 of the present invention is a specific example of method embodiment 1.
[0117] First, the inlet and outlet water parameters and related process parameters in the biochemical unit during the sewage treatment process are obtained through online instruments, including the following 10 parameters: inlet COD concentration, effluent COD concentration, biochemical pool MLSS concentration, biochemical pool DO concentration, inlet ammonia nitrogen concentration, effluent ammonia nitrogen concentration, biochemical pool sulfide concentration, biochemical pool volatile phenol concentration, inlet BOD concentration, and effluent BOD concentration. All the acquired variable data are preprocessed to remove abnormal data; the data are normalized; the principal component analysis method is used to reduce the dimension of the collected data. Based on the correlation coefficient and contribution rate of the variables, it can be obtained that there are 7 input variables: inlet COD concentration, biochemical pool MLSS concentration, biochemical pool DO concentration, biochemical pool sulfide concentration, biochemical pool volatile phenol concentration, inlet BOD concentration, and effluent BOD concentration. The output variable to be collected is the ATP concentration value. 200 groups of data are selected from all the collected data and divided into two parts: 100 groups are used as training samples, and the other 100 groups are used as test samples.
[0118] Secondly, the ATP prediction model of the sewage treatment process of Example 1 of the present invention is established. The connection mode of the first sub-network topology structure nJ-1 is 7-12-1, at this time J=12, and the output value of the first sub-network (i.e., the SVI prediction value) can be calculated by formula (1) to formula (3) in Example 1. The connection mode of the second sub-network topology structure n+1-Q-1 is 8-15-1, at this time Q=15, and the output value of the second sub-network (i.e., the ATP prediction value) can be calculated by formula (4) to formula (6) in Example 1.
[0119] Then, the ATP prediction model is trained by the self-organizing PSO algorithm. The specific steps of training are as follows: ① Set the population size to 20, set the maximum number of iterations of the error function in Example 1 (i.e., Formula 7) to 10,000, and the PSO algorithm runs independently 30 times on the error function. Randomly initialize the position, velocity, and inertia weight of each particle in the particle swarm, and set the initial position of each particle to the current historical optimal position, and take the optimal value in the particle swarm as the global optimal position; ② According to the error function, calculate the error function value of each particle. Compare the error function value of each particle with the current global optimal position g d (k) If it is better, update g d (k), at the same time, the error function value of each particle is compared with the current historical optimal position p i (t) If it is better, update p i(t). ③ Update the position x of the particle in the particle swarm according to the speed update formula (Formula 9 in Example 1) and the position update formula (Formula 8 in Example 1). i (k) and speed v i (k); ④ Calculate the error function value of the particle's current position and update the historical optimal position p i (t) and the global optimal position g d (k), according to the global optimal position g d (k) and the particle's position x i (k) Calculate the value of the inertia weight of the current iteration (Formula 10 and Formula 11 in Example 1); ⑤ When the number of iterations reaches the maximum number of iterations, the algorithm stops, outputs the optimal parameter value (i.e., the ATP prediction value), and completes the model training.
[0120] Finally, the test data is tested. The prediction error results of the ATP prediction model are as follows: Figure 3 shown. Figure 3 is the ATP prediction result, the X-axis is the input sample point; the Y-axis is the ATP prediction curve, the solid line is the expected output value, and the dotted line is the actual ATP output value of the integrated neural network. The present invention performs ATP prediction based on the integrated neural network and the RBF neural network respectively. Table 1 shows the comparison error and accuracy of ATP prediction based on the integrated neural network and ATP prediction based on the RBF neural network. It can be seen from Table 1 that the error and accuracy of ATP prediction are within a reasonable range, and the prediction error of the integrated neural network is smaller and the prediction accuracy is higher.
[0121] Table 1 Prediction results of different neural networks
[0122]
[0123] Example 3
[0124] like Figure 4 As shown, the ATP prediction device for the sewage treatment process of this embodiment is a device corresponding to the prediction method in Example 1, that is, the method in Example 1 is implemented by means of a virtual device, and the various virtual modules constituting the ATP prediction device for the sewage treatment process can be executed by electronic devices, such as network devices, terminal devices, or servers.
[0125] The ATP prediction device for sewage treatment process provided in this embodiment specifically includes a variable selection and preprocessing module 201, an SVI prediction module 202 and an ATP prediction module 203. Among them, the variable selection and preprocessing module 201 is used to select the characteristic variables of the ATP of the sewage treatment process and perform data preprocessing on these characteristic variables; the SVI prediction module 202 is used to use the characteristic variables after data preprocessing as the input of the first sub-network of the prediction model and obtain the SVI prediction result; the ATP prediction module 203 is used to use the SVI prediction result and the characteristic variables as the input of the second sub-network of the prediction model and obtain the ATP prediction result.
[0126] Furthermore, the ATP prediction device for a sewage treatment process of the present invention may also include a prediction model training module, which is used to dynamically adjust the inertia weight through a particle swarm PSO algorithm after the prediction model is established to achieve prediction model training.
[0127] Example 4
[0128] This embodiment provides a memory, which can be a non-transitory (non-volatile) computer storage medium, and the computer storage medium stores computer executable instructions. The computer executable instructions can execute the various steps of the ATP prediction method for the sewage treatment process in any of the above-mentioned method embodiments and achieve the same technical effect.
[0129] Example 5
[0130] This embodiment provides an ATP prediction device for a sewage treatment process. The memory included in the device includes a corresponding computer program product. When the program instructions included in the computer program product are executed by a computer, the computer can execute the ATP prediction method for the sewage treatment process described in the above aspects and achieve the same technical effect.
[0131] Figure 5 FIG. 1 is a schematic diagram of the hardware structure of the electronic device in this embodiment. Figure 5 As shown, the device includes one or more processors 610 and a memory 620. Taking one processor 610 as an example, the device may also include: an input device 630 and an output device 640.
[0132] The processor 610, the memory 620, the input device 630 and the output device 640 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0133] The memory 620 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor 610 executes various functional applications and data processing of the electronic device by running the non-transitory software programs, instructions, and modules stored in the memory 620, that is, the processing method of the above method embodiment is implemented.
[0134] The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data, etc. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 620 may optionally include a memory remotely arranged relative to the processor 610, and these remote memories may be connected to the processing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0135] The input device 630 can receive input digital or character information and generate signal input. The output device 640 can include a display device such as a display screen.
[0136] The one or more modules are stored in the memory 620, and when executed by the one or more processors 610, the following is performed: the ATP prediction method for the sewage treatment process of the present invention. The above-mentioned product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting ATP in sewage treatment process. It is characterized in that The steps include: Select characteristic variables of ATP in the sewage treatment process and perform data preprocessing on the characteristic variables; the characteristic variables include: influent COD concentration, effluent COD concentration, biochemical pool MLSS concentration, biochemical pool DO concentration, influent ammonia nitrogen concentration, effluent ammonia nitrogen concentration, biochemical pool sulfide concentration, biochemical pool volatile phenol concentration, influent BOD concentration and / or effluent BOD concentration; Using the feature variables after the data preprocessing as the input of the first sub-network of the prediction model and obtaining the SVI prediction result; Using the SVI prediction result and the characteristic variable as inputs of the second sub-network of the prediction model and obtaining the ATP prediction result; After the prediction model is established, the inertia weight is dynamically adjusted by the particle swarm PSO algorithm to realize the training of the prediction model; the prediction model is an ATP prediction model based on an integrated neural network; The iterative calculation by particle swarm PSO algorithm is as follows: The position update of the i-th particle is expressed as: i (k+1)=x i (k)+v i (k+1) formula (8); The velocity update of the i-th particle is expressed as: Among them, ω(k) is the inertia weight; ε 1 and ε 2 is the learning factor; R 1 and R 2 is a random value between [0,1]; p i (k) is the historical optimal position of the particle at the kth iteration; g d (k) is the global optimal position found by the entire population in the kth iteration; x i (k) is the position of the i-th particle at the k-th iteration; v i (k) is the velocity of the i-th particle at the k-th iteration; The dynamic inertia weight update of the i-th particle is expressed as: Among them, ω i (k) is the inertia weight of the i-th particle at the k-th iteration; B i (k+1) is the inertia factor of the i-th particle at the k+1th iteration; p i (k+1) is the historical optimal position of the i-th particle at the k+1th iteration; h(p i (k+1)) is the fitness value of the i-th particle at the k+1th iteration; g d (k+1) is the global optimal position found by the entire population in the k+1th iteration; x i (k+1) is the position of the i-th particle at the k+1th iteration.
2. The ATP prediction method for sewage treatment process according to claim 1, It is characterized in that The data preprocessing includes abnormal data removal, data normalization and / or principal component analysis of the characteristic variables.
3. The ATP prediction method for sewage treatment process according to claim 1, It is characterized in that The topological structure of the first sub-network is divided into a first input layer, a first hidden layer and a first output layer, and the connection mode of the three layers is expressed as: nJ-1; The expression of the first input layer is: u(t) = [u 1 (t),u 2 (t),u 3 (t),...,u n (t)] T , formula (1); Wherein, n is the number of neurons in the first input layer, that is, the number of input variables; u(t) is the concentration value of the input variable of the first sub-network at time t; The first hidden layer contains J neurons, and the output of the jth hidden layer neuron is: Among them, c 1j (t) is the center vector of the jth neuron in the first sub-network, σ 1j (t) is the width of the jth neuron in the first sub-network; The neuron expression of the first output layer is: Among them, w 1 (t) is the connection weight vector between the first hidden layer and the first output layer; θ 1 (t) is the output vector of the first hidden layer neuron; θ 1j (t) is the output of the jth hidden layer neuron; w 1j (t) is the connection weight between the jth hidden layer neuron and the output neuron; y 1 (t) is the output SVI prediction value of the first sub-network at time t.
4. The ATP prediction method for sewage treatment process according to claim 3, It is characterized in that The topological structure of the second sub-network is divided into a second input layer, a second hidden layer and a second output layer, and the connection mode of the three layers is expressed as: n+1-Q-1; The expression of the second input layer is: u 2q (t) = [u 1 (t), u 2 (t), u 3 (t),..., u n (t), y 1 (t)] T , formula (4); Where n is the number of neurons in the first input layer, that is, the number of input variables; u 1 (t) is the concentration value of the first input variable of the first sub-network at time t; y 1 (t) is the output SVI prediction value of the first sub-network at time t; u 2q (t) is the input variable of the qth neuron in the second sub-network; The second hidden layer contains Q neurons, and the output of the qth hidden layer neuron is: Among them, c 2q (t) is the center vector of the qth neuron in the second sub-network; σ 2q (t) is the width of the qth neuron in the second sub-network; The neuron expression of the second output layer is: Among them, w 2 (t) is the connection weight vector between the second hidden layer and the second output layer, θ 2 (t) is the output vector of the second hidden layer neurons; θ 2q (t) is the output of the qth hidden layer neuron; w 2q (t) is the connection weight between the qth hidden layer neuron and the output neuron; y 2 (t) is the output ATP prediction value of the second sub-network at time t.
5. The ATP prediction method for sewage treatment process according to claim 4, It is characterized in that The training of the prediction model is based on the error function, and the particle swarm PSO algorithm is used to perform iterative calculations until the calculation result of the error function is within the ideal error range; the error function is: Where M is the number of training samples; y 2d (t) is the expected output of ATP of the second sub-network at time t; y 2 (t) is the actual ATP output of the second sub-network at time t; e(t) is the error of the ATP prediction model at time t.
6. The ATP prediction method for sewage treatment process according to claim 5, It is characterized in that Based on the calculation of the error function, the accuracy of the prediction model is further evaluated by the prediction accuracy P, and the calculation formula of the prediction accuracy P is: Among them, N is the number of samples predicted, y 2d (t) is the expected ATP output of the second sub-network at time t; y 2 (t) is the actual ATP output of the second sub-network at time t.
7. An ATP prediction device for sewage treatment process, It is characterized in that The method according to any one of claims 1 to 6 comprises: A variable selection and preprocessing module is used to select characteristic variables of ATP in the sewage treatment process and perform data preprocessing on the characteristic variables; An SVI prediction module, used to use the feature variables after the data preprocessing as the input of the first sub-network of the prediction model and obtain the SVI prediction result; An ATP prediction module, used to use the SVI prediction result and the characteristic variable as inputs of the second sub-network of the prediction model and obtain the ATP prediction result; The prediction model training module is used to dynamically adjust the inertia weight through the particle swarm PSO algorithm after the prediction model is established to realize the training of the prediction model.
8. A memory, It is characterized in that It comprises an instruction set, wherein the instruction set is suitable for a processor to execute the steps in the ATP prediction method for a sewage treatment process as claimed in any one of claims 1 to 6.
9. An ATP prediction device for sewage treatment process, It is characterized in that comprising a bus, an input device, an output device, a processor and a memory as claimed in claim 8; The bus is used to connect the memory, input device, output device and processor; The input device and the output device are used to realize interaction with the user; The processor is configured to execute an instruction set in the memory.
