Urban sewage treatment abnormal condition intelligent feature extraction method based on sparse auto-coding network

By combining hydrodynamics to design the time delay calculation equation and establishing a sparse self-coding network model, the uncertainty of residence time and water withdrawal status during sewage treatment is solved, and high-accurate intelligent detection of abnormal water effluent conditions is achieved to ensure sewage Stability of the treatment process and safety of the water environment.

CN119415919APending Publication Date: 2025-02-11BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411418223.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

During sewage treatment, the uncertainty of residence time and mismatch of water withdrawal status make it difficult to accurately monitor and control key variables in the water outlet, such as ammonia nitrogen and total phosphorus, which in turn affects the safety of the water environment.

Method used

By designing the time delay calculation equations in combination with hydrodynamics, constructing the data feature sparse matrix, and establishing a feature extraction model based on sparse self-coding network to extract the features of process variables, solving the uncertainty of residence time and water withdrawal state, and achieving water effluent anomalies Intelligent detection of working conditions.

Benefits of technology

It improves the accuracy of feature extraction, achieves more accurate intelligent detection accuracy for abnormal water effluent working conditions, and ensures the stable operation of the sewage treatment process and the safety of the water environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415919A_ABST
    Figure CN119415919A_ABST
Patent Text Reader

Abstract

The invention provides an urban sewage treatment abnormal condition intelligent feature extraction method based on a sparse self-encoding network, and the method achieves the intelligent diagnosis of the abnormal condition in the urban sewage treatment process. Aiming at the challenge that in the sewage treatment process, the residence time is uncertain due to inflow fluctuation, so that detection data and the inflow state are difficult to accurately associate, the method comprises the following steps: firstly, calculating time lag through hydrodynamics; secondly, homogenizing data distribution by constructing a data feature sparse matrix; and finally, establishing an abnormal working condition feature extraction model based on the sparse self-encoding network, thereby realizing intelligent diagnosis of the abnormal working condition in the urban sewage treatment process, improving the detection precision, and providing technical support for the sewage treatment industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Based on the analysis of the operating characteristics of the sewage treatment process, the present invention designs a time-delay calculation equation by combining hydrodynamics, constructs a data feature sparse matrix, and establishes a feature extraction method for process variables based on a sparse autoencoder network to achieve intelligent detection of abnormal effluent conditions. This feature extraction method based on the mechanism and sparse autoencoder network can achieve more accurate intelligent detection accuracy of abnormal effluent conditions on the premise of obtaining more accurate feature vectors, and belongs to the field of water treatment. Background Art

[0002] The efficient operation of sewage treatment plants is key to ensuring a sustainable and friendly green environment. The purpose of the sewage treatment process is to remove pollutants from sewage so that it can be safely reused or discharged. The treated sewage can be recycled as non-potable water for cleaning, agricultural and industrial purposes, or discharged into water bodies such as rivers and streams without any serious impact after meeting the standards. Monitoring the sewage process not only helps to evaluate the process operation status, but also helps to verify the treatment effect of the sewage plant.

[0003] Monitoring of the sewage treatment process is an important means to ensure that sewage treatment facilities operate normally and that emissions meet standards. In order to achieve efficient and stable operation of sewage treatment plants, some key variables at the outlet, such as ammonia nitrogen and total phosphorus, need to be accurately monitored and controlled. Excessive nitrogen in sewage is a common environmental problem that can lead to eutrophication of water bodies, which in turn causes ecological problems such as algal blooms and fish deaths. During the sewage treatment process, monitoring systems, sensors, and automated control systems generate a large amount of data. These data contain rich information, including water quality parameters, the operating status of treatment devices, and changes in influent and effluent. In the sewage treatment process, significant fluctuations in flow lead to uncertainty in residence time, making it difficult to accurately associate detection data with influent status. Feature extraction can extract useful information from complex process data for sewage treatment process monitoring. Since the sewage treatment process is affected by different influent conditions, data mismatch, and uneven distribution, the extraction of feature components poses a challenge.

[0004] The present invention designs an intelligent feature extraction method for abnormal working conditions of urban sewage treatment based on sparse autoencoder network. The method solves the uncertainty of residence time and the mismatch of water intake state by designing a time-delay calculation equation in combination with hydrodynamics. A data feature sparse matrix is ​​constructed, and feature extraction of process variables based on sparse autoencoder network is established to improve the accuracy of feature extraction and realize intelligent detection of abnormal working conditions of water outlet. Summary of the invention

