Method and system for on-line detection of transformer insulating oil based on photoacoustic spectroscopy and electronic equipment

CN122174126BActive Publication Date: 2026-08-07GUODIAN DADUHE ZHENTOUBA HYDROPOWER CONSTR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUODIAN DADUHE ZHENTOUBA HYDROPOWER CONSTR CO LTD
Filing Date
2026-05-09
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]本发明提供了基于光声光谱的变压器绝缘油在线检测方法、系统及电子设备,可以解决光谱数据受环境噪声干扰导致信噪比不足,气体成分解耦过程存在交叉敏感现象,且故障诊断策略缺乏动态适应能力的技术问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174126B_ABST
    Figure CN122174126B_ABST
Patent Text Reader

Abstract

The present application relates to the online detection method, system and electronic equipment of transformer insulating oil based on photoacoustic spectrum, relate to power equipment state monitoring technical field.The method comprises: obtaining target data by preprocessing photoacoustic spectrum data;Gas identification results and predicted concentration are obtained by decoupling through multivariate correction method;According to the dynamic selection of fault diagnosis strategy of training sample amount;Output multidimensional early warning information and update diagnosis model.The present application improves signal-to-noise ratio through spectrum data preprocessing, solves gas cross-sensitivity problem by using multivariate correction method, and ensures the stability of diagnosis under different data conditions through dynamic diagnosis strategy and model updating mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power equipment condition monitoring technology, specifically to an online detection method, system, and electronic equipment for transformer insulating oil based on photoacoustic spectroscopy. Background Technology

[0002] As core equipment in the power grid, real-time monitoring of dissolved gases in the insulating oil of power transformers is crucial for ensuring the safe operation of the grid. Currently, gas detection methods based on photoacoustic spectroscopy use laser excitation to generate acoustic signals from dissolved gases in the insulating oil. These signals are then collected by sensors to form spectral data, which is subsequently analyzed using signal processing algorithms to determine the gas composition. This particular solution employs a photoacoustic cell as the detection chamber. It utilizes a modulated laser to irradiate the sample, causing periodic thermal expansion. The acoustic signals are received by a microphone and converted into electrical signals. Finally, a Fourier transform is used to obtain spectral characteristic peaks, enabling qualitative identification of characteristic gases such as hydrogen and methane.

[0003] However, in existing technologies, spectral data are subject to insufficient signal-to-noise ratio due to environmental noise interference, the gas composition decoupling process exhibits cross-sensitivity, and the fault diagnosis strategy lacks dynamic adaptability, making it difficult to maintain the stability of diagnostic results under different data conditions. Summary of the Invention

[0004] This invention provides a method, system, and electronic equipment for online detection of transformer insulating oil based on photoacoustic spectroscopy. It can solve the technical problems of insufficient signal-to-noise ratio caused by environmental noise interference in spectral data, cross-sensitivity in the gas composition decoupling process, and lack of dynamic adaptability in fault diagnosis strategies.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] This invention provides an online detection method for transformer insulating oil based on photoacoustic spectroscopy, comprising the following steps:

[0007] Preprocessing the photoacoustic spectral data yields the target photoacoustic spectral data;

[0008] The target photoacoustic spectral data is decoupled using a multivariate correction method to obtain gas identification results and predicted concentrations;

[0009] If the training sample size of the fault diagnosis model is greater than the preset value, the fault condition of the transformer is obtained by using the fault diagnosis model built based on machine learning classification based on the identified gas and the corresponding gas concentration; otherwise, the fault condition of the transformer is obtained based on the three ratio method.

[0010] Based on the transformer's fault conditions, multi-dimensional early warning information is output based on fault type differentiation; and the fault diagnosis model is updated and trained based on the actual fault conditions verified on-site and the gas and gas concentration data obtained from identification.

[0011] In one optional embodiment, the photoacoustic spectral data is preprocessed to obtain the target photoacoustic spectral data, specifically as follows:

[0012] The initial photoacoustic spectral data is cleaned and outliers are removed to obtain the first photoacoustic spectral data.

[0013] The first photoacoustic spectral data is then denoised using wavelet transform to obtain the second photoacoustic spectral data.

[0014] Then, the second photoacoustic spectral data is baseline-corrected using the asymmetric least squares method to obtain the third photoacoustic spectral data;

[0015] Finally, the third photoacoustic spectral data is normalized to obtain the target photoacoustic spectral data.

[0016] In one optional embodiment, the initial photoacoustic spectral data is cleaned and outliers are removed, specifically as follows:

[0017] The initial photoacoustic spectral data are subjected to median filtering using a sliding window, wherein the width of the window does not exceed a first preset range;

[0018] Obtain the median of all data point signal values ​​within each window; if the absolute value of the deviation between the data point signal value within a window and the median is greater than a preset multiple of the standard deviation of all data point signal values ​​within the window, then replace the data point signal value with the median.

[0019] In one optional embodiment, the target photoacoustic spectral data is decoupled using a multivariate correction method to obtain the gas identification result and predicted concentration, specifically:

[0020] Prepare N mixed gas samples with known gas concentrations; and measure the photoacoustic spectral data of each mixed gas sample to obtain the spectral matrix X and the concentration matrix Y;

[0021] The partial least squares regression algorithm is used to decompose matrices X and Y, resulting in the regression coefficient matrix B.

[0022] Based on the regression coefficient matrix B and the target photoacoustic spectral data, information on gas types and the predicted concentration of each gas type are obtained.

[0023] In one optional embodiment, the target photoacoustic spectral data is decoupled using a multivariate correction method to obtain the gas identification result and predicted concentration, specifically:

[0024] Multiple different mixed gas samples are obtained from historical data; the spectral information of each mixed gas sample is obtained; and the spectra of all mixed gas samples are stacked row by row to obtain matrix D, where the number of rows in matrix D is the number of mixed gas samples and the number of columns is the number of wavelength points p of each spectral data.

[0025] Principal component analysis is used to obtain the cumulative contribution rate of each component in matrix D; components with contribution rates exceeding a threshold are selected as principal components. Principal components represent gas types, and their quantity is represented by... express;

[0026] Then, the wavelength regions of the gases represented by each principal component are obtained from matrix D using asymptotic factor analysis, and an initial pure spectral matrix is ​​constructed. Initial pure spectral matrix The number of rows is The number of columns is p;

[0027] The least squares method is used to solve for the values ​​in each sample of matrix D. The concentrations of each gas are calculated to obtain a concentration matrix C, where the number of rows in concentration matrix C represents the number of samples, and the number of columns represents the number of gas species. ;

[0028] Based on the concentration matrix C, the initial pure spectrum matrix is ​​iteratively updated. The iteration continues until the changes in both the updated pure spectral matrix and the concentration matrix from the previous iteration are less than preset values, and then the iteration stops, yielding the updated pure spectral matrix. and concentration matrix ;

[0029] Based on target photoacoustic spectral data and pure spectral matrix By using least squares fitting, the gas species information and the predicted concentration of each gas species in the target photoacoustic spectral data are obtained.

[0030] In one alternative embodiment, the iterative physical constraints include nonnegativity constraints and unimodal constraints;

[0031] Based on the non-negativity constraint, the negative numbers in the pure spectral matrix and concentration matrix during the iteration process are set to 0;

[0032] Based on the single-peak constraint, the non-main peak regions of each pure spectrum in the pure spectral matrix are set to 0.

[0033] In an optional embodiment, the method further includes training a convolutional neural network using the target photoacoustic spectral data, gas type information obtained based on the target photoacoustic spectral data, and the predicted concentration of each gas type as a training set to obtain a gas concentration prediction module.

[0034] The real-time photoacoustic spectral data of the insulating oil is then input into the gas concentration prediction module to obtain the corresponding gas type information and the predicted concentration of each gas type.

[0035] In one optional embodiment, the fault status of the transformer is obtained through a fault diagnosis model built based on machine learning classification, specifically as follows:

[0036] Concentration features and ratio features are obtained based on historical gas composition and predicted concentration information, with the ratio feature being the concentration ratio of different gases; and the fault types corresponding to the concentration features and ratio features are obtained based on operation and maintenance data; and the concentration features, ratio features, and the fault types corresponding to both are used as a training set to train the fault diagnosis model; based on the current gas composition and predicted concentration information of the insulating oil, the current transformer fault type is obtained through the trained fault diagnosis module.

[0037] A second aspect of the present invention provides an online detection system for transformer insulating oil based on photoacoustic spectroscopy, for implementing an online detection method for transformer insulating oil based on photoacoustic spectroscopy, comprising:

[0038] The data preprocessing module is used to preprocess the photoacoustic spectral data to obtain the target photoacoustic spectral data;

[0039] The gas concentration prediction module is used to obtain gas identification results and predicted concentrations based on the target photoacoustic spectral data through decoupling using a multivariate correction method.

[0040] The transformer fault diagnosis module is used to determine whether the training sample size of the fault diagnosis model is greater than a preset value. If so, it obtains the fault condition of the transformer based on the identified gas and its corresponding concentration through a fault diagnosis model built on machine learning classification. Otherwise, it obtains the fault condition of the transformer based on the three-ratio method.

[0041] The early warning module is used to output multi-dimensional early warning information based on the fault type of the transformer; and to update and train the fault diagnosis model based on the actual fault conditions verified on site and the gas and gas concentration data obtained by identification.

[0042] A third aspect of the present invention provides an electronic device, comprising: a processor and a memory, the processor and the memory being connected via a bus; wherein the processor is used to call and execute a program stored in the memory; the memory is used to store the program, the program being used to implement an online detection method for transformer insulating oil based on photoacoustic spectroscopy.

[0043] This invention provides an online detection method for transformer insulating oil based on photoacoustic spectroscopy. This method improves signal quality through photoacoustic spectral data preprocessing, solving the problem of insufficient signal-to-noise ratio caused by environmental noise interference in the spectral data in the prior art. A multivariate correction method is used to decouple the target photoacoustic spectral data to obtain gas identification results and predicted concentrations. This design improves the cross-sensitivity phenomenon in the gas component decoupling process, achieving accurate separation of multi-component gases. Furthermore, the method determines whether the training sample size of the fault diagnosis model exceeds a preset value and dynamically switches the diagnostic strategy based on the determination result: when the sample size is sufficient, a fault diagnosis model constructed using machine learning classification is adopted; when the sample size is insufficient, it degenerates into a three-ratio method. This mechanism avoids the problem of the fault diagnosis strategy lacking dynamic adaptability and ensures the stability of the diagnostic results under different data conditions. Based on this, multi-dimensional early warning information based on fault type differentiation is output according to the transformer fault condition. The fault diagnosis model is updated and trained through real fault conditions verified on-site and the identified gas and gas concentration data, thereby achieving continuous optimization of the diagnostic model and improving the long-term reliability of the system. This solution organically integrates data acquisition, signal enhancement, component analysis, intelligent diagnosis, and model updating through a closed-loop feedback mechanism, significantly improving the accuracy and adaptability of online monitoring of transformer insulating oil. Attached Figure Description

