The present invention relates to the technical field of fault monitoring based on data-driven, in particular to a fault monitoring technology for sewage treatment processes. The fault monitoring method of the present invention for the intermittent process is a specific application in the fault monitoring of the sewage treatment process.
In recent years, with the advancement of science and technology, the process of industrialization and urbanization has been accelerating, the number of people has continued to increase, and the pollution of the ecological environment has become increasingly serious. Among them, as an essential water resource for human life, due to its shortage and serious pollution, the protection of the water environment has become the consensus of today's society. People are seeking a practical way to protect the water environment, and sewage treatment plants are used as water resources. The key link in the environmental protection chain has received extensive attention from the outside world. The primary purpose of a sewage treatment plant is to ensure that its final product, that is, the quality of the effluent, can meet the prescribed discharge standards, and then improve the efficiency of sewage treatment on this basis to save costs. The prerequisite for achieving this goal is that the sewage treatment plant must be in a safe and stable operating state. Therefore, it is necessary to establish an effective process monitoring program to detect abnormal phenomena in time.
At present, neural network-based fault monitoring methods based on machine learning are widely used in the field of fault monitoring in sewage treatment processes, such as DBN (Deep Belief Network), DBM (Deep Boltzmann Machine), ANN (Artificial Neural Network), AE (Auto-encoder)) and other methods. The currently popular deep neural networks have very powerful performance, but due to the large number of hyperparameters and complex structures involved, the training of the network is a very time-consuming process. In addition, the complexity of the deep network structure itself makes theoretical analysis of its deep structure very difficult. At present, most researches focus on adjusting parameters such as network weights or stacking more layers to obtain higher accuracy. Therefore, it takes a lot of time and expensive equipment and other hardware resources. Modern fast-paced industrial production process is difficult to meet these conditions.
In order to solve the above problems, a fault monitoring method for sewage treatment process based on fuzzy width adaptive learning model is proposed. The method includes a set of first-order TS fuzzy subsystem and enhanced node layer. First, each fuzzy subsystem processes the input data, and then connects the processed intermediate values as vectors and sends them to the enhanced node group for nonlinear conversion. Secondly, the output of the enhancement layer and the defuzzification output of the fuzzy subsystem are used to generate the final model output. The parameters of the model include the enhanced node group and the final output connection weight. The coefficients of the subsequent parts of fuzzy rules in each fuzzy subsystem can be quickly calculated by pseudo-inverse calculations. Different from the traditional deep network, this method only needs to reconstruct the model in an incremental manner, without retraining entire network from scratch. On the premise of ensuring that the accuracy meets the requirements, the characteristic of fuzzy width learning system to continuously adjust itself with the production process makes it possible to realize online fault monitoring sewage treatment process.
The technical scheme and implementation steps adopted by the present invention include “network training phase” and “online monitoring phase”. The specific steps are as follows:
A. Network Training Stage:
1) Collect historical data {X, Y} of the sewage treatment process as training data, where X=(x1, x2, . . . , xN)T∈N×M, Y=(y1, y2, . . . , yC)T∈N×C, Y is used as label data, the label is 0 during the normal period of the process, and the label data is 1 during the fault period. N is the number of input samples, M is the number of variables, and C is the dimension of the corresponding output (in this method, the output dimension is 2, which means normal and faulty states).
2) For input data X=(x1, x2, . . . , xN)T∈N×M, Xs=(xs1, xs2, . . . , xsM), s=1, 2, . . . , N. The model has n fuzzy subsystems, m enhanced node groups, and the i-th fuzzy subsystem contains K fuzzy rules. The first-order TS fuzzy model is used, where the i-th fuzzy subsystem is taken as an example (i=1, 2, . . . , n). When the input data is the s-th training sample, the output of i-th fuzzy subsystem and k-th fuzzy rule is:
Wherein fki is a polynomial of the first degree, αkti is a parameter obtained by initialization which obeys uniform distribution [0,1], t=1, 2, . . . , M, k=1, 2, . . . , K is the number of variables.
3) For the s-th training sample, calculate weighted strength ωski of k-th fuzzy rule of the i-th fuzzy subsystem:
Where τski represents weighted strength of the kth fuzzy rule of i-th fuzzy subsystem (k=1, 2, . . . , K) when the input training sample is Xs (xs=(xs1, xs2, . . . , xsM)), the formula is as follows:
Where μkti(xst) is the Gaussian membership function (t=1, 2, . . . , M) corresponding to the input sample Xst, and its formula is expressed as:
Wherein ckti and δkti are parameters, and the value of ckti is the value of cluster center obtained by C-means clustering, δkti=1
4) Calculate the output Zn of n fuzzy subsystems corresponding to sth training sample:
Z
n=(Z1,Z2, . . . ,Zn)∈N×(k
Wherein, Z1, Z2, . . . , Zn respectively correspond to the output of n subsystems, k1, k2, . . . , kn respectively correspond to the number of fuzzy rules of n fuzzy subsystems, and the sth training sample.
Taking i-th fuzzy subsystem as an example, for all training samples, the output matrix Zi is obtained by the following formula:
Z
i=(Z1i,Z2i, . . . ,ZNi)T∈N×K,i=1,2, . . . ,n
Wherein, Z1i, Z2i, . . . , ZNi respectively represent the output vector of i-th fuzzy subsystem for N training samples. Taking s-th sample as an example, the output vector of i-th fuzzy subsystem can be obtained by the following formula:
Z
si=(ωs1izs1i,ωs2izs2i, . . . ,ωsk
Wherein, zski and ωski are obtained by 2) and 3) respectively, and k=1, 2, . . . , K.
5) Input the output Zn obtained in 4) into m enhanced node groups mentioned in 2) for nonlinear conversion. Wherein, the j-th enhanced node group has Lj neurons (j=1, 2, . . . , m). For m enhanced node groups, the output matrix can be expressed as:
H
m=(H1,H2, . . . ,Hm)∈N×(L
Wherein, L1, L2, . . . , Lm respectively represent the number of neurons contained in m enhanced node groups, H1=ξj(ZnWj+βj)∈N×L
6) Calculate the defuzzification output of fuzzy subsystem. Then for s-th training sample Xs, the defuzzification output vector of i-th fuzzy subsystem can be expressed as:
Introduce parameter δkci to the result part of each fuzzy rule. The parameter value is obtained by pseudo-inverse operation method, and C represents dimension of output. Since Y=∈N×C has C dimensions, each fuzzy subsystem is a multi-output model. After the parameter is introduced, its new output is:
Where s=1, 2, . . . , N, then, for all training samples X, the output of the i-th fuzzy subsystem is:
Thus, the output of n fuzzy subsystems can be obtained:
Wherein, Ω=(Ω1, Ω2, . . . , Ωn)∈N×nk is the matrix containing the weighted strengthen ωski obtained in 3). Δ=((δ1)T, . . . , (δn)T)T∈nK×C
7) Calculate the final output result. Weight between fuzzy subsystem and output is set to 1, and the weight between enhanced node group and output is set to We∈(L
For a given training target Y, the matrix W can be calculated by pseudo-inverse:
W=(DΩ,Hm)+Y
Wherein, so far, the network model training is complete.
B Online Monitoring:
8) During online monitoring, set the new data Xnew=(xnew,1, xnew,2, . . . , xnew,N)T∈N×M, Xnew,s=(Xnew,1, Xnew,2, . . . , Xnew,M), s=1, 2, . . . , N. For n fuzzy subsystems in the training part, taking i-th subsystem as an example, using first-order T-S fuzzy system, then:
The value of αkti is the value corresponding to the training part.
9) For s-th test sample, the weighted strength of i-th fuzzy subsystem is as follows:
Where τnew,ski represents the strength of k-th fuzzy rule of i-th fuzzy subsystem, which is obtained by the following formula:
Where μkti(xnew,st) is the Gaussian membership function corresponding to the input sample Xnew,st (t=1, 2, . . . , M), and its formula is expressed as:
Wherein, ckti and δkti are parameters, and their values are the same as corresponding parameter values of the training part.
10) For all test samples, find the output Znewn of n fuzzy subsystems. The formula is as follows:
Z
new
n=(Znew1,Znew2, . . . ,Znewn)∈N×nK
The output Znewi of i-th fuzzy subsystem can be expressed as follows:
Z
newi=(Znew,1i,Znew,2i, . . . ,Znew,Ni)T∈N×K,i=1,2, . . . ,n
Taking s-th training sample among all N samples as an example, the output vector Znew,si of i-th fuzzy subsystem can be expressed as:
Z
new,si=(ωnew,s1iznew,s1i,ωnew,s2iznew,s2i, . . . ,ωnew,sKiznewsKi)
Where (s=1, 2, . . . , N)
Wherein, znew,ski and ωnew,ski are obtained by 8) and 9) respectively, k=1, 2, . . . , K.
11) The output Znewn obtained in 10) is subjected to nonlinear conversion.
Then for m enhanced node groups, the output matrix of enhanced layer can be expressed as:
H
new
m=(Hnew1,Hnew2, . . . ,Hnewm)∈N×(L
Where Hnewj=ξj(ZnewnWj+βj)∈N×L
12) Calculate the defuzzification output of fuzzy subsystem.
After introducing parameter δkci to the result part of each fuzzy rule, c=1, 2, . . . , C. For s-th training sample, defuzzification output vector of i-th fuzzy subsystem can be expressed as:
Then, for all training samples X, the output of i-th fuzzy subsystem is:
Thus, the output of n fuzzy subsystems can be obtained:
Wherein, Ωnew=(Ωnew1, . . . , Ωnewn)∈N×nK is the matrix containing weighted strength ωnew,ski obtained in 9).
Δ=((δ1)T, . . . ,(δn)T)T∈nK×C
13) Calculate the final output value. Set the weight between combined output of connection enhancement node to We∈(L
The formula is as follows:
Ŷ=F
new
n
+H
new
m
W
e
(DnewΩnew,Hnewm)W
The value of W corresponds to the value of parameter matrix of network training part.
(DnewΩnew,Hnewm)=((DnewΩnew,Hnewm)T(DnewΩnew,Hnewm))−1(DnewΩnew,Hnewm)T
14) The output value Ŷ is converted to zero by one-hot encoding method. When it is 0, it means that the operation is in a normal state. When the output value is 1, it means that the operation is faulty, so as to realize fault monitoring.
The present invention uses the historical data of sewage treatment process to train the network model. When training the model, normal process data is labeled as 0 and the fault period data is labeled as 1, the network parameters obtained by training are used for online fault monitoring.
Compared with current popular deep network, the present invention only needs to increase the number of enhanced nodes and can be reconstructed in an incremental manner without retraining the entire network from scratch. On the premise of ensuring that the accuracy meets the requirements, the present invention continuously and rapidly adjusts itself as the production process changes, realizes timely online faults monitoring of sewage treatment process, and obtains good monitoring results.
In order to solve the above-mentioned problems, a fault monitoring method of sewage treatment process based on fuzzy width adaptive learning model is proposed, which is based on an online monitoring equipment. The whole device includes input module, information processing module, console module, output result visualization module. The proposed method is imported into the information processing module, and then the network monitoring model is established with the process data retained by the actual industry, and the established model is saved for online fault monitoring. In actual online monitoring of industrial processes, first connect real-time process variables collected by the factory data sensor to input module as the input information of monitoring equipment, and then select previously trained model through console to monitor, and the monitoring results is displayed in real time through visualization module, so that on-site staff can make timely corresponding measures based on visualization monitoring results to reduce the economic loss caused by process failures.
The sewage treatment process is extremely complex, including not only a variety of physics and chemistry, but also biochemical reactions. In addition, various uncertain factors are flooded with it, such as influent flow, water quality and load changes, which give huge challenges for establishment of sewage treatment monitoring model. The present invention uses the “benchmark simulation model 1” (benchmark simulation model 1) developed by the International Water Association (IWA) as the actual sewage treatment process for real-time simulation. The model consists of five reaction tanks (5999 m3) and a secondary settling tank (6000 m3), in addition, it has three aeration tanks. The aeration tank has 10 layers, 4 meters deep, and covers an area of 1500 m2. The reaction process includes internal and external reflux. The average sewage treatment flow rate is 20 000 m3/d, and the chemical oxygen demand is 300 mg/l.
This experiment takes BSM1 sewage data as the research object, the sampling interval is 15 minutes, and the sampling period is 14 days. That is, there are 96 sampling points every day, totaling 1344 sampling points. Select 16 variables to monitor the operating status of the process, as shown in Table 1. A batch of normal data and 4 batches of fault data are used as training data to train the network offline, and 4 batches of fault data are used as test data to verify the effectiveness of the method. Set the fault types of two types of faults under rainy conditions: single fault and compound fault. The fault occurrence time is both the eighth day and the ninth day. The detailed information of the fault is shown in Table 2.
The fault monitoring process of the application of the present invention in the above-mentioned BSM1 sewage treatment process is specifically stated as follows:
Step 1: Collect a batch of operating data under normal working conditions and 4 batches of fault data as a training data X∈N×M set through BSM1 platform. Each batch of data samples has 1344 points, 16 variables. Take five sets of data as a training data set. It can be expressed as X (6720×16), label the data, the label value is 0 at normal time, and the label value at fault time is 1, which is represented as Y (6720×2).
Step 2: The number of fuzzy subsystems, enhanced node groups, and fuzzy rules of each fuzzy subsystem are determined according to the actual situation. The model in this embodiment contains n=8 fuzzy subsystems, m=10 enhanced node groups, and each group contains 10 neurons. The number of fuzzy rules for each fuzzy subsystem is 5, and the first-order T-S is adopted. Fuzzy model, taking the i-th fuzzy subsystem as an example (i=1, 2, . . . , n), when the input data is s-th training sample, the output of k-th fuzzy rule of i-th fuzzy subsystem is:
Wherein, fki is a polynomial of the first degree, αkti is a parameter, obeys uniform distribution [0,1], t=1, 2, . . . , M, k=1, 2, . . . , K represents the number of variables.
Step 3: For the s-th training sample, calculate weighted strength ωski of k-th fuzzy rule of the i-th fuzzy subsystem:
Where τski represents weighted strength of the kth fuzzy rule of i-th fuzzy subsystem (k=1, 2, . . . , K) when the input training sample is Xs (xs=(xs1, xs2, . . . , xsM)), the formula is as follows:
Where μkti(xst) is the Gaussian membership function (t=1, 2, . . . , M) corresponding to the input sample Xst, and its formula is expressed as:
Wherein ckti and δkti are parameters, and the value of ckti is the value of cluster center obtained by C-means clustering, δkti=1
Step 4: Calculate the output Zn of n fuzzy subsystems corresponding to sth training sample:
Z
n=(Z1,Z2, . . . ,Zn)∈N×(k
Wherein, Z1, Z2, . . . , Z1 respectively correspond to the output of n subsystems, k1, k2, . . . , kn respectively correspond to the number of fuzzy rules of n fuzzy subsystems, and the sth training sample.
Taking i-th fuzzy subsystem as an example, for all training samples, the output matrix Zi is obtained by the following formula:
Z
i=(Z1i,Z2i, . . . ,ZNi)T∈N×K,i=1,2, . . . ,n
Wherein, Z1i, Z2i, . . . , ZNi respectively represent the output vector of i-th fuzzy subsystem for N training samples. Taking s-th sample as an example, the output vector of i-th fuzzy subsystem can be obtained by the following formula:
Z
si=(ωs1izs1i,ωs2izs2i, . . . ,ωsk
Wherein, zski and ωski are obtained by 2) and 3) respectively, and k=1, 2, . . . , K.
Step 5: Input the output Zn obtained in step 4 into m enhanced node groups mentioned in step 2 for nonlinear conversion. Wherein, the j-th enhanced node group has Lj neurons (=1, 2, . . . , m). For m enhanced node groups, the output matrix can be expressed as:
H
m=(H1,H2, . . . ,Hm)∈N×(L
Wherein, L1, L2, . . . , Lm respectively represent the number of neurons contained in m enhanced node groups, Hj=ξj(ZnWj+βj)∈N×L
Step 6: Calculate the defuzzification output of fuzzy subsystem. Then for s-th training sample Xs, the defuzzification output vector of i-th fuzzy subsystem can be expressed as:
Introduce parameter δkci to the result part of each fuzzy rule. The parameter value is obtained by pseudo-inverse operation method, and C represents dimension of output. Since Y=∈N×C has C dimensions, each fuzzy subsystem is a multi-output model. After the parameter is introduced, its new output is:
Where s=1, 2, . . . , N, then, for all training samples X, the output of the i-th fuzzy subsystem is:
Thus, the output of n fuzzy subsystems can be obtained:
Wherein, Ω=(Ω1, Ω2, . . . , Ωn)∈N×nk is the matrix containing the weighted strengthen ωski obtained in 3). Δ=((δ1)T, . . . , (δn)T)T∈nK×C
Step 7: Calculate the final output result. Weight between fuzzy subsystem and output is set to 1, and the weight between enhanced node group and output is set to We∈(L
For a given training target Y, the matrix W can be calculated by pseudo-inverse:
W=(DΩ,Hm)+Y
Wherein, so far, the network model training is complete.
B Online Monitoring:
Step 8: During online monitoring, set the new data Xnew=(xnew,1, xnew,2, . . . , xnew,N)T∈N×M, Xnew,s=(Xnew,1, Xnew,2, . . . , Xnew,M), s=1, 2, . . . , N. For n fuzzy subsystems in the training part, taking i-th subsystem as an example, using first-order T-S fuzzy system, then:
The value of αkti is the value corresponding to the training part.
Step 9: For s-th test sample, the weighted strength of i-th fuzzy subsystem is as follows:
Where τnew,ski represents the strength of k-th fuzzy rule of i-th fuzzy subsystem, which is obtained by the following formula:
Where μkti(xnew,st) is the Gaussian membership function corresponding to the input sample Xnew,st (t=1, 2, . . . , M), and its formula is expressed as:
Wherein, ckti and δkti are parameters, and their values are the same as corresponding parameter values of the training part.
Step 10: For all test samples, find the output Znewn of n fuzzy subsystems. The formula is as follows:
Z
new
n=(Znew1,Znew2, . . . ,Znewn)∈N×nK
The output Znewi of i-th fuzzy subsystem can be expressed as follows:
Z
newi=(Znew,1i,Znew,2i, . . . ,Znew,Ni)T∈N×K,i=1,2, . . . ,n
Taking s-th training sample among all N samples as an example, the output vector Znew,si of i-th fuzzy subsystem can be expressed as:
Z
new,si=(ωnew,s1iznew,s1i,ωnew,s2iznew,s2i, . . . ,ωnew,sKiznewsKi)
Where (s=1, 2, . . . , N)
Wherein, Znew,ski and ωnew,ski are obtained by 8) and 9) respectively, k=1, 2, . . . , K.
Step 11: The output Znewn obtained in 10) is subjected to nonlinear conversion.
Then for m enhanced node groups, the output matrix of enhanced layer can be expressed as:
H
new
m=(Hnew1,Hnew2, . . . ,Hnewm)∈N×(L
Where Hnewj=ξj(ZnewnWj+βj)∈N×L
Step 12: Calculate the defuzzification output of fuzzy subsystem.
After introducing parameter δkci to the result part of each fuzzy rule, c=1, 2, . . . , C. For s-th training sample, defuzzification output vector of i-th fuzzy subsystem can be expressed as:
Then, for all training samples X, the output of i-th fuzzy subsystem is:
Thus, the output of n fuzzy subsystems can be obtained:
Wherein, Ωnew=(Ωnew1, . . . , Ωnewn)∈N×nK is the matrix containing weighted strength ωnew,ski obtained in 9).
Δ=((δ1)T, . . . ,(δn)T)T∈nK×C
Step 13: Calculate the final output value. Set the weight between combined output of connection enhancement node to We∈(L
Ŷ=F
new
n
+H
new
m
W
e
(DnewΩnew,Hnewm)W
The value of W corresponds to the value of parameter matrix of network training part.
(DnewΩnew,Hnewm)+=((DnewΩnew,Hnewm)T(DnewΩnew,Hnewm))−1(DnewΩnew,Hnewm)T
Step 14: The output value Ŷ is converted to zero by one-hot encoding method. When it is 0, it means that the operation is in a normal state. When the output value is 1, it means that the operation is faulty, so as to realize fault monitoring.
The above steps are specific application of the method of the present invention in fault monitoring of the sewage treatment process of BSM1 platform. In the experiment, two types of faults under sunny and dry weather conditions are used, namely single fault and compound fault, and the fault occurrence time is both on the eighth and ninth days. The experimental results are shown in
FAR=The number of false alarm/total normal time*100%
MAR=The number of missed alarm/total failure time*100%
ACC=(The number of false alarm+The number of missed alarm)/total sampling time*100%
Unilateral consideration of false alarm rate (FAR) or missed alarm rate (MAR) cannot fully reflect the quality of monitoring performance. Therefore, the false alarm rate (FAR) or missed alarm rate (MAR) shall be considered comprehensively. When the false alarm rate (When FAR and MAR are both low, that is, when the accuracy rate (ACC) is low, the monitoring performance is considered better.
Aiming at the situation of more rainy weather in summer in North China, this method specifically conducts monitoring experiments under rainy conditions. The experimental faults are divided into single faults and compound faults. For a single type of failure, the fuzzy rule for each subsystem is 8, and the enhanced node group is 10. For fault 1, the fault amplitude muh=3.5, the start time is 673, and the end time is 864. The monitoring results are shown in
Subsequently, the fault type under rainy conditions was changed to a composite fault for verification. The system has a total of 10 fuzzy subsystems, each of which contains 8 fuzzy rules, and there are 10 enhanced node groups. For fault 3, the amplitude is muh=2, BH=0.45, and the false alarm rate is 0. At 720, there are 5 false alarms, and the false alarm rate is 2.62%. Considering the false alarm and the false alarm, the accuracy rate is ACC. It is 0.37%, which has a good monitoring effect overall, and the time used is 7.85 s, which can detect the occurrence of the fault in time. For fault 4, changing the fault amplitude to muh=2 and BH=0.45, the monitoring effect has not changed, and the detection performance can also be exerted well, and the network training time is 8.07 s. Judging from the monitoring effect of the above 4 failures, compared with the deep neural network, the overall performance of the method of the present invention is less time-consuming for network training under the condition that the monitoring effect is satisfactory, and the sewage treatment is greatly reduced. With the consumption of hardware resources in the plant, ordinary computers can do the job, which saves costs and enables timely online monitoring of faults in the sewage treatment process.
Number | Date | Country | Kind |
---|---|---|---|
201911225929.3 | Dec 2019 | CN | national |
This application is a continuation of International Application No. PCT/CN2019/124479, filed on Dec. 11, 2019, which claims priority to Chinese Patent Application No. 201911225929.3, filed on Dec. 3, 2019. The contents of the above applications are hereby incorporated by reference in their entireties and form a part of this specification.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2019/124479 | Dec 2019 | US |
Child | 17508911 | US |