Method, device, electronic equipment and medium for controlling effluent concentration of sewage treatment plant

Through bidirectional long and short-term memory neural network and fuzzy self-tuning PID control model, the effluent concentration of sewage treatment plants is automatically adjusted, which solves the problem of insufficient manual experience, improves regulation accuracy and reduces costs.

CN120010571BActive Publication Date: 2025-08-12POWERCHINA HUADONG ENG CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510480464.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-08-12
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

In the prior art, the regulation of effluent concentration in sewage treatment plants depends on manual experience, and the accuracy is insufficient and labor costs are increased.

Method used

A two-way long and short-term memory neural network and a fuzzy self-tuning PID control model are used, combined with water quality parameters and hydraulic operating conditions, the effluent concentration is automatically adjusted, and the control variables are dynamically adjusted through the fuzzy rule base and the PID controller.

Benefits of technology

Automatic regulation of effluent concentration is achieved, the accuracy of regulation is improved, and labor costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010571B_ABST
    Figure CN120010571B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device, and medium for controlling the effluent concentration of a sewage treatment plant, including: a method for controlling a sewage treatment system, comprising: obtaining water quality parameters of the sewage treatment plant's influent and the actual operating conditions of hydraulic operating conditions; determining the effluent concentration based on the water quality parameters and a pre-established bidirectional long-short-term memory neural network; establishing a fuzzy rule base based on the actual operating conditions, effluent concentration, a preset target operating condition, and a preset target effluent concentration; setting a fuzzy self-tuning PID control model based on the fuzzy rule base; determining control variables using the fuzzy self-tuning PID control model based on the actual operating conditions, effluent concentration, the target operating condition, and the target effluent concentration; and controlling the sewage treatment system using the control variables to achieve the target operating condition and target effluent concentration. In this method, the effluent concentration is automatically controlled, improving control accuracy and reducing labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of concentration control, and in particular to a method, device, electronic equipment and medium for controlling the effluent concentration of a sewage treatment plant. Background Art

[0002] Sewage treatment plants use large-scale treatment and filtration systems to remove or reduce harmful substances from wastewater to acceptable levels, ensuring that wastewater discharge meets environmental standards. The treatment process at a sewage treatment plant depends on the type and concentration of the influent, while the effluent concentration is determined by the plant's hydraulics, reagent usage, intelligent control systems, and other operating conditions. Therefore, the influent concentration and type, as well as the operating conditions of the various sewage treatment plant structures, play a decisive role in determining the effluent concentration.

[0003] Given that currently, operations based on manual experience or standard specifications are passive operations, accuracy cannot be guaranteed, and labor costs are increased, how to independently and accurately control the water outlet concentration has become an important problem that needs to be solved urgently in the industry. Summary of the Invention

[0004] In view of this, the object of the present invention is to provide a method, device, electronic equipment and medium for controlling the effluent concentration of a sewage treatment plant, so as to automatically control the effluent concentration, improve the control accuracy and reduce labor costs.

[0005] In a first aspect, an embodiment of the present invention provides a method, device, electronic device and medium for controlling the effluent concentration of a sewage treatment plant, which are used to control the sewage treatment system. The method includes: obtaining the water quality parameters of the sewage treatment plant's influent and the actual operating conditions of the hydraulic operating conditions; determining the effluent concentration based on the water quality parameters and a pre-constructed bidirectional long-short-term memory neural network; establishing a fuzzy rule base based on the actual operating conditions, effluent concentration, a preset target operating condition and a preset target effluent concentration; setting a fuzzy self-tuning PID control model based on the fuzzy rule base; determining the control variables through the fuzzy self-tuning PID control model based on the actual operating conditions, effluent concentration, the target operating condition and the target effluent concentration; and regulating the sewage treatment system through the control variables to achieve the target operating conditions and target effluent concentration.

[0006] In a preferred embodiment of the present invention, the above-mentioned determination of the outlet water concentration based on water quality parameters and a pre-constructed bidirectional long short-term memory neural network includes: pre-processing the water quality parameters based on a preset time series to obtain target water quality parameters; extracting convolution feature vectors at different timestamps based on the target water quality parameters; inputting the convolution feature vectors into a pre-constructed bidirectional long short-term memory neural network, and outputting the outlet water concentration.

[0007] In a preferred embodiment of the present invention, the above-mentioned preprocessing of water quality parameters based on a preset time series to obtain target water quality parameters includes: arranging the water quality parameters according to the time series to obtain initial water quality parameters; and performing noise reduction processing on the initial water quality parameters using wavelet transform to obtain target water quality parameters.

[0008] In a preferred embodiment of the present invention, the above-mentioned extraction of convolution feature vectors at different time stamps based on target water quality parameters includes: normalizing the target water quality parameters to obtain a normalized matrix; using a convolution neural network to perform convolution calculation based on the normalized matrix to extract the convolution feature vectors at different time stamps; the convolution neural network includes a first convolution layer and a second convolution layer, the first convolution layer includes 24 filters, and the second convolution layer includes 48 filters.

[0009] In a preferred embodiment of the present invention, the above-mentioned fuzzy rule base is established based on the actual operating conditions, outlet water concentration, preset target operating conditions and preset target outlet water concentration, including: determining the operating condition deviation based on the actual operating conditions and the target operating conditions; determining the concentration deviation based on the outlet water concentration and the target outlet water concentration; dividing the operating condition deviation into multiple first levels and setting a first interval range for each first level; dividing the target outlet water concentration deviation into multiple second levels and setting a second interval range for each second level; establishing a fuzzy rule base based on the operating condition deviation, concentration deviation, first level, first interval range, second level and second interval range.

[0010] In a preferred embodiment of the present invention, the above-mentioned fuzzy self-tuning PID control model includes: a fuzzy controller and a PID controller; setting the fuzzy self-tuning PID control model based on a fuzzy rule base, including: determining the operating condition deviation change rate based on the actual operating condition and the target operating condition; determining the concentration deviation change rate based on the outlet water concentration and the target outlet water concentration; using the operating condition deviation, the operating condition deviation change rate, the concentration deviation and the concentration deviation change rate as input variables of the fuzzy controller; using the gain of the PID controller as the output variable; and dynamically adjusting the parameters of the PID controller based on the fuzzy rule base.

