Online Detection Method of Gases in Transformer Oil Based on Self-Calibration of Photoacoustic Spectroscopy

Through photoacoustic spectral self-correction technology and pattern recognition algorithm, the correction coefficient is dynamically adjusted, and the accuracy and stability of gas detection in transformer oil is solved, accurate analysis and environmental adaptation of multi-component gases are realized, and intelligent operation and maintenance of power equipment is supported.

CN120084734BActive Publication Date: 2025-08-05NANJING JICUI GUANGXING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510566180.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-05
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

In the prior art, the gas detection method in transformer oil has low detection accuracy and poor stability, which is difficult to adapt to complex working conditions and environmental parameter changes, and lacks an adaptive compensation mechanism, resulting in an increase in the risk of misjudgment or misjudgment.

Method used

The online detection method of gas in transformer oil based on photoacoustic spectral self-correction is adopted to stimulate gas molecules through lasers to generate photoacoustic signals. Combined with self-correction algorithm and pattern recognition technology, the correction coefficient is dynamically adjusted to achieve accurate analysis of multi-component gases, and has temperature and pressure compensation functions.

Benefits of technology

It significantly improves the accuracy and stability of gas detection, can automatically adapt to environmental changes, ensure the accuracy of detection results, and promptly detect potential faults through abnormal alarm mechanisms, reduce operation and maintenance costs, and support the intelligent operation and maintenance of power equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120084734B_ABST
    Figure CN120084734B_ABST
Patent Text Reader

Abstract

The present invention discloses an on-line gas detection method for transformer oil based on photoacoustic spectroscopy self-calibration, which relates to the technical fields of spectral detection and power equipment condition monitoring, and includes the following steps: S1. Emitting modulated laser with a specific wavelength to the gas sample released from the transformer oil through a laser to excite gas molecules to generate photoacoustic signals; S2. Using a photoacoustic sensor to detect the photoacoustic signals and convert the signals into electrical signals for output. The on-line gas detection method for transformer oil proposed by the present invention adjusts the calibration coefficient in real time through a self-calibration algorithm, effectively compensates for the errors caused by the change of the optical path and the aging of the sensor, significantly improves the accuracy and stability of long-term detection, combines a gas spectral database and a pattern recognition algorithm, realizes the accurate qualitative and quantitative analysis of multiple gases, overcomes the problem of multi-component cross-sensitivity, and the method also has temperature and pressure compensation functions and can automatically adapt to environmental changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of spectral detection and power equipment condition monitoring, and particularly to an on-line gas detection method for transformer oil based on photoacoustic spectroscopy self-calibration. Background Art

[0002] The composition and concentration changes of dissolved gases in transformer oil are closely related to the types of internal faults of power equipment. Therefore, real-time monitoring of the gases in the oil is an important means to ensure the safe operation of the power system. At present, traditional off-line detection methods require regular manual sampling and analysis by a gas chromatograph, which have problems such as long detection cycles and poor timeliness, and it is difficult to meet the requirements of modern smart grids for real-time monitoring of equipment conditions. In on-line detection technologies, although some methods based on electrochemical sensors or infrared spectroscopy can achieve continuous monitoring, they are limited by factors such as sensor drift, environmental interference, and multi-component cross-sensitivity, and it is difficult to guarantee long-term detection accuracy. Especially under complex working conditions, factors such as temperature and pressure fluctuations and optical path attenuation will significantly affect the reliability of the detection results, leading to an increased risk of misjudgment or missed judgment.

[0003] In the prior art, there is still room for improvement in the gas recognition accuracy and system stability of traditional photoacoustic spectroscopy detection methods. For example, traditional methods rely on fixed calibration coefficients and cannot dynamically compensate for errors caused by optical path changes and sensor aging; when detecting multi-gas mixtures, they are easily interfered by overlapping characteristic spectra, and the qualitative classification accuracy needs to be improved; at the same time, there is a lack of an adaptive compensation mechanism for environmental parameter changes, resulting in the detection results being easily affected by temperature and pressure fluctuations. In addition, the self-checking and fault diagnosis capabilities of existing systems are limited, and it is difficult to achieve intelligent operation and maintenance throughout the equipment life cycle. In view of this, we propose an on-line gas detection method for transformer oil based on photoacoustic spectroscopy self-calibration. Summary of the Invention

[0004] To solve the above technical problems, an on-line gas detection method for transformer oil based on photoacoustic spectroscopy self-calibration is provided, and this technical solution solves the above problems.

[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] An on-line gas detection method for transformer oil based on photoacoustic spectroscopy self-calibration includes the following steps:

[0007] S1. Emitting a modulated laser with a specific wavelength to the gas sample released from the transformer oil through a laser to excite gas molecules to generate photoacoustic signals;

[0008] S2. Detecting the photoacoustic signals by a photoacoustic sensor and converting the signals into electrical signals for output;

[0009] S3. Preprocess the electrical signal, including filtering, amplification, and analog-to-digital conversion, to obtain a digital signal;

[0010] S4. Analyze the digital signal based on a self-calibration algorithm, dynamically adjust the calibration coefficient according to the gas type and concentration, and quantitatively map the signal amplitude and gas concentration. The specific implementation of the self-calibration algorithm is as follows:

[0011] Establish an initial linear relationship model between the photoacoustic signal amplitude and gas concentration. The model is composed of the product of the initial sensitivity coefficient and gas concentration plus the background noise offset;

[0012] Inject a standard gas sample into the photoacoustic cell to obtain the measured signal, and calculate the absolute difference between the measured signal and the theoretical signal calculated based on the current calibration coefficient and standard concentration as the error;

[0013] Use the gradient descent method to iteratively update the sensitivity coefficient and background noise offset until the error is less than the set threshold, form a calibrated linear relationship model, and use the calibrated model for real-time gas concentration calculation;

[0014] The gradient descent method of the self-calibration algorithm is specifically as follows:

[0015] Set the learning rate to 0.01 and the maximum number of iterations to 1000 times;

[0016] Update the coefficient for each iteration:

[0017] ;

[0018] In the formula, is the sensitivity coefficient of the 1] th iteration, is the sensitivity coefficient of the th iteration, is the learning rate, is the partial derivative of the error with respect to ;

[0019] ;

[0020] In the formula, is the background noise offset of the th iteration, is the background noise offset of the th iteration, is the partial derivative of the error with respect to the background offset, where the partial derivative is calculated as:

[0021] ;

[0022] In the formula, is the partial derivative of the error with respect to ; is the measured signal amplitude, is the standard gas concentration, is the background noise offset of the

[0023] ;

[0024] In each iteration, according to the partial derivatives of the sensitivity coefficient and the background noise offset with respect to the current error, these two parameters are updated with a fixed learning rate;

[0025] The iteration is terminated when the error change amount for 5 consecutive iterations is less than 0.00001;

[0026] S5. Combining with the gas spectral database, the gas is qualitatively classified through characteristic wavelength matching and pattern recognition algorithms;

[0027] S6. Based on the results of the qualitative classification, the gas type, concentration, and abnormal alarm information are output.

[0028] Preferably, in the S1 step, the wavelength range of the modulated laser is from 3 microns to 12 microns in the infrared band. The laser modulation frequency is determined by the ratio of the speed of light to twice the length of the photoacoustic cell resonator cavity, and the modulation depth is from one - quarter to one - half of the laser wavelength;

[0029] The gas sample is separated from the transformer oil through a polytetrafluoroethylene permeable membrane and introduced into the photoacoustic cell. The thickness of the permeable membrane is from 0.1 mm to 0.5 mm, and the permeation rate is adjusted by a temperature controller with a temperature control accuracy of ±0.1 °C.

[0030] Preferably, the photoacoustic cell adopts a cylindrical resonator cavity structure, the inner wall is coated with a gold film with a reflectivity greater than 98%, and the two ends of the cavity are provided with incident and exit windows made of zinc selenide;

[0031] The Q - value of the resonator cavity is determined by the ratio of the resonance frequency to the half - height width of the resonance peak, and the Q - value is not less than 1000;

[0032] The photoacoustic sensor is an array containing at least three piezoelectric microphones. The microphones are symmetrically distributed at 120 degrees. When synthesizing the signals, the weight coefficients are dynamically allocated according to the signal - to - noise ratio of each microphone and weighted averaging is performed.

[0033] Preferably, the pre - processing of the electrical signal in the S3 step specifically includes:

[0034] A band - pass filter is used to remove low - frequency mechanical noise and high - frequency electromagnetic interference, and the pass - band range is offset by 10 Hz above and below the center frequency;

[0035] The signal amplification uses a programmable gain amplifier, and the gain coefficient is adaptively adjusted according to the amplitude of the original signal: when the amplitude of the original signal is less than 1 mV, the gain is 1000 times; when it is between 1 mV and 10 mV, the gain is 100 times; when it is greater than or equal to 10 mV, the gain is 10 times.

[0036] The analog-to-digital conversion uses a 24-bit Σ-Δ analog-to-digital converter, the sampling rate is not less than 10 kHz, and the quantization error is less than 0.1%.

[0037] Preferably, the implementation of the self-calibration algorithm in the step S4 includes the following steps:

[0038] Establish an initial linear relationship model between the amplitude of the photoacoustic signal and the gas concentration. The model consists of the product of the initial sensitivity coefficient and the gas concentration plus the background noise offset.

[0039] [[ID=;12]]Inject a standard gas sample into the photoacoustic cell to obtain the measured signal, and calculate the absolute difference between the measured signal and the theoretical signal calculated based on the current calibration coefficient and the standard concentration as the error.

[0040] Use the gradient descent method to iteratively update the sensitivity coefficient and the background noise offset until the error is less than the set threshold, form a calibrated linear relationship model, and use the calibrated model for real-time gas concentration calculation.

[0041] The gradient descent method of the self-calibration algorithm is specifically as follows:

[0042] Set the learning rate to 0.01 and the maximum number of iterations to 1000 times.

[0043] In each iteration, update these two parameters with a fixed learning rate according to the partial derivatives of the sensitivity coefficient and the background noise offset with respect to the current error.

[0044] Terminate the iteration when the change in error for 5 consecutive iterations is less than 0.00001.

[0045] Preferably, the gas spectral database in the step S5 contains the characteristic absorption wavelengths and corresponding photoacoustic signal reference spectral lines of 10 gases including hydrogen, carbon monoxide, methane, acetylene, ethylene, ethane, carbon dioxide, oxygen, nitrogen, and water vapor. The database automatically updates the standard spectral line data according to the set threshold and supports users to perform local calibration by injecting gas samples with known concentrations. The calibration data is stored in JSON format.

[0046] Preferably, the qualitative classification of the gas in the step S5 is specifically as follows:

[0047] Use an algorithm combining principal component analysis and support vector machine to perform qualitative classification on the gas. The method steps are as follows:

[0048] Perform data preprocessing and normalization on the photoacoustic intensity values corresponding to the characteristic wavelengths of the photoacoustic spectrum signals, conduct principal component analysis for dimensionality reduction, calculate the covariance matrix of the normalized data, and perform eigenvalue decomposition on this matrix to obtain the eigenvalues arranged in descending order and the corresponding eigenvectors;

[0049] Select the first several principal components with a cumulative contribution rate exceeding 95%, project the original data onto the new space formed by these principal component eigenvectors to form a low-dimensional data set;

[0050] Divide the data set into a training set and a test set, with labels corresponding to different gas species, select a Gaussian kernel function to map the data into a high-dimensional space, find the maximum margin hyperplane by solving a convex optimization problem, use an optimization algorithm to balance the model complexity and classification error, introduce a penalty factor to adjust the tolerance for misclassified samples, and use slack variables to handle non-linearly separable data;