[0044] Figure 1 The flowchart shows the online detection method for transformer insulating oil based on photoacoustic spectroscopy provided by the present invention. Detailed Implementation

[0045] The present invention will now be described in further detail with reference to embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit the invention.

[0046] Traditional methods for detecting dissolved gases in transformer insulating oil generally suffer from low accuracy, slow response, and difficulty in achieving online real-time monitoring. Furthermore, the fault diagnosis process is highly dependent on human experience and static rules, lacks sufficient intelligence, and cannot adapt to practical challenges such as multi-source interference, gas cross-sensitivity, and dynamic data evolution under complex operating conditions.

[0047] Based on the above issues, see Figure 1 As shown in the figure, an online detection method for transformer insulating oil based on photoacoustic spectroscopy is provided by an embodiment of the present invention. The method includes the following steps:

[0048] Step S1: Preprocess the photoacoustic spectral data to obtain the target photoacoustic spectral data;

[0049] The preprocessing of photoacoustic spectral data involves conditioning, anomaly removal, noise suppression, and baseline correction of the raw photoacoustic signals to obtain standardized spectral data with high signal-to-noise ratio and good repeatability. The target photoacoustic spectral data serves as input for subsequent multivariate correction modeling and gas decoupling analysis. It covers characteristic absorption peak regions in the wavelength dimension and eliminates system drift and environmental disturbances in the amplitude dimension. This preprocessing provides a stable, consistent, and comparable data foundation for subsequent gas identification and concentration prediction, avoiding deviations in the multivariate correction model construction caused by random noise, baseline shifts, and outliers in the original signal.

[0050] Target photoacoustic spectral data can be obtained using methods such as sliding window midpoint filtering, wavelet thresholding denoising, asymmetric least squares baseline correction, and L2 normalization; or using moving average filtering, empirical mode decomposition denoising, polynomial fitting baseline correction, and maximum value normalization; furthermore, the present invention can also obtain target photoacoustic spectral data using methods such as Gaussian filtering, Savitzky-Golay smoothing, piecewise linear baseline correction, and Z-score normalization. Based on the above methods, the present invention obtains target photoacoustic spectral data with good signal-to-noise ratio, structural fidelity, and cross-batch consistency.

[0051] For example, the present invention may involve deploying a photoacoustic spectral sensing probe at a 500kV substation site to continuously collect acoustic wave signals generated by laser excitation of dissolved gases in insulating oil, forming initial photoacoustic spectral data; performing median filtering with a sliding window width of 7 points on this data to suppress impulse noise, then using a db4 wavelet basis for three-level decomposition and hard thresholding for noise reduction, and finally using an asymmetric least squares method (λ=10) to... 5 (P=0.01) The baseline drift was fitted and slowly subtracted. Finally, the entire spectrum was normalized using the L2 norm, and the target photoacoustic spectral data with a length of 256 points and uniform units was output for subsequent use by the gas decoupling module.

[0052] Step S2: The target photoacoustic spectral data is decoupled using a multivariate correction method to obtain gas identification results and predicted concentration;

[0053] The multivariate correction method refers to a quantitative analysis technique based on multivariate statistical modeling, used to simultaneously analyze the types and contents of multiple components from a mixed spectrum. Gas identification results can refer to determining the presence of typical fault characteristic gases such as H2, CH4, C2H2, C2H4, C2H6, CO, and CO2 in the target sample, and outputting the set of identified gas types. Predicted concentration refers to the estimated solubility concentration of the corresponding identified gas in insulating oil, expressed in μL / L. This step overcomes the limitations of single-wavelength measurements, which are susceptible to background interference, cross-absorption, and instrument fluctuations, by establishing a mathematical mapping relationship between spectral response and gas concentration, achieving simultaneous, non-destructive, and quantitative analysis of multiple components.

[0054] For example, using partial least squares regression (PLSR) modeling, the pre-calibrated mixed gas spectral matrix X and concentration matrix Y are jointly decomposed to obtain the regression coefficient matrix B. Then, using the target photoacoustic spectral data as input, a linear projection y=x is performed. T B calculates the concentration of each gas and determines the presence of the gas based on whether the concentration is significantly higher than the detection limit; or, using iterative modeling techniques combining principal component analysis and progressive factor analysis (PCA-IFA), extracts m principal components from historical spectral data to characterize the gas types and constructs a pure spectral matrix. With concentration matrix Then, using the target photoacoustic spectral data and... Least squares fitting is performed to obtain the gas type and corresponding concentration. Furthermore, this invention can also utilize nonlinear multivariate correction models such as Support Vector Regression (SVR) or Multilayer Perceptron (MLP) to directly output gas type labels and continuous concentration values ​​from the target photoacoustic spectral data as input. Based on the above methods, this invention obtains gas identification results and predicted concentrations that are interpretable, robust, and engineering-feasible.

[0055] For example, the present invention can be carried out in the laboratory by preparing 30 sets of mixed standard gas samples with gradient concentrations of five gases: H2, CH4, C2H2, C2H4, and C2H6. The spectral responses of these samples are collected using the same photoacoustic spectrometer, and a spectral matrix X (30×256) and a concentration matrix Y (30×5) are constructed. A regression model is trained using the PLSR algorithm, and the first 8 latent variables are retained to obtain a regression coefficient matrix B (256×5). The target photoacoustic spectral data x0 (1×256) obtained above is substituted into y0=x0B to calculate the predicted concentration vector y0=[12.3,89.7,2.1,45.6,67.8]μL / L. The detection limit is set to 3.0μL / L, and the identification result is {H2,CH4,C2H4,C2H6}, with the corresponding predicted concentrations as above.

[0056] Step S3: Determine whether the training sample size of the fault diagnosis model is greater than the preset value. If so, obtain the fault condition of the transformer based on the identified gas and the corresponding gas concentration through the fault diagnosis model constructed based on machine learning classification; otherwise, obtain the fault condition of the transformer based on the three ratio method.

[0057] The training sample size of the fault diagnosis model includes the total number of samples mapping the gas concentration of the labeled real fault types to the fault type. The preset value is the minimum sample threshold required to ensure that the machine learning model has basic generalization ability, for example, it can be set to 100. The fault diagnosis model built based on machine learning classification can be a supervised classifier trained with gas concentration features, concentration ratio features and corresponding fault labels as input-output pairs, including but not limited to random forests, XGBoost or lightweight neural networks. The three-ratio method is a classic fault diagnosis rule specified in DL / T722 "Guidelines for Analysis and Judgment of Dissolved Gases in Transformer Oil", which determines the fault type such as discharge, overheating or moisture based on the combination of three ratio intervals: CH4 / H2, C2H4 / C2H6, and C2H2 / C2H4. This step establishes a dynamic balance between model availability and diagnostic reliability by introducing a sample size-driven diagnostic strategy switching mechanism: when there is sufficient historical labeled data, a high-precision intelligent model is activated; when the data is sparse or the model is not fully validated, it automatically reverts to an industry-recognized and highly interpretable rule method, ensuring that the diagnostic function is always available throughout the system's entire lifecycle.

[0058] For example, the diagnostic path selection can be triggered by comparing the cumulative number of valid fault samples currently in the database with a preset threshold using a counter; or, the decision to activate a machine learning model can be made based on a dual condition: whether the model validation set accuracy consistently exceeds 85% and the sample size is ≥100. Furthermore, the present invention can also dynamically update the diagnostic strategy based on a sliding window statistical method that considers whether the number of newly labeled samples added in the last 6 months exceeds 20. Based on the above methods, the present invention achieves adaptive fault diagnosis capabilities at different data maturity stages.

[0059] For example, in the initial stage of operation of a newly built substation, the system database contains only 12 real fault samples confirmed by experts, such as 3 overheating incidents, 5 partial discharge incidents, and 4 spark discharge incidents, which are below the preset threshold of 100. At this time, the system automatically calls the three-ratio method module, substitutes the gas concentrations output above into the formula to calculate CH4 / H2=7.3, C2H4 / C2H6=0.67, and C2H2 / C2H4=0.05, and finds the fault type as high-temperature overheating above 700℃ by referring to the DL / T722 ratio coding table. After one year of operation, the number of samples increases to 137, and the system automatically switches to the XGBoost fault diagnosis model, inputs the same concentration characteristics and ratio characteristics, and outputs hot spot overheating caused by inter-turn short circuits in the winding, along with a ranking of feature importance. Among them, C2H2 / C2H4 has the highest weight.

[0060] Step S4: Based on the transformer's fault condition, output multi-dimensional early warning information based on fault type differentiation; and update and train the fault diagnosis model based on the actual fault condition verified on-site and the identified gas and gas concentration data.

[0061] The multi-dimensional early warning information based on fault type differentiation can refer to generating differentiated early warning content for different fault types (such as low-energy discharge, high-energy discharge, low-temperature overheating, medium-temperature overheating, high-temperature overheating, moisture, and static electricity in oil flow). This includes early warning levels, suggested response actions (such as strengthening tracking, arranging power outage tests, and immediate shutdown); associated equipment components (such as on-load tap changers, core clamps, and winding insulation); recommended testing items (such as measuring winding DC resistance and conducting partial discharge tests); and the expected deterioration time window (such as the possibility of developing into a through-discharge within 72 hours). Updating and training the fault diagnosis model can refer to adding the actual fault type, corresponding gas type and concentration data verified on-site by maintenance personnel as new positive samples to the training set, triggering incremental training or periodic full retraining of the model. This step constructs a closed-loop control link of diagnosis-early warning-feedback-evolution, enabling the system to not only have static identification capabilities but also adaptive evolution capabilities that continuously optimize with the power grid operating status, equipment aging patterns, and maintenance practices.

[0062] This invention can output multi-dimensional early warning information by matching a pre-set multi-dimensional early warning template library based on the fault type and dynamically adjusting the early warning level and timeliness suggestions in conjunction with auxiliary parameters such as real-time load rate, ambient temperature, and years of operation; or by using a knowledge graph reasoning engine to map fault types to equipment topology nodes, historical defect databases, and maintenance procedure clauses to generate structured early warning instructions; furthermore, this invention can also output multi-dimensional early warning information by using a large language model fine-tuning module to input fault types and context parameters into a lightweight LLM to generate readable early warning reports in natural language. Based on the above methods, this invention obtains accurate, operable, and traceable multi-dimensional early warning information that meets the needs of multiple roles such as scheduling, maintenance, and testing.

