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

By using a bidirectional long and short-term memory neural network and a fuzzy self-tuning PID control model in a sewage treatment plant, the effluent concentration is automatically adjusted, which solves the problems of low regulation accuracy and high labor cost in the existing technology, and achieves high accuracy and low cost effluent concentration regulation.

CN120010571AActive Publication Date: 2025-05-16POWERCHINA HUADONG ENG CORP LTD

Patent Information

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

AI Technical Summary

Technical Problem

When regulating the effluent concentration of existing sewage treatment plants, the accuracy cannot be guaranteed and rely on manual operations, which increases labor costs.

Method used

The effluent concentration is determined by using a two-way long and short-term memory neural network based on water quality parameters and a pre-constructed bidirectional long and short-term memory neural network, and the fuzzy rule base and fuzzy self-tuning PID control model, and the sewage treatment system is automatically adjusted to achieve the target working conditions and the target effluent concentration.

Benefits of technology

Automatically adjust the effluent concentration of sewage treatment plants, improve the accuracy of regulation, and reduce labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010571A_ABST
    Figure CN120010571A_ABST
Patent Text Reader

Abstract

The invention provides an effluent concentration regulation and control method and device of a sewage treatment plant, electronic equipment and a medium, the method is used for regulating and controlling a sewage treatment system, and the method comprises the following steps: acquiring water quality parameters of inflow water of the sewage treatment plant and actual working conditions of hydraulic operation 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 working condition, the effluent concentration, a preset target working condition and a preset target effluent concentration; setting a fuzzy self-tuning PID control model based on the fuzzy rule base; based on the actual working condition, the effluent concentration, the target working condition and the target effluent concentration, a control variable is determined through a fuzzy self-tuning PID control model; the sewage treatment system is regulated and controlled through the control variables to reach the target working condition and the target effluent concentration. In the mode, the effluent concentration is automatically regulated and controlled, the regulation and control accuracy is improved, and the labor cost is reduced.
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 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 in sewage to an acceptable range, ensuring that sewage discharge meets environmental standards. The treatment process of a sewage treatment plant depends on the type and concentration of the sewage inlet, and the effluent concentration of a sewage treatment plant depends on the hydraulic conditions, reagent speculation, intelligent control system and other operating conditions of the sewage treatment plant. Therefore, the inlet concentration and type, and the operating conditions of each structure of the sewage treatment plant play a decisive role in the effluent concentration of the sewage plant.

[0003] At present, operations based on manual experience or standard specifications are passive operations, accuracy cannot be guaranteed, and labor costs are increased. Therefore, 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 the 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 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 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 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 vector 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: sorting 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 timestamps 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 timestamps; 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, the outlet water concentration, the preset target operating conditions and the 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, the concentration deviation, the first level, the first interval range, the second level and the 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 the 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 working condition, the effluent concentration, the target working condition and the target effluent concentration, the control variable is determined by a fuzzy self-tuning PID control model, including: determining the control deviation based on the actual working condition, the effluent concentration, the target working condition and the target effluent concentration; determining the control variable based on the control deviation and a preset algorithm by 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, used to adjust the impact 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 deviation accumulation, 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 the second aspect, an embodiment of the present invention also provides an effluent concentration control device for a sewage treatment plant, which is used to control the sewage treatment system, and 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-constructed 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, including 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 a sewage treatment plant according to the first aspect above.

[0015] The embodiments of the present invention bring the following beneficial effects: The embodiment of the present invention provides a method, device, electronic device and medium for controlling the effluent concentration of a sewage treatment plant, which obtains the water quality parameters of the sewage treatment plant influent and the actual working conditions of the hydraulic operation 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 working conditions, effluent concentration, a preset target working condition and a preset target effluent concentration, sets a fuzzy self-tuning PID control model based on the fuzzy rule base, determines the control variables based on the actual working conditions, effluent concentration, target working conditions and target effluent concentration through the fuzzy self-tuning PID control model, and controls the sewage treatment system through the control variables to achieve the target working conditions and target effluent concentration. In this method, the effluent concentration is automatically controlled, the control accuracy is improved, and the labor cost is reduced.

[0016] 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 implementing the above-mentioned technology of the present disclosure.

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

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

