A method for identifying baseline anomalies in transformer spectrograms based on similarity and Wasserstein distance

By combining the Pearson correlation coefficient and Wasserstein distance, the problem of identifying abnormalities such as baseline drift in the transformer oil chromatogram is solved, efficient and reliable abnormality detection is achieved, and the accuracy and stability of transformer fault diagnosis is improved.

CN119475183BActive Publication Date: 2025-08-12CHINA YANGTZE POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411646354.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-08-12
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The existing transformer oil chromatogram abnormality recognition methods are difficult to accurately capture the slight changes in the baseline part, resulting in insufficient recognition ability of abnormalities such as baseline drift, and the recognition results are greatly affected by threshold setting and poor robustness.

Method used

The baseline part of the baseline is evaluated by using the Pearson correlation coefficient based on similarity and Wasserstein distance. Combined with the dual detection mechanism, abnormalities such as baseline drift, ghost peaks or miscellaneous peaks in the spectrum are identified.

Benefits of technology

It improves the accuracy and robustness of abnormal identification, and can promptly detect small abnormalities such as baseline drift, avoid misjudgment or missed detection, and ensures the reliability and stability of the diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475183B_ABST
    Figure CN119475183B_ABST
Patent Text Reader

Abstract

A method for identifying baseline anomalies in transformer spectra based on similarity and Wasserstein distance. First, data quality is ensured through preprocessing steps such as Gaussian filtering denoising, baseline correction, data cleaning, data integration, data transformation, and data reduction. Then, a standard chromatogram library without anomalies is established, and a baseline template is extracted. The Pearson correlation coefficient is used to calculate the overall similarity between the spectrum to be tested and the standard spectrum, and a similarity threshold is set to preliminarily screen out abnormal spectra. At the same time, the Wasserstein distance between the baseline of the spectrum to be tested and the standard baseline template is calculated, and a distance threshold is set to accurately identify minor anomalies such as baseline drift. By comprehensively judging the results of similarity and Wasserstein distance, it is confirmed whether the spectrum has baseline anomalies. Finally, a graphical user interface is developed to output the anomaly identification results, including similarity, Wasserstein distance value, and anomaly type, and provide an anomaly alarm function. The present invention improves the accuracy and reliability of anomaly detection and is suitable for transformer maintenance and fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of transformers, and in particular relates to a transformer spectrum baseline anomaly recognition method based on similarity and Wasserstein distance. Background Art

[0002] In power systems, transformers are critical equipment, and their operating status directly impacts the safety and stability of the entire power grid. Transformer oil chromatography, a key fault diagnosis method, can indirectly reveal internal transformer faults by analyzing the composition and content of dissolved gases in transformer oil. However, in practical applications, chromatograms are often affected by various factors, such as equipment accuracy and operating conditions, leading to anomalies such as baseline drift, ghost peaks, and miscellaneous peaks. These anomalies not only complicate fault diagnosis but can also mislead diagnostic results.

[0003] Traditional methods for identifying chromatographic anomalies rely heavily on manual judgment, which can be highly subjective and inefficient. With the advancement of computer technology and machine learning, several algorithm-based automated anomaly detection methods have emerged. These methods extract characteristic parameters from chromatograms and compare them with standard spectra to automatically identify anomalies. However, existing methods often focus on assessing overall similarity, ignoring subtle changes in the baseline, resulting in insufficient detection of anomalies such as baseline drift.

[0004] Currently, existing implementations most similar to the present invention primarily focus on chromatogram anomaly identification methods based on similarity calculations. These methods typically use metrics such as cosine similarity and the Pearson correlation coefficient to calculate the similarity between the test spectrum and the reference spectrum, and then determine whether anomalies exist by setting a threshold.

[0005] However, these methods have the following shortcomings: first, the similarity calculation is easily affected by the overall trend and it is difficult to accurately capture the slight changes in the baseline part; second, there is a lack of targeted detection methods for specific anomaly types such as baseline drift; third, the recognition results are greatly affected by the threshold setting and have poor robustness. Summary of the Invention