[0005] The present invention obtains an intelligent feature extraction method for abnormal working conditions of urban sewage treatment based on sparse autoencoder network. The method solves the uncertainty of residence time and the mismatch of water intake state by designing a time-delay calculation equation in combination with hydrodynamics. The data after delay is homogenized and the feature extraction of process variables based on sparse autoencoder network is established to improve the accuracy of feature extraction.

[0006] The present invention adopts the following technical solutions and implementation steps:

[0007] A method for extracting abnormal working conditions of urban sewage treatment based on sparse autoencoder network is characterized by collecting relevant data of sewage treatment process, calculating the time delay of the whole process, constructing a sparse matrix, establishing an intelligent feature extraction model based on improved sparse autoencoder network, and realizing intelligent diagnosis of abnormal working conditions of sewage treatment process, comprising the following steps:

[0008] Taking the urban sewage treatment process as the research object, 20 process variables are selected as samples, and the collected samples are x(t n )=[x1(t n ),x2(t n ),…,x p (t n )], where x(t n ) is the time t n The sample at the time, n represents the nth sampling moment, x p (t n ) is the time t n The pth process variable at time, p = 1,…,20; x1(t n ) is t n The water flow rate at time, x2(t n ) is t n pH value of the water inlet chamber at the time of n ) is t n Chemical oxygen demand of the water inlet chamber at the time, x4(t n ) is t n The ammonia nitrogen concentration at the time, x5(t n ) is t n The temperature at the time, x6(t n ) is t n External reflux flow rate at time, x7(t n ) is t n Internal reflux flow rate at time, x8(t n ) is t n Backwash water volume at time, x9(t n ) is t n The dissolved oxygen concentration in front of aerobic pool I at that time, x 10 (t n ) is tn The air flow rate before the aerobic pool I at 1000 s, x 11 (t n ) is t n The dissolved oxygen concentration in aerobic pool I at the time of 12 (t n ) is t n The air flow rate in aerobic pool I at time x 13 (t n ) is t n Aerobic pool Dissolved oxygen concentration, x 14 (t n ) is t n Aerobic pool Air flow rate, x 15 (t n ) is t n The amount of excess sludge discharged at the time, x 16 (t n ) is t n The anaerobic pool redox potential at x 17 (t n ) is t n The redox potential of the anoxic pool at 18 (t n ) is t n The nitrate nitrogen concentration in the anoxic pool at 19 (t n ) is t n Mixed liquid suspended solids in the anoxic tank, x 20 (t n ) is t n pH of the secondary sedimentation tank at 100°C;

[0009] The time lag between two adjacent sensors is calculated based on hydrodynamic analysis. The time lag τ2 between the front and end monitoring points of the primary sedimentation tank is expressed as τ2=T2-T1, where T1 is the time taken by the influent to reach the front monitoring point of the primary sedimentation tank, and T2 is the time taken by the influent to reach the end monitoring point of the primary sedimentation tank. The judgment condition and value of τ2 are expressed as follows:

[0010]

[0011] Among them, Q in is the water inlet flow rate, V PS It is the volume flow rate between the two monitoring points at the front end and the end of the primary sedimentation tank;

[0012] In the pre-anoxic zone and the anaerobic zone, the flow rate is calculated as the influent flow rate Q in and external reflux flow Q RThe sum of the two monitoring points is set in the anaerobic zone at this stage, which are located in the middle and end of the anaerobic zone. The time lag between the end of the primary sedimentation tank and the middle of the anaerobic zone is τ3, and the time lag between the middle of the anaerobic zone and the end of the anaerobic zone is τ4. u The judgment conditions and values ​​of (u=3,4) are expressed as:

[0013]

[0014] Among them, V u Represents the volume flow rate between two monitoring points, V3 is the volume flow rate between the end of the primary sedimentation tank and the middle of the anaerobic zone, and V4 is the volume flow rate between the middle of the anaerobic zone and the end of the anaerobic zone;

[0015] The main biochemical reaction zone includes anoxic zone I, aerobic zone I and deoxygenation zone. The flow rate is calculated as the inflow flow rate Q in , External return flow Q R and the internal reflux flow Q r The sum of 7 monitoring points is set in this stage, and the time lag τ v (v=5,…,11) The judgment conditions and values ​​are expressed as:

[0016]

[0017] Among them, T4 is the time taken for the influent to flow to the monitoring point at the end of the anaerobic zone, V v is the volume flow rate between two adjacent monitoring points in this stage, V5 is the volume flow rate between the end of the anaerobic zone and the middle of the anoxic zone I, V6 is the volume flow rate between the middle of the anoxic zone I and the end of the anoxic zone I, V7 is the volume flow rate between the end of the anoxic zone I and the front end of the aerobic zone I, V8 is the volume flow rate between the front end of the aerobic zone I and the front end of the aerobic zone I, V9 is the volume flow rate between the front end of the aerobic zone I and the middle end of the aerobic zone I, V 10 is the volume flow rate between the monitoring points at the middle and end of aerobic zone I, V 11 is the volume flow rate between the monitoring points at the end of aerobic zone I and the end of anoxic zone;

[0018] In the hypoxic zone and aerobic zone The flow rate is composed of the inlet flow Qin and the external return flow Q R Jointly decided, there are 2 monitoring points in this stage, with a time lag of τ w (w=12,13) ​​The judgment conditions and values ​​are expressed as:

[0019]

[0020]

[0021] Among them, T11 V is the time taken by the influent to reach the monitoring point at the end of the deoxidation zone. w is the volume flow rate between two monitoring points, V 12 The end of the oxygen-dissipating zone and the aerobic zone Volume flow between front-end monitoring points, V 13 Aerobic Zone Front end and aerobic zone Volume flow between terminal monitoring points;

[0022] Aerobic Zone The time lag τ between the monitoring point and the sedimentation tank monitoring point 14 It is expressed as:

[0023]

[0024] Among them, Q W is the amount of sand filter backwash wastewater, T 13 For influent to flow into the aerobic zone The time spent at the terminal monitoring point, V SS Aerobic Zone Volume flow rate between the monitoring point of the secondary sedimentation tank;

[0025] For a sample at time t n The variables at are adjusted as follows when the lagged data are introduced:

[0026] x(t n -τ)=[x1(t n -τ1),x2(t n -τ2),…,x p (t n -τ p )] (11)

[0027] t n is the sampling time of the nth sample, τ p The delay time that the data of the p-th variable at the current moment needs to be adjusted forward;

[0028] (2) Constructing a sparse matrix of data features

[0029] To improve computational efficiency and simplify data processing;

[0030]

[0031] Among them, d is the distance between sample pairs, S c is the cross section, t set is the sampling point time interval;

[0032] Calculate the average distance between all pairs of samples

[0033]

[0034] Where N is the number of samples in the data set;

[0035] Calculate the distance ratio r between the current sample and its adjacent samples relative to the average distance between sample pairs κ :

[0036]

[0037] Initialize an N×P matrix M, where M np represents the element in the nth row and pth column of the matrix, n=1,2,…,N,p=1,2,…,P, and its initial value is set to the original data matrix D, D=[x1(t n -τ1),x2(t n -τ2),…,x p (t n -τ p )],D np Represents the element in the nth row and pth column of the matrix, and selects the 95th percentile of the distance ratio distribution as the threshold Φ. If r κ If the threshold is exceeded, the original data is kept, otherwise it is set to 0, which is expressed as:

[0038]

[0039] (3) Establish an abnormal operating condition feature extraction model based on sparse autoencoder network

[0040] ①Autoencoding network structure

[0041] A sparse autoencoder model based on L21 norm regularization is established for feature extraction. The sparse autoencoder network consists of an encoding layer, a feature layer, and a decoding layer. The specific establishment is as follows:

[0042] Input layer: In order to meet the input requirements of the model, the urban sewage treatment process data is normalized to [0,1], consisting of 20 neurons, and the input variable is x1(t n ),x2(t n ),…,x 20 (t n );

[0043] Hidden layer: It consists of m neurons (m<20). The calculation formula of the hidden layer eigenvalue h in the sparse autoencoder network is as follows:

[0044] h=f(W (1) x+b (1) ) (16)

[0045] Among them, W (1)is the weight connecting the input layer and the hidden layer, b (1) is the bias of the encoder. The initial weights and biases are randomly drawn from a normal distribution and multiplied by a scaling factor of 0.005. f represents the activation function f(x) = 1 / (1+2.718 -x );