[0011] In a preferred embodiment of the present invention, based on the actual operating conditions, effluent concentration, target operating conditions, and target effluent concentration, a control variable is determined by a fuzzy self-tuning PID control model, including: determining a control deviation based on the actual operating conditions, effluent concentration, target operating conditions, and target effluent concentration; and determining the control variable based on the control deviation and a preset algorithm using the following formula: ;in, u ( t ) is a control variable used to adjust the size of the system variable; K p is the proportional gain, which is used to adjust the influence of the proportional term; e (t ) is the control deviation, which represents the difference between the target value and the actual output value; T i is the integration time constant; is the integral term, which means from time t 1 to time t 2. The integral term eliminates the steady-state error by accumulating the deviation. T d is the differential time constant, used to adjust the influence of the differential term; is the differential term, indicating the deviation e ( t ) rate of change over time.

[0012] In a second aspect, an embodiment of the present invention further provides an effluent concentration control device for a sewage treatment plant, which is used to control the sewage treatment system. The device includes: a parameter and operating condition acquisition module, which is used to obtain the water quality parameters of the sewage treatment plant inlet and the actual operating conditions of the hydraulic operating conditions; an effluent concentration determination module, which is used to determine the effluent concentration based on the water quality parameters and a pre-built bidirectional long-short-term memory neural network; a fuzzy rule base establishment module, which is used to establish a fuzzy rule base based on the actual operating conditions, effluent concentration, a preset target operating condition and a preset target effluent concentration; a model setting module, which is used to set a fuzzy self-tuning PID control model based on the fuzzy rule base; a control variable determination module, which is used to determine the control variables through the fuzzy self-tuning PID control model based on the actual operating conditions, effluent concentration, target operating conditions and target effluent concentration; and the target operating conditions and target effluent concentration are achieved through the control of the control variables.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the effluent concentration control method of the sewage treatment plant according to the first aspect above.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the effluent concentration control method of the sewage treatment plant according to the first aspect above.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] Embodiments of the present invention provide a method, device, electronic device, and medium for controlling the effluent concentration of a sewage treatment plant. The method obtains the water quality parameters of the sewage treatment plant's influent and the actual operating conditions of the hydraulic operating conditions, determines the effluent concentration based on the water quality parameters and a pre-constructed bidirectional long-short-term memory neural network, establishes a fuzzy rule base based on the actual operating conditions, effluent concentration, a preset target operating condition, and a preset target effluent concentration, sets a fuzzy self-tuning PID control model based on the fuzzy rule base, determines control variables based on the actual operating conditions, effluent concentration, target operating conditions, and target effluent concentration, and regulates the sewage treatment system through the control variables to achieve the target operating conditions and target effluent concentration. This method automatically regulates the effluent concentration, improves control accuracy, and reduces labor costs.

[0017] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by practicing the above-mentioned technology of the present disclosure.

[0018] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A flow chart of a method for controlling effluent concentration in a sewage treatment plant provided by an embodiment of the present invention;

[0021] Figure 2 A flow chart of another method for controlling effluent concentration of a sewage treatment plant provided by an embodiment of the present invention;

[0022] Figure 3 A schematic structural diagram of an effluent concentration control device for a sewage treatment plant provided by an embodiment of the present invention;

[0023] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0025] Sewage treatment plants use large-scale treatment and filtration systems to remove or reduce harmful substances from wastewater to acceptable levels, ensuring that wastewater discharge meets environmental standards. The treatment process at a sewage treatment plant depends on the type and concentration of the influent, while the effluent concentration is determined by the plant's hydraulics, reagent usage, intelligent control systems, and other operating conditions. Therefore, the influent concentration and type, as well as the operating conditions of the various sewage treatment plant structures, play a decisive role in determining the effluent concentration.

[0026] The current conventional method is that according to the effluent monitoring concentration results, the sewage treatment plant operation and management personnel use their operating experience and national specifications such as outdoor design standards to reversely adjust the operating hydraulic conditions of each water treatment structure on the treatment side. For example, the aeration dissolved oxygen in the aeration grit chamber of the sewage treatment plant should be ensured to be greater than 3 mg / L to ensure that the organic matter content of the sewage can be oxidized and decomposed to reduce the COD concentration; for example, the total nitrogen concentration of the effluent of the sewage treatment plant is required to be ensured to be less than 15 mg / L. If the effluent concentration is greater than 15 mg / L, then the function of the denitrification tank needs to be strengthened, such as reducing the operating load, increasing the hydraulic retention time, etc.; all of this is done based on manual experience and national standards or specifications.

[0027] Given that currently, operations based on manual experience or standard specifications are passive operations, accuracy cannot be guaranteed, and labor costs are increased, how to independently and accurately control the water outlet concentration has become an important problem that needs to be solved urgently in the industry.

[0028] Based on this, an embodiment of the present invention provides a method, device, electronic device, and medium for controlling the effluent concentration of a sewage treatment plant. By obtaining the water quality parameters of the sewage treatment plant's influent and the actual operating conditions of the hydraulic operating conditions, the effluent concentration is determined based on the water quality parameters and a pre-constructed bidirectional long-short-term memory neural network. A fuzzy rule base is established based on the actual operating conditions, effluent concentration, a preset target operating condition, and a preset target effluent concentration. A fuzzy self-tuning PID control model is set based on the fuzzy rule base. Based on the actual operating conditions, effluent concentration, target operating conditions, and target effluent concentration, the control variables are determined through the fuzzy self-tuning PID control model. The sewage treatment system is regulated through the control variables to achieve the target operating conditions and target effluent concentration. In this method, the effluent concentration is automatically regulated, which improves the accuracy of regulation and reduces labor costs.

[0029] To facilitate understanding of this embodiment, a method for controlling effluent concentration of a sewage treatment plant disclosed in an embodiment of the present invention is first introduced in detail.

[0030] Example 1

[0031] The embodiment of the present invention provides a method for controlling the effluent concentration of a sewage treatment plant. Figure 1 The present invention provides a flow chart of a method for controlling the effluent concentration of a sewage treatment plant. Figure 1 As shown, the effluent concentration control method of the sewage treatment plant may include the following steps:

[0032] Step S101: obtaining the water quality parameters of the sewage treatment plant's influent and the actual working conditions of the hydraulic operation conditions.

[0033] Among them, water quality parameters include: inlet water quality parameters and hydraulic operation parameters.

[0034] Among them, the influent water quality parameters may include: COD (Chemical Oxygen Demand), ammonia nitrogen, total nitrogen, BOD (Biochemical Oxygen Demand), total phosphorus, SS (Suspended Solid or Suspended Substance), etc.; hydraulic operation parameters include: aeration volume, oxygen concentration of biochemical tanks, anaerobic tanks, anoxic tanks, aerobic tanks, and hydraulic retention time.