[0006] The technical problem to be solved by this invention is to provide a method for identifying baseline anomalies in transformer spectra based on similarity and Wasserstein distance. By accurately calculating the similarity between the transformer oil chromatogram and a standard spectrum, as well as the Wasserstein distance of the baseline portion, this method automatically identifies anomalies such as baseline drift, ghost peaks, or miscellaneous peaks in the spectrum. This method combines the advantages of global similarity assessment with local baseline difference detection, improving the accuracy and robustness of anomaly identification and providing an efficient and reliable technical means for transformer fault diagnosis.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0008] A transformer spectrum baseline anomaly identification method based on similarity and Wasserstein distance, the steps are as follows:

[0009] Step 1: Use filters to remove high-frequency noise from the chromatogram, remove baseline drift through a baseline correction algorithm, and perform operations including data cleaning, data integration, data transformation, and data reduction to ensure data comparability and quality;

[0010] Step 2: Select candidate reference atlases from the data source, perform preprocessing including denoising and smoothing, screen and verify the atlases, organize them into a standard atlas library, and maintain and update them;

[0011] Step 3: Use the Pearson correlation coefficient method to calculate the overall similarity between the spectrum to be tested and the standard spectrum, and set a threshold to judge abnormalities;

[0012] Step 4: Calculate the Wasserstein distance between the baseline of the spectrum to be measured and the standard baseline template, and set a threshold to determine if the baseline is abnormal;

[0013] Step 5: Combine the similarity and Wasserstein distance results to determine whether the spectrum baseline is abnormal;

[0014] Step 6: Identify and output abnormal results, including results such as similarity exceeding a threshold, Wasserstein distance exceeding a threshold, and abnormal type.

[0015] Preferably, in step 1, the data cleaning includes:

[0016] (1) Filling missing values: using the prediction model to fill in missing values.

[0017] (2) Remove high-frequency noise: Use filters to remove high-frequency noise.

[0018] (3) Handling outliers: Use threshold setting or statistical distribution-based methods to make judgments and handle outliers.

[0019] (4) Ensure data accuracy and consistency: Ensure by correcting errors and inconsistencies.

[0020] The data integration is to use the data integration process to merge data from multiple data sources into a unified data set, while solving data redundancy and conflict problems and ensuring data integrity and consistency.

[0021] The data transformation includes:

[0022] (1) Scaling data: Scale the data to a specific range using proportional scaling.

[0023] (2) Adjust the distribution: Use the method of adjusting the data distribution to adjust the data distribution to a standard normal distribution, so that the mean is 0 and the standard deviation is 1.

[0024] (3) Convert data: Convert continuous data into discrete categories to facilitate data analysis or mining algorithms.

[0025] The data reduction mentioned above is to reduce the amount of data by using methods such as dimensionality reduction and aggregation to reduce the amount of data while maintaining the original information of the data, thereby improving the efficiency of data processing and analysis.

[0026] Preferably, the sub-steps of step 2 are:

[0027] Sub-step 2.1: Select representative atlases from existing databases as candidate reference atlases, ensuring that they are from reliable sources and have been rigorously reviewed and verified;

[0028] Sub-step 2.2: Perform denoising and smoothing preprocessing operations on the candidate reference atlas to improve the clarity and accuracy of the atlas;

[0029] Sub-step 2.3: Standardize the spectra to ensure that different spectra are compared on the same scale and eliminate differences caused by instrumental and operational factors;

[0030] Sub-step 2.4: Separate the baseline and peak components to facilitate subsequent analysis and comparison;

[0031] Sub-step 2.5: Screen the pre-processed spectra according to the standards and exclude abnormal or non-compliant spectra;

[0032] Sub-step 2.6: Validate the selected profiles by comparing them with profiles of known samples and repeating the measurements to ensure their representativeness and accuracy.

[0033] Sub-step 2.7: Organize the screened and verified atlases into a standard atlas library, and number, classify, and store them;

[0034] Sub-step 2.8: Ensure the updating and maintenance of the standard spectrum library, add new standard spectrums in a timely manner and delete outdated or no longer used spectrums.

[0035] Preferably, the sub-steps of step 3 are:

[0036] Sub-step 3.1: Calculate the overall similarity between the test spectrum and the standard spectrum using the Pearson correlation coefficient method;

[0037] Sub-step 3.2: Set similarity threshold;

