Event-triggered nitrate nitrogen concentration prediction control method in sewage treatment process
Through the deep belief network model and the second optimization control law triggered by events, the precise prediction and control of the nitrogen concentration of the sewage treatment process is realized, the problem of unstable water quality out of the water outlet is improved, and the operating efficiency and environmental protection of the sewage treatment plant have been improved performance.
Patent Information
- Application Number
- CN202411469849.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-24
AI Technical Summary
The effluent water quality during sewage treatment is unstable and it is difficult to control the nitrate nitrogen concentration.
Design a nitrogen concentration prediction model triggered by events, use the deep belief network model to model and predict the change characteristics of nitrate nitrogen concentration, and build a model prediction control through the optimal solution problem based on the control law based on the second optimization function. frame.
The precise modeling and prediction of the nitrogen concentration of the sewage treatment process is realized, the control accuracy of the water quality state is improved, and it provides technical support for optimizing operation and low -carbon emission reduction for sewage treatment plants.
Smart Images

Figure CN119358402A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence-enabled smart water treatment technology, and specifically relates to an event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process. Background Art
[0002] In the sewage treatment process, the important indicator to measure the performance of the operation is the effluent water quality. A well-functioning sewage treatment system must have stable and up-to-standard effluent water quality, among which the nitrate nitrogen concentration is a water quality parameter that needs to be focused on. However, the actual sewage treatment process is a complex dynamic system with strong nonlinearity, strong coupling, and event-driven characteristics, involving the interaction of chemical, physical, and biological reactions. Therefore, it is a challenging problem to achieve predictive control of the nitrate nitrogen concentration in the effluent of the sewage treatment process. Summary of the invention
[0003] The present invention aims at the problem that the effluent water quality of the sewage treatment process is unstable and difficult to control, and proposes an event-triggered prediction and control method for nitrate nitrogen concentration in the sewage treatment process. First, an event-triggered nitrate nitrogen concentration prediction model is designed to model and predict the changing characteristics of nitrate nitrogen concentration. Secondly, according to the one-step prediction output result of the prediction model for nitrate nitrogen concentration, the optimal solution problem of the nitrate nitrogen control law based on the quadratic optimization function is constructed to form a model prediction and control framework. Finally, based on the nitrate nitrogen data in the actual operation of the sewage treatment plant, the proposed prediction and control method is tested, analyzed and optimized, thereby realizing the control of nitrate nitrogen concentration in the sewage treatment process. The present invention uses event triggering to accurately model and predict the nitrate nitrogen state of the sewage treatment process, and constructs a model prediction and control method based on the predicted value, thereby improving the control accuracy of the water quality state of the sewage treatment process and providing technical support for the optimized operation of the sewage treatment plant and low-carbon emission reduction.
[0004] To achieve the above object, the present invention provides the following scheme: an event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process, comprising the following steps:
[0005] Step S1: collecting actual operation data of the sewage treatment plant, wherein the operation data includes nitrate nitrogen concentration and associated variables; and establishing a deep belief network model based on the operation data;
[0006] Step S2: defining events using the changing trend and characteristics of the deep belief network model training error, and constructing a parameter update model of the deep belief network model triggered by events;
[0007] Step S3: Taking the output and control law of the event-triggered deep belief network model as independent variables, constructing a loss function based on the target water quality tracking error, and solving the optimal control law based on the loss function; thereby obtaining an event-triggered predictive control model;
[0008] Step S4: Evaluating the predictive control model of nitrate nitrogen concentration using evaluation performance indicators.
[0009] Further preferably, in step S1, the associated variables include: total phosphorus concentration, biochemical oxygen demand concentration, ammonia nitrogen concentration, phosphate concentration, suspended solids concentration, sludge settling volume, chemical oxygen demand and water temperature.
[0010] Further preferably, the deep belief network model is composed of a plurality of sequentially stacked restricted Boltzmann machines;
[0011] The training process of the restricted Boltzmann machine is the process of weight parameter initialization and supervised learning of the restricted Boltzmann machine; the equivalent mapping relationship of the training process of the restricted Boltzmann machine is expressed as:
[0012]
[0013] In the formula, x and w represent the input and weight parameters respectively; h represents the feature vector extracted from the input data; Γ() is a function that characterizes the nonlinear mapping relationship between nitrate nitrogen concentration and associated variables; represents the predicted nitrate nitrogen concentration;
[0014] When the first restricted Boltzmann machine is given, the update formula of the initial weight parameter ω1(t) of the first restricted Boltzmann machine is as follows:
[0015] ω1(t+1)=ω1(t)-γΔω1(t),
[0016] in,
[0017] In the formula, γ represents the learning rate of unsupervised learning of the initial weight parameters; E(x i h j )and Respectively represent the initial state and equilibrium state of the input layer and hidden layer of the restricted Boltzmann machine; t represents the training data stream label;
[0018] Based on the initial weight parameters, the optimal values of the weight parameters are obtained through supervised learning:
[0019]
[0020] in,
[0021] Where y(t) and η represent the expected output and the learning rate of supervised learning of weight parameters, respectively; ω * Represents the optimal initial weight parameter.
[0022] Further preferably, in step S2, the parameters of the error variation trend include:
[0023] ε λ (t) = e(t) - e(t - λ),
[0024]
[0025] In the formula, λ represents the hysteresis factor;
[0026] Property definition events include:
[0027]
[0028] In the formula, E1, E2, E3, and E4 represent four events respectively. Event E1 means that the training error is getting smaller and smaller, and the downward trend is becoming more and more obvious; Event E2 means that the training error is getting smaller and smaller, and the downward trend is becoming slower and slower; Event E3 means that the training error is getting bigger and bigger, and the upward trend is becoming more and more obvious; Event E4 means that the training error and its downward trend change irregularly; Represents the state based on training error;
[0029] When different events are triggered, the parameter update model of the deep belief network model triggered by the event includes:
[0030]
[0031] w(t+1)=w(t),Otherwise,
[0032] Where 0<η2<η1<1 represents the learning rate under different learning strategies.
[0033] Further preferably, the loss function in step S3 includes:
[0034]
[0035] Among them, Δu(t)=u(t+1)-u(t), |Δu(t)|≤Δu max ,
[0036] In the formula, h p and h u Represent the prediction range and control range respectively; i represents the order number of summation within the prediction range; j represents the order number of summation within the control range; superscript T represents matrix transposition; r() represents the expected concentration of nitrate nitrogen; represents the predicted nitrate nitrogen concentration; u() represents the control variable; G i and H j represents two quadratic constant matrices; Δu max is the upper limit of the control law increment.
[0037] Further preferably, the optimal control law in step S3 is solved using a gradient descent algorithm:
[0038]
[0039] In the formula, κ represents the learning rate of the optimization solution process;
[0040] The sequence of the optimal control law is expressed as:
[0041]
[0042] Where G and H represent the quadratic coefficients of the prediction term and the control term, respectively.
[0043] Further preferably, the evaluation index in step S4 includes:
[0044]
[0045] Where, t d -t0 represents the width of the sample data stream; r() represents the expected concentration of nitrate nitrogen; Represents the predicted nitrate-nitrogen concentration.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] (1) Aiming at the problem of unstable effluent quality and changeable working conditions in sewage treatment process, the present invention proposes an event-triggered sewage treatment process effluent water quality state approximation and prediction model. The event-triggered water quality approximation and prediction model can define events according to the changing trend and characteristics of training errors, and characterize the non-stationarity and multi-working conditions of water quality state with event jump characteristics, thereby realizing accurate modeling and prediction of water quality state under non-stationary state.
[0048] (2) Aiming at the problem that water quality is difficult to accurately control under non-steady operating conditions, the present invention proposes a predictive control framework based on an event-triggered model. Compared with the existing water quality state control method, the event-triggered model predictive control can not only accurately establish a dynamic relationship between water quality prediction information and control laws, but also dynamically solve the control law sequence in the form of rolling optimization, thereby achieving accurate tracking and control of water quality states. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0050] Figure 1 This is a schematic diagram of a flow chart of a method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process triggered by an event according to an embodiment of the present invention;
[0051] Figure 2 This is a schematic diagram of nitrogen and phosphorus removal in a sewage treatment process according to an embodiment of the present invention;
[0052] Figure 3 This is a schematic diagram of a closed-loop control framework for nitrate nitrogen concentration in a sewage treatment process according to an embodiment of the present invention;
[0053] Figure 4 A distribution diagram of triggering events in a deep belief network training process triggered by an event in an embodiment of the present invention;
[0054] Figure 5 A schematic diagram of the prediction results and errors of the nitrate nitrogen concentration of the deep belief network triggered by an event in an embodiment of the present invention;
[0055] Figure 6 A schematic diagram of the tracking control results and errors of the nitrate nitrogen concentration by the event-triggered model predictive control method according to an embodiment of the present invention;
[0056] Figure 7 This is a schematic diagram of the optimal control law sequence for nitrate nitrogen concentration using the event-triggered model predictive control method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0059] Embodiment 1:
[0060] like Figure 1 As shown, this embodiment provides an event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process, comprising the following steps:
[0061] Step S1: Collecting actual operation data of the sewage treatment plant, wherein the operation data includes nitrate nitrogen concentration and associated variables; and establishing a deep belief network model based on the operation data.
[0062] In this embodiment, the associated variables are shown in Table 1, including: total phosphorus concentration, biochemical oxygen demand concentration, ammonia nitrogen concentration, phosphate concentration, suspended solids concentration, sludge settling volume, chemical oxygen demand and water temperature.
[0063] Table 1
[0064] variable unit meaning Label TP mg / L Total phosphorus concentration <![CDATA[x1]]> BOD mg / L Biochemical oxygen demand concentration <![CDATA[x2]]> NH4-N mg / L Ammonia nitrogen concentration <![CDATA[x3 <!-- 4 -->]]> PPH mg / L Phosphate concentration <![CDATA[x4]]> TSS g / L Suspended solids concentration <![CDATA[x5]]> SV mg / L Sludge settling volume <![CDATA[x6]]> COD mg / L Chemical oxygen demand <![CDATA[x7]]> T ℃ Water temperature <![CDATA[x8]]>
[0065] The number of input and output of the water quality prediction model is determined by the associated variables listed in Table 1, which are 8 and 1 respectively. The prediction model of water quality parameters can be characterized by a nonlinear function:
[0066]
[0067] Wherein, Γ() is a function that characterizes the nonlinear mapping relationship between nitrate nitrogen concentration and associated variables; θ is the model parameter to be optimized.
[0068] The main task of the predictive control model in this application is to approximate the function Γ() in a data-driven manner, and then give a quantitative expression of Γ(). In this embodiment, an event-triggered deep belief network model is constructed to learn and approximate Γ().
[0069] Deep belief network (DBN) is an effective deep learning model, which consists of several sequentially stacked restricted Boltzmann machines (RBM); the training process of the restricted Boltzmann machine is the process of initializing the weight parameters of multiple restricted Boltzmann machines and supervised learning; the equivalent mapping relationship of the training process of the restricted Boltzmann machine is It is expressed as:
[0070]
[0071] In the formula, x and w represent the input and weight parameters respectively; h represents the feature vector extracted from the input data; represents the predicted nitrate nitrogen concentration; where x(t) = [x1(t), x2(t), …, x 12 (t)] T ,h(t)=[h1(t),h2(t),…,h l (t)] T , l represents the number of RBMs.
[0072] Given the first restricted Boltzmann machine, if x(t) = [x1(t), x2(t), …, x 12 (t)]T and h1(t)=[h 11 (t),h 12 (t),…,h 1m (t)] T Represent its input and feature vector respectively, then the update formula of the initial weight parameter ω1(t) of the first restricted Boltzmann machine is as follows:
[0073] ω1(t+1)=ω1(t)-γΔω1(t), (3)
[0074] in,
[0075] In the formula, γ represents the learning rate of unsupervised learning of the initial weight parameters; E(x i h j )and They represent the initial state and equilibrium state of the input layer and hidden layer of the restricted Boltzmann machine respectively; t represents the training data stream label.
[0076] In general, Obtained through Gibbs sampling, through the iterative learning of formula (3)-formula (4), the initial weight parameter ω1(t) of the first restricted Boltzmann machine can be obtained. Similarly, continuing to train multiple stacked RBMs can obtain the optimal initial weight parameter ω of the entire DBN model * (t)=[ω1(t),ω2(t),…,ω l (t)] T Based on the initial weight parameters, the optimal values of the weight parameters are obtained through supervised learning:
[0077]
[0078] in,
[0079] Where y(t) and η represent the expected output and the learning rate of supervised learning of weight parameters, respectively.
[0080] Step S2: Use the changing trend and characteristics of the deep belief network model training error to define events, and build a parameter update model of the event-triggered deep belief network model (ETDBN).
[0081] In this embodiment, two parameters reflecting the downward trend of the training error are defined, including:
[0082] ε λ (t) = e(t) - e(t - λ), (7)
[0083]
[0084] In the formula, λ represents the hysteresis factor.
[0085] According to the trend and characteristics of the training error, combined with formula (7)-formula (8), the characteristic definition events that characterize the non-stationary state of water quality are defined, including:
[0086]
[0087]
[0088] In the formula, E1, E2, E3, and E4 represent four events respectively. Event E1 means that the training error is getting smaller and smaller, and the downward trend is becoming more and more obvious; Event E2 means that the training error is getting smaller and smaller, and the downward trend is becoming slower and slower; Event E3 means that the training error is getting bigger and bigger, and the upward trend is becoming more and more obvious; Event E4 means that the training error and its downward trend change irregularly; Represents the state based on training error;
[0089] According to the characteristics of different events, a learning strategy that matches them is designed. That is, when different events are triggered, the parameter update model of the event-triggered deep belief network model includes:
[0090]
[0091] Where 0<η2<η1<1 represents the learning rate under different learning strategies.
[0092] According to formula (13)-formula (15), the learning rate gradually decreases as the rate of decrease of the training error decreases. When the training error increases or fluctuates, the learning rate is 0.
[0093] Step S3: Taking the output and control law of the event-triggered deep belief network model as independent variables, construct a loss function based on the target water quality tracking error, and solve the optimal control law based on the loss function; then obtain the event-triggered predictive control model.
[0094] like Figure 2 As shown in Figure 2, the denitrification process in the sewage treatment process is mainly achieved through denitrification in anoxic environment. The main variables affecting the concentration of nitrate nitrogen are the anoxic environment and internal recirculation (Q int ). If the anoxic environment is well set during sewage treatment, the nitrate nitrogen concentration can be controlled by internal recirculation.
[0095] Then, the loss function is as follows:
[0096]
[0097] Among them, Δu(t)=u(t+1)-u(t), |Δu(t)|≤Δu max , (17)
[0098] In the formula, h p and h u Represent the prediction range and control range respectively; i represents the order number of summation within the prediction range; j represents the order number of summation within the control range; superscript T represents matrix transposition; r() represents the expected concentration of nitrate nitrogen; represents the predicted nitrate nitrogen concentration; u() represents the control variable; G i and H j represents two quadratic constant matrices; Δu max is the upper limit of the control law increment.
[0099] The gradient descent algorithm is used to solve the optimal control law, and the iterative solution process is as follows:
[0100]
[0101] In the formula, κ represents the learning rate of the optimization solution process;
[0102] Combined with formula (16), the sequence of the optimal control law can be solved as:
[0103]
[0104] Where G and H represent the quadratic coefficients of the prediction term and the control term, respectively.
[0105] It can be seen from formula (19) that the predictive control law can achieve convergence in the iterative solution process, thereby forming a closed-loop control framework (ETDBN-MPC) for the nitrate nitrogen concentration in the sewage treatment process, as shown in Figure 3 As shown in the figure, the ETDBN-MPC method was applied to the nitrate nitrogen concentration tracking and control experiment in the sewage treatment process.
[0106] Step S4: Evaluate the prediction and control model of nitrate nitrogen concentration using the evaluation performance index.
[0107] In this embodiment, the evaluation indicators include:
[0108]
[0109] Where, t d -t0 represents the width of the sample data stream; r() represents the expected concentration of nitrate nitrogen; Represents the predicted nitrate-nitrogen concentration.
[0110] Embodiment 2:
[0111] This embodiment provides an application test of an event-triggered prediction and control method for nitrate nitrogen concentration in a sewage treatment process. First, 14 days of operating data of nitrate nitrogen and related variables are obtained from an actual sewage treatment station, and the data sampling time interval is 15 minutes. Among them, the data of the first 7 days are used to train the event-triggered deep belief network model, and the data of the last 7 days are used to test the predictive control performance. During the learning process, the parameters are set as follows: l=3, λ=2, η=0.3, η1=0.8, κ=0.6, η2=0.5, and the structure of the event-triggered deep belief network model is determined to be 8-15-15-6-1 by trial and error.
[0112] In order to fully demonstrate the advantages of the control method of the present invention, the experiment was repeated 20 times independently and compared with other methods. The average value of the comparison results is shown in Table 2. Figure 4-Figure 7 It can be seen that the control method of the present invention can not only accurately predict the nitrate nitrogen concentration under non-stationary operating environment, but also dynamically solve the optimal internal reflow state of the sewage treatment system through rolling optimization, thereby realizing accurate tracking and control of the expected value of nitrate nitrogen. At the same time, compared with other methods, the event-driven predictive control method can improve the operating efficiency by up to 35.3% and the control accuracy by up to 71.5%.
[0113] Table 2
[0114]
[0115] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. An event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process, characterized in that: The following steps are involved: Step S1: collecting actual operation data of the sewage treatment plant, wherein the operation data includes nitrate nitrogen concentration and associated variables; and establishing a deep belief network model based on the operation data; Step S2: defining events using the changing trend and characteristics of the deep belief network model training error, and constructing a parameter update model of the deep belief network model triggered by events; Step S3: Taking the output and control law of the event-triggered deep belief network model as independent variables, constructing a loss function based on the target water quality tracking error, and solving the optimal control law based on the loss function; thereby obtaining an event-triggered predictive control model; Step S4: Evaluating the predictive control model of nitrate nitrogen concentration using evaluation performance indicators.
2. The event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process according to claim 1, characterized in that: In step S1, the associated variables include: total phosphorus concentration, biochemical oxygen demand concentration, ammonia nitrogen concentration, phosphate concentration, suspended solids concentration, sludge settling volume, chemical oxygen demand and water temperature.
3. The event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process according to claim 1, characterized in that: The deep belief network model is composed of a number of sequentially stacked restricted Boltzmann machines; The training process of the restricted Boltzmann machine is a process of weight parameter initialization and supervised learning of the restricted Boltzmann machine; The equivalent mapping relationship of the training process of the restricted Boltzmann machine is expressed as: In the formula, x and w represent the input and weight parameters respectively; h represents the feature vector extracted from the input data; Γ() is a function that characterizes the nonlinear mapping relationship between nitrate nitrogen concentration and associated variables; represents the predicted nitrate nitrogen concentration; When the first restricted Boltzmann machine is given, the update formula of the initial weight parameter ω1(t) of the first restricted Boltzmann machine is as follows: ω1(t+1)=ω1(t)-γΔω1(t), in, In the formula, γ represents the learning rate of unsupervised learning of the initial weight parameters; E(x i h j )and Respectively represent the initial state and equilibrium state of the input layer and hidden layer of the restricted Boltzmann machine; t represents the training data stream label; Based on the initial weight parameters, the optimal values of the weight parameters are obtained through supervised learning: in, w(0)=ω * , Where y(t) and η represent the expected output and the learning rate of supervised learning of weight parameters, respectively; ω * Represents the optimal initial weight parameter.
4. The event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process according to claim 3, characterized in that: In step S2, the parameters of the error variation trend include: e λ (t)=e(t)-e(t-λ), In the formula, λ represents the hysteresis factor; Feature definition events include: In the formula, E1, E2, E3, and E4 represent four events respectively. Event E1 means that the training error is getting smaller and smaller, and the downward trend is becoming more and more obvious; Event E2 means that the training error is getting smaller and smaller, and the downward trend is becoming slower and slower; Event E3 means that the training error is getting bigger and bigger, and the upward trend is becoming more and more obvious; Event E4 means that the training error and its downward trend change irregularly; Represents the state based on training error; When different events are triggered, the parameter update model of the deep belief network model triggered by the event includes: w(t+1)=w(t),Otherwise, Where 0<η2<η1<1 represents the learning rate under different learning strategies.
5. The event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process according to claim 1, characterized in that: The loss function in step S3 includes: In general,Δu(t)=u(t+1)-u(t),|Δu(t)|≤Δu max , In the formula, h p and h u Represent the prediction range and control range respectively; i represents the order number of summation within the prediction range; j represents the order number of summation within the control range; superscript T represents matrix transposition; r() represents the expected concentration of nitrate nitrogen; represents the predicted nitrate nitrogen concentration; u() represents the control variable; G i and H j represents two quadratic constant matrices; Δu max is the upper limit of the control law increment.
6. The event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process according to claim 5, characterized in that: The optimal control law in step S3 is solved using a gradient descent algorithm: In the formula, κ represents the learning rate of the optimization solution process; The sequence of the optimal control law is expressed as: Where G and H represent the quadratic coefficients of the prediction term and the control term, respectively.
7. The event-triggered method for predicting and controlling nitrate nitrogen concentration in a sewage treatment process according to claim 1, characterized in that: The evaluation indicators in step S4 include: Where, t d -t0 represents the width of the sample data stream; r() represents the expected concentration of nitrate nitrogen; Represents the predicted nitrate-nitrogen concentration.
Citation Information
Patent Citations
Event-driven sewage treatment process effluent total phosphorus soft measurement model design method
CN112599205A
Model prediction control method fusing deep belief network state estimation, electronic equipment and storable medium
CN117518810A
Cited By
Control quantity prediction method for biochemical unit of sewage plant based on multi-agent cooperation
CN121165634A