[0019] Figure 1 A flow chart of a method for controlling effluent concentration of a sewage treatment plant provided by an embodiment of the present invention; 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; Figure 3 A schematic diagram of the structure of an effluent concentration control device of a sewage treatment plant provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] Sewage treatment plants use large-scale treatment and filtration systems to remove or reduce harmful substances in sewage to an acceptable range, ensuring that sewage discharge meets environmental standards. The treatment process of a sewage treatment plant depends on the type and concentration of the sewage inlet, and the effluent concentration of a sewage treatment plant depends on the hydraulic conditions, reagent speculation, intelligent control system and other operating conditions of the sewage treatment plant. Therefore, the inlet concentration and type, and the operating conditions of each structure of the sewage treatment plant play a decisive role in the effluent concentration of the sewage plant.

[0022] At present, the conventional method is that according to the effluent monitoring concentration results, the sewage treatment plant operation and management personnel will reversely adjust the operating hydraulic conditions of each water treatment structure on the treatment side based on operating experience and national specifications such as outdoor design standards. For example, the aeration dissolved oxygen in the aeration grit tank 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 effluent total nitrogen concentration of the sewage treatment plant must be ensured to be less than 15 mg / L. If the effluent concentration is greater than 15 mg / L, then the role 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 using artificial experience and national standards or specifications.

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

[0024] 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 influent and the actual working 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 working conditions, effluent concentration, a preset target working 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 working conditions, effluent concentration, target working conditions and target effluent concentration, a control variable is determined through the fuzzy self-tuning PID control model. The sewage treatment system is controlled through the control variables to achieve the target working conditions and target effluent concentration. In this method, the effluent concentration is automatically controlled, the control accuracy is improved, and the labor cost is reduced.

[0025] 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.

[0026] Example 1 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: Step S101, obtaining water quality parameters of the sewage treatment plant influent and actual hydraulic operating conditions.

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

[0028] Among them, the inlet 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 pool anaerobic pool, anoxic pool, aerobic pool, and hydraulic retention time.

[0029] 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.

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

[0031] 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.

[0032] 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.

[0033] 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.

[0034] 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.

[0035] 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.

[0036] 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.

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

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

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

[0040] Therein, the control algorithm operates in the system according to the operation mode of the sewage treatment system.

[0041] Step S105, based on the actual operating conditions, outlet water concentration, target operating conditions and target outlet water concentration, the control variables are determined by a fuzzy self-tuning PID control model.

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

[0043] Specifically, determining the control variable through the fuzzy self-tuning PID control model may include: determining the control deviation based on the actual working condition, the outlet water concentration, the target working condition and the target outlet water concentration; and determining the control variable based on the control deviation and the preset algorithm through the following formula: .

[0044] 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.

[0045] in, u ( t ) is a control variable, used to adjust the size of the system variable; K p is the proportional gain, used to adjust the impact 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 deviation accumulation, 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.

[0046] The method for controlling the effluent concentration of a sewage treatment plant provided by an embodiment of the present invention obtains the water quality parameters of the sewage treatment plant influent and the actual working 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 working conditions, effluent concentration, a preset target working condition and a preset target effluent concentration, sets a fuzzy self-tuning PID control model based on the fuzzy rule base, determines the control variables based on the actual working conditions, effluent concentration, target working conditions and target effluent concentration through the fuzzy self-tuning PID control model, and controls the sewage treatment system through the control variables to achieve the target working conditions and target effluent concentration. In this method, the effluent concentration is automatically controlled, the control accuracy is improved, and the labor cost is reduced.

[0047] Example 2 An embodiment of the present invention also provides another method for controlling the effluent concentration of a sewage treatment plant; this method is implemented on the basis of the method in 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.

[0048] 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, such as 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: Step S201, preprocessing water quality parameters based on a preset time series to obtain target water quality parameters.

[0049] Specifically, preprocessing the water quality parameters based on a preset time series to obtain target water quality parameters may include: sorting 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.

[0050] 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.

[0051] Specifically, the step of using wavelet transform to perform noise reduction processing may include the following steps a) to e): 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.

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

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

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

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

[0056] Approximate coefficients (A): Approximate 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.

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

[0058] 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.

