Secondary circuit fault detection method of current transformer and model training method
Patent Information
- Application Number
- CN202611138600.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]但是,上述方式中,对短暂性、间歇性故障的捕捉与诊断能力不足,难以实现快速响应,且依赖人工判断易导致误判率较高的问题
[0065]本申请实施例提供的一种电流互感器的二次回路故障检测方法及模型训练方法,通过获取电流互感器的二次回路电气数据,涵盖电压、电流等时域波形及频谱特征;对电气数据进行多域特征向量提取处理,通过时域分析、频域变换及小波包分解等技术,构建融合时域瞬时特性、频域谐波分布及能量分布的多域特征向量,该向量能全面表征二次回路在不同维度的电气特性。将电气特征向量输入初始检测模型进行训练,并确定优化参数。根据优化参数更新初始模型,最终形成故障检测模型,该模型可对二次回路的电气数据进行实时处理,通过特征向量与故障模式库的匹配,快速识别开路、短路、接地故障等典型故障类型,并定位故障发生位置。
Smart Images

Figure CN122986491A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of current transformer technology, and in particular to a method for detecting secondary circuit faults in current transformers and a method for training models. Background Technology
[0002] The normal operation of the secondary circuit of the current transformer is directly related to the accuracy of electricity metering and the reliability of relay protection.
[0003] In the existing technology, fault detection of the secondary circuit of current transformers relies on on-site inspections and regular maintenance by operation and maintenance personnel. This involves measuring electrical parameters such as circuit resistance, insulation resistance, current, and voltage, and making manual judgments based on experience.
[0004] However, the above methods are insufficient in capturing and diagnosing transient and intermittent faults, making it difficult to achieve rapid response, and relying on manual judgment can easily lead to a high rate of misjudgment. Summary of the Invention
[0005] This application provides a method for detecting faults in the secondary circuit of a current transformer and a model training method to achieve accurate and rapid detection of the secondary circuit of the current transformer.
[0006] In a first aspect, embodiments of this application provide a method for training a fault detection model, comprising:
[0007] Obtain the electrical data of the secondary circuit of the current transformer;
[0008] The electrical data is subjected to feature extraction processing to obtain an electrical feature vector; wherein, the electrical feature vector represents the multi-domain feature vector of the electrical data;
[0009] The electrical feature vectors are input into an initial detection model for training. The electrical feature vectors are then processed based on the initial detection model. The performance of the parameters in the parameter set is used as the fitness factor to determine the optimized parameters of the initial detection model. Based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vectors, a fault detection model is determined.
[0010] The parameter set represents the candidate parameter set of the initial detection model; each candidate parameter in the candidate parameter set corresponds to a set of parameters to be optimized in the initial detection model; the fault detection model is used to process the electrical data of the secondary circuit of the current transformer to obtain the fault detection result of the secondary circuit.
[0011] In one possible implementation, feature extraction processing is performed on the electrical data to obtain an electrical feature vector, including:
[0012] The electrical data is subjected to time-frequency domain feature extraction processing to obtain multi-domain feature vectors; wherein, the multi-domain feature vectors represent different feature vectors in multiple domains of the electrical data;
[0013] Principal component analysis is performed on the multi-domain feature vectors to reduce their dimensionality, resulting in electrical feature vectors.
[0014] In one possible implementation, the electrical data undergoes time-frequency domain feature extraction processing to obtain a multi-domain feature vector, including:
[0015] The electrical data is subjected to Fourier transform processing to obtain a frequency domain feature vector; the electrical data is subjected to harmonic feature extraction processing to obtain a harmonic feature vector; the electrical data is subjected to empirical mode decomposition processing to obtain a decomposed feature vector; wherein, the frequency domain feature vector represents the feature vector of the electrical data in the frequency domain; the harmonic feature vector represents the feature vector of the electrical data in the harmonic components; and the decomposed feature vector represents the feature vector of the electrical parameters in energy entropy decomposition.
[0016] Based on the frequency domain eigenvector, harmonic eigenvector, and decomposed eigenvector, multi-domain eigenvectors are obtained.
[0017] In one possible implementation, the electrical feature vector is input into an initial detection model for training. Based on the initial detection model, the electrical feature vector is processed, and the performance level of the parameters in the parameter set is used as the fitness factor to determine the optimized parameters of the initial detection model, including:
[0018] Repeat the following steps until the preset conditions are met:
[0019] The i-th fitness is determined based on the i-th parameter set, the electrical feature vector, and the initial detection model; wherein the i-th fitness characterizes the performance level of the parameters in the i-th parameter set.
[0020] Based on the i-th parameter set, the i-th fitness, and the (i-1)-th fitness, determine the i-th individual optimal parameters and the i-th global optimal parameters; based on the i-th parameter set, the i-th individual optimal parameters, and the i-th global optimal parameters, determine the i-th optimization speed and the i-th optimization position.
[0021] Based on the i-th optimization speed and the i-th optimization position, the i-th parameter set is optimized to obtain the (i+1)-th parameter set; wherein, the 1st parameter set, the 1st individual optimal parameter, and the 1st global optimal parameter are randomly generated; i is a positive integer greater than or equal to 2; and the value of i is determined to be increased by 1;
[0022] The globally optimal parameters obtained when the preset conditions are met are used to determine the optimization parameters.
[0023] In one possible implementation, a fault detection model is determined based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vector, including:
[0024] Based on the optimization parameters, the initial detection model is processed to obtain the model to be trained;
[0025] The electrical feature vector is input into the model to be trained, and the electrical feature vector is processed based on the composite kernel function in the model to be trained to obtain the fault detection model.
[0026] In one possible implementation, the electrical feature vector is input into the model to be trained, and the electrical feature vector is processed based on the composite kernel function in the model to be trained to obtain the fault detection model, including:
[0027] Based on the composite kernel function, a multi-kernel combination matrix is determined; wherein, the multi-kernel combination matrix represents a comprehensive similarity measure between electrical feature vectors;
[0028] Based on the electrical feature vector and the multi-core combination matrix, the dual problem and constraints are determined; the dual problem is solved using the sequential minimum optimization algorithm and the constraints to obtain the multiplier pair parameters and bias terms; wherein, the multiplier pair parameters characterize the importance of the electrical feature vector for fault type detection;
[0029] The fault detection model is determined based on the multiplier pair parameters and the bias term.
[0030] Secondly, embodiments of this application provide a method for detecting secondary circuit faults in a current transformer, including:
[0031] Obtain the electrical data of the secondary circuit of the current transformer;
[0032] The electrical data is input into the fault detection model to obtain the fault result output by the fault detection model; wherein, the fault detection model is trained by the first aspect and / or various possible training methods of the first aspect as described above; the fault result indicates the fault type of the secondary circuit of the current transformer.
[0033] Thirdly, embodiments of this application provide a training apparatus for a fault detection model, comprising:
[0034] The acquisition module is used to acquire electrical data of the secondary circuit of the current transformer;
[0035] The processing module is used to perform feature extraction processing on the electrical data to obtain an electrical feature vector; wherein the electrical feature vector represents the multi-domain feature vector of the electrical data;
[0036] The training module is used to input the electrical feature vector into the initial detection model for training, process the electrical feature vector based on the initial detection model, determine the optimized parameters of the initial detection model using the performance level of the parameters in the parameter set as the fitness, and determine the fault detection model based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vector.
[0037] The parameter set represents the candidate parameter set of the initial detection model; each candidate parameter in the candidate parameter set corresponds to a set of parameters to be optimized in the initial detection model; the fault detection model is used to process the electrical data of the secondary circuit of the current transformer to obtain the fault detection result of the secondary circuit.
[0038] In one possible implementation, the processing module includes:
[0039] The first processing module is used to perform time-frequency domain feature extraction processing on the electrical data to obtain a multi-domain feature vector; wherein the multi-domain feature vector represents different feature vectors in multiple domains of the electrical data;
[0040] The second processing module is used to perform principal component analysis dimensionality reduction on the multi-domain feature vectors to obtain electrical feature vectors.
[0041] In one possible implementation, the first processing module includes:
[0042] The electrical data is subjected to Fourier transform processing to obtain a frequency domain feature vector; the electrical data is subjected to harmonic feature extraction processing to obtain a harmonic feature vector; the electrical data is subjected to empirical mode decomposition processing to obtain a decomposed feature vector; wherein, the frequency domain feature vector represents the feature vector of the electrical data in the frequency domain; the harmonic feature vector represents the feature vector of the electrical data in the harmonic components; and the decomposed feature vector represents the feature vector of the electrical parameters in energy entropy decomposition.
[0043] Based on frequency domain characteristics, harmonic characteristics, and decomposition characteristics, multi-domain feature vectors are obtained.
[0044] In one possible implementation, the training module includes:
[0045] Repeat the following steps until the preset conditions are met:
[0046] The i-th fitness is determined based on the i-th parameter set, the electrical feature vector, and the initial detection model; wherein the i-th fitness characterizes the performance level of the parameters in the i-th parameter set.
[0047] Based on the i-th parameter set, the i-th fitness, and the (i-1)-th fitness, determine the i-th individual optimal parameters and the i-th global optimal parameters; based on the i-th parameter set, the i-th individual optimal parameters, and the i-th global optimal parameters, determine the i-th optimization speed and the i-th optimization position.
[0048] Based on the i-th optimization speed and the i-th optimization position, the i-th parameter set is optimized to obtain the (i+1)-th parameter set; wherein, the 1st parameter set, the 1st individual optimal parameter, and the 1st global optimal parameter are randomly generated; i is a positive integer greater than or equal to 2; and the value of i is determined to be increased by 1;
[0049] The globally optimal parameters obtained when the preset conditions are met are used to determine the optimization parameters.
[0050] In one possible implementation, the training module includes:
[0051] The third processing module is used to process the initial detection model according to the optimization parameters to obtain the model to be trained.
[0052] The fourth processing module is used to input the electrical feature vector into the model to be trained, and process the electrical feature vector based on the composite kernel function in the model to be trained to obtain the fault detection model.
[0053] In one possible implementation, the fourth processing module includes:
[0054] Based on the composite kernel function, a multi-kernel combination matrix is determined; wherein, the multi-kernel combination matrix represents a comprehensive similarity measure between electrical feature vectors;
[0055] Based on the electrical feature vector and the multi-core combination matrix, the dual problem and constraints are determined; the dual problem is solved using the sequential minimum optimization algorithm and the constraints to obtain the multiplier pair parameters and bias terms; wherein, the multiplier pair parameters characterize the importance of the electrical feature vector for fault type detection;
[0056] The fault detection model is determined based on the multiplier pair parameters and the bias term.
[0057] Fourthly, embodiments of this application provide a secondary circuit fault detection device for a current transformer, comprising:
[0058] The acquisition module is used to acquire electrical data of the secondary circuit of the current transformer;
[0059] The detection module is used to input the electrical data into the fault detection model and obtain the fault result output by the fault detection model; wherein, the fault detection model is trained by the first aspect and / or various possible training methods of the first aspect; the fault result indicates the fault type of the secondary circuit of the current transformer.
[0060] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0061] The memory stores computer-executed instructions;
[0062] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0063] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0064] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0065] This application provides a method for fault detection and model training of a secondary circuit of a current transformer. It acquires electrical data of the secondary circuit of the current transformer, covering time-domain waveforms and spectral characteristics such as voltage and current. Multi-domain feature vector extraction is performed on the electrical data. Through techniques such as time-domain analysis, frequency-domain transformation, and wavelet packet decomposition, a multi-domain feature vector is constructed that integrates instantaneous time-domain characteristics, frequency-domain harmonic distribution, and energy distribution. This vector comprehensively characterizes the electrical characteristics of the secondary circuit in different dimensions. The electrical feature vector is input into an initial detection model for training, and optimized parameters are determined. The initial model is updated based on the optimized parameters, ultimately forming a fault detection model. This model can process the electrical data of the secondary circuit in real time. By matching the feature vector with a fault mode library, it can quickly identify typical fault types such as open circuit, short circuit, and ground faults, and locate the fault location. Attached Figure Description
[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0067] Figure 1A flowchart illustrating a training method for a fault detection model provided in this application embodiment. Figure 1 ;
[0068] Figure 2 A flowchart illustrating a training method for a fault detection model provided in this application embodiment. Figure 2 ;
[0069] Figure 3 A flowchart illustrating a secondary circuit fault detection method for a current transformer provided in this application embodiment;
[0070] Figure 4 A schematic diagram of the structure of a training device for a fault detection model provided in an embodiment of this application. Figure 1 ;
[0071] Figure 5 A schematic diagram of the structure of a training device for a fault detection model provided in an embodiment of this application. Figure 2 ;
[0072] Figure 6 A schematic diagram of the structure of a secondary circuit fault detection device for a current transformer provided in this application embodiment;
[0073] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0074] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0075] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0076] In power systems, substations serve as the core hubs for power transmission and distribution, and their operational stability directly impacts grid security. Current transformers, as one of the key pieces of equipment in substations, play a crucial role in converting large primary currents into measurable small secondary currents, and are widely used in metering, protection, and monitoring.
[0077] However, due to the complex structure of secondary circuits and their connection to multiple electrical devices (such as relays, metering devices, and protection devices), they are prone to faults such as two-point grounding, open circuits, and incorrect wiring in actual operation due to equipment aging, poor contact, human error, or environmental factors. For example, two-point grounding can cause current shunting on the secondary side, leading to distorted monitoring data; an open circuit may generate thousands of volts of high voltage, threatening equipment and personnel safety; incorrect wiring may directly cause short circuits in the power grid or malfunctions of relay protection. These faults not only affect the accuracy of electricity metering but may also cause large-scale power outages or equipment damage. Therefore, there is an urgent need for an efficient and accurate fault diagnosis method to achieve real-time identification and classification of secondary circuit faults to ensure the safe operation of the power system. Currently, substation maintenance personnel rely on manual inspections and traditional testing equipment, which suffers from problems such as slow response, high misjudgment rate, and inability to cover multiple types of faults, making it difficult to meet the needs of modern power grids for intelligent operation and maintenance.
[0078] Therefore, this application provides a method for detecting faults in the secondary circuit of a current transformer, which can solve the above-mentioned problems.
[0079] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0080] Figure 1 A flowchart illustrating a training method for a fault detection model provided in this application embodiment. Figure 1 ,like Figure 1 As shown, the method includes:
[0081] S101. Obtain the electrical data of the secondary circuit of the current transformer.
[0082] For example, a current transformer is a transformer that converts a large current into a small current, used to measure and protect the current in a power system. Its primary side is connected to the main circuit, while its secondary side is connected to measuring instruments or protection devices.
[0083] The secondary circuit refers to the circuit connected to the secondary side of a current transformer, including measuring instruments, protection devices, connecting wires, etc., used to transmit and utilize the current signal transformed by the current transformer.
[0084] Electrical data refers to the current value, voltage value, phase angle, etc. in the secondary circuit of a current transformer. These data are important reflections of the operating status of the power system.
[0085] Identify the current transformer and its secondary circuit to be measured, select appropriate measuring instruments or data acquisition systems, and ensure they are in good working order. Also, prepare necessary connecting wires, safety tools, etc. According to the measurement requirements, correctly connect the measuring instruments to the secondary circuit of the current transformer. For direct measurement methods, ensure the connection is secure and the contact is good; for indirect measurement methods, the signal connection must be made according to the requirements of the data acquisition system.
[0086] Start the measuring instruments or data acquisition system to begin collecting electrical data from the secondary circuit. For direct measurement methods, read the values directly from the instruments; for indirect measurement methods, receive and store the data through the data acquisition system. Process and analyze the collected electrical data, such as calculating the effective value, average value, and peak value of the current, or performing spectrum analysis and harmonic analysis to obtain more comprehensive information on the operating status of the power system.
[0087] S102. Perform feature extraction processing on the electrical data to obtain electrical feature vectors; whereby the electrical feature vectors represent the multi-domain feature vectors of the electrical data.
[0088] For example, electrical data refers to power system operating parameters collected by devices such as sensors and measuring instruments, such as time-domain signals like current, voltage, power, and frequency, or frequency-domain or time-frequency-domain signals obtained through transformation.
[0089] Feature extraction is the process of filtering, transforming, or constructing representative and distinctive information from raw electrical data in order to reduce data redundancy and highlight key features.
[0090] Electrical feature vectors are vectors formed by combining extracted multi-domain features (such as time-domain statistics, frequency-domain components, time-frequency energy distribution, etc.) according to certain rules. They are used to quantitatively describe the comprehensive characteristics of electrical data and provide input for subsequent classification, prediction or fault diagnosis.
[0091] Multi-domain feature vectors refer to features that integrate multiple analysis dimensions such as time domain, frequency domain, and time-frequency domain, avoiding the limitations of single-domain information and improving the ability to represent complex electrical phenomena.
[0092] Denoise the raw electrical data (e.g., by filtering), normalize it (e.g., by scaling to the [0,1] range), or fill in missing values to ensure data quality.
[0093] Extract time-domain features from electrical data. Optionally, calculate statistics (mean, variance, skewness, kurtosis), extrema (maximum, minimum), waveform factors (such as peak factor, kurtosis), etc., to capture the steady-state and transient characteristics of the signal.
[0094] Frequency domain features are extracted from electrical data. Optionally, the time-domain signal is converted to the frequency domain using Fast Fourier Transform (FFT) to extract the dominant frequency component, harmonic amplitude, total harmonic distortion (THD), etc., and to analyze periodic or spectral distribution characteristics.
[0095] Time-frequency domain feature extraction is performed on the electrical data. Optionally, wavelet transform or short-time fourier transform (STFT) is used to decompose the signal and calculate the energy, entropy, or modulus maxima of each frequency band to capture the time-varying characteristics of non-stationary signals.
[0096] Feature selection and fusion processing are performed on the electrical data. Optionally, the most discriminative features are selected based on correlation analysis, principal component analysis (PCA), or machine learning algorithms (such as random forest) to avoid redundancy; the selected time-domain, frequency-domain, and time-frequency-domain features are concatenated according to their dimensions to form an electrical feature vector.
[0097] Perform vector standardization on the electrical data. Optionally, normalize or standardize the feature vectors to eliminate the influence of dimensions and improve the stability of model training.
[0098] By extracting features, raw electrical data is transformed into electrical feature vectors representing multi-domain feature vectors. This enables the comprehensive capture of fault symptoms from multiple physical domains, including the time domain, frequency domain, and time-frequency domain. Weak features are amplified in multiple dimensions, significantly enhancing the discriminative power between different fault modes. Simultaneously, the multi-domain fusion approach effectively reduces data dimensionality, eliminates redundant interference, alleviates the computational burden on subsequent models, and improves feature interpretability. This provides the fault detection model with more discriminative and robust input, ultimately improving diagnostic accuracy and generalization performance.
[0099] S103. Input the electrical feature vector into the initial detection model for training. Process the electrical feature vector based on the initial detection model. Use the performance level of the parameters in the parameter set as the fitness to determine the optimized parameters of the initial detection model. Based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vector, determine the fault detection model.
[0100] The parameter set represents the candidate parameter set of the initial detection model; each candidate parameter in the candidate parameter set corresponds to a set of parameters to be optimized in the initial detection model; the fault detection model is used to process the electrical data of the secondary circuit of the current transformer to obtain the fault detection result of the secondary circuit.
[0101] For example, the initial detection model is a basic classification or regression model, such as a support vector machine or neural network, that has not been finely tuned for hyperparameters. It is equipped with a composite kernel function composed of multiple basic kernel functions to enhance nonlinear mapping capabilities.
[0102] The parameter set is a collective term for the adjustable hyperparameters of the model and their candidate range, such as penalty coefficients, kernel function parameters, and combined weights. Performance refers to the evaluation metric value of the model on validation data, such as classification accuracy or F1 score. Fitness is a quantification function that uses this performance level as an optimization objective to evaluate the quality of parameter combinations. Optimized parameters are the set of parameters that best perform the model, searched from the parameter set guided by fitness. Ultimately, the model configured with optimized parameters and a composite kernel function is the fault detection model, capable of identifying fault types from newly input electrical feature vectors. The electrical feature vectors are divided into training, validation, and test sets (e.g., 70%:15%:15%). Fault labels (e.g., normal, short circuit, overload) are added to the training set; these labels should be based on historical fault records or expert knowledge annotation.
[0103] Choose the model type based on the characteristics of the data; optionally, for small sample data, prioritize Support Vector Machine (SVM) or Random Forest (RF) to avoid overfitting. For large-scale, high-dimensional data, choose Deep Neural Network (DNN) or Convolutional Neural Network (CNN) to leverage their strong expressive power.
[0104] Determine the specific form of the composite kernel function for the initial detection model, for example, by linearly weighting a Gaussian radial basis function kernel and a polynomial kernel. Define the parameter set and clarify the search boundaries of the parameters to be optimized in the model, such as the upper and lower bounds of the penalty factor C, the range of the kernel width parameter σ, and the value range of the kernel combination weight λ.
[0105] The iterative optimization phase begins with selecting a set of parameter values from the parameter set according to a strategy (such as randomness, genetic encoding, or particle position) to configure the model. This temporary model is then trained using training data to learn the mapping relationship between electrical characteristics and fault labels. After training, validation data is fed into the model for prediction. Based on the prediction results, a pre-selected performance level is calculated, such as the average accuracy of cross-validation, and this value is directly used as the fitness of that parameter set. The optimization algorithm generates a new generation of parameter populations based on the fitness of each parameter set through operations such as selection, crossover, and mutation (using genetic algorithms as an example) or velocity-position updates (using particle swarm optimization as an example). This cycle of "parameter assignment—model training—performance evaluation—fitness calculation—parameter update" is repeated until the fitness converges or the maximum number of iterations is reached. At this point, the globally optimal parameter combination is recorded as the optimized parameters.
[0106] Stop iterative optimization, put the obtained optimization parameters and the predefined composite kernel function into the structure of the initial detection model, and perform a complete training using all available electrical feature vectors. The resulting model is then determined as the fault detection model.
[0107] In one possible implementation, in the scenario of fault diagnosis of distribution transformers, a total of 12 features, including fundamental amplitude, total harmonic distortion rate, zero-sequence current component, and power factor, are extracted from the three-phase voltage and current waveforms to construct an electrical feature vector. The initial detection model uses a C-support vector classification model, with the composite kernel function pre-defined as K(x,y)=λ·exp(-γ||xy||²)+(1-λ)·(x·y+1)^d, where d is fixed at 2, and λ, γ, and the penalty coefficient C are all included in the parameter set. The macro-average F1 score from 5-fold cross-validation is used as the fitness, and 30 particles are initialized using a particle swarm optimization algorithm, with each particle's position representing a set (C, γ, λ). In each iteration, the support vector machine model corresponding to each particle learns on the training subset and calculates its F1 score on the validation subset, which is then used as its fitness. The particle swarm updates its position and velocity based on individual and global optima. After 60 iterations, the optimal parameters that maximize the F1 score are obtained: C=18.4, γ=0.031, and λ=0.67. Subsequently, the model is retrained on the complete training set using these optimized parameters and the aforementioned composite kernel function, thus obtaining a fault detection model capable of accurately identifying inter-turn short circuits, phase-to-phase short circuits, and ground faults.
[0108] By using the model's actual performance as the fitness-driven parameter search, this approach overcomes the limitations of manual, experience-based parameter tuning. It automatically discovers the optimal hyperparameter combination for the classification boundary in the electrical feature space, significantly improving the accuracy and recall of fault detection. Simultaneously, the introduction of composite kernel functions integrates the characteristics of different kernel functions, enabling the model to capture both subtle local changes in electrical features and global trends. This results in stronger generalization ability and robustness when dealing with highly nonlinear and multimodal electrical data. Furthermore, this process seamlessly integrates parameter optimization with final model construction, reducing repetitive training and shortening the development cycle from data to a deployable fault detection system. Therefore, it provides an efficient and reliable model generation method for intelligent operation and maintenance of electrical equipment.
[0109] This application provides a training method for a fault detection model. It acquires electrical data of the secondary circuit of a current transformer, encompassing time-domain waveforms and spectral characteristics such as voltage and current. The electrical data undergoes multi-domain feature vector extraction processing. Through techniques such as time-domain analysis, frequency-domain transformation, and wavelet packet decomposition, a multi-domain feature vector is constructed, integrating instantaneous time-domain characteristics, frequency-domain harmonic distribution, and energy distribution. This vector comprehensively characterizes the electrical characteristics of the secondary circuit in different dimensions. The electrical feature vector is input into an initial detection model for training, and optimized parameters are determined. The initial model is updated based on the optimized parameters, ultimately forming a fault detection model. This model can process the electrical data of the secondary circuit in real time. By matching the feature vector with a fault mode library, it can quickly identify typical fault types such as open circuit, short circuit, and grounding faults, and locate the fault location.
[0110] Figure 2 A flowchart illustrating a training method for a fault detection model provided in this application embodiment. Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1 Based on the examples, a training method for a fault detection model is described in detail, which includes:
[0111] S201. Obtain the electrical data of the secondary circuit of the current transformer.
[0112] For example, electrical data of the secondary circuit of a current transformer are obtained.
[0113] Optionally, the current at both ends of the secondary winding of the current transformer is obtained, and the differential current at both ends grounded is determined.
[0114] Optionally, the primary side voltage, secondary side voltage, number of turns of the primary side coil, and number of turns of the secondary side coil of the current transformer can be obtained.
[0115] It is understood that the embodiments of this application do not limit the specific data of the electrical data, which may include primary side current, secondary side current, primary side voltage, secondary side voltage, etc.
[0116] S202. Perform time-frequency domain feature extraction on the electrical data to obtain multi-domain feature vectors; where the multi-domain feature vectors represent different feature vectors in multiple domains of the electrical data; perform principal component analysis to reduce the dimensionality of the multi-domain feature vectors to obtain electrical feature vectors.
[0117] For example, time-frequency domain feature extraction processing is performed on electrical data to obtain multi-domain feature vectors; wherein, the multi-domain feature vectors represent different feature vectors in multiple domains of the electrical data.
[0118] The electrical data is subjected to time-domain feature extraction, frequency-domain feature extraction, and joint time-frequency feature extraction to obtain multi-domain feature vectors. Optionally, the steps for multi-domain feature vector extraction of electrical data involve three processing methods: Fourier transform, harmonic feature extraction, and empirical mode decomposition, to obtain frequency-domain feature vectors, harmonic feature vectors, and decomposed feature vectors, which are then finally fused into multi-domain feature vectors.
[0119] Principal component analysis is used to reduce the dimensionality of the multi-domain eigenvectors to obtain the electrical eigenvectors.
[0120] By extracting features in the time and frequency domains, the local variation characteristics of electrical signals in both time and frequency dimensions can be simultaneously characterized. This effectively captures fault symptoms such as non-stationary disturbances and transient impacts, enabling multi-domain feature vectors to comprehensively represent the global and local information of electrical data from multiple physical perspectives, including the time domain, frequency domain, and time-frequency domain, significantly enhancing the separability between different fault modes. Next, principal component analysis (PCA) is performed on the multi-domain feature vectors to reduce dimensionality. This process removes redundant correlations and noise components between features while preserving the main variation information in the original data, mapping high-dimensional features to a lower-dimensional orthogonal space, resulting in compact electrical feature vectors. This not only significantly reduces the computational complexity and overfitting risk of subsequent model training but also improves the discriminative power and interpretability of the features, allowing the fault detection model to achieve higher detection accuracy and generalization ability with less storage and computational resources.
[0121] In one example, the electrical data is subjected to Fourier transform to obtain a frequency domain feature vector; the electrical data is subjected to harmonic feature extraction to obtain a harmonic feature vector; the electrical data is subjected to empirical mode decomposition to obtain a decomposed feature vector; wherein, the frequency domain feature vector represents the feature vector of the electrical data in the frequency domain; the harmonic feature vector represents the feature vector of the electrical data in the harmonic components; the decomposed feature vector represents the feature vector of the electrical parameters in the energy entropy decomposition; based on the frequency domain feature vector, the harmonic feature vector, and the decomposed feature vector, a multi-domain feature vector is obtained.
[0122] For example, firstly, the electrical parameters are preprocessed, including denoising (e.g., using wavelet thresholding) and normalization, to ensure data quality. Next, Fourier transform (FFT) processing is performed on the preprocessed signal to calculate the amplitude spectrum and extract frequency domain features from the spectrum. For example, the mean, variance, peak frequency, and energy integral over a specific frequency band (e.g., 0-1000Hz) are calculated to form a frequency domain feature vector. Then, harmonic feature extraction is performed. Based on the spectrum obtained from the FFT, the fundamental frequency (e.g., 50Hz) and various harmonics (e.g., 2nd to 15th) are identified, and the harmonic amplitude and phase are calculated. The total harmonic distortion (THD) is obtained using the formula THD = sqrt(Σ(harmonic amplitude^2)) / fundamental amplitude × 100%, and these parameters are combined into a harmonic feature vector. Simultaneously, empirical mode decomposition (EMD) processing is performed. The EMD algorithm is applied to the original electrical data to iteratively generate multiple IMFs. The energy value of each IMF is calculated, and the energy entropy formula H = ... -Σ(p_i×log(p_i)), where p_i is the ratio of the energy of the i-th IMF to the total energy, to obtain the decomposed feature vector, which may also include statistical features such as the mean and standard deviation of the IMF; finally, based on the frequency domain features, harmonic features and decomposed features, the three are merged into a high-dimensional multi-domain feature vector by vector concatenation or weighted fusion, which is used for subsequent dimensionality reduction or modeling.
[0123] In one possible implementation, the current signal of the secondary circuit of the current transformer is acquired at a sampling rate of 10kHz for 0.1 seconds to obtain 1000 data points. After denoising the data, FFT is applied to obtain the spectrum, and the amplitude of the first 5 peak frequencies and the total spectral energy are extracted to form a 5-dimensional frequency domain feature vector. The amplitude of the fundamental 50Hz wave and the 2nd to 10th harmonics, as well as the THD, are calculated from the spectrum to form a 10-dimensional harmonic feature vector (9 harmonic amplitudes plus THD). EMD decomposition is performed to obtain 4 IMFs, and the energy and sample entropy of each IMF are calculated. The overall energy entropy is also calculated to form a 5-dimensional decomposition feature vector (4 energy values plus energy entropy). Finally, these three vectors are concatenated to form a 20-dimensional multi-domain feature vector.
[0124] In one possible implementation, the THD calculation in harmonic feature extraction is as follows: assuming the fundamental amplitude obtained from the spectrum is A1 = 10 V, the second harmonic amplitude is A2 = 0.5 V, and the third harmonic amplitude is A3 = 0.3 V, then THD = sqrt(0.5^2 + 0.3^2) / 10 × 100% = sqrt(0.25 + 0.09) / 10 × 100% = 0.59 / 10 × 100% = 5.9%. This value will be used as an element of the harmonic feature vector, along with other harmonic parameters, to construct a multi-domain feature vector.
[0125] S203. Repeat the following steps until the preset conditions are met: Determine the i-th fitness based on the i-th parameter set, the electrical feature vector, and the initial detection model; where the i-th fitness characterizes the performance level of the parameters in the i-th parameter set; Determine the i-th individual optimal parameter and the i-th global optimal parameter based on the i-th parameter set, the i-th fitness, and the (i-1)-th fitness; Determine the i-th optimization speed and the i-th optimization position based on the i-th parameter set, the i-th individual optimal parameter, and the i-th global optimal parameter; Optimize the i-th parameter set based on the i-th optimization speed and the i-th optimization position to obtain the (i+1)-th parameter set; where the 1-th parameter set, the 1-th individual optimal parameter, and the 1-th global optimal parameter are randomly generated; i is a positive integer greater than or equal to 2; and determine the value of i plus 1; where the global optimal parameter obtained when the preset conditions are met is used to determine the optimization parameters.
[0126] For example, N sets of initial parameters are randomly generated. Each set of parameters has the same dimensions as the model parameters (e.g., C and D in SVM). ),For example: ; .
[0127] Initialize individual optimal parameters Initialize the globally optimal parameters Where d is greater than or equal to 1 and less than or equal to N.
[0128] After the i-th iteration, the i-th parameter set is obtained. ; i-th fitness .
[0129] The fitness of the i-th parameter set is determined by setting the parameters to be confirmed in the initial detection model based on each set of parameters in the i-th parameter set, training the initial detection model using electrical feature vectors, and then calculating the fitness on the validation set. (such as accuracy).
[0130] like Then update the individual optimal .
[0131] like Then update the individual optimal .
[0132] in, The fitness is represented by the d-th parameter in the i-th parameter set. The optimal parameter for the (i-1)th individual is the d-th parameter in the (i-1)th parameter set. Characterizes the (i-1)th globally optimal parameter.
[0133] For each set of parameters, determine the optimization speed using the following formula. and optimized location :
[0134]
[0135]
[0136]
[0137] in, Optimize the speed for the (i+1)th parameter of the d-th parameter in the i-th parameter set; The inertia weight (optional, linearly decreasing from 0.9 to 0.4); Optimize the speed for the i-th parameter of the d-th parameter in the i-th parameter set; As the first learning factor; The first random number; Let be the optimal parameter of the i-th individual for the d-th parameter in the i-th parameter set; It is the d-th parameter in the i-th parameter set; As the second learning factor; The second random number; The i-th globally optimal parameter; Optimize the position for the (i+1)th position; The third random number; Used to convert the optimized speed into a probability in the interval [0,1].
[0138] Based on the (i+1)th optimization position Determine the (i+1)th parameter set; understandably, the (i+1)th parameter set is... .
[0139] If the maximum number of iterations T is reached or the fitness change is achieved If the value of i is positive, the iteration terminates; otherwise, the value of i is incremented by 1, and the iteration steps are repeated.
[0140] Terminate the iteration and determine the globally optimal parameters. , which serve as optimization parameters for the initial detection model.
[0141] Employing an iterative search mechanism guided by both individual historical bests and global population bests, this approach overcomes the reliance on experience from manual parameter tuning and the blindness of random searches, intelligently approximating the globally optimal parameters along the direction of fastest fitness improvement. Preserving individual optimal parameters gives the search a "memory" capability, preventing the loss of excellent parameters and maintaining population diversity to escape local extrema traps; sharing globally optimal parameters accelerates the convergence of the population to better regions. Simultaneously, the dynamic updating of optimization speed and location achieves an adaptive balance between exploration and development in the parameter space, enabling the efficient and stable search for the hyperparameter combination that optimizes the overall performance of the fault detection model even in complex high-dimensional mapping environments of electrical feature vectors, thereby improving fault identification accuracy and the model's generalization ability.
[0142] S204. Based on the optimized parameters, process the initial detection model to obtain the model to be trained; input the electrical feature vector into the model to be trained, and process the electrical feature vector based on the composite kernel function in the model to be trained to obtain the fault detection model.
[0143] For example, the optimization parameters determined in the above embodiments are determined. For a composite kernel function consisting of a linearly weighted RBF kernel and a polynomial kernel, the optimization parameters can be: weight η (for the RBF kernel), 1-η (for the polynomial kernel), RBF kernel parameter γ, polynomial kernel parameter d, and penalty coefficient C. Using these parameters, an initial detection model (multi-kernel SVM) is configured, that is, these specific values are assigned to the corresponding hyperparameter variables of the model, thereby generating a training model with determined hyperparameters. The entire electrical feature vector dataset is divided into a training set and a test set (e.g., 70%-30% division).
[0144] Prepare the feature matrix of the training set and the corresponding fault type labels (such as normal, fault A, fault B).
[0145] The training set data is input into the model to be trained. The core of the training process is that, for each pair of training samples, the model uses a composite kernel function. The similarity is calculated to construct a kernel matrix. Subsequently, the SVM solver solves the dual problem based on this kernel matrix and the penalty coefficient C using an optimization algorithm (such as the SMO algorithm), and finally determines the support vectors, Lagrange multipliers, and bias term b.
[0146] After training, all model parameters, including support vectors, corresponding coefficients, and kernel function parameters, are fully determined. This complete and usable classifier is the fault detection model. This model can be saved and deployed for online fault diagnosis of new and unknown electrical feature vectors of current transformers.
[0147] The initial detection model is processed based on optimized parameters, which solidifies the optimal hyperparameter combination obtained through intelligent search into the model structure, resulting in a pre-configured model with optimal learning capabilities. This avoids the arbitrariness and performance bottlenecks of manually setting parameters. Subsequently, electrical feature vectors are input into the model and processed based on a built-in composite kernel function. This allows the model to benefit from the characteristics of multiple kernel functions simultaneously, such as capturing subtle local patterns and fitting global trends, thereby constructing a more accurate and robust fault classification boundary in the high-dimensional electrical feature space. During this training process, the model fully learns the complex mapping relationship between electrical feature vectors and real fault labels. The final fault detection model not only has high diagnostic accuracy and strong generalization ability but can also be directly applied to real-world scenarios. This achieves a complete, closed-loop construction from initial parameter optimization to a deployable model, significantly improving the development efficiency and practicality of the fault detection system.
[0148] In one example, a multi-kernel combination matrix is determined based on the composite kernel function; this matrix represents the comprehensive similarity measure between electrical eigenvectors. The dual problem and constraints are determined based on the electrical eigenvectors and the multi-kernel combination matrix. The dual problem is solved using the sequential minimum optimization algorithm and the constraints to obtain the multiplier pair parameters and bias terms; these parameters represent the importance of the electrical eigenvectors for fault type detection. Finally, the fault detection model is determined based on the multiplier pair parameters and the bias terms.
[0149] For example, for a training set containing N electrical feature vectors Using the configured composite kernel function Calculate an N×N kernel matrix K, where each element... .
[0150] Based on the kernel matrix K and training labels H (e.g., +1 for normal states and -1 for fault states), construct the objective function for the standard SVM dual problem:
[0151]
[0152]
[0153]
[0154]
[0155] in, For Lagrange multipliers; Used as a category identifier for labels; It is a multi-core combination matrix; As a penalty factor; For Kronek function;
[0156] The objective function is solved using the SMO algorithm:
[0157] S1, All multipliers The bias term b is set to 0.
[0158] S2. In each iteration, select a pair of multipliers based on heuristic rules (such as the sample that most severely violates the KKT conditions). and Joint optimization was carried out.
[0159] S3, fix the other multipliers, and then... and The binary optimization problem is solved analytically, updating their values and simultaneously updating the bias term b. This process must ensure that the updated values still satisfy the constraints (by pruning to the interval [0, C]).
[0160] S4. Check if all multipliers satisfy the Karush-Kuhn-Tucker (KKT) conditions within a certain tolerance range, or have reached the maximum number of iterations. If satisfied, stop the iteration; otherwise, return to step S2.
[0161] Extract all non-zero values from the solution results. (i.e., the multipliers corresponding to the support vectors), and the final bias term b. Saving these parameters along with the support vector sample set and the definition of the composite kernel function constitutes a usable fault detection model. The decision function of this model is: ,in SV is the new electrical feature vector, and SV is the support vector index set.
[0162] Determining a multi-kernel combination matrix based on composite kernel functions effectively integrates the nonlinear similarities characterized by multiple basic kernel functions, thus forming a more comprehensive and flexible integrated similarity measure between electrical feature vectors within a unified matrix framework, overcoming the bottleneck of limited feature space mapping capability of single kernel functions. Subsequently, the dual problem and constraints are determined based on the electrical feature vectors and the multi-kernel combination matrix, transforming the original model training task into a convex quadratic programming problem. This implicitly achieves dimensionality enhancement of noisy data features and makes the solution process rely only on kernel matrix operations without explicitly calculating high-dimensional mappings, significantly reducing computational complexity. Building upon this, a sequential minimum optimization algorithm combined with constraints is used to solve the dual problem in blocks analytically, optimizing only one pair of multiplier variables at a time. This avoids large-scale matrix operations and the memory burden of a general optimizer, enabling the training process to converge efficiently and stably even with ordinary computing resources. Finally, the fault detection model is directly determined based on the obtained multiplier pair parameters and bias terms. The multiplier pair parameters naturally produce sparsity—only a few key electrical feature vectors play a decisive role in the decision boundary. This not only significantly compresses the model size and speeds up inference, but also enhances the model's generalization ability and physical interpretability for new samples, making the entire fault detection system more suitable for deployment in embedded or real-time electrical monitoring scenarios.
[0163] This application provides a training method for a fault detection model. It acquires electrical data from the secondary circuit of a current transformer, extracts multi-domain feature vectors through time-frequency domain feature extraction, and then reduces the dimensionality to electrical feature vectors using principal component analysis. Subsequently, iterative optimization of the initial detection model parameters is performed based on a particle swarm optimization algorithm: parameter performance is evaluated through fitness, and the optimization speed and position are dynamically adjusted by combining individual and globally optimal parameters to ultimately determine the optimized parameters. The electrical feature vectors are input into the training model containing a composite kernel function, and after parameter optimization, a fault detection model is output, improving the accuracy and efficiency of fault detection.
[0164] Detailed analysis: Time-frequency domain feature extraction can comprehensively capture the abnormal features of electrical signals in the time-frequency dimension; principal component analysis effectively removes redundant information and retains key fault features; particle swarm optimization, by simulating a group cooperation mechanism, dynamically balances local search and global exploration capabilities during iteration, avoiding parameters getting trapped in local optima and ensuring that the optimized parameters have global optimality; composite kernel functions integrate the advantages of multiple kernel functions, enhancing the model's ability to fit nonlinear fault features. Finally, the fault detection model trained with optimized parameters can accurately identify abnormal states in secondary circuits, reduce false alarm and false negative rates, while reducing computational resource consumption and improving real-time detection performance, effectively solving the problems of single feature extraction, low parameter optimization efficiency, and weak model generalization ability in traditional methods.
[0165] Figure 3This is a flowchart illustrating a secondary circuit fault detection method for a current transformer provided in an embodiment of this application, as shown below. Figure 3 As shown, the method includes:
[0166] S301. Obtain the electrical data of the secondary circuit of the current transformer.
[0167] For example, the input channel of a high-precision data acquisition device (such as a PCIe data acquisition card or a dedicated online monitoring terminal) is reliably connected to the output terminal or test current injection point of the secondary circuit of the current transformer to be monitored.
[0168] In the acquisition software, set the sampling rate (e.g., 10 kHz), sampling duration (e.g., 10 cycles of power frequency, i.e., 0.2 seconds), and range to be consistent with those used during model training. It can be set to continuous monitoring mode or triggered by events (e.g., sudden current changes).
[0169] Start data acquisition to obtain discrete time series I[n] or U[n]. Perform preliminary integrity checks on the data (such as removing all zeros or overflow values) and format it into the input structure required by the model (e.g., a one-dimensional array containing 2000 sampling points).
[0170] S302. Input electrical data into the fault detection model to obtain the fault results output by the fault detection model; the fault results indicate the fault type of the secondary circuit of the current transformer.
[0171] The fault detection model is trained using the training method described in the above embodiments.
[0172] For example, a separate feature engineering module is invoked to perform the exact same preprocessing and feature extraction process on the raw electrical data obtained in step S301, generating a high-dimensional feature vector. This high-dimensional feature vector is then reduced in dimensionality using the saved PCA projection matrix to obtain the final electrical feature vector. .
[0173] Will Input is fed into the loaded fault detection model. Model kernel calculation. With all support vectors Similarity under composite kernel function Weighted summation (weights are 1) Add the bias term b to obtain the decision value. .
[0174] Based on decision value The symbols (for binary classification) or maximum value indexes (for multi-class classification, a one-to-one or one-to-many strategy is commonly used) are mapped to specific fault type labels. Finally, the "fault result" (e.g., "fault type: inter-turn short circuit; confidence level: 0.92") is output through a human-machine interface, alarm system, or data bus.
[0175] This application provides a method for detecting secondary circuit faults in a current transformer. By collecting electrical data such as voltage, current, and phase of the secondary circuit in real time, it can comprehensively reflect the circuit's operating status and provide a complete data foundation for fault analysis. Secondly, the data is input into a pre-trained fault detection model. Through feature extraction and pattern recognition, the model can automatically match a preset fault feature library and quickly output the fault type result. Compared to traditional manual inspection or single-parameter threshold judgment methods, this method avoids human experience errors and improves the accuracy of fault identification through data-driven model analysis. Simultaneously, the model can achieve real-time online monitoring and fault early warning, shortening the fault detection and handling time and reducing the risk of power outages caused by secondary circuit faults.
[0176] Figure 4 A schematic diagram of the structure of a training device for a fault detection model provided in an embodiment of this application. Figure 1 ,like Figure 4 As shown, the training device 40 for a fault detection model provided in this embodiment includes:
[0177] The acquisition module 401 is used to acquire electrical data of the secondary circuit of the current transformer;
[0178] Processing module 402 is used to perform feature extraction processing on electrical data to obtain electrical feature vectors; wherein, the electrical feature vectors represent the multi-domain feature vectors of electrical data;
[0179] The training module 403 is used to input electrical feature vectors into the initial detection model for training, process the electrical feature vectors based on the initial detection model, determine the optimized parameters of the initial detection model using the performance level of the parameters in the parameter set as the fitness, and determine the fault detection model based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vectors.
[0180] The parameter set represents the candidate parameter set of the initial detection model; each candidate parameter in the candidate parameter set corresponds to a set of parameters to be optimized in the initial detection model; the fault detection model is used to process the electrical data of the secondary circuit of the current transformer to obtain the fault detection result of the secondary circuit.
[0181] This embodiment provides a training device for a fault detection model, which can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0182] Figure 5 A schematic diagram of the structure of a training device for a fault detection model provided in an embodiment of this application. Figure 2 ,like Figure 5 As shown, the training device 50 for a fault detection model provided in this embodiment includes:
[0183] The acquisition module 501 is used to acquire electrical data of the secondary circuit of the current transformer;
[0184] Processing module 502 is used to perform feature extraction processing on electrical data to obtain electrical feature vectors; wherein, the electrical feature vectors represent the multi-domain feature vectors of electrical data;
[0185] The training module 503 is used to input electrical feature vectors into the initial detection model for training, process the electrical feature vectors based on the initial detection model, determine the optimized parameters of the initial detection model using the performance level of the parameters in the parameter set as the fitness, and determine the fault detection model based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vectors.
[0186] The parameter set represents the candidate parameter set of the initial detection model; each candidate parameter in the candidate parameter set corresponds to a set of parameters to be optimized in the initial detection model; the fault detection model is used to process the electrical data of the secondary circuit of the current transformer to obtain the fault detection result of the secondary circuit.
[0187] In one possible implementation, the processing module 502 includes:
[0188] The first processing module 5021 is used to perform time-frequency domain feature extraction processing on electrical data to obtain multi-domain feature vectors; wherein, the multi-domain feature vectors represent different feature vectors in multiple domains of electrical data;
[0189] The second processing module 5022 is used to perform principal component analysis dimensionality reduction on the multi-domain feature vectors to obtain electrical feature vectors.
[0190] In one possible implementation, the first processing module 5021 includes:
[0191] The electrical data is processed by Fourier transform to obtain frequency domain feature vectors; the electrical data is processed by harmonic feature extraction to obtain harmonic feature vectors; the electrical data is processed by empirical mode decomposition to obtain decomposed feature vectors; among them, the frequency domain feature vectors represent the feature vectors of the electrical data in the frequency domain; the harmonic feature vectors represent the feature vectors of the electrical data in the harmonic components; and the decomposed feature vectors represent the feature vectors of the electrical parameters in energy entropy decomposition.
[0192] Based on the frequency domain eigenvector, harmonic eigenvector, and decomposed eigenvector, multi-domain eigenvectors are obtained.
[0193] In one possible implementation, the training module 503 includes:
[0194] Repeat the following steps until the preset conditions are met:
[0195] The i-th fitness is determined based on the i-th parameter set, the electrical feature vector, and the initial detection model; where the i-th fitness characterizes the performance level of the parameters in the i-th parameter set.
[0196] Based on the i-th parameter set, the i-th fitness, and the (i-1)-th fitness, determine the i-th individual optimal parameters and the i-th global optimal parameters; based on the i-th parameter set, the i-th individual optimal parameters, and the i-th global optimal parameters, determine the i-th optimization speed and the i-th optimization position.
[0197] Based on the i-th optimization speed and the i-th optimization position, the i-th parameter set is optimized to obtain the (i+1)-th parameter set; where the 1st parameter set, the 1st individual optimal parameter, and the 1st global optimal parameter are randomly generated; i is a positive integer greater than or equal to 2; and the value of i is determined to be increased by 1.
[0198] Among them, the globally optimal parameters obtained when the preset conditions are met are used to determine the optimization parameters.
[0199] In one possible implementation, the training module 503 includes:
[0200] The third processing module 50314 is used to process the initial detection model according to the optimization parameters to obtain the model to be trained.
[0201] The fourth processing module 5032 is used to input electrical feature vectors into the model to be trained, and process the electrical feature vectors based on the composite kernel function in the model to be trained to obtain a fault detection model.
[0202] In one possible implementation, the fourth processing module 5032 includes:
[0203] Based on the composite kernel function, a multi-kernel combination matrix is determined; whereby the multi-kernel combination matrix represents a comprehensive similarity measure among electrical eigenvectors;
[0204] Based on the electrical eigenvectors and the multi-core combination matrix, the dual problem and constraints are determined; the dual problem is solved using the sequential minimum optimization algorithm and constraints to obtain the multiplier pair parameters and bias terms; among them, the multiplier pair parameters characterize the importance of the electrical eigenvectors for fault type detection.
[0205] The fault detection model is determined based on the multiplier pair parameters and bias terms.
[0206] This embodiment provides a training device for a fault detection model, which can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0207] Figure 6 This application provides a schematic diagram of the structure of a secondary circuit fault detection device for a current transformer, as shown in the embodiment of the present application. Figure 6 As shown, the secondary circuit fault detection device 60 for a current transformer provided in this embodiment includes:
[0208] The acquisition module 601 is used to acquire electrical data of the secondary circuit of the current transformer;
[0209] The detection module 605 is used to input electrical data into the fault detection model and obtain the fault result output by the fault detection model; wherein, the fault detection model is trained by various possible training methods as described in the above embodiment; the fault result indicates the fault type of the secondary circuit of the current transformer.
[0210] This embodiment provides a secondary circuit fault detection device for a current transformer, which can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0211] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.
[0212] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.
[0213] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0214] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0215] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0216] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0217] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0218] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0219] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0220] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0221] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0222] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0223] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0224] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0225] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0226] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A training method for a fault detection model, characterized in that, include: Obtain the electrical data of the secondary circuit of the current transformer; The electrical data is subjected to feature extraction processing to obtain an electrical feature vector; wherein, the electrical feature vector represents the multi-domain feature vector of the electrical data; The electrical feature vectors are input into an initial detection model for training. Based on the initial detection model, the electrical feature vectors are processed, and the performance level of the parameters in the parameter set is used as the fitness to determine the optimized parameters of the initial detection model. Based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vectors, a fault detection model is determined. The parameter set represents the candidate parameter set of the initial detection model; each candidate parameter in the candidate parameter set corresponds to a set of parameters to be optimized in the initial detection model. The fault detection model is used to process the electrical data of the secondary circuit of the current transformer to obtain the fault detection result of the secondary circuit.
2. The method according to claim 1, characterized in that, The electrical data is subjected to feature extraction processing to obtain an electrical feature vector, including: The electrical data is subjected to time-frequency domain feature extraction processing to obtain multi-domain feature vectors; wherein, the multi-domain feature vectors represent different feature vectors in multiple domains of the electrical data; Principal component analysis is performed on the multi-domain feature vectors to reduce their dimensionality, resulting in electrical feature vectors.
3. The method according to claim 2, characterized in that, The electrical data is subjected to time-frequency domain feature extraction processing to obtain a multi-domain feature vector, including: The electrical data is subjected to Fourier transform processing to obtain a frequency domain feature vector; the electrical data is subjected to harmonic feature extraction processing to obtain a harmonic feature vector; the electrical data is subjected to empirical mode decomposition processing to obtain a decomposed feature vector; wherein, the frequency domain feature vector represents the feature vector of the electrical data in the frequency domain; the harmonic feature vector represents the feature vector of the electrical data in the harmonic components; and the decomposed feature vector represents the feature vector of the electrical parameters in energy entropy decomposition. Based on the frequency domain eigenvector, harmonic eigenvector, and decomposed eigenvector, multi-domain eigenvectors are obtained.
4. The method according to claim 1, characterized in that, The electrical feature vectors are input into an initial detection model for training. Based on the initial detection model, the electrical feature vectors are processed, and the performance of the parameters in the parameter set is used as the fitness factor to determine the optimized parameters of the initial detection model, including: Repeat the following steps until the preset conditions are met: The i-th fitness is determined based on the i-th parameter set, the electrical feature vector, and the initial detection model; wherein the i-th fitness characterizes the performance level of the parameters in the i-th parameter set. Based on the i-th parameter set, the i-th fitness, and the (i-1)-th fitness, determine the i-th individual optimal parameters and the i-th global optimal parameters; based on the i-th parameter set, the i-th individual optimal parameters, and the i-th global optimal parameters, determine the i-th optimization speed and the i-th optimization position. Based on the i-th optimization speed and the i-th optimization position, the i-th parameter set is optimized to obtain the (i+1)-th parameter set; wherein, the 1st parameter set, the 1st individual optimal parameter, and the 1st global optimal parameter are randomly generated; i is a positive integer greater than or equal to 2; and the value of i is determined to be increased by 1; The globally optimal parameters obtained when the preset conditions are met are used to determine the optimization parameters.
5. The method according to any one of claims 1-4, characterized in that, Based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vector, a fault detection model is determined, including: Based on the optimization parameters, the initial detection model is processed to obtain the model to be trained; The electrical feature vector is input into the model to be trained, and the electrical feature vector is processed based on the composite kernel function in the model to be trained to obtain the fault detection model.
6. The method according to claim 5, characterized in that, The electrical feature vector is input into the model to be trained, and the electrical feature vector is processed based on the composite kernel function in the model to be trained to obtain the fault detection model, including: Based on the composite kernel function, a multi-kernel combination matrix is determined; wherein, the multi-kernel combination matrix represents a comprehensive similarity measure between electrical feature vectors; Based on the electrical feature vector and the multi-core combination matrix, the dual problem and constraints are determined; the dual problem is solved using the sequential minimum optimization algorithm and the constraints to obtain the multiplier pair parameters and bias terms; wherein, the multiplier pair parameters characterize the importance of the electrical feature vector for fault type detection; The fault detection model is determined based on the multiplier pair parameters and the bias term.
7. A method for detecting faults in the secondary circuit of a current transformer, characterized in that, include: Obtain the electrical data of the secondary circuit of the current transformer; The electrical data is input into the fault detection model to obtain the fault result output by the fault detection model; wherein the fault detection model is trained by the training method described in any one of claims 1-7; the fault result indicates the fault type of the secondary circuit of the current transformer.
8. A training device for a fault detection model, characterized in that, include: The acquisition module is used to acquire electrical data of the secondary circuit of the current transformer; The processing module is used to perform feature extraction processing on the electrical data to obtain an electrical feature vector; wherein the electrical feature vector represents the multi-domain feature vector of the electrical data; The training module is used to input the electrical feature vector into the initial detection model for training, process the electrical feature vector based on the initial detection model, determine the optimized parameters of the initial detection model using the performance level of the parameters in the parameter set as the fitness, and determine the fault detection model based on the optimized parameters, the composite kernel function of the initial detection model, and the electrical feature vector. The parameter set represents the candidate parameter set of the initial detection model; each candidate parameter in the candidate parameter set corresponds to a set of parameters to be optimized in the initial detection model; the fault detection model is used to process the electrical data of the secondary circuit of the current transformer to obtain the fault detection result of the secondary circuit.
9. A fault detection device for the secondary circuit of a current transformer, characterized in that, include: The acquisition module is used to acquire electrical data of the secondary circuit of the current transformer; The detection module is used to input the electrical data into the fault detection model and obtain the fault result output by the fault detection model; wherein the fault detection model is trained by the training method described in any one of claims 1-7; the fault result indicates the fault type of the secondary circuit of the current transformer.
10. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.