[0038] Sub-step 3.3: If the calculated similarity is lower than the threshold, it is considered as a possible anomaly.

[0039] Preferably, the method of step 3.3 is as follows:

[0040] Use the Pearson correlation coefficient method to calculate the overall similarity between the test spectrum and the standard spectrum; set a similarity threshold, and if it is lower than the threshold, it is considered a possible anomaly;

[0041] The Pearson correlation coefficient is an indicator that measures the degree of linear correlation between two variables X and Y. The value range of the Pearson correlation coefficient r is between -1 and 1, where:

[0042] When r = 1, it means that X and Y are completely positively correlated, that is, one variable increases linearly as the other variable increases, or decreases linearly as the other variable decreases;

[0043] When r = -1, it means that X and Y are completely negatively correlated, that is, one variable decreases linearly as the other variable increases, or increases linearly as the other variable decreases;

[0044] When r = 0, it means there is no linear correlation between X and Y;

[0045] The calculation formula of Pearson correlation coefficient is:

[0046] ;

[0047] in, and are the i-th observation values of variables X and Y, respectively. and are the means of X and Y respectively, and n is the number of observations.

[0048] Preferably, the sub-steps of step 4 are:

[0049] Substep 4.1: For the baseline component, obtain the baseline data for the spectrum under test and the standard baseline template data. These data are one-dimensional arrays representing baseline intensities at different wavelengths or frequencies. Substep 4.2: Based on an understanding of baseline drift tolerance and statistical information derived from extensive experimental data, set the Wasserstein distance threshold. Substep 4.3: Calculate the Wasserstein distance between the baseline of the spectrum under test and the standard baseline template: In Python, the scipy.stats.wasserstein_distance function in the scipy library can be used to directly calculate the Wasserstein distance between two one-dimensional arrays. Substep 4.4: If the calculated Wasserstein distance exceeds the threshold, the baseline is considered abnormal. Furthermore, the Wasserstein distance can capture subtle differences between distributions, making it suitable for detecting baseline drift.

[0050] Preferably, the calculation method of sub-step 4.3 is:

[0051] For one-dimensional probability distributions P and Q, defined on the real number set R, their p-order Wasserstein distance is defined as:

[0052] ;

[0053] Where Π(P, Q) is the set of all possible joint distributions of P and Q, and the marginal distributions of the joint distribution are P and Q respectively; Represents the distance from x to y power; is a joint probability measure The integral differential element of The probability distribution of (x, y) is weighted by the 'differential level' of the probability mass near the point (x, y). ≥1 is a real number, indicating that -order distance;

[0054] Based on the actual application, two sets of data are obtained: one set is the baseline data of the spectrum to be measured, and the other set is the data of the standard baseline template. These data are one-dimensional arrays, representing the baseline intensity at different wavelengths or frequencies. In Python, the scipy.stats.wasserstein_distance function in the scipy library can be used directly to calculate the Wasserstein distance between two one-dimensional arrays.

[0055] Preferably, in sub-step 4.4, a threshold is set and a determination is made as to whether the baseline is abnormal. A Wasserstein distance threshold needs to be set according to the specific requirements of the application. This threshold should be based on an understanding of the tolerance to baseline drift and statistical information obtained from a large amount of experimental data.

[0056] Preferably, in step 5, a comprehensive judgment is made based on the results of similarity and Wasserstein distance; if both indicate abnormality, it is confirmed that the spectrum has a baseline abnormality; if only one of the indicators indicates abnormality and the other indicator is within the normal range, further analysis or confirmation is required; if both are within the normal range, the baseline of the spectrum is considered to be normal.

[0057] Preferably, in step 6, the abnormality types include baseline drift, ghost peaks, and miscellaneous peaks; by developing a graphical user interface, it is convenient for users to upload chromatogram files, view abnormality identification results and perform interactive operations; an abnormality alarm function is provided to promptly notify users when a baseline abnormality is detected.

[0058] The present invention can achieve the following beneficial effects:

[0059] 1. By combining the Pearson correlation coefficient and the Wasserstein distance, the present invention comprehensively assesses the similarity between the test spectrum and the reference spectrum from both a global and local perspective. The Pearson correlation coefficient assesses overall spectral similarity, while the Wasserstein distance specifically focuses on subtle changes in the baseline. This dual detection mechanism significantly improves the accuracy and reliability of anomaly detection.

