Hyperspectral fast detection method for impurities in electric power system liquid
By combining whiteboard calibration and adaptive multi-scale noise correction model, the noise removal problem in impurity detection in the power system liquid is solved, efficient and accurate impurity detection is achieved, and detection accuracy and system stability are improved.
Patent Information
- Application Number
- CN202510392424.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art is inefficient and insufficient in detection of impurities in power system liquids, and it is difficult to effectively remove background noise in spectral data, affecting detection quality.
A hyperspectral quick detection method combining whiteboard calibration and adaptive multi-scale noise correction model is adopted. The adaptive multi-scale noise correction model and whiteboard calibration are combined to remove background noise, and impurity detection is performed using a multi-model integrated hyperspectral detection model.
It significantly improves detection accuracy and robustness, can better adapt to noise changes in different environments, and enhances the stability of the system and detection accuracy.
Smart Images

Figure CN120253718A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of impurity detection in liquids of power systems, and particularly to a hyperspectral rapid detection method for impurities in liquids of power systems. Background Art
[0002] During the operation of modern power equipment, key liquids such as coolant, transformer oil, and water play a crucial role. They must possess high insulation, high thermal stability, and good chemical stability to ensure safe and effective operation in the power system. However, with the long-term operation of the equipment, impurities such as carbon, iron, copper, and tin may mix into these liquids. These impurities may originate from mechanical wear, corrosion, decomposition of insulating materials, or environmental pollution. Therefore, developing a technology that can detect impurities in these liquids promptly and accurately is crucial for ensuring the safe operation of power equipment. Traditional detection methods have problems such as low efficiency and insufficient accuracy. Hyperspectral imaging technology provides a new detection means with its high spectral resolution and spatial resolution, and the application of machine learning methods further enhances the data processing ability.
[0003] Chinese Patent Application No. CN118392731A discloses an on-line detection system and method for impurity particles in transformer oil, including controlling a sampling device in a host computer to sample from a transformer oil tank, mixing the obtained oil samples, and pumping them into an oil particle detection device; the transformer oil particle detection system detects the oil samples, and the obtained results after detection will be sent to the host computer in real time. Although it has the characteristics of high detection accuracy, and can obtain characteristic information such as the particle size and concentration distribution of impurity particles in transformer oil in real time, and is particularly suitable for the detection and maintenance of power equipment. However, there are practical problems such as complex device, high operation difficulty, and high detection cost.
[0004] In addition, when obtaining spectral data in the prior art, due to the complex background noise of the obtained original data, the background noise cannot be accurately removed, resulting in poor data quality. Summary of the Invention
[0005] The purpose of the present invention is to provide a hyperspectral rapid detection method for impurities in liquids of power systems to improve the quality of spectral data in the hyperspectral detection process of impurities in liquids of power systems.
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] A hyperspectral rapid detection method for impurities in liquids of power systems, the method comprising the following steps:
[0008] S1. Perform spectral scanning on the liquid in the power system and the liquid mixture containing impurities, and capture the spectral images of the liquid samples at different wavelengths;
[0009] S2. Select the region of interest (ROI) from the spectral image, and use a method combining an adaptive multi-scale noise correction model and whiteboard calibration to remove the background noise in the ROI, generating a denoised spectral image, and calculate the reflectance of the denoised spectral image;
[0010] S3. Filter the denoised spectral image, and input the wavelength and reflectance of the filtered image into a hyperspectral detection model integrated with multiple models to obtain the detection result.
[0011] Further, the specific steps of using a method combining an adaptive multi-scale noise correction model and whiteboard calibration to remove the background noise in the ROI are as follows:
[0012] Set up a calibration whiteboard, use a hyperspectral camera to collect the spectral image of the whiteboard, and simultaneously obtain a dark reference image;
[0013] Calculate the calibration coefficient for each pixel in the ROI;
[0014] Calibrate the ROI using the calibration coefficient to obtain a calibrated image;
[0015] Input the calibrated image into the adaptive multi-scale noise correction model. The adaptive multi-scale noise correction model performs multi-scale decomposition on the calibrated image. Each scale corresponds to signals and noises of different frequencies. Then, according to the signal intensity of each scale, set the adaptive allocation weights, and simultaneously extract the background noise characteristics and model to obtain the noise distribution, and remove the background noise from the image of each scale to obtain a denoised spectral image.
[0016] Further, the calibration coefficient is:
[0017]
[0018] where x, y, and λ represent the x-axis, y-axis coordinates, and wavelength respectively, R white represents the reflectance of the calibration whiteboard, and I white represents the spectral image of the whiteboard.
[0019] Further, the calibrated image is:
[0020] I calibrated (x,y,λ) = [I sample (x,y,λ) - I dark (x,y,λ)] × C(x,y,λ)
[0021] where I calibrated (x,y,λ) represents the calibrated image, and I sample (x,y,λ) represents the ROI.
[0022] Furthermore, the images of each scale in the denoised spectral image after denoising are as follows:
[0023] I' k (x, y, λ) = I k (x, y, λ) - ω k (x, y, λ) × N k (x, y, λ)
[0024] Among them, I k (x, y, λ) represents the image of each scale, ω k (x, y, λ) represents the adaptively allocated weight, N k (x, y, λ) represents the noise distribution.
[0025] Furthermore, the reflectance of the denoised spectral image is:
[0026]
[0027] Among them, R white represents the reflectance of the calibration whiteboard. I'(x, y, λ) represents the denoised spectral image, which is composed of the images of each scale after denoising.
[0028] Furthermore, the training process of the multi-model integrated hyperspectral detection model is as follows:
[0029] Obtain the basic models, and each model is independently trained to generate spectral prediction results, and the spectral prediction results are used as input features;
[0030] Based on the input features, train and validate an integrated model obtained by weighted averaging all the basic models. The integrated model after training and validation is used as the multi-model integrated hyperspectral detection model, and the weights of each basic model are adjusted during the process of training the integrated model.
[0031] Furthermore, the prediction result of the integrated model is:
[0032]
[0033] Among them, is the final prediction result, f i (x) is the prediction result of the i-th basic model, α i is the dynamically adjusted weight, and N is the number of basic models.
[0034] Furthermore, the dynamically adjusted weight is:
[0035]
[0036] Among them, Score iis the validation score of the i-th base model on the validation set.
[0037] Furthermore, the filtering uses an adaptive dynamic Savitzky-Golay filtering algorithm.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention combines whiteboard calibration with an adaptive multi-scale noise correction model. The present invention can more accurately correct the systematic error of the hyperspectral camera and effectively remove complex background noise. Whiteboard calibration provides a more accurate data basis for subsequent noise removal, while the adaptive multi-scale noise correction model (AMNCM) further improves the data quality through multi-scale decomposition and adaptive weight allocation. This combined method not only enhances the robustness of the system, enabling it to better adapt to noise changes in different environments, but also significantly improves the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flowchart of the present invention;
[0041] Figure 2 is a schematic structural diagram of the hyperspectral rapid detection device of the present invention;
[0042] Wherein, 1, hyperspectral camera; 2, halogen lamp; 3, sample to be measured; 4, calibration whiteboard; 5, computer. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, and gives a detailed implementation manner and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0044] The present invention provides a hyperspectral rapid detection method for impurities in liquids in a power system. The flowchart is as Figure 1 shown, and the method includes the following steps:
[0045] S1. Perform spectral scanning on the liquid and the liquid mixture containing impurities in the power system to capture spectral images of the liquid sample at different wavelengths;
[0046] S2. Select the region of interest in the spectral image, and use a method combining an adaptive multi-scale noise correction model and whiteboard calibration to remove the background noise in the region of interest, generate a denoised spectral image, and calculate the reflectance of the denoised spectral image;
[0047] S3. Filter the denoised spectral image, and input the wavelength and reflectivity of the filtered image into the hyperspectral detection model integrated with multiple models to obtain the detection result.
[0048] The present invention uses a hyperspectral imaging device to perform spectral scanning on liquids and liquid mixtures containing impurities in a power system, capture the spectral images of liquid samples, so as to obtain their reflection or transmission spectral information at different wavelengths.
[0049] Input the obtained hyperspectral data into a pre-trained machine learning model for analysis. This model may include but is not limited to advanced algorithms such as gradient boosting trees, support vector machines, random forests, extra trees, and neural networks. These algorithms can identify and extract impurity-related features from the hyperspectral data, and classify the impurities in the liquid sample according to these features.
[0050] The process of device selection and preparation before obtaining liquid hyperspectral information includes the following steps: Before obtaining the sample image, the ambient lighting is turned off. Two 100-watt halogen lamps are used as light sources. The spectral range of the hyperspectral camera is set to 400 - 1000 nm, the spectral resolution is 2.5 nm, the image resolution is 1920×1920, and the pixel size is set to 5.86 nm×5.86 nm.
[0051] Spectral image pixel and region of interest selection: Manually select the region of interest (ROI) in each hyperspectral image using the spectral analysis software ENVI. The size of each ROI is 5×5 pixels.
[0052] After capturing the hyperspectral image, normalization processing is required to eliminate the influence of non-target factors such as instrument noise and light scattering. This step removes noise from the image and converts the data to relative values using the 100% reflectivity of the white reference, and sets the reflectivity of the white reference to 90% (R white ). The dark reference is obtained by turning off the light source and completely covering the camera lens.
[0053] The present invention proposes a method combining an Adaptive Multi-scale Noise Correction Model (AMNCM) with whiteboard calibration. This method eliminates systematic errors through whiteboard calibration and uses AMNCM to remove complex background noise, thereby achieving more accurate spectral data processing.
[0054] Prepare a calibration whiteboard with a known reflectivity (usually 90%), and use the hyperspectral camera to collect the spectral image I white (x, y, λ) of the whiteboard. At the same time, turn off the light source and completely cover the camera lens to collect the dark reference image I dark(x, y, λ), according to the known reflectivity R of the whiteboard white , calculate the calibration coefficient C(x, y, λ) for each pixel, and its calculation formula is:
[0055]
[0056] Subsequently, under the same experimental conditions, collect the spectral image I of the liquid sample to be measured sample (x, y, λ), use the above calibration coefficient to calibrate the sample spectral data, and obtain the calibrated spectral image I calibrated (x, y, λ), and its calculation formula is:
[0057] I calibrated (x, y, λ) = [I sample (x, y, λ) - I dark (x, y, λ)] × C(x, y, λ)
[0058] After calibration, input the calibrated spectral image I calibrated (x, y, λ) into the adaptive multi-scale noise correction model. First, perform multi-scale decomposition on the calibrated spectral image, and decompose it into multiple scales I k (x, y, λ), and each scale corresponds to signals and noises of different frequencies. Then, according to the signal intensity of each scale, adaptively assign weights ω k (x, y, λ) to balance signal retention and noise suppression. At the same time, extract the background noise characteristics and model them to obtain the noise distribution N k (x, y, λ). Based on this, remove the noise from the image of each scale to obtain the denoised image I' k (x, y, λ), and its calculation formula is:
[0059] I' k (x, y, λ) = I k (x, y, λ) - ω k (x, y, λ) × N k (x, y, λ)
[0060] Finally, use the denoised spectral image I' k (x, y, λ) to calculate the reflectivity R(x, y, λ) of the sample. The calculation formula of the reflectivity is:
[0061]
[0062] By combining whiteboard calibration with an adaptive multiscale noise correction model, the present invention can more accurately correct the systematic error of the spectral camera and effectively remove complex background noise. Whiteboard calibration provides a more accurate data basis for subsequent noise removal, while AMNCM further improves data quality through multiscale decomposition and adaptive weight allocation. This combined method not only enhances the robustness of the system, enabling it to better adapt to noise changes in different environments, but also significantly improves detection accuracy. Experimental results show that after combining whiteboard calibration and AMNCM, the signal-to-noise ratio of the final image is significantly improved, and the accuracy of impurity detection is also greatly improved.
[0063] The present invention proposes a hyperspectral rapid detection method for impurities in liquids in power systems and an adaptive dynamic Savitzky-Golay filter algorithm (ADSGF). By dynamically adjusting the window size, the adaptive polynomial order and the introduction of wavelet transform preprocessing, the filtering effect and signal fidelity are significantly improved.
[0064] Traditional SG filtering smoothes the data by fitting a local polynomial to the spectral data. Improvements have been made in the following aspects.
[0065] (1) The ADSGF algorithm introduces wavelet transform preprocessing. Wavelet transform can effectively remove high-frequency noise while retaining the edge characteristics of the signal and avoiding over-smoothing. Specifically, the original spectral data is subjected to wavelet transform, and the appropriate wavelet basis and decomposition level are selected. High-frequency noise is removed by threshold processing, and then the processed data is subjected to inverse wavelet transform to obtain the preprocessed spectral data. This preprocessing step provides a higher quality data foundation for subsequent SG filtering.
[0066] (2) The ADSGF algorithm implements dynamic window adjustment. The size of the filter window is dynamically adjusted according to the local characteristics of the spectral data. For areas with drastic signal changes, a smaller window is used to retain more details; for smooth areas, a larger window is used to enhance the smoothing effect.
[0067] (3) The ADSGF algorithm also introduces an adaptive polynomial order. The order of the polynomial fitting is adaptively selected according to the complexity of the local signal. For complex spectral signals, a high-order polynomial fitting is used; for simple signals, a low-order polynomial is used. This adaptive strategy can better preserve the characteristics of the signal while smoothing the noise and avoid signal distortion caused by over-smoothing.
[0068] Through the above improvements, the ADSGF algorithm significantly improves the noise suppression capability while retaining the signal characteristics.
[0069] ADSGF can better preserve the edge features and detail information of the signal, avoiding the over-smoothing problem that may be caused by traditional SG filtering. In subsequent impurity detection, using the data processed by ADSGF, the detection accuracy has increased from 85% to 95%, indicating that the improved filtering algorithm has significantly improved the data quality and provided a more reliable basis for subsequent analysis.
[0070] Based on the spectral data and data analysis results, the present invention establishes a detection model that can predict the types of impurities contained in the coolant according to the spectral characteristics of the coolant. First, 13 machine learning models, such as KNN, LightGBM, RandomForest, CatBoost, NeuralNet, etc., are used as the primary (M1) models, and independent training and testing are carried out on each model to obtain the results of key evaluation indicators, including validation scores, training running times, and validation running times, etc., to ensure that the performance of the model reaches the optimal. To ensure the stability and reproducibility of the analysis process, all model construction and analysis work are carried out in an environment based on the Linux operating system.
[0071] To achieve precise detection of impurity particles in a liquid, the model is a detection model with wavelength and reflectivity as inputs and the category of the impurity mixed solution as the output. In the data conversion process, the wavelength and reflectivity in the spectral data are used as the input features of the model first. These features comprehensively reflect the spectral characteristics of the solution sample and provide the necessary information for the model to identify and classify different impurities. Using this detection model, the solution sample can be classified to evaluate the types of impurities it contains.
[0072] In the detection of liquid impurities in a power system, a single machine learning model often has difficulty in simultaneously meeting the requirements of high precision, strong generalization ability, and efficient calculation. For this reason, a method based on multi-model integration is proposed. By combining 13 different machine learning algorithms, a weighted integration model is constructed to improve the detection accuracy and robustness. These basic models include SVM, KNeighborsDist, NeuralNetFastAI, LightGBMXT, XGBoost, RandomForestEntr, RandomForestGini, CatBoost, NeuralNetTorch, ExtraTreesEntr, ExtraTreesGini, LightGBM, LightGBMLarge, etc. To further optimize the integration effect, the present invention has made an innovative improvement to the integration strategy.
[0073] (1) Improvement of the integration strategy
[0074] In the model integration stage, the present invention adopts a hierarchical integration strategy, dividing the base models into two steps
[0075] M1: It includes 13 base models. Each model is independently trained and generates prediction results. These prediction results are saved as input features for subsequent integration steps.
[0076] M2: The prediction results of the M1 layer are used as input features to train a weighted average integration model. By evaluating the performance of the preliminary integration model on the validation set, the weights of each base model are dynamically adjusted. Finally, by continuously optimizing the weight allocation, the optimal integration model is found.
[0077] The formula for the hierarchical integration strategy is:
[0078]
[0079] where, is the final prediction result, f i (x) is the prediction result of the i-th base model, α i is the dynamically adjusted weight, and N is the number of base models.
[0080] To further optimize the performance of the integration model, a dynamic weight adjustment mechanism is introduced. In the L2 layer, the weight α i is not fixed, but is dynamically adjusted according to the performance of each base model on the validation set. Specifically, the weight α i is proportional to the validation score of the model. The higher the validation score of the model, the greater the weight assigned. The formula for dynamic weight adjustment is:
[0081]
[0082] where, Score i is the validation score of the i-th base model on the validation set.
[0083] By combining multiple different machine learning algorithms, the integration model can capture the features of the data from multiple perspectives, reduce the bias that may exist in a single model, and thus has more advantages in dealing with complex data. The dynamic weight adjustment mechanism automatically assigns weights according to the actual performance of each base model, enabling the integration model to more flexibly adapt to different data distributions. This adaptive mechanism not only improves the accuracy of the model but also enhances its robustness. The hierarchical integration strategy further optimizes the performance of the integration model by using the prediction results of the base models as input features. These methods not only make full use of the advantages of each base model but also reduce the computational complexity and improve the efficiency of the model.
[0084] The present invention acquires hyperspectral images of typical liquids in a power system, such as coolant, water, transformer oil, etc., and performs preprocessing to eliminate noise in the images.
[0085] Based on the spectral images, the region of interest is calibrated to obtain the spectral reflectance of the sample, and based on the spectral reflectance, the types of impurities in the coolant, water, and transformer oil are analyzed and inferred.
[0086] The process of acquiring spectral image information of coolant, water, and transformer oil under the illumination of a light source and performing reproduction processing includes the following steps:
[0087] A hyperspectral camera with a wavelength range of 400 - 1000 nm is selected to capture images of the liquid sample. Before shooting, the ambient lights are turned off, and two 100W halogen lamps are selected to simulate sunlight.
[0088] Before using the spectral image data of the sample for algorithm modeling, a filtering algorithm is used to preprocess the original spectral data of all hyperspectral images.
[0089] Before acquiring the hyperspectral image of each sample, the distance and intensity of the illumination light source are carefully adjusted to ensure the clarity of the image. The exposure time is set to 50 milliseconds to capture the best spectral information.
[0090] To achieve precise detection of impurity particles in the liquid, the model is a detection model with wavelength and reflectance as inputs and the category of the impurity mixed solution as the output. This method can effectively classify and evaluate solution samples containing different impurities. The data conversion process first takes the wavelength and reflectance in the spectral data as the input features of the model. These features comprehensively reflect the spectral characteristics of the solution sample, providing necessary information for our model to identify and classify different impurities. Using this detection model, the solution sample can be classified to evaluate the type of impurities it contains. This process is crucial for monitoring and maintaining the normal operation of power equipment.
[0091] Compared with the prior art, the present invention has the following advantages:
[0092] (1) It realizes the rapid detection and differentiation of impurity particles in coolant, water, and transformer oil. The integration of hyperspectral imaging technology in the power field highlights its potential in modern optical applications. The ability of hyperspectral imaging (HSI) to capture detailed spectral information at different wavelengths is crucial for maintaining the integrity of the power system, which is directly related to the purity of liquids such as coolants and transformer oils.
[0093] (2) The presence of impurities in the liquid can cause scattering, absorption, and other optical phenomena, thereby degrading the performance of the optical system. The research focus is on detecting impurities such as carbon, iron, copper, and tin, which can significantly affect the optical properties of the liquid used in power systems. Accurate and timely detection is crucial for maintaining the optical clarity and performance of these systems.
[0094] (3) Optical detection using high-resolution HSI. This non-invasive method allows for precise identification of impurities at the molecular level, providing a significant advancement over traditional methods in terms of accuracy and efficiency. The application of HSI in this regard is a new contribution to the field of optical detection technology.
[0095] (4) Achieve an innovative combination of HSI and machine learning algorithms for the optical analysis of impurities in the liquid of power systems. The synergy between advanced imaging and data analysis techniques represents an important step forward in the field of optical diagnostics, providing a more powerful framework for detecting and characterizing impurities that affect the performance of power equipment.
[0096] A hyperspectral rapid detection method for detecting impurities in the liquid of power systems is provided, which is applied to the hyperspectral detection system as Figure 2 described. Among them, the hyperspectral detection device includes, arranged in sequence along a straight line: 1. Hyperspectral camera; 2. Halogen lamp; 3. Sample to be measured; 4. Calibration whiteboard; 5. Computer. Compared with the traditional microscopic imaging device, the hyperspectral detection system does not rely on a light source of a single wavelength, but collects the spectral information of the sample at multiple wavelengths through a hyperspectral camera, thereby realizing a comprehensive analysis of the composition and characteristics of the sample. The working principle of the hyperspectral detection system is based on spectral imaging technology. This technology captures the reflected light or transmitted light of the sample at different wavelengths through a hyperspectral camera, combines the spectral information with the spatial information, and generates a hyperspectral data cube. Subsequently, the computer processes and analyzes the hyperspectral data to achieve rapid detection of the impurity components in the liquid of the power system. The hyperspectral detection technology has many advantages, including high spectral resolution, non-contact detection, rapid imaging, and high sensitivity to complex samples. Traditional detection methods usually rely on chemical analysis or spectral detection of a single wavelength, but these methods are not only time-consuming but also may be interfered by the complex composition of the sample. To solve this problem, in this embodiment, a halogen lamp is selected as the light source, and its continuous spectral characteristics can cover a wide wavelength range, providing a stable spectral basis for hyperspectral detection. At the same time, the system is spectrally calibrated through a calibration whiteboard to ensure the accuracy and reliability of the detection results. In addition, the hyperspectral detection system analyzes the collected spectral data through computer algorithms, and can effectively identify common impurity components in the liquid of power systems, such as carbon, iron, copper, and tin, etc., thereby providing strong technical support for the preventive maintenance of power equipment.
[0097] The hyperspectral camera used in this embodiment has a spectral range of 400 - 1000 nm, a spectral resolution of 2.5 nm, an image resolution of 1920×1920, and a pixel size of 5.86μm×5.86μm. As Figure 2 shown, in order to obtain a larger field of view and record as much sample information as possible, the distance L1 between the halogen light source and the sample to be measured and the distance L2 between the sample and the photosensitive surface of the hyperspectral camera need to satisfy a specific proportional relationship. In this embodiment, L1 >> L2, that is, the distance from the light source to the sample is much greater than the distance from the sample to the camera photosensitive surface, so as to ensure that the hyperspectral camera can uniformly collect the spectral information of the liquid samples in the power system within a larger field of view and ensure the imaging quality at the same time. The hyperspectral imaging detection method specifically includes the following steps:
[0098] Step S1: Prepare coolant, water, and transformer oil sample solutions;
[0099] Step S2: Set up the hyperspectral imaging system, turn off the ambient light source, and turn on the halogen lamp to evenly irradiate the sample. Before collecting the sample image, the exposure time is set to 50 milliseconds to capture the best spectral information;
[0100] Step S3: After collecting the hyperspectral image through the hyperspectral camera, perform standardization processing such as whiteboard calibration and SG smoothing on the hyperspectral image;
[0101] Specifically, step S3 includes the following sub - steps:
[0102] Step S31, spectral image standardization processing, is as follows:
[0103] Use the hyperspectral camera to collect the spectral image I white (x, y, λ) of the calibration whiteboard (reflectivity is 90%). At the same time, turn off the light source and completely block the camera lens, and collect the dark reference image I dark (x, y, λ). According to the known reflectivity R raw of the whiteboard, calculate the calibration coefficient C(x, y, λ) for each pixel, and its calculation formula is:
[0104]
[0105] Subsequently, under the same experimental conditions, collect the spectral image I sample (x, y, λ) of the liquid sample to be measured, and use the above - mentioned calibration coefficient to calibrate the sample spectral data to obtain the calibrated spectral image I calibrated (x, y, λ), and its calculation formula is:
[0106] I calibrated (x, y, λ) = [I sample (x, y, λ) - Idark (x, y, λ)] × C(x, y, λ)
[0107] After calibration, the calibrated spectral image I calibrated (x, y, λ) is input into the adaptive multi-scale noise correction model. First, the calibrated spectral image is decomposed at multiple scales into multiple scale I k (x, y, λ), where each scale corresponds to signals and noises of different frequencies. Then, according to the signal intensity of each scale, weights ω k (x, y, λ) are adaptively assigned to balance signal retention and noise suppression. At the same time, background noise features are extracted and modeled to obtain the noise distribution N k (x, y, λ). Based on this, noise is removed from the image of each scale to obtain the denoised image I' k (x, y, λ), and its calculation formula is:
[0108] I' k (x, y, λ) = I k (x, y, λ) - ω k (x, y, λ) × N k (x, y, λ)
[0109] Finally, the denoised spectral image I' k (x, y, λ) is used to calculate the reflectance R(x, y, λ) of the sample. The calculation formula of the reflectance is:
[0110]
[0111] Step S32, hyperspectral data preprocessing, is as follows:
[0112] Before analyzing the hyperspectral image data for detecting liquid impurities in the power system, the present invention uses an improved Savitzky-Golay (SG) filtering algorithm to preprocess the original spectral data to optimize the data quality and enhance the accuracy of subsequent analysis.
[0113] The improved algorithm first preprocesses the original spectral data by wavelet transform. By selecting appropriate wavelet bases and decomposition levels, the algorithm can effectively separate the high-frequency noise and low-frequency useful information in the signal. In the wavelet domain, high-frequency noise components are removed by setting thresholds, while the low-frequency part reflecting the essential characteristics of the signal is retained. After the inverse wavelet transform, the obtained spectral data significantly reduces the noise level while retaining the original signal characteristics, providing a higher-quality data basis for subsequent SG filtering.
[0114] In the SG filtering stage, the algorithm dynamically adjusts these parameter window sizes and polynomial orders according to the local characteristics of the spectral data. Specifically, the algorithm automatically adjusts the window size according to the degree of change of the local signal: in the area where the signal changes violently, the window size will be automatically reduced to avoid the loss of signal details caused by over-smoothing; while in the area where the signal is relatively smooth, the window size will be appropriately increased to enhance the noise suppression effect. At the same time, the algorithm adaptively selects the polynomial order according to the complexity of the local signal: a higher-order polynomial is used for fitting in the area where the signal is more complex to better capture the subtle changes of the signal; a lower-order polynomial is used in the area where the signal is relatively simple to reduce the computational complexity and avoid overfitting. This dynamic adjustment mechanism enables the improved SG filtering algorithm to achieve the best smoothing effect in different signal feature regions while maximizing the retention of the original features of the spectral data.
[0115] Step S33, hyperspectral data saving, is as follows:
[0116] After all the collected data are standardized, they are saved in CSV format for further analysis and model training.
[0117] Step S4: First, train each basic model. In the M1 stage, 13 different models were selected for training, including Logistic Regression, KNeighborsDist, LightGBMXT, XGBoost, RandomForestEntr, RandomForestGini, CatBoost, NeuralNetTorch, ExtraTreesEntr, ExtraTreesGini, LightGBM, LightGBMLarge, and Support Vector Machine (SVM). To further optimize the integration effect, the present invention makes an innovative improvement to the integration strategy and adopts a hierarchical integration strategy. In the first stage of model integration, that is, the M1 layer, it includes the above 13 basic models. Each model independently learns the training data and generates its own prediction results. These prediction results not only reflect the understanding and judgment of the data by each model, but also, due to the diversity of the models, can capture the information and laws in the data from multiple perspectives. These prediction results are then saved and used as input features for subsequent integration steps, providing a rich information basis for higher-level model fusion.
[0118] Enter the second stage of model integration, namely M2 layer. Use the prediction results generated by M1 layer as new input features to train a weighted average integration model. The core of this stage lies in dynamically adjusting the weights of each base model to optimize the performance of the entire integration model. Specifically, by evaluating the performance of the preliminary integration model on the validation set, the weights of each base model are dynamically adjusted according to its performance on the validation set. Models with better performance will be assigned higher weights, thus playing a greater role in the final decision-making; while models with relatively poor performance will be assigned lower weights to reduce their negative impact on the overall performance. This dynamic weight adjustment process is iterative. By continuously optimizing the weight allocation, the optimal weight configuration that makes the integration model perform best on the validation set is finally found, thereby constructing the final optimal integration model.
[0119] Step S5: Distinguish impurities in the liquid in the power system according to different spectral curves. The model is a detection model with wavelength and reflectivity as inputs and the category of impurity mixed solution as the output. This method can effectively classify and evaluate solution samples containing different impurities. In the data conversion process, the wavelength and reflectivity in the spectral data are first used as input features of the model. These features comprehensively reflect the spectral characteristics of the solution samples, providing necessary information for our model to identify and classify different impurities.
[0120] During the operation of modern power equipment, key liquids such as coolant, transformer oil, and water play a crucial role. They must have high insulation, high thermal stability, and good chemical stability to ensure safe and effective operation in the power system. However, with the long-term operation of the equipment, impurities such as carbon, iron, copper, and tin may be mixed into these liquids. These impurities may come from mechanical wear, corrosion, decomposition of insulating materials, or environmental pollution. Therefore, developing a technology that can detect impurities in these liquids in a timely and accurate manner is crucial for ensuring the safe operation of power equipment. Compared with the existing technologies, the present invention has the following advantages:
[0121] 1. The present invention adopts a method combining hyperspectral imaging technology and machine learning algorithm technology, which can monitor the quality of liquids in the power system faster and more directly, distinguish and detect impurity particles in the liquids of the power system, and provide reliable technical support for the preventive maintenance and management of power equipment.
[0122] 2. Compared with traditional detection methods, the traditional methods have problems such as low efficiency and insufficient accuracy. Hyperspectral imaging technology, with its high spectral resolution and spatial resolution, provides an advanced non-contact detection means for detection. In addition, the application of machine learning methods further improves the data processing ability, enabling in-depth analysis and mining of hyperspectral data, thereby realizing fast and accurate detection of impurities in liquids.
[0123] As Figure 2 shown, this embodiment provides a hyperspectral imaging detection device for detecting impurities in the liquid of a power system. The device includes a computing device and a halogen light source, a calibration whiteboard, a power system liquid sample, and a hyperspectral camera arranged along the same straight line, wherein the computing device is connected to the hyperspectral camera. The distance between the halogen light source and the calibration whiteboard is a first distance, the distance between the calibration whiteboard and the hyperspectral camera is a second distance, and the first distance is much greater than the second distance (i.e., L1 >> L2). The computing device acquires spectral image information of the liquid sample through the hyperspectral camera, and processes the image based on a spectral analysis algorithm to extract characteristic spectral information of the impurities. By analyzing the spectral characteristics of the impurities, the types of impurities in the power system liquid can be inferred.
[0124] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention based on the concept of the present invention through logical analysis, reasoning, or limited experiments on the basis of the prior art should be within the protection scope determined by the claims.
Claims
1. A hyperspectral rapid detection method for impurities in the liquid of a power system, characterized in that, The method includes the following steps: S1. Perform spectral scanning on the liquid and the liquid mixture containing impurities in the power system to capture the spectral images of the liquid samples at different wavelengths; S2. Select the region of interest in the spectral image, and use the method combining the adaptive multi-scale noise correction model and whiteboard calibration to remove the background noise in the region of interest, generate the denoised spectral image, and calculate the reflectivity of the denoised spectral image; S3. Filter the denoised spectral image, and input the wavelength and reflectivity of the filtered image into the multi-model integrated hyperspectral detection model to obtain the detection result.
2. The hyperspectral rapid detection method for impurities in liquid of a power system according to claim 1, wherein The specific steps of using the method combining the adaptive multi-scale noise correction model and whiteboard calibration to remove the background noise in the region of interest are as follows: Set up a calibration whiteboard, use a hyperspectral camera to collect the spectral image of the whiteboard, and simultaneously obtain the dark reference image; Calculate the calibration coefficient of each pixel in the region of interest; Calibrate the region of interest using the calibration coefficient to obtain the calibrated image; Input the calibrated image into the adaptive multi-scale noise correction model. The adaptive multi-scale noise correction model performs multi-scale decomposition on the calibrated image. Each scale corresponds to signals and noises of different frequencies. Then, according to the signal intensity of each scale, set the adaptive allocation weights, and at the same time extract the background noise characteristics and model to obtain the noise distribution, and remove the background noise of the image at each scale to obtain the denoised spectral image.
3. A hyperspectral rapid detection method for impurities in the liquid of a power system according to claim 2, characterized in that, The calibration coefficient is: where x, y, and λ represent the x-axis and y-axis coordinates and the wavelength, respectively, and R white represents the reflectance of the calibration whiteboard, and I white represents the spectral image of the whiteboard.
4. A hyperspectral rapid detection method for impurities in liquid of a power system according to claim 3, characterized in that, The calibrated image is: I calibrated (x,y,λ) = [I sample (x,y,λ) - I dark (x,y,λ)] × C(x,y,λ) Among them, I calibrated (x, y, λ) represents the calibrated image, and I sample (x, y, λ) represents the region of interest.
5. A hyperspectral rapid detection method for impurities in liquid of a power system according to claim 4, characterized in that, The image of each scale after denoising in the denoised spectral image is: I' k (x,y,λ) = I k (x,y,λ) - ω k (x,y,λ) × N k (x,y,λ) Among them, I k (x, y, λ) represents the image at each scale, ω k (x, y, λ) represents the adaptively assigned weight, N k (x, y, λ) represents the noise distribution.
6. A hyperspectral rapid detection method for impurities in liquid of a power system according to claim 5, characterized in that, The reflectivity of the denoised spectral image is: where R white represents the reflectance of the calibration whiteboard, and I'(x, y, λ) represents the denoised spectral image, which is composed of the images at each scale after denoising.
7. A hyperspectral rapid detection method for impurities in the liquid of a power system according to claim 1, characterized in that, The training process of the multi-model integrated hyperspectral detection model is: Obtain the basic models, and each model is independently trained and generates spectral prediction results, and the spectral prediction results are used as input features; Train and validate an integrated model obtained by weighted averaging all the basic models based on the input features. The integrated model after training and validation is used as the multi-model integrated hyperspectral detection model, and the weights of each basic model are adjusted during the process of training the integrated model.
8. A hyperspectral rapid detection method for impurities in the liquid of a power system according to claim 7, characterized in that The prediction result of the integrated model is: Among them, is the final prediction result, and f i (x) is the prediction result of the i-th base model, and α i is the dynamically adjusted weight, and N is the number of base models.
9. A hyperspectral rapid detection method for impurities in liquid of a power system according to claim 7, characterized in that, The dynamically adjusted weight is: Among them, Score i is the validation score of the i-th base model on the validation set.
10. A hyperspectral rapid detection method for impurities in the liquid of a power system according to claim 1, characterized in that, The filtering uses the adaptive dynamic Savitzky-Golay filtering algorithm.
Citation Information
Patent Citations
Online detection system and method for impurity particles in transformer oil
CN118392731A