Fault diagnosis method and device in sewage treatment process
By extracting slow features and timing features during sewage treatment, and using Markov transfer field technology to convert them into two-dimensional images, fusing features for fault diagnosis, the problem of low fault recognition accuracy in the existing technology is solved, and higher fault recognition accuracy and diagnostic accuracy are achieved.
Patent Information
- Application Number
- CN202411576645.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art cannot fully dig up the dynamic characteristics and characteristic information of data during sewage treatment, resulting in low accuracy in fault identification.
By obtaining sewage process data, slow feature extraction and timing feature extraction are performed to obtain one-dimensional timing slow feature; then use Markov transfer field technology to convert it into two-dimensional image, and feature extraction is performed, and one-dimensional and two-dimensional features are input into the fault diagnosis model for fault classification.
It effectively improves the accuracy of identification of types of sewage faults, improves the accuracy of fault diagnosis, and can diagnose faults in a timely and accurate manner, meeting the sewage treatment industry's demand for equipment reliability and operation stability.
Smart Images

Figure CN119598361A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sewage treatment, and in particular to a sewage treatment process fault diagnosis method and device. Background Art
[0002] With the rapid development of human society, water resources have become the focus of attention of governments around the world. In order to improve the water resources environment, many sewage treatment plants have been built around the world. The sewage treatment process is a complex biochemical reaction process with high nonlinearity, dynamics and time correlation. It is affected by strong external interference and complex biochemical reactions, which often leads to failures in sewage treatment plants. Common types of failures include: sludge swelling, abnormal blower outlet pressure, blockage, rupture, leakage of wastewater return pipes, failure of control systems, sensors, motors and other electrical equipment resulting in failure of automatic control, etc. Real-time monitoring of the operating performance of sewage treatment plants is the basis for ensuring the safe operation of equipment. Therefore, developing an accurate and efficient fault diagnosis system is a necessary condition for the stable operation of sewage treatment plants.
[0003] In recent years, the sewage treatment process fault diagnosis method based on deep learning has attracted widespread attention. Common fault diagnosis neural network models include stacked autoencoders (SAE), variational autoencoders (VAE), deep belief networks (DBN), long short-term memory neural networks (LSTM), etc.
[0004] However, sewage process data is a time series with complex time correlation and obvious nonlinear and dynamic characteristics. The existing deep learning methods cannot fully explore the dynamic characteristics of data in the sewage treatment process. At the same time, since the input is one-dimensional time series data, it is unable to express rich feature information and it is difficult to accurately and efficiently identify different types of sewage faults. Summary of the invention
[0005] The present invention provides a sewage treatment process fault diagnosis method and device, which are used to solve the defect of low fault identification accuracy caused by the inability to fully explore the dynamic characteristics and characteristic information of data in the sewage treatment process in the prior art, and can effectively improve the accuracy of identifying sewage fault types.
[0006] The present invention provides a fault diagnosis method for a sewage treatment process, comprising: acquiring sewage process data; performing slow feature extraction on the sewage process data to obtain slow features; performing time series feature extraction on the slow features to obtain one-dimensional time series slow features; obtaining a two-dimensional image based on the one-dimensional time series slow features using Markov transfer field technology; performing feature extraction on the two-dimensional image to obtain two-dimensional image features; inputting the one-dimensional time series slow features and the two-dimensional image features into a fault diagnosis model to obtain a fault diagnosis result output by the fault diagnosis model; wherein the fault diagnosis model is obtained by training based on one-dimensional training features, two-dimensional training features and corresponding fault labels, and the fault diagnosis model is used to classify faults based on features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain a fault diagnosis result.
[0007] According to a sewage treatment process fault diagnosis method provided by the present invention, the fault diagnosis model includes: a feature splicing layer, which performs feature splicing on one-dimensional time series slow features and two-dimensional image features to obtain splicing features; and a feature classification layer, which performs fault classification on the splicing features to obtain fault diagnosis results.
[0008] According to a sewage treatment process fault diagnosis method provided by the present invention, the fault diagnosis model includes a feature splicing layer, a fully connected layer and a feature classification layer. Before inputting one-dimensional time series slow features and two-dimensional image features into the fault diagnosis model, the method includes: obtaining one-dimensional training features, two-dimensional training features and corresponding fault labels; inputting the one-dimensional training features and the two-dimensional training features into the feature splicing layer for feature splicing, and obtaining spliced training features output by the feature splicing layer; inputting the spliced training features into the fully connected layer for nonlinear feature learning, and inputting the learned spliced training features into the feature classification layer for fault classification, and obtaining the fault prediction results output by the feature classification layer; constructing a loss function based on the fault prediction results and the fault labels, and ending the training based on the convergence of the loss function.
[0009] According to a sewage treatment process fault diagnosis method provided by the present invention, a two-dimensional image is obtained based on a one-dimensional time series slow feature using a Markov transition field technology, including: according to the one-dimensional time series slow feature, a preset number of quantile bins are obtained using a quantile binning method, and the corresponding one-dimensional time series slow feature is adjusted according to the corresponding quantile bin sequence number; according to the adjusted one-dimensional time series slow feature and the obtained quantile bin, a Markov matrix is obtained using a first-order Markov chain; based on the time axis, the Markov matrix is expanded to a Markov transformation field to obtain a transition probability between any two quantile bins; according to the transition probability, the one-dimensional time series slow feature is Markov transformed to obtain a two-dimensional image.
[0010] According to a sewage treatment process fault diagnosis method provided by the present invention, slow features are extracted from sewage process data to obtain slow features, including: performing singular value decomposition on a covariance matrix corresponding to the sewage process data to obtain a first feature of the corresponding covariance matrix; determining a whitening matrix based on the first feature; using the whitening matrix, whitening the sewage process data to obtain whitening features; performing singular value decomposition on the covariance matrix of the first-order derivative result of the whitening feature, and determining a slow feature conversion matrix based on the singular value decomposition result; obtaining the slow feature based on the slow feature conversion matrix and the whitening feature.
[0011] According to a sewage treatment process fault diagnosis method provided by the present invention, feature extraction is performed on a two-dimensional image to obtain two-dimensional image features, including: inputting the two-dimensional image into a previously constructed two-dimensional convolutional neural network model to obtain the two-dimensional image features output by the two-dimensional convolutional neural network model; wherein the two-dimensional convolutional neural network model is trained based on training images and feature labels corresponding to the training images; the two-dimensional convolutional neural network model includes 1 first convolutional layer, 1 maximum pooling layer, 16 residual modules, 1 average pooling layer and a fully connected layer, the first convolutional layer includes 64 convolutional kernels of size 7×7, the maximum pooling layer has a size of 3×3, the average pooling layer has a size of 7×7, the residual module includes two second convolutional layers and a third convolutional layer, the convolution kernel size of the second convolutional layer is 1×1, and the convolution kernel size of the third convolutional layer is 3×3.
[0012] According to a sewage treatment process fault diagnosis method provided by the present invention, time series feature extraction is performed on slow features to obtain one-dimensional time series slow features, including: inputting the slow features into a pre-constructed one-dimensional convolutional neural network model to obtain the one-dimensional time series slow features output by the one-dimensional convolutional neural network model; wherein the one-dimensional convolutional neural network model is trained based on slow feature training data and the time series labels corresponding to the slow feature training data.
[0013] The present invention also provides a sewage treatment process fault diagnosis device, comprising: a data acquisition module, which acquires sewage process data, wherein the sewage process data is used to characterize water source data monitored during the sewage treatment process; a slow feature extraction module, which performs slow feature extraction on the sewage process data to obtain slow features; a one-dimensional feature extraction module, which performs time series feature extraction on the slow features to obtain one-dimensional time series slow features; an image generation module, which obtains a two-dimensional image based on the one-dimensional time series slow features using Markov transfer field technology; a two-dimensional feature extraction module, which performs feature extraction on the two-dimensional image to obtain two-dimensional image features; a fault diagnosis module, which inputs the one-dimensional time series slow features and the two-dimensional image features into a fault diagnosis model to obtain a fault diagnosis result output by the fault diagnosis model; wherein the fault diagnosis model is obtained based on one-dimensional training features, two-dimensional training features and corresponding fault labels, and the fault diagnosis model is used to classify faults based on features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain a fault diagnosis result.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a sewage treatment process fault diagnosis method as described above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the sewage treatment process fault diagnosis method as described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the fault diagnosis method for a sewage treatment process as described above is implemented.
[0017] The sewage treatment process fault diagnosis method and device provided by the present invention fully mine the potential information in the sewage treatment data from different angles through slow feature extraction, time series feature extraction and spatial domain feature extraction of two-dimensional images generated based on time series features, more accurately capture the key features in the data, and input the captured one-dimensional time series slow features and two-dimensional image features into the fault diagnosis model to fully utilize both time domain and space domain features, provide richer feature identification for fault diagnosis, effectively improve the accuracy of identifying sewage fault types, improve the accuracy of fault diagnosis, and meet the sewage treatment industry's needs for equipment reliability and operational stability by diagnosing faults in a timely and accurate manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is one of the flow diagrams of the sewage treatment process fault diagnosis method provided by the present invention; Figure 2 This is the second flow chart of the sewage treatment process fault diagnosis method provided by the present invention; Figure 3 It is a structural schematic diagram of the sewage treatment process fault diagnosis device provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Figure 1 The present invention provides a flow chart of a method for diagnosing faults in a sewage treatment process, which method comprises: S11, obtaining sewage process data, where the sewage process data is used to characterize water source data monitored during sewage treatment; S12, extracting slow features from the sewage process data to obtain slow features; S13, extracting time series features from the slow features to obtain one-dimensional time series slow features; S14, according to the one-dimensional time series slow characteristics, using Markov transfer field technology to obtain a two-dimensional image; S15, extracting features from the two-dimensional image to obtain two-dimensional image features; S16, inputting the one-dimensional time series slow features and the two-dimensional image features into the fault diagnosis model to obtain the fault diagnosis results output by the fault diagnosis model; wherein, the fault diagnosis model is trained based on the one-dimensional training features, the two-dimensional training features and the corresponding fault labels, and the fault diagnosis model is used to classify faults based on the features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain the fault diagnosis results.
[0022] It should be noted that the step numbers "S1N" in this manual do not represent the order of the fault diagnosis method for the sewage treatment process. Figure 2 The sewage treatment process fault diagnosis method of the present invention is described.
[0023] S11, obtaining sewage process data, where the sewage process data is used to characterize water source data monitored during sewage treatment.
[0024] In this embodiment, obtaining sewage process data includes: collecting sewage treatment process monitoring data and fault data, and standardizing the collected data to obtain sewage process data. It should be noted that sewage treatment is a complex industrial process, and the corresponding sewage process data includes data involved in the effluent process, such as effluent flow, COD (chemical oxygen demand), BOD (biological oxygen demand), ammonia nitrogen (NH 4 + -N) etc.
[0025] It should be added that the collected data is expressed as , the corresponding standardized data is expressed as ,in, and The division is the mean and variance of the collected data, and the sewage process data is obtained .
[0026] S12, extracting slow features from sewage process data to obtain slow features.
[0027] It should be noted that slow feature analysis (SFA) can be used to extract slow features from sewage process data. The goal of SFA is to find a mapping function ,get ,in, Indicates slow features, , W represents the slow feature conversion matrix. This is the slow characteristic information of sewage. The subsequent optimization problem is to calculate each In addition, three constraints are introduced to ensure that different slow features contain different information.
[0028] in, express The slowness measure, and represents the time average and the first derivative of s with respect to time, express The mean of express The variance of express and The covariance of , and They are all different slow features obtained after slow feature extraction of sewage process data. They are related to each other through constraints, and each has different characteristics and information.
[0029] In addition, by introducing SFA, the slowly changing features in the sewage process data can be effectively extracted. These features often better reflect the stable state and potential problems of the system and are of great value for fault diagnosis.
[0030] Therefore, the slow features are extracted from the sewage process data to obtain the slow features, including: S121, performing singular value decomposition on the covariance matrix corresponding to the sewage process data to obtain the first feature of the corresponding covariance matrix.
[0031] It should be noted that the covariance matrix , accordingly, the singular value decomposition is: Among them, U represents the first feature, which is composed of the feature vector of C; is a diagonal matrix consisting of the eigenvalues of C.
[0032] S122: Determine a whitening matrix according to the first feature.
[0033] Furthermore, the whitening matrix is expressed as: S123, using a whitening matrix, whitening the sewage process data to obtain whitening features.
[0034] In this embodiment, the whitening feature is expressed as: S124, performing singular value decomposition on the covariance matrix of the first-order derivative result of the whitened feature, and determining the slow feature conversion matrix according to the singular value decomposition result.
[0035] Furthermore, the first-order derivative of the whitened feature is expressed as: in, Represents the first-order derivative result of the whitening feature; represents the i-th whitening feature at time t; Represents the time interval. The covariance matrix of the first-order derivative of the whitened data is decomposed into the following singular value: Among them, P represents the second feature; D represents the feature matrix, .
[0036] The slow feature conversion matrix W is expressed as: S125, obtaining slow features according to the slow feature conversion matrix and the whitening features.
[0037] It should be noted that the slow feature s is expressed as: in, , we can conclude that: So we can get .
[0038] The optimization goal of SFA is to obtain is the minimum value, is the second smallest value and so on to find all the slow feature sequences.
[0039] S13, extracting time series features from the slow features to obtain one-dimensional time series slow features.
[0040] In this embodiment, time series feature extraction is performed on the slow feature to obtain a one-dimensional time series slow feature, including: inputting the slow feature into a pre-constructed one-dimensional convolutional neural network model to obtain a one-dimensional time series slow feature output by the one-dimensional convolutional neural network model; wherein the one-dimensional convolutional neural network model is trained based on the slow feature training data and the time series labels corresponding to the slow feature training data.
[0041] In an optional embodiment, the one-dimensional convolutional neural network model includes a one-dimensional convolutional layer, a batch normalization layer, a rectified linear unit activation function, a flattening layer and a fully connected layer.
[0042] S14, obtaining a two-dimensional image based on the one-dimensional time series slow feature using the Markov transition field technology.
[0043] It should be noted that by utilizing the Markov transfer field technology, the one-dimensional time series slow features are converted into two-dimensional images, which provides a new perspective for subsequent feature extraction and fault diagnosis, thereby converting time series data into an image form that is easier to process and analyze, expanding the technical means of fault diagnosis.
[0044] Specifically, based on the slow characteristics of the one-dimensional time series, the Markov transition field technology is used to obtain a two-dimensional image, including: S141, according to the one-dimensional time series slow feature, using the quantile binning method, a preset number of quantile bins are obtained, and according to the corresponding quantile bin sequence number, the corresponding one-dimensional time series slow feature is adjusted.
[0045] Further, according to the one-dimensional time series slow feature, a preset number of quantile bins are obtained by using the quantile binning method, including: determining the quantile according to the one-dimensional time series slow feature and the preset number; and allocating the one-dimensional time series slow feature to the corresponding quantile bin according to the time series according to the determined quantile. It should be noted that each quantile bin contains data of a certain time series length, and the time series length in each quantile bin is the same.
[0046] In addition, according to the corresponding quantile bin number, the corresponding one-dimensional time series slow feature is adjusted, including: changing the one-dimensional time series slow feature to the corresponding quantile bin number, that is, the one-dimensional time series slow feature sequence Each of Each corresponds to a quantile box .
[0047] S142, obtaining a Markov matrix using a first-order Markov chain according to the adjusted one-dimensional time series slow feature and the obtained quantile box.
[0048] It should be added that the Markov matrix is expressed as: in, The current bin The next time point s appears in the bin The probability of Satisfaction relationship .
[0049] S143, based on the time axis, the Markov matrix is expanded into the Markov transformation field to obtain the transition probability between any two quantile bins.
[0050] It is worth noting that due to the memorylessness of the Markov chain, the current element in the matrix W is independent of the previous element, which leads to the loss of a lot of effective information in the process. Therefore, in order to overcome this shortcoming, the matrix W is extended to the Markov transformation field M by introducing the time axis, and the data set is divided into Q bins along the time axis. The data points at timestamps i and j belong to the corresponding bins respectively: and , express arrive The transition probability is expressed as: S144, performing Markov transformation on the one-dimensional time series slow feature according to the transition probability to obtain a two-dimensional image.
[0051] It should be added that, according to the transition probability, the one-dimensional time series slow feature is Markov transformed to obtain a two-dimensional image, including: taking the transition probability as a pixel, performing Markov transformation on the one-dimensional time series slow feature to obtain a two-dimensional image.
[0052] S15, extracting features from the two-dimensional image to obtain two-dimensional image features.
[0053] In this embodiment, feature extraction is performed on a two-dimensional image to obtain two-dimensional image features, including: inputting the two-dimensional image into a previously constructed two-dimensional convolutional neural network model to obtain the two-dimensional image features output by the two-dimensional convolutional neural network model; wherein the two-dimensional convolutional neural network model is trained based on training images and feature labels corresponding to the training images; the two-dimensional convolutional neural network model includes 1 first convolutional layer, 1 maximum pooling layer, 16 residual modules, 1 average pooling layer and a fully connected layer, the first convolutional layer includes 64 convolution kernels of size 7×7, the maximum pooling layer has a size of 3×3, the average pooling layer has a size of 7×7, the residual module includes two second convolutional layers and one third convolutional layer, the convolution kernel size of the second convolutional layer is 1×1, and the convolution kernel size of the third convolutional layer is 3×3.
[0054] It should be noted that after obtaining the training images, they can be divided into training sets and test sets according to a preset ratio. In addition, the two-dimensional convolutional neural network model can be constructed using ResNet50, and a residual block is introduced to allow the network to learn the residual, that is, the difference between the input and the output. The structure of the residual block is expressed as: Among them, S represents input; Represented by weight The parameterized transformation function usually includes a convolutional layer, batch normalization, and a ReLU activation function. In the residual block, the input S is directly added to the output of the transformation function through a skip connection.
[0055] S16, inputting the one-dimensional time series slow features and the two-dimensional image features into the fault diagnosis model to obtain the fault diagnosis results output by the fault diagnosis model; wherein, the fault diagnosis model is trained based on the one-dimensional training features, the two-dimensional training features and the corresponding fault labels, and the fault diagnosis model is used to classify faults based on the features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain the fault diagnosis results.
[0056] In this embodiment, the fault diagnosis model includes: a feature splicing layer, which performs feature splicing on one-dimensional time series slow features and two-dimensional image features to obtain splicing features; and a feature classification layer, which performs fault classification on the splicing features to obtain fault diagnosis results.
[0057] It should be added that the splicing feature is expressed as: in, Represents splicing features; represents the concatenation function; Represents the slow characteristics of one-dimensional time series; represents the two-dimensional image feature; m represents the dimension of the one-dimensional slow time series feature; n represents the dimension of the two-dimensional image feature. It is worth noting that the concatenated feature vector contains two types of features, time domain and space domain, so that the feature classification layer can be used to output the fault diagnosis results later.
[0058] Accordingly, refer to Figure 2 , inputting the one-dimensional time series slow features and the two-dimensional image features into the fault diagnosis model to obtain the fault diagnosis results output by the fault diagnosis model, including: inputting the one-dimensional time series slow features and the two-dimensional image features into the feature splicing layer for feature splicing to obtain splicing features; inputting the splicing features into the feature classification layer for fault classification to obtain the fault diagnosis results output by the feature classification layer.
[0059] In an optional embodiment, the fault diagnosis model may adopt a ResNet50 network, and the feature classification layer may adopt a Softmax function.
[0060] In an optional embodiment, the fault diagnosis model includes a feature splicing layer, a fully connected layer and a feature classification layer. Before inputting the one-dimensional time series slow features and the two-dimensional image features into the fault diagnosis model, it includes: obtaining one-dimensional training features, two-dimensional training features and corresponding fault labels; inputting the one-dimensional training features and the two-dimensional training features into the feature splicing layer for feature splicing, and obtaining the spliced training features output by the feature splicing layer; inputting the spliced training features into the fully connected layer for nonlinear feature learning, and inputting the learned spliced training features into the feature classification layer for fault classification, and obtaining the fault prediction results output by the feature classification layer; constructing a loss function based on the fault prediction results and the fault labels, and ending the training based on the convergence of the loss function.
[0061] It should be noted that the concatenated feature vector contains two types of features, namely, time domain and space domain, which facilitates the subsequent input of the concatenated features into the fully connected layer for nonlinear feature learning, and helps to perform classification and fault identification more accurately.
[0062] It should be added that common types of failures include sludge bulking, toxic shock and residence failures. Sludge bulking is a failure with serious impact. Affected by factors such as the complexity and instability of wastewater quality, insufficient dissolved oxygen, and possible nutritional imbalance in the biochemical system, filamentous bacteria may increase, leading to sludge bulking; toxic shock failure is due to the discharge of a large amount of toxic sewage, which leads to the reduction of the activity of activated sludge microorganisms and even causes the wastewater biochemical reaction system to fail and fail to meet the sewage discharge standards; residence failure is due to the sewage staying in the reaction tank for too long, which leads to a decrease in the physiological activity of the microorganisms and affects the wastewater treatment process.
[0063] Furthermore, the one-dimensional training features, two-dimensional training features and corresponding fault labels can be obtained by using the above steps S11-S15, which will not be repeated here. The difference is that during the training process, the sewage treatment data obtained can be used to generate sewage treatment process monitoring data and fault data as training data by using the kinetic parameters and stoichiometric numbers of the simulation platform-"Benchmark Simulation Model no. 1 (BSM1)", and the generated training data is standardized. In addition, the BSM1 model includes nitrification and denitrification processes to remove ammonia nitrogen from wastewater; the BSM1 model includes 5 biochemical reaction tanks and one secondary sedimentation tank, the first two biochemical reaction tanks are anoxic tanks, and the last three are aerobic tanks. Physical sedimentation is mainly used for mud and water separation in the secondary sedimentation tank.
[0064] It should be noted that in order to ensure the subsequent accurate learning of various types of faults, in the process of generating sewage treatment process monitoring data and fault data, the relevant parameters of BSM1 can be controlled according to the actual fault type to be diagnosed. For example, if the fault diagnosis type is sludge bulking, the maximum specific growth rate coefficient of heterotrophic bacteria can be adjusted in BSM1. To obtain different degrees of sludge bulking, for example, if the fault diagnosis type is toxic shock, then in BSM1, by adjusting the maximum specific growth rate coefficient of heterotrophic bacteria and heterotrophic bacteria attenuation coefficient To generate toxic shock faults, for example, if the fault diagnosis type is residential fault, then in BSM1, the maximum specific growth rate coefficient of heterotrophic bacteria can be adjusted. and heterotrophic bacteria attenuation coefficient To generate habitability faults, no further limitations are given here.
[0065] In addition, nine types of fault data can be generated for three different operating conditions and three different fault types, as shown in Table 1.
[0066] Table 1: Specific fault information in the BSM1 model
[0067] In addition, when using BSM1 to generate training data, the sampling period can be set according to the actual design requirements. For example, the sampling period is 14 days, the sampling frequency is once every 15 minutes, and 1344 sets of data are collected as a sample at a time. A total of 1000 sets of sample data are collected, of which 100 sets of samples are collected for different fault types under each working condition. At the same time, in order to accurately reflect the changes in sewage quality, 12 monitoring variables are selected, as shown in Table 2.
[0068] Furthermore, after the training data is standardized, the data is divided into 10 categories, wherein the first category is normal data, the second to fourth categories are fault data of the three fault types under drought conditions, the fifth to seventh categories are fault data on rainy days, and the eighth to tenth categories are fault data under storm conditions. Each fault type is labeled accordingly, and a one-dimensional training feature and a two-dimensional training feature are obtained in a manner similar to the above steps S12-S15.
[0069] Table 2: Monitoring variable definitions
[0070] To summarize, the embodiments of the present invention use slow feature extraction, time series feature extraction, and spatial domain feature extraction of two-dimensional images generated based on time series features to fully explore the potential information in sewage treatment data from different angles, more accurately capture the key features in the data, and input the captured one-dimensional time series slow features and two-dimensional image features into the fault diagnosis model to make full use of both time domain and spatial domain features, provide richer feature identification for fault diagnosis, effectively improve the accuracy of identifying sewage fault types, improve the accuracy of fault diagnosis, and meet the sewage treatment industry's needs for equipment reliability and operational stability by diagnosing faults in a timely and accurate manner.
[0071] The sewage treatment process fault diagnosis device provided by the present invention is described below. The sewage treatment process fault diagnosis device described below and the sewage treatment process fault diagnosis method described above can be referenced to each other.
[0072] Figure 3 The schematic diagram of the structure of a sewage treatment process fault diagnosis device is shown, the device comprising: A data acquisition module 31 is used to acquire sewage process data, where the sewage process data is used to characterize water source data monitored during sewage treatment; The slow feature extraction module 32 performs slow feature extraction on the sewage process data to obtain slow features; The one-dimensional feature extraction module 33 performs time series feature extraction on the slow feature to obtain a one-dimensional time series slow feature; The image generation module 34 obtains a two-dimensional image by using the Markov transition field technology according to the one-dimensional time series slow characteristics; A two-dimensional feature extraction module 35 performs feature extraction on the two-dimensional image to obtain two-dimensional image features; The fault diagnosis module 36 inputs the one-dimensional time series slow features and the two-dimensional image features into the fault diagnosis model to obtain the fault diagnosis results output by the fault diagnosis model; wherein the fault diagnosis model is obtained based on the one-dimensional training features, the two-dimensional training features and the corresponding fault labels, and the fault diagnosis model is used to classify the faults based on the features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain the fault diagnosis results.
[0073] In this embodiment, the data acquisition module 31 includes: a data acquisition unit for collecting sewage treatment process monitoring data and fault data; and a standardization processing unit for performing standardization processing on the collected data to obtain sewage process data.
[0074] The slow feature extraction module 32 includes: a first decomposition unit, which performs singular value decomposition on the covariance matrix corresponding to the sewage process data to obtain the first feature of the corresponding covariance matrix; a matrix determination unit, which determines the whitening matrix according to the first feature; a whitening processing unit, which uses the whitening matrix to whiten the sewage process data to obtain the whitening feature; a conversion determination unit, which performs singular value decomposition on the covariance matrix of the first-order derivative result of the whitening feature, and determines the slow feature conversion matrix according to the singular value decomposition result; a feature acquisition unit, which obtains the slow feature according to the slow feature conversion matrix and the whitening feature.
[0075] The one-dimensional feature extraction module 33 is used to: input the slow feature into a pre-built one-dimensional convolutional neural network model to obtain a one-dimensional time series slow feature output by the one-dimensional convolutional neural network model; wherein the one-dimensional convolutional neural network model is trained based on the slow feature training data and the time series labels corresponding to the slow feature training data.
[0076] In an optional embodiment, the one-dimensional convolutional neural network model includes a one-dimensional convolutional layer, a batch normalization layer, a rectified linear unit activation function, a flattening layer and a fully connected layer.
[0077] The image generation module 34 includes: a binning unit, which uses the quantile binning method to obtain a preset number of quantile bins according to the one-dimensional time series slow feature, and adjusts the corresponding one-dimensional time series slow feature according to the corresponding quantile bin sequence number; a Markov matrix determination unit, which uses a first-order Markov chain to obtain a Markov matrix according to the adjusted one-dimensional time series slow feature and the obtained quantile bin; a transition probability determination unit, which expands the Markov matrix into the Markov transformation field based on the time axis to obtain the transition probability of any two quantile bins; a conversion unit, which performs Markov conversion on the one-dimensional time series slow feature according to the transition probability to obtain a two-dimensional image.
[0078] Furthermore, the binning unit includes: a quantile determination subunit, which determines the quantile according to the one-dimensional time series slow feature and a preset number; and a binning unit, which distributes the one-dimensional time series slow feature to the corresponding quantile bin in time series according to the determined quantile.
[0079] In addition, the binning unit also includes: an adjustment subunit, which changes the one-dimensional time series slow feature into a corresponding bin number.
[0080] Furthermore, the conversion unit includes: an image generation subunit, which uses the transition probability as a pixel and performs Markov transformation on the one-dimensional time series slow feature to obtain a two-dimensional image.
[0081] The two-dimensional feature extraction module 35 is used to: input the two-dimensional image into the two-dimensional convolutional neural network model constructed previously to obtain the two-dimensional image features output by the two-dimensional convolutional neural network model; wherein the two-dimensional convolutional neural network model is trained based on the training image and the feature labels corresponding to the training image; the two-dimensional convolutional neural network model includes 1 first convolutional layer, 1 maximum pooling layer, 16 residual modules, 1 average pooling layer and a fully connected layer, the first convolutional layer includes 64 convolution kernels of size 7×7, the maximum pooling layer has a size of 3×3, the average pooling layer has a size of 7×7, the residual module includes two second convolutional layers and one third convolutional layer, the convolution kernel size of the second convolutional layer is 1×1, and the convolution kernel size of the third convolutional layer is 3×3.
[0082] In an optional embodiment, the fault diagnosis model includes: a feature splicing layer, which performs feature splicing on one-dimensional time series slow features and two-dimensional image features to obtain splicing features; and a feature classification layer, which performs fault classification on the splicing features to obtain fault diagnosis results.
[0083] The fault diagnosis module 36 includes: a feature splicing unit, which inputs the one-dimensional time series slow feature and the two-dimensional image feature into the feature splicing layer for feature splicing to obtain a splicing feature; a fault classification unit, which inputs the splicing feature into the feature classification layer for fault classification to obtain a fault diagnosis result output by the feature classification layer.
[0084] In an optional embodiment, the fault diagnosis model includes a feature concatenation layer, a fully connected layer and a feature classification layer. The device also includes: a training module for training the fault diagnosis model before inputting the one-dimensional time series slow features and the two-dimensional image features into the fault diagnosis model.
[0085] Specifically, the training module includes: a training data acquisition unit, which acquires one-dimensional training features, two-dimensional training features and corresponding fault labels; a feature splicing unit, which inputs the one-dimensional training features and the two-dimensional training features into the feature splicing layer for feature splicing, and obtains the spliced training features output by the feature splicing layer; a feature learning unit, which inputs the spliced training features into the fully connected layer for nonlinear feature learning; a feature classification unit, which inputs the learned spliced training features into the feature classification layer for fault classification, and obtains the fault prediction results output by the feature classification layer; a training unit, which constructs a loss function based on the fault prediction results and fault labels, and ends the training based on the convergence of the loss function.
[0086] To summarize, the embodiments of the present invention use slow feature extraction, time series feature extraction, and spatial domain feature extraction of two-dimensional images generated based on time series features to fully explore the potential information in sewage treatment data from different angles, more accurately capture the key features in the data, and input the captured one-dimensional time series slow features and two-dimensional image features into the fault diagnosis model to make full use of both time domain and spatial domain features, provide richer feature identification for fault diagnosis, effectively improve the accuracy of identifying sewage fault types, improve the accuracy of fault diagnosis, and meet the sewage treatment industry's needs for equipment reliability and operational stability by diagnosing faults in a timely and accurate manner.
[0087] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor (processor) 410 , a communication interface (Communications Interface) 420 , a memory (memory) 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other through the communication bus 440 . The processor 410 can call the logic instructions in the memory 430 to execute the sewage treatment process fault diagnosis method, which includes: obtaining sewage process data, the sewage process data is used to characterize the water source data monitored in the sewage treatment process; performing slow feature extraction on the sewage process data to obtain slow features; performing time series feature extraction on the slow features to obtain one-dimensional time series slow features; according to the one-dimensional time series slow features, using Markov transfer field technology to obtain a two-dimensional image; performing feature extraction on the two-dimensional image to obtain two-dimensional image features; inputting the one-dimensional time series slow features and the two-dimensional image features into the fault diagnosis model to obtain the fault diagnosis results output by the fault diagnosis model; wherein the fault diagnosis model is obtained based on the one-dimensional training features, the two-dimensional training features and the corresponding fault labels, and the fault diagnosis model is used to classify the faults based on the features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain the fault diagnosis results.
[0088] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the sewage treatment process fault diagnosis method provided by the above methods, which includes: obtaining sewage process data, the sewage process data is used to characterize the water source data monitored in the sewage treatment process; performing slow feature extraction on the sewage process data to obtain slow features; performing time series feature extraction on the slow features to obtain one-dimensional time series slow features; based on the one-dimensional time series slow features, using Markov transfer field technology to obtain a two-dimensional image; performing feature extraction on the two-dimensional image to obtain two-dimensional image features; inputting the one-dimensional time series slow features and the two-dimensional image features into a fault diagnosis model to obtain a fault diagnosis result output by the fault diagnosis model; wherein the fault diagnosis model is obtained based on one-dimensional training features, two-dimensional training features and corresponding fault labels, and the fault diagnosis model is used to classify faults based on features fused from one-dimensional time series slow features and two-dimensional image features to obtain fault diagnosis results.
[0090] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the sewage treatment process fault diagnosis method provided by the above-mentioned methods, the method comprising: obtaining sewage process data, the sewage process data being used to characterize the water source data monitored in the sewage treatment process; performing slow feature extraction on the sewage process data to obtain slow features; performing time series feature extraction on the slow features to obtain one-dimensional time series slow features; obtaining a two-dimensional image based on the one-dimensional time series slow features using Markov transfer field technology; performing feature extraction on the two-dimensional image to obtain two-dimensional image features; inputting the one-dimensional time series slow features and the two-dimensional image features into a fault diagnosis model to obtain a fault diagnosis result output by the fault diagnosis model; wherein the fault diagnosis model is obtained based on one-dimensional training features, two-dimensional training features and corresponding fault labels, and the fault diagnosis model is used to classify faults based on features fused from one-dimensional time series slow features and two-dimensional image features to obtain a fault diagnosis result.
[0091] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0092] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for fault diagnosis in a sewage treatment process, characterized in that: include: Acquiring sewage process data, wherein the sewage process data is used to characterize water source data monitored during sewage treatment; Extracting slow features from the sewage process data to obtain slow features; Performing time series feature extraction on the slow feature to obtain a one-dimensional time series slow feature; According to the one-dimensional time series slow feature, a two-dimensional image is obtained by using Markov transition field technology; Performing feature extraction on the two-dimensional image to obtain two-dimensional image features; The one-dimensional time series slow features and the two-dimensional image features are input into a fault diagnosis model to obtain a fault diagnosis result output by the fault diagnosis model; wherein the fault diagnosis model is trained based on one-dimensional training features, two-dimensional training features and corresponding fault labels, and the fault diagnosis model is used to classify faults based on the features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain a fault diagnosis result.
2. The sewage treatment process fault diagnosis method according to claim 1, characterized in that: The fault diagnosis model comprises: A feature splicing layer, which performs feature splicing on the one-dimensional time series slow feature and the two-dimensional image feature to obtain a splicing feature; The feature classification layer classifies the splicing features into fault categories to obtain fault diagnosis results.
3. The sewage treatment process fault diagnosis method according to claim 1, characterized in that: The fault diagnosis model includes a feature concatenation layer, a fully connected layer and a feature classification layer, and before the one-dimensional time series slow feature and the two-dimensional image feature are input into the fault diagnosis model, it includes: Obtain one-dimensional training features, two-dimensional training features and corresponding fault labels; Inputting the one-dimensional training features and the two-dimensional training features into the feature splicing layer for feature splicing, and obtaining splicing training features output by the feature splicing layer; Inputting the spliced training features into the fully connected layer for nonlinear feature learning, and inputting the learned spliced training features into the feature classification layer for fault classification, to obtain a fault prediction result output by the feature classification layer; A loss function is constructed based on the fault prediction result and the fault label, and training is terminated based on convergence of the loss function.
4. The sewage treatment process fault diagnosis method according to claim 1, characterized in that: According to the one-dimensional time series slow feature, using Markov transition field technology, a two-dimensional image is obtained, including: According to the one-dimensional time series slow feature, a preset number of quantile bins are obtained by using the quantile binning method, and the corresponding one-dimensional time series slow feature is adjusted according to the corresponding quantile bin sequence number; According to the adjusted one-dimensional time series slow features and the obtained quantile bins, a Markov matrix is obtained using a first-order Markov chain; Based on the time axis, the Markov matrix is expanded into the Markov transformation field to obtain the transition probability of any two of the bins; According to the transition probability, the one-dimensional time series slow feature is subjected to Markov transformation to obtain a two-dimensional image.
5. The sewage treatment process fault diagnosis method according to claim 1, characterized in that: Slow features are extracted from the sewage process data to obtain slow features, including: Performing singular value decomposition on the covariance matrix corresponding to the sewage process data to obtain the first feature of the corresponding covariance matrix; Determine a whitening matrix according to the first feature; Using the whitening matrix, the sewage process data is whitened to obtain whitening features; Performing singular value decomposition on the covariance matrix of the first-order derivative result of the whitened feature, and determining a slow feature conversion matrix according to the singular value decomposition result; A slow feature is obtained according to the slow feature conversion matrix and the whitening feature.
6. The sewage treatment process fault diagnosis method according to claim 1, characterized in that: Extracting features from the two-dimensional image to obtain two-dimensional image features includes: Inputting the two-dimensional image into a previously constructed two-dimensional convolutional neural network model to obtain the two-dimensional image features output by the two-dimensional convolutional neural network model; wherein the two-dimensional convolutional neural network model is trained based on the training image and the feature labels corresponding to the training image; The two-dimensional convolutional neural network model includes 1 first convolution layer, 1 maximum pooling layer, 16 residual modules, 1 average pooling layer and a fully connected layer. The first convolution layer includes 64 convolution kernels of size 7×7, the size of the maximum pooling layer is 3×3, the size of the average pooling layer is 7×7, and the residual module includes two second convolution layers and one third convolution layer. The convolution kernel size of the second convolution layer is 1×1, and the convolution kernel size of the third convolution layer is 3×3.
7. The sewage treatment process fault diagnosis method according to claim 1, characterized in that: Performing time series feature extraction on the slow feature to obtain a one-dimensional time series slow feature, including: The slow feature is input into a pre-built one-dimensional convolutional neural network model to obtain a one-dimensional time series slow feature output by the one-dimensional convolutional neural network model; wherein the one-dimensional convolutional neural network model is trained based on the slow feature training data and the time series labels corresponding to the slow feature training data.
8. A sewage treatment process fault diagnosis device, characterized in that: include: A data acquisition module, which acquires sewage process data, wherein the sewage process data is used to characterize water source data monitored during sewage treatment; A slow feature extraction module performs slow feature extraction on the sewage process data to obtain slow features; A one-dimensional feature extraction module performs time series feature extraction on the slow feature to obtain a one-dimensional time series slow feature; An image generation module, which obtains a two-dimensional image by using the Markov transition field technology according to the one-dimensional time series slow feature; A two-dimensional feature extraction module performs feature extraction on the two-dimensional image to obtain two-dimensional image features; A fault diagnosis module inputs the one-dimensional time series slow features and the two-dimensional image features into a fault diagnosis model to obtain a fault diagnosis result output by the fault diagnosis model; wherein the fault diagnosis model is obtained based on one-dimensional training features, two-dimensional training features and corresponding fault labels, and the fault diagnosis model is used to classify faults based on the features fused from the one-dimensional time series slow features and the two-dimensional image features to obtain a fault diagnosis result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the sewage treatment process fault diagnosis method as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the sewage treatment process fault diagnosis method as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Sewage treatment fault diagnosis method and system based on variational mode decomposition and Transform integration
CN121919694A