[0060] 2. The Wasserstein distance can capture subtle changes in the baseline and is particularly suitable for detecting minor anomalies such as baseline drift. By setting an appropriate threshold, the present invention can promptly detect baseline anomalies such as baseline drift, ghost peaks, or miscellaneous peaks, thereby avoiding misjudgments or missed detections caused by baseline problems.

[0061] 3. This paper employs a variety of data preprocessing techniques, such as Gaussian filtering to remove high-frequency noise, baseline correction algorithms (such as iterative polynomial fitting and wavelet transform) to remove baseline drift, as well as data cleaning, data integration, data transformation, and data reduction. These preprocessing measures effectively improve data quality and ensure the accuracy of subsequent analysis.

[0062] 4. This invention improves the robustness of the algorithm by adaptively training it for different types of chromatograms and abnormal situations. By optimizing threshold settings based on extensive experimental data and evaluating algorithm performance using metrics such as accuracy, recall, and F1 score, the system ensures stability and reliability in a variety of complex environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The present invention will be further described below with reference to the accompanying drawings and examples:

[0064] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0065] The preferred solution is Figure 1 As shown in the figure, a method for identifying baseline anomalies in transformer spectra based on similarity and Wasserstein distance is used. This method calculates the similarity between the transformer oil chromatogram and a standard spectrum, as well as the Wasserstein distance of the baseline portion, to identify baseline anomalies in the spectrum, such as baseline drift, ghost peaks, or other peaks. Similarity is used to assess the similarity of the entire spectrum, while the Wasserstein distance specifically focuses on subtle changes in the baseline portion. Combining the two allows for more comprehensive anomaly detection. The specific method is as follows:

[0066] 1. Data preprocessing:

[0067] Applying filters (such as Gaussian filters) can effectively remove high-frequency noise while preserving important chromatographic peak information. This is achieved by subtracting the mean and dividing by the standard deviation, ensuring data comparability across chromatograms. Baseline correction algorithms (such as iterative polynomial fitting and wavelet transforms) can be used to remove baseline drift and identify and isolate peaks, facilitating subsequent analysis.

[0068] Data preprocessing mainly includes data cleaning, data integration, data transformation and data reduction.

[0069] Data cleaning: Fill missing values using predictive models. Remove high-frequency noise through filtering techniques. Identify and address outliers in the data by setting thresholds or using statistical distribution-based methods. Correct errors and inconsistencies in the data to ensure accuracy and consistency.

[0070] Data integration is the process of combining data from multiple data sources into a unified dataset. During the data integration process, issues such as data redundancy and data conflicts need to be resolved to ensure data integrity and consistency.

[0071] Data transformation: Scale the data so that it falls into a small, specific interval, such as [0, 1] or [-1, 1]. Adjust the data distribution to a standard normal distribution, with a mean of 0 and a standard deviation of 1. Convert continuous data into discrete categories to facilitate certain data analysis or data mining algorithms.

[0072] Data reduction is to reduce the amount of data through dimensionality reduction, aggregation and other methods while maintaining the original information of the data, so as to improve the efficiency of data processing and analysis.

[0073] 2. Establishment of standard spectrum:

[0074] Select a series of standard chromatograms without abnormalities as references. Preprocess the standard chromatograms and extract the baseline template.

[0075] Select a series of representative spectra from the existing database as candidate reference spectra. Ensure that these spectra are derived from reliable data sources and have been rigorously reviewed and verified. Perform pre-processing operations such as denoising and smoothing on the candidate reference spectra to improve the clarity and accuracy of the spectra. Standardize the process to ensure that different spectra are compared on the same scale and eliminate differences caused by factors such as instruments and operations. Separate the baseline part and the peak part to facilitate subsequent analysis and comparison. Screen the pre-processed spectra according to the standards to exclude abnormal or non-compliant spectra. Verify the screened spectra to ensure their representativeness and accuracy. This can be done by comparing with spectra of known samples, repeated measurements, etc. Organize the screened and verified spectra into a standard spectra library, and number, classify and store them. Ensure the updating and maintenance of the standard spectra library, add new standard spectra in a timely manner, and delete outdated or no longer used spectra.