[0059] b) Calculate the noise standard deviation.

[0060] Median absolute deviation estimation: Use the first layer detail coefficient to estimate the noise standard deviation. The calculation formula of median absolute deviation (MAD) is: MAD=median(|D1-median(D1)|).

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

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

[0063] 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.

[0064] c) Calculate the threshold.

[0065] Determine the threshold value 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 .

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

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

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

[0069] Where c is the wavelet coefficient, sign(c) is the sign function of the coefficient, 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.

[0070] e) Perform wavelet reconstruction.

[0071] First, the reconstruction of the approximate coefficients is calculated as follows: .

[0072] 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 jth layer.

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

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

[0075] 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 the high-pass filter coefficients respectively. The convolution results are added to obtain the reconstructed monitoring data signal, that is, the target water quality parameters.

[0076] Based on the above description, BOD is used as an example: 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, then the annual collection volume is 24 monitoring data signals.

[0077] Using db4 wavelet to decompose BOD_data in two layers, the approximate coefficient and detail coefficient can be calculated as follows: Approximation coefficient (A2): [71.56, 76.84]; Detail coefficient (D2): [-1.88, -0.94]; Detail coefficient (D1): [2.45, -1.23, 1.23, -2.45, 2.45, -1.23, 1.23, -2.45]; Calculate the noise standard deviation: 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.

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

[0079] 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.

[0080] Threshold the wavelet coefficients: The detail coefficient is processed by soft threshold, and the calculation formula is: The processed detail coefficient is: D2: [-1.879, -0.9399] (because |-1.879|<2.08 and |-0.9399|<2.08, it becomes 0); 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).

[0081] The processed detail coefficient is: D2: [0, 0]; D1: [0.37, 0, 0, -0.37, 0.37, 0, 0, -0.37].

[0082] 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].

[0083] Step S202: extracting convolution feature vectors at different timestamps based on the target water quality parameters.

[0084] 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 convolution neural network to perform convolution calculation based on the normalized matrix to extract convolution feature vectors at different time stamps.

[0085] 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.

[0086] The convolution calculation can be expressed as follows: .

[0087] 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: .

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

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

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

[0091] 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.

[0092] 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 pre-processing of the water quality parameters are as shown in Table 1 below.

[0093] Table 1:

[0094] Among them, the normalization of the 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 use Python to calculate to get the normalized matrix GY _Data , the specific normalized matrix is ​​shown in Table 2 below.

[0095] Table 2:

[0096] Specifically, using a convolutional neural network to perform convolution calculations based on a normalized matrix to extract convolution feature vectors at different timestamps can include: performing convolution calculations 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 calculations to obtain a second output matrix; the second output matrix is ​​obtained by encoding a second initial output matrix output at a target timestamp; and using the second output matrix as a convolution feature vector.

[0097] Among them, the convolution calculation is performed on the normalized matrix, the first convolution layer has 24 filters (convolution kernels), and in the embodiment of the present invention, a 3×3 filter weight is used for convolution calculation, and the initialized filter weight vector uses the matrix W= , the convolution step size is set to 1, the filling is 0, and the bias b=0.01. Suppose first, for any set of target water quality parameters GY, such as To perform convolution, the calculation process is as follows: ; ; Calculate each element: .

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

[0099] According to the above calculation method, the matrix GY_Data is convolved with 24 filters with a convolution step 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.

[0100] Table 3:

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

[0102] 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 the bias b=0.03. The calculation process is as follows: , calculate each element, and then use the calculation formula of the ReLU activation function: , the final output matrix Cl of the second layer of convolutional neural network is obtained r q ), as shown in Table 4 below.

[0103] Table 4:

[0104] 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. 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.

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

[0106] Specifically, the convolution feature vector is input into a pre-constructed bidirectional long short-term memory neural network, and outputting the water concentration may include: calculating the forward neural network and the backward neural network through the bidirectional long short-term memory neural network based on the convolution feature vector to obtain the forward neural network output value and the backward neural network output value; determining the 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.

[0107] Among them, the forward neural network and the backward neural network are calculated through a bidirectional long short-term memory neural network based on the convolution feature vector 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 respectively, and inputting the convolution feature vectors at different timestamps; for the forward neural network, calculating the forget 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 forget 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 output value of the forward neural network, and using the result obtained by updating the hidden state corresponding to the backward neural network as the output value of the backward neural network.

