Sewage plant fault diagnosis method based on canonical correlation local Fischer discriminant analysis

By combining typical related local Fischer discriminant analysis methods, the problem of accurate diagnosis of five-day biochemical oxygen demand drift faults in sewage plant is solved, efficient and accurate fault identification and rapid response are achieved, and the calculation complexity is reduced.

CN120448951APending Publication Date: 2025-08-08GUANGDONG POLYTECHNIC NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510540048.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The prior art is difficult to accurately and quickly detect and diagnose the drift fault of five-day biochemical oxygen demand in sewage plants, resulting in deterioration of water quality and increased operating costs. The traditional model cannot effectively capture the nonlinear correlation and dynamic timing characteristics of multi-source sensor data, resulting in high misjudgment rate and long response time.

Method used

Using a method based on typical related local Fischer discriminant analysis, the diagnosis of sewage plant faults is achieved through sensor data acquisition, preprocessing, feature extraction, dimensionality reduction and K nearest neighbor algorithms, and the accuracy and efficiency of fault diagnosis are improved.

Benefits of technology

It significantly improves the accuracy and efficiency of fault diagnosis, reduces the computational complexity, can effectively identify difficult-to-detect faults, and meets the needs of fast response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448951A_ABST
    Figure CN120448951A_ABST
Patent Text Reader

Abstract

The invention discloses a sewage plant fault diagnosis method based on canonical correlation local Fischer discriminant analysis, which comprises the following steps: acquiring normal operation state data and fault data of a sewage plant through a sensor at equal time intervals to obtain a data set, and preprocessing the data set to obtain a data matrix with uniform dimension; performing feature extraction on the data matrix by using canonical correlation analysis, and extracting canonical correlation variables U and V with maximum correlation; splicing the typical correlation variables U and V left and right to obtain a joint feature matrix T = [UV]; performing dimension reduction on the joint feature matrix T by using local Fischer discriminant analysis to obtain a transformation matrix W; projecting the joint feature matrix T to a low-dimensional space through the transformation matrix W to obtain a discrimination score matrix Z = WT; and carrying out normal operation state and fault classification on the discrimination score matrix Z by using a K nearest neighbor algorithm, thereby realizing fault diagnosis of the sewage plant, improving drift variable fault diagnosis accuracy, and effectively identifying faults which are difficult to detect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sewage plant sewage monitoring, and in particular to a sewage plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis. Background Art

[0002] In sewage treatment plants, the five-day biochemical oxygen demand (BOD) is a core indicator of organic matter removal efficiency. Exceeding the standard leads to a rapid depletion of dissolved oxygen, a drop in water oxygen content, and the rapid growth of anaerobic bacteria, which degrades water quality and makes it no longer meet industrial and domestic water needs. Restoring water quality often requires secondary treatment, significantly increasing operating costs. However, as a "drift" fault signal, the detection and diagnosis of the five-day BOD faces multiple technical and system challenges. Traditional five-day incubation methods are inherently affected by recalcitrant organic matter and experimental operation precision, resulting in significant measurement errors. The sewage treatment process is characterized by multiple coupled links, with multiple factors such as uneven aeration, fluctuating sludge activity, and sudden toxic loads contributing to the interaction. Accurately capturing this drift requires collaborative analysis of multi-sensor data. Initial BOD drift is often subtle, with gradual changes easily misinterpreted as normal fluctuations. In online monitoring of sewage treatment plants, multiple sensors continuously collect high-dimensional time series data at a sub-second rate, exponentially increasing the response time of the entire fault diagnosis process.

[0003] Traditional models, built on linear assumptions, struggle to effectively capture the nonlinear correlations and dynamic time series characteristics of multi-source sensor data. This leads to distorted extraction of key features for the gradual change in five-day biochemical oxygen demand. Furthermore, multicollinearity blurs the classification boundaries of high-dimensional water quality parameters. The lack of feature selection mechanisms makes them sensitive to redundant variables, resulting in high misclassification rates. Furthermore, most current models struggle to meet the demands of rapid response. Summary of the Invention

[0004] The purpose of the present invention is to overcome the shortcomings and deficiencies of the existing technology and propose a sewage treatment plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis to improve the accuracy of drift variable fault diagnosis, effectively identify difficult-to-detect faults, and reduce the computational complexity.

[0005] To achieve the above-mentioned purpose, the technical solution provided by the present invention is: a sewage plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis, comprising the following steps:

[0006] S1: Sensors are used to collect normal operating status data and fault data of the sewage treatment plant at equal time intervals to form a data set, which is then preprocessed to obtain a data matrix with unified dimensions.

[0007] S2: Use canonical correlation analysis to extract features from the data matrix and extract the canonical correlation variables U and V with the greatest correlation;

[0008] S3: Concatenate the canonical correlation variables U and V to obtain the joint feature matrix T = [U|V];

[0009] S4: Use local Fisher discriminant analysis to reduce the dimension of the joint feature matrix T to obtain the transformation matrix W;

[0010] S5: Project the joint feature matrix T to the low-dimensional space through the transformation matrix W to obtain the discriminant score matrix Z = WT;

[0011] S6: Use the K-nearest neighbor algorithm to classify the discriminant score matrix Z into normal operating status and faults, thereby realizing fault diagnosis of the sewage treatment plant.

[0012] Furthermore, in step S1, during the equal time interval acquisition process, the data collected synchronously by each sensor constitutes a multidimensional time series data set; in order to solve the dimensional inconsistency problem of the data set, a standardization preprocessing is used to eliminate the dimensional difference and generate a data matrix with a unified dimension of 0 and a standard deviation of 1; by labeling the normal operating state data and the fault data, a label vector containing category information is generated. in is a set of real numbers, and n is the number of samples.

[0013] Furthermore, the specific operation steps of step S2 are:

[0014] S21: Split the data matrix into input side matrices according to the spatial distribution of sensors and the output side matrix in is a set of real numbers, n is the number of samples, p is the number of features of X, and q is the number of features of Y;

[0015] Compute the autocovariance matrices of X and Y and their cross-covariance matrices:

[0016]

[0017] Where, ∑ XX is the autocovariance matrix of X, ∑ YY is the autocovariance matrix of Y, ∑ XY is the cross-covariance matrix of X and Y, and ∑ XY =∑ YX T ;

[0018] S22: Construct objective function:

[0019]

[0020] By constructing the generalized characteristic equation:

[0021]

[0022] In the formula, λ is the typical correlation coefficient, λ 2 is the corresponding eigenvalue, a is the matrix Corresponding to λ 2 The eigenvector of is called the weight vector of the canonical correlation variable in the X space, and b is the matrix Corresponding to λ 2 The characteristic vector of is called the weight vector of the canonical correlation variable in the Y space. For E YY The inverse matrix of For E XX The inverse matrix of

[0023] Solved k=min(p,q), and the corresponding eigenvector a∈{a1,a2,…,a k}, b∈{b1,b2,…,b k}, where λ k is the kth canonical correlation coefficient, is the kth eigenvalue, a k is a matrix correspond The eigenvector of b k is a matrix correspond The eigenvector of

[0024] Project X and Y through a and b:

[0025] U=Xa,V=Yb

[0026] Get k pairs of typical correlation variables: U∈{U1,U2,…,U k},V∈{V1,V2,…,V k}, where U k 、V k is the kth pair of canonical correlation variables;

[0027] The cumulative contribution rate of the eigenvalues retains the first m∈k pairs of typical related variables {U1, V1}, {U2, V2}, …, {U m ,V m}, we get U∈{U1,U2,…,U m},V∈{V1,V2,…,V m}Implement feature selection.

[0028] Furthermore, the specific operation steps of step S4 are:

[0029] S41: Construct the local similarity matrix A from the joint feature matrix T:

[0030]

[0031] Where n is the number of samples, the fth sample t f With the g-th sample t g Similarity weight The Euclidean distance matrix D fg =||t f -t g ||2, y f is the fth sample t f The label, σ f is the fth sample t f The median of the Euclidean distance between samples in the same category, y g is the gth sample t g The label, σ g is the gth sample t g The median of the Euclidean distances to other samples in the same category;

[0032] S42: Calculate the intra-class scatter matrix S w and the inter-class scatter matrix S b :

[0033] S w =T T (D A -A)T

[0034] Where D A is a degree matrix, defined as a diagonal matrix whose diagonal elements are the sum of each row of the local similarity matrix A A (f,f), that is:

[0035] S b =S t -S w

[0036] Where S t =T T T is the overall scatter matrix, which describes the dispersion of the entire joint feature matrix and represents the difference between all samples and the overall mean;

[0037] S43: Find the optimal projection direction by maximizing the inter-class divergence and minimizing the intra-class divergence, which can be transformed into solving the generalized eigenvalue problem:

[0038] S b w=ψS w w