[0076] 3. Similarity calculation:

[0077] The Pearson correlation coefficient method is used to calculate the overall similarity between the test spectrum and the standard spectrum. A similarity threshold is set, and a value below the threshold is considered a possible anomaly.

[0078] The Pearson correlation coefficient is a measure of the degree of linear correlation between two variables, X and Y. This coefficient was proposed by Karl Pearson in the 1880s and is widely used in statistics. The Pearson correlation coefficient, r, ranges from -1 to 1, where:

[0079] When r = 1, it means that X and Y are perfectly positively correlated, that is, one variable increases linearly as the other variable increases, or decreases linearly as the other variable decreases.

[0080] When r = -1, it means that X and Y are completely negatively correlated, that is, one variable decreases linearly as the other variable increases, or increases linearly as the other variable decreases.

[0081] When r = 0, it means there is no linear correlation between X and Y, but it does not mean there is no relationship between them. There may be other forms of relationship (such as nonlinear relationship).

[0082] The calculation formula of Pearson correlation coefficient is:

[0083]

[0084] in, and are the i-th observation values of variables X and Y, respectively. and are the means of X and Y respectively, and n is the number of observations.

[0085] 4. Wasserstein distance calculation:

[0086] For the baseline portion, the Wasserstein distance is calculated between the baseline of the spectrum being measured and a standard baseline template. The Wasserstein distance can capture subtle differences between distributions and is suitable for detecting baseline drift. A Wasserstein distance threshold is set; any value exceeding the threshold is considered a baseline anomaly.

[0087] For one-dimensional probability distributions P and Q, defined on the real number set R, their p-order Wasserstein distance is defined as:

[0088] ;

[0089] Where Π(P, Q) is the set of all possible joint distributions of P and Q, and the marginal distributions of the joint distribution are P and Q respectively; Represents the distance from x to y power; is a joint probability measure The integral differential element of The probability distribution of (x, y) is weighted by the 'differential level' of the probability mass near the point (x, y). ≥1 is a real number, indicating that -order distance;

[0090] First, based on the actual application, obtain two sets of data: one set is the baseline data of the spectrum to be measured, and the other is the data of a standard baseline template. These data sets are typically one-dimensional arrays, representing the baseline intensities at different wavelengths or frequencies. The calculation of the Wasserstein distance can be simplified using existing libraries. In Python, the scipy.stats.wasserstein_distance function in the scipy library can be used to directly calculate the Wasserstein distance between two one-dimensional arrays.

[0091] To determine whether a baseline is abnormal, you need to set a Wasserstein distance threshold based on the specific needs of your application. This threshold should be based on an understanding of baseline drift tolerance and statistical information obtained from extensive experimental data.

[0092] 5. Comprehensive judgment:

[0093] A comprehensive judgment is made based on the results of similarity and Wasserstein distance. If both indicate an abnormality, the spectrum is confirmed to have a baseline abnormality. If only one indicator indicates an abnormality while the other is within the normal range, further analysis or confirmation is required. If both indicators are within the normal range, the spectrum baseline is considered normal.

[0094] 6. Anomaly Identification Output: Output anomaly identification results, including similarity, Wasserstein distance, and anomaly type (e.g., baseline drift, ghost peaks, and miscellaneous peaks). Develop a graphical user interface (GUI) to facilitate user upload of chromatogram files, viewing anomaly identification results, and interactive operations. Provide anomaly alarm function to promptly notify users when baseline anomalies are detected.

[0095] In this embodiment, the similarity is used to evaluate the overall consistency of the test spectrum and the standard spectrum, quickly screening out spectra that may be abnormal. The Wasserstein distance is specifically targeted at the baseline, capturing subtle distribution changes and accurately identifying anomalies such as baseline drift.