[0051] Adopt the "one-versus-all" strategy to train binary classifiers separately for each gas type, and finally determine the class of the sample through a voting mechanism. In the model training stage, optimize the parameters through grid search and cross-validation. Traverse the candidate value combinations of the penalty factor and kernel function parameters, and evaluate the classification accuracy of each group of parameters in combination with cross-validation;

[0052] After completing parameter optimization, input the test samples into the trained model, calculate the results and bias term according to the weighted kernel function of the support vectors, and judge the gas type of the sample through the sign function.

[0053] Preferably, it further includes a temperature and pressure compensation module, and its implementation method is as follows:

[0054] Collect the temperature and pressure data in the photoacoustic cell in real time;

[0055] According to the standard temperature of 298K and the standard pressure of 101.325 kPa, perform temperature and pressure normalization correction on the gas concentration;

[0056] When the temperature fluctuation exceeds ±2K or the pressure fluctuation exceeds ±5 kPa, trigger the self-calibration algorithm to recalibrate.

[0057] Preferably, the trigger logic of the abnormal alarm is as follows:

[0058] When the concentration of a single gas exceeds the preset threshold, immediately trigger a first-level alarm, where the hydrogen threshold is 100 ppm, acetylene is 5 ppm, and carbon monoxide is 350 ppm;

[0059] When the concentrations of three or more gases reach 50% of the threshold and last for 30 minutes simultaneously, trigger a second-level alarm;

[0060] The alarm information is uploaded to the cloud platform through the wireless network module, and a diagnostic report including exponential trend prediction is generated.

[0061] Preferably, it also includes a system self-check function:

[0062] Automatically detect the laser power at zero o'clock every day. When the power deviation exceeds ±5%, switch to the standby laser source;

[0063] Monitor the deviation of the spot position through a CCD camera every week. When the deviation exceeds 50 microns, start the piezoelectric ceramic regulator to correct the optical path;

[0064] Based on the signal-to-noise ratio, Q value, and temperature drift rate parameters, use a decision tree model to diagnose the failure types of laser aging, microphone failure, or gas path blockage.

[0065] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0066] The on-line gas detection method for transformer oil proposed by the present invention adjusts the correction coefficient in real time through a self-calibration algorithm, effectively compensates for the errors caused by the change of the optical path and the aging of the sensor, significantly improves the accuracy and stability of long-term detection, combines the gas spectral database and the pattern recognition algorithm, realizes the precise qualitative and quantitative analysis of multiple gases, overcomes the problem of multi-component cross-sensitivity. This method also has temperature and pressure compensation functions, can automatically adapt to environmental changes, ensure the accuracy of detection results. Its abnormal alarm mechanism can timely detect potential faults and upload them to the cloud through a wireless network, providing timely and effective decision support for operation and maintenance personnel. The system self-check function further enhances the reliability and maintainability of the equipment and reduces the operation and maintenance costs. In summary, this method not only improves the sensitivity and accuracy of gas detection in transformer oil, but also provides strong technical support for the preventive maintenance of power equipment, which is of great significance for ensuring the safe and stable operation of the power system. Brief Description of the Drawings

[0067] Figure 1 It is the method flow chart of the present invention;

[0068] Figure 2 It is the key node diagram of the present invention. Detailed Embodiments

[0069] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments in the following description are only examples, and those skilled in the art can think of other obvious variations.

[0070] Refer to Figure 1 As shown, the on-line gas detection method for transformer oil based on photoacoustic spectroscopy self-calibration includes the following steps:

[0071] Equipment status assessment is achieved through real-time monitoring of dissolved gases in transformer oil. This method utilizes the photoacoustic signals generated by the interaction of laser with gas molecules at specific wavelengths, combined with self-calibration algorithms and spectral database analysis, to accurately identify gas species and quantify concentrations, providing key data support for the preventive maintenance of power equipment.

[0072] The detection process begins with the excitation of a laser light source. The system uses a wavelength-tunable semiconductor laser to emit a laser beam at a specific frequency through modulation techniques. These laser beams are focused by the optical path system and then enter the gas sample released from the transformer oil sample. When the laser wavelength matches the vibration-rotation energy level transition frequency of the target gas molecules, the gas absorbs light energy and converts it into heat energy, triggering periodic thermal expansion, and then generating photoacoustic signals consistent with the laser modulation frequency. This photoacoustic effect has high sensitivity and selectivity, and can effectively distinguish different gas components.

[0073] The photoacoustic sensor, as the core component for signal acquisition, uses a highly sensitive microphone or piezoelectric ceramic device to convert the pressure wave generated by the thermal expansion of gas molecules into an electrical signal. Since photoacoustic signals are usually weak, they need to undergo multi-stage amplification and filtering. The preprocessing module includes a low-noise preamplifier, a band-pass filter, and an analog-to-digital converter, which can effectively suppress environmental noise interference and convert the analog signal into a digital signal, providing a stable basis for subsequent signal analysis.

[0074] The self-calibration algorithm is the key innovation of this method. The system dynamically adjusts the calibration coefficient by combining the amplitude of the photoacoustic signal collected in real time with the gas concentration inversion model. This adaptive mechanism can compensate for measurement errors caused by environmental factors such as optical path attenuation and sensor drift, ensuring detection accuracy even under complex working conditions. The algorithm establishes a non-linear mapping relationship between the signal amplitude and the gas concentration, and uses historical data and real-time feedback to optimize the model parameters, achieving self-calibration and performance improvement of the detection system.

[0075] Qualitative analysis relies on gas spectral databases and pattern recognition techniques. The system has a built-in database containing absorption spectra of various characteristic gases (such as hydrogen, methane, carbon monoxide, etc.). By comparing the spectral data collected in real time with the database and using correlation coefficient matching or neural network classification algorithms, the gas species can be quickly determined. This pattern recognition technique can not only identify single gases but also analyze the components of mixed gases, improving the reliability of detection results.