[0063] For example, when the fault type is determined to be medium-temperature overheating (300–700℃), the system automatically matches the warning template and outputs a Level II warning: it is recommended to conduct infrared thermometry and ultrasonic partial discharge retest within 3 days; pay special attention to the end of the low-voltage winding and the lead connection; if the C2H4 continues to rise significantly, it is necessary to arrange for the cover to be suspended for inspection in advance. At the same time, this record, along with the C2H4=82.4μL / L, C2H6=41.1μL / L, CH4=12.6μL / L identified in this study, and the conclusion that the loose bolts at the end of the B-phase low-voltage winding caused contact overheating confirmed on site, are all written into the model training database; the system starts incremental training once every weekend, using a mixture of new and old samples to update the XGBoost model parameters to ensure that the model's ability to identify new overheating modes continues to improve.

[0064] This invention improves the quality of input data by systematically preprocessing the raw photoacoustic spectral data as described above; it decouples the components of complex spectra using the multivariate correction method described above, enabling simultaneous identification and concentration quantification of multiple gases; it achieves a dynamic trade-off between data abundance and diagnostic reliability based on the sample size-driven dual-track diagnostic mechanism described above; and finally, by constructing a multidimensional early warning output and online model update closed loop described above, the entire detection system possesses high precision, strong robustness, interpretability, and self-evolutionary characteristics, thereby systematically solving the technical problems of low precision, slow response, and insufficient intelligence of traditional methods.

[0065] Specifically, the preprocessing of the photoacoustic spectral data to obtain the target photoacoustic spectral data is as follows:

[0066] Step S11: Clean the initial photoacoustic spectral data and remove outliers to obtain the first photoacoustic spectral data;

[0067] The initial photoacoustic spectral data can refer to the original photoacoustic response signal sequence collected by the photoacoustic spectral detection device without any digital signal processing. Its horizontal axis is the wavelength or wavenumber, and the vertical axis is the photoacoustic signal amplitude at the corresponding wavelength.

[0068] Cleaning and removing outliers can refer to identifying and correcting data points that deviate from the local statistical distribution through sliding window midpoint filtering, in order to eliminate isolated spikes or dips introduced by sensor transient interference, electromagnetic pulses or sampling jitter;

[0069] In this embodiment, this operation is used to ensure the stability of subsequent wavelet transform denoising, avoid the spread of false high-frequency components caused by outliers during multi-scale decomposition, and thus prevent noise suppression distortion.

[0070] Outliers can be identified by judging whether the deviation between the signal value of the data point within the sliding window and the median exceeds 2.5 times the standard deviation, and then replaced with the median of the window; or outliers can be identified by judging whether the sum of squared residuals between the signal value of the data point within the sliding window and the mean of its neighborhood exceeds a dynamic threshold, and then replaced with the weighted average of the neighborhood; furthermore, the present invention can also calculate the outlier degree of each data point based on the Local Outlier Factor (LOF) algorithm, and determine the data points with an outlier degree higher than the threshold as outliers, and then use interpolation to repair them.

[0071] The present invention obtains first photoacoustic spectral data based on the above method, and its data continuity and local trend fidelity meet the wavelet transform input requirements.

[0072] For example, in a certain online monitoring process of insulating oil, the photoacoustic detector collects an initial photoacoustic spectrum data containing 300 wavelength points; the sliding window width is set to 5, and all data points are slid over sequentially; the median is calculated for each window, and the absolute deviation of each point in the window from the median is counted; if the deviation of a point is greater than 2.5 times the standard deviation of the window, it is replaced with the median of the current window; after this processing, three obvious peaks in the original data are smoothed, and the first photoacoustic spectrum data is obtained.

[0073] Step S12: Denoise the first photoacoustic spectral data by wavelet transform to obtain the second photoacoustic spectral data;

[0074] Among them, wavelet transform is a mathematical tool with time-frequency localization characteristics, which can decompose signals into multi-resolution components according to different scales (frequency) and locations (time / wavelength);

[0075] Wavelet transform for denoising can refer to performing discrete wavelet decomposition on the first photoacoustic spectral data, retaining the low-frequency approximation coefficients, applying threshold shrinkage such as soft thresholding or hard thresholding to the high-frequency detail coefficients, and then reconstructing the denoised signal through wavelet transform.

[0076] In this embodiment, the operation is used to suppress high-frequency random noise superimposed on the spectral characteristic peaks, while preserving the shape, position and relative intensity of the gas absorption peaks to the greatest extent, providing input with a higher signal-to-noise ratio and clearer structure for subsequent baseline correction.

[0077] For example, the first photoacoustic spectral data can be decomposed into three-level discrete wavelet decomposition based on the Daubechies4 (db4) wavelet basis, and soft thresholding can be uniformly applied to the high-frequency coefficients of the first to third levels before reconstructing the second photoacoustic spectral data; or a two-level decomposition can be performed based on the Symlets5 (sym5) wavelet basis, and hard thresholding can be applied to the high-frequency coefficients of the second level while keeping the other coefficients unchanged before reconstructing the output; furthermore, the present invention can also use stationary wavelet transform (SWT) to perform decomposition without subsampling, and combine an adaptive thresholding strategy (such as VisuShrink threshold based on noise variance estimation) to process the coefficients of each scale separately, and then reconstruct the data through inverse stationary wavelet transform.

[0078] The present invention obtains second photoacoustic spectral data based on the above method, which significantly reduces the overall noise level while preserving the shape of key absorption peaks.

[0079] For example, the present invention may perform three-level db4 wavelet decomposition on the first photoacoustic spectral data output above, estimate the noise standard deviation, set thresholds for each level, set high-frequency coefficients below the threshold to zero, retain low-frequency approximation coefficients and contracted high-frequency detail coefficients, and finally reconstruct the second photoacoustic spectral data; the reconstructed signal is at 1650cm -1 The signal-to-noise ratio of the CH4 characteristic peak at that location was improved by approximately 12 dB, while the peak width and peak height ratio remained unchanged.

[0080] Step S13: Then, the second photoacoustic spectral data is baseline-corrected using the asymmetric least squares method to obtain the third photoacoustic spectral data;

[0081] Among them, the asymmetric least squares method is a constrained optimization method that distinguishes between the signal peak region and the baseline region by setting asymmetric penalty weights, and forces the baseline fitting result to be biased towards the lower part of the signal while minimizing the sum of squared residuals.

[0082] The asymmetric least squares method for baseline correction can refer to constructing an optimization objective function with the second photoacoustic spectral data as the observation value and the smooth curve as the baseline to be estimated. In this function, the residual above the signal is given a weight much smaller than that below the signal, thereby driving the fitted curve to closely follow the trend at the bottom of the spectrum without intruding into the absorption peak region.

[0083] In this embodiment, the operation is used to eliminate low-frequency baseline curvature caused by changes in optical path, thermal drift, or sample cell contamination, so that the integral area of ​​each gas absorption peak has a more stable linear relationship with the true concentration, avoiding underestimation or overestimation of concentration due to baseline compression or elevation.

[0084] For example, a weighted residual sum of squares objective function can be constructed based on the exponential decay weight function for the second photoacoustic spectral data, and the optimal baseline curve can be solved using the iterative reweighted least squares method. Then, the baseline can be subtracted from the original data to obtain the third photoacoustic spectral data. Alternatively, based on the piecewise linear weight strategy, the upper residual weight can be reduced in the suspected absorption peak region, and the bidirectional constraint can be enhanced in the smooth region to jointly solve the baseline and sparse peak components. Furthermore, the present invention can also combine the asymmetric least squares method with morphological opening operations, first extracting a rough baseline outline using structuring elements, and then using this as the initial value for fine optimization using the asymmetric least squares method.

[0085] The present invention obtains third photoacoustic spectral data based on the above method, and its baseline flatness meets the requirements of background consistency for multivariate correction modeling.

[0086] For example, the present invention may apply an asymmetric least squares algorithm to the second photoacoustic spectral data output above, setting the asymmetric parameter λ=10. 5 With a smoothing parameter P=0.01, the baseline estimation curve was obtained after 5 iterations and convergence. After subtracting this baseline, the 780cm curve in the original data... -1 The bottom of the strong absorption peak of C2H2 tends to be horizontal, and the relative change in the area below the peak is less than 0.8%, while the original baseline curvature region (such as 900-1100 cm⁻¹) remains flat. -1 The background fluctuation range decreased from ±0.15au to ±0.02au.

[0087] Step S14: Finally, normalize the third photoacoustic spectral data to obtain the target photoacoustic spectral data;

[0088] Normalization can refer to the operation of mapping the third photoacoustic spectral data to a uniform numerical range or a uniform statistical range.

[0089] Normalization can be achieved by subtracting the minimum value from the signal value of each wavelength point in the third photoacoustic spectral data and then dividing by the range, so that the value range is [0,1]; or by subtracting the mean from the signal value of each point and then dividing by the standard deviation, so that the mean is 0 and the variance is 1.

[0090] In this embodiment, the operation is used to eliminate the overall amplitude shift caused by differences in the optical path length of different batches of measurements, different equipment gains, or different oil samples, so that the target photoacoustic spectral data has cross-sample and cross-device comparability, and improves the generalization prediction ability of the subsequent multivariate correction model for unknown samples.

[0091] For example, the third photoacoustic spectral data can be scaled using the min-max normalization method so that the signal values ​​of all wavelength points fall within the [0,1] interval; or the third photoacoustic spectral data can be transformed using the Z-score normalization method so that its mean is 0 and its standard deviation is 1; furthermore, the present invention can also use a vector normalization method to treat the third photoacoustic spectral data as a p-dimensional vector, divide it by its L² norm, and make its Euclidean length 1.

[0092] The present invention obtains target photoacoustic spectral data based on the above method, and its numerical distribution characteristics are adapted to the requirements of multivariate correction algorithm for the scale sensitivity of input data.

[0093] For example, the present invention may perform min-max normalization on the third photoacoustic spectral data output above, assuming its minimum signal value is 0.032au and its maximum value is 0.897au, then the normalized 1320cm -1 The H2 characteristic peak signal value changed from 0.415au to 0.497, and the dynamic range of the entire spectrum was compressed to a unit interval, which facilitates the unified modeling of the subsequent PLS regression model.

[0094] This invention forms a progressive photoacoustic spectral data quality enhancement chain by sequentially performing outlier removal, wavelet transform denoising, asymmetric least squares baseline correction, and normalization. Outlier removal ensures the robustness of wavelet decomposition, wavelet denoising improves the signal-to-noise ratio of characteristic peaks, asymmetric least squares effectively suppresses baseline drift without damaging absorption peaks, and normalization unifies data dimensions and distribution scale. The synergistic effect of these four processes simultaneously improves the target photoacoustic spectral data in three dimensions: noise suppression, baseline stability, and cross-sample consistency. This provides a high-quality input foundation for subsequent gas identification and concentration prediction based on multivariate correction, supporting the accuracy and generalization ability of fault diagnosis models.