[0035] The water quality parameters can be represented by {X1, X2, X3, ..., Xn}, where n represents the number of parameters, and the size of n can be adjusted according to actual conditions.

[0036] Step S102: determining the outlet water concentration based on the water quality parameters and a pre-built bidirectional long short-term memory neural network.

[0037] Specifically, determining the outlet water concentration based on water quality parameters and a pre-constructed bidirectional long short-term memory neural network can include: pre-processing the water quality parameters based on a preset time series to obtain target water quality parameters; extracting convolution feature vectors at different timestamps based on the target water quality parameters; inputting the convolution feature vectors into a pre-constructed bidirectional long short-term memory neural network, and outputting the outlet water concentration.

[0038] Step S103 : establishing a fuzzy rule base based on the actual working condition, the outlet water concentration, the preset target working condition and the preset target outlet water concentration.

[0039] Specifically, a fuzzy rule base is established based on actual operating conditions, outlet water concentration, preset target operating conditions and preset target outlet water concentration, which may include: determining operating condition deviation based on actual operating conditions and target operating conditions; determining concentration deviation based on outlet water concentration and target outlet water concentration; dividing the operating condition deviation into multiple first levels and setting a first interval range for each first level; dividing the target outlet water concentration deviation into multiple second levels and setting a second interval range for each second level; establishing a fuzzy rule base based on operating condition deviation, concentration deviation, first level, first interval range, second level and second interval range.

[0040] Among them, the operating condition deviation G is determined based on the actual operating condition and the target operating condition. E ( t ) can be expressed by the following formula: ;in, t For the current moment, r ( t ) is the target working condition, y ( t ) is the actual working condition.

[0041] The concentration deviation is determined based on the effluent concentration and the target effluent concentration. NE ( t ) can be expressed by the following formula: ;in, t For the current moment, yd ( t ) is the outlet water concentration, md ( t ) is the target effluent concentration.

[0042] Among them, the corresponding level and the range corresponding to the level can be set according to the actual situation. For example, five levels are set: A--, A-, A0, A+ and A++, and each level distribution is set with an interval.

[0043] Step S104: setting a fuzzy self-tuning PID control model based on the fuzzy rule base.

[0044] The fuzzy self-tuning PID control model may include: a fuzzy controller and a PID controller.

[0045] Specifically, setting a fuzzy self-tuning PID control model based on a fuzzy rule base may include: determining the rate of change of operating condition deviation based on actual operating conditions and target operating conditions; determining the rate of change of concentration deviation based on outlet water concentration and target outlet water concentration; using the operating condition deviation, the rate of change of operating condition deviation, the concentration deviation and the rate of change of concentration deviation as input variables of the fuzzy controller; using the gain of the PID controller as the output variable; and dynamically adjusting the parameters of the PID controller based on the fuzzy rule base.

[0046] Among them, the control algorithm runs in the system according to the operation mode of the sewage treatment system.

[0047] Step S105 : determining control variables through a fuzzy self-tuning PID control model based on the actual operating conditions, outlet water concentration, target operating conditions, and target outlet water concentration.

[0048] Among them, the sewage treatment system is regulated by controlling variables to achieve the target operating conditions and target effluent concentration.

[0049] Specifically, determining the control variable through the fuzzy self-tuning PID control model may include: determining the control deviation based on the actual operating conditions, outlet water concentration, target operating conditions, and target outlet water concentration; and determining the control variable based on the control deviation and a pre-set algorithm using the following formula: .

[0050] The control deviation can be obtained by subtracting the set value from the actual output value, where the set value is such as the target outlet water concentration and the target operating condition, and the actual output value is such as the outlet water concentration and the actual operating condition.

[0051] in, u ( t ) is a control variable used to adjust the size of the system variable; K p is the proportional gain, which is used to adjust the influence of the proportional term; e ( t ) is the control deviation, which represents the difference between the target value and the actual output value; T i is the integration time constant; is the integral term, which means from time t 1 to time t 2. The integral term eliminates the steady-state error by accumulating the deviation. T d is the differential time constant, used to adjust the influence of the differential term; is the differential term, indicating the deviation e ( t ) rate of change over time.

[0052] The method for controlling the effluent concentration of a sewage treatment plant provided in an embodiment of the present invention obtains the water quality parameters of the sewage treatment plant's influent and the actual operating conditions of the hydraulic operating conditions, determines the effluent concentration based on the water quality parameters and a pre-built bidirectional long-short-term memory neural network, establishes a fuzzy rule base based on the actual operating conditions, effluent concentration, a preset target operating condition, and a preset target effluent concentration, sets a fuzzy self-tuning PID control model based on the fuzzy rule base, determines control variables based on the actual operating conditions, effluent concentration, target operating conditions, and target effluent concentration using the fuzzy self-tuning PID control model, and regulates the sewage treatment system using the control variables to achieve the target operating conditions and target effluent concentration. In this method, the effluent concentration is automatically regulated, improving control accuracy and reducing labor costs.

[0053] Example 2

[0054] An embodiment of the present invention also provides another method for controlling the effluent concentration of a sewage treatment plant; this method is implemented based on the method of the above embodiment; this method focuses on describing the specific implementation method of determining the effluent concentration based on water quality parameters and a pre-built bidirectional long-short-term memory neural network.

[0055] Figure 2 A flow chart of another method for controlling effluent concentration of a sewage treatment plant provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method for determining the outlet water concentration based on water quality parameters and a pre-built bidirectional long short-term memory neural network may include the following steps:

[0056] Step S201 : pre-processing the water quality parameters based on a preset time series to obtain target water quality parameters.

[0057] Specifically, preprocessing the water quality parameters based on a preset time series to obtain target water quality parameters may include: arranging the water quality parameters according to the time series to obtain initial water quality parameters; and performing noise reduction processing on the initial water quality parameters using wavelet transform to obtain target water quality parameters.

[0058] The time series can be set according to actual needs. For example, the time series can be sorted according to the day, week, month, quarter, or year to obtain the initial water quality parameters.

[0059] Specifically, the step of performing noise reduction processing using wavelet transform may include the following steps a) to e):

[0060] a) Select db4 (where "db" stands for Daubechies wavelet and the number "4" represents the order of the vanishing moment of the wavelet function) as the basis function of the wavelet transform.

[0061] The calculation formula for the number of decomposition layers is as follows: .