[0039] Where ψ is the eigenvalue and w is the eigenvector. To solve the above problem, arrange all eigenvalues in descending order, select the eigenvectors corresponding to the first d largest eigenvalues, and combine them column by column to obtain the transformation matrix W.

[0040] Furthermore, in step S6, the discriminant score matrix obtained in step S5 is first normalized, and then regarded as the eigenvector of the sample in the low-dimensional discriminant space. The K-nearest neighbor algorithm is used to calculate the Euclidean distance between the sample to be tested and the known normal operating state samples and fault samples. The K nearest neighbors are selected, and a majority vote is used to determine whether they belong to the normal operating state or the fault state, and finally the diagnosis result is output.

[0041] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0042] 1. This invention proposes for the first time the combination of canonical correlation analysis and local Fisher discriminant analysis, which takes into account both the correlation between features and the separability of categories, while improving the tolerance to noise and effectively reducing the computational complexity, thereby improving the efficiency and performance of fault diagnosis.

[0043] 2. Through experimental verification, the effectiveness of the method of the present invention has been demonstrated on a sewage treatment platform, and its practical feasibility and superior performance in industrial applications have been verified.

[0044] In summary, this method combines canonical correlation analysis with local Fisher discriminant analysis for the first time, fully considering the correlation between features and the separability of categories. This not only improves noise tolerance but also effectively reduces computational complexity, thereby significantly enhancing the efficiency and performance of fault diagnosis. Experimental validation on a sewage treatment platform demonstrates the effectiveness of this method and further confirms its practical feasibility and superior performance in industrial applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 Flowchart of the method of the present invention. DETAILED DESCRIPTION

[0046] The present invention will be described in further detail below with reference to the embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0047] like Figure 1 As shown, this embodiment discloses a sewage plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis, the details of which are as follows:

[0048] 1. Data collection and preprocessing:

[0049] The data is derived from the International Water Association (IWA) standardized wastewater treatment simulation platform. Sensor signals, such as dissolved oxygen, ammonia nitrogen, and chemical oxygen demand, are read synchronously at fixed time intervals to form the original data set. in, is a set of real numbers, n is the number of samples, M is the number of features, x i For i rows of samples, at the same time, for each row of samples x i Tag y i ∈{0,1}, where 0 represents normal operation and 1 represents fault state;

[0050] Directly using the original dataset will cause some features to dominate the entire method due to different dimensions and value ranges. 0 Each column j of is transformed into zero mean unit variance to obtain the data matrix :

[0051]

[0052] Where, for The i-th row and j-th column of For X 0 The i-th row and j-th column of μ j for The j-th column mean, σ j for The standard deviation of the jth column of ;

[0053] At this time, the data matrix All columns of are in the same dimension, ensuring the stability and reliability of subsequent algorithms.

[0054] 2. Use canonical correlation analysis to extract features from the data matrix:

[0055] In order to make the extracted features reflect the internal structure between sensors and have a high correlation with the fault label, we transform the data matrix Split the data matrix into input side matrices according to the spatial distribution of sensors and the output side matrix Where p is the number of features of X, q is the number of features of Y, is the set of real numbers;

[0056] Compute the autocovariance matrices of X and Y and their cross-covariance matrices:

[0057]

[0058] Where, ∑ XX is the autocovariance matrix of X, ∑ YY is the autocovariance matrix of Y, ∑ XYis the cross-covariance matrix of X and Y, and Σ XY =∑ YX T ;

[0059] In order to find the linear combination of X and Y so that the correlation coefficient between the linear combination of X and Y is maximized, the objective function is constructed:

[0060]

[0061] By constructing and solving the generalized characteristic equation:

[0062]

[0063] In the formula, λ is the typical correlation coefficient, λ 2 is the corresponding eigenvalue, a is the matrix Corresponding to λ 2 The eigenvector of is called the weight vector of the canonical correlation variable in the X space, and b is the matrix Corresponding to λ 2 The characteristic vector of is called the weight vector of the canonical correlation variable in the Y space. ∑ YY The inverse matrix of ∑ XX The inverse matrix of

[0064] Solved k=min(p,q), and the corresponding eigenvector a∈{a1,a2,…,a k}, b∈{b1,b2,…,b k}, where λ k is the kth canonical correlation coefficient, is the kth eigenvalue, a k is a matrix correspond The eigenvector of b k is a matrix correspond The eigenvector of

[0065] Project X and Y through a and b:

[0066] U=Xa,V=Yb