[0095] Specifically, the initial photoacoustic spectral data was cleaned and outliers were removed.

[0096] Step S111: Median filtering is performed on the initial photoacoustic spectral data using a sliding window, wherein the width of the window does not exceed a first preset range;

[0097] Here, a sliding window can refer to a fixed-length sub-interval that moves sequentially along data points in a time series or spectral signal sequence;

[0098] The sliding window is a set of consecutive data points of odd length, such as 3, 5, 7, 9 or 11 data points;

[0099] The width of the sliding window does not exceed the first preset range, which can mean that the number of data points covered by the window is not greater than a preset integer value, such as not greater than 15 data points;

[0100] This sliding window is used to provide robust central tendency estimates within a local neighborhood, avoiding global statistical distortion caused by single-point mutations; its width limitation ensures that only short-term disturbances are modeled, without disrupting the inherent peak structure in the photoacoustic spectrum that reflects the gas absorption characteristics.

[0101] Median filtering can be achieved by moving the sliding window point by point across the initial photoacoustic spectral data, calculating the median of the signal values ​​of all data points in the corresponding subsequence at each window position, and replacing the original data point at the center of the window with this median; or by sorting the signal values ​​of the data points within the coverage area of ​​the sliding window, taking the middle index value as the representative value, and assigning this representative value to the data point corresponding to the index position at the center of the window; furthermore, the present invention can also achieve median filtering by replacing the data point at the center of the sliding window with the median of the signal values ​​of all data points within the window, while keeping the data points outside the window edges unchanged.

[0102] Based on the above method, this invention obtains local robust smoothing of the initial photoacoustic spectral data, suppresses isolated pulse noise, and preserves the morphological integrity of the spectral absorption peaks.

[0103] For example, the present invention is as follows: initial photoacoustic spectral data is constructed with the wavelength point sequence as the horizontal axis and the photoacoustic signal intensity as the vertical axis; the width of the sliding window is set to 7 consecutive wavelength points; when the window slides to the 100th wavelength point, the 7 signal values ​​corresponding to the 97th–103rd wavelength points are taken, and after arranging them in ascending order, the 4th value (i.e., the median) is taken, and this median value is assigned to the original signal value of the 100th wavelength point; and so on to complete the point-by-point median filtering processing of the entire spectrum.

[0104] Step S112: Obtain the median of the signal values ​​of all data points within each window;

[0105] The median of all data point signal values ​​within each window can refer to the median value calculated independently for each subset of data covered by each window during the sliding window traversal process described above.

[0106] The median is the value in the middle position after all data point signal values ​​in the window are sorted; when the number of data points in the window is even, the median is the arithmetic mean of the two middle values.

[0107] The median serves as the central estimate of the local signal distribution within the window, characterizing the typical response level under no abnormal interference and providing a benchmark for subsequent anomaly detection.

[0108] Step S113: If the absolute value of the deviation between the signal value of the data point in the window and the median is greater than the preset multiple of the standard deviation of the signal values ​​of all data points in the window, then replace the signal value of the data point with the median.

[0109] The standard deviation of all data point signal values ​​within the window can be a measure of the dispersion of each data point signal value relative to its mean in the subsequence covered by the sliding window.

[0110] The standard deviation is preset to a positive real number greater than or equal to 2 and less than or equal to 5, such as 2.5, 3, 3.5 or 4;

[0111] This judgment condition constitutes an adaptive anomaly detection mechanism. Its threshold is dynamically adjusted according to the signal fluctuation level within the window, avoiding the false deletion of effective peaks in the low signal-to-noise ratio region or the missed detection of spike interference in the high signal-to-noise ratio region when the fixed threshold is used.

[0112] This replacement operation enables the location and correction of transient outliers, making the corrected data points more consistent with the local spectral response, and improving the stability and generalization ability of subsequent multivariate correction modeling.

[0113] For example, anomaly detection can be performed based on whether the absolute value of the difference between the signal value of a data point within the window and its corresponding median exceeds three times the standard deviation of the window. If so, the median will be used to overwrite the original signal value. Alternatively, the maximum deviation point can be identified based on the distribution of the absolute values ​​of the deviations between the signal values ​​of each data point within the window and the median, combined with the standard deviation multiple threshold, and the median replacement can be performed only on that point. Furthermore, the present invention can also perform median replacement operations simultaneously on all data points within the window that meet the deviation conditions.

[0114] Based on the above method, this invention achieves accurate identification and robust repair of outliers in the initial photoacoustic spectral data, ensuring the physical reliability of the spectral data during the feature extraction stage.

[0115] For example, the present invention is as follows: within a certain sliding window, the signal values ​​of 7 data points are [0.12, 0.13, 0.11, 0.85, 0.12, 0.13, 0.11]. The calculated median is 0.12, and the standard deviation is approximately 0.27. If the preset multiple is 3, then the threshold is 0.81. At this time, the absolute value of the deviation between the 4th data point 0.85 and the median 0.12 is 0.73, which does not exceed the threshold, so it is not replaced for the time being. However, if the value is 1.20, then the deviation is 1.08 > 0.81, which is determined to be an outlier and replaced with 0.12.

[0116] This invention constructs a local robust estimate by using sliding window midpoint filtering, uses the median to characterize the typical response level within the window, and combines the standard deviation multiple to achieve adaptive anomaly detection. Thus, without damaging the spectral absorption peak shape, it effectively removes isolated anomalous signal points caused by electromagnetic interference, sensor transient drift, or sampling jitter, significantly improving the quality consistency and modeling reliability of the preprocessed photoacoustic spectral data.

[0117] Specifically, the target photoacoustic spectral data is decoupled using a multivariate correction method to obtain gas identification results and predicted concentrations. This involves preparing N mixed gas samples with known concentrations of each gas; measuring the photoacoustic spectral data of each mixed gas sample to obtain the spectral matrix X and the concentration matrix Y; decomposing matrices X and Y using a partial least squares regression algorithm to obtain the regression coefficient matrix B; and obtaining gas type information and the predicted concentration of each gas type based on the regression coefficient matrix B and the target photoacoustic spectral data.

[0118] Step S21: Prepare N mixed gas samples with known gas concentrations; and measure the photoacoustic spectral data of each mixed gas sample to obtain the spectral matrix X and the concentration matrix Y;

[0119] Among them, the N mixed gas samples with known gas concentrations (N is a positive integer, such as 20, 50 or 100) can refer to mixed standard gases artificially prepared under laboratory conditions based on the gas production law of transformer insulating oil pyrolysis, containing at least two of the following gases: hydrogen (H2), methane (CH4), ethane (C2H6), ethylene (C2H4), acetylene (C2H2), carbon monoxide (CO) and carbon dioxide (CO2), and the concentration of each target gas in each mixed sample is precisely calibrated; this sample set covers the range of gas component proportions corresponding to typical transformer fault types.

[0120] The spectral matrix X is a A dimensional matrix, where Indicates the number of mixed gas samples. This represents the number of wavelength sampling points contained in each photoacoustic spectral data (e.g., 256, 512, or 1024). Each row of matrix X corresponds to the photoacoustic response signal intensity of a mixed gas sample at all wavelength points.

[0121] The concentration matrix Y is a A dimensional matrix, where This represents the number of target gas species to be identified (e.g., 3, 5, or 7). Each row of matrix Y corresponds to the known concentration value of each target gas in a mixed gas sample.

[0122] Based on the above preparation and measurement process, this invention constructs a calibration dataset with a clear input-output mapping relationship, providing a data foundation for the subsequent establishment of a statistical model between spectral features and gas concentration.

[0123] Based on the gas pyrolysis mechanism and standard gas mixing procedures, in a constant temperature and pressure environment, a high-precision mass flow controller is used to control the flow rate of each component gas. After mixing, the mixture is passed into a photoacoustic cell for photoacoustic signal acquisition to obtain the spectral matrix X and the concentration matrix Y. Alternatively, based on the degassed gas components corresponding to the faulty oil sample verified in historical operating data, an equivalent mixed gas sample is reconstructed in reverse, and its photoacoustic spectrum is re-measured under the same photoacoustic detection system to form the spectral matrix X and the concentration matrix Y. Furthermore, the present invention can also be based on multiple batches of insulating oil and gas samples containing fault characteristics collected on-site from the same type of equipment. After degassing, a real mixed gas is obtained, and gas chromatography (GC) concentration determination and photoacoustic spectroscopy measurement are carried out simultaneously to jointly construct the spectral matrix X and the concentration matrix Y.

[0124] Based on the above method, this invention obtains a calibration dataset for multivariate correction modeling, ensuring that matrices X and Y have physical interpretability and statistical representativeness.

[0125] Step S22: Decompose matrices X and Y using the partial least squares regression algorithm to obtain the regression coefficient matrix B;

[0126] Among them, Partial Least Squares Regression (PLSR) is a multivariate statistical modeling method used to handle modeling scenarios where independent variables are highly collinear, the sample size is smaller than the variable dimension, and there is multiple noise interference. Its core is to extract latent variables of X and Y, so as to maximize the variance explanatory power of X while taking into account the covariance explanatory power of Y.

[0127] The regression coefficient matrix B is a A three-dimensional matrix, each column of which corresponds to a regression coefficient vector of a target gas, used to characterize the weighted linear relationship between the gas concentration and the photoacoustic response signal at all wavelengths;

[0128] In this invention, the PLSR modeling process does not rely on prior knowledge of spectral peak positions, but automatically mines the combination of spectral features most relevant to each gas concentration from the overall spectral response, thereby overcoming the identification ambiguity problem caused by overlapping gas absorption peaks; the regression coefficient matrix B is the linear mapping operator from the spectral signal to the gas concentration space.

[0129] For example, the PLSR model can be solved iteratively using the NIPALS (Nonlinear Iterative Partial Least Squares) algorithm, extracting latent variables sequentially until the cross-validation error no longer decreases significantly, and finally retaining the optimal number of latent variables and calculating the regression coefficient matrix B; or the Singular Value Decomposition (SVD) method can be used to jointly reduce the dimensionality of the covariance matrices of X and Y, fit a linear regression relationship in the low-dimensional subspace, and back-derive the regression coefficient matrix B; furthermore, this invention can also dynamically optimize the number of latent variables based on leave-one-out cross-validation, and combine the AIC (Akaike Information Criterion) criterion to select the optimal PLSR model structure, and finally output the regression coefficient matrix B.

[0130] Based on the above method, this invention obtains the regression coefficient matrix B, ensuring that it has robust generalization prediction ability for unknown samples.

[0131] Step S23: Based on the regression coefficient matrix B and the target photoacoustic spectral data, obtain information on gas types and the predicted concentration of each gas type.

