Method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy
By employing attenuated total reflection terahertz time-domain spectroscopy and a PLS-SVR combined model, the complex preprocessing and long cycle issues of ethanol detection in insulating oil have been resolved, enabling rapid, simple, and sensitive ethanol detection, which is suitable for transformer condition assessment and fault early warning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-26
AI Technical Summary
Existing methods for detecting ethanol in insulating oil require complex pretreatment processes and have long analysis cycles, making it difficult to achieve rapid and convenient on-site testing.
By employing attenuated total reflection terahertz time-domain spectroscopy combined with a PLS-SVR hybrid model, a quantitative analysis model is constructed through sample preparation, spectral data acquisition, molecular dynamics simulation, and feature extraction to achieve rapid and accurate detection of ethanol concentration.
It enables rapid, simple, and sensitive ethanol detection, suitable for on-site monitoring, reduces operational complexity and cost, has ppm-level detection accuracy, and is non-destructive to samples, making it suitable for transformer condition assessment and fault early warning.
Smart Images

Figure CN122084564A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ethanol detection technology in oil, specifically a method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy. Background Technology
[0002] Currently, characterizing the aging state of transformer paper insulation mainly relies on indirect detection methods. The first method is based on the measurement of traditional electrical characteristic parameters, primarily including insulation resistance, partial discharge, and dielectric response tests to characterize transformer insulation properties. While these electrical characteristics can non-destructively monitor the state of solid insulation, their application in field transformers requires power outages and shutdowns, thus limiting their practical application. The second method involves monitoring chemical markers in the insulating oil. During long-term operation, oil-immersed transformers are subjected to a combination of electrical, thermal, mechanical, and environmental stresses, causing the insulating paper to gradually age and degrade. This process produces a series of characteristic products, including furfural, methanol, and ethanol, which dissolve in the insulating oil. Ethanol has been extensively studied and confirmed as a sensitive and stable marker reflecting the breakage of hemicellulose and cellulose backbone chains in the insulating paper. Therefore, accurate detection of the ethanol concentration in the insulating oil is of paramount engineering value for assessing the degree of polymerization of the internal insulating paper, predicting its remaining life, implementing condition-based maintenance, and preventing insulation failures.
[0003] Currently, the detection of ethanol in insulating oil mainly relies on laboratory chromatographic analysis techniques, such as gas chromatography-mass spectrometry (GC-MS). While this technique offers high accuracy and sensitivity, it suffers from several inherent drawbacks: firstly, sample pretreatment is complex, typically requiring headspace degassing or extraction, making the process cumbersome; secondly, the analysis cycle is long, often taking hours or even days from sampling to report generation, resulting in poor timeliness; and thirdly, the equipment is expensive and bulky, requiring specialized personnel for operation, making rapid detection at substation sites or online difficult. Therefore, there is an urgent need for an intelligent diagnostic method that combines multi-dimensional feature fusion capabilities with cross-domain adaptability to improve the accuracy and robustness of partial discharge monitoring. Summary of the Invention
[0004] The purpose of this invention is to provide a method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy, which solves the problems of complex pretreatment and long detection time in existing detection methods.
[0005] The technical solution adopted by this invention to solve its technical problem is: a method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy, comprising the following steps.
[0006] S1. Sample preparation.
[0007] S1.1 Collect insulating oil samples from oil-immersed transformers with different aging levels during field operation as basic samples, and determine the true concentrations of ethanol, furfural, and water in each basic sample, which will serve as the concentration benchmark for subsequent preparation of standard samples.
[0008] S1.2 Based on the ethanol concentration value measured in step S1.1, accurately prepare a series of insulating oil standard samples containing ethanol of varying concentrations to form a sample library.
[0009] S1.3 All prepared standard samples should be sealed and stored away from light to prevent ethanol evaporation or oil oxidation.
[0010] S2. Construct an attenuated total reflection terahertz spectral system and collect spectral data of standard samples.
[0011] The attenuated total reflection terahertz spectroscopy system includes a terahertz time-domain spectroscopy detection module and an attenuated total reflection ATR module.
[0012] S3. Perform preprocessing and feature extraction on the collected spectral data.
[0013] S3.1. Add the standard sample to the sample cell of the ATR module, ensuring that the liquid forms a uniform, bubble-free contact with the prism surface; perform multiple terahertz time-domain signal scans on each standard sample to obtain the original time-domain signal.
[0014] S3.2. Convert the acquired original time-domain signal into a frequency-domain spectrum through Fourier transform, and calculate the absorption coefficient, refractive index, and complex permittivity.
[0015] S3.3 Performs preprocessing on the acquired time-domain or frequency-domain signals for analysis.
[0016] S4. Theoretical analysis of ethanol terahertz response based on molecular dynamics simulation.
[0017] A molecular dynamics model incorporating ethanol molecules and an insulating oil-simulated environment was established. Based on the molecular dynamics model, the change of the total dipole moment M(t) of the system over time was calculated through simulation. Then, according to linear response theory, the Fourier transform of the autocorrelation function of the time derivative of the total dipole moment was performed to obtain the simulated dielectric loss spectrum or absorption coefficient α(ω) of ethanol in the terahertz band. In the formula, n(ω) is the refractive index; V is the system volume; β = 1 / kBT; ω is the angular frequency; c is the speed of light in vacuum; i is the imaginary unit; and t is the time delay. The total dipole moment vector at the origin of time. Let be the total dipole moment vector at time t. Based on the analysis results, the characteristic absorption peaks of ethanol molecules in the terahertz band are identified, and each characteristic absorption peak is assigned to a specific molecular vibrational or rotational mode, thereby determining the fingerprint characteristic frequency band for quantitative analysis.
[0018] S5. Construction of intelligent quantitative analysis combination model.
[0019] S5.1. Associate the spectral data of the standard sample after preprocessing obtained in step S3 with the actual ethanol concentration value measured in step S1 to construct a feature-concentration database, and perform Z-score standardization on all spectral feature variables.
[0020] S5.2 Establish the PLS-SVR combined model.
[0021] The PLS-SVR combined model is obtained by fusing the Partial Least Squares Regression (PLS) model and the Support Vector Regression (SVR) model. The predicted concentration of ethanol is obtained by adding the linear prediction result of PLS and the nonlinear compensation prediction result of SVR.
[0022] S6. Conduct testing applications under actual working conditions.
[0023] For insulating oil samples with unknown ethanol concentration, the same pretreatment as for standard samples is first performed. Then, the attenuated total reflection terahertz spectral system constructed in step S2 is used to collect terahertz spectral data according to the procedure in step S3, and the same pretreatment and environmental recording are performed. Finally, the processed spectral data is input into the PLS-SVR combined model constructed in step S5 to output the predicted value of ethanol concentration in the insulating oil sample.
[0024] Furthermore, the sample library contains samples with different concentrations of background interference.
[0025] Furthermore, the ATR module includes a high-refractive-index prism made of high-resistivity silicon crystal material. Based on the prism's refractive index n1 and the refractive index n2 of the insulating oil under test, the critical angle θ for total internal reflection is calculated. c , Adjust the terahertz beam incident angle θ to make θ greater than θ c This ensures total internal reflection at the prism-oil sample interface, generating an evanescent wave with extremely shallow penetration depth; the evanescent wave penetration depth d p Defined as the depth at which the evanescent wave field intensity drops to 1 / e. In the formula, λ represents the wavelength of the terahertz wave. During detection, ensure the thickness of the detection liquid is greater than the evanescent wave penetration depth. Integrate a nitrogen purging device in the sample detection area of the ATR model, continuously introducing dry nitrogen to eliminate the strong absorption interference of water vapor in the air on the terahertz waves. A high-precision temperature and humidity sensor is integrated into the probe of the ATR model. Data acquisition from the high-precision temperature and humidity sensor is synchronized with the terahertz spectral scanning system, attaching precise environmental parameter labels to each spectral data point to provide a basis for subsequent data compensation and correction.
[0026] Furthermore, before performing terahertz spectroscopy, each standard sample was subjected to ultrasonic homogenization to ensure that ethanol molecules were evenly distributed in the insulating oil.
[0027] Furthermore, a standard sample set of insulating oil covering a wide range of ethanol concentrations and including different background interference concentrations was prepared. All samples were scanned using a terahertz time-domain spectroscopy system with an integrated ATR module, acquiring raw time-domain signals. Through data processing, the signal of each sample was converted into the absorption coefficient spectrum, refractive index spectrum, and complex permittivity spectrum in the frequency domain. Simultaneously, synchronously recorded temperature and humidity data were used for real-time compensation and correction of each spectrum, ultimately generating a multi-dimensional spectral feature database that corresponds one-to-one with the actual ethanol concentration of the samples and is environmentally normalized. To avoid the adverse effects of dimensional differences on the model, all feature variables in the spectral database were standardized using Z-score standardization, ensuring that the mean of each feature dimension is 0 and the variance is 1.
[0028] Furthermore, in step S3.3, the preprocessing includes averaging multiple scans to improve the signal-to-noise ratio, synchronously acquiring temperature and humidity data, performing environmental normalization compensation on the spectrum, eliminating the influence of environmental fluctuations on the detection results, and using appropriate digital filtering algorithms to smooth the spectrum, reduce random noise and baseline drift.
[0029] Furthermore, using standardized spectral data as independent variables and ethanol concentration detected in standard samples as dependent variables, a partial least squares regression (PLS) model was employed. Component extraction was performed simultaneously in both the independent and dependent variable spaces to identify the direction that best explains the variation in the dependent variable. A set of latent variables that best characterize the relationship between spectrum and concentration was obtained, and a linear regression relationship between the latent spectral variables and ethanol concentration was established, resulting in a preliminary linear prediction model. By analyzing the residual matrix of the PLS model, data that the linear prediction model failed to fully explain was preliminarily identified and used as the optimization compensation part of the subsequent algorithm.
[0030] Furthermore, the prediction residuals of the partial least squares regression (PLS) model are used as new learning targets. The support vector regression (SVR) algorithm is adopted, and the latent variables extracted by PLS are used as input features to model the residuals. SVR maps the data to a high-dimensional feature space through a kernel function, constructs the optimal regression hyperplane in this space, efficiently handles the nonlinear relationship that may exist between the spectrum and concentration, and builds a nonlinear compensation model.
[0031] Furthermore, the characteristic absorption frequency bands of ethanol determined by the molecular dynamics model in step S4 are compared and mapped with the spectral variables or SVR input features with high PLS model loading. In the feature selection or model weighting stage, these characteristic frequency bands are preferentially retained or given higher weights, thereby embedding the physical response characteristics of ethanol molecules into the data-driven model and enhancing the model's specificity and interpretability for ethanol detection.
[0032] Furthermore, the standard sample set is randomly divided into a training set and an independent test set. Using the training set, cross-validation optimization is performed on the number of latent variables in PLS, the penalty coefficient C of SVR, and the kernel parameter γ through grid search or Bayesian optimization methods to minimize the prediction error. The optimized model is then used to predict the test set samples, and the root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination (R²) are calculated to comprehensively evaluate the quantitative prediction accuracy, precision, and robustness of the model.
[0033] The beneficial effects of this invention are: (1) Rapid detection, suitable for on-site monitoring: It eliminates the cumbersome sample pretreatment process of traditional chromatography, and only takes a few minutes from sampling to obtaining results, which has the potential for rapid on-site detection. The system can be designed as a portable device and can be used directly next to the transformer. (2) Simple operation and low personnel requirements: The oil sample only needs to be added to the sample cell of the ATR module for measurement, which greatly simplifies the operation process and reduces the requirements for the professional skills of the operators. (3) High sensitivity and accurate quantification: Terahertz spectroscopy has unique sensitivity to polar molecules such as ethanol. The signal is enhanced by combining ATR technology, and a quantitative model is established through advanced combination algorithms, which can realize the accurate measurement of ppm-level trace amounts of ethanol. (4) Non-destructive detection and low sample requirements: The detection process only requires microliter-level oil samples and does not cause any chemical or physical damage to the samples. The samples can be recovered or used for other detections. (5) Low operating cost: It does not require expensive carrier gas and chromatographic columns and other consumables. The long-term use cost is much lower than that of gas chromatography-mass spectrometry (GC-MS). (6) Good selectivity: By selecting the characteristic absorption peak of ethanol in the terahertz band for modeling, the interference of other components in the insulating oil can be effectively eliminated. Attached Figure Description
[0034] Figure 1 This is a flowchart illustrating the prediction implementation based on the PLS-SVR combined model. Detailed Implementation
[0035] Terahertz waves, located between microwaves and infrared radiation, are highly sensitive to the collective vibrational and rotational modes of many organic molecules, especially polar molecules, exhibiting unique fingerprint spectral characteristics. Simultaneously, terahertz waves possess excellent penetrability to most non-polar dielectric materials. Therefore, terahertz time-domain spectroscopy, as an emerging non-destructive and non-contact detection method, shows great potential in substance identification and quantitative analysis.
[0036] This invention fills the gap in the rapid and convenient detection of trace amounts of ethanol in insulating oil. It successfully combines the advantages of terahertz time-domain spectroscopy (THz-TDS) with attenuated total reflectance (ATR) technology for detecting molecules with strong absorption polarity, realizing the quantitative conversion from ethanol spectral data detection to content concentration. This provides a powerful on-site detection tool for transformer condition assessment and fault early warning, and has important engineering application value for the safe and stable operation of power systems.
[0037] This invention relates to a method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy, comprising the following steps.
[0038] S1. Sample preparation.
[0039] S1.1. Insulating oil samples from oil-immersed transformers at different aging stages during field operation were collected as basic samples. Gas chromatography-mass spectrometry (GC-MS) was used to accurately determine the true concentrations of ethanol, furfural, and water in each basic sample, which were then used as the concentration benchmarks for subsequent preparation of standard samples.
[0040] S1.2 Under laboratory conditions, based on the measured ethanol concentration values, accurately prepare a series of insulating oil standard samples containing ethanol of varying concentrations to form a sample library. The sample library should cover a wide range from low to high concentrations, obtaining standard sample libraries for various concentration gradient combinations to simulate the entire aging process of transformers from early to deep aging. Simultaneously, to improve the robustness of the model, the sample library should also include samples with different concentrations of background interferences, such as trace amounts of moisture and furfural.
[0041] S1.3. All prepared standard samples should be sealed and stored in a light-proof environment to prevent ethanol evaporation or oil oxidation. Before terahertz spectroscopy detection, each standard sample should be ultrasonically homogenized to ensure that ethanol molecules are uniformly distributed in the insulating oil, thereby improving the accuracy of terahertz spectroscopy detection.
[0042] S2. Acquire spectral data of standard samples using an attenuated total reflection terahertz spectral system.
[0043] The attenuated total internal reflection (ATR) terahertz spectroscopy system comprises a terahertz time-domain spectroscopy detection module and an attenuated total internal reflection (ATR) module. The core of the ATR module is a high-refractive-index prism made of high-resistivity silicon crystal material. The critical angle θ for total internal reflection is calculated based on the prism's refractive index n1 and the refractive index n2 of the insulating oil under test. c , Adjust the terahertz beam incident angle θ to make θ greater than θ c This ensures total internal reflection at the prism-oil sample interface, generating an evanescent wave with extremely shallow penetration depth. The evanescent wave penetration depth d p Defined as the depth at which the evanescent wave field intensity drops to 1 / e. In the formula, λ is the wavelength of the terahertz wave. During detection, the thickness of the detection liquid should be greater than the evanescent wave penetration depth to ensure sufficient evanescent wave effect. A nitrogen purging device is integrated into the ATR sample detection area, continuously introducing dry nitrogen to eliminate the strong absorption interference of water vapor in the air on the terahertz waves. A high-precision temperature and humidity sensor is integrated into the ATR probe. The data acquisition of the high-precision temperature and humidity sensor is synchronized with the terahertz spectral scanning system, attaching precise environmental parameter labels to each spectral data point to provide a basis for subsequent data compensation and correction.
[0044] S3. Perform preprocessing and feature extraction on the collected spectral data.
[0045] S3.1. Add the standard sample to the sample cell of the ATR module, ensuring that the liquid forms a uniform, bubble-free contact with the prism surface. Perform multiple terahertz time-domain signal scans on each standard sample to obtain the original time-domain signal.
[0046] S3.2. Convert the acquired original time-domain signal into a frequency-domain spectrum through Fourier transform, and calculate the absorption coefficient, refractive index, and complex permittivity.
[0047] S3.3 performs preprocessing on the acquired time-domain or frequency-domain signals, including averaging multiple scans to improve the signal-to-noise ratio, synchronously acquiring temperature and humidity data, performing environmental normalization compensation on the spectrum, eliminating the impact of environmental fluctuations on the detection results, and using appropriate digital filtering algorithms to smooth the spectrum, reduce random noise and baseline drift.
[0048] S4. Theoretical analysis of ethanol terahertz response based on molecular dynamics simulation.
[0049] A molecular dynamics model incorporating ethanol molecules and an insulating oil-simulated environment was established. Based on the molecular dynamics model, the change of the total dipole moment M(t) of the system over time was calculated through simulation. Then, according to linear response theory, the Fourier transform of the autocorrelation function of the time derivative of the total dipole moment was performed to obtain the simulated dielectric loss spectrum or absorption coefficient α(ω) of ethanol in the terahertz band. In the formula, n(ω) is the refractive index; V is the system volume; β = 1 / kBT; ω is the angular frequency; c is the speed of light in vacuum; i is the imaginary unit; and t is the time delay. The total dipole moment vector at the origin of time; Let be the total dipole moment vector at time t.
[0050] By combining the analysis and simulation results, the characteristic absorption peaks of ethanol molecules in the terahertz band were identified, and each characteristic absorption peak was assigned to a specific molecular vibration or rotation mode, such as hydrogen bond network relaxation and OH bending, thereby determining the fingerprint characteristic frequency band for quantitative analysis.
[0051] S5. Construction, optimization and verification of the combined intelligent quantitative analysis model.
[0052] This step is the core modeling stage of the entire detection method, aiming to transform the preprocessed and feature-enhanced terahertz spectral data into a high-precision, robust quantitative prediction model for the ethanol content in insulating oil. This invention employs a combined algorithm model of Partial Least Squares Regression (PLS) and Support Vector Regression (SVR), and deeply integrates the physical mechanism guidance provided by molecular dynamics simulations to construct a hybrid intelligent analysis model that combines linear interpretation and nonlinear fitting capabilities.
[0053] S5.1. Correlate the spectral data of the standard sample after preprocessing obtained in S3 with the actual ethanol concentration value measured in S1 to construct a feature-concentration database, and perform Z-score standardization on all spectral feature variables.
[0054] A systematic set of standard samples of insulating oil covering a wide range of ethanol concentrations and including different background interference concentrations was prepared. All samples were scanned using a terahertz time-domain spectroscopy system with an integrated ATR module to acquire raw time-domain signals. Through data processing, the signal of each sample was converted into frequency-domain absorption coefficient spectrum, refractive index spectrum, and complex permittivity spectrum. Simultaneously, synchronously recorded temperature and humidity data were used for real-time compensation and correction of each spectrum, ultimately generating a multi-dimensional spectral feature database that corresponds one-to-one with the actual ethanol concentration of the samples and is environmentally normalized. To avoid the adverse effects of dimensional differences on the model, all feature variables in the spectral database were standardized using Z-score standardization, ensuring that the mean of each feature dimension was 0 and the variance was 1.
[0055] S5.2 Establish the PLS-SVR combined model.
[0056] Using standardized spectral data as independent variables and ethanol concentration from standard samples as the dependent variable, a partial least squares regression (PLS) model was employed. Component extraction was performed simultaneously in both the independent and dependent variable spaces to identify directions that best explain the variation in the dependent variable. This yielded a set of latent variables that optimally characterize the relationship between spectral density and concentration. A linear regression relationship between these latent spectral variables and ethanol concentration was then established, resulting in a preliminary linear prediction model. Furthermore, analysis of the PLS model's residual matrix identified data that the linear model failed to adequately explain, which was then used as an optimization and compensation component for subsequent algorithms.
[0057] Using the prediction residuals of the Partial Least Squares Regression (PLS) model as a new learning objective, the Support Vector Regression (SVR) algorithm is employed. The latent variables extracted by PLS are used as input features to model the residuals. SVR maps the data to a high-dimensional feature space through a kernel function, constructing an optimal regression hyperplane in this space. This efficiently handles the potential nonlinear relationship between spectrum and concentration, thus building a nonlinear compensation model.
[0058] Finally, the PLS model and the SVR model are fused together, and the predicted value of ethanol concentration is obtained by adding the PLS linear prediction result and the SVR nonlinear compensation prediction result.
[0059] The characteristic absorption bands of ethanol determined by the molecular dynamics model of S4 are compared and mapped with spectral variables or SVR input features that have high loadings in the PLS model. During the feature selection or model weighting stage, these characteristic bands are preferentially retained or given higher weights, thereby embedding the physical response characteristics of ethanol molecules into the data-driven model and enhancing the model's specificity and interpretability for ethanol detection.
[0060] The model's performance was then evaluated. The standard sample set was randomly divided into a training set and an independent test set. Using the training set, cross-validation was performed to optimize the number of latent variables in PLS, the penalty coefficient C of SVR, and the kernel parameter γ through grid search or Bayesian optimization methods to minimize the prediction error. The optimized model was then used to predict the test set samples, and the root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination (R²) were calculated to comprehensively evaluate the model's quantitative prediction accuracy, precision, and robustness.
[0061] S6. Conduct testing applications under actual working conditions.
[0062] For field insulating oil samples with unknown ethanol concentrations, the same pretreatment as for standard samples is first performed. Then, using the system constructed in S2, terahertz spectral data is acquired following the procedure in S3, with the same pretreatment and environmental recording. Finally, the processed spectral data is input into the PLS-SVR quantitative analysis model constructed and optimized in S5, which directly outputs the predicted value of the ethanol concentration in the oil sample.
[0063] This invention enables rapid detection and is suitable for on-site monitoring. It eliminates the cumbersome sample pretreatment process of traditional chromatography, requiring only minutes from sampling to obtaining results, thus possessing the potential for rapid on-site detection. The system can be designed as a portable device for direct detection near a transformer. This invention is simple to operate and requires minimal personnel. Measurement is performed simply by adding the oil sample to the ATR module sample cell, greatly simplifying the process and reducing the need for specialized operator skills. This invention offers high sensitivity and accurate quantification: Terahertz spectroscopy has unique sensitivity to polar molecules such as ethanol. Combining ATR technology enhances the signal, and an advanced combined algorithm establishes a quantitative model, enabling precise measurement of trace amounts of ethanol down to the ppm level. This invention achieves non-destructive testing with low sample requirements; the detection process requires only microliters of oil sample and causes no chemical or physical damage to the sample, which can be recovered or used for other tests. This invention has low operating costs, eliminating the need for expensive carrier gases and chromatographic columns, resulting in long-term operating costs far lower than gas chromatography-mass spectrometry (GC-MS). The present invention has good selectivity. By selecting the characteristic absorption peak of ethanol in the terahertz band for modeling, the interference of other components in the insulating oil can be effectively eliminated.
Claims
1. A method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy, characterized in that, Includes the following steps: S1. Sample preparation; S1.1 Collect insulating oil samples from oil-immersed transformers with different aging levels during field operation as basic samples, and determine the true concentrations of ethanol, furfural, and water in each basic sample, which will serve as the concentration benchmark for subsequent preparation of standard samples. S1.2 Based on the ethanol concentration value measured in step S1.1, accurately prepare a series of insulating oil standard samples containing ethanol of varying concentrations to form a sample library. S1.
3. The prepared standard samples should be sealed and stored in a light-proof container. S2. Construct an attenuated total reflection terahertz spectroscopy system, including a terahertz time-domain spectroscopy detection module and an attenuated total reflection ATR module, and collect spectral data of standard samples. S3. Perform preprocessing and feature extraction on the collected spectral data; S3.
1. Add the standard sample to the sample cell of the ATR module, ensuring that the liquid forms a uniform, bubble-free contact with the prism surface; perform multiple terahertz time-domain signal scans on each standard sample to obtain the original time-domain signal; S3.
2. Convert the acquired raw time-domain signal into a frequency-domain spectrum using Fourier transform, and calculate the absorption coefficient, refractive index, and complex permittivity. S3.3 Perform preprocessing on the acquired time-domain or frequency-domain signals for analysis; S4. Theoretical analysis of ethanol terahertz response based on molecular dynamics simulation; A molecular dynamics model containing ethanol molecules and insulating oil simulated environment was established. Based on the molecular dynamics model, the change of the total dipole moment M(t) of the system with time was calculated by simulation. Based on the linear response theory, the Fourier transform of the autocorrelation function of the time derivative of the total dipole moment was used to obtain the simulated dielectric loss spectrum or absorption coefficient α(ω) of ethanol in the terahertz band. In the formula, n(ω) is the refractive index; V is the system volume; β = 1 / kBT; ω is the angular frequency; c is the speed of light in vacuum; i is the imaginary unit; and t is the time delay. The total dipole moment vector at the origin of time; The total dipole moment vector is given by time t. Based on the analysis results, the characteristic absorption peaks of ethanol molecules in the terahertz band are identified, and each characteristic absorption peak is assigned to a specific molecular vibration or rotation mode, thereby determining the fingerprint characteristic frequency band for quantitative analysis. S5. Construction of intelligent quantitative analysis combination model; S5.
1. Associate the spectral data of the standard sample after preprocessing obtained in step S3 with the actual ethanol concentration value measured in step S1 to construct a feature-concentration database, and perform Z-score normalization on all spectral feature variables. S5.2 Establish the PLS-SVR combined model; The PLS-SVR combined model is obtained by fusing the Partial Least Squares Regression (PLS) model and the Support Vector Regression (SVR) model. The predicted concentration of ethanol is obtained by adding the linear prediction result of PLS and the nonlinear compensation prediction result of SVR. S6. Conduct testing applications under actual working conditions; For insulating oil samples with unknown ethanol concentration, the same pretreatment as for standard samples is first performed. Then, the attenuated total reflection terahertz spectral system constructed in step S2 is used to collect terahertz spectral data according to the procedure in step S3, and the same pretreatment and environmental recording are performed. Finally, the processed spectral data is input into the PLS-SVR combined model constructed in step S5 to output the predicted value of ethanol concentration in the insulating oil sample.
2. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 1, characterized in that, In step S1.2, the sample library contains samples containing different concentrations of background interference.
3. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 2, characterized in that, In step S3.1, the ATR module includes a high-refractive-index prism made of high-resistivity silicon crystal material. Based on the prism's refractive index n1 and the refractive index n2 of the insulating oil to be tested, the critical angle θ for total internal reflection is calculated. c , Adjust the terahertz beam incident angle θ to make θ greater than θ c This ensures total internal reflection at the prism-oil sample interface, generating an evanescent wave with extremely shallow penetration depth; the evanescent wave penetration depth d p Defined as the depth at which the evanescent wave field intensity drops to 1 / e. ; where λ is the wavelength of the terahertz wave; during detection, ensure that the thickness of the detection liquid is greater than the evanescent wave penetration depth, integrate a nitrogen purging device in the sample detection area of the ATR model, continuously introduce dry nitrogen gas to eliminate the strong absorption interference of water vapor in the air on the terahertz wave. A high-precision temperature and humidity sensor is integrated into the probe of the ATR model. The data acquisition of the high-precision temperature and humidity sensor is synchronized with the terahertz spectral scanning system, and precise environmental parameter labels are attached to each spectral data to provide a basis for subsequent data compensation and correction.
4. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 3, characterized in that, In step S3.1, before performing terahertz spectroscopy detection, each standard sample is subjected to ultrasonic homogenization to ensure that ethanol molecules are uniformly distributed in the insulating oil.
5. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 4, characterized in that, In step S3.1, a terahertz time-domain spectroscopy system with an integrated ATR module is used to scan all samples and acquire raw time-domain signals. Through data processing, the signal of each sample is converted into the absorption coefficient spectrum, refractive index spectrum, and complex permittivity spectrum in the frequency domain. At the same time, the temperature and humidity data recorded synchronously are used to perform real-time compensation and correction on each spectrum, and finally generate a multi-dimensional spectral feature database that corresponds one-to-one with the true ethanol concentration of the sample and is normalized to the environment. All feature variables in the spectral database are standardized using Z-score standardization, which makes the mean of each feature dimension 0 and the variance 1.
6. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 5, characterized in that, In step S3.3, the preprocessing includes averaging multiple scans to improve the signal-to-noise ratio, synchronously acquiring temperature and humidity data, performing environmental normalization compensation on the spectrum, eliminating the influence of environmental fluctuations on the detection results, and using appropriate digital filtering algorithms to smooth the spectrum, reduce random noise and baseline drift.
7. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 6, characterized in that, Standardized spectral data were used as independent variables, and the ethanol concentration detected in standard samples was used as the dependent variable. A partial least squares regression (PLS) model was employed to extract components simultaneously from both the independent and dependent variable spaces, seeking the direction that best explains the variation in the dependent variable. A set of latent variables that best characterize the relationship between spectrum and concentration was obtained, and a linear regression relationship between the latent spectral variables and ethanol concentration was established to obtain a preliminary linear prediction model. By analyzing the residual matrix of the PLS model, data that the linear prediction model failed to fully explain were preliminarily identified and used as the optimization compensation part of the subsequent algorithm.
8. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 7, characterized in that, The prediction residuals of the partial least squares regression (PLS) model are used as the new learning objective. The support vector regression (SVR) algorithm is adopted, and the latent variables extracted by PLS are used as input features to model the residuals. SVR maps the data to a high-dimensional feature space through a kernel function, constructs the optimal regression hyperplane in this space, and builds a nonlinear compensation model.
9. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 8, characterized in that, The characteristic absorption bands of ethanol determined by the molecular dynamics model in step S4 are compared and mapped with the spectral variables or SVR input features with high PLS model loading. In the feature selection or model weighting stage, these characteristic bands are preferentially retained or given higher weights, thereby embedding the physical response characteristics of ethanol molecules into the data-driven model and enhancing the model's specificity and interpretability for ethanol detection.
10. The method for detecting ethanol in insulating oil based on attenuated total reflection terahertz time-domain spectroscopy according to claim 9, characterized in that, The standard sample set is randomly divided into a training set and an independent test set. Using the training set, cross-validation optimization is performed on the number of latent variables in PLS, the penalty coefficient C of SVR, and the kernel parameter γ through grid search or Bayesian optimization methods to minimize the prediction error. The optimized model is then used to predict the test set samples, and the root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination (R²) are calculated to comprehensively evaluate the quantitative prediction accuracy, precision, and robustness of the model.