[0067] Get k pairs of typical correlation variables: U∈{U1,U2,…,U k},V∈{V1,V2,…,V k}, where U k 、V k is the kth pair of canonical correlation variables;

[0068] Set the cumulative contribution rate of the eigenvalue to 85% and retain the first m∈k pairs of typical related variables {U1, V1}, {U2, V2}, …, {U m ,V m}, we get U∈{U1,U2,…,U m},V∈{V1,V2,…,V m}Implement feature selection;

[0069] Concatenate U and V left and right to obtain the joint feature matrix T = [U|V], which can eliminate data with poor correlation and retain data with good correlation.

[0070] 3. Local Fisher discriminant analysis and optimization:

[0071] First, based on the joint feature matrix T, the local proximity between samples is measured by the Gaussian kernel function to construct the local similarity matrix A:

[0072]

[0073] Where, the fth sample t f With the g-th sample t g Similarity weight The Euclidean distance matrix D fg =||t f -t g ||2, y f is the fth sample t f The label, σ f is the fth sample t f The median of the Euclidean distance between samples in the same category, y g is the gth sample t g The label, σ g is the gth sample t g The median of the Euclidean distances to other samples in the same category;

[0074] D of non-similar sample points fg It is expressed as zero, which reduces the overall computational complexity. At the same time, this weight based on the local Gaussian kernel is different from the traditional global equal-weight Fisher discriminant analysis and is more adaptable to the sample structure of nonlinear distribution.

[0075] In order to find the best projection direction, calculate the intra-class scatter matrix S w and the inter-class scatter matrix S b :

[0076] S w =T T (D A -A)T

[0077] Where D Ais the degree matrix, defined as a diagonal matrix whose diagonal elements are the sum of each row of the local similarity matrix A, that is:

[0078] S b =S t -S w

[0079] Where S t =T T T is the overall scatter matrix, which describes the dispersion of the entire joint feature matrix and represents the difference between all samples and the overall mean;

[0080] The optimal projection direction is found by maximizing the inter-class divergence and minimizing the intra-class divergence, which can be transformed into solving the generalized eigenvalue problem:

[0081] S b w=ψS w w

[0082] In the formula, ψ is the eigenvalue and w is the eigenvector. Solve the above problem and arrange the obtained eigenvalues in descending order. In this example, since only normal operation samples and fault samples need to be separated, the eigenvector corresponding to the maximum eigenvalue is selected to form the projection matrix: W = [w1], where w1 is the eigenvector corresponding to the maximum eigenvalue. Finally, the projection matrix is used to reduce the dimension of the original data to obtain a low-dimensional discriminant score matrix:

[0083] Z=WT

[0084] Here, each row of Z is the new representation of each sample in the joint feature matrix T in the local Fisher low-dimensional discriminant space.

[0085] 4. The discriminant score matrix is first normalized and then regarded as the eigenvector of the sample in the low-dimensional discriminant space. The K-nearest neighbor algorithm is used to calculate the Euclidean distance between the sample to be tested and the known normal operating state samples and fault samples. The K nearest neighbors are selected and a majority vote is used to determine whether they belong to the normal operating state or the fault state, and the final diagnosis result is output.

[0086] 5. Fault classification and performance verification:

[0087] Samples were randomly selected from a 70% training set and a 30% test set. Feature extraction and dimensionality reduction modeling were performed on the training set using canonical correlation local Fisher discriminant analysis. After training, the Euclidean distance between each sample in the test set and all training samples was calculated. The K neighbors with the smallest distance were identified, and the majority vote of their categories was used as the fault type for the tested sample. This enabled the K-nearest neighbor algorithm to automatically identify normal states and various fault types. After completing the classification prediction for all samples in the test set, the predicted labels were compared with the true labels to evaluate the performance of the invention. Finally, experimental verification on a sewage treatment platform demonstrated the effectiveness of the invention method, further confirming its practical feasibility and superior performance in industrial applications.

[0088] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A sewage treatment plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis is characterized by: The following steps are involved: S1: Sensors are used to collect normal operating status data and fault data of the sewage treatment plant at equal time intervals to form a data set, which is then preprocessed to obtain a data matrix with unified dimensions. S2: Use canonical correlation analysis to extract features from the data matrix and extract the canonical correlation variables U and V with the greatest correlation; S3: Concatenate the canonical correlation variables U and V to obtain the joint feature matrix T = [U|V]; S4: Use local Fisher discriminant analysis to reduce the dimension of the joint feature matrix T to obtain the transformation matrix W; S5: Project the joint feature matrix T to the low-dimensional space through the transformation matrix W to obtain the discriminant score matrix Z = WT; S6: Use the K-nearest neighbor algorithm to classify the discriminant score matrix Z into normal operating status and faults, thereby realizing fault diagnosis of the sewage treatment plant.