[0132] Among them, the target photoacoustic spectral data is one The row vector represents a complete photoacoustic spectrum of the mixed gas obtained after degassing the current insulating oil sample under the same photoacoustic detection system during the online detection process. This data has been obtained through the preprocessing process of Example 2 (including cleaning, wavelet denoising, baseline correction and normalization) and has the same data format and dimensions as the calibration sample.

[0133] Gas type information can refer to the determination of gas types with non-zero predicted concentrations based on the distribution characteristics of the non-zero response regions of each column vector in the regression coefficient matrix B, combined with prior knowledge of the characteristic absorption bands of known gases. For example, if the predicted concentration of a gas is greater than a preset threshold (e.g., 0.5 μL / L), and its regression coefficient vector shows a main response peak in the 1300 nm–1320 nm range, then the gas is determined to be acetylene.

[0134] The predicted concentrations of each gas species are obtained by analyzing the target photoacoustic spectral data. (vector) and regression coefficient matrix B ( The result of matrix multiplication of a matrix Vector, its first The element is the th element. The predicted concentration value of the target gas;

[0135] In this invention, this step achieves end-to-end mapping from the original photoacoustic signal to the concentration of multiple components of gas, without the need for peak-by-peak analysis or reliance on peak separation algorithms, thus improving analysis efficiency and engineering robustness.

[0136] For example, the target photoacoustic spectral data can be directly multiplied with the regression coefficient matrix B to obtain the initial predicted concentration vector, and the species classification can be determined by combining the gas concentration threshold and the spectral response specificity; or the target photoacoustic spectral data can be first standardized in the same way as the calibration process (such as Z-score normalization), and then multiplied with the regression coefficient matrix B that has been adapted by the same standardization to improve the stability of the predicted numerical value; furthermore, the present invention can also introduce a concentration confidence assessment mechanism: for each element in the predicted concentration vector, its contribution rate of the regression residual sum of squares (PRESS) in the PLSR model is calculated, and only gases with a contribution rate higher than a set threshold are included in the final identification result.

[0137] This invention obtains gas type information and predicted concentrations of each gas type based on the above method, ensuring that the identification results are both accurate and interpretable.

[0138] For example, the present invention can be used to conduct online monitoring of an operating oil-immersed power transformer in a 500kV substation, collect mixed gas samples after the insulating oil is degassed in real time, and obtain the raw photoacoustic spectrum through a photoacoustic detection system; after the spectrum is preprocessed through the process in Example 2, the target photoacoustic spectrum data is obtained; substitute it into the PLSR model (number of latent variables = 6, regression coefficient matrix B dimension is 1024×7) trained with 50 calibration samples, and calculate the predicted concentration vector as [120.3, 8]. [7,2.1,45.6,9.8,320.5,1860.2] μL / L, corresponding to the gas sequence H2, CH4, C2H6, C2H4, C2H2, CO, CO2; based on the concentration levels of each gas and their ratios (e.g., C2H2 / C2H4=0.22<0.3), a low-temperature overheating fault is initially determined; at the same time, the C2H2 concentration is significantly higher than the background threshold and its regression coefficient main peak is located near 1530nm, which is consistent with the characteristic absorption of acetylene, further supporting the judgment conclusion.

[0139] This invention constructs a calibration dataset by preparing mixed gas samples of known concentrations, and uses a partial least squares regression algorithm to establish a robust mapping relationship between the spectral matrix X and the concentration matrix Y to obtain the regression coefficient matrix B. Then, the preprocessed target photoacoustic spectral data is multiplied by this matrix to directly output the identification results and quantitative concentrations of each target gas. This technical approach avoids the identification bias caused by peak overlap, baseline drift and noise interference in traditional spectral analysis, and achieves synchronous, rapid and quantitative decoupling of multi-component fault characteristic gases in transformer oil, effectively supporting subsequent fault diagnosis and early warning decisions based on gas components.

[0140] In another possible implementation, the target photoacoustic spectral data is decoupled using a multivariate correction method to obtain the gas identification result and predicted concentration, specifically:

[0141] Step S21': Obtain multiple different mixed gas samples from historical data; obtain the spectral information of each mixed gas sample; and stack the spectra of all mixed gas samples row by row to obtain a matrix. ,matrix The number of rows represents the number of mixed gas samples, and the number of columns represents the number of wavelength points in each spectral data point. ;

[0142] Among them, matrix (The data matrix) represents a set of data consisting of the photoacoustic spectral responses of multiple historically collected mixed gas samples.

[0143] In this embodiment, the matrix serves as the original input for unsupervised modeling, with each row corresponding to the photoacoustic signal response intensity of an independent mixed gas sample across all wavelength channels.

[0144] Its function is to provide statistically representative spectral variation structures for subsequent principal component analysis, thereby supporting the discovery of hidden patterns of potential gas components.

[0145] For example, based on the photoacoustic spectral measurement records of insulating oil pyrolysis gases accumulated during historical operation without concentration labels, multiple samples with significant differences in spectral morphology and covering typical fault gas combinations (such as H2, CH4, C2H2, C2H4, C2H6) are selected to construct a matrix. Alternatively, based on the photoacoustic spectral response of mixed gases generated under different discharge types (corona, spark, overheating) simulated in the laboratory, multiple batches of repeated experimental data were collected, and samples with significant drift were removed to construct a matrix. Furthermore, the present invention can also involve uniformly normalizing and preprocessing on-site photoacoustic spectral monitoring data from different transformer models, different years of operation, and different load conditions, and then merging them into a matrix. .

[0146] Based on the above method, this invention obtains an original spectral data matrix with sufficient spectral diversity and representativeness, which does not depend on known concentration labels, to support subsequent unsupervised decoupling modeling.

[0147] For example, the present invention can be based on 387 sets of mixed gas photoacoustic spectral data collected by a substation's online monitoring system over 12 consecutive months. Each set contains 1024 wavelength points (ranging from 700 to 1100 nm). After denoising and baseline correction, all spectral vectors are arranged row by row in chronological order to form... 3D matrix This serves as input for subsequent analysis.

[0148] Step S22': Obtain the matrix through principal component analysis The cumulative contribution rate of each component in the sample is used; components with contribution rates exceeding a threshold are selected as principal components. Principal components represent gas types, and their quantities are expressed as... express;

[0149] Here, the principal component (PC) can refer to the matrix transformed through orthogonal transformation. The extracted direction vectors are linearly independent of each other and arranged in descending order of variance contribution;

[0150] In this embodiment, the principal component is interpreted as a potential spectral mode reflecting the dominant absorption characteristics of different gas components, and its quantity... Corresponding to the number of main gas species that actually coexist;

[0151] Its function is to compress the original high-dimensional spectral space, retain the low-dimensional structure that plays a decisive role in spectral variation, and provide a physically interpretable dimensional basis for the subsequent construction of pure spectral matrices.

[0152] If the cumulative contribution rate threshold is set to 95%, for the matrix After performing singular value decomposition, select the first... The optimal number of principal components is determined by selecting principal components such that their cumulative variance contribution rate reaches 96.2%; or by using cross-validation to determine the optimal number of principal components: in different... Reconstruct the matrix under the values ​​respectively The reconstruction error was calculated, and the inflection point that significantly slowed the downward trend of the error was selected. Value; furthermore, the present invention can also be based on pre-defined domain knowledge. The upper limit (such as the five key characteristic gases in transformer oil) is then used to screen for the minimum values ​​that meet the accuracy requirements through cumulative contribution rate. .

[0153] Based on the above method, this invention obtains a set of principal components that can characterize the spectral response features of the main gas components and whose dimensions are controllable, which can be used to guide the construction of the initial pure spectral matrix.

[0154] For example, the present invention may be a modification of the above. matrix Principal component analysis revealed that the cumulative contribution rate of the first five principal components was 95.8%, while the sixth principal component only added 0.3% contribution. Therefore, m=5 was chosen, corresponding to the five types of gases: H2, CH4, C2H2, C2H4, and C2H6.

[0155] Step S23': Then, use progressive factor analysis to analyze the matrix... The wavelength regions of the gases represented by each principal component are obtained, and an initial pure spectral matrix is ​​constructed. Initial pure spectral matrix The number of rows is The number of columns is ;

[0156] Among them, Progressive Factor Analysis (PFA) is a wavelength localization method that identifies the energy concentration range of each principal component step by step based on the principal component loading distribution characteristics.

[0157] In this embodiment, the method is used to map abstract principal components to physically interpretable absorption peak position ranges, thereby giving each principal component a clear gas attribution meaning;

[0158] Its function is to provide an initial pure spectral matrix. Structural constraints are provided to ensure that each row has a non-zero response only within the corresponding gas characteristic absorption band, thereby improving the convergence stability and physical interpretability of subsequent iterations.

[0159] For each principal component's loading vector, a sliding calculation window with a length of 20 nm is used to identify the wavelength range where the energy peak is located. Load values ​​outside this range are set to zero, while non-zero values ​​within ±15 nm on either side of the peak are retained, forming a sparsified principal component curve. Alternatively, a known gas absorption spectrum database can be used to match typical absorption peak positions on the principal component loading spectrum (e.g., ...). At 780nm, At 810 nm, the initial pure spectral response range is defined with the matching peak as the center; furthermore, the present invention can also perform local maximum detection on each principal component loading vector, and set the dynamic window width according to the distance between adjacent maximums to extract the dominant absorption region.

[0160] This invention obtains an initial pure spectral matrix with wavelength selectivity that conforms to the optical absorption characteristics of gases based on the above method. This serves as the starting point for iterative optimization.

[0161] For example, the present invention may perform asymptotic factor analysis on the five principal components obtained above to identify their dominant absorption bands as 775–785 nm (corresponding to ), 805–815nm (corresponding to) ), 860–870nm (corresponding to) ), 910–920nm (corresponding to) ), 965–975nm (corresponding to) Based on this, construct Initial pure spectral matrix Each row retains a non-zero value only within the corresponding band.

[0162] Step S24': Solve the matrix using the least squares method. In each sample The concentrations of the gases were determined to obtain a concentration matrix. Concentration matrix The number of rows represents the number of samples, and the number of columns represents the number of gas types. ;

[0163] Among them, the concentration matrix (concentrationmatrix) represents the concentration matrix in each gas mixture sample. The relative content distribution of similar gases;

[0164] In this embodiment, the matrix is ​​represented by a linear mixture model. The least squares estimate is obtained, reflecting the performance of each sample. Projection coefficients in a 3D pure spectral space;

[0165] Its role is to provide an initial concentration estimate for subsequent alternating iterations, forming a bivariate starting point for pure spectral-concentration coupled optimization.