[0108] Among them, the bidirectional long short-term memory neural network can process forward and backward neural network feedback at the same time. 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.

[0109] Forget gate (FG): The forget gate determines the current moment C( r q )Retain 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.

[0110] Input Gate (IG): The input gate determines the network input at the current moment X ( r q ) Saved in the 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.

[0111] Output gate (OG): The output gate passes through the cell state C( r q ) determines the expected output H( rq ). 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.

[0112] Specifically, the steps for calculating the forward neural network are: 1. Initialization: Set the initial hidden state h o and unit status C o, usually the zero vector.

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

[0114] 3. Loop calculation: For each timestamp r q , calculate from 1 to n, perform the following steps: Bidirectional long short-term memory neural network receiving A 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 the 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: .

[0115] Calculate the input gate IG: .

[0116] Compute candidate values ​​for the cell state: .

[0117] Update unit status: .

[0118] 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.

[0119] Calculate the output gate OG: .

[0120] Update hidden state: .

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

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

[0123] in, W f is the connection weight matrix between the 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: .

[0124] 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.

[0125] The unit's history information is calculated as follows: ; ; .

[0126] 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.

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

[0128] Specifically, the steps for calculating the backward neural network are: 1. Initialization: Set the initial hidden state hn and cell status C n, usually the zero vector.

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

[0130] 3. Loop calculation: For each timestamp r q , calculate from n to 1, perform the following steps: Calculate the forget gate FG: .

[0131] Calculate the input gate IG: .

[0132] Compute candidate values ​​for the cell state: .

[0133] Calculate the output gate OG: .

[0134] Update hidden state: .

[0135] Among them, the output value of the forward neural network is H(rq ) , the output value of the backward neural network is .

[0136] Wherein, 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 may include: performing weighted average processing on the forward neural network output value and the backward neural network output value to obtain the 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 offset vector of the target timestamp, ;in, represents a fully connected layer, , represents another fully connected layer, JQ ( r q ) represents the output vector.

[0137] 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: .

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

[0139] 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.

[0140] 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 and update the 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.

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

[0142] The specific chain rule calculation steps are as follows: 1. Calculate the output layer gradient: .

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

[0144] 3. Calculate the hidden layer gradient: .

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

[0146] 5. Weight W and bias b : ; ; ; .

[0147] Here, α is the learning rate.

[0148] For ease of understanding, the above methods are explained with examples: 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].

[0149] Calculate the output of the forward LSTM. The specific steps are as follows: Hidden layer size: 2.

[0150] The learning rate α=0.01.

[0151] The weights and biases are initialized with random values ​​as follows: W f =[0.11,0.19].

[0152] Wi =[0.29,0.38].

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

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

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

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

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

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

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

[0160] 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.

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

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

[0163] 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 the same random values ​​as the forward LSTM.

[0164] 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]; 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].

[0165] 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].

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

[0167] Assumptions λ The values ​​are: λ =[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1].

[0168] 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]) =ReLU([0.0.36, 0.0876, 0.2415, 0.1668, 0.278, 0.1338, 0.4347, 0.648, 0.7623, 0.900, 0.4334]).

[0169] Compute Application Connection Layer : Assumptions μ The values ​​are: μ =[0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95, 1.05].

[0170] 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.

[0171] 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.

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

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

[0174] 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 is needed to update the weights and biases.

[0175] Example 3 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 an effluent concentration control device of a sewage treatment plant provided by an embodiment of the present invention, such as Figure 3 As shown, the effluent concentration control device of the sewage treatment plant may include: The parameter and operating condition acquisition module 301 is used to obtain the water quality parameters of the influent of the sewage treatment plant and the actual operating conditions of the hydraulic operating conditions.

[0176] 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.

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

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

[0179] 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, outlet water concentration, target working conditions and target outlet water concentration; and achieve the target working conditions and target outlet water concentration through the control of the control variables.