[0062] Among them, (JC_data) represents the monitoring data, that is, the initial water quality parameters, which can be adjusted according to actual conditions. JC can be expressed by COD, ammonia nitrogen, total nitrogen, BOD, total phosphorus, SS, etc.

[0063] in, In the embodiment of the present invention, two decomposition layers are used, namely, the approximate coefficient and the detail coefficient.

[0064] Wavelet decomposition process: Wavelet decomposition is to gradually decompose the monitoring data signal into approximate coefficients and detail coefficients of different scales.

[0065] Approximation coefficients (A): Approximation coefficients are obtained by convolution and downsampling the monitoring data signal. The convolution kernel is the low-pass filter coefficient of the wavelet basis function.

[0066] Detail coefficient (D): The detail coefficient is obtained by convolution and downsampling the monitoring data signal. The convolution kernel is the high-pass filter coefficient of the wavelet basis function. The decomposition formula is: ; .

[0067] Among them, A j is the approximation coefficient of the jth layer, D j is the detail coefficient of the jth layer, h k is the low-pass filter coefficient, g k is the high-pass filter coefficient.

[0068] b) Calculate the noise standard deviation.

[0069] Median absolute deviation estimation: Use the first layer detail coefficients to estimate the noise standard deviation. The median absolute deviation (MAD) is calculated as: MAD = median (|D1 - median (D1)|).

[0070] Among them, D1 is the first layer detail coefficient.

[0071] The noise standard deviation is calculated as: .

[0072] in, It is the quantile of the standard normal distribution, usually 0.67, which is used to convert MAD into an estimate of the standard deviation.

[0073] c) Calculate the threshold.

[0074] The threshold is determined based on the noise standard deviation and the length of the monitoring data. The commonly used threshold calculation formula is: y = sigma × (2 × log (N)) 0.5 .

[0075] Where sigma is the standard deviation of the noise and N is the number of elements in the signal.

[0076] d) Perform threshold processing on the wavelet coefficients.

[0077] Perform soft thresholding on the detail coefficients. The formula for soft thresholding is: c = sign (c) × max (|c|-y, 0).

[0078] Where c is the wavelet coefficient, sign(c) is the coefficient sign function, and max(⋅) is the maximum value function. For each detail coefficient, if its absolute value is less than the threshold, it is set to zero; if it is greater than the threshold, the threshold is subtracted.

[0079] e) Perform wavelet reconstruction.

[0080] First, the approximate coefficients are reconstructed, and the calculation formula is as follows: .

[0081] Where: s j+1 (n) is the monitoring data signal or approximate coefficient of the j+1th layer; h(k) is the coefficient of the low-pass filter; cA j (k) is the approximation coefficient of the j-th layer.

[0082] Secondly, the detail coefficient is reconstructed and the calculation formula is: .

[0083] Where: g(k) is the coefficient of the high-pass filter; cDj(k) is the detail coefficient of the jth layer.

[0084] Finally, the approximate coefficients and detail coefficients after threshold processing are upsampled, and the upsampled coefficients are convolved with the low-pass filter coefficients and high-pass filter coefficients respectively. The convolution results are added together to obtain the reconstructed monitoring data signal, that is, the target water quality parameters.

[0085] Based on the above description, BOD is used as an example:

[0086] Assume that the annual collected data of influent BOD is BOD_data=[50, 55, 60, 58, 62, 65, 70, 68, 72, 75, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100], and the collection frequency is twice a month. The annual collection volume is 24 monitoring data signals.

[0087] Using db4 wavelet to decompose BOD_data into 2 layers, the approximate coefficient and detail coefficient can be calculated as follows:

[0088] Approximation coefficient (A2): [71.56, 76.84];

[0089] Detail coefficient (D2): [-1.88, -0.94];

[0090] Detail coefficient (D1): [2.45, -1.23, 1.23, -2.45, 2.45, -1.23, 1.23, -2.45];

[0091] Calculate the noise standard deviation:

[0092] Assuming that the median of the first-layer detail coefficient D1 is 0, the median absolute deviation (MAD) is: MAD=median(|D1-median(D1)|)=median(|[2.45,-1.225,1.225,-2.451,2.45,-1.225,1.225,-2.45]-0|)=median([2.45,1.23,1.23,2.451,2.45,1.23,1.23,2.45])=1.23.

[0093] The noise standard deviation (σ) is: σ=0.6745×MAD=0.6745×1.23≈0.829.

[0094] Calculate the threshold: threshold(y) is y=σ×(2log(len(BOD_data))) 0.5 =0.829×2×log(24) 0.5 ≈0.829×2.52≈2.09.

[0095] Threshold the wavelet coefficients:

[0096] Perform soft threshold processing on the detail coefficient, and the calculation formula is: The detail coefficient after processing is:

[0097] D2: [-1.879, -0.9399] (Because |-1.879| < 2.08 and |-0.9399| < 2.08, it becomes 0);

[0098] D1: [2.45, -1.225, 1.225, -2.45, 2.45, -1.225, 1.225, -2.45] (because |2.45|>2.08, |-2.45|>2.08, so 2.451 becomes 0.37, -2.45 becomes -0.37).

[0099] The detail coefficient after processing is:

[0100] D2: [0, 0];

[0101] D1: [0.37, 0, 0, -0.37, 0.37, 0, 0, -0.37].

[0102] The wavelet reconstruction can be implemented through python, and the calculated reconstructed BOD concentration data is: [51.83, 56.22, 60.61, 58.99, 62.38, 65.77, 70.16, 68.54, 72.93, 75.32, 74.69, 76.08, 78.47, 80.86, 82.23, 84.62, 86.00, 88.39, 90.78, 92.15, 94.54, 96.93, 98.30, 100.69].

[0103] Step S202: extracting convolution feature vectors at different time stamps based on target water quality parameters.

[0104] Specifically, extracting convolution feature vectors at different time stamps based on target water quality parameters may include: normalizing the target water quality parameters to obtain a normalized matrix; and using a convolutional neural network to perform convolution calculation based on the normalized matrix to extract convolution feature vectors at different time stamps.

[0105] The convolutional neural network includes a first convolutional layer and a second convolutional layer. The first convolutional layer includes 24 filters, and the second convolutional layer includes 48 filters.

[0106] Convolution calculation can be expressed according to the following formula: .

[0107] in, represents the convolution operation, represents the weight vector of the convolution kernel, Represents the bias vector, ReLU(x) represents the ReLU activation function, and the specific calculation formula is: .