[0166] If solved directly To obtain the optimal concentration estimate in the least squares sense; or When ill-conditioned conditions exist, a Tikhonov regularization term is introduced to solve the constrained least squares problem. Furthermore, the present invention can also employ the non-negative least squares (NNLS) algorithm to solve the problem while ensuring that the concentration is non-negative. .

[0167] This invention obtains an initial concentration matrix that satisfies physical plausibility (such as nonnegativity) and matches the initial pure spectrum based on the above method. This supports subsequent bidirectional iterative updates.

[0168] For example, the present invention may be based on the above-described results. and the above The nonnegative least squares method is used to solve the problem. ,get A concentration matrix, where each row represents the relative concentration level of five types of gases in a sample, and all elements are non-negative.

[0169] Step S25′: Based on the concentration matrix Iteratively update the initial pure spectral matrix and concentration matrix The iteration continues until the changes in both the updated pure spectral matrix and the concentration matrix from the previous iteration are less than preset values, at which point the iteration stops, and the updated pure spectral matrix is ​​obtained. and ;

[0170] Iterative updates can refer to fixing a variable (such as...) Optimize another variable (e.g.) under the condition of ) The process of switching roles and repeating the optimization is akin to the Alternating Least Squares (ALS) framework.

[0171] In this embodiment, the process achieves synergistic refinement of pure spectrum and concentration, enabling the two to approximate the real physical mixing relationship.

[0172] Its function is to overcome the initial estimation bias, improve the chemical specificity of pure spectra and the quantitative accuracy of concentration estimation, thereby enhancing the robustness and generalization ability of unsupervised decoupling.

[0173] If fixed Solve get ; then fix Solve get Repeat this process until... and Alternatively: Introduce nonnegativity constraints and unimodal constraints synchronously in each update, i.e., for Negative values ​​are set to zero, and each row is processed to be single-peaked (only non-zero values ​​in the main peak region are retained); furthermore, the present invention may also employ weighted alternating least squares to apply differentiated weights to different wavelength regions in the objective function to enhance the fitting accuracy of the characteristic absorption peak region.

[0174] Based on the above method, this invention obtains a final pure spectral matrix that has undergone multiple rounds of collaborative optimization, satisfies physical constraints, and highly matches the original spectrum. With concentration matrix .

[0175] For example, the present invention can be based on the results described above. and Using the initial values, perform alternating least squares iterations and set the convergence threshold. After 7 rounds of iteration, , If the convergence condition is met, output... and .

[0176] Step S26′: Based on the target photoacoustic spectral data and the pure spectral matrix By using least squares fitting, the gas species information and the predicted concentration of each gas species in the target photoacoustic spectral data are obtained.

[0177] Among them, the target photoacoustic spectrum data can refer to a single photoacoustic spectral vector that has been preprocessed and collected in real time from the insulating oil of the transformer under test;

[0178] In this embodiment, the least squares fitting establishes a linear model. Solving for the unknown concentration vector ;

[0179] Its function is to transfer the pure spectral knowledge learned in the training phase to the online detection scenario, so as to realize the analysis and quantitative inversion of the gas composition of unknown samples.