[0180] The effluent concentration control device of the sewage treatment plant provided by the embodiment of the present invention obtains the water quality parameters of the sewage treatment plant influent and the actual working conditions of the hydraulic operation conditions, determines the effluent concentration based on the water quality parameters and the pre-built bidirectional long short-term memory neural network, establishes a fuzzy rule base based on the actual working conditions, effluent concentration, the preset target working conditions and the preset target effluent concentration, sets a fuzzy self-tuning PID control model based on the fuzzy rule base, determines the control variables through the fuzzy self-tuning PID control model based on the actual working conditions, effluent concentration, the target working conditions and the target effluent concentration, and controls the sewage treatment system through the control variables to achieve the target working conditions and the target effluent concentration. In this way, the effluent concentration is automatically controlled, the control accuracy is improved, and the labor cost is reduced.

[0181] In some embodiments, the outlet water concentration determination module is also used to pre-process 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-constructed bidirectional long short-term memory neural network, and output the outlet water concentration.

[0182] 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 to perform noise reduction processing on the initial water quality parameters using wavelet transform to obtain target water quality parameters.

[0183] 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 convolutional layer and a second convolutional layer, the first convolutional layer includes 24 filters, and the second convolutional layer includes 48 filters.

[0184] 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.

[0185] In some embodiments, the model setting module is also used to determine the rate of change of operating condition deviation based on actual operating conditions and target operating conditions; determine the rate of change of concentration deviation based on outlet water concentration and target outlet water concentration; use 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; 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.

[0186] In some embodiments, the control variable determination module is further used to determine the control deviation based on the actual working condition, the outlet water concentration, the target working condition and the target outlet water concentration; and to determine the control variable based on the control deviation and the preset algorithm by 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, used to adjust the impact 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 deviation accumulation, 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.

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

[0188] Example 4 The embodiment of the present invention also provides an electronic device for operating the above-mentioned effluent concentration control method of the sewage treatment plant; see 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 method for controlling the effluent concentration of the sewage treatment plant.

[0189] Further, 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 .

[0190] The memory 400 may include a high-speed random access memory (RAM), and may also include a 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 realized 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, etc. 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 only one type of bus.

[0191] The processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 401. The above processor 401 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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 gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 400, and the processor 401 reads the information in the memory 400 and completes the steps of the method of the above embodiment in combination with its hardware.

[0192] 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, which will not be repeated here.

[0193] 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 a 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. The specific implementation can be found in the method embodiment and will not be repeated here.

[0194] Those skilled in the art can 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.

[0195] 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

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

[0197] 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.

[0198] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0199] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope 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 the sewage treatment plant influent; 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, the control variables are determined by the fuzzy self-tuning PID control model; the sewage treatment system is regulated by the control variables to achieve the target operating conditions and the target effluent concentration.

2. The method according to claim 1, characterized in that The method of determining 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 timestamps 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 convolutional layer and a second convolutional layer, the first convolutional layer includes 24 filters, and the second convolutional layer includes 48 filters.

5. The method according to claim 1, characterized in that 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 outlet water concentration and the target outlet water 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; A fuzzy rule base is established based on the operating condition deviation, the concentration deviation, the first level, the first interval range, the second level and the second interval range.

6. The method according to claim 5, characterized in that 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, comprising: 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.

7. The method according to claim 1, characterized in that The determining of control variables through 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 by 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 deviation accumulation, 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.

8. A device for controlling effluent concentration of a sewage treatment plant, characterized in that: Used to regulate a sewage treatment system, the device comprises: 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, used 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 building module, used to build 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; 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 through the control of the control variable.

9. An electronic device, characterized in that: It comprises 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 a sewage treatment plant as described in any one of claims 1 to 7.

10. 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 method for controlling the effluent concentration of a sewage treatment plant as described in any one of claims 1 to 7.

Citation Information

Patent Citations

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

    CN102122134A

  • Dissolved-oxygen control method based on improved differential algorithm

    CN104345636A

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

    CN110357236A

  • Effluent total nitrogen prediction method based on fuzzy migration

    CN113156074A

  • Method and system for controlling dissolved oxygen concentration in sewage treatment, equipment and medium

    CN115097886A

Cited By

  • Sewage treatment process control system and method based on neural network

    CN120508066A

  • Ultrapure water manufacturing system and method

    CN121107634A