A sewage treatment equipment fault diagnosis method and system
By introducing propagation correlation gain into the random forest algorithm and combining statistical data of the target device and upstream devices, the problem of the traditional random forest algorithm failing to capture the temporal sequence and inter-device correlation in the fault diagnosis of sewage treatment equipment is solved, and more accurate fault diagnosis is achieved.
Patent Information
- Application Number
- CN202511077472.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-08-01
AI Technical Summary
Traditional random forest algorithms fail to effectively capture the temporal propagation of faults and the inter-equipment propagation of faults in wastewater treatment equipment fault diagnosis, resulting in insufficient diagnostic accuracy.
By constructing a comprehensive split gain, combining the information gain and propagation correlation gain of the random forest algorithm, and utilizing statistical data from the target device and upstream devices, a random forest model is built to learn the timing of faults and the correlation information between devices.
It improves the accuracy of fault diagnosis, enabling better identification of the dynamic development process of faults and fault propagation between devices, and reducing misdiagnosis or missed diagnosis.
Smart Images

Figure CN120910724B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data processing, and in particular to a sewage treatment equipment fault diagnosis method and system. BACKGROUND
[0002] As a core component in the sewage treatment process, the stable operation of sewage treatment equipment is directly related to the efficiency of sewage treatment and the quality of effluent. Once the equipment fails, it may not only cause the interruption of sewage treatment, affecting the environment, but also bring high maintenance costs and economic losses. Therefore, timely and accurate fault diagnosis of sewage treatment equipment has become a key link to ensure the efficient and stable operation of the sewage treatment system.
[0003] Traditional methods of sewage treatment equipment fault diagnosis rely heavily on manual inspection and experience-based judgment. This approach not only consumes time and effort, but also depends heavily on the experience level of technical personnel, making it difficult to meet the real-time and accuracy requirements of modern sewage treatment plants for fault diagnosis. With the development of artificial intelligence technology, machine learning algorithms have been widely applied in the field of fault diagnosis. Among them, the random forest algorithm, with its good classification performance, anti-overfitting ability, and ability to handle high-dimensional data, has been gradually applied to the fault diagnosis of sewage treatment equipment.
[0004] However, the traditional random forest algorithm has obvious limitations in dealing with sewage treatment equipment fault diagnosis problems. On the one hand, the sewage treatment process is a dynamic process, and the operating state of the equipment will change over time. The occurrence and development of faults often have a time sequence propagation. For example, a small initial fault in a device may gradually affect other components of the device over time, or cause the fault to worsen over time. However, the traditional random forest algorithm usually only uses single-time device operating data for fault diagnosis, ignoring the relevance between data at different times and the time sequence evolution characteristics of faults, making it difficult to capture the dynamic development process of faults and thus affecting the accuracy of diagnosis. On the other hand, in the sewage treatment system, each device does not operate independently, but is interconnected and interdependent, forming a complex cooperative system. Once a device fails, it may spread to other related devices through pipeline connections, energy transmission, or material exchange, causing a chain reaction. For example, a pump failure may cause abnormal pressure in the pipeline, affecting the normal operation of the valve; aeration equipment failure may affect the dissolved oxygen content in the biochemical reaction tank, affecting the activity of microorganisms and indirectly causing the treatment effect of the sedimentation tank to decline. However, the traditional random forest algorithm, when diagnosing faults, usually only analyzes the operating data of a single device without considering the fault propagation between devices, making it difficult to identify abnormalities caused by other device failures and leading to misdiagnosis or missed diagnosis.
[0005] Therefore, how to effectively combine the time sequence propagation of the sewage treatment equipment fault and the fault propagation between the equipment, and improve the accuracy of the random forest algorithm in fault diagnosis, has become a problem to be solved in the field of sewage treatment equipment fault diagnosis. Based on this, the sewage treatment equipment fault diagnosis method is proposed by adding the time sequence propagation and the fault propagation between the equipment into the random forest algorithm, so as to realize more accurate fault diagnosis. SUMMARY
[0006] In order to solve the problem of how to make the random forest model learn the information characteristics of the time sequence propagation and the propagation of the fault between the equipment, and improve the accuracy of fault diagnosis, the sewage treatment equipment fault diagnosis method and system are provided.
[0007] In the first aspect, the sewage treatment equipment fault diagnosis method provided by the present application adopts the following technical scheme:
[0008] The sewage treatment equipment fault diagnosis method comprises the following steps:
[0009] Obtain a training data set, each sample in the training data set is a correlation feature vector of all kinds of diagnostic feature categories at each time with a fault label, and the correlation feature vector is composed of statistical data of diagnostic feature data of a diagnostic target sewage treatment equipment fault and statistical data of corresponding diagnostic feature data of an upstream equipment;
[0010] Construct a comprehensive split gain, the comprehensive split gain is equal to the weighted cumulative sum of the information gain of the random forest algorithm and the propagation correlation gain; wherein the propagation correlation gain is positively correlated with the autocorrelation of the statistical data of the diagnostic feature data of the target sewage treatment equipment in time sequence, and is positively correlated with the correlation of the statistical data of the diagnostic feature data of the target sewage treatment equipment and the statistical data of the corresponding diagnostic feature data of the upstream equipment;
[0011] Based on the comprehensive split gain, a random forest model is constructed by using the training data set, so as to realize fault diagnosis of the target equipment.
[0012] This invention no longer uses fault diagnosis feature data of a single-moment target wastewater treatment device to construct samples. Instead, it uses continuous statistical data plus fault diagnosis feature data of upstream devices to construct samples. This allows the dataset to include temporal information of fault analysis and inter-device correlation information, providing a data foundation for the random forest model to learn temporal fault information and inter-device correlation information, thus laying the foundation for improved fault diagnosis. Furthermore, by adding a propagation correlation gain to the original information gain of the random forest algorithm, the propagation correlation gain is used to supervise the random forest model's ability to learn temporal information and inter-device correlation information, thereby improving the accuracy of fault diagnosis by the random forest model. Furthermore, when calculating the propagation correlation gain, the temporal autocorrelation of the statistical data of the diagnostic feature data of the target wastewater treatment device and the correlation between the statistical data of the diagnostic feature data of the target wastewater treatment device and the corresponding statistical data of the upstream devices are introduced to ensure that the propagation correlation gain includes temporal correlation information and inter-device correlation information, providing a basis for supervising the training of the random forest model.
[0013] Preferably, the associated feature vector includes:
[0014] Acquire several time series sequences of characteristic data required for fault diagnosis of the target wastewater treatment equipment; obtain a data segment of a preset length before the data at any time point of a diagnostic characteristic data time series sequence of the target wastewater treatment equipment, and denote the vector composed of the statistical characteristic data of the data segment as the statistical descriptor of the diagnostic characteristic at that time point, and denote the vector composed of the statistical descriptor at that time point and the statistical descriptors of the previous preset number of times as the statistical descriptor vector of the diagnostic characteristic at that time point; obtain the statistical descriptors of the diagnostic characteristic of each upstream device at the corresponding time point, and concatenate the statistical descriptors of all upstream devices after the statistical descriptor vector to obtain the associated feature vector of the diagnostic characteristic at that time point.
[0015] This invention introduces the statistical descriptor vectors of the target sewage treatment equipment and the statistical descriptors of upstream equipment when calculating the associated feature vectors, so that the samples contain time-series information and information of associated equipment, thereby providing a data foundation for the random forest model to learn relevant information.
[0016] Preferably, the statistical feature data are the first, second, third, and fourth moments of all data in the data segment.
[0017] This invention utilizes moments of various orders to reflect the statistical information of data from various dimensions such as value, variation characteristics, and distribution characteristics, so that it can reflect the data information more comprehensively.
[0018] Preferably, the method for obtaining the corresponding time includes:
[0019] The time interval between all data in the time sequence of the diagnostic characteristic data of the target wastewater treatment equipment and the matching data in the time sequence of the corresponding diagnostic characteristic data of the upstream equipment is taken as the lag length.
[0020] The Sth time point before the time point is taken as the corresponding time point, and S represents the lag length.
[0021] Preferably, the propagation correlation gain satisfies the relationship:
[0022] ;
[0023] wherein the data set of the parent node is obtained, the autocorrelation of the jth statistical characteristic data in all statistical descriptors of the statistical descriptor vector of the ith time point of the diagnostic characteristic of the target wastewater treatment equipment, M represents the number of samples in the data set of the parent node, the correlation between the statistical descriptor of the ith time point of the diagnostic characteristic of the target wastewater treatment equipment and the statistical descriptor of the corresponding time point of the diagnostic characteristic of the kth upstream equipment, and W represents the number of upstream equipment of the target wastewater treatment equipment, the propagation correlation gain of the diagnostic characteristic.
[0024] In the present application, the autocorrelation of a statistical characteristic data in all statistical descriptors of all statistical descriptor vectors is introduced when calculating the propagation correlation gain to reflect the time sequence information of the diagnostic characteristic, so that the time sequence information can be contained in the propagation correlation gain. Further, the correlation between the statistical descriptor of the target wastewater treatment equipment and the statistical descriptor of the upstream equipment is introduced when calculating the propagation correlation gain to reflect the correlation of the diagnostic characteristic data between the equipment, so that the correlation information between the equipment can be contained in the propagation correlation gain.
[0025] Preferably, the weight setting method of the propagation correlation gain comprises:
[0026] Correlation of all kinds of diagnostic feature data time sequence of the target sewage treatment equipment is calculated, and the mean of the correlation of all kinds of diagnostic feature data time sequence of the target sewage treatment equipment is taken as the time correlation; the mean of the correlation of the statistical description of each kind of diagnostic feature at each time and the statistical description of all upstream equipment at the corresponding time is taken as the equipment correlation of each kind of diagnostic feature at each time, and the mean of the equipment correlation of all kinds of diagnostic features at all times is taken as the equipment correlation; and the normalized value of the product of the time correlation and the equipment correlation is taken as the weight of the propagation correlation gain.
[0027] According to the data time sequence information and the inter-equipment correlation information, the weight of the propagation correlation gain is set, so that the data time sequence information and the equipment correlation information can provide corresponding values for the random forest model according to their usefulness.
[0028] Preferably, the weight setting method of the information gain of the random forest algorithm comprises:
[0029] The difference between the weight of the propagation correlation gain and one is taken as the weight of the information gain of the random forest algorithm.
[0030] Preferably, the method for constructing the random forest model based on the comprehensive split gain using the training data set comprises:
[0031] The comprehensive split gain is used to replace the information gain of the random forest algorithm, and the random forest model is constructed based on the random forest algorithm using the training data set.
[0032] Preferably, the method for achieving the fault diagnosis of the target equipment comprises:
[0033] The correlation feature vector of all kinds of diagnostic features of the target sewage treatment equipment collected at the current time is input into the random forest model to obtain the fault detection result.
[0034] In the second aspect, the present application provides a sewage treatment equipment fault diagnosis system, which adopts the following technical scheme:
[0035] A sewage treatment equipment fault diagnosis system comprises a processor and a memory, and the memory stores computer program instructions, which are executed by the processor to implement the above-mentioned sewage treatment equipment fault diagnosis method.
[0036] By adopting the above-mentioned technical scheme, the above-mentioned sewage treatment equipment fault diagnosis method is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that a terminal device is manufactured according to the memory and the processor, and the use is convenient.
[0037] The present application has the following technical effects:
[0038] The present application no longer uses the fault diagnosis feature data of the target sewage treatment equipment at a single moment to construct the sample, but uses continuous statistical data and adds the fault diagnosis feature data of the upstream equipment to construct the sample, so that the time sequence information of the fault analysis and the correlation information between the equipment can be contained on the data set, thereby providing a data basis for the random forest model to learn the time sequence information of the fault and the correlation information between the equipment, thereby laying a foundation for accurate fault diagnosis.
[0039] Further, by adding the propagation correlation gain on the basis of the information gain of the original random forest algorithm, the propagation correlation gain is used to supervise the random forest model to learn the time sequence information and the correlation information between the equipment, thereby improving the accuracy of the random forest model fault diagnosis.
[0040] Further, in the calculation of the propagation correlation gain, the autocorrelation of the statistical data of the diagnostic feature data of the target sewage treatment equipment on the time sequence and the correlation between the statistical data of the diagnostic feature data of the target sewage treatment equipment and the statistical data of the corresponding diagnostic feature data of the upstream equipment are introduced into the propagation correlation gain, so that the time sequence correlation information and the correlation information between the equipment can be contained in the propagation correlation gain, thereby providing a basis for supervising the random forest model training. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 is a flowchart of a sewage treatment equipment fault diagnosis method in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The present application discloses a sewage treatment equipment fault diagnosis method, referring to Figure 1 , comprising steps S1-S3:
[0043] S1: Obtain a training data set, each sample in the training data set is an associated feature vector of all kinds of diagnostic feature categories at each moment with a fault label, and the associated feature vector is composed of the statistical data of the diagnostic feature data of the diagnostic target sewage treatment equipment and the statistical data of the corresponding diagnostic feature data of the upstream equipment.
[0044] It should be noted that in order for the random forest model to learn the time sequence propagation of the fault and the equipment propagation of the fault, the data information and the upstream equipment information need to be contained in each sample in the data set.
[0045] Preferably, as an example, the training data set is obtained, comprising:
[0046] Obtaining various diagnostic feature data for fault diagnosis of the target wastewater treatment equipment at each time, arranging the diagnostic feature data of the target wastewater treatment equipment at all times in a time sequence to obtain a diagnostic feature data sequence of the target wastewater treatment equipment. The types of diagnostic feature data include but are not limited to the following aspects: flow data, dissolved oxygen, suspended solids, ammonia nitrogen, pH value, vibration data, temperature data, current data, and voltage data.
[0047] At any time of the time sequence of the diagnostic feature data of the target wastewater treatment equipment, obtaining a data segment of a preset length before the data, and constructing a vector of statistical feature data of the data segment as a statistical descriptor of the diagnostic feature at the time, and constructing a vector of the statistical descriptor at the time and the statistical descriptors of the preset number of times before as a statistical descriptor vector of the diagnostic feature at the time; obtaining the statistical descriptor of the diagnostic feature of each upstream equipment at the corresponding time, and splicing the statistical descriptors of all upstream equipment after the statistical descriptor vector to obtain a correlation feature vector of the diagnostic feature at the time. Obtain the correlation feature vector of each diagnostic feature at each time.
[0048] Artificially label the correlation feature vector of all diagnostic features at any time with a fault label, and use the correlation feature vector of all diagnostic features at the time with the label as a sample; all samples form a training data set. The fault label can be: no fault and fault.
[0049] It should be noted that the correlation feature vector of all diagnostic features at a time obtains a sample, in other words, the correlation feature vector of all diagnostic features at a time can be regarded as a sample. In order to facilitate description, the correlation feature vector of all diagnostic features at a time is also referred to as a sample.
[0050] The above embodiments relate to statistical feature data and corresponding time, and the method for obtaining statistical feature data and corresponding time is described below.
[0051] The method for obtaining statistical feature data comprises:
[0052] The first moment, the second moment, the third moment, and the fourth moment of all data in the data segment are used as statistical feature data.
[0053] It should be noted that the first moment, the second moment, the third moment, and the fourth moment of all data in the data segment can reflect the information of the data in the data segment from multiple dimensions such as value, variation characteristics, and distribution information, and can more comprehensively reflect the data information.
[0054] In addition, the method for obtaining the corresponding time comprises:
[0055] The time interval between all data in the diagnostic feature data time sequence of the target wastewater treatment equipment and the matching data in the corresponding diagnostic feature data time sequence of the upstream equipment is taken as the lag length.
[0056] The Sth moment before the moment is taken as the corresponding moment, and S represents the lag length.
[0057] It should be noted that since the upstream equipment has an abnormality for a period of time, the downstream equipment is only triggered to be abnormal, and there is a time lag phenomenon of fault propagation between the upstream and downstream equipment. Therefore, the time sequence is aligned through the above matching method, thereby providing a basis for subsequent accurate propagation analysis between equipment.
[0058] In order to facilitate understanding, the following is a specific example to illustrate the acquisition method of the training data set:
[0059] Suppose the target wastewater treatment equipment is an aeration fan, and suppose that one diagnostic feature obtained for diagnosing the fault of the aeration fan is dissolved oxygen. The dissolved oxygen data time sequence composed of all the dissolved oxygen data at the obtained moments is [1.8, 2.3, 2.1, 3, 2.3, 1.6, 1.8, 2.4, 2.8, 2.5, 2.4, 2.3, 1.7, 1.4, 1.7]. Taking the acquisition process of the correlation feature vector at the 10th moment as an example, the data segment [1.6, 1.8, 2.4, 2.8, 2.5] of length 5 (assuming the preset length is 5) is obtained at the 10th moment and before. The first moment, the second moment, the third moment, and the fourth moment of all data in the data segment are calculated as 2.22, 5.13, 12.26, and 30.15, respectively. The vector composed of the first moment, the second moment, the third moment, and the fourth moment of all data in the data segment is taken as the statistical descriptor at the 10th moment, i.e., the statistical descriptor at the 10th moment is T1 = [2.22, 5.13, 12.26, 30.15]. In the same way, the statistical descriptors at the previous 4 (assuming the preset number is 4) moments are calculated as T2 = [2.18, 4.94, 11.57, 27.94], T3 = [2.22, 5.17, 12.58, 31.84], T4 = [2.16, 4.9, 11.67, 29.1], and T5 = [2.26, 5.31, 12.94, 32.59], respectively. The vector composed of the statistical descriptors at the 10th moment and the previous 4 moments is taken as the statistical descriptor vector of the dissolved oxygen at the 10th moment [T5, T4, T3, T2, T1].
[0060] Assuming that the dissolved oxygen data collected at the corresponding time and the data segment composed of the dissolved oxygen data of the previous 4 time points at the upstream equipment air filter of the aeration blower is [1.4, 1.2, 1.3, 1.3, 1.4], the first moment, the second moment, the third moment and the fourth moment of all data in the data segment are 1.32, 1.75, 2.32 and 3.09 respectively, and the statistical descriptor of the upstream equipment air filter at the corresponding time is [1.32, 1.75, 2.32, 3.09]. In the same way, the statistical descriptor of the dissolved oxygen of each upstream equipment at the corresponding time is obtained.
[0061] The statistical descriptors of the dissolved oxygen of all upstream equipment at the corresponding time are spliced after the statistical descriptor vector of the dissolved oxygen at the 10th time of the aeration blower to obtain the correlation feature vector of the 10th time of the dissolved oxygen diagnosis feature. In the same way, the correlation feature vectors of the 10th time of other kinds of diagnosis features are obtained, and the correlation feature vectors of all kinds of diagnosis features at the 10th time are labeled as no fault by artificial, and the correlation feature vectors of all kinds of diagnosis features at the 10th time with no fault label are a sample; In the same way, other samples are obtained by using data at other times, and a data set composed of all samples is used as a training data set.
[0062] S2: constructing a comprehensive split gain, the comprehensive split gain is equal to the weighted sum of the information gain of the random forest algorithm and the propagation correlation gain; wherein, the propagation correlation gain is positively correlated with the autocorrelation of the statistical data of the diagnosis feature data of the target sewage treatment equipment in time sequence, and is positively correlated with the correlation of the statistical data of the diagnosis feature data of the target sewage treatment equipment and the statistical data of the corresponding diagnosis feature data of the upstream equipment.
[0063] It should be noted that the traditional random forest algorithm usually uses single time data to construct a decision tree, and this way of constructing a decision tree does not consider the time sequence propagation of the fault and the propagation of the equipment, so that the fault cannot be detected in some hidden fault stage, and the detection accuracy of the fault is reduced. Therefore, in order to enable the random forest model to learn the time sequence propagation of the fault and the device propagation characteristics of the fault, the split gain index in the random forest algorithm which determines the split ability of the decision tree should be able to introduce the characteristics of the time sequence propagation of the fault and the device propagation of the fault, so that the split gain index can know that the random forest model learns some time sequence propagation and device propagation characteristics.
[0064] Preferably, as an example, the method for constructing the comprehensive split gain comprises:
[0065]
[0066] wherein, the weight of the information gain of the random forest algorithm, a weight of information gain of the random forest algorithm, a weight of propagation correlation gain, propagation correlation gain.
[0067] It can be understood that in the traditional random forest algorithm, the information gain is used as the split gain for screening the diagnostic features for node split control. However, the traditional information gain does not consider the time sequence information and the device propagation information, and thus based on the traditional split gain setting method, the time sequence propagation and device propagation features of the fault cannot be learned. Therefore, the embodiment introduces the propagation correlation gain to learn the time sequence propagation and device propagation features. By introducing the corresponding weight, the determination degree of the two kinds of gains on the comprehensive split gain is controlled.
[0068] The above embodiment relates to the weight of the propagation correlation gain, the propagation correlation gain, the weight of the information gain of the random forest algorithm, and the information gain of the random forest algorithm. The determination method of the weight of the propagation correlation gain, the propagation correlation gain, the weight of the information gain of the random forest algorithm, and the information gain of the random forest algorithm will be described below.
[0069] First, the acquisition method of the propagation correlation gain is introduced.
[0070] It should be noted that in order to reflect the correlation of the fault in time sequence and the correlation between devices in the propagation correlation gain, the correlation of the analysis data in time sequence and the correlation of the analysis data between devices need to be introduced when analyzing the propagation correlation gain.
[0071] Preferably, as an example, the acquisition method of the propagation correlation gain comprises:
[0072]
[0073] wherein the dataset of the parent node is acquired, the autocorrelation of the jth statistical feature data in all statistical descriptors of the statistical descriptor vector of the ith moment of any one diagnostic feature of the target wastewater treatment device, M represents the number of samples in the dataset of the parent node, the correlation between the statistical descriptor of the ith moment of the diagnostic feature of the target wastewater treatment device and the statistical descriptor of the corresponding moment of the diagnostic feature of the kth upstream device, and W represents the number of upstream devices of the target wastewater treatment device, the propagation correlation gain of the diagnostic feature.
[0074] It should be noted that the correlation feature vector of all labeled diagnostic features at one time is one sample, and thus the number of samples is the same as the number of times.
[0075] For ease of understanding, a specific example is given below to illustrate the specific calculation process of the propagation correlation gain:
[0076] Suppose the statistical descriptor vector of the i-th time of the diagnostic feature of the target sewage treatment equipment is obtained in step S1 [T5, T4, T3, T2, T1], wherein T1 = [2.22, 5.13, 12.26, 30.15], T2 = [2.18, 4.94, 11.57, 27.94], T3 = [2.22, 5.17, 12.58, 31.84], T4 = [2.16, 4.9, 11.67, 29.1], T5 = [2.26, 5.31, 12.94, 32.59], wherein T1 = [2.22, 5.13, 12.26, 30.15] is the statistical descriptor of the i-th time of the diagnostic feature of the target sewage treatment equipment, and the first statistical feature data in the statistical descriptor vector is obtained as: 2.26, 2.16, 2.22, 2.18, 2.22, and the autocorrelation values of the sequence composed of these 5 data at 1st lag, 2nd lag, 3rd lag, and 4th lag are calculated as: -0.616, 0.347, -0.334, and 0.103, and the maximum value 0.347 of the absolute values of the autocorrelation values at all lags is taken as the autocorrelation of the first statistical feature data in the statistical descriptor vector. The autocorrelation of each statistical feature data in the statistical descriptor vector is obtained in the same way.
[0077] Suppose the statistical descriptor of the corresponding time of the diagnostic feature of the k-th upstream equipment is obtained in step S2 [1.32, 1.75, 2.32, 3.09], and the absolute value of the Pearson correlation coefficient 0.973 of the statistical descriptor T1 = [2.22, 5.13, 12.26, 30.15] of the i-th time of the diagnostic feature of the target sewage treatment equipment and the statistical descriptor [1.32, 1.75, 2.32, 3.09] of the corresponding time of the diagnostic feature of the upstream equipment is taken as the correlation of the statistical descriptor of the i-th time of the diagnostic feature of the target sewage treatment equipment and the statistical descriptor of the corresponding time of the diagnostic feature of the k-th upstream equipment. The correlation of the statistical descriptor of each time of the diagnostic feature of the target sewage treatment equipment and the statistical descriptor of the corresponding time of the diagnostic feature of each upstream equipment is calculated in the same way.
[0078] Then the propagation correlation gain can be calculated based on the above formula.
[0079] Understandable, This reflects the temporal regularity of the diagnostic feature. The larger the value, the greater the temporal regularity of the diagnostic feature. Therefore, it is more necessary to refer to the temporal feature information of the diagnostic feature for fault diagnosis. For example, slight wear of the bearing will first cause a slight abnormality in the vibration signal in a certain frequency band. As time goes by, this abnormality will gradually intensify and spread to other frequency bands. This reflects the transmissibility of the diagnostic feature between devices. The larger the value, the greater the transmissibility of the diagnostic feature between devices, and therefore the more necessary it is to refer to the temporal characteristics of this diagnostic feature for fault diagnosis. For example, a malfunction in upstream aeration equipment can lead to abnormal dissolved oxygen levels in the biochemical reaction tank, affecting the activity of microorganisms, causing deterioration of sludge settling performance in the sedimentation tank, which in turn leads to increased sludge viscosity, resulting in pipe blockage and impeller entanglement in the sludge discharge pump.
[0080] Next, we will introduce the method for obtaining the weights of the propagation correlation gain.
[0081] It should be noted that if the fault has a high degree of propagation in terms of time sequence and between devices, the weight of the propagation correlation gain should be set to a large value when performing fault diagnosis, so that the random forest model can analyze the fault situation more from the aspects of time sequence propagation and between devices.
[0082] Preferably, as an example, the method for obtaining the weights of the propagation correlation gain includes:
[0083] The autocorrelation of time series data of various diagnostic features of the target wastewater treatment equipment is calculated, and the mean of the autocorrelation of time series data of all diagnostic features of the target wastewater treatment equipment is taken as the time series correlation. The mean of the correlation between the statistical descriptor of each diagnostic feature of the target wastewater treatment equipment at each time step and the statistical descriptor of all upstream equipment at the corresponding time step is recorded as the equipment correlation of that diagnostic feature at each time step, and the mean of the equipment correlation of all diagnostic features at all time steps is taken as the equipment correlation. The normalized value of the product of time series correlation and equipment correlation is used as the weight of the propagation correlation gain.
[0084] It should be noted that the calculation methods for autocorrelation and correlation are the same as those in step S2, and will not be illustrated here.
[0085] It is understandable that the smaller the autocorrelation of the time series of various diagnostic feature data of the target sewage treatment equipment, the greater the temporal correlation of the data, and thus the smaller the temporal propagation of the fault. The smaller the correlation between the statistical descriptors of various diagnostic features of the target sewage treatment equipment at each time and the corresponding statistical descriptors of all upstream equipment, the smaller the data correlation between the equipment, and thus the smaller the propagation of the fault between the equipment.
[0086] Then, the information gain acquisition method of the random forest algorithm is introduced.
[0087] Preferably, as an example, the information gain acquisition method of the random forest algorithm comprises:
[0088] (1) Calculate the information entropy of the training data set of the parent node.
[0089] Get the probability of the sample with the label of failure in all samples of the parent node , and the probability of the sample with the label of non-failure, according to the probability of the sample with the label of non-failure . The information entropy of the parent node is calculated as: .
[0090] (2) Calculate the conditional entropy of various diagnostic features under each category.
[0091] Classify all time-related feature vectors of a diagnostic feature.
[0092] Get the probability of the related feature vector with the label of failure in all time-related feature vectors in the i-th category of the diagnostic feature , and get the probability of the related feature vector with the label of non-failure in all time-related feature vectors in the i-th category of the diagnostic feature , and calculate the conditional entropy of the diagnostic feature in the i-th category as
[0093] .
[0094] (3) Calculate the information gain of the diagnostic feature.
[0095] Get the probability of the related feature vector in the i-th category of the diagnostic feature .
[0096]
[0097] Wherein, represents the number of categories of all time-related feature vectors of the diagnostic feature.
[0098] The same method can be used to calculate the information gain of various diagnostic features.
[0099] It should be noted that the greater the information gain, the greater the contribution of the diagnostic feature to fault diagnosis. Since the calculation method of the information gain is the same as the effect of the information gain in the traditional random forest, the effect brought by it will not be described here.
[0100] It should be noted that the method for classifying the correlation feature vectors of all time points of a diagnostic feature comprises:
[0101] According to the similarity of the correlation feature vectors of each two time points of the diagnostic feature, the correlation feature vectors of all time points of the diagnostic feature are clustered to obtain several categories.
[0102] Finally, the method for obtaining the weight of the information gain of the random forest algorithm is introduced.
[0103] Preferably, as an example, the method for obtaining the weight of the information gain of the random forest algorithm comprises:
[0104] The difference between the weight of the propagation correlation gain and the weight of the information gain of the random forest algorithm is taken as the weight of the information gain of the random forest algorithm.
[0105] S3: Based on the comprehensive split gain, a random forest model is constructed using the training data set to realize fault diagnosis of the target device.
[0106] S30: Based on the comprehensive split gain, a random forest model is constructed using the training data set.
[0107] Preferably, as an example, based on the comprehensive split gain, the random forest model is constructed using the training data set, comprising:
[0108] Randomly sampling a data set composed of a preset number of samples in the training data set as a sub-training data set of any decision tree.
[0109] Taking the sub-training data set as a parent node, calculating the comprehensive split gain of each diagnostic feature based on all samples in the parent node, taking the diagnostic feature with the maximum comprehensive split gain as a split feature, and dividing all samples in the parent node into two categories according to the similarity of the correlation feature vectors of all samples in the parent node under the split feature, and taking the two categories as the left child node and the right child node of the parent node respectively.
[0110] Taking each child node as a new parent node, repeating the above splitting process. Until the preset stop condition is met, a decision tree is obtained.
[0111] In the same way, several decision trees are generated. The forest composed of the decision trees is taken as a random forest model.
[0112] It should be noted that when classifying all samples in the parent node, similar correlation feature vectors are classified into a category.
[0113] It should be further noted that the preset stop condition can adopt the stop condition commonly used in the traditional random forest algorithm, and the embodiment does not make specific limitation.
[0114] S31: to realize fault diagnosis of the target device.
[0115] Preferably, as an example, to achieve the fault diagnosis of the target device, comprising:
[0116] The newly collected associated feature vector of all kinds of diagnostic feature categories of the target sewage treatment equipment at the current moment is input into the random forest model to obtain a fault detection result.
[0117] The embodiment of the present application also discloses a sewage treatment equipment fault diagnosis system, comprising a processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, a sewage treatment equipment fault diagnosis method according to the present application is realized.
[0118] The system also comprises other components well known to those skilled in the art such as a communication bus and a communication interface, the setting and function of which are known in the art, thus will not be described here.
[0119] In the present application, the aforementioned memory can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, device or apparatus. For example, the computer readable storage medium can be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory, dynamic random access memory, static random access memory, enhanced dynamic random access memory, high bandwidth memory, hybrid memory cube, etc., or any other medium that can be used to store the required information and can be accessed by an application program, module or both. Any such computer storage medium can be part of the device or accessible or connectable to the device.
Claims
1. A method for diagnosing faults in wastewater treatment equipment, characterized in that, Including the following steps: Obtain the training dataset. Each sample in the training dataset is an associated feature vector of all diagnostic feature categories at each time point with fault labels. The associated feature vector is composed of statistical data of diagnostic feature data of the target sewage treatment equipment fault and statistical data of corresponding diagnostic feature data of upstream equipment. A comprehensive split gain is constructed, which is equal to the weighted sum of the information gain and the propagation correlation gain of the random forest algorithm. Among them, the propagation correlation gain is positively correlated with the time-series autocorrelation of the statistical data of the diagnostic feature data of the target sewage treatment equipment, and positively correlated with the statistical data of the diagnostic feature data of the target sewage treatment equipment and the statistical data of the corresponding diagnostic feature data of the upstream equipment. Based on the comprehensive split gain, a random forest model is constructed using the training dataset to achieve fault diagnosis of the target equipment; The associated feature vector includes: acquiring several time series sequences of feature data required for fault diagnosis of the target wastewater treatment equipment; acquiring a data segment of a preset length before the data at any time point in the time series sequence of a diagnostic feature data of the target wastewater treatment equipment, and denoteing the vector composed of the statistical feature data of the data segment as the statistical descriptor of the diagnostic feature at that time point, and denoteing the vector composed of the statistical descriptor at that time point and the statistical descriptors of the previous preset number of time points as the statistical descriptor vector of the diagnostic feature at that time point; acquiring the statistical descriptors of the diagnostic feature of each upstream device at the corresponding time point, and concatenating the statistical descriptors of all upstream devices after the statistical descriptor vector to obtain the associated feature vector of the diagnostic feature at that time point; The propagation correlation gain satisfies the following relationship: Among them, obtaining the dataset of the parent node, Let represent the autocorrelation of the j-th statistical feature data among all statistical descriptors of the statistical descriptor vector of any diagnostic feature of the target wastewater treatment equipment at time i. This indicates the number of statistical feature data points contained in each statistical descriptor; M represents the number of samples in the parent node's dataset. Let W represent the correlation between the statistical descriptor of this diagnostic feature of the target wastewater treatment equipment at time i and the statistical descriptor of this diagnostic feature of the k-th upstream equipment at the corresponding time. This indicates the transmission relevance gain of this diagnostic feature.
2. The method for diagnosing faults in wastewater treatment equipment according to claim 1, characterized in that, The statistical feature data are the first, second, third, and fourth moments of all data in the data segment.
3. The method for diagnosing faults in wastewater treatment equipment according to claim 1, characterized in that, The method for obtaining the corresponding time includes: The time series of diagnostic feature data of the target wastewater treatment equipment is matched with the corresponding time series of diagnostic feature data of each upstream equipment. The average time interval between all data in the time series of diagnostic feature data of the target wastewater treatment equipment and the matching data in the time series of corresponding diagnostic feature data of the upstream equipment is taken as the lag time. The S-th time before that time is taken as the corresponding time, where S represents the lag time.
4. The method for diagnosing faults in wastewater treatment equipment according to claim 1, characterized in that, Methods for setting the weights of propagation correlation gain include: The autocorrelation of time series data of various diagnostic features of the target wastewater treatment equipment is calculated, and the mean of the autocorrelation of time series data of all diagnostic features of the target wastewater treatment equipment is taken as the time series correlation. The mean of the correlation between the statistical descriptor of each diagnostic feature of the target wastewater treatment equipment at each time step and the statistical descriptor of all upstream equipment at the corresponding time step is recorded as the equipment correlation of that diagnostic feature at each time step, and the mean of the equipment correlation of all diagnostic features at all time steps is taken as the equipment correlation. The normalized value of the product of time series correlation and equipment correlation is used as the weight of the propagation correlation gain.
5. The method for diagnosing faults in wastewater treatment equipment according to claim 1, characterized in that, The method for setting the weights of the information gain in the random forest algorithm includes: The difference between the weights of the propagation correlation gain and the weights of the information gain of the random forest algorithm is used as the weights of the information gain.
6. The method for diagnosing faults in wastewater treatment equipment according to claim 1, characterized in that, The method of constructing a random forest model based on the comprehensive split gain and using the training dataset includes: The information gain of the random forest algorithm is replaced by the integrated split gain, and a random forest model is built based on the training dataset using the random forest algorithm.
7. The method for diagnosing faults in wastewater treatment equipment according to claim 1, characterized in that, The method for achieving fault diagnosis of the target device includes: The associated feature vectors of all diagnostic feature categories of the newly collected target sewage treatment equipment at the current time are input into the random forest model to obtain the fault detection results.
8. A fault diagnosis system for wastewater treatment equipment, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a method for diagnosing faults in a wastewater treatment device according to any one of claims 1-7.
Citation Information
Patent Citations
Robot cable fault classification method and system based on deep tree learning
CN120217126A