[0076] Finally, the system compares the quantitatively analyzed gas concentration data with the preset threshold, and combines the gas generation rate and the gas production trend to judge the operating state of the equipment. When abnormal gas concentration or sudden change in gas production rate is detected, the alarm mechanism is immediately triggered to prompt the maintenance personnel to carry out maintenance. The detection results are displayed in an intuitive form, including the real-time concentration curves of each gas component, historical trend analysis, and equipment health status assessment report, providing strong support for the intelligent operation and maintenance of the power system.

[0077] This method has the advantages of online monitoring, real-time response, multi-component detection, etc., which can effectively compensate for the deficiencies of traditional off-line detection with long cycle and poor timeliness. By combining the photoacoustic spectroscopy technology and the self-calibration algorithm, the sensitivity and anti-interference ability of gas detection are significantly improved, providing a reliable technical means for the condition-based maintenance of oil-filled power equipment such as transformers. With the continuous development of sensor technology and artificial intelligence algorithms, this detection method will play an increasingly important role in the power system, contributing to the safe and stable operation of the smart grid.

[0078] In the step S1, the wavelength range of the modulated laser is from 3 microns to 12 microns in the infrared band. The laser modulation frequency is determined by the ratio of the speed of light to twice the length of the resonant cavity of the photoacoustic cell. The laser modulation frequency satisfies:

[0079] ;

[0080] where is the laser modulation frequency, is the speed of light, is the length of the resonant cavity of the photoacoustic cell, and the modulation depth is from one-fourth to one-half of the laser wavelength;

[0081] The gas sample is separated from the transformer oil through a polytetrafluoroethylene permeable membrane and introduced into the photoacoustic cell. The thickness of the permeable membrane is from 0.1 mm to 0.5 mm, and the permeation rate is adjusted by a temperature controller with a temperature control accuracy of ±0.1 °C.

[0082] The photoacoustic cell adopts a cylindrical resonant cavity structure, with its inner wall coated with a gold film having a reflectivity greater than 98%. Incident and exit windows made of zinc selenide are provided at both ends of the cavity. Through the high reflectivity (>98%) of the gold-coated inner wall, the scattering and absorption losses of photoacoustic signals on the cavity wall can be significantly reduced, thereby reducing the full width at half maximum Δf of the resonant peak and increasing the Q value. The axial symmetry characteristic of the cylindrical structure is conducive to maintaining a stable axial standing wave mode, reducing the interference of higher-order modes, and further suppressing energy dispersion. The zinc selenide window material has a low absorption rate (<0.1%) and a high transmittance (>90%) in the infrared band, which can minimize the transmission loss. In addition, the optimized design of the cavity length and diameter (aspect ratio ≥5:1) can enhance the acoustic wave resonance efficiency and reduce the energy leakage caused by boundary conditions. According to the acoustic resonance theory, the Q value can be approximately expressed as:

[0083] ;

[0084] where is the propagation time of the acoustic wave in the cavity, is the absorption coefficient of the cavity wall material, is the perimeter of the cavity, is the window transmission loss coefficient, is the window area. By gold-coating the inner wall ( ≈0.02), using zinc selenide windows ( ≈0.05), and optimizing the aspect ratio, it can be ensured that the denominator term approaches 1, thereby meeting the design requirement of Q value ≥1000.

[0085] The Q value of the resonant cavity is determined by the ratio of the resonant frequency to the full width at half maximum of the resonant peak, and the Q value of the resonant cavity satisfies:

[0086] ;

[0087] where is the quality factor of the resonant cavity, is the resonant frequency, is the full width at half maximum of the resonant peak;

[0088] The photoacoustic sensor is a microphone array, including at least 3 piezoelectric microphones symmetrically distributed at 120°. The signal synthesis adopts a weighted average algorithm:

[0089] ;

[0090] where is the total synthesized photoacoustic signal, is the total number of microphones, is the The weight coefficients of the microphones, and the weight coefficient allocation logic of the microphone array is based on the real-time signal quality of each channel: The system continuously monitors the signal-to-noise ratio of each microphone, and preferentially assigns a greater weight to the channel with a higher signal-to-noise ratio. When the signal of a certain microphone is contaminated by noise due to its position or environmental interference, its weight is automatically reduced; while the weight of the microphone with clear signal and low background noise is dynamically increased. At the same time, the symmetrically arranged microphones cover the cavity sound field through spatial complementarity, and the weight allocation combines the correlation analysis between channels to avoid redundant noise superposition. Finally, the data of each channel is fused by weighted average, while retaining the characteristics of effective sound pressure fluctuations, suppressing random interference and local outliers, and maximizing the overall signal-to-noise ratio of the signal. is the photoacoustic signal of the microphone, which is dynamically allocated according to the signal-to-noise ratio. The symmetrically distributed microphone layout can evenly capture the sound pressure fluctuations at different positions in the cavity, effectively cancel the local noise interference through spatial averaging, and improve the spatial consistency of the signal. The weight coefficient of each microphone is dynamically allocated according to its real-time signal-to-noise ratio, and the data of the channel with high signal quality is preferentially used, further suppressing random noise when synthesizing the total signal, and enhancing the intensity of the effective photoacoustic signal. This design not only optimizes the redundancy of signal acquisition, but also reduces the influence of environmental vibration or electromagnetic interference on the detection sensitivity through the multi-channel cooperation, and finally realizes the signal output with a high signal-to-noise ratio, laying a foundation for the accurate inversion of gas concentration.

[0091] The preprocessing of the electrical signal in the step S3 specifically includes:

[0092] A band-pass filter is used to remove low-frequency mechanical noise and high-frequency electromagnetic interference, and the passband range is offset by 10 Hz above and below the center frequency;