[0180] For example, the target photoacoustic spectrum data vector ( )and ( Substitute into the formula Directly calculate the predicted concentration; or When the condition number is high, truncated singular value decomposition (TSVD) is used. Solve after dimensionality reduction Furthermore, the present invention can also employ the nonnegative least squares method to solve the problem. This ensures that all output concentrations are non-negative real numbers.

[0181] This invention obtains the identification results of each gas in the target sample based on the above method (from...). (The location of the zero component in the non-zero part is determined) and the corresponding predicted concentration is obtained, thus completing the unsupervised multivariate correction decoupling.

[0182] For example, the present invention may be a target photoacoustic spectrum collected in real time from a transformer in operation. (1024 dimensions), substituting into the above results The solution obtained using the nonnegative least squares method is... ppm (unit indicated) indicates that ppm was detected. , , The three gases had concentrations of 12.4 ppm, 8.7 ppm, and 3.2 ppm, respectively.

[0183] This invention uses principal component analysis to extract dominant variation patterns from historical spectral data to determine the number of potential gas species. By employing asymptotic factor analysis, abstract principal components are anchored to physically interpretable characteristic absorption bands, thus constructing an initial pure spectral matrix with wavelength selectivity. Subsequently, by iteratively optimizing the pure spectral and concentration matrices through alternating least squares approaches, the true mixing relationship is approximated under physical constraints such as non-negativity and unimodality. Finally, the optimized pure spectral matrix is ​​used to perform least squares fitting on the target photoacoustic spectrum, achieving gas species identification and concentration prediction without the need for calibration samples. This technical approach effectively avoids the dependence of traditional supervised multivariate calibration methods on a large number of standard samples with known concentrations. In engineering practice where on-site calibration resources are limited and gas concentration labels are lacking, it can still stably output gas component analysis results with physical interpretability, thereby supporting the reliable operation of subsequent fault diagnosis modules.

[0184] Furthermore, for the aforementioned iterative process, this invention also provides physical constraints for the iteration, including nonnegativity constraints and unimodal constraints, including:

[0185] Based on the non-negativity constraint, the negative numbers in the pure spectral matrix and concentration matrix during the iteration process are set to 0.

[0186] Among them, the non-negativity constraint can refer to the restriction condition that the lower bound of the variable is zero during the mathematical optimization process.

[0187] This constraint could refer to the iterative updating of the pure spectral matrix. and concentration matrix During the process, all elements are forced to satisfy , This means that negative values ​​are not allowed.

[0188] In this embodiment, the constraint is used to ensure that the pure spectral intensity and corresponding gas concentration of the decoupled gas both have clear physical meaning—a negative spectral intensity has no corresponding actual absorption behavior, and a negative concentration violates the principle of conservation of mass; therefore, in each iterative calculation, a new... and Then, the system automatically traverses all elements, replacing all values ​​less than zero with 0, thereby limiting the solution space to the physically realizable region.

[0189] For example, identifying and setting negative values ​​to zero based on the sign of matrix elements; or performing a threshold comparison on each matrix element after iterative output. The calculation completes the nonnegation process; furthermore, this invention can also embed a nonnegation verification module in the matrix update subroutine through conditional assignment logic, immediately performing a zeroing operation when any element is detected to be negative. Based on the above method, this invention obtains a pure spectral matrix and concentration matrix that conform to physical laws, ensuring the authenticity and interpretability of subsequent gas type identification and concentration prediction results.

[0190] For example, the present invention may be in the first The pure spectral matrix is ​​obtained in the next iteration. and concentration matrix Afterwards, Each row (representing the pure spectrum of a gas) undergoes element-by-element evaluation; if an element's value is less than 0, it is set to 0; similarly, for each element... Perform the same operation on each column (representing the gas concentration in a sample); after processing is complete, proceed to the next step. The next iteration.

[0191] Furthermore, based on the single-peak constraint, the non-main peak regions of each pure spectrum in the pure spectral matrix are set to 0.

[0192] Unimodality constraint can refer to the morphological restriction imposed on the shape of each pure spectrum, requiring that it have only one dominant absorption peak, and that the rest of the spectrum should be close to the baseline level.

[0193] This constraint can refer to identifying the global maximum position of each pure spectrum in the wavelength dimension, and delineating a finite-width main peak region centered on it, where all spectral response values ​​outside the region are forced to zero; the width of the main peak region can be a preset fixed value, or it can be dynamically determined based on the statistical characteristics of the peak width.

[0194] In this embodiment, the constraint is used to suppress the generation of spurious secondary peaks caused by noise amplification or mathematical coupling, making each pure spectrum closer to the single dominant absorption characteristics of real gas molecules in a specific wavelength band, thereby improving the separability and robustness of identification between different gas spectral components; specifically, the single-peak constraint acts on the pure spectral matrix. Each row, i.e., the pure spectral vector corresponding to each gas, outputs a sparse pure spectrum after morphological clipping.

[0195] For example, based on peak location and window truncation methods, the center wavelength index of the main peak is first determined by sliding extreme value search. Then, taking the index as the center, the length is... interval Set all elements outside the interval to 0. Alternatively, based on the method of detecting the zero-crossing point of the derivative, the inflection points of the rising and falling edges of the main peak can be identified, and the area between the two inflection points can be defined as the main peak region, while the area outside the inflection points can be zeroed out; furthermore, the present invention can also inversely deduce the main peak support region based on the Gaussian fitting parameters and utilize the standard deviation obtained from the fitting. Build The intervals are truncated. Based on the above method, this invention obtains a pure spectral representation with a more compact structure and clearer physical meaning, enhancing the ability of the multi-element decoupling process to characterize real gas components.

[0196] For example, the present invention can be applied to a pure spectral matrix. The row (i.e., the first row) Perform a peak search on the pure spectrum of the gas to obtain the position of the maximum value. If the half-width of the main peak is set to 5 wavelengths, then the index range to be retained is... The data within is assigned values ​​in the remaining positions. This operation is applied sequentially to all The pure spectra are transformed into an updated pure spectral matrix that satisfies the single-peak constraint. .

[0197] This invention employs a synergistic effect of nonnegative and unimodal constraints to simultaneously apply physical rationality constraints during iterative optimization: nonnegative constraints ensure that concentration and spectral intensity do not violate fundamental physical laws, while unimodal constraints enhance the typicality and uniqueness of gas absorption characteristics; together, they anchor the mathematical decoupling process within the real physical solution space, avoiding spurious solutions and divergence, significantly improving the accuracy of gas type identification and the reliability of concentration prediction in target photoacoustic spectral data, thereby providing a high-quality input foundation for subsequent machine learning-based fault diagnosis.

[0198] Based on the aforementioned two methods of acquiring gas types and predicting gas concentrations, the method further includes training a convolutional neural network using the target photoacoustic spectral data, gas type information acquired based on the target photoacoustic spectral data, and the predicted concentrations of each gas type as a training set to obtain a gas concentration prediction module. Then, the real-time acquired photoacoustic spectral data of the insulating oil is input into the gas concentration prediction module to obtain the corresponding gas type information and the predicted concentrations of each gas type. Specifically:

[0199] Step A1: Use the target photoacoustic spectral data, the gas type information obtained based on the target photoacoustic spectral data, and the predicted concentration of each gas type as the training set to train the convolutional neural network to obtain the gas concentration prediction module.

[0200] The target photoacoustic spectral data can refer to the standardized spectral data obtained after the aforementioned preprocessing process (including cleaning, wavelet denoising, baseline correction and normalization) and used for subsequent multivariate correction modeling; its data format is a one-dimensional vector or a two-dimensional matrix, with the number of rows corresponding to the number of samples and the number of columns corresponding to the number of wavelength sampling points;

[0201] Gas type information can refer to a set of gas types identified by the aforementioned multivariate correction method, such as one or more of hydrogen (H2), methane (CH4), ethane (C2H6), ethylene (C2H4), acetylene (C2H2), carbon monoxide (CO), and carbon dioxide (CO2); this information is expressed in the form of discrete labels, such as using one-hot encoding or integer indexing;

[0202] The predicted concentration of each gas type can refer to the quantitative concentration value corresponding to the above gas type output by the aforementioned multivariate correction method, with the unit being, for example, μL / L; its data structure is a real number vector that corresponds one-to-one with the gas type information.

[0203] The above three types of data together constitute the complete labeled samples required for supervised learning: the input is spectral data, and the supervision label is the joint vector of gas type information and the predicted concentration of each gas type;

[0204] The present invention can use the target photoacoustic spectral data as the input tensor, and concatenate the gas type information with the predicted concentration of each gas type into a multi-task joint label to construct an end-to-end supervised training task.

[0205] The present invention can also extract local band features from the target photoacoustic spectral data through a one-dimensional convolutional layer, and then connect them to a classification branch and a regression branch respectively. The classification branch outputs the probability distribution of gas types, and the regression branch outputs the continuous values ​​of the concentration of each gas. Furthermore, the present invention can also adopt a shared feature backbone + dual-head output structure, and deploy a Softmax classifier and a fully connected regressor after the backbone network to achieve collaborative optimization of gas identification and concentration prediction.

[0206] The present invention obtains a gas concentration prediction module based on the above method. This module can significantly reduce the computational complexity of a single inference while maintaining the same recognition accuracy as the multivariate correction method, thus meeting the low-latency response requirements in online detection scenarios.

[0207] For example, the present invention may collect 1000 sets of preprocessed target photoacoustic spectral data, each set of data is accompanied by gas type labels (such as C2H2, CH4, H2) and corresponding concentration values ​​(such as 12.3, 8.7, 45.1 μL / L) obtained from Example 4 or Example 5, forming a training set; the training set is input into a lightweight CNN model containing 3 one-dimensional convolutional layers, 2 batch normalization layers and 1 global average pooling layer; the classification branch outputs 7 types of gas existence judgments (including fault-free gas categories), and the regression branch outputs 7-dimensional concentration vectors; after 200 rounds of iterative training, the gas recognition accuracy on the validation set reaches 98.2%, and the average absolute error of concentration prediction is ±1.3 μL / L; after deploying the model, the time consumption of a single spectral inference is stabilized within 8ms, which is about 120 times faster than the iterative decoupling method in Example 5.

[0208] Step A2: Then input the real-time acquired photoacoustic spectrum data of the insulating oil into the gas concentration prediction module to obtain the corresponding gas type information and the predicted concentration of each gas type.

[0209] Among them, the real-time acquired photoacoustic spectral data of insulating oil can refer to new spectral data that has not yet been involved in multivariate correction modeling, which is continuously collected by the photoacoustic detection device during transformer operation and preprocessed with the aforementioned process; its data dimension is consistent with the target photoacoustic spectral data used in the training phase.

[0210] This data serves as the input to the gas concentration prediction module. After forward propagation, it simultaneously outputs two types of results: first, gas type information, i.e., the model determines which characteristic gases are present in the current sample; second, the predicted concentration of each gas type, i.e., the numerical estimate of the corresponding gas concentration output by the model.

[0211] The present invention can be used to extract and normalize real-time photoacoustic spectral data to a fixed length and then send it to a pre-trained gas concentration prediction module. The module directly outputs the gas type identification result and the concentration prediction vector.

[0212] The present invention may also cache real-time photoacoustic spectral data as a sliding time window sequence, construct pseudo-multi-channel input to enhance temporal robustness, and then input it to the gas concentration prediction module to obtain the result; further, the present invention may also filter real-time photoacoustic spectral data first through an abnormal spectrum discrimination submodule (e.g., based on reconstruction error threshold judgment), and only send qualified data to the gas concentration prediction module to perform inference.

[0213] Based on the above method, this invention obtains real-time and stable gas identification and concentration prediction results, supporting rapid response in subsequent fault diagnosis.

[0214] For example, this invention can be deployed at a 500kV substation site. The photoacoustic sensor collects the photoacoustic signal of the gas above the insulating oil at a frequency of 2Hz. One new pre-processed target photoacoustic spectrum data is generated every second. This data is sent to the deployed gas concentration prediction module in real time. The module completes inference within 9ms and outputs three types of gases, including H2, CH4, and C2H2, and their concentrations (e.g., H2: 62.5μL / L, CH4: 18.3μL / L, C2H2: 3.7μL / L). This result is immediately used to trigger subsequent fault diagnosis logic.

[0215] This invention constructs a lightweight, low-latency gas concentration prediction module by using the high-precision gas identification and concentration prediction results output by the multivariate correction method as supervised labels to train a convolutional neural network. This module replaces the original multivariate correction decoupling process, achieving a synergistic technical path from ensuring modeling accuracy to improving online inference efficiency. Based on this, real-time photoacoustic spectral data can be directly input into this module to obtain gas identification and concentration prediction results with equivalent accuracy. This overcomes the problems of high computational overhead and high response latency caused by matrix decomposition and iterative operations in traditional multivariate correction methods, meeting the dual requirements of millisecond-level response and long-term operational stability for online monitoring of power equipment. At the same time, based on machine learning methods, it can effectively reduce cross-interference.

[0216] Specifically, the fault diagnosis model built based on machine learning classification is used to obtain the fault status of the transformer. Specifically, it obtains concentration features and ratio features based on historical gas composition and predicted concentration information, where the ratio feature is the concentration ratio of different gases; and obtains the fault types corresponding to the concentration features and ratio features based on operation and maintenance data; and uses the data of concentration features, ratio features, and the fault types corresponding to both as a training set to train the fault diagnosis model; and obtains the current transformer fault type based on the current gas composition and predicted concentration information of the insulating oil through the trained fault diagnosis module.

[0217] Step S31: Obtain concentration characteristics and ratio characteristics based on historical gas composition and predicted concentration information. The ratio characteristics are the concentration ratios of different gases.

[0218] The concentration features can be a vector composed of the predicted concentration values ​​of each gas species obtained from the decoupling of historical photoacoustic spectra. For example, it can be the concentration values ​​of at least three of the gases such as H2, CH4, C2H2, C2H4, C2H6, CO, and CO2. In this embodiment, the feature is used to characterize the abundance distribution of gas components generated by the cracking of insulating oil.

[0219] Ratio features can refer to the set of arithmetic ratios between the predicted concentrations of any two gases, such as one or more combinations of H2 / CH4, C2H2 / C2H4, CH4 / H2, C2H4 / C2H6, CO2 / CO, etc. In this embodiment, this feature is used to enhance the sensitivity identification capability of differences in fault thermal effect intensity, discharge energy level and aging stage.

[0220] For example, based on the gas concentration data corresponding to multiple batches of insulating oil samples with labeled fault types in a historical database, the concentration ratio between preset gas pairs in each sample is calculated to form a ratio feature vector; or, based on typical three-ratio combinations, a subset of ratios with discriminative power is selected and dynamically expanded in conjunction with the distribution characteristics of the measured data of this invention to generate enhanced ratio features; furthermore, this invention can also concatenate the concentration features and ratio features in a fixed order to form a joint feature vector, which serves as a unified input structure for subsequent modeling. Based on the above methods, this invention obtains a multi-dimensional feature representation with fault discrimination capabilities.

[0221] For example, the present invention may be based on the oil sample data of 137 main transformers of a 220kV substation whose fault types were confirmed by inspection over the past five years. The concentration values ​​of five gases, H2, CH4, C2H2, C2H4, and C2H6, obtained by decoupling through the multi-element correction method in Example 4 or 5, are extracted as concentration features. Then, the ratios of H2 / CH4, C2H2 / C2H4, and CH4 / C2H6 are calculated to form ratio features. The two are combined into an 8-dimensional feature vector, and the true fault type of each sample is labeled, such as partial discharge, low-energy discharge, medium-temperature overheating, high-temperature overheating, inter-turn short circuit, etc., to form an initial training set.

[0222] Step S32: Obtain the fault type corresponding to the concentration characteristics and ratio characteristics based on the operation and maintenance data;

[0223] Among them, operation and maintenance data can refer to structured records formed during the operation and maintenance of power systems, including but not limited to equipment ledgers, maintenance reports, live-line testing records, infrared spectra, partial discharge signal reports, and fault mode conclusions that have been finally verified by disassembly; in this embodiment, this data serves as an authoritative source of fault type labels and is used to establish a mapping relationship between features and fault types.

[0224] For example, archived defect work orders and maintenance summary documents can be exported from the business system, and the clearly recorded fault mechanism descriptions can be manually extracted. These descriptions can then be standardized and categorized according to DL / T722 "Guidelines for Dissolved Gas Analysis and Judgment in Transformer Oil" to form a unified fault type coding system. Alternatively, natural language processing technology can be used to perform keyword matching and semantic classification on unstructured text reports to automatically extract fault type tags. Furthermore, this invention can also temporally align the feature sequences corresponding to multiple detections of the same equipment at different time points with their finally confirmed fault types to construct time-weighted tag samples. Based on the above methods, this invention obtains fault type tags that are strictly correlated with concentration and ratio characteristics.

[0225] For example, the present invention can be applied to a main transformer in which C2H2 continuously increases and C2H2 / C2H4 > 1 in three online tests in March, June and September 2021, while H2 increases synchronously; combined with the inspection results of the equipment in November 2021 confirming that there is an inter-turn short circuit in the high-voltage winding, the 8-dimensional feature vectors generated by the aforementioned three tests are all labeled as inter-turn short circuit category labels, and given increasing time decay weights, and included in the training set.

[0226] Step S33: Use the concentration features, ratio features, and the fault type data that both correspond to as the training set to train the fault diagnosis model;

[0227] The fault diagnosis model can be a classifier built based on a supervised learning paradigm. Its input is a numerical feature vector composed of concentration features and ratio features, and its output is a discrete category in a predefined set of fault types. In this embodiment, the model undertakes the decision-making function of transforming multidimensional gas response patterns into explainable fault mechanisms.

[0228] For example, an ensemble classifier can be constructed using the random forest algorithm, and the number of trees and maximum depth parameters can be optimized using out-of-bag error estimation to improve the generalization ability for small sample fault categories; or a support vector machine (SVM) can be used with a radial basis function kernel, and the optimal penalty coefficient and kernel width can be selected through cross-validation to enhance the ability to characterize the boundaries of high-dimensional sparse feature spaces; furthermore, this invention can also use a gradient boosting decision tree (GBDT) framework to fit the residuals of previous models round by round, gradually strengthening the distinguishing performance for easily confused fault types (such as low-temperature overheating and medium-temperature overheating). Based on the above methods, this invention obtains fault classification capabilities with robustness and interpretability.

[0229] For example, the present invention can use the training set containing 1024 labeled samples constructed above as input, and train a random forest model using a 5-fold cross-validation method, setting the number of decision trees to 200 and the maximum number of features to be [missing information]. The minimum number of leaf node samples is 3; the model's weighted F1-score on the validation set is 0.91, with recall rates of 0.87 and 0.89 for the two most difficult-to-distinguish faults: low-energy discharge and high-temperature overheating, respectively.

[0230] Step S34: Based on the current gas composition and predicted concentration information of the insulating oil, obtain the current transformer fault type through the trained fault diagnosis module.

[0231] The current gas composition and predicted concentration information of the insulating oil can refer to the latest gas identification results and concentration prediction values ​​obtained in real time through multivariate correction method in Example 1; this information serves as the online inference input of the fault diagnosis model in this embodiment, driving the model to output the most likely fault type.

[0232] If the real-time updated target photoacoustic spectral data is decoupled through the process in Example 4 or 5, concentration and ratio features of the same dimension can be extracted and input into the trained random forest model. The model then outputs the fault type category with the highest probability distribution. Alternatively, the top-3 fault types output by the model and their confidence scores can be presented together, triggering a differentiated early warning strategy (e.g., initiating a manual review process when the top-1 confidence score is <0.65). Furthermore, this invention can also synchronously call the SHAP (Shapley Additive Explanations) algorithm during model inference to generate a ranking of the contribution of each feature to the current prediction result, assisting maintenance personnel in understanding the judgment criteria. Based on the above methods, this invention obtains deployable, interpretable, and traceable online fault discrimination results.

[0233] For example, in a routine test, a 500kV converter transformer obtains H2=182μL / L, CH4=456μL / L, C2H2=93μL / L, C2H4=121μL / L, and C2H6=87μL / L. Based on this, H2 / CH4=0.40, C2H2 / C2H4=0.77, and CH4 / C2H6=5.24 are calculated. After inputting into a trained random forest model, the output high-energy discharge (arc) probability is 0.94. The system immediately triggers a level one red alert and pushes corresponding handling suggestions to the D5000 platform of the control center.

[0234] This invention enables the fault diagnosis model to simultaneously capture energy scale information reflected by absolute gas content and reaction path information reflected by relative proportion through joint modeling of concentration and ratio features. By leveraging real fault labels provided by operation and maintenance data, the consistency between model criteria and engineering reality is ensured. Furthermore, relying on the trained classifier, the current gas response mode is rapidly mapped, overcoming the inherent limitations of the traditional three-ratio method in terms of rule coverage and dynamic adaptability. This effectively improves the identification coverage and judgment accuracy of composite faults, early weak faults, and novel fault modes.

[0235] In addition, the present invention also provides an online detection system for transformer insulating oil based on photoacoustic spectroscopy, the system comprising:

[0236] The data preprocessing module is used to preprocess the photoacoustic spectral data to obtain the target photoacoustic spectral data;

[0237] The gas concentration prediction module is used to obtain gas identification results and predicted concentrations based on the target photoacoustic spectral data through decoupling using a multivariate correction method.

[0238] The transformer fault diagnosis module is used to determine whether the training sample size of the fault diagnosis model is greater than a preset value. If so, it obtains the fault condition of the transformer based on the identified gas and its corresponding concentration through a fault diagnosis model built on machine learning classification. Otherwise, it obtains the fault condition of the transformer based on the three-ratio method.

[0239] The early warning module is used to output multi-dimensional early warning information based on the fault type of the transformer; and to update and train the fault diagnosis model based on the actual fault conditions verified on site and the gas and gas concentration data obtained by identification.

[0240] The modules in the aforementioned online transformer insulating oil detection system based on photoacoustic spectroscopy can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0241] An electronic device, which can be a server, is also provided. This electronic device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database stores photoacoustic spectral data, gas concentration prediction results, fault diagnosis model parameters, historical maintenance records, and multi-dimensional early warning information. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an online detection method for transformer insulating oil based on photoacoustic spectroscopy.

