Intelligent diagnosis system and method for defects of metal oxide arrester
By introducing intelligent diagnostic modules and machine learning algorithms into the lightning arrester defect detection system, the subjectivity and incompleteness of defect detection in the existing technology are solved, and efficient and accurate lightning arrester defect detection and real-time monitoring are achieved.
Patent Information
- Application Number
- CN202411904088.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the defect detection of lightning arresters relies on visual inspections and small measurements by experienced technicians. There are subjective errors and consistency problems. It is impossible to fully detect various performance indicators of lightning arresters. The processing efficiency is inefficient and errors are prone to occur, and it is difficult to achieve real-time monitoring and data feedback.
It provides an intelligent diagnostic system for defects of metal oxide lightning arresters, including data acquisition and preprocessing modules, feature extraction and model training modules, real-time diagnostic modules, abnormal detection and health assessment modules, and adaptive learning modules. It uses machine learning algorithms such as XGBoost to build potential defect prediction models to realize real-time diagnosis and health assessment.
Through comprehensive testing and evaluation, the accuracy and comprehensiveness of diagnosis can be improved, real-time monitoring and data feedback can be achieved, the time and possible delays of manual inspections can be reduced, the system's response speed and accuracy can be improved, and the ability to adapt and automated data processing is strong.
Smart Images