[0093] The signal amplification uses a programmable gain amplifier, and the gain coefficient is adaptively adjusted according to the amplitude of the original signal: when the amplitude of the original signal is less than 1 mV, the gain is 1000 times; when it is between 1 mV and 10 mV, the gain is 100 times; when it is greater than or equal to 10 mV, the gain is 10 times. Specifically:

[0094] ;

[0095] In the formula, is the gain coefficient of the programmable gain amplifier, is the amplitude of the original signal.

[0096] The analog-to-digital conversion uses a 24-bit Σ-Δ analog-to-digital converter, the sampling rate is not less than 10 kHz, and the quantization error is less than 0.1%.

[0097] The implementation of the self-calibration algorithm in the step S4 includes the following steps:

[0098] Establish an initial linear relationship model between the photoacoustic signal amplitude and the gas concentration. The model consists of the product of the initial sensitivity coefficient and the gas concentration plus the background noise offset; the initial relationship model is:

[0099] ;

[0100] where, is the photoacoustic signal amplitude, is the initial sensitivity coefficient, is the gas concentration, is the background noise offset;

[0101] Inject a standard gas sample into the photoacoustic cell to obtain the measured signal, and calculate the absolute difference between the measured signal and the theoretical signal calculated based on the current calibration coefficient and the standard concentration as the error:

[0102] ;

[0103] where, is the absolute error between the measured signal and the theoretical signal, is the measured signal value, is the calibration coefficient, is the standard gas concentration, is the baseline offset;

[0104] Use the gradient descent method to iteratively update the sensitivity coefficient and the background noise offset until the error is less than the set threshold, and form a corrected linear relationship model. Use the corrected model for real-time gas concentration calculation. The updated model is:

[0105] ;

[0106] where, is the final gas concentration result after correction, is the sensitivity of the sensor to the change in gas concentration, is the original gas concentration measurement value, is the baseline noise or zero drift of the sensor. Use the corrected model for real-time gas concentration calculation.

[0107] The gradient descent method of the self-calibration algorithm is specifically:

[0108] Set the learning rate to 0.01 and the maximum number of iterations to 1000 times;

[0109] Update the coefficients for each iteration:

[0110] ;

[0111] In the formula, is the The sensitivity coefficient of the $i$-th iteration is the sensitivity coefficient of the $i$-th iteration, is the learning rate, and is the partial derivative of the error with respect to

[0112] ;

[0113] In the formula, is the background noise offset of the $i$-th iteration, is the background noise offset of the $(i + 1)$-th iteration, is the partial derivative of the error with respect to the background offset, and the partial derivative is calculated as:

[0114] ;

[0115] In the formula, is the partial derivative of the error with respect to , is the measured signal amplitude, is the standard gas concentration, is the background noise offset of the $i$-th iteration.

[0116] ;

[0117] When the error change amount of 5 consecutive iterations is less than 0.00001, the iteration is terminated. The system uses the mean square error between the measured signal and the theoretical signal as the loss function, and determines the parameter adjustment direction by calculating the partial derivatives of the error with respect to the sensitivity coefficient and the background noise offset. In each iteration, the algorithm first calculates the prediction error under the current parameters, and then adjusts the sensitivity coefficient according to the partial derivative of the error with respect to the sensitivity coefficient (i.e., the sensitivity of the error to the change of the sensitivity coefficient), so that it is updated in the direction of reducing the error. At the same time, the algorithm calculates the partial derivative of the error with respect to the background noise offset (i.e., the sensitivity of the error to the change of the background offset), and synchronously corrects the background noise offset. The learning rate controls the step size of parameter update to avoid oscillation caused by too large adjustment amplitude. When the error change tends to be stable or reaches the maximum number of iterations, the algorithm terminates and outputs the optimized parameters, finally realizing the dynamic calibration of the sensitivity coefficient and the background noise, and ensuring the accuracy of the gas concentration inversion model.

[0118] In the S5 step, the gas spectral database contains the characteristic absorption wavelengths of 10 gases, namely hydrogen, carbon monoxide, methane, acetylene, ethylene, ethane, carbon dioxide, oxygen, nitrogen, and water vapor, and the corresponding photoacoustic signal reference spectral lines. The database automatically updates the standard spectral line data according to the set threshold and supports users to perform local calibration by injecting gas samples with known concentrations. The calibration data is stored in JSON format.

[0119] The qualitative classification of the gas in the S5 step is specifically as follows:

[0120] In the gas qualitative classification link, we adopted a hybrid algorithm combining principal component analysis and support vector machine to achieve accurate identification of gas categories through multi-dimensional data processing and intelligent model construction. First, preprocess the photoacoustic spectroscopy signal.

[0121] Input data: The photoacoustic intensity values corresponding to the characteristic wavelengths of the photoacoustic spectroscopy signal form the original data set.

[0122] Standardization processing: Standardize each characteristic dimension to eliminate the dimension difference:

[0123] ;

[0124] Among them, is the value of the rd sample and the th characteristic in the standardized data set, is the value of the th sample and the th characteristic in the original data set, is the mean value of the th characteristic, which is used to measure the average level of this characteristic, is the standard deviation of the th characteristic, which is used to measure the dispersion degree of the data of this characteristic. The core of this step is to eliminate instrument noise and environmental interference and ensure the reliability of subsequent analysis. We perform standardization processing on the photoacoustic intensity values corresponding to the characteristic wavelengths to make the characteristic data with different dimensions at the same dimension level and avoid affecting the model training effect due to data scale differences.

[0125] Next, perform principal component analysis for dimensionality reduction, which is a key step to solve the problem of high-dimensional data redundancy. We first calculate the covariance matrix of the standardized data and extract the principal components of the data through eigenvalue decomposition technology. Covariance matrix calculation: Calculate the covariance matrix of the standardized data :

[0126] ;