[0108] Regarding the pooling calculation of convolutional neural networks, the pooling layer selects the feature map The maximum value in the dimensional neighborhood is output to the next level and is expressed as follows: .

[0109] in, l i ( r q ) is the i The pooling layer is in the r q A feature vector of timestamps.

[0110] The kernels of the two maximum pooling layers of the convolution module are set to 2×2 dimensions. rq The output of the timestamp Cl( r q ) is input into the sequence feature module for encoding.

[0111] Among them, Cl( r q ) is a higher-order feature representation that can better capture the abstract features of the input data. These feature representations are used as input to the LSTM (Long Short-Term Memory) module to further capture time series features.

[0112] For ease of understanding, the 24 water quality parameters collected annually by the sewage treatment plant are given as examples. It is assumed that the target water quality parameters obtained after preprocessing the water quality parameters are as shown in Table 1 below.

[0113] Table 1:

[0114]

[0115] The normalization of target water quality parameters is specifically carried out using the min-max normalization calculation formula. The min-max normalization calculation formula is: Normalization result = (X-X min ) / (X max —X min ), and then calculate it through Python to get the normalized matrix GY _Data , the specific normalized matrix is shown in Table 2 below.

[0116] Table 2:

[0117]

[0118] Specifically, using a convolutional neural network to perform convolution calculation based on a normalized matrix to extract convolution feature vectors at different timestamps can include: performing convolution calculation based on a first convolution layer to obtain a first output matrix; inputting the first output matrix into a second convolution layer to perform convolution calculation to obtain a second output matrix; the second output matrix is obtained by encoding the second initial output matrix output at the target timestamp; and using the second output matrix as the convolution feature vector.

[0119] Among them, the convolution calculation is performed on the normalized matrix. The first convolution layer has 24 filters (convolution kernels). In the embodiment of the present invention, a 3×3 filter weight is used for convolution calculation. The initialized filter weight vector uses the matrix W= , the convolution step is set to 1, the filling is 0, and the bias b=0.01. Suppose that first any set of target water quality parameters GY is For convolution, the calculation process is as follows:

[0120] ;

[0121] ;

[0122] Calculate each element: .

[0123] Then use the calculation formula of the ReLU activation function: , we can get: .

[0124] According to the above calculation method, the matrix GY_Data is convolved with 24 filters with a convolution step size of 1, and then pooled. The kernel of the pooling layer is set to 2×2 dimensions. The first output matrix of the first layer of the convolutional neural network is finally obtained, as shown in Table 3 below.

[0125] Table 3:

[0126]

[0127] The second convolutional layer has 48 filters (convolution kernels); the convolution calculation is expressed according to the following formula: .

[0128] Similarly, the first output matrix CH1 is used as the original data for convolution calculation. The initialized filter weights are convolved with a 2×2 matrix and a bias of b=0.03. The calculation process is as follows:

[0129] , calculate each element, and then use the calculation formula of the ReLU activation function: , the final second output matrix Cl of the second layer of convolutional neural network is obtained ( r q ), as shown in Table 4 below.

[0130] Table 4:

[0131]

[0132] The pooling layer in the embodiment of the present application selects the maximum value in the 2-dimensional neighborhood of the second output matrix JS of the second convolutional neural network and outputs it to the next level. The kernels of the two maximum pooling layers of the convolution module are set to 2×2 dimensions. The convolution module is in the first r q The output of the timestamp Cl( r q ) is input into the sequence feature module for encoding, and finally outputs the second output matrix CH2, which is used as the convolution feature vector.

[0133] Step S203: input the convolution feature vector into a pre-built bidirectional long short-term memory neural network and output the water concentration.

[0134] Specifically, the convolution feature vector is input into a pre-constructed bidirectional long short-term memory neural network, and outputting the outlet water concentration may include: calculating the forward neural network and the backward neural network based on the convolution feature vector through the bidirectional long short-term memory neural network to obtain the forward neural network output value and the backward neural network output value; and determining the outlet water concentration based on the forward neural network output value, the backward neural network output value, the weight of the target timestamp, and the bias vector of the target timestamp.

[0135] Among them, the forward neural network and the backward neural network are calculated based on the convolution feature vector through the bidirectional long short-term memory neural network to obtain the forward neural network output value and the backward neural network output value, which can include: setting the initial hidden state and unit state corresponding to the forward neural network and the backward neural network, and inputting the convolution feature vectors at different timestamps; for the forward neural network, calculating the forgetting gate, input gate, candidate values of the unit state, output gate at different timestamps, and updating the unit state and hidden state; for the backward neural network, calculating the forgetting gate, input gate, candidate values of the unit state, output gate at different timestamps, and updating the hidden state; using the result obtained by updating the hidden state corresponding to the forward neural network as the forward neural network output value, and using the result obtained by updating the hidden state corresponding to the backward neural network as the backward neural network output value.

[0136] Among them, the bidirectional long short-term memory neural network can simultaneously process forward and backward neural network feedback. The bidirectional long short-term memory neural network updates the network state through three gating units, namely the forget gate, input gate and output gate.

[0137] Forget gate (FG): The forget gate determines the current moment C( r q ) retains the unit state at the previous moment When the forget gate is open, the data in the storage unit can be saved; when the gate is closed, the data in the unit is cleared.

[0138] Input Gate (IG): The input gate determines the network input at the current moment X ( r q ) Save in cell state C( r q ). When the input gate is open, the memory cell can recognize the contents of other neurons as part of the memory; when the input gate is closed, the memory cell cannot recognize these contents as the memory.