Claims

1. A method for online detection of transformer insulating oil based on photoacoustic spectroscopy, characterized in that, Includes the following steps: Preprocessing the photoacoustic spectral data yields the target photoacoustic spectral data; The target photoacoustic spectral data is decoupled using a multivariate correction method to obtain gas identification results and predicted concentrations; specifically: Multiple different mixed gas samples are obtained from historical data; the spectral information of each mixed gas sample is obtained; and the spectra of all mixed gas samples are stacked row by row to obtain matrix D, where the number of rows of matrix D is the number of mixed gas samples and the number of columns is the number of wavelength points p of each spectral data. Principal component analysis is used to obtain the cumulative contribution rate of each component in matrix D; components with contribution rates exceeding a threshold are selected as principal components, which represent gas types, and their quantity is represented by... express; Then, the wavelength regions of the gases represented by each principal component are obtained from matrix D using asymptotic factor analysis, and an initial pure spectral matrix is ​​constructed. The initial pure spectral matrix The number of rows is The number of columns is p; The least squares method is used to solve for the values ​​in each sample of matrix D. The concentrations of the gases are determined to obtain a concentration matrix C, where the number of rows in concentration matrix C represents the number of samples, and the number of columns represents the number of gas species. ; Based on the concentration matrix C, the initial pure spectrum matrix is ​​iteratively updated. The iteration continues until the changes in both the updated pure spectral matrix and the concentration matrix from the previous iteration are less than preset values, and then the iteration stops, yielding the updated pure spectral matrix. and concentration matrix ; Based on the target photoacoustic spectral data and pure spectral matrix By using least squares fitting, the gas species information and the predicted concentration of each gas species in the target photoacoustic spectral data are obtained. If the training sample size of the fault diagnosis model is greater than the preset value, the fault condition of the transformer is obtained by using the fault diagnosis model built based on machine learning classification based on the identified gas and the corresponding gas concentration; otherwise, the fault condition of the transformer is obtained based on the three ratio method. Based on the transformer's fault status, output multi-dimensional early warning information distinguished by fault type; The fault diagnosis model is updated and trained based on the actual fault conditions verified on-site and the gas and gas concentration data obtained.

2. The online detection method for transformer insulating oil based on photoacoustic spectroscopy as described in claim 1, characterized in that, The preprocessing of the photoacoustic spectral data to obtain the target photoacoustic spectral data specifically involves: The initial photoacoustic spectral data is cleaned and outliers are removed to obtain the first photoacoustic spectral data. The first photoacoustic spectral data is then denoised using wavelet transform to obtain the second photoacoustic spectral data. Then, the second photoacoustic spectral data is baseline-corrected using the asymmetric least squares method to obtain the third photoacoustic spectral data; Finally, the third photoacoustic spectral data is normalized to obtain the target photoacoustic spectral data.

3. The online detection method for transformer insulating oil based on photoacoustic spectroscopy as described in claim 2, characterized in that, The process of cleaning and removing outliers from the initial photoacoustic spectral data specifically involves: The initial photoacoustic spectral data are subjected to median filtering using a sliding window, wherein the width of the window does not exceed a first preset range; Obtain the median of all data point signal values ​​within each window; if the absolute value of the deviation between the data point signal value within a window and the median is greater than a preset multiple of the standard deviation of all data point signal values ​​within the window, then replace the data point signal value with the median.

4. The online detection method for transformer insulating oil based on photoacoustic spectroscopy as described in claim 1, characterized in that, The target photoacoustic spectral data is decoupled using a multivariate correction method to obtain gas identification results and predicted concentrations, specifically: Prepare N mixed gas samples with known gas concentrations; and measure the photoacoustic spectral data of each mixed gas sample to obtain the spectral matrix X and the concentration matrix Y; The partial least squares regression algorithm is used to decompose matrices X and Y, resulting in the regression coefficient matrix B. Based on the regression coefficient matrix B and the target photoacoustic spectral data, gas type information and the predicted concentration of each gas type are obtained.

5. The online detection method for transformer insulating oil based on photoacoustic spectroscopy as described in claim 1, characterized in that, The physical constraints of the iteration include nonnegativity constraints and unimodal constraints; Based on the non-negativity constraint, the negative numbers in the pure spectral matrix and concentration matrix during the iteration process are set to 0; Based on the single-peak constraint, the non-main peak region of each pure spectrum in the pure spectral matrix is ​​set to 0.

6. The online detection method for transformer insulating oil based on photoacoustic spectroscopy as described in claim 5, characterized in that, It also includes training a convolutional neural network using the target photoacoustic spectral data, gas type information obtained based on the target photoacoustic spectral data, and the predicted concentration of each gas type as a training set to obtain a gas concentration prediction module. The real-time photoacoustic spectral data of the insulating oil is then input into the gas concentration prediction module to obtain the corresponding gas type information and the predicted concentration of each gas type.

7. The online detection method for transformer insulating oil based on photoacoustic spectroscopy as described in claim 1, characterized in that, The fault diagnosis model built based on machine learning classification is used to obtain the fault status of the transformer, specifically as follows: Concentration features and ratio features are obtained based on historical gas composition and predicted concentration information, where the ratio feature is the concentration ratio of different gases; and the fault types corresponding to the concentration features and ratio features are obtained based on operation and maintenance data; the concentration features, ratio features, and the fault type data corresponding to both are used as a training set to train the fault diagnosis model; based on the current gas composition and predicted concentration information of the insulating oil, the current transformer fault type is obtained through the trained fault diagnosis module.

8. A transformer insulating oil online detection system based on photoacoustic spectroscopy, used to implement the transformer insulating oil online detection method based on photoacoustic spectroscopy as described in any one of claims 1-7, characterized in that, include: The data preprocessing module is used to preprocess the photoacoustic spectral data to obtain the target photoacoustic spectral data; The gas concentration prediction module is used to obtain gas identification results and predicted concentrations based on the target photoacoustic spectral data through decoupling using a multivariate correction method. The transformer fault diagnosis module is used to determine whether the training sample size of the fault diagnosis model is greater than a preset value. If so, it obtains the fault condition of the transformer based on the identified gas and its corresponding concentration through a fault diagnosis model built on machine learning classification. Otherwise, it obtains the fault condition of the transformer based on the three-ratio method. The early warning module is used to output multi-dimensional early warning information based on the fault type, according to the transformer's fault status. The fault diagnosis model is updated and trained based on the actual fault conditions verified on-site and the gas and gas concentration data obtained.

9. An electronic device, characterized in that, include: A processor and a memory are connected via a bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program for implementing the online detection method for transformer insulating oil based on photoacoustic spectroscopy as described in any one of claims 1-7.

Citation Information

Patent Citations

  • High-precision photoacoustic spectrum monitoring method for gas in transformer oil

    CN119334881A