[0127] Among them, For standardized data Covariance matrix, used to measure the correlation between features, For the standardized data set Transpose matrix, is the number of samples. The core reason for choosing principal component analysis (PCA) rather than other dimensionality reduction methods lies in its characteristics suitable for spectral data: in the high-dimensional features of photoacoustic spectroscopy, there are often a large amount of redundant information caused by gas absorption peak overlap or instrument noise. By extracting the principal components in the direction of the maximum variance, PCA can compress irrelevant fluctuations and noise while retaining the key features for gas classification (such as the intensity differences corresponding to specific absorption wavelengths), significantly improving the generalization ability of the classification model. In addition, the linear transformation characteristics of PCA are highly compatible with the kernel function processing of subsequent support vector machines, which can not only avoid the computational complexity problems of non-linear dimensionality reduction methods (such as t-SNE), but also construct clear separable boundaries for different gas categories. This dimensionality reduction strategy is particularly suitable for the multi-component recognition scenario of mixed gases. Through the physical meaning of the principal components (such as the correlation between the principal components and the absorption spectra of specific gases), the classification results can be intuitively explained, enhancing the interpretability and reliability of the detection system.

[0128] Eigenvalue decomposition: Perform eigen decomposition on the covariance matrix to obtain eigenvalues and the corresponding eigenvectors . The magnitudes of the eigenvalues reflect the contribution degrees of the respective principal components to the data variance. After arranging them in descending order, select the first several principal components whose cumulative contribution rate exceeds 95%. Principal component selection: Select the number of principal components according to the cumulative contribution rate of eigenvalues (usually taking the cumulative contribution rate > 95%): The cumulative contribution rate is specifically:

[0129] ;

[0130] where, is the covariance matrix the th eigenvalue. The larger the eigenvalue, the more information the corresponding principal component contains, is the number of principal components, is the number of eigenvalues. These principal components form a new feature space, which can both retain the main information of the original data and effectively reduce the dimension. After projecting the original data into this low-dimensional space, a new data set is formed, providing a more efficient input for subsequent classification tasks. The finally dimension-reduced data set is:

[0131] ;

[0132] where, is the dimension-reduced data set, is the A projection matrix composed of feature vectors.

[0133] In the data partitioning stage, we divide the dataset into a training set and a test set according to a certain ratio. The training set is used for learning model parameters, and the test set is used to evaluate the model's generalization ability. The label system corresponds to different gas types, and through supervised learning, the model is guided to establish the mapping relationship between input features and gas categories. When constructing the support vector machine model, the Gaussian kernel function is selected as the non-linear mapping tool to map low-dimensional data to a high-dimensional feature space to solve the non-linearly separable problem. Specifically:

[0134] ;

[0135] Among them, and are two sample vectors in the dataset after dimensionality reduction, is the kernel parameter, which controls the locality of the kernel function. The larger is, the more local the kernel function is. In the gas classification task, the Gaussian kernel function converts low-dimensional features into a high-dimensional space through non-linear mapping, and can effectively distinguish the subtle differences of different gas absorption peaks in spectral data. The value of γ directly affects the sensitivity of the classification boundary: when γ is small, the kernel function has a wide coverage range, and the model tends to global features, which is suitable for the smooth separation of overlapping absorption peaks in mixed gases; when γ is large, the kernel function focuses on local features, which is more suitable for the sharp distinction requirements of single gas absorption peaks. In practical applications, the value range of γ is usually determined by cross-validation combined with grid search. Considering the characteristics of photoacoustic spectroscopy data (such as signal-to-noise ratio, absorption peak density), a γ value between 0.01 and 1 is preferably selected to balance the model's generalization ability and classification accuracy. SVM finds the maximum margin hyperplane by solving the following convex optimization problem:

[0136] ;

[0137] Among them, is the normal vector of the hyperplane, is the bias term of the hyperplane, are slack variables, which are used to handle the misclassification of samples, is the penalty factor, which is used to balance the complexity of the model and the cost of misclassification, is the number of samples. By solving the convex optimization problem to find the maximum margin hyperplane, the position of this hyperplane determines the decision boundary between different categories.

[0138] To balance the model complexity and classification error, we introduce a penalty factor to adjust the tolerance for misclassified samples. For data with noise or non-linearly separable, the slack variables allow some samples to cross the hyperplane, thereby improving the model's robustness. Specifically:

[0139] ​ ;

[0140] Among them, , is the class label of the th sample, is the normal vector of the hyperplane, is the transpose operation of a matrix or vector, is the kernel mapping function, is the offset of the hyperplane relative to the origin. The classification strategy adopts the "one-vs.-rest" method, and a binary classifier is trained for each gas class. Each binary classifier distinguishes the current class from all other classes, and finally, the voting mechanism is used to synthesize the judgment results of all binary classifiers to determine the final class attribution of the sample.

[0141] In the model training stage, parameter optimization is a crucial step in improving performance. We adopt the method of grid search combined with cross-validation to systematically traverse the candidate value combinations of the penalty factor and kernel function parameters. Each set of parameter combinations corresponds to a model instance, and its classification accuracy is evaluated through cross-validation. The parameter combination with the highest accuracy is selected as the final model parameter. This method effectively avoids overfitting and ensures the stability of the model on different data subsets.

[0142] After completing parameter optimization, the model enters the testing stage. When inputting test samples, the model calculates the results of the weighted kernel function of the support vectors and the bias term, and determines the class of the sample through the sign function. The whole process realizes the end-to-end automated analysis from the original spectral signal to the gas class, which not only retains the essential features of the spectral data but also improves the classification efficiency and accuracy through machine learning algorithms. This method significantly reduces the computational complexity while ensuring the recognition accuracy and is applicable to real-time monitoring and online analysis scenarios.

[0143] It also includes a temperature and pressure compensation module, and its implementation method is as follows:

[0144] Collect the temperature and pressure data in the photoacoustic cell in real time;