2. The sewage treatment plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis according to claim 1 is characterized in that: In step S1, during the equal time interval acquisition process, the data collected synchronously by each sensor constitutes a multidimensional time series data set; in order to solve the dimensional inconsistency problem of the data set, standardization preprocessing is used to eliminate the dimensional difference and generate a unified dimensional data matrix with a mean of 0 and a standard deviation of 1; by labeling the normal operating status data and the fault data, a label vector containing category information is generated. in is a set of real numbers, and n is the number of samples.

3. The sewage treatment plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis according to claim 1 is characterized in that: The specific operation steps of step S2 are: S21: Split the data matrix into input side matrices according to the spatial distribution of sensors and the output side matrix in is a set of real numbers, n is the number of samples, p is the number of features of X, and q is the number of features of Y; Compute the autocovariance matrices of X and Y and their cross-covariance matrices: Where, ∑ XX is the autocovariance matrix of X, ∑ YY is the autocovariance matrix of Y, ∑ XY is the cross-covariance matrix of X and Y, and ∑ XY =∑ YX T ; S22: Construct objective function: By constructing the generalized characteristic equation: In the formula, λ is the typical correlation coefficient, λ 2 is the corresponding eigenvalue, a is the matrix Corresponding to λ 2 The eigenvector of is called the weight vector of the canonical correlation variable in the X space, and b is the matrix Corresponding to λ 2 The characteristic vector of is called the weight vector of the canonical correlation variable in the Y space. Σ YY The inverse matrix of ∑ XX The inverse matrix of Solved k=min(p,q), and the corresponding eigenvector a∈{a1,a2,…,a k }, b∈{b1,b2,…,b k }, where λ k is the kth canonical correlation coefficient, is the kth eigenvalue, a k is a matrix correspond The eigenvector of b k is a matrix correspond The eigenvector of Project X and Y through a and b: U=Xa,V=Yb Get k pairs of typical correlation variables: U∈{U1,U2,…,U k },V∈{V1,V2,…,V k }, where U k 、V k is the kth pair of canonical correlation variables; The cumulative contribution rate of the eigenvalues retains the first m∈k pairs of typical related variables {U1, V1}, {U2, V2}, …, {U m ,V m }, we get U∈{U1,U2,…,U m },V∈{V1,V2,…,V m }Implement feature selection.

4. The sewage treatment plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis according to claim 1, characterized in that: The specific operation steps of step S4 are: S41: Construct the local similarity matrix A from the joint feature matrix T: Where n is the number of samples, the fth sample t f With the g-th sample t g Similarity weight The Euclidean distance matrix D fg =||t f -t g ||2, y f is the fth sample t f The label, σ f is the fth sample t f The median of the Euclidean distance between samples in the same category, y g is the gth sample t g The label, σ g is the gth sample t g The median of the Euclidean distances to other samples in the same category; S42: Calculate the intra-class scatter matrix S w and the inter-class scatter matrix S b : S w =T T (D A -A)T Where D A is a degree matrix, defined as a diagonal matrix whose diagonal elements are the sum of each row of the local similarity matrix A A (f,f), that is: S b =S t -S w Where S t =T T T is the overall scatter matrix, which describes the dispersion of the entire joint feature matrix and represents the difference between all samples and the overall mean; S43: Find the optimal projection direction by maximizing the inter-class divergence and minimizing the intra-class divergence, which can be transformed into solving the generalized eigenvalue problem: S b w=ψS w In Where ψ is the eigenvalue and w is the eigenvector. To solve the above problem, arrange all eigenvalues in descending order, select the eigenvectors corresponding to the first d largest eigenvalues, and combine them column by column to obtain the transformation matrix W.

5. The sewage treatment plant fault diagnosis method based on canonical correlation local Fisher discriminant analysis according to claim 1 is characterized in that: In step S6, the discriminant score matrix obtained in step S5 is first normalized and then regarded as the eigenvector of the sample in the low-dimensional discriminant space. The K-nearest neighbor algorithm is used to calculate the Euclidean distance between the sample to be tested and the known normal operating state samples and fault samples. The K nearest neighbors are selected and a majority vote is used to determine whether they belong to the normal operating state or the fault state, and finally the diagnosis result is output.