[0139] Output gate (OG): The output gate passes through the cell state C( r q ) determines the expected output H( r q When the output gate is open, other neurons can recognize the contents of the storage unit; when the gate is closed, other neurons cannot recognize these contents.

[0140] Specifically, the steps for calculating the feedforward neural network are:

[0141] 1. Initialization: Set the initial hidden state h o and cell status C o, usually the zero vector.

[0142] 2. The sequence of feature parameters at different timestamps is X= { X 1, X 2,…, Xn -1, Xn}.

[0143] 3. Loop calculation: For each timestamp r q , calculate from 1 to n, perform the following steps:

[0144] Bidirectional long short-term memory neural network receives the Time-stamped monitoring data signal X ( r q ) and output As input, and get the forgetting factor after the forget gate , we can get the forget gate FG. Calculate the forget gate FG: ;in, W f is the connection weight matrix between input and FG; b f ( r q ) is the r q The connection offset of the timestamp; σ (⋅) refers to sigmoid The activation function can be expressed as the following formula: .

[0145] Calculate the input gate IG: .

[0146] Compute candidate values for the cell state: .

[0147] Update unit status: .

[0148] in, When it is equal to 0, the historical information in the unit is completely forgotten; when When the value of is 1, the historical information is remembered. Therefore, IG updates the state according to the input; W i and W c They are IG connection weight and tanh layer weights; b i and b c is the corresponding bias; is tanh Candidate values generated by the layer, participating unit information C ( r q ) update process.

[0149] Calculate the output gate OG: .

[0150] Update hidden state: .

[0151] Bidirectional long short-term memory neural network receives the Time-stamped monitoring data signal X ( r q ) and output As input, and get the forgetting factor after the forget gate .

[0152] The forgetting factor is expressed as follows: .

[0153] in, W f is the connection weight matrix between input and FG; b f ( r q ) is the r q The connection bias of the timestamp; σ(⋅) refers to the sigmoid activation function, which can be expressed as the following formula: .

[0154] f ( r q ) is equal to 0, the historical information in the unit is completely forgotten; when f ( r q ) is 1, the historical information is remembered. Therefore, IG updates the state according to the input.

[0155] The unit's historical information is calculated as follows:

[0156] ;

[0157] ;

[0158] .

[0159] In the above formula, W i and W c They are IG connection weight and tanh layer weights; b i and b c is the corresponding bias; is tanh Candidate values generated by the layer, participating unit information C ( r q ) update process.

[0160] Output control factor o( r q ) is obtained from OG and expressed as follows:

[0161] ;

[0162] .

[0163] Specifically, the steps for calculating the backward neural network are:

[0164] 1. Initialization: Set the initial hidden state hn and cell status C n, usually the zero vector.

[0165] 2. The sequence of feature parameters at different timestamps is X= { Xn , Xn-1 , … , X 2, X1}.

[0166] 3. Loop calculation: For each timestamp r q , calculate from n to 1, perform the following steps:

[0167] Calculate the forget gate FG: .

[0168] Calculate the input gate IG: .

[0169] Compute candidate values for the cell state: .

[0170] Calculate the output gate OG: .

[0171] Update hidden state: .

[0172] Among them, the output value of the forward neural network is H(r q ) , the output value of the backward neural network is .

[0173] The method of determining the outlet water concentration based on the output value of the forward neural network, the output value of the backward neural network, the weight of the target timestamp, and the bias vector of the target timestamp may include: performing weighted average processing on the output value of the forward neural network and the output value of the backward neural network to obtain an output vector; and determining the outlet water concentration based on the output vector, the weight of the target timestamp, and the bias vector of the target timestamp by the following formula: ;in, represents the weight of the target timestamp, represents the bias vector of the target timestamp, ;in, represents a fully connected layer, , represents another fully connected layer, JQ ( r q ) represents the output vector.

[0174] Specifically, the output values of the forward neural network and the backward neural network H(rq) and The weighted average method is used to obtain , we can get: , the output vector generated by each group in the sequence feature module JQ ( r q ), summarized as: .

[0175] Furthermore, according to the output calculation result, , assuming the true value is y i , construct the loss function L, and the specific calculation is: .

[0176] Among them, the comparison is performed according to the preset threshold of the loss function value range. If the loss function value is greater than the threshold, the weight W and bias need to be updated. If the loss function value is less than the threshold, the calculation is terminated.

[0177] Furthermore, the gradient of the loss function L with respect to each weight is calculated. That is, starting from the output layer, the chain rule is used to calculate the updated gradient of each layer in reverse through the network, and the loss function is calculated again until the requirements for the end of the loop are met.

[0178] Among them, the known hidden layer weights are W i , the bias is b i ; The output layer weight is set to W c , the bias is b c ; Hidden layer: ; The output layer is: .

[0179] The specific chain rule calculation steps are as follows:

[0180] 1. Calculate the output layer gradient:

[0181] .

[0182] 2. Calculate the gradient of the output layer weights and biases:

[0183] ;

[0184] .

[0185] 3. Calculate the hidden layer gradient:

[0186] .

[0187] 4. Calculate the gradient of the hidden layer weights and biases:

[0188] ;

[0189] .

[0190] 5. Weight W and bias b :

[0191] ; ;

[0192] ; .

[0193] Here, α is the learning rate.

[0194] For ease of understanding, the above methods are explained with examples:

[0195] First, for the calculation of the forward neural network, the input parameters are assumed to be X=[1.587, 1.258, 2.584, 1.982, 1.548, 2.879, 2.357, 2.789, 2.441, 3.145, 4.598].

[0196] Calculate the output of the forward LSTM. The specific steps are as follows:

[0197] Hidden layer size: 2.

[0198] Learning rate α = 0.01.

[0199] The weights and biases are initialized with random values as follows:

[0200] W f =[0.11,0.19].

[0201] W i =[0.29,0.38].

[0202] W c =[0.45,0.61].

[0203] W o =[0.66,0.78].

[0204] b f =0.03; b i =0.06; b c =0.02; b o =0.05.

[0205] Calculate time steps from 1 to time steps r q =11, first the following calculation is the time step r q =1.

[0206] Forget Gate: f ( r q ) = σ ( W f [0, X1]+ b f ) = σ ([0.157]+0.03) = σ (0.187)≈0.579.

[0207] Input Gate:i ( r q ) = σ ( W i [0, X1]+ b i ) = σ ([0.4761]+0.06) = σ (0.5361)≈0.622.

[0208] Candidate unit status: = tanh ( W c [0, 1]+ b c ) = tanh (0.8635)≈0.761.

[0209] Unit Status: C ( r q ) = f ( r q ) C ( r q -1)+ i ( r q ) C ( r q )=0.579×0+0.622×0.761=0.471.

[0210] Output Gate: O ( r q ) = σ ( W o [0, X1]+ b o ) = σ ([1.1109]+0.05) = σ (1.1909)≈0.775.

[0211] Hidden state: H ( r q ) = O ( r q ) tanh ( Cr q ) = 0.775× tanh (0.471)≈0.381.

[0212] Calculate the output of the reverse LSTM according to the above method, and calculate the time step from 11 to time step r q =1, first the following calculation is the time step r q = 11. The weights and biases are initialized with random values that are the same as those of the forward LSTM.

[0213] Finally, the forward memory neural network output is obtained H ( r q ) = [0.381, 0.422, 0.823, 0.412, 0.531, 0.232, 0.581, 0.748, 0.896, 0.987, 0.376];

[0214] Reverse memory neural network output =[0.291, 0.544, 0.786, 0.421, 0.581, 0.213, 0.661, 0.871, 0.798, 0.812, 0.412].

[0215] According to the weighted average method, we can get: =[0.336, 0.438, 0.805, 0.417, 0.556, 0.223, 0.621, 0.810, 0.847, 0.900, 0.394].

[0216] The calculated JQ ( r q ) is substituted into the fully connected layer for calculation: .

[0217] Assumptions λ The values are:

[0218] λ =[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1].

[0219] calculate ψ l ( r q )=ReLU([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1]×[0.336, 0.438, 0.805, 0.417, 0.556, 0.223, 0.621, 0.810, 0.847, 0.900, 0.394])

[0220] =ReLU([0.0.36, 0.0876, 0.2415, 0.1668, 0.278, 0.1338, 0.4347, 0.648, 0.7623, 0.900, 0.4334]).

[0221] Computing application connection layer :

[0222] Assumptions μ The values are:

[0223] μ =[0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95, 1.05].

[0224] calculate θ l ( r q )=ReLU([0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95, 1.05]×[0.036, 0.0876, 0. 2415, 0.1668, 0.278, 0.1338, 0.4347, 0.648, 0.7623, 0.900, 0.4334]) = ReLU (3.9015) = 3.9015.

[0225] Substitute the calculated results into Perform calculations, assuming W l ( r q )and α l ( r q ) is: W l ( r q ) = [0.5]; α l ( r q )=0.2.

[0226] You can get: =sigmoid([0.5]×[3.9015]+0.2)=sigmoid(2.1508)=0.896.

[0227] Assuming the true value y i =1.12, then the loss function Loss≈0.05.

[0228] Assuming that the threshold is set to 0.1, the accuracy requirement is met; if the threshold is set to less than 0.05, the chain rule needs to be used to update the weights and biases.

[0229] Example 3

[0230] Corresponding to the above method embodiment, the embodiment of the present invention provides an effluent concentration control device for a sewage treatment plant, Figure 3 A schematic diagram of a structure of a sewage treatment plant effluent concentration control device provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the effluent concentration control device of the sewage treatment plant may include:

[0231] The parameter and operating condition acquisition module 301 is used to obtain the water quality parameters of the sewage treatment plant influent and the actual operating conditions of the hydraulic operation conditions.

[0232] The outlet water concentration determination module 302 is used to determine the outlet water concentration based on water quality parameters and a pre-built bidirectional long short-term memory neural network.

[0233] The fuzzy rule base establishing module 303 is used to establish a fuzzy rule base based on actual working conditions, outlet water concentration, preset target working conditions and preset target outlet water concentration.

[0234] The model setting module 304 is used to set the fuzzy self-tuning PID control model based on the fuzzy rule base.

[0235] The control variable determination module 305 is used to determine the control variables through the fuzzy self-tuning PID control model based on the actual working conditions, effluent concentration, target working conditions and target effluent concentration; and achieve the target working conditions and target effluent concentration by controlling the control variables.

[0236] The effluent concentration control device for a sewage treatment plant provided in an embodiment of the present invention obtains the water quality parameters of the sewage treatment plant's influent and the actual operating conditions of the hydraulic operating conditions, determines the effluent concentration based on the water quality parameters and a pre-constructed bidirectional long-short-term memory neural network, establishes a fuzzy rule base based on the actual operating conditions, effluent concentration, a preset target operating condition, and a preset target effluent concentration, sets a fuzzy self-tuning PID control model based on the fuzzy rule base, determines control variables based on the actual operating conditions, effluent concentration, target operating conditions, and target effluent concentration using the fuzzy self-tuning PID control model, and regulates the sewage treatment system through the control variables to achieve the target operating conditions and target effluent concentration. In this method, the effluent concentration is automatically regulated, improving regulation accuracy and reducing labor costs.

[0237] In some embodiments, the outlet water concentration determination module is also used to preprocess the water quality parameters based on a preset time series to obtain target water quality parameters; extract convolution feature vectors at different timestamps based on the target water quality parameters; input the convolution feature vectors into a pre-built bidirectional long short-term memory neural network, and output the outlet water concentration.

[0238] In some embodiments, the outlet water concentration determination module is further used to sort the water quality parameters according to the time series to obtain initial water quality parameters; and use wavelet transform to perform noise reduction on the initial water quality parameters to obtain target water quality parameters.

[0239] In some embodiments, the outlet water concentration determination module is also used to normalize the target water quality parameters to obtain a normalized matrix; a convolutional neural network is used to perform convolution calculation based on the normalized matrix to extract convolution feature vectors at different timestamps; the convolutional neural network includes a first convolution layer and a second convolution layer, the first convolution layer includes 24 filters, and the second convolution layer includes 48 filters.

[0240] In some embodiments, the fuzzy rule base establishment module is also used to determine the operating condition deviation based on the actual operating condition and the target operating condition; determine the concentration deviation based on the outlet water concentration and the target outlet water concentration; divide the operating condition deviation into multiple first levels and set a first interval range for each first level; divide the target outlet water concentration deviation into multiple second levels and set a second interval range for each second level; establish a fuzzy rule base based on the operating condition deviation, concentration deviation, first level, first interval range, second level and second interval range.

[0241] In some embodiments, the model setting module is also used to determine the rate of change of the operating condition deviation based on the actual operating conditions and the target operating conditions; determine the rate of change of the concentration deviation based on the outlet water concentration and the target outlet water concentration; use the operating condition deviation, the rate of change of the operating condition deviation, the concentration deviation and the rate of change of the concentration deviation as input variables of the fuzzy controller; use the gain of the PID controller as the output variable; and dynamically adjust the parameters of the PID controller based on the fuzzy rule base.

[0242] In some embodiments, the control variable determination module is further configured to determine a control deviation based on the actual operating conditions, the outlet water concentration, the target operating conditions, and the target outlet water concentration; and to determine the control variable based on the control deviation and a preset algorithm using the following formula: ;in, u ( t ) is a control variable used to adjust the size of the system variable; K p is the proportional gain, which is used to adjust the influence of the proportional term; e ( t ) is the control deviation, which represents the difference between the target value and the actual output value;T i is the integration time constant; is the integral term, which means from time t 1 to time t 2. The integral term eliminates the steady-state error by accumulating the deviation. T d is the differential time constant, used to adjust the influence of the differential term; is the differential term, indicating the deviation e ( t ) rate of change over time.

[0243] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding content in the aforementioned method embodiment.

[0244] Example 4

[0245] The embodiment of the present invention also provides an electronic device for operating the above-mentioned sewage treatment plant effluent concentration control method; Figure 4 A structural schematic diagram of an electronic device is shown, which includes a memory 400 and a processor 401, wherein the memory 400 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 401 to implement the above-mentioned sewage treatment plant effluent concentration control method.

[0246] Furthermore, Figure 4 The electronic device shown further includes a bus 402 and a communication interface 403 , and the processor 401 , the communication interface 403 and the memory 400 are connected via the bus 402 .

[0247] The memory 400 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 402 may be an ISA bus, a PCI bus, or an EISA bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0248] The processor 401 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 401 or by software instructions. The above processor 401 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 400, and processor 401 reads the information in memory 400 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.