[0096] In addition, the present invention uses programming languages such as Python and scientific computing libraries such as NumPy and SciPy to implement data processing and calculations. It also utilizes similarity calculation methods and Wasserstein distance calculation tools from machine learning libraries. Deep learning techniques, such as convolutional neural networks (CNNs), are introduced to automatically extract features and calculate similarity and distance. Unsupervised learning methods are used to automatically cluster standard spectra to improve the accuracy of similarity calculations. Adaptive training for different types of chromatograms and abnormal situations is added to improve the robustness of the algorithm. Advanced methods in the field of anomaly detection, such as the local outlier factor (LOF), are introduced and used in combination with existing methods.

[0097] Use a dataset of known abnormal and normal chromatograms for training and testing. Evaluate algorithm performance using metrics such as precision, recall, and F1 score. Compare recognition results under different threshold settings and select the optimal threshold.

[0098] The above embodiments are merely preferred technical solutions of the present invention and should not be construed as limiting the present invention. The scope of protection of the present invention shall be the technical solutions set forth in the claims, including equivalent alternatives to the technical features of the technical solutions set forth in the claims. In other words, equivalent alternatives and improvements within this scope are also within the scope of protection of the present invention.

Claims

1. A transformer spectrum baseline anomaly recognition method based on similarity and Wasserstein distance, characterized by The following steps are involved: Step 1: Use filters to remove high-frequency noise from the chromatogram, remove baseline drift through a baseline correction algorithm, and perform operations including data cleaning, data integration, data transformation, and data reduction to ensure data comparability and quality; Step 2: Select candidate reference atlases from the data source, perform preprocessing including denoising and smoothing, screen and verify the atlases, organize them into a standard atlas library, and maintain and update them; Step 3: Use the Pearson correlation coefficient method to calculate the overall similarity between the spectrum to be tested and the standard spectrum, and set a threshold to judge abnormalities; Step 4: Calculate the Wasserstein distance between the baseline of the spectrum to be measured and the standard baseline template, and set a threshold to determine if the baseline is abnormal; Step 5: Combine the similarity and Wasserstein distance results to determine whether the spectrum baseline is abnormal; Step 6: Identify and output abnormal results, including results such as similarity exceeding threshold, Wasserstein distance exceeding threshold, and abnormal type; The sub-steps of step 2 are: Sub-step 2.1: Select representative atlases from existing databases as candidate reference atlases, ensuring that they are from reliable sources and have been rigorously reviewed and verified; Sub-step 2.2: Perform denoising and smoothing preprocessing operations on the candidate reference atlas to improve the clarity and accuracy of the atlas; Sub-step 2.3: Standardize the spectra to ensure that different spectra are compared on the same scale and eliminate differences caused by instrumental and operational factors; Sub-step 2.4: Separate the baseline and peak components to facilitate subsequent analysis and comparison; Sub-step 2.5: Screen the pre-processed spectra according to the standards and exclude abnormal or non-compliant spectra; Sub-step 2.6: Validate the selected profiles by comparing them with profiles of known samples and repeating the measurements to ensure their representativeness and accuracy. Sub-step 2.7: Organize the screened and verified atlases into a standard atlas library, and number, classify, and store them; Sub-step 2.8: Ensure the updating and maintenance of the standard spectrum library, add new standard spectrums in a timely manner and delete outdated or no longer used spectrums.

2. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 1, characterized in that: In step 1, the data cleaning includes: (1) Filling missing values: using the prediction model to fill; (2) Remove high-frequency noise: Use filters to remove high-frequency noise; (3) Handling outliers: using threshold setting or statistical distribution-based methods to judge and handle outliers; (4) Ensure data accuracy and consistency: ensure by correcting errors and inconsistencies; The data integration is to use the data integration process to merge data from multiple data sources into a unified data set, while resolving data redundancy and conflict issues to ensure data integrity and consistency; The data transformation includes: (1) Scaling data: scaling data to a specific range using proportional scaling; (2) Adjust the distribution: Use the method of adjusting the data distribution to adjust the data distribution to a standard normal distribution, so that the mean is 0 and the standard deviation is 1; (3) Transforming data: Converting continuous data into discrete categories facilitates data analysis or mining algorithms; The data reduction is to reduce the amount of data by using dimensionality reduction and aggregation methods while maintaining the original information of the data, thereby improving the efficiency of data processing and analysis.

3. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 1, characterized in that: The sub-steps of step 3 are: Sub-step 3.1: Calculate the overall similarity between the test spectrum and the standard spectrum using the Pearson correlation coefficient method; Sub-step 3.2: Set similarity threshold; Sub-step 3.3: If the calculated similarity is lower than the threshold, it is considered as a possible anomaly.

4. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 3, characterized in that: Step 3.3: Use the Pearson correlation coefficient method to calculate the overall similarity between the test spectrum and the standard spectrum; set a similarity threshold, and if it is lower than the threshold, it is considered a possible anomaly; The Pearson correlation coefficient is an indicator that measures the degree of linear correlation between two variables X and Y. The value range of the Pearson correlation coefficient r is between -1 and 1, where: When r = 1, it means that X and Y are completely positively correlated, that is, one variable increases linearly as the other variable increases, or decreases linearly as the other variable decreases; When r = -1, it means that X and Y are completely negatively correlated, that is, one variable decreases linearly as the other variable increases, or increases linearly as the other variable decreases; When r = 0, it means there is no linear correlation between X and Y; The calculation formula of Pearson correlation coefficient is: ; in, and are the i-th observation values of variables X and Y, respectively. and are the means of X and Y respectively, and n is the number of observations.

5. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 1, characterized in that: The sub-steps of step 4 are: Sub-step 4.1: For the baseline portion, obtain the baseline data of the spectrum to be measured and the data of the standard baseline template. These data are one-dimensional arrays, representing the baseline intensity at different wavelengths or frequencies. Sub-step 4.2: Based on the understanding of the tolerance for baseline drift and the statistical information obtained from a large amount of experimental data, set the Wasserstein distance threshold. Sub-step 4.3: Calculate the Wasserstein distance between the baseline of the spectrum to be measured and the standard baseline template: In Python, you can use the scipy.stats.wasserstein_distance function in the scipy library to directly calculate the Wasserstein distance between two one-dimensional arrays. Sub-step 4.4: If the calculated Wasserstein distance exceeds the threshold, it is considered a baseline anomaly. At the same time, the Wasserstein distance can capture subtle differences between distributions and is suitable for detecting baseline drift.

6. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 5, characterized in that: The calculation method of sub-step 4.3 is: For one-dimensional probability distributions P and Q, defined on the real number set R, their p-order Wasserstein distance is defined as: ; Where Π(P, Q) is the set of all possible joint distributions of P and Q, and the marginal distributions of the joint distribution are P and Q respectively; Represents the distance from x to y power; is a joint probability measure The integral differential element of The probability distribution of (x, y) is weighted by the 'differential level' of the probability mass near the point (x, y). ≥1 is a real number, indicating that -order distance; Based on practical applications, two sets of data are obtained: one set is the baseline data of the spectrum to be measured, and the other set is the data of the standard baseline template. Both sets of data are one-dimensional arrays, representing the baseline intensity at different wavelengths or frequencies. In Python, the scipy.stats.wasserstein_distance function in the scipy library is used to directly calculate the Wasserstein distance between two one-dimensional arrays.

7. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 5, characterized in that: In sub-step 4.4, set a threshold and determine whether the baseline is abnormal. You need to set a Wasserstein distance threshold based on the specific needs of the application. This threshold is based on an understanding of baseline drift tolerance and statistical information obtained from a large amount of experimental data.

8. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 1, characterized in that: In step 5, a comprehensive judgment is made based on the results of similarity and Wasserstein distance. If both indicate abnormality, the spectrum is confirmed to have a baseline abnormality. If only one of the indicators indicates abnormality while the other is within the normal range, further analysis or confirmation is required. If both are within the normal range, the spectrum baseline is considered normal.

9. The method for identifying transformer spectrum baseline anomalies based on similarity and Wasserstein distance according to claim 1, characterized in that: In step 6, the abnormality types include baseline drift, ghost peaks, and miscellaneous peaks. By developing a graphical user interface, users can upload chromatogram files, view abnormality identification results, and perform interactive operations. An abnormality alarm function is provided to promptly notify users when a baseline abnormality is detected.

Citation Information

Patent Citations

  • Fingerprint spectrum similarity calculation method and device and sample quality evaluation system

    CN107784192A

  • Intelligent identification method for chromatogram of gas dissolved in transformer oil

    CN117233283A