[0145] According to the standard temperature of 298K and the standard pressure of 101.325 kPa, perform temperature and pressure normalization correction on the gas concentration. The normalization correction formula is:

[0146] The actually measured gas concentration needs to be multiplied by the ratio of the measured pressure to the standard pressure and then multiplied by the ratio of the standard temperature to the measured temperature. For example, if the actually measured pressure is , and the temperature is , the corrected concentration is:

[0147] ;

[0148] Wherein, is the corrected standard concentration, representing the concentration value of the gas under standard temperature and pressure, is the actual measured concentration, the original concentration obtained by inverting the photoacoustic signal, is the standard pressure value (kPa), is the standard temperature value (Kelvin, K). This formula is based on the ideal gas state equation. Through the linear proportional relationship between pressure and temperature, it eliminates the influence of environmental parameter fluctuations on the gas volume concentration, ensuring the comparability of the detection results with the data under standard conditions.

[0149] When the temperature fluctuation exceeds ±2K or the pressure fluctuation exceeds ±5 kPa, the self - calibration algorithm is triggered for recalibration.

[0150] Preferably, the trigger logic of the abnormal alarm is as follows:

[0151] When the concentration of a single gas exceeds the preset threshold, a first - level alarm is immediately triggered. The threshold for hydrogen is 100 ppm, for acetylene is 5 ppm, and for carbon monoxide is 350 ppm;

[0152] When the concentrations of three or more gases reach 50% of the threshold simultaneously and last for 30 minutes, a second - level alarm is triggered;

[0153] The alarm information is uploaded to the cloud platform through the wireless network module, and a diagnostic report including exponential trend prediction is generated.

[0154] It also includes a system self - check function:

[0155] In the system self - check function module, the device ensures long - term stable operation through a multi - dimensional monitoring mechanism. At zero o'clock every day, the system automatically triggers the laser power detection program, and the laser output power data is collected in real - time through the built - in photodetector and compared with the reference value. When the detected power fluctuation exceeds the preset threshold, the system will immediately start the redundant switching mechanism, seamlessly access the backup laser source, and at the same time generate maintenance prompt information for technicians to refer to. This preventive maintenance strategy effectively avoids detection errors caused by the performance attenuation of the laser.

[0156] At a fixed time every week, the system will call a high - precision CCD camera to perform optical alignment detection on the optical path system. By analyzing the imaging position of the light spot on the detector array, the center offset of the light spot is calculated in real - time. When the offset exceeds the allowable range, the system automatically activates the micro - displacement adjustment mechanism driven by piezoelectric ceramics, adjusts the mirror angle through mechanical compensation with nanometer - level precision, and ensures that the laser beam is always focused on the central area of the gas chamber. This closed - loop correction process can effectively offset the optical path drift caused by environmental temperature changes or mechanical vibrations.

[0157] In terms of equipment health status monitoring, the system integrates an intelligent diagnosis module based on multi-parameter fusion. By collecting key parameters such as the signal-to-noise ratio of photoacoustic signals, the Q value of the laser, and the ambient temperature drift rate in real time, a decision tree model is constructed for fault mode recognition. When an abnormal decrease in the signal-to-noise ratio is detected, the system further analyzes the change trend of the Q value curve to distinguish whether it is a performance decline caused by laser aging or signal attenuation caused by reduced microphone sensitivity. If the temperature drift rate is simultaneously monitored to exceed the normal range, an air path blockage warning will be triggered, and the blockage location will be located by analyzing the temperature gradient distribution. This hierarchical diagnosis mechanism can quickly locate the root cause of the fault, provide accurate maintenance guidance for maintenance personnel, and significantly improve the usability and reliability of the system.

[0158] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art of this industry should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification is only the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection required by the present invention is defined by the appended claims and their equivalents.

Claims

1. An online detection method for gas in transformer oil based on self-calibration of photoacoustic spectroscopy, characterized in that: The following steps are involved: S1, a laser emits a modulated laser of a specific wavelength to the gas sample released from the transformer oil, exciting the gas molecules to generate photoacoustic signals; S2, using a photoacoustic sensor to detect the photoacoustic signal and convert the signal into an electrical signal for output; S3, preprocessing the electrical signal, including filtering, amplification and analog-to-digital conversion, to obtain a digital signal; S4. Analyze the digital signal based on the self-correction algorithm, dynamically adjust the correction coefficient according to the gas type and concentration, and quantitatively map the signal amplitude and gas concentration. The self-correction algorithm is specifically implemented as follows: Establish an initial linear relationship model between the photoacoustic signal amplitude and the gas concentration. The model consists of the product of the initial sensitivity coefficient and the gas concentration plus the background noise offset. The measured signal is obtained by injecting the standard gas sample into the photoacoustic cell, and the absolute difference between the measured signal and the theoretical signal calculated based on the current correction coefficient and the standard concentration is calculated as the error; The sensitivity coefficient and background noise offset are iteratively updated using the gradient descent method until the error is less than the set threshold, forming a corrected linear relationship model, which is then used for real-time gas concentration calculation. The gradient descent method of the self-correction algorithm is specifically: Set the learning rate to 0.01 and the maximum number of iterations to 1000; Update the coefficients at each iteration: ; Where, For the The sensitivity coefficient of the iteration, For the The sensitivity coefficient of the iteration, is the learning rate, The error pair The partial derivative of ; Where, For the The background noise offset of the iteration, For the The background noise offset of the iteration, is the partial derivative of the error with respect to the background offset, where the partial derivative is calculated as: ; Where, The error pair The partial derivative of is the measured signal amplitude, is the standard gas concentration, For the The background noise offset of the iteration; ; In each iteration, the two parameters are updated at a fixed learning rate based on the partial derivatives of the current error with respect to the sensitivity coefficient and the background noise offset; The iteration is terminated when the error change of 5 consecutive iterations is less than 0.00001; S5. Combined with the gas spectrum database, qualitative classification of gases is performed through characteristic wavelength matching and pattern recognition algorithm; S6. Based on the results of qualitative classification, output gas type, concentration and abnormal alarm information.

2. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 1, characterized in that: The wavelength range of the modulated laser in step S1 is 3 μm to 12 μm in the infrared band, the laser modulation frequency is determined by the ratio of the speed of light to twice the length of the photoacoustic cell resonant cavity, and the modulation depth is one quarter to one half of the laser wavelength; The gas sample is separated from the transformer oil through a polytetrafluoroethylene permeable membrane and introduced into the photoacoustic cell. The thickness of the permeable membrane is 0.1 mm to 0.5 mm. The permeation rate is adjusted by a temperature controller with a temperature control accuracy of ±0.1 degrees Celsius.

3. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 2, characterized in that: The photoacoustic cell adopts a cylindrical resonant cavity structure, the inner wall of which is plated with a gold film with a reflectivity greater than 98%, and an incident window and an exit window made of zinc selenide are provided at both ends of the cavity; The Q value of the resonant cavity is determined by the ratio of the resonant frequency to the half-height width of the resonant peak, and the Q value is not less than 1000; The photoacoustic sensor is an array of at least three piezoelectric microphones, which are symmetrically distributed at 120 degrees. When synthesizing signals, weight coefficients are dynamically allocated based on the signal-to-noise ratio of each microphone and weighted averaging is performed.

4. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 1, characterized in that: The pre-processing of the electrical signal in step S3 specifically includes: A bandpass filter is used to remove low-frequency mechanical noise and high-frequency electromagnetic interference, with a passband range of 10 Hz above and below the center frequency; The signal amplification adopts a programmable gain amplifier, and the gain coefficient is adaptively adjusted according to the original signal amplitude: when the original signal amplitude is less than 1 millivolt, the gain is 1000 times, when it is 1 millivolt to 10 millivolts, the gain is 100 times, and when it is greater than or equal to 10 millivolts, the gain is 10 times; The analog-to-digital conversion uses a 24-bit Σ-Δ analog-to-digital converter with a sampling rate of not less than 10 kHz and a quantization error of less than 0.1%.

5. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 1, characterized in that: The gas spectrum database in step S5 contains the characteristic absorption wavelengths and corresponding photoacoustic signal reference spectra of 10 gases, including hydrogen, carbon monoxide, methane, acetylene, ethylene, ethane, carbon dioxide, oxygen, nitrogen and water vapor. The database automatically updates the standard spectrum line data according to the set threshold and supports users to perform local calibration by injecting gas samples of known concentration. The calibration data is stored in JSON format.

6. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 1, characterized in that: The qualitative classification of the gas in step S5 is specifically as follows: The algorithm combining principal component analysis and support vector machine is used to qualitatively classify gases. The method steps are as follows: The photoacoustic intensity values corresponding to the characteristic wavelengths of the photoacoustic spectroscopy signals were preprocessed and standardized, and principal component analysis and dimensionality reduction were performed. The covariance matrix of the standardized data was calculated, and the eigenvalue decomposition of the matrix was performed to obtain the eigenvalues and corresponding eigenvectors arranged in order. Select the first several principal components with a cumulative contribution rate exceeding 95%, and project the original data into a new space composed of the eigenvectors of these principal components to form a low-dimensional data set; The dataset is divided into training and test sets, with labels corresponding to different gas types. A Gaussian kernel function is used to map the data into a high-dimensional space. The maximum margin hyperplane is found by solving a convex optimization problem. An optimization algorithm is used to balance model complexity and classification error. A penalty factor is introduced to adjust the tolerance for misclassified samples, and slack variables are used to handle nonlinearly separable data. A "one-vs-many" strategy was employed to train a binary classifier for each gas type. A voting mechanism was then used to determine the class to which the sample belonged. During the model training phase, parameters were optimized through grid search and cross-validation. Candidate combinations of penalty factors and kernel function parameters were traversed, and the classification accuracy of each parameter set was evaluated using cross-validation. After completing the parameter optimization, the test sample is input into the trained model. According to the weighted kernel function calculation results of the support vector and the bias term, the gas category of the sample is determined by the sign function.

7. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 1, characterized in that: It also includes a temperature and pressure compensation module, which is implemented as follows: Real-time collection of temperature and pressure data in the photoacoustic cell; According to the standard temperature of 298K and the standard pressure of 101.325 kPa, the gas concentration is normalized to temperature and pressure; When the temperature fluctuation exceeds ±2K or the pressure fluctuation exceeds ±5 kPa, the self-correction algorithm is triggered to recalibrate.

8. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 1, characterized in that: The triggering logic of the abnormal alarm is: When the concentration of a single gas exceeds the preset threshold, a level 1 alarm is triggered immediately. The hydrogen threshold is 100ppm, the acetylene threshold is 5ppm, and the carbon monoxide threshold is 350ppm. A level 2 alarm is triggered when the concentrations of three or more gases reach 50% of the threshold at the same time and persist for 30 minutes; The alarm information is uploaded to the cloud platform through the wireless network module, and a diagnostic report including index trend forecast is generated.

9. The method for online detection of gas in transformer oil based on photoacoustic spectroscopy self-calibration according to claim 1, characterized in that: Also includes system self-test function: The laser power is automatically detected at zero o'clock every day, and the backup laser source is switched when the power deviation exceeds ±5%; The light spot position deviation is monitored weekly by a CCD camera. When the deviation exceeds 50 microns, the piezoelectric ceramic adjuster is activated to correct the light path. Based on the signal-to-noise ratio, Q value and temperature drift rate parameters, a decision tree model is used to diagnose the fault types of laser aging, microphone failure or gas path blockage.

Citation Information

Patent Citations

  • Method for generating multivariate correction optical filter for SF6 gas leakage detection in closed space

    CN114117931A

  • Gas infrared cross detection system and detection method

    CN119269405A