[0249] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned sewage treatment plant effluent concentration control method. The specific implementation can be found in the method embodiment and will not be repeated here.

[0250] The computer program product for the method for controlling the effluent concentration of a sewage treatment plant provided in an embodiment of the present invention includes a computer-readable storage medium storing non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. For specific implementation, please refer to the method embodiment and will not be repeated here.

[0251] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0252] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

[0253] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0254] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0255] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0256] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for controlling effluent concentration of a sewage treatment plant, characterized in that: For regulating a sewage treatment system, the method comprises: Obtain the actual working conditions of water quality parameters and hydraulic operating conditions of sewage treatment plants; Determining the effluent concentration based on the water quality parameters and a pre-constructed bidirectional long short-term memory neural network; Establishing a fuzzy rule base based on the actual working condition, the outlet water concentration, a preset target working condition and a preset target outlet water concentration; Setting a fuzzy self-tuning PID control model based on the fuzzy rule base; Based on the actual operating conditions, the effluent concentration, the target operating conditions, and the target effluent concentration, a control variable is determined by the fuzzy self-tuning PID control model; and the sewage treatment system is regulated by the control variable to achieve the target operating conditions and the target effluent concentration; The establishing of a fuzzy rule base based on the actual working condition, the outlet water concentration, the preset target working condition and the preset target outlet water concentration includes: determining an operating condition deviation based on the actual operating condition and the target operating condition; determining a concentration deviation based on the effluent concentration and the target effluent concentration; Dividing the operating condition deviation into a plurality of first levels and setting a first interval range for each first level; Dividing the target outlet water concentration deviation into a plurality of second levels and setting a second interval range for each second level; Establishing a fuzzy rule base based on the operating condition deviation, the concentration deviation, the first level, the first interval, the second level, and the second interval; The fuzzy self-tuning PID control model includes: a fuzzy controller and a PID controller; The fuzzy self-tuning PID control model is set based on the fuzzy rule base, including: determining an operating condition deviation change rate based on the actual operating condition and the target operating condition; determining a concentration deviation change rate based on the outlet water concentration and the target outlet water concentration; using the operating condition deviation, the operating condition deviation change rate, the concentration deviation, and the concentration deviation change rate as input variables of the fuzzy controller; Using the gain of the PID controller as an output variable; The parameters of the PID controller are dynamically adjusted based on the fuzzy rule base.