[0046] Output layer: The hidden representation code is converted back to the reconstructed output of the input layer using the weights hidden to the output layer. It consists of 20 neurons. The output reconstruction process is calculated as follows:

[0047]

[0048] in, To reconstruct the data, W (2) is the weight connecting the hidden layer and the output layer, b (2) is the bias of the decoder. In this process, the activation function g is expressed as a linear transfer function g(x)=x;

[0049] ②Construct loss function

[0050] L21 norm regularization reduces the series weights to zero, allowing the corresponding neurons to be deleted, resulting in a leaner network. The total loss function of the L21-based sparse autoencoder network is defined as follows:

[0051] L=L R +L S +L KL (18)

[0052] Among them, L R is the error reconstruction function, L S is the regularization function, L KL is a sparse function;

[0053] The loss function consists of three parts, expressed as follows

[0054]

[0055] L S =0.0005||W T || 21 (20)

[0056]

[0057] Among them, KL (||) represents KL divergence, which is a measure of the difference between two probability distributions; the parameter ρ is a sparsity parameter, which is initially set to 0.01. represents the average activation value of the jth hidden unit;

[0058] ③Feature extraction performance evaluation

[0059] In order to continuously monitor and evaluate the operating status of the process, the squared prediction error (SPE) is used to monitor system performance and is calculated as follows:

[0060]

[0061] (4) Diagnosis of abnormal conditions in urban sewage treatment processes

[0062] The normal operating data of the sewage treatment process is used as the training set. The time lag is calculated and the data feature sparse matrix is ​​constructed according to formulas (1)-(15). Then, the sparse autoencoder is used to extract the features of the normal operating condition through the input layer, hidden layer and output layer according to formulas (16)-(21). Finally, the SPE threshold at 99% confidence level is determined by the kernel density estimation method. A condition greater than the threshold is considered an abnormal condition.

[0063] The creativity of the present invention is mainly reflected in:

[0064] (1) Aiming at the dynamic changes and non-stationarity of the current sewage treatment influent, the output data of the sensor presents an uneven distribution, and the present invention proposes an intelligent feature extraction method for abnormal working conditions of urban sewage treatment based on a sparse autoencoder network, which solves the problem of low accuracy of feature extraction for complex system data;

[0065] (2) The present invention designs a time-delay calculation equation by combining hydrodynamics to solve the uncertainty of residence time and the mismatch of water intake status. The delayed data is homogenized and the feature extraction of process variables is established based on a sparse autoencoder network to improve the accuracy of feature extraction; BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 is the SPE statistic monitored by the intelligent feature extraction method of the present invention under abnormal working conditions, wherein the dotted line is the control limit and the solid line is the SPE statistic; DETAILED DESCRIPTION

[0067] The experimental data comes from the water quality analysis table of a sewage treatment plant in 2021. 20 process variables are selected as samples, and the collected samples are x(t n )=[x1(t n ),x2(t n ),…,x p (t n )], where x(t n ) is the time t n The sample at the time, n represents the nth sampling moment, x p (t n ) is the time t n The pth process variable at time, p = 1,…,20; x1(t n) is t n The water flow rate at time, x2(t n ) is t n pH value of the water inlet chamber at the time of n ) is t n Chemical oxygen demand of the water inlet chamber at the time, x4(t n ) is t n The ammonia nitrogen concentration at the time, x5(t n ) is t n The temperature at the time, x6(t n ) is t n External reflux flow rate at time, x7(t n ) is t n Internal reflux flow rate at time, x8(t n ) is t n Backwash water volume at time, x9(t n ) is t n The dissolved oxygen concentration in front of aerobic pool I at that time, x 10 (t n ) is t n The air flow rate before the aerobic pool I at 1000 s, x 11 (t n ) is t n The dissolved oxygen concentration in aerobic pool I at the time of 12 (t n ) is t n The air flow rate in aerobic pool I at time x 13 (t n ) is t n Aerobic pool Dissolved oxygen concentration, x 14 (t n ) is t n Aerobic pool Air flow rate, x 15 (t n ) is t n The amount of excess sludge discharged at the time, x 16 (t n ) is t n The anaerobic pool redox potential at x 17 (t n ) is t n The redox potential of the anoxic pool at 18 (t n ) is t n The nitrate nitrogen concentration in the anoxic pool at 19 (t n ) is t n Mixed liquid suspended solids in the anoxic tank, x 20 (t n ) is t npH of the secondary sedimentation tank at 100°C;