Figure CN119830142A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of arrester defect diagnosis, and more specifically, relates to a metal oxide arrester defect intelligent diagnosis system and method. Background Art
[0002] A metal oxide surge arrester (MOSA) is a device used to protect equipment in power systems from overvoltage damage. It uses the nonlinear volt-ampere characteristics of metal oxides. Under normal operating voltage, the impedance is very high, but under overvoltage conditions, the impedance drops rapidly, conducting large currents and discharging overvoltage energy to the ground, thereby protecting power equipment. Its functions include effectively protecting transformers, cables and other power equipment from lightning and operational overvoltage damage, responding quickly to overvoltage events, reducing overvoltage peaks, maintaining the stability and safety of the power system, reducing overvoltage damage to equipment insulation materials, and extending the service life of power equipment.
[0003] However, if exposed to the open air for a long time, the metal oxide arrester may experience an increase in leakage current due to aging, moisture, etc., resulting in a degradation of its performance. The thermal stability of the arrester may decrease due to internal heat and environmental factors, and the casing may be mechanically damaged, resulting in exposure of internal components. Aging or damage of internal insulating materials may cause the arrester to fail. Failure of the arrester may cause overvoltage to directly invade power equipment, causing damage or burning of the equipment, making it impossible to effectively protect the power grid. This may lead to instability of the power system and large-scale power outages, and may even cause fire or explosion, threatening the safety of surrounding equipment and personnel. Therefore, it is very necessary to conduct regular defect inspections.
[0004] In the existing technology, defect detection of lightning arresters usually relies on visual inspection and a small amount of measurement by experienced technicians, which has subjective errors and consistency problems. It can only test and evaluate a few indicators, and cannot comprehensively detect various performance indicators of the lightning arrester. Potential problems are easily overlooked. Data processing and analysis rely on manual operation, and the processing efficiency is low and errors are prone to occur. Especially in the case of large data volumes and complex data structures, it is difficult to achieve real-time monitoring and data feedback, and it is impossible to quickly adjust and optimize detection methods and parameters, resulting in poor adaptability of the system to changing environments. At the same time, there is a lack of complex data analysis and machine learning technical support, and it is impossible to achieve deep mining and pattern recognition of large amounts of data, which limits the further optimization and upgrading of the system. Summary of the invention
[0005] The object of the present invention is to provide a metal oxide arrester defect intelligent diagnosis system and method to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A first aspect of the present invention provides a metal oxide arrester defect detection system, characterized in that it includes a data acquisition and preprocessing module, a feature extraction and model training module, a real-time diagnosis module, an anomaly detection and health assessment module, and an adaptive learning module;
[0008] The data acquisition and preprocessing module is used to collect and preprocess the data of each test point on the arrester;
[0009] The feature extraction and model training module is used to extract key features from the preprocessed test point data to establish a feature matrix, and use the feature matrix to build a potential prediction model for lightning arresters through the extreme gradient boosting XGBoost method;
[0010] The real-time diagnosis module collects the operating data of the arrester in real time and pre-processes it, inputs it into the arrester potential prediction model, and predicts the potential defects of the arrester;
[0011] The anomaly detection and health assessment module is used to adopt a multi-dimensional health indicator calculation mechanism, combine real-time data with historical data, perform anomaly detection through set dynamic thresholds, and conduct real-time assessment of the overall health status of the arrester to provide a comprehensive health status report;
[0012] The adaptive learning module is used to continuously optimize and retrain the potential prediction model of the arrester according to new data, regularly update the model parameters, iteratively train new decision trees, and weightedly combine the prediction results of all trained tree models to optimize the state of the arrester.
[0013] Preferably, the data acquisition and preprocessing module further includes an insulation resistance measurement unit, a DC leakage current measurement unit, an AC leakage current measurement unit, a power frequency reference current measurement unit and a data interface unit;
[0014] The collected measurement data are transmitted to the measurement data preprocessing module through the megohmmeter, the rectifier circuit, the leakage current tester and the reference current tester connected to the test points of the lightning arrester respectively.
[0015] Preferably, the data acquisition and preprocessing module further includes a data cleaning unit and a data normalization unit; the data cleaning unit is used to remove noise and invalid data in the collected data; the data normalization unit is used to normalize data of different dimensions;
[0016] The data acquisition and preprocessing module is used to collect data from the arrester test points, connect various measuring devices through interfaces, perform data cleaning, outlier detection and standardization after uploading the data, and store it in the MySQL database;
[0017] The data collection and preprocessing module uses Python's Pandas library for data cleaning, outlier detection, and standardization, including:
[0018] Data cleaning includes the handling of missing values by deleting rows and columns containing missing values; if deletion results in insufficient data, the missing values are filled using the mean, median, and mode;
[0019] Outlier detection calculates the Z-score of each data point, identifies data points whose absolute values exceed the set threshold as outliers and removes them;
[0020] Standardization processing uses Min-Max Scaling to scale the data to a specified range and unify the standards.
[0021] Preferably, the feature extraction and model training module further includes a time domain feature extraction unit and a frequency domain feature extraction unit; the time domain feature extraction unit is used to extract the time domain features of the data, including the mean and variance; the frequency domain feature extraction unit is used to extract the frequency domain features of the data, including the spectrum energy, through Fourier transform;
[0022] The feature extraction and model training module also includes a training data generation unit and a machine learning algorithm unit; the training data generation unit is used to generate a training data set from historical data and the feature extraction module; the machine learning algorithm unit includes a support vector machine, a random forest and a deep learning algorithm;
[0023] The feature extraction and model training module uses a machine learning algorithm to load feature data from the database and divide the data into a training set and a test set, 80% of which is training and 20% is testing. The training set is used for model training and the test set is used to verify the accuracy of the model. The model parameters are adjusted based on the verification results, the trained model is saved to the file system, and the results of model training and verification are recorded in log files.
[0024] Preferably, the real-time diagnosis module further comprises a real-time data input unit and a diagnosis algorithm unit; the real-time data input unit is used to obtain real-time operation data and input it into the diagnosis model; the diagnosis algorithm unit is used to analyze the real-time data and perform fault diagnosis using the trained model;
[0025] The real-time diagnosis module collects the operating data of the lightning arrester in real time through sensors. After preprocessing and feature extraction of the real-time data, it uses the trained model for diagnosis to identify potential defects and faults. When an abnormality is detected, the alarm mechanism is triggered to notify maintenance personnel to take corresponding measures.
[0026] Preferably, the anomaly detection and health assessment module further comprises an anomaly pattern recognition unit and an alarm triggering unit; the anomaly detection module monitors real-time data, detects anomalies through set thresholds and control chart statistical methods, records abnormal data and detection results, notifies relevant personnel through SMS and email, and takes maintenance measures according to abnormal situations;
[0027] The anomaly detection and health assessment module also includes a health indicator calculation unit and a life prediction unit; the health indicator calculation unit is used to calculate the health indicators of the lightning arrester based on historical and real-time data, including a health index; the life prediction unit is used to use the health indicators to predict the remaining life of the lightning arrester.
[0028] The adaptive learning module also includes a model updating unit and a feedback mechanism unit; the model updating unit is used to continuously update and optimize the diagnosis model according to new data and diagnosis results; the feedback mechanism unit is used to obtain feedback from actual diagnosis results and maintenance records and adjust model parameters.
[0029] A second aspect of the present invention provides a method for intelligently diagnosing defects in metal oxide arresters, comprising the following steps:
[0030] Step 1: Upload the measured data to the data processing center and use Python's Pandas library to clean and standardize the data;
[0031] Step 2, extract key feature indicators from the preprocessed data to establish a feature matrix, and use the extreme gradient boosting XGBoost method to build and train the arrester defect diagnosis model;
[0032] Step 3: collect and pre-process the arrester operation data in real time, input it into the arrester potential prediction model for real-time diagnosis, and identify abnormal data through electrical characteristic analysis;
[0033] Step 4: Based on the real-time diagnosis results, use SVM to perform arrester health assessment, load the latest real-time data to update model parameters, and optimize and regularly retrain the arrester defect diagnosis model;
[0034] Step 5, use the cross-validation method to evaluate the performance of the arrester defect diagnosis model and generate a detailed report including data charts and conclusions.
[0035] Preferably, in step 1, the measured data includes insulation resistance, DC leakage current, AC leakage current and power frequency reference current;
[0036] Measure the insulation resistance of the arrester using a 2500V or higher megohmmeter, making sure that the insulation resistance of the arrester of 35kV or higher is not less than 2500MΩ, and that of the arrester of 35kV or lower is not less than 1000MΩ, and record and save the data;
[0037] Measure the DC leakage current Use a half-phase half-wave rectifier circuit to measure the DC leakage current of the arrester, record the U1mA and 0.75U1mA values, and make sure that the measured value, the initial value and the manufacturer's specified value vary within the range of ±5% of the set value;
[0038] Measuring AC leakage current Use a leakage current tester to measure the AC leakage current of the arrester at a frequency of 50Hz to 60Hz, so that the measured value is within the standard range specified by the manufacturer and the variation is within ±10% of the set value;
[0039] Measuring the power frequency reference current Use a power frequency reference current tester and a current transformer to measure the power frequency reference current of the arrester at a frequency of 50Hz to 60Hz, so that the measured value is consistent with the manufacturer's standard value and the variation is within the range of ±10% of the set value.
[0040] Preferably, in step 2, constructing a feature matrix includes:
[0041] The mean of each eigenvalue is adjusted to 0, the variance is adjusted to 1, and all eigenvalues are data standardized; the data standardization formula is as follows:
[0042]
[0043] Where:
[0044] X represents the original data matrix, μ represents the mean of each feature, and σ represents the standard deviation of each feature;
[0045] Calculate the covariance matrix using the standardized data;
[0046]
[0047] Where:
[0048] Σ represents the covariance matrix, n represents the number of samples;
[0049] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors;
[0050] Σ=PΛP T
[0051] Where:
[0052] Λ is a diagonal matrix, the elements on the diagonal are eigenvalues, and P is a matrix composed of eigenvectors;
[0053] Sort by the size of the eigenvalues, select the eigenvectors corresponding to the first k largest eigenvalues to form the principal component; if 90% of the variance is retained, select the k value that meets the conditions, the formula is as follows:
[0054]
[0055] Where:
[0056] λ i represents the i-th eigenvalue, and m represents the total number of eigenvalues.
[0057] Use the selected eigenvectors to transform the original data into a new low-dimensional space. The formula is as follows:
[0058] X pca =X standard P k
[0059] Where:
[0060] X pca represents the transformed data, P k is the matrix consisting of the first k eigenvectors.
[0061] Preferably, in step 2, the model training steps are as follows:
[0062] Set the hyperparameters of the XGBoost model and initialize the prediction results of a simple arrester defect diagnosis model built by the XGBoost method using the feature matrix with extreme gradient boosting;
[0063] Iteratively train a new decision tree and correct the errors of the previous model by calculating the residual of the model. In each iteration, the learning rate is dynamically adjusted according to the prediction error of the current model. The formula is as follows:
[0064]
[0065] Where:
[0066] η0 is the initial learning rate, t is the current iteration number, T is the total iteration number, and α is the decay factor;
[0067] At the same time, the maximum depth d of the tree is calculated as follows max To make dynamic adjustments:
[0068] d max =d0+β·t
[0069] Where:
[0070] d0 is the initial maximum depth, β is the depth growth coefficient, and finally the prediction results of all trained tree models are weighted and combined to obtain the final arrester defect diagnosis model.
[0071] Compared with the prior art, the present invention has the following beneficial effects:
[0072] (1) The present invention conducts comprehensive testing and evaluation of lightning arresters by measuring insulation resistance, DC leakage current, AC leakage current, and power frequency reference current, thereby capturing a variety of potential problems and improving the accuracy and comprehensiveness of diagnosis. The Python Pandas library is used for data cleaning, outlier detection, and standardization, making the data preparation process more efficient and reliable.
[0073] (2) Based on the PCA or LDA method to extract key features, and using the XGBoost algorithm to build a potential defect prediction model for lightning arresters, high-precision defect prediction can be achieved; XGBoost, as an advanced machine learning algorithm, integrates multiple decision trees to gradually optimize the model, which can handle complex nonlinear relationships and improve prediction accuracy; compared with traditional visual inspection and empirical judgment, this method can identify potential defects more scientifically and accurately;
[0074] (3) The present invention collects the operating data of the arrester in real time and inputs the data into the trained prediction model for real-time diagnosis, so that the system can immediately discover potential defects and respond quickly, reducing the time and possible delays of manual inspection and improving the response speed and accuracy of the system;
[0075] (4) Through electrical characteristics analysis and data monitoring, abnormal modes in the operation of the arrester can be effectively identified and its overall health status can be comprehensively evaluated, providing a deep understanding of the arrester performance and generating detailed health status reports, which helps maintenance personnel take maintenance measures in a timely manner to avoid serious failures;
[0076] (5) Combining modern data processing and machine learning technologies not only improves the efficiency of data processing and analysis, but also has strong adaptability. Compared with traditional manual operation methods, automated data processing and analysis can significantly reduce human errors, improve the system's ability to adapt to complex data and changing environments, and achieve efficient and accurate arrester defect detection and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 It is a topological diagram of a metal oxide arrester defect intelligent diagnosis system provided in accordance with an embodiment of the present invention;
[0078] Figure 2 It is a flow chart of a method for intelligent diagnosis of defects of metal oxide arresters provided in accordance with an embodiment of the present invention;
[0079] Figure 3 It is a design diagram of a half-wave rectifier circuit for measuring U1mA in DC leakage current measurement provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0081] like Figure 1 As shown, Embodiment 1 of the present invention provides a metal oxide arrester defect intelligent diagnosis system, including a data acquisition and preprocessing module, a feature extraction and model training module, a real-time diagnosis module, an anomaly detection and health assessment module, and an adaptive learning module, characterized in that:
[0082] The data acquisition and preprocessing module is used to collect data from the arrester test points, connect various measuring devices through interfaces, perform data cleaning, outlier detection and standardization after uploading the data, and store it in the MySQL database;
[0083] Among them, it should be noted that the present invention collects and uploads the measurement data of insulation resistance, DC leakage current, AC leakage current and power frequency reference current through the data acquisition and preprocessing module, obtains and transmits various parameter data of the operating status of the lightning arrester in real time through the data acquisition and preprocessing module, and cleans and standardizes the original data, extracts useful features from the preprocessed data through the feature extraction and model training module to provide input for model training and diagnosis, identifies and predicts potential defects of the lightning arrester through the feature extraction and model training module, performs intelligent diagnosis of the real-time operating status of the lightning arrester through the real-time diagnosis module, and discovers potential defects in time, monitors abnormal patterns in the operating data of the lightning arrester through the anomaly detection and health assessment module, evaluates the overall health status of the lightning arrester through the anomaly detection and health assessment module, and uses the adaptive learning mechanism through the adaptive learning module to enable the diagnostic system to be continuously improved and optimized.
[0084] In the present embodiment, it is also necessary to explain that the parameter data acquisition and preprocessing module also includes an insulation resistance measurement unit, a DC leakage current measurement unit, an AC leakage current measurement unit, a power frequency reference current measurement unit and a data interface unit. The insulation resistance measurement unit of this module is used to measure the insulation resistance of the arrester to ensure its insulation performance. The DC leakage current measurement unit of this module is used to measure the leakage current of the arrester under DC. The AC leakage current measurement unit of this module is used to measure the AC leakage current of the arrester under the operating voltage. The power frequency reference current measurement unit of this module is used to measure the power frequency reference voltage of the arrester under the power frequency reference current. The data interface unit of this module is used to transmit the collected data to central processing.
[0085] In this embodiment, it should also be noted that the data acquisition and preprocessing module also includes a data cleaning unit and a data normalization unit. The data cleaning unit of this module is used to remove noise and invalid data in the collected data, and the data normalization unit of this module is used to normalize data of different dimensions for unified analysis.
[0086] The feature extraction and model training module is used to extract key features from the preprocessed test point data to establish a feature matrix; the feature matrix is used to build a potential prediction model for lightning arresters through the extreme gradient boosting XGBoost method to identify and predict potential defects of lightning arresters;
[0087] The extracting of key features includes but is not limited to adjusting the data dimension and retaining key information using principal component analysis PCA and linear discriminant analysis LDA;
[0088] In this embodiment, it should also be noted that the feature extraction and model training module also includes a time domain feature extraction unit and a frequency domain feature extraction unit. The time domain feature extraction unit of this module is used to extract the time domain features of the data, including the mean and variance. The frequency domain feature extraction unit of this module is used to extract the frequency domain features of the data through Fourier transform, including spectral energy.
[0089] In this embodiment, it should also be noted that the feature extraction and model training module also includes a training data generation unit and a machine learning algorithm unit. The training data generation unit of this module is used to generate a training data set from historical data and the feature extraction and model training module. The machine learning algorithm unit of this module provides a training model selected from support vector machines, random forests or deep learning algorithms.
[0090] The real-time diagnosis module collects the operating data of the arrester through sensors, monitors the operating status of the arrester in real time, and uses the trained model for intelligent diagnosis to find potential defects;
[0091] In this embodiment, it should also be noted that the real-time diagnosis module also includes a real-time data input unit and a diagnosis algorithm unit. The real-time data input unit of this module is used to obtain real-time operation data and input the diagnosis model, and the diagnosis algorithm unit of this module is used to use the trained model to analyze the real-time data and perform fault diagnosis.
[0092] The anomaly detection and health assessment module is used to monitor abnormal patterns in the arrester operation data, evaluate the overall health status of the arrester, and provide a comprehensive health status report;
[0093] In this embodiment, it should also be noted that the anomaly detection and health assessment module also includes an abnormal pattern recognition unit and an alarm triggering unit. The abnormal pattern recognition unit of this module is used to use an abnormality detection algorithm to identify abnormal patterns in the data, and the alarm triggering unit of this module is used to trigger an alarm mechanism when an abnormality is detected to notify maintenance personnel.
[0094] In this embodiment, it should also be noted that the anomaly detection and health assessment module also includes a health indicator calculation unit and a life prediction unit. The health indicator calculation unit of this module is used to calculate the health indicators of the lightning arrester based on historical and real-time data, including a health index. The life prediction unit of this module is used to predict the remaining life of the lightning arrester using the health indicators.
[0095] The adaptive learning module is used to continuously optimize and retrain the potential prediction model of the arrester according to the new data, regularly update the model parameters, iteratively train new decision trees, and weightedly combine the prediction results of all trained tree models to detect the status of the arrester.
[0096] In this embodiment, it should also be noted that the adaptive learning module also includes a model updating unit and a feedback mechanism unit. The model updating unit of this module is used to continuously update and optimize the diagnostic model according to new data and diagnostic results, and the feedback mechanism unit of this module is used to obtain feedback from actual diagnostic results and maintenance records and adjust model parameters.
[0097] like Figure 2 As shown, Embodiment 1 of the present invention provides a method for intelligent diagnosis of defects of metal oxide lightning arresters based on the above system in an actual application scenario of intelligent diagnosis of defects of metal oxide lightning arresters, specifically, comprising the following steps:
[0098] Step 1: Upload the measured data to the data processing center and use Python's Pandas library to clean and standardize the data;
[0099] Insulation resistance measurement:
[0100] Use a megohmmeter of 2500V or above, connect the test line of the megohmmeter to the test point of the arrester, set the test voltage of the megohmmeter to 2500V, start the megohmmeter, and record the insulation resistance value. For arresters of 35kV or above, the recorded insulation resistance should not be less than 2500MΩ; for arresters of 35kV or below, the recorded insulation resistance should not be less than 1000MΩ. Measure the base of the arrester to ensure that the test voltage is 2500V or above, save the measured data to the data recording system, and check the accuracy of the measured data to ensure that it is correct.
[0101] DC leakage current measurement:
[0102] See also Figure 3, measured using a half-phase half-wave rectifier circuit;
[0103] Measure U1mA half-wave rectifier circuit diagram:
[0104] T1: single-phase voltage regulator;
[0105] T2: test transformer;
[0106] V: silicon stack;
[0107] R: protective resistor;
[0108] C: filter capacitor;
[0109] PA: DC milliammeter;
[0110] Cx: arrester capacitor;
[0111] Connect the measuring equipment to the test point of the arrester, set and apply the U1 voltage, record the measured U1mA value, compare the measured U1mA value with the initial value or the value specified by the manufacturer, and ensure that the change is no more than ±5%, adjust the voltage to 0.75U, record the leakage current under 0.75U1mA, and ensure that it is 50μA or less, and upload all the measured data to the data processing center;
[0112] AC leakage current measurement:
[0113] Connect the leakage current tester to the arrester, set the test frequency to 50Hz to 60Hz, ensure that the arrester is measured in normal working condition, avoid external interference, start the tester, record the effective value of the leakage current, ensure that the measured value is within the standard range specified by the manufacturer, generally a few mA to tens of mA, and compare the measured value with the initial value or the value specified by the manufacturer, and the change is no more than ±10%, and save the measurement results to the data recording system;
[0114] Power frequency reference current measurement:
[0115] Select a suitable power frequency reference current tester or current transformer, connect the test equipment to the arrester, set the test frequency to 50Hz to 60Hz, ensure that the arrester is measured under normal working conditions, avoid external interference, start the tester, record the effective value of the power frequency reference current, ensure that the recorded value is consistent with the standard value provided by the arrester manufacturer, and compare the measured value with the initial value or the value specified by the manufacturer, and the change is no more than ±10%;
[0116] Upload the measurement results to the data processing center;
[0117] Data upload:
[0118] Connect to the interface of the data processing center, convert the measurement data into CSV or JSON standard format, connect to the data processing center through the network, upload the measurement data of steps S1 to S4, ensure that the data processing center successfully receives the data, check whether the uploaded data is complete and correct, back up the uploaded data in the local device, and safely disconnect the network connection with the data processing center;
[0119] Data preprocessing:
[0120] Import the uploaded data into Python's Pandas library, use Python's Pandas library to clean the data, delete missing values and outliers, apply Z-score or IQR method to identify and remove outliers, use Min-Max Scaling to standardize the data to ensure that all data conform to a unified format, store the preprocessed data in a MySQL database, verify the preprocessed data to ensure correct processing, and record the preprocessing steps and results in a log file;
[0121] The specific process is as follows:
[0122] Import the uploaded raw data into the Python environment and use the Pandas library to read CSV or Excel files;
[0123] import pandas as pd
[0124] df=pd.read_csv('uploaded_data.csv')
[0125] Remove missing values: Delete rows or columns containing missing values, or fill missing values with mean, median, etc.;
[0126] df_clean = df.dropna()
[0127] Use the Z-score method to identify and remove outliers;
[0128] from scipy.stats import zscore
[0129] z_scores=zscore(df_clean.select_dtypes(include=[float,int]))
[0130] df_clean=df_clean[(abs(z_scores)<3).all(axis=1)]
[0131] Use the SQLAlchemy library to store the preprocessed data into a MySQL database;
[0132] from sqlalchemy import create_engine
[0133] engine=create_engine('mysql+pymysql: / / username:password@host:port / databas e')
[0134] df_clean.to_sql('preprocessed_data',con=engine,if_exists='replace',index=False);
[0135] Check the preprocessed data to ensure there are no missing values and outliers, and verify that the data format is correct;
[0136] assert df_clean.isnull().sum().sum() == 0, "The preprocessed data still contains missing values"
[0137] assert((abs(zscore(df_clean.select_dtypes(include=[float,int])))<
[0138] 3).all(axis=1)).all(),"The preprocessed data still contains outliers";
[0139] Use Python's logging library to record preprocessing steps and results;
[0140] import logging
[0141] logging.basicConfig(filename='preprocessing.log',level=logging.INFO)
[0142] logging.info('Data cleaning completed, delete missing values')
[0143] logging.info('Outlier removal completed, using Z-score method')
[0144] logging.info('Data standardization completed, using Min-Max Scaling')
[0145] logging.info('Preprocessed data is stored in MySQL database')
[0146] logging.info('Data verification passed, no missing values and outliers');
[0147] Step 2, extract key feature indicators from the preprocessed data to establish a feature matrix, and use the extreme gradient boosting XGBoost method to build and train the arrester defect diagnosis model;
[0148] Feature extraction:
[0149] Load the preprocessed data from the database, use PCA (Principal Component Analysis) or LDA (Linear Discriminant Analysis) feature selection method to extract key feature indicators, extract insulation resistance indicators from the data, extract leakage current indicators from the data, extract AC leakage current indicators from the data, extract power frequency reference current indicators from the data, construct the extracted feature indicators into a feature matrix, and save the feature matrix to the database;
[0150] Preferably, the constructing a feature matrix comprises:
[0151] The mean of each eigenvalue is adjusted to 0, the variance is adjusted to 1, and all eigenvalues are data standardized; the data standardization formula is as follows:
[0152]
[0153] Where:
[0154] X represents the original data matrix, μ represents the mean of each feature, and σ represents the standard deviation of each feature;
[0155] Calculate the covariance matrix using the standardized data;
[0156]
[0157] Where:
[0158] Σ represents the covariance matrix, n represents the number of samples;
[0159] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors;
[0160] Σ=PΛP T
[0161] Where:
[0162] Λ is a diagonal matrix, the elements on the diagonal are eigenvalues, and P is a matrix composed of eigenvectors;
[0163] Sort by eigenvalues, select the eigenvectors corresponding to the first k largest eigenvalues to form the principal components;
[0164] Use the selected eigenvectors to transform the original data into a new low-dimensional space. The formula is as follows:
[0165] X pca =X standard P k
[0166] Where:
[0167] X pca represents the transformed data, P k is the matrix consisting of the first k eigenvectors
[0168] Preferably, the step of sorting by eigenvalues and selecting eigenvectors corresponding to the first k largest eigenvalues to form the principal components includes:
[0169] If 90% of the variance is retained, the k value that meets the condition is selected, and the formula is as follows:
[0170]
[0171] Where:
[0172] λ i represents the i-th eigenvalue, and m represents the total number of eigenvalues.
[0173] Model training includes:
[0174] Set the hyperparameters of the XGBoost model, use the feature matrix in step 2 to initialize the prediction results of the simple arrester defect diagnosis model constructed by the XGBoost method with extreme gradient boosting, and then iteratively train the new decision tree. By calculating the residual of the model, correct the error of the previous model. In each iteration, dynamically adjust the learning rate according to the prediction error of the current model. The formula is as follows:
[0175]
[0176] Where η0 is the initial learning rate, t is the current number of iterations, T is the total number of iterations, α is the decay factor, and the maximum depth dmax of the tree is dynamically adjusted: d max =d0+β·t, where d0 is the initial maximum depth, β is the depth growth coefficient, and finally the prediction results of all trained tree models are weighted and combined to obtain the final arrester defect diagnosis model.
[0177] Step 3: collect the arrester operation data in real time through sensors, perform preprocessing and feature extraction, input it into the arrester potential prediction model for real-time diagnosis, set the abnormal threshold, detect and record abnormal data through electrical characteristic analysis;
[0178] Real-time monitoring:
[0179] The operating data of the arrester is collected in real time through sensors, and the real-time data is transmitted to the data processing center. The real-time data is pre-processed, and key characteristic indicators are extracted from the real-time data, and the trained diagnostic model is loaded. The model is used to diagnose the real-time data, identify potential defects and faults, trigger the alarm system, and notify maintenance personnel;
[0180] Anomaly Detection and Monitoring:
[0181] Set abnormal thresholds for various indicators based on historical data, compare real-time data with the set thresholds, use control chart statistical methods to detect anomalies, record abnormal data and detection results, notify relevant personnel via SMS or email, take corresponding maintenance measures based on abnormal situations, analyze abnormal data, find the cause of the anomaly, and adjust the anomaly detection threshold based on the analysis results.
[0182] Step 4: Based on the real-time diagnosis results, use SVM to perform arrester health assessment, load the latest real-time data to update model parameters, and optimize and regularly retrain the arrester defect diagnosis model;
[0183] Health Assessment and Adaptive Learning:
[0184] Use SVM to evaluate the health of the arrester, load the latest real-time data, use the model to evaluate the health of the arrester, store the evaluation results in the database, update the model parameters according to the new data, optimize the model to improve the accuracy, retrain the model regularly, and record all model adjustments and optimization processes;
[0185] Step 5: Use cross-validation to compare the results of the intelligent diagnostic system with those of conventional diagnostic solutions, use statistical methods to evaluate, and generate a detailed report including data charts and conclusions.
[0186] Comparative analysis of results:
[0187] Load the results of the intelligent diagnosis system from the database, collect and load the result data of the conventional diagnosis scheme, compare the key indicators of the intelligent diagnosis results and the conventional diagnosis results, use the t-test to evaluate the difference between the two methods, calculate the accuracy, precision, recall rate and other indicators of the intelligent diagnosis system, evaluate the robustness of the intelligent diagnosis system under different environmental conditions, analyze the feasibility and advantages of the intelligent diagnosis system in practical applications, and generate a detailed report based on the results of the comparative analysis, including data charts and conclusions.
[0188] In summary, the present invention achieves the following technical effects through the above system and method:
[0189] (1) The present invention conducts comprehensive testing and evaluation of lightning arresters by measuring insulation resistance, DC leakage current, AC leakage current, and power frequency reference current, thereby capturing a variety of potential problems and improving the accuracy and comprehensiveness of diagnosis. The Python Pandas library is used for data cleaning, outlier detection, and standardization, making the data preparation process more efficient and reliable.
[0190] (2) Based on the PCA or LDA method to extract key features, and using the XGBoost algorithm to build a potential defect prediction model for lightning arresters, high-precision defect prediction can be achieved; XGBoost, as an advanced machine learning algorithm, integrates multiple decision trees to gradually optimize the model, which can handle complex nonlinear relationships and improve prediction accuracy; compared with traditional visual inspection and empirical judgment, this method can identify potential defects more scientifically and accurately;
[0191] (3) The present invention collects the operating data of the arrester in real time and inputs the data into the trained prediction model for real-time diagnosis, so that the system can immediately discover potential defects and respond quickly, reducing the time and possible delays of manual inspection and improving the response speed and accuracy of the system;
[0192] (4) Through electrical characteristics analysis and data monitoring, abnormal modes in the operation of the arrester can be effectively identified and its overall health status can be comprehensively evaluated, providing a deep understanding of the arrester performance and generating detailed health status reports, which helps maintenance personnel take maintenance measures in a timely manner to avoid serious failures;
[0193] (5) Combining modern data processing and machine learning technologies not only improves the efficiency of data processing and analysis, but also has strong adaptability. Compared with traditional manual operation methods, automated data processing and analysis can significantly reduce human errors, improve the system's ability to adapt to complex data and changing environments, and achieve efficient and accurate arrester defect detection and maintenance.
[0194] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0195] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An intelligent fault diagnosis system for metal oxide arresters, characterized in that: It includes data acquisition and preprocessing module, feature extraction and model training module, real-time diagnosis module, anomaly detection and health assessment module and adaptive learning module; The data acquisition and preprocessing module is used to collect and preprocess the data of each test point on the arrester; The feature extraction and model training module is used to extract key features from the preprocessed test point data to establish a feature matrix, and use the feature matrix to build a potential prediction model for lightning arresters through the extreme gradient boosting XGBoost method; The real-time diagnosis module collects the operating data of the arrester in real time and pre-processes it, inputs it into the arrester potential prediction model, and predicts the potential defects of the arrester; The anomaly detection and health assessment module is used to adopt a multi-dimensional health indicator calculation mechanism, combine real-time data with historical data, perform anomaly detection through set dynamic thresholds, and conduct real-time assessment of the overall health status of the arrester to provide a comprehensive health status report; The adaptive learning module is used to continuously optimize and retrain the potential prediction model of the arrester according to new data, regularly update the model parameters, iteratively train new decision trees, and weightedly combine the prediction results of all trained tree models to optimize the state of the arrester.
2. The metal oxide arrester defect intelligent diagnosis system according to claim 1, characterized in that: The data acquisition and preprocessing module also includes an insulation resistance measurement unit, a DC leakage current measurement unit, an AC leakage current measurement unit, a power frequency reference current measurement unit and a data interface unit; The collected measurement data are transmitted to the measurement data preprocessing module through the megohmmeter, the rectifier circuit, the leakage current tester and the reference current tester connected to the test points of the lightning arrester respectively.
3. The metal oxide arrester defect intelligent diagnosis system according to claim 1, characterized in that: The data acquisition and preprocessing module also includes a data cleaning unit and a data normalization unit; the data cleaning unit is used to remove noise and invalid data in the collected data; the data normalization unit is used to normalize data of different dimensions; The data acquisition and preprocessing module is used to collect data from the arrester test points, connect various measuring devices through interfaces, perform data cleaning, outlier detection and standardization after uploading the data, and store it in the MySQL database; The data collection and preprocessing module uses Python's Pandas library for data cleaning, outlier detection, and standardization, including: Data cleaning includes the handling of missing values by deleting rows and columns containing missing values; if deletion results in insufficient data, the missing values are filled using the mean, median, and mode; Outlier detection calculates the Z-score of each data point, identifies data points whose absolute values exceed the set threshold as outliers and removes them; Standardization processing uses Min-Max Scaling to scale the data to a specified range and unify the standards.
4. The metal oxide arrester defect intelligent diagnosis system according to claim 1, characterized in that: The feature extraction and model training module also includes a time domain feature extraction unit and a frequency domain feature extraction unit; the time domain feature extraction unit is used to extract the time domain features of the data, including mean and variance; the frequency domain feature extraction unit is used to extract the frequency domain features of the data, including spectrum energy, through Fourier transform; The feature extraction and model training module also includes a training data generation unit and a machine learning algorithm unit; the training data generation unit is used to generate a training data set from historical data and the feature extraction module; the machine learning algorithm unit includes a support vector machine, a random forest and a deep learning algorithm; The feature extraction and model training module uses a machine learning algorithm to load feature data from the database and divide the data into a training set and a test set, 80% of which is training and 20% is testing. The training set is used for model training and the test set is used to verify the accuracy of the model. The model parameters are adjusted based on the verification results, the trained model is saved to the file system, and the results of model training and verification are recorded in log files.
5. The metal oxide arrester defect intelligent diagnosis system according to claim 1, characterized in that: The real-time diagnosis module also includes a real-time data input unit and a diagnosis algorithm unit; the real-time data input unit is used to obtain real-time operation data and input it into the diagnosis model; the diagnosis algorithm unit is used to analyze the real-time data and perform fault diagnosis using the trained model; The real-time diagnosis module collects the operating data of the lightning arrester in real time through sensors. After preprocessing and feature extraction of the real-time data, it uses the trained model for diagnosis to identify potential defects and faults. When an abnormality is detected, the alarm mechanism is triggered to notify maintenance personnel to take corresponding measures.
6. The metal oxide arrester defect intelligent diagnosis system according to claim 1, characterized in that: The anomaly detection and health assessment module also includes an anomaly pattern recognition unit and an alarm triggering unit; the anomaly detection module monitors real-time data, detects anomalies through set thresholds and control chart statistical methods, records abnormal data and detection results, notifies relevant personnel through SMS and email, and takes maintenance measures according to abnormal situations; The anomaly detection and health assessment module also includes a health indicator calculation unit and a life prediction unit; the health indicator calculation unit is used to calculate the health indicators of the lightning arrester based on historical and real-time data, including a health index; the life prediction unit is used to use the health indicators to predict the remaining life of the lightning arrester. The adaptive learning module also includes a model updating unit and a feedback mechanism unit; the model updating unit is used to continuously update and optimize the diagnosis model according to new data and diagnosis results; the feedback mechanism unit is used to obtain feedback from actual diagnosis results and maintenance records and adjust model parameters.
7. A metal oxide arrester defect intelligent diagnosis method, according to any one of claims 1-6 of the metal oxide arrester defect intelligent diagnosis system, characterized in that: The following steps are involved: Step 1: Upload the measured data to the data processing center and use Python's Pandas library to clean and standardize the data; Step 2, extract key feature indicators from the preprocessed data to establish a feature matrix, and use the extreme gradient boosting XGBoost method to build and train the arrester defect diagnosis model; Step 3: collect and pre-process the arrester operation data in real time, input it into the arrester potential prediction model for real-time diagnosis, and identify abnormal data through electrical characteristic analysis; Step 4: Based on the real-time diagnosis results, use SVM to perform arrester health assessment, load the latest real-time data to update model parameters, and optimize and regularly retrain the arrester defect diagnosis model; Step 5, use the cross-validation method to evaluate the performance of the arrester defect diagnosis model and generate a detailed report including data charts and conclusions.
8. The metal oxide arrester defect intelligent diagnosis method according to claim 7, characterized in that: In step 1, the measured data include insulation resistance, DC leakage current, AC leakage current and power frequency reference current; Measure the insulation resistance of the arrester using a 2500V or higher megohmmeter, making sure that the insulation resistance of the arrester of 35kV or higher is not less than 2500MΩ, and that of the arrester of 35kV or lower is not less than 1000MΩ, and record and save the data; Measure the DC leakage current Use a half-phase half-wave rectifier circuit to measure the DC leakage current of the arrester, record the U1mA and 0.75U1mA values, and make sure that the measured value, the initial value and the manufacturer's specified value vary within the range of ±5% of the set value; Measuring AC leakage current Use a leakage current tester to measure the AC leakage current of the arrester at a frequency of 50Hz to 60Hz, so that the measured value is within the standard range specified by the manufacturer and the variation is within ±10% of the set value; Measuring the power frequency reference current Use a power frequency reference current tester and a current transformer to measure the power frequency reference current of the arrester at a frequency of 50Hz to 60Hz, so that the measured value is consistent with the manufacturer's standard value and the variation is within the range of ±10% of the set value.
9. The metal oxide arrester defect intelligent diagnosis method according to claim 7, characterized in that: In step 2, constructing a feature matrix includes: The mean of each eigenvalue is adjusted to 0, the variance is adjusted to 1, and all eigenvalues are data standardized; the data standardization formula is as follows: Where: X represents the original data matrix, μ represents the mean of each feature, and σ represents the standard deviation of each feature; Calculate the covariance matrix using the standardized data; Where: Σ represents the covariance matrix, n represents the number of samples; Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors; S = PΛP T Where: Λ is a diagonal matrix, the elements on the diagonal are eigenvalues, and P is a matrix composed of eigenvectors; Sort by the size of the eigenvalues, select the eigenvectors corresponding to the first k largest eigenvalues to form the principal component; if 90% of the variance is retained, select the k value that meets the conditions, the formula is as follows: Where: λ i represents the i-th eigenvalue, and m represents the total number of eigenvalues. Use the selected eigenvectors to transform the original data into a new low-dimensional space. The formula is as follows: X pca =X standard P k Where: X pca represents the transformed data, P k is the matrix consisting of the first k eigenvectors.
10. The metal oxide arrester defect intelligent diagnosis method according to claim 7, characterized in that: In step 2, the model training steps are as follows: Set the hyperparameters of the XGBoost model and initialize the prediction results of a simple arrester defect diagnosis model built by the XGBoost method using the feature matrix with extreme gradient boosting; Iteratively train a new decision tree and correct the errors of the previous model by calculating the residual of the model. In each iteration, the learning rate is dynamically adjusted according to the prediction error of the current model. The formula is as follows: Where: η0 is the initial learning rate, t is the current iteration number, T is the total iteration number, and α is the decay factor; At the same time, the maximum depth d of the tree is calculated as follows max To make dynamic adjustments: d max =d0+β·t Where: d0 is the initial maximum depth, β is the depth growth coefficient, and finally the prediction results of all trained tree models are weighted and combined to obtain the final arrester defect diagnosis model.
Citation Information
Cited By
Lightning arrester residual service life prediction method based on digital-analog linkage
CN120610098A
Surge arrester residual service life prediction method based on digital-analog linkage
CN120610098B
Intelligent lightning arrester for line and state diagnosis method thereof
CN121367175A