2. The method according to claim 1, characterized in that The determining of the outlet water concentration based on the water quality parameters and a pre-built bidirectional long-short-term memory neural network includes: Preprocessing the water quality parameters based on a preset time series to obtain target water quality parameters; Extracting convolution feature vectors at different time stamps based on the target water quality parameters; The convolution feature vector is input into a pre-built bidirectional long short-term memory neural network to output the water concentration.

3. The method according to claim 2, characterized in that The preprocessing of the water quality parameters based on a preset time series to obtain target water quality parameters includes: Arranging the water quality parameters according to the time series to obtain initial water quality parameters; The initial water quality parameters are subjected to noise reduction processing using wavelet transform to obtain target water quality parameters.

4. The method according to claim 2, characterized in that The extracting convolution feature vectors at different timestamps based on the target water quality parameter includes: Normalizing the target water quality parameters to obtain a normalized matrix; A convolutional neural network is used to perform convolution calculation based on the normalized matrix to extract convolution feature vectors at different timestamps; the convolutional neural network includes a first convolution layer and a second convolution layer, the first convolution layer includes 24 filters, and the second convolution layer includes 48 filters.

5. The method according to claim 1, wherein The determining of the control variable by the fuzzy self-tuning PID control model based on the actual operating condition, the outlet water concentration, the target operating condition and the target outlet water concentration includes: determining a control deviation based on the actual operating condition, the outlet water concentration, the target operating condition, and the target outlet water concentration; The control variable is determined based on the control deviation and a preset algorithm using the following formula: ; in, u ( t ) is a control variable used to adjust the size of the system variable; K p is the proportional gain, which is used to adjust the influence of the proportional term; e ( t ) is the control deviation, which represents the difference between the target value and the actual output value; T i is the integration time constant; is the integral term, which means from time t 1 to time t 2. The integral term eliminates the steady-state error by accumulating the deviation. T d is the differential time constant, used to adjust the influence of the differential term; is the differential term, indicating the deviation e ( t ) rate of change over time.

6. A device for controlling effluent concentration of a sewage treatment plant, characterized in that: Used to regulate a sewage treatment system, and used to implement the method for regulating the effluent concentration of a sewage treatment plant according to any one of claims 1 to 5, the device comprising: Parameter and operating condition acquisition module, used to obtain the water quality parameters of the sewage treatment plant influent and the actual operating conditions of the hydraulic operation conditions; An outlet water concentration determination module, configured to determine the outlet water concentration based on the water quality parameters and a pre-built bidirectional long-short-term memory neural network; A fuzzy rule base establishing module, configured to establish a fuzzy rule base based on the actual operating conditions, the outlet water concentration, a preset target operating condition, and a preset target outlet water concentration; A model setting module, used for setting a fuzzy self-tuning PID control model based on the fuzzy rule base; A control variable determination module is used to determine the control variable through the fuzzy self-tuning PID control model based on the actual working condition, the outlet water concentration, the target working condition and the target outlet water concentration; and achieve the target working condition and the target outlet water concentration by controlling the control variable.

7. An electronic device, characterized in that: It includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the effluent concentration control method of a sewage treatment plant as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the effluent concentration control method of the sewage treatment plant according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and system for wastewater treatment of dissolved oxygen control based on fuzzy neural network

    CN102122134A

  • Intelligent control method for sewage plant based on mutation inversion effluent prediction model

    CN110357236A