[0068] The time lag between two adjacent sensors is calculated based on hydrodynamic analysis. The time lag τ2 between the front and end monitoring points of the primary sedimentation tank is expressed as τ2=T2-T1, where T1 is the time taken by the influent to reach the front monitoring point of the primary sedimentation tank, and T2 is the time taken by the influent to reach the end monitoring point of the primary sedimentation tank. The judgment condition and value of τ2 are expressed as follows:

[0069]

[0070] Among them, Q in is the water inlet flow rate, V PS It is the volume flow rate between the two monitoring points at the front end and the end of the primary sedimentation tank;

[0071] In the pre-anoxic zone and the anaerobic zone, the flow rate is calculated as the influent flow rate Q in and external reflux flow Q R The sum of the two monitoring points is set in the anaerobic zone at this stage, which are located in the middle and end of the anaerobic zone. The time lag between the end of the primary sedimentation tank and the middle of the anaerobic zone is τ3, and the time lag between the middle of the anaerobic zone and the end of the anaerobic zone is τ4. u The judgment conditions and values ​​of (u=3,4) are expressed as:

[0072]

[0073]

[0074] Among them, V u Represents the volume flow rate between two monitoring points, V3 is the volume flow rate between the end of the primary sedimentation tank and the middle of the anaerobic zone, and V4 is the volume flow rate between the middle of the anaerobic zone and the end of the anaerobic zone;

[0075] The main biochemical reaction zone includes anoxic zone I, aerobic zone I and deoxygenation zone. The flow rate is calculated as the inflow flow rate Q in , External return flow Q R and the internal reflux flow Q r The sum of 7 monitoring points is set in this stage, and the time lag τ v (v=5,…,11) The judgment conditions and values ​​are expressed as:

[0076]

[0077] Among them, T4 is the time taken for the influent to flow to the monitoring point at the end of the anaerobic zone, V vis the volume flow rate between two adjacent monitoring points in this stage, V5 is the volume flow rate between the end of the anaerobic zone and the middle of the anoxic zone I, V6 is the volume flow rate between the middle of the anoxic zone I and the end of the anoxic zone I, V7 is the volume flow rate between the end of the anoxic zone I and the front end of the aerobic zone I, V8 is the volume flow rate between the front end of the aerobic zone I and the front end of the aerobic zone I, V9 is the volume flow rate between the front end of the aerobic zone I and the middle end of the aerobic zone I, V 10 is the volume flow rate between the monitoring points at the middle and end of aerobic zone I, V 11 is the volume flow rate between the monitoring points at the end of aerobic zone I and the end of anoxic zone;

[0078] In the hypoxic zone and aerobic zone The flow rate is composed of the inlet flow Qin and the external return flow Q R Jointly decided, there are 2 monitoring points in this stage, with a time lag of τ w (w=12,13) ​​The judgment conditions and values ​​are expressed as:

[0079]

[0080] Among them, T 11 V is the time taken by the influent to reach the monitoring point at the end of the deoxidation zone. w is the volume flow rate between two monitoring points, V 12 The end of the oxygen-dissipating zone and the aerobic zone Volume flow between front-end monitoring points, V 13 Aerobic Zone Front end and aerobic zone Volume flow between terminal monitoring points;

[0081] Aerobic Zone The time lag τ between the monitoring point and the sedimentation tank monitoring point 14 It is expressed as:

[0082]

[0083] Among them, Q W is the amount of sand filter backwash wastewater, T 13 V is the time taken by the influent to reach the monitoring point at the end of the aerobic zone II. SS Aerobic Zone Volume flow rate between the monitoring point of the secondary sedimentation tank;

[0084] For a sample at time t n The variables at are adjusted as follows when the lagged data are introduced:

[0085] x(t n -τ)=[x1(t n -τ1),x2(tn -τ2),…,x p (t n -τ p )] (11)

[0086] t n is the sampling time of the nth sample, τ p is the delay time that the data of the pth variable at the current moment needs to be adjusted forward; (2) construct a data feature sparse matrix

[0087] To improve computational efficiency and simplify data processing;

[0088]

[0089] Among them, d is the distance between sample pairs, S c is the cross section, t set is the sampling point time interval;

[0090] Calculate the average distance between all pairs of samples

[0091]

[0092] Where N is the number of samples in the data set;

[0093] Calculate the distance ratio r between the current sample and its adjacent samples relative to the average distance between sample pairs κ :

[0094]

[0095] Initialize an N×P matrix M, where M np represents the element in the nth row and pth column of the matrix, n=1,2,…,N,p=1,2,…,P, and its initial value is set to the original data matrix D, D=[x1(t n -τ1),x2(t n -τ2),…,x p (t n -τ p )],D np represents the element in the nth row and pth column of the matrix; the 95th percentile of the distance ratio distribution is selected as the threshold Φ. If r κ If the threshold is exceeded, the original data is kept, otherwise it is set to 0, which is expressed as:

[0096]

[0097] (3) Establish an abnormal operating condition feature extraction model based on sparse autoencoder network

[0098] ①Autoencoding network structure

[0099] A sparse autoencoder model based on L21 norm regularization is established for feature extraction. The sparse autoencoder network consists of an encoding layer, a feature layer, and a decoding layer. The specific establishment is as follows:

[0100] Input layer: In order to meet the input requirements of the model, the urban sewage treatment process data is normalized to [0,1], consisting of 20 neurons, and the input variable is x1(t n ),x2(t n ),…,x 20 (t n );

[0101] Hidden layer: It consists of m neurons (m<20). The calculation formula of the hidden layer eigenvalue h in the sparse autoencoder network is as follows:

[0102] h=f(W (1) x+b (1) ) (16)

[0103] Among them, W (1) is the weight connecting the input layer and the hidden layer, b (1) is the bias of the encoder. The initial weights and biases are randomly drawn from a normal distribution and multiplied by a scaling factor of 0.005. f represents the activation function f(x) = 1 / (1+2.718 -x );

[0104] Output layer: The hidden representation code is converted back to the reconstructed output of the input layer using the weights hidden to the output layer. It consists of 20 neurons. The output reconstruction process is calculated as follows:

[0105]

[0106] in, To reconstruct the data, W (2) is the weight connecting the hidden layer and the output layer, b (2) is the bias of the decoder. In this process, the activation function g is expressed as a linear transfer function g(x)=x;

[0107] ②Construct loss function

[0108] L21 norm regularization reduces the series weights to zero, allowing the corresponding neurons to be deleted, resulting in a leaner network. The total loss function of the L21-based sparse autoencoder network is defined as follows:

[0109] L=L R +L S +L KL (18)

[0110] Among them, L Ris the error reconstruction function, L S is the regularization function, L KL is a sparse function;

[0111] The loss function consists of three parts, expressed as follows

[0112]

[0113] L S =0.0005||W T || 21 (20)

[0114]

[0115] Among them, KL (||) represents KL divergence, which is a measure of the difference between two probability distributions; the parameter ρ is a sparsity parameter, which is initially set to 0.01. represents the average activation value of the jth hidden unit;

[0116] ③Feature extraction performance evaluation

[0117] In order to continuously monitor and evaluate the operating status of the process, the squared prediction error (SPE) is used to monitor system performance and is calculated as follows:

[0118]

[0119] (4) Diagnosis of abnormal conditions in urban sewage treatment processes

[0120] The normal operating data of the sewage treatment process is used as the training set. The time lag is calculated and the data feature sparse matrix is ​​constructed according to formulas (1)-(15). Then, the sparse autoencoder is used to extract the features of the normal operating condition through the input layer, hidden layer and output layer according to formulas (16)-(21). Finally, the SPE threshold at 99% confidence level is determined by the kernel density estimation method. A condition greater than the threshold is considered an abnormal condition.

Claims

1. An intelligent feature extraction method for abnormal working conditions of urban sewage treatment based on sparse autoencoder network, characterized in that: The following steps are involved: (1) Data collection and time-delay calculation Taking the urban sewage treatment process as the research object, 20 process variables are selected as samples, and the collected samples are x(t n )=[x1(t n ),x2(t n ),…,x p (t n )], where x(t n ) is the time t n The sample at the time, n represents the nth sampling moment, x p (t n ) is the time t n The pth process variable at time, p = 1,…,20; x1(t n ) is t n The water flow rate at time, x2(t n ) is t n pH value of the water inlet chamber at the time of n ) is t n Chemical oxygen demand of the water inlet chamber at the time, x4(t n ) is t n The ammonia nitrogen concentration at n ) is t n The temperature at the time, x6(t n ) is t n External reflux flow rate at time, x7(t n ) is t n Internal reflux flow rate at time, x8(t n ) is t n Backwash water volume at time, x9(t n ) is t n The dissolved oxygen concentration in front of aerobic pool I at that time, x 10 (t n ) is t n The air flow rate before the aerobic pool I at 11 (t n ) is t n The dissolved oxygen concentration in aerobic pool I at the time of 12 (t n ) is t n The air flow rate in aerobic pool I at time x 13 (t n ) is t n The dissolved oxygen concentration in aerobic pool II at time x 14 (t n ) is t n The air flow rate in the aerobic pool II at 1000 s, x 15 (t n ) is t n The amount of excess sludge discharged at the time, x 16 (t n ) is t n The anaerobic pool redox potential at x 17 (t n ) is t n The redox potential of the anoxic pool at 18 (t n ) is t n The nitrate nitrogen concentration in the anoxic pool at 19 (t n ) is t n Mixed liquid suspended solids in the anoxic tank, x 20 (t n ) is t n pH of the secondary sedimentation tank at 100°C; The time lag between two adjacent sensors is calculated based on hydrodynamic analysis. The time lag τ2 between the front and end monitoring points of the primary sedimentation tank is expressed as τ2=T2-T1, where T1 is the time taken by the influent to reach the front monitoring point of the primary sedimentation tank, and T2 is the time taken by the influent to reach the end monitoring point of the primary sedimentation tank. The judgment condition and value of τ2 are expressed as follows: Among them, Q in is the water inlet flow rate, V PS It is the volume flow rate between the two monitoring points at the front end and the end of the primary sedimentation tank; In the pre-anoxic zone and the anaerobic zone, the flow rate is calculated as the influent flow rate Q in and external reflux flow Q R The sum of the two monitoring points is set in the anaerobic zone at this stage, which are located in the middle and end of the anaerobic zone. The time lag between the end of the primary sedimentation tank and the middle of the anaerobic zone is τ3, and the time lag between the middle of the anaerobic zone and the end of the anaerobic zone is τ4. u The judgment conditions and values ​​of (u=3,4) are expressed as: Among them, V u Represents the volume flow rate between two monitoring points, V3 is the volume flow rate between the end of the primary sedimentation tank and the middle of the anaerobic zone, and V4 is the volume flow rate between the middle of the anaerobic zone and the end of the anaerobic zone; The main biochemical reaction zone includes anoxic zone I, aerobic zone I and deoxygenation zone. The flow rate is calculated as the inflow flow rate Q in , External return flow Q R and the internal reflux flow Q r The sum of 7 monitoring points is set in this stage, and the time lag τ v (v=5,…,11) The judgment conditions and values ​​are expressed as: Among them, T4 is the time taken for the influent to flow to the monitoring point at the end of the anaerobic zone, V v is the volume flow rate between two adjacent monitoring points in this stage, V5 is the volume flow rate between the end of the anaerobic zone and the middle end of the anoxic zone I, V6 is the volume flow rate between the middle end of the anoxic zone I and the end of the anoxic zone I, V7 is the volume flow rate between the end of the anoxic zone I and the front end of the aerobic zone I, V8 is the volume flow rate between the front end of the aerobic zone I and the front end of the aerobic zone I, V9 is the volume flow rate between the front end of the aerobic zone I and the middle end of the aerobic zone I, V 10 is the volume flow rate between the monitoring points at the middle and end of aerobic zone I, V 11 is the volume flow rate between the monitoring points at the end of aerobic zone I and the end of anoxic zone; In the anoxic zone II and the aerobic zone II, the flow rate is composed of the inlet flow Qin and the external return flow Q R Jointly decided, there are 2 monitoring points in this stage, with a time lag of τ w (w=12,13) ​​The judgment conditions and values ​​are expressed as: Among them, T 11 V is the time taken by the influent to reach the monitoring point at the end of the deoxidation zone. w is the volume flow rate between two monitoring points, V 12 is the volume flow rate between the end of the aerobic zone and the front end of the aerobic zone II, V 13 is the volume flow rate between the monitoring points at the front end of aerobic zone II and the end of aerobic zone II; Time lag τ between the monitoring point in aerobic zone II and the monitoring point in sedimentation tank 14 It is expressed as: In the formula, Q W is the amount of sand filter backwash wastewater, T 13 V is the time taken by the influent to reach the monitoring point at the end of the aerobic zone II. SS is the volume flow rate between the aerobic zone II and the monitoring point of the secondary sedimentation tank; For a sample at time t n The variables at are adjusted as follows when the lagged data are introduced: x(t n -τ)=[x1(t n -τ1),x2(t n -τ2),…,x p (t n -t p )] (11) t n is the sampling time of the nth sample, τ p The delay time that the data of the p-th variable at the current moment needs to be adjusted forward; (2) Constructing a sparse matrix of data features To improve computational efficiency and simplify data processing; Where d is the distance between sample pairs, S c is the cross section, t set is the sampling point time interval; Calculate the average distance between all pairs of samples Where N is the number of samples in the data set; Calculate the distance ratio r between the current sample and its adjacent samples relative to the average distance between sample pairs κ : Initialize an N×P matrix M, where M np represents the element in the nth row and pth column of the matrix, n=1,2,…,N,p=1,2,…,P, and its initial value is set to the original data matrix D, D=[x1(t n -τ1),x2(t n -τ2),…,x p (t n -τ p )],D np represents the element in the nth row and pth column of the matrix; the 95th percentile of the distance ratio distribution is selected as the threshold Φ. If r κ If the threshold is exceeded, the original data is kept, otherwise it is set to 0, which is expressed as: (3) Establish an abnormal operating condition feature extraction model based on sparse autoencoder network ①Autoencoding network structure A sparse autoencoder model based on L21 norm regularization is established for feature extraction. The sparse autoencoder network consists of an encoding layer, a feature layer, and a decoding layer. The specific establishment is as follows: Input layer: In order to meet the input requirements of the model, the urban sewage treatment process data is normalized to [0,1], consisting of 20 neurons, and the input variable is x1(t n ),x2(t n ),…,x 20 (t n ); Hidden layer: It consists of m neurons (m<20). The calculation formula of the hidden layer eigenvalue h in the sparse autoencoder network is as follows: h=f(W (1) x+b (1) ) (16) Among them, W (1) is the weight connecting the input layer and the hidden layer, b (1) is the bias of the encoder. The initial weights and biases are randomly drawn from a normal distribution and multiplied by a scaling factor of 0.

005. f represents the activation function f(x) = 1 / (1+2.718 -x ); Output layer: The hidden representation code is converted back to the reconstructed output of the input layer using the weights hidden to the output layer. It consists of 20 neurons. The output reconstruction process is calculated as follows: in, To reconstruct the data, W (2) is the weight connecting the hidden layer and the output layer, b (2) is the bias of the decoder. In this process, the activation function g is expressed as a linear transfer function g(x)=x; ②Construct loss function L21 norm regularization reduces the series weights to zero, allowing the corresponding neurons to be deleted, resulting in a leaner network. The total loss function of the L21-based sparse autoencoder network is defined as follows: L=L R +L S +L KL (18) Among them, L R is the error reconstruction function, L S is the regularization function, L KL is a sparse function; The loss function consists of three parts, expressed as follows L S =0.0005||W T || 21 (20) Among them, KL (||) represents KL divergence, which is a measure of the difference between two probability distributions; the parameter ρ is a sparsity parameter, which is initially set to 0.

01. represents the average activation value of the jth hidden unit; ③Feature extraction performance evaluation In order to continuously monitor and evaluate the operating status of the process, the squared prediction error SPE is used to monitor system performance and is calculated as follows: (4) Diagnosis of abnormal conditions in urban sewage treatment processes The normal operating data of the sewage treatment process is used as the training set. The time lag is calculated and the data feature sparse matrix is ​​constructed according to formulas (1)-(15). Then, the sparse autoencoder is used to extract the features of the normal operating condition through the input layer, hidden layer and output layer according to formulas (16)-(21). Finally, the SPE threshold at 99% confidence level is determined by the kernel density estimation method. A condition greater than the threshold is considered an abnormal condition.