Power grid fault waveform identification and intelligent relay protection rapid control method and system

Through real-time acquisition and digital filtering of power grid data, combined with Fourier transform and wavelet transform to extract features, deep learning models are used for fault diagnosis, and multi-objective particle swarm optimization algorithm optimization algorithm optimization control strategy is used to solve the shortcomings of power grid fault diagnosis and protection control in the existing technology, and improve the reliability and stability of power grid operation.

CN119965775APending Publication Date: 2025-05-09FUJIAN GUANGDONG NETWORKING POWER OPERATION CO LTD +3
View PDF 0 Cites 21 Cited by

Patent Information

Application Number
CN202510050184.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The existing power grid relay protection system is difficult to adapt to complex and changeable power grid operating conditions, and the traditional digital filtering method is easily disturbed in complex electromagnetic environments, affecting the accuracy of fault analysis.

Method used

Real-time acquisition of power grid operation data and digital filtering is carried out, and time-domain and frequency-domain features are extracted by Fourier transform and wavelet transform to construct a combined feature vector. Deep learning models are trained based on these feature vectors for troubleshooting, and a multi-objective particle swarm optimization algorithm is used to optimize fault isolation time, power supply recovery rate and system stability.

Benefits of technology

It improves the accuracy and efficiency of fault diagnosis, optimizes the relay protection control strategy, and enhances the reliability and stability of power grid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119965775A_ABST
    Figure CN119965775A_ABST
Patent Text Reader

Abstract

The invention provides a power grid fault waveform identification and intelligent relay protection rapid control method and system, and relates to the technical field of electric power, and the method comprises the steps: collecting the voltage and current waveform data of a power grid, carrying out the digital filtering and noise elimination processing, carrying out the Fourier transform and wavelet transform, extracting the time domain and frequency domain features, and constructing a combined feature vector. And a deep learning model including a convolutional neural network and a long-short-term memory network is used to identify and evaluate the type, position and amplitude of the power grid fault based on the feature vector database. And then, a multi-target particle swarm optimization algorithm for constructing a target weight matrix based on historical fault data is adopted to optimize fault isolation time, a power supply recovery rate and system stability to obtain a control strategy, and a relay protection device setting value is adjusted according to the control strategy to execute fault isolation and power grid topology reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to electric power technology, and in particular to a method and system for quickly controlling power grid fault waveform recognition and intelligent relay protection. Background Art

[0002] Traditional power grid relay protection systems mainly rely on fixed setting values ​​and action logic to carry out protection work, which is difficult to adapt to complex and changeable power grid operating conditions. When the power grid topology changes, the existing protection devices often need to re-set parameters, affecting system reliability.

[0003] During the operation of the power grid, obtaining accurate fault feature information is the key to achieving fast and reliable protection. At present, the acquisition and preprocessing of power grid operation data mainly adopts traditional digital filtering methods, which are easily interfered in complex electromagnetic environments, affecting the accuracy of subsequent fault analysis. Although signal processing methods such as Fourier transform and wavelet transform have been applied to power grid fault feature extraction, existing technologies often use a certain transformation method alone and fail to fully utilize the complementarity of time domain and frequency domain features.

[0004] In terms of fault diagnosis, independent modeling methods are used for multiple tasks such as fault type identification, location positioning and amplitude assessment, which fails to fully explore the correlation between tasks; in terms of fault isolation control strategy formulation, existing methods mostly use single-objective optimization, which makes it difficult to balance multiple objectives such as fault isolation time, power supply restoration rate and system stability. There is a lack of adaptive weight adjustment mechanism for multi-objective optimization problems, and the practicality and reliability of control strategies still need to be improved. Summary of the invention

[0005] The embodiments of the present invention provide a method and system for quickly controlling power grid fault waveforms and intelligent relay protection, which can solve the problems in the prior art.

[0006] According to a first aspect of the embodiments of the present invention,

[0007] Provides grid fault waveform recognition and intelligent relay protection rapid control methods, including:

[0008] Collect voltage and current waveform data of power grid operation in real time, and perform digital filtering and noise elimination on the voltage and current waveform data to obtain pre-processed voltage and current waveform data; perform Fourier transform and wavelet transform on the pre-processed voltage and current waveform data to extract time domain features and frequency domain features of the voltage and current waveform data, and combine the time domain features and frequency domain features to construct a combined feature vector, and store the combined feature vector in a feature vector database;

[0009] Based on the combined feature vectors in the feature vector database, a deep learning model including a convolutional neural network and a long short-term memory network is trained, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude to obtain a fault diagnosis result;

[0010] Based on the fault diagnosis results, a multi-objective particle swarm optimization algorithm is used to optimize the fault isolation time, power supply recovery rate and system stability to obtain a control strategy. The multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and adaptively weighting multiple optimization objectives according to the target weight matrix; adjusting the setting value of the relay protection device according to the control strategy so that it executes fault area isolation, and controlling the power grid to perform topology reconstruction.

[0011] In an optional embodiment,

[0012] The steps of simultaneously performing Fourier transform and wavelet transform on the preprocessed voltage and current waveform data, extracting time domain features and frequency domain features of the voltage and current waveform data, and combining the time domain features and frequency domain features to construct a combined feature vector include:

[0013] Performing Fourier transform processing on the preprocessed voltage and current waveform data, dividing the preprocessed voltage and current waveform data into a plurality of frequency sub-bands, extracting amplitude characteristics and phase characteristics of the plurality of frequency sub-bands, and composing the amplitude characteristics and phase characteristics into a frequency domain feature vector;

[0014] Using wavelet basis functions to perform multi-layer wavelet decomposition on the pre-processed voltage and current waveform data, extracting energy features, standard deviation features and peak features of each layer of the multi-layer wavelet decomposition, and composing the energy features, standard deviation features and peak features into a time domain feature vector;

[0015] The frequency domain feature vector and the time domain feature vector are respectively normalized to obtain a normalized feature vector, the intra-class sample mean and the inter-class sample mean of the normalized feature vector are calculated, an inter-class dispersion matrix and an intra-class dispersion matrix are constructed based on the intra-class sample mean and the inter-class sample mean, a ratio of the inter-class dispersion matrix to the intra-class dispersion matrix is ​​used as a maximum inter-class and intra-class distance objective function, a gradient iteration method is used to solve the maximum inter-class and intra-class distance objective function to obtain a feature weight vector, and the normalized feature vectors are weighted combined according to the feature weight vector to obtain a combined feature vector.

[0016] In an optional embodiment,

[0017] Based on the combined feature vectors in the feature vector database, a deep learning model including a convolutional neural network and a long short-term memory network is trained, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude. The steps of obtaining the fault diagnosis result include:

[0018] A multi-branch parallel convolution structure is used to extract spatial features from the combined feature vector, wherein each convolution branch in the multi-branch parallel convolution structure comprises multiple convolution layers and residual connections, and the features extracted by each convolution branch are concatenated to obtain spatial features;

[0019] Reorganizing the spatial features into a feature sequence in time sequence, inputting the feature sequence into a bidirectional long short-term memory network, wherein the bidirectional long short-term memory network comprises a forward state output and a backward state output, and concatenating the forward state output and the backward state output to obtain a time sequence feature;

[0020] An attention mechanism is constructed to calculate the feature contribution weights of the spatial features and the temporal features, and the spatial features and the temporal features are adaptively fused according to the feature contribution weights to obtain fused features;

[0021] Based on the fusion features, a fault type identification branch, a fault location location branch and a fault amplitude evaluation branch are constructed, and the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location location branch and the weighted mean absolute error loss of the fault amplitude evaluation branch are combined into a multi-task loss function; the multi-task loss function is optimized and trained to obtain a fault diagnosis model;

[0022] The voltage and current waveform data to be diagnosed are input into the fault diagnosis model, the fault type identification result is output through the fault type identification branch, the fault position location result is output through the fault position location branch, and the fault amplitude evaluation result is output through the fault amplitude evaluation branch, and the fault type identification result, the fault position location result and the fault amplitude evaluation result are combined to form a fault diagnosis result.

[0023] In an optional embodiment,

[0024] The steps of constructing a fault type identification branch, a fault location location branch and a fault amplitude evaluation branch based on the fusion feature, and forming a multi-task loss function by combining the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location location branch and the weighted mean absolute error loss of the fault amplitude evaluation branch include:

[0025] Obtain fault type labels, fault location labels, and fault amplitude labels through manual labeling;

[0026] Based on the fusion feature, a fault type identification branch is constructed, wherein the fault type identification branch includes multiple fully connected layers, the output of the fully connected layer is nonlinearly transformed through an activation function, the output of the last layer is transformed through a softmax function to obtain a fault type probability distribution, the fault type label is smoothed to obtain a smooth label, and a cross entropy loss is calculated based on the smooth label and the fault type probability distribution;

[0027] A fault location location branch is constructed based on the fused features, the fault location location branch performs feature transformation through multiple fully connected layers to obtain a fault location prediction value, the fused features are input into a fully connected layer and a softmax function is performed to obtain an adaptive weight coefficient, a mean square error between the fault location prediction value and the fault location label is calculated, and the mean square error is multiplied by the adaptive weight coefficient to obtain a weighted mean square error loss;

[0028] A fault amplitude evaluation branch is constructed based on the fused features, wherein the fault amplitude evaluation branch includes an attention mechanism composed of multiple layers of fully connected layers, wherein the attention mechanism transforms the fused features and obtains an attention score through a sigmode function, inputs the fused features into the multiple layers of fully connected layers to obtain an amplitude prediction value, calculates an absolute error between the amplitude prediction value and the fault amplitude label, and multiplies the absolute error by the attention score to obtain a weighted mean absolute error loss;

[0029] The cross entropy loss, weighted mean square error loss and weighted mean absolute error loss are added together to obtain a multi-task loss function.

[0030] In an optional embodiment,

[0031] The step of optimizing and training the multi-task loss function to obtain a fault diagnosis model includes:

[0032] Calculating the gradient of the multi-task loss function with respect to the trainable parameters in the deep learning model, the gradient includes the cross entropy loss gradient of the fault type identification branch, the weighted mean square error loss gradient of the fault location location branch, and the weighted mean absolute error loss gradient of the fault amplitude assessment branch;

[0033] Based on the gradient, an optimizer is used to update the parameters of the deep learning model, and the learning rate of each branch is adjusted by an adaptive learning rate adjustment mechanism, wherein the adaptive learning rate adjustment mechanism dynamically calculates the learning rate according to the number of training steps, and the learning rate is jointly determined by the basic learning rate, the momentum term decay rate, and the second-order moment estimate decay rate;

[0034] After each training round, the accuracy of fault type identification, the root mean square error of fault location positioning and the weighted mean absolute error of fault amplitude evaluation are calculated on the validation set, and the comprehensive performance index is calculated based on the accuracy, root mean square error and weighted mean absolute error; when the comprehensive performance index does not improve for multiple consecutive training rounds, the early stopping mechanism is triggered and the model parameters with the best performance in the validation set are selected;

[0035] Calculate the mean and standard deviation of the loss function of multiple consecutive small batches of data. When the ratio of the standard deviation to the mean is less than a preset threshold, determine that the loss function has reached a stable state; calculate the standard deviation of the performance index of multiple consecutive training rounds. When the standard deviation of the performance index is less than the preset threshold and the loss function is in a stable state, confirm that the model training has converged, and use the model parameters at the time of convergence as the parameters of the fault diagnosis model;

[0036] The confusion matrix and F1 score of the fault type identification branch, the root mean square error and relative error of the fault location branch, and the mean absolute error and relative error of the fault amplitude assessment branch of the fault diagnosis model are calculated on the test set. Cross-validation is performed under different load conditions, different speed conditions, and different fault severity to obtain the final fault diagnosis model.

[0037] In an optional embodiment,

[0038] Based on the fault diagnosis result, a multi-objective particle swarm optimization algorithm is used to optimize the fault isolation time, power supply recovery rate and system stability to obtain a control strategy. The multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and the steps of adaptively weighting multiple optimization targets according to the target weight matrix include:

[0039] A target weight matrix is ​​constructed based on historical fault data of the power grid, wherein the target weight matrix includes a fault isolation time weight coefficient, a power supply recovery rate weight coefficient and a system stability weight coefficient, wherein the fault isolation time weight coefficient, the power supply recovery rate weight coefficient and the system stability weight coefficient are calculated by performing principal component analysis and entropy weight method on the historical fault data of the power grid, and are dynamically adjusted through an adaptive weight update mechanism according to real-time fault characteristics and system status; the adaptive weight update mechanism comprises: establishing a fuzzy rule base according to real-time fault characteristics, calculating the fuzzy membership of the fault isolation time, power supply recovery rate and system stability based on the real-time fault characteristics and system status, combining the fuzzy membership with the historical data weight coefficient to obtain a dynamic adjustment coefficient, and updating the target weight matrix in real time according to the dynamic adjustment coefficient;

[0040] The setting value combination of the relay protection device is encoded as a particle position vector, the adjustment direction and step size of the setting value are encoded as a particle velocity vector, the particle swarm is initialized and iterative optimization is performed, and in each iteration, a multi-objective optimization function including fault isolation time, power supply recovery rate and system stability is constructed based on the target weight matrix, wherein the fault isolation time considers the protection action time and the switch operation time, the power supply recovery rate considers the ratio of the power outage load capacity to the total load capacity of the system, and the system stability considers the uniformity of power flow distribution and the degree of voltage deviation;

[0041] All particles are classified by non-dominated sorting, and local sorting is performed based on crowding distance within the same non-dominated level to obtain a Pareto optimal solution set, from which the optimal solution is selected as a control strategy.

[0042] In an optional embodiment,

[0043] The steps of adjusting the setting value of the relay protection device according to the control strategy to isolate the fault area and controlling the power grid to reconfigure the topology include:

[0044] Based on the control strategy, a setting value mapping matrix including an overcurrent protection starting current coefficient and a time coefficient is constructed, wherein the rows in the setting value mapping matrix represent the protection device number, and the columns represent the number of protection action stages, and the setting value adjustment amount of the relay protection device is determined according to the particle position vector in the control strategy, and the setting value adjustment amount is combined with the setting value mapping matrix to obtain a starting current constant and an action time constant of the overcurrent protection, wherein the starting current constant is calculated by multiplying the starting current coefficient by the maximum load current, and the action time constant is calculated by multiplying the time coefficient by the ratio function of the fault current and the starting current constant;

[0045] The relay protection device is set according to the starting current setting value and the action time setting value, a fault area topology map including a node set and an edge set is established, the fault point location is determined in the fault area topology map, and the minimum isolation range under the condition that the fault point is included in the isolation area set and there is a reachable path between the non-isolated area node and the area boundary is calculated, a trip sequence including a circuit breaker number and an action time is generated based on the minimum isolation range, and the corresponding circuit breaker is controlled to act according to the trip sequence to complete the isolation of the fault area;

[0046] After completing the isolation of the fault area, a load node importance weight vector is established, and a network reconstruction plan is calculated based on the load node importance weight vector so that the weighted sum of the importance weight and the power supply status of the load node is maximized and the operation constraints of the node voltage deviation, line current and equipment capacity are met. The network reconstruction plan includes a switch operation sequence of switch number, switch opening and closing status and operation timing, and the topology of the power grid is reconstructed according to the switch operation sequence.

[0047] According to a second aspect of the embodiments of the present invention,

[0048] Provides grid fault waveform recognition and intelligent relay protection rapid control system, including:

[0049] The first unit is used to collect voltage and current waveform data of power grid operation in real time, and perform digital filtering and noise elimination processing on the voltage and current waveform data to obtain pre-processed voltage and current waveform data; perform Fourier transform and wavelet transform processing on the pre-processed voltage and current waveform data at the same time, extract time domain features and frequency domain features of the voltage and current waveform data, and combine the time domain features and frequency domain features to construct a combined feature vector, and store the combined feature vector in a feature vector database;

[0050] The second unit is used to train a deep learning model including a convolutional neural network and a long short-term memory network based on the combined feature vectors in the feature vector database, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude to obtain a fault diagnosis result;

[0051] The third unit is used to optimize the fault isolation time, power supply recovery rate and system stability based on the fault diagnosis result by using a multi-objective particle swarm optimization algorithm to obtain a control strategy, wherein the multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and adaptively weighting multiple optimization objectives according to the target weight matrix; adjusting the setting value of the relay protection device according to the control strategy so that it executes fault area isolation, and controlling the power grid to perform topology reconstruction.

[0052] According to a third aspect of the embodiments of the present invention,

[0053] An electronic device is provided, comprising:

[0054] processor;

[0055] a memory for storing processor-executable instructions;

[0056] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0057] According to a fourth aspect of the embodiments of the present invention,

[0058] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0059] The present invention can improve the accuracy of fault diagnosis: combining Fourier transform and wavelet transform to extract time domain and frequency domain characteristics of voltage and current waveforms, and using deep learning models to perform fault identification, location and amplitude evaluation, so as to more accurately diagnose power grid faults.

[0060] The present invention can optimize the relay protection control strategy: by adopting a multi-objective particle swarm optimization algorithm, comprehensively considering multiple objectives such as fault isolation time, power supply recovery rate and system stability, and adaptively adjusting the target weights according to the historical fault data of the power grid, a better control strategy can be obtained.

[0061] The present invention can improve the reliability of power grid operation: through rapid and accurate fault diagnosis and optimized control strategy, it can shorten the fault isolation time, improve the power supply recovery rate, enhance system stability, and thus improve the reliability of the overall power grid operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of a flow chart of a method for rapid control of power grid fault waveform recognition and intelligent relay protection according to an embodiment of the present invention;

[0063] Figure 2 It is a schematic diagram of the structure of a power grid fault waveform recognition and intelligent relay protection rapid control system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0066] Figure 1 FIG. 1 is a flow chart of a method for rapid control of power grid fault waveform recognition and intelligent relay protection according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0067] S1. Real-time collection of voltage and current waveform data of power grid operation, and digital filtering and noise elimination processing of the voltage and current waveform data to obtain pre-processed voltage and current waveform data; Fourier transform and wavelet transform processing of the pre-processed voltage and current waveform data at the same time, extracting time domain features and frequency domain features of the voltage and current waveform data, and combining the time domain features and frequency domain features to construct a combined feature vector, and storing the combined feature vector in a feature vector database;

[0068] S2. Based on the combined feature vectors in the feature vector database, a deep learning model including a convolutional neural network and a long short-term memory network is trained, wherein the deep learning model is used to identify the type of power grid fault, locate the fault location, and evaluate the fault amplitude to obtain a fault diagnosis result;

[0069] S3. Based on the fault diagnosis results, a multi-objective particle swarm optimization algorithm is used to optimize the fault isolation time, power supply recovery rate and system stability to obtain a control strategy. The multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and adaptively weighting multiple optimization objectives according to the target weight matrix; adjusting the setting value of the relay protection device according to the control strategy so that it executes fault area isolation, and controlling the power grid to perform topology reconstruction.

[0070] In an optional embodiment,

[0071] The steps of simultaneously performing Fourier transform and wavelet transform on the preprocessed voltage and current waveform data, extracting time domain features and frequency domain features of the voltage and current waveform data, and combining the time domain features and frequency domain features to construct a combined feature vector include:

[0072] Performing Fourier transform processing on the preprocessed voltage and current waveform data, dividing the preprocessed voltage and current waveform data into a plurality of frequency sub-bands, extracting amplitude characteristics and phase characteristics of the plurality of frequency sub-bands, and composing the amplitude characteristics and phase characteristics into a frequency domain feature vector;

[0073] Using wavelet basis functions to perform multi-layer wavelet decomposition on the pre-processed voltage and current waveform data, extracting energy features, standard deviation features and peak features of each layer of the multi-layer wavelet decomposition, and composing the energy features, standard deviation features and peak features into a time domain feature vector;

[0074] The frequency domain feature vector and the time domain feature vector are respectively normalized to obtain a normalized feature vector, the intra-class sample mean and the inter-class sample mean of the normalized feature vector are calculated, an inter-class dispersion matrix and an intra-class dispersion matrix are constructed based on the intra-class sample mean and the inter-class sample mean, a ratio of the inter-class dispersion matrix to the intra-class dispersion matrix is ​​used as a maximum inter-class and intra-class distance objective function, a gradient iteration method is used to solve the maximum inter-class and intra-class distance objective function to obtain a feature weight vector, and the normalized feature vectors are weighted combined according to the feature weight vector to obtain a combined feature vector.

[0075] Exemplarily, after the voltage and current waveform data are preprocessed, Fourier transform processing is first performed on them. The preprocessed voltage and current waveform data are divided into multiple sub-bands according to the frequency range, for example, the frequency range of 0-1000Hz is divided into 10 sub-bands, and the width of each sub-band is 100Hz. Then, the amplitude characteristics and phase characteristics of each frequency sub-band are extracted. For example, the average amplitude and phase angle of the signal in each sub-band can be calculated. The amplitude characteristics and phase characteristics of all sub-bands are combined to form a frequency domain feature vector. For example, if 10 sub-bands are divided and the amplitude and phase characteristics are extracted from each sub-band, the final frequency domain feature vector will contain 20 elements.

[0076] Next, the pre-processed voltage and current waveform data is subjected to wavelet transform processing. Select a suitable wavelet basis function, such as Daubech i es wavelet, and perform multi-layer wavelet decomposition on the waveform data. Assuming a three-layer wavelet decomposition, four levels of decomposition results will be obtained, including a low-frequency approximate signal and three high-frequency detail signals. Then, the energy characteristics, standard deviation characteristics, and peak characteristics of each layer of wavelet decomposition are extracted. For example, the sum of the squares of the wavelet coefficients of each layer can be calculated as the energy feature, the standard deviation of the wavelet coefficients can be calculated as the standard deviation feature, and the absolute maximum value of the wavelet coefficients can be found as the peak feature. The energy features, standard deviation features, and peak features of all layers are combined to form a time domain feature vector. For example, if a three-layer wavelet decomposition is performed, and each layer extracts the three features of energy, standard deviation, and peak, then the final time domain feature vector will contain 12 elements.

[0077] In order to eliminate the dimensional differences between different features, the frequency domain feature vector and the time domain feature vector need to be normalized. For example, the minimum-maximum normalization method can be used to scale the value of each feature to between 0 and 1. The normalized frequency domain feature vector and time domain feature vector are obtained.

[0078] After that, the intra-class sample mean and inter-class sample mean of the normalized feature vector are calculated. Assuming there are two types of samples, the mean of each type of sample on each feature is calculated to obtain the intra-class sample mean. Then the mean of all samples on each feature is calculated to obtain the inter-class sample mean.

[0079] Based on the intra-class sample mean and inter-class sample mean, the inter-class dispersion matrix and the intra-class dispersion matrix are constructed. These two matrices reflect the differences between different classes and the differences within the same class respectively.

[0080] The ratio of the inter-class discreteness matrix to the intra-class discreteness matrix is ​​used as the maximum inter-class and intra-class distance objective function. The objective function is solved by the gradient iteration method to obtain the feature weight vector. This weight vector reflects the contribution of each feature to distinguishing different categories.

[0081] Finally, the normalized feature vectors are weighted and combined according to the feature weight vector to obtain a combined feature vector. For example, the value of each feature is multiplied by the corresponding weight, and then the values ​​of all features are added to obtain the value of the combined feature vector. This combined feature vector combines the information of time domain and frequency domain features, and can better characterize the characteristics of voltage and current waveforms.

[0082] The present invention extracts rich time domain and frequency domain features of voltage and current waveform data, and effectively combines these features to construct a more representative combined feature vector, thereby improving the accuracy of fault diagnosis; by extracting multi-layer wavelet decomposition features through wavelet transform, it is possible to better capture the characteristic information of waveform data at different scales, enhance the robustness of the features, and reduce the sensitivity of the fault diagnosis method to noise and interference; through feature weighted combination, the feature dimension is reduced, the calculation complexity is simplified, and the efficiency of fault diagnosis is improved.

[0083] In an optional embodiment,

[0084] Based on the combined feature vectors in the feature vector database, a deep learning model including a convolutional neural network and a long short-term memory network is trained, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude. The steps of obtaining the fault diagnosis result include:

[0085] A multi-branch parallel convolution structure is used to extract spatial features from the combined feature vector, wherein each convolution branch in the multi-branch parallel convolution structure comprises multiple convolution layers and residual connections, and the features extracted by each convolution branch are concatenated to obtain spatial features;

[0086] Reorganizing the spatial features into a feature sequence in time sequence, inputting the feature sequence into a bidirectional long short-term memory network, wherein the bidirectional long short-term memory network comprises a forward state output and a backward state output, and concatenating the forward state output and the backward state output to obtain a time sequence feature;

[0087] An attention mechanism is constructed to calculate the feature contribution weights of the spatial features and the temporal features, and the spatial features and the temporal features are adaptively fused according to the feature contribution weights to obtain fused features;

[0088] Based on the fusion features, a fault type identification branch, a fault location location branch and a fault amplitude evaluation branch are constructed, and the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location location branch and the weighted mean absolute error loss of the fault amplitude evaluation branch are combined into a multi-task loss function; the multi-task loss function is optimized and trained to obtain a fault diagnosis model;

[0089] The voltage and current waveform data to be diagnosed are input into the fault diagnosis model, the fault type identification result is output through the fault type identification branch, the fault position location result is output through the fault position location branch, and the fault amplitude evaluation result is output through the fault amplitude evaluation branch, and the fault type identification result, the fault position location result and the fault amplitude evaluation result are combined to form a fault diagnosis result.

[0090] For example, first, multi-dimensional time series data such as voltage and current during grid operation are collected. In order to improve the robustness of the model, the collected data should cover various types of fault conditions, such as short circuit, open circuit, grounding, etc., as well as data samples of different fault locations and amplitudes.

[0091] Then, the collected raw data is preprocessed. The preprocessing steps include data cleaning, normalization, and feature extraction. Data cleaning is used to remove outliers and noise, such as using a filtering algorithm to remove high-frequency noise. Normalization converts data of different dimensions into a unified range, such as using min-max normalization to scale the data to between 0 and 1. Feature extraction extracts more representative features from the raw data, such as using wavelet transform to extract time-frequency domain features, and using empirical mode decomposition to extract intrinsic mode functions as features. The extracted multi-dimensional features are combined into a feature vector, stored in a feature vector database, and used as input for the deep learning model. For example, the energy features extracted by wavelet transform, the IMF (Internal Mode Function) features extracted by empirical mode decomposition, etc. are combined into a combined feature vector.

[0092] After reading the combined feature vector from the feature vector database, it is input into a multi-branch parallel convolution structure for spatial feature extraction. Each convolution branch consists of multiple convolution layers and residual connections. The convolution layer uses different convolution kernels to extract spatial features of different scales. The residual connection adds the input features to the output of the convolution layer, which helps to alleviate the gradient vanishing problem and improve the training efficiency of the model. The feature dimensions extracted by different convolution branches may be different. For example, the first branch extracts 32-dimensional features, the second branch extracts 64-dimensional features, and the third branch extracts 128-dimensional features. The features extracted by each branch are spliced ​​to obtain the final spatial features, for example, 32-dimensional, 64-dimensional and 128-dimensional features are spliced ​​into 224-dimensional spatial features.

[0093] Reorganize the spatial features into a feature sequence in time sequence. For example, the spatial features of 10 consecutive time points are combined into a feature sequence. Then, the feature sequence is input into a bidirectional long short-term memory network (Bi LSTM). Bi LSTM contains two LSTM layers, forward and backward, which learn the temporal dependencies of the feature sequence from the forward and backward directions respectively. The forward LSTM layer outputs the forward state, and the backward LSTM layer outputs the backward state. Concatenate the forward state and the backward state to obtain the final temporal feature. For example, if the outputs of the forward and backward LSTM layers are both 128-dimensional, a 256-dimensional temporal feature is obtained after concatenation.

[0094] The attention mechanism is used to calculate the contribution weights of spatial features and temporal features. The attention mechanism adaptively assigns weights based on the correlation between spatial features and temporal features. For example, if the spatial features at a certain time point are more important for fault diagnosis, the spatial features at that time point will receive a greater weight. Based on the calculated weights, the spatial features and temporal features are weighted fused to obtain fused features. For example, a 224-dimensional spatial feature and a 256-dimensional temporal feature are fused into a 480-dimensional fused feature.

[0095] Based on the fusion features, a fault type identification branch, a fault location location branch, and a fault amplitude assessment branch are constructed. Each branch is a fully connected neural network. The fault type identification branch outputs the probability distribution of the fault type, for example, the probability of outputting short circuit, open circuit, and grounding. The fault location location branch outputs an estimate of the fault location, for example, the relative distance of the output fault from the power supply. The fault amplitude assessment branch outputs an estimate of the fault amplitude, for example, the peak value of the output short-circuit current. The loss functions of the three branches are combined into a multi-task loss function. For example, the cross entropy loss is used as the loss function of the fault type identification branch, the mean square error loss is used as the loss function of the fault location location branch, and the mean absolute error loss is used as the loss function of the fault amplitude assessment branch. The multi-task loss function is optimized and trained, for example, using the Adam optimizer for training to obtain the final fault diagnosis model.

[0096] Input the voltage and current waveform data to be diagnosed into the trained fault diagnosis model. The three branches of the model output the fault type identification result, fault location location result and fault amplitude evaluation result respectively. For example, the model identifies that the fault type is short circuit, the fault location is 0.8 kilometers away from the power supply, and the short circuit current peak is 10kA. These three results are combined into the final fault diagnosis result.

[0097] The present invention combines the advantages of convolutional neural networks and long short-term memory networks, can effectively extract the spatial and temporal characteristics of power grid fault data, and fuse features through the attention mechanism, thereby improving the accuracy of fault diagnosis; adopts a multi-task learning framework, can simultaneously identify the fault type, locate the fault location and evaluate the fault amplitude, avoiding the error accumulation caused by separate diagnosis and improving the diagnosis efficiency; by training fault data of various types, locations and amplitudes, and adopting residual connection and other technologies, the generalization ability of the model is enhanced, and it can adapt to different power grid environments and fault scenarios.

[0098] In an optional embodiment,

[0099] The steps of constructing a fault type identification branch, a fault location location branch and a fault amplitude evaluation branch based on the fusion feature, and forming a multi-task loss function by combining the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location location branch and the weighted mean absolute error loss of the fault amplitude evaluation branch include:

[0100] Obtain fault type labels, fault location labels, and fault amplitude labels through manual labeling;

[0101] Based on the fusion feature, a fault type identification branch is constructed, wherein the fault type identification branch includes multiple fully connected layers, the output of the fully connected layer is nonlinearly transformed through an activation function, the output of the last layer is transformed through a softmax function to obtain a fault type probability distribution, the fault type label is smoothed to obtain a smooth label, and a cross entropy loss is calculated based on the smooth label and the fault type probability distribution;

[0102] A fault location location branch is constructed based on the fused features, the fault location location branch performs feature transformation through multiple fully connected layers to obtain a fault location prediction value, the fused features are input into a fully connected layer and a softmax function is performed to obtain an adaptive weight coefficient, a mean square error between the fault location prediction value and the fault location label is calculated, and the mean square error is multiplied by the adaptive weight coefficient to obtain a weighted mean square error loss;

[0103] A fault amplitude evaluation branch is constructed based on the fused features, wherein the fault amplitude evaluation branch includes an attention mechanism composed of multiple layers of fully connected layers, wherein the attention mechanism transforms the fused features and obtains an attention score through a sigmode function, inputs the fused features into the multiple layers of fully connected layers to obtain an amplitude prediction value, calculates an absolute error between the amplitude prediction value and the fault amplitude label, and multiplies the absolute error by the attention score to obtain a weighted mean absolute error loss;

[0104] The cross entropy loss, weighted mean square error loss and weighted mean absolute error loss are added together to obtain a multi-task loss function.

[0105] For example, the fault data is obtained and preprocessed: First, a large amount of fault data is collected from the actual equipment operation monitoring system. These data may contain various sensor signals, such as vibration, current, temperature, etc. The collected raw data is preprocessed, including data cleaning, denoising, normalization and other operations to improve data quality and model training effect. For example, wavelet denoising is performed on the vibration signal to remove high-frequency noise interference; zero-mean normalization is performed on the current signal to scale the data range to [-1, 1].

[0106] Extract fusion features: Extract features from preprocessed multi-source sensor data and fuse the extracted features to obtain more representative fault features. For example, extract time domain features (mean, variance, peak, etc.) and frequency domain features (spectral energy, characteristic frequency, etc.) from vibration signals, extract current harmonic features from current signals, and then concatenate these features together to form a fusion feature vector, such as [0.5, 0.2, 1.2, 0.8, 0.1, 0.9], where each element represents a different feature value.

[0107] Constructing a fault type recognition branch: The fusion feature is used to construct a fault type recognition branch, which consists of multiple fully connected layers. The output of each fully connected layer is transformed nonlinearly through an activation function, such as using a ReLU activation function. The output of the last fully connected layer is subjected to a softmax function to obtain the probability distribution of the fault type. At the same time, the manually annotated fault type labels are smoothed, for example, the label values ​​are smoothed from [0, 1, 0] to [0.05, 0.9, 0.05] to improve the generalization ability of the model. Then, the cross entropy loss is calculated based on the smoothed labels and the fault type probability distribution. Assuming that the fault type probability distribution predicted by the model is [0.1, 0.8, 0.1], the true label is [0, 1, 0], and the smoothed label is [0.05, 0.9, 0.05], the cross entropy loss is calculated.

[0108] Constructing the fault location location branch: The fault location location branch is constructed using the fusion features. This branch performs feature transformation through multiple fully connected layers to obtain the predicted value of the fault location. At the same time, the fusion features are input into a fully connected layer and the adaptive weight coefficient is obtained through the softmax function, for example, [0.2, 0.5, 0.3]. The mean square error is calculated between the predicted value of the fault location and the manually annotated fault location label, and then the mean square error is multiplied by the adaptive weight coefficient to obtain the weighted mean square error loss. Assuming that the predicted value of the fault location is [10, 20] and the true label is [12, 18], the mean square error is calculated and then multiplied by the weight coefficient.

[0109] Construct fault amplitude assessment branch: The fault amplitude assessment branch is constructed using fused features. The branch contains an attention mechanism consisting of multiple layers of fully connected layers. The attention mechanism transforms the fused features and obtains an attention score, such as 0.8, through the sigmode function. The fused features are input into the multiple layers of fully connected layers to obtain the amplitude prediction value. The absolute error between the amplitude prediction value and the manually annotated fault amplitude label is calculated, and then the absolute error is multiplied by the attention score to obtain the weighted mean absolute error loss. Assuming that the amplitude prediction value is 5 and the true label is 4, the absolute error is calculated and then multiplied by the attention score.

[0110] Construct a multi-task loss function: Add the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location branch, and the weighted mean absolute error loss of the fault amplitude assessment branch to obtain the final multi-task loss function.

[0111] Model training and optimization: Use optimization algorithms such as the Adam optimizer to train the model, minimize the multi-task loss function, and improve the convergence speed and performance of the model through methods such as learning rate adjustment strategies.

[0112] Through the multi-task learning framework, the present invention can simultaneously identify the fault type, locate the fault position and evaluate the fault amplitude, achieve more accurate fault diagnosis, and improve the accuracy and reliability of fault diagnosis; compared with the traditional single-task learning method, multi-task learning can complete multiple fault diagnosis tasks at one time, reducing the amount of calculation and time cost, and improving the efficiency of fault diagnosis; multi-task learning can utilize the correlation between different tasks, promote learning from each other, and improve the generalization ability of the model, so that it can better adapt to different fault scenarios.

[0113] In an optional embodiment,

[0114] The step of optimizing and training the multi-task loss function to obtain a fault diagnosis model includes:

[0115] Calculating the gradient of the multi-task loss function with respect to the trainable parameters in the deep learning model, the gradient includes the cross entropy loss gradient of the fault type identification branch, the weighted mean square error loss gradient of the fault location location branch, and the weighted mean absolute error loss gradient of the fault amplitude assessment branch;

[0116] Based on the gradient, an optimizer is used to update the parameters of the deep learning model, and the learning rate of each branch is adjusted by an adaptive learning rate adjustment mechanism, wherein the adaptive learning rate adjustment mechanism dynamically calculates the learning rate according to the number of training steps, and the learning rate is jointly determined by the basic learning rate, the momentum term decay rate, and the second-order moment estimate decay rate;

[0117] After each training round, the accuracy of fault type identification, the root mean square error of fault location positioning and the weighted mean absolute error of fault amplitude evaluation are calculated on the validation set, and the comprehensive performance index is calculated based on the accuracy, root mean square error and weighted mean absolute error; when the comprehensive performance index does not improve for multiple consecutive training rounds, the early stopping mechanism is triggered and the model parameters with the best performance in the validation set are selected;

[0118] Calculate the mean and standard deviation of the loss function of multiple consecutive small batches of data. When the ratio of the standard deviation to the mean is less than a preset threshold, determine that the loss function has reached a stable state; calculate the standard deviation of the performance index of multiple consecutive training rounds. When the standard deviation of the performance index is less than the preset threshold and the loss function is in a stable state, confirm that the model training has converged, and use the model parameters at the time of convergence as the parameters of the fault diagnosis model;

[0119] The confusion matrix and F1 score of the fault type identification branch, the root mean square error and relative error of the fault location branch, and the mean absolute error and relative error of the fault amplitude assessment branch of the fault diagnosis model are calculated on the test set. Cross-validation is performed under different load conditions, different speed conditions, and different fault severity to obtain the final fault diagnosis model.

[0120] Exemplarily, first, a deep learning model is constructed. The model contains three branches: a fault type identification branch, a fault location location branch, and a fault amplitude evaluation branch. The fault type identification branch uses a softmax function to output the probability of each fault type. The fault location location branch and the fault amplitude evaluation branch output the predicted values ​​of the position and amplitude respectively. For example, a deep learning model based on a convolutional neural network and a long short-term memory network can be constructed, in which the convolutional neural network is used to extract the features of the input signal, and the long short-term memory network is used to capture the time dependency of the signal.

[0121] Next, define the multi-task loss function. The loss function consists of three parts, corresponding to the tasks of the three branches: the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location branch, and the weighted mean absolute error loss of the fault amplitude assessment branch. Each loss term is multiplied by a weight coefficient to balance the importance of different tasks. For example, if fault type identification is more important than the other two tasks, a larger weight can be given to the cross entropy loss. Assume that the weight of the fault type identification loss is 0.5, the weight of the location loss is 0.3, and the weight of the amplitude assessment loss is 0.2.

[0122] Then, the model training process begins. At each training step, the gradients of the multi-task loss function with respect to all trainable parameters in the model are calculated. These gradients include the gradients of the loss functions of each of the three branches with respect to the parameters. For example, the gradients are calculated using the back-propagation algorithm.

[0123] Based on the calculated gradient, the optimizer is used to update the model parameters. The optimizer uses an adaptive learning rate adjustment mechanism to dynamically adjust the learning rate according to the number of training steps. The learning rate is determined by the base learning rate, the momentum term decay rate, and the second-order moment estimate decay rate. For example, using the Adam optimizer, the base learning rate is set to 0.001, the momentum term decay rate is set to 0.9, and the second-order moment estimate decay rate is set to 0.999.

[0124] After each training round, the model performance is evaluated on the validation set. The accuracy of fault type identification, the root mean square error of fault location location, and the weighted mean absolute error of fault amplitude evaluation are calculated. Based on these three indicators, the comprehensive performance index is calculated. For example, the comprehensive performance index can be defined as the weighted sum of the accuracy minus the root mean square error and the weighted mean absolute error. Assuming that after one training round, the accuracy is 0.9, the root mean square error is 0.1, and the weighted mean absolute error is 0.05, then the comprehensive performance index is 0.9-(0.3*0.1+0.2*0.05)=0.86.

[0125] If the comprehensive performance index does not improve for multiple consecutive training rounds (for example, 5 rounds), the early stopping mechanism is triggered and the model parameters with the best performance on the validation set are selected.

[0126] In order to determine whether the model has converged, it is necessary to monitor the stability of the loss function and performance indicators. Calculate the mean and standard deviation of the loss function for multiple consecutive small batches of data (for example, 100 small batches). If the ratio of the standard deviation to the mean is less than a preset threshold (for example, 0.01), the loss function is determined to have reached a stable state. At the same time, calculate the standard deviation of the performance indicators for multiple consecutive training rounds (for example, 10 rounds). If the standard deviation of the performance indicator is less than a preset threshold (for example, 0.001) and the loss function is in a stable state, the model training is confirmed to have converged, and the model parameters at this time are used as the parameters of the final fault diagnosis model.

[0127] Finally, the performance of the final model is evaluated on the test set. The confusion matrix and F1 score of the fault type identification branch, the root mean square error and relative error of the fault location branch, and the mean absolute error and relative error of the fault amplitude assessment branch are calculated respectively. Cross-validation is performed under different load conditions, different speed conditions, and different fault severity. For example, suppose that on the test set, the F1 score of fault type identification is 0.92, the root mean square error of location is 0.08, and the mean absolute error of amplitude assessment is 0.04.

[0128] The present invention can optimize multiple diagnostic tasks at the same time and improve the overall performance of fault diagnosis; the adaptive learning rate adjustment mechanism can speed up model training and obtain better model parameters; the early stopping mechanism and convergence judgment conditions can effectively prevent model overfitting and select the model with the best performance.

[0129] In an optional embodiment,

[0130] Based on the fault diagnosis result, a multi-objective particle swarm optimization algorithm is used to optimize the fault isolation time, power supply recovery rate and system stability to obtain a control strategy. The multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and the steps of adaptively weighting multiple optimization targets according to the target weight matrix include:

[0131] A target weight matrix is ​​constructed based on historical fault data of the power grid, wherein the target weight matrix includes a fault isolation time weight coefficient, a power supply recovery rate weight coefficient and a system stability weight coefficient, wherein the fault isolation time weight coefficient, the power supply recovery rate weight coefficient and the system stability weight coefficient are calculated by performing principal component analysis and entropy weight method on the historical fault data of the power grid, and are dynamically adjusted through an adaptive weight update mechanism according to real-time fault characteristics and system status; the adaptive weight update mechanism comprises: establishing a fuzzy rule base according to real-time fault characteristics, calculating the fuzzy membership of the fault isolation time, power supply recovery rate and system stability based on the real-time fault characteristics and system status, combining the fuzzy membership with the historical data weight coefficient to obtain a dynamic adjustment coefficient, and updating the target weight matrix in real time according to the dynamic adjustment coefficient;

[0132] The setting value combination of the relay protection device is encoded as a particle position vector, the adjustment direction and step size of the setting value are encoded as a particle velocity vector, the particle swarm is initialized and iterative optimization is performed, and in each iteration, a multi-objective optimization function including fault isolation time, power supply recovery rate and system stability is constructed based on the target weight matrix, wherein the fault isolation time considers the protection action time and the switch operation time, the power supply recovery rate considers the ratio of the power outage load capacity to the total load capacity of the system, and the system stability considers the uniformity of power flow distribution and the degree of voltage deviation;

[0133] All particles are classified by non-dominated sorting, and local sorting is performed based on crowding distance within the same non-dominated level to obtain a Pareto optimal solution set, from which the optimal solution is selected as a control strategy.

[0134] For example, in order to improve the recovery capability and stability of the power system after a fault, a control strategy generation method based on a multi-objective particle swarm optimization algorithm is proposed. This method uses historical fault data of the power grid, combined with real-time fault characteristics and system status, to perform multi-objective optimization on fault isolation time, power supply recovery rate and system stability, and finally obtains the optimal setting value combination of the relay protection device.

[0135] First, a large amount of historical power grid fault data is collected and sorted, including fault type, fault location, fault duration, power outage load capacity, system voltage level, etc. The principal component analysis method is used to reduce the dimension of these historical fault data and extract the main feature information. Then, the entropy weight method is combined to calculate the weight of each feature, and finally a target weight matrix is ​​obtained. This matrix contains the weight coefficient of fault isolation time, power supply recovery rate and system stability. For example, by analyzing historical data, the weight coefficients of fault isolation time, power supply recovery rate and system stability are 0.4, 0.3 and 0.3 respectively.

[0136] Next, the target weight matrix is ​​dynamically adjusted according to the real-time fault characteristics and system status. A fuzzy rule base is established, which describes the importance of the three optimization objectives under different fault characteristics and system status. For example, if the system voltage is lower than a certain threshold, the weight coefficient of system stability will increase accordingly. According to the real-time fault characteristics and system status, the fuzzy membership of fault isolation time, power supply recovery rate and system stability is calculated. The calculated fuzzy membership is combined with the weight coefficient obtained from historical data to obtain the dynamic adjustment coefficient. The target weight matrix is ​​updated in real time using the dynamic adjustment coefficient. Assuming that the real-time system voltage is low, the dynamic adjustment coefficient of system stability is 1.2, and the updated system stability weight coefficient is 0.36.

[0137] Then, the setting value combination of the relay protection device is encoded as a particle position vector, and the adjustment direction and step size of the setting value are encoded as a particle velocity vector. A group of particles are randomly initialized, and each particle represents a set of setting values ​​of the relay protection device. In each iteration, a multi-objective optimization function including fault isolation time, power supply recovery rate and system stability is constructed according to the current target weight matrix. The fault isolation time considers the protection action time and the switch operation time. The power supply recovery rate considers the ratio of the power outage load capacity to the total system load capacity. The system stability considers the uniformity of power flow distribution and the degree of voltage deviation. For example, the setting value combination represented by a particle results in a fault isolation time of 0.1 seconds, a power outage load capacity of 10MW, a total system load capacity of 100MW, a power flow distribution uniformity of 0.9, and a voltage deviation degree of 0.05.

[0138] All particles are graded using the non-dominated sorting algorithm and divided into different non-dominated levels. Within the same non-dominated level, particles are locally sorted according to the crowding distance, and the top-ranked particles are selected to enter the next generation. After multiple iterations of optimization, a Pareto optimal solution set is finally obtained. This solution set contains multiple non-inferior solutions, each of which represents a set of setting value combinations of relay protection devices. An optimal solution is selected from the Pareto optimal solution set as the final control strategy and applied to the actual relay protection device. For example, a solution with a fault isolation time of 0.08 seconds, a power supply recovery rate of 95%, and a system stability index of 0.95 is selected as the final control strategy.

[0139] The present invention can effectively reduce the power outage time and scope by optimizing the fault isolation time and power supply recovery rate, thereby improving power supply reliability; by considering the system stability index, it can avoid system instability caused by faults and ensure the safe operation of the power system; the method can dynamically adjust the target weight matrix according to the real-time fault characteristics and system status, so as to better adapt to different fault scenarios and improve the effectiveness of the control strategy.

[0140] In an optional embodiment,

[0141] The steps of adjusting the setting value of the relay protection device according to the control strategy to isolate the fault area and controlling the power grid to reconfigure the topology include:

[0142] Based on the control strategy, a setting value mapping matrix including an overcurrent protection starting current coefficient and a time coefficient is constructed, wherein the rows in the setting value mapping matrix represent the protection device number, and the columns represent the number of protection action stages, and the setting value adjustment amount of the relay protection device is determined according to the particle position vector in the control strategy, and the setting value adjustment amount is combined with the setting value mapping matrix to obtain a starting current constant and an action time constant of the overcurrent protection, wherein the starting current constant is calculated by multiplying the starting current coefficient by the maximum load current, and the action time constant is calculated by multiplying the time coefficient by the ratio function of the fault current and the starting current constant;

[0143] The relay protection device is set according to the starting current setting value and the action time setting value, a fault area topology map including a node set and an edge set is established, the fault point location is determined in the fault area topology map, and the minimum isolation range under the condition that the fault point is included in the isolation area set and there is a reachable path between the non-isolated area node and the area boundary is calculated, a trip sequence including a circuit breaker number and an action time is generated based on the minimum isolation range, and the corresponding circuit breaker is controlled to act according to the trip sequence to complete the isolation of the fault area;

[0144] After completing the isolation of the fault area, a load node importance weight vector is established, and a network reconstruction plan is calculated based on the load node importance weight vector so that the weighted sum of the importance weight and the power supply status of the load node is maximized and the operation constraints of the node voltage deviation, line current and equipment capacity are met. The network reconstruction plan includes a switch operation sequence of switch number, switch opening and closing status and operation timing, and the topology of the power grid is reconstructed according to the switch operation sequence.

[0145] Exemplarily, first, a setting value mapping matrix is ​​constructed. The rows of this matrix correspond to the number of each protection device, and the columns correspond to the different action stages of each protection device (for example, the protection device can act in stages according to the size of the fault current). Each element in the matrix represents the overcurrent protection starting current coefficient and time coefficient corresponding to the protection device and the action stage. The control strategy generates a particle position vector, each element of which represents the setting value adjustment of the corresponding protection device. Combining these adjustments with the setting value mapping matrix, the starting current setting and action time setting of each protection device can be obtained. The starting current setting is calculated by multiplying the starting current coefficient by the maximum load current. The action time setting is calculated by multiplying the time coefficient by a function of the ratio of the fault current and the starting current setting. For example, assuming that the maximum load current is 100 amperes and the starting current coefficient of a protection device is 2, then its starting current setting is 200 amperes. Assuming that the fault current is 500 amperes, the time coefficient is 0.1, and the ratio function calculation result is 0.5, then the action time setting is 0.025 seconds.

[0146] Next, the relay protection device is set according to the calculated starting current setting and action time setting. Then, a fault area topology map is established, which contains a set of nodes (e.g., substations, load points) and a set of edges (e.g., transmission lines). The location of the fault point is determined in the topology map, and the minimum isolation range is calculated. The minimum isolation range needs to meet two conditions: the fault point is contained in the isolation area, and there is a reachable path between the nodes of the non-isolated area and the area boundary. For example, assuming that the fault occurs on a transmission line, the minimum isolation range may include the circuit breakers at both ends of the line. Based on the minimum isolation range, a trip sequence is generated, which contains the numbers of the circuit breakers that need to be tripped and their trip times. These circuit breakers are controlled to act according to the trip sequence to complete the isolation of the fault area. For example, the trip sequence can be to trip the circuit breakers at both ends of the fault line first, and then trip other circuit breakers connected to the fault line.

[0147] Finally, after the fault area is isolated, a load node importance weight vector is established. This vector reflects the importance of each load node. For example, load nodes such as hospitals and important factories will have higher weights. The network reconstruction plan is calculated based on this weight vector, with the goal of maximizing the weighted sum of the importance weight and the power supply status of the load nodes and satisfying operational constraints such as node voltage deviation, line current, and equipment capacity. The network reconstruction plan contains a switch operation sequence of switch numbers, switch separation and closing states, and operation timing. For example, the reconstruction plan may include closing switches on certain backup lines to restore power supply to non-faulty areas. The power grid is topologically reconstructed according to the switch operation sequence to restore power supply to non-faulty areas. For example, assuming that the weight of a load node is 1 and the power supply status is 1 (indicating that power supply has been restored), its contribution value is 1. Assuming that the weight of another load node is 0.5 and the power supply status is 0 (indicating that power supply has not been restored), its contribution value is 0.

[0148] The present invention can minimize the impact of the fault on the power grid by quickly isolating the fault area, ensure continuous power supply in non-fault areas, and thus improve the power supply reliability of the power grid; quickly isolating the fault and restoring power supply in non-fault areas can shorten the power outage time and reduce the economic losses and social impact caused by the power outage; by considering the importance of load nodes for network reconstruction, the power supply of important loads can be restored first, thereby optimizing the configuration of power grid resources and improving the efficiency of power grid operation.

[0149] Figure 2 FIG. 1 is a schematic diagram of a structure of a power grid fault waveform recognition and intelligent relay protection rapid control system according to an embodiment of the present invention. Figure 2 As shown, the system comprises:

[0150] The first unit is used to collect voltage and current waveform data of power grid operation in real time, and perform digital filtering and noise elimination processing on the voltage and current waveform data to obtain pre-processed voltage and current waveform data; perform Fourier transform and wavelet transform processing on the pre-processed voltage and current waveform data at the same time, extract time domain features and frequency domain features of the voltage and current waveform data, and combine the time domain features and frequency domain features to construct a combined feature vector, and store the combined feature vector in a feature vector database;

[0151] The second unit is used to train a deep learning model including a convolutional neural network and a long short-term memory network based on the combined feature vectors in the feature vector database, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude to obtain a fault diagnosis result;

[0152] The third unit is used to optimize the fault isolation time, power supply recovery rate and system stability based on the fault diagnosis result by using a multi-objective particle swarm optimization algorithm to obtain a control strategy, wherein the multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and adaptively weighting multiple optimization objectives according to the target weight matrix; adjusting the setting value of the relay protection device according to the control strategy so that it executes fault area isolation, and controlling the power grid to perform topology reconstruction.

[0153] According to a third aspect of the embodiments of the present invention,

[0154] An electronic device is provided, comprising:

[0155] processor;

[0156] a memory for storing processor-executable instructions;

[0157] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0158] According to a fourth aspect of the embodiments of the present invention,

[0159] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0160] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0161] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for rapid control of power grid fault waveform recognition and intelligent relay protection, characterized in that: include: Collecting voltage and current waveform data of power grid operation in real time, and performing digital filtering and noise elimination on the voltage and current waveform data to obtain pre-processed voltage and current waveform data; Simultaneously performing Fourier transform and wavelet transform processing on the preprocessed voltage and current waveform data, extracting time domain features and frequency domain features of the voltage and current waveform data, combining the time domain features and the frequency domain features to construct a combined feature vector, and storing the combined feature vector in a feature vector database; Based on the combined feature vectors in the feature vector database, a deep learning model including a convolutional neural network and a long short-term memory network is trained, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude to obtain a fault diagnosis result; Based on the fault diagnosis results, a multi-objective particle swarm optimization algorithm is used to optimize the fault isolation time, power supply recovery rate and system stability to obtain a control strategy. The multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and adaptively weighting multiple optimization objectives according to the target weight matrix; adjusting the setting value of the relay protection device according to the control strategy so that it executes fault area isolation, and controlling the power grid to perform topology reconstruction.

2. The method according to claim 1, characterized in that The steps of simultaneously performing Fourier transform and wavelet transform on the preprocessed voltage and current waveform data, extracting time domain features and frequency domain features of the voltage and current waveform data, and combining the time domain features and frequency domain features to construct a combined feature vector include: Performing Fourier transform processing on the preprocessed voltage and current waveform data, dividing the preprocessed voltage and current waveform data into a plurality of frequency sub-bands, extracting amplitude characteristics and phase characteristics of the plurality of frequency sub-bands, and composing the amplitude characteristics and phase characteristics into a frequency domain feature vector; Using wavelet basis functions to perform multi-layer wavelet decomposition on the pre-processed voltage and current waveform data, extracting energy features, standard deviation features and peak features of each layer of the multi-layer wavelet decomposition, and composing the energy features, standard deviation features and peak features into a time domain feature vector; The frequency domain feature vector and the time domain feature vector are respectively normalized to obtain a normalized feature vector, the intra-class sample mean and the inter-class sample mean of the normalized feature vector are calculated, an inter-class dispersion matrix and an intra-class dispersion matrix are constructed based on the intra-class sample mean and the inter-class sample mean, a ratio of the inter-class dispersion matrix to the intra-class dispersion matrix is ​​used as a maximum inter-class and intra-class distance objective function, a gradient iteration method is used to solve the maximum inter-class and intra-class distance objective function to obtain a feature weight vector, and the normalized feature vectors are weighted combined according to the feature weight vector to obtain a combined feature vector.

3. The method according to claim 1, characterized in that Based on the combined feature vectors in the feature vector database, a deep learning model including a convolutional neural network and a long short-term memory network is trained, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude. The steps of obtaining the fault diagnosis result include: A multi-branch parallel convolution structure is used to extract spatial features from the combined feature vector, wherein each convolution branch in the multi-branch parallel convolution structure comprises multiple convolution layers and residual connections, and the features extracted by each convolution branch are concatenated to obtain spatial features; Reorganizing the spatial features into a feature sequence in time sequence, inputting the feature sequence into a bidirectional long short-term memory network, wherein the bidirectional long short-term memory network comprises a forward state output and a backward state output, and concatenating the forward state output and the backward state output to obtain a time sequence feature; An attention mechanism is constructed to calculate the feature contribution weights of the spatial features and the temporal features, and the spatial features and the temporal features are adaptively fused according to the feature contribution weights to obtain fused features; Based on the fusion features, a fault type identification branch, a fault location location branch and a fault amplitude evaluation branch are constructed, and the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location location branch and the weighted mean absolute error loss of the fault amplitude evaluation branch are combined into a multi-task loss function; the multi-task loss function is optimized and trained to obtain a fault diagnosis model; The voltage and current waveform data to be diagnosed are input into the fault diagnosis model, the fault type identification result is output through the fault type identification branch, the fault position location result is output through the fault position location branch, and the fault amplitude evaluation result is output through the fault amplitude evaluation branch, and the fault type identification result, the fault position location result and the fault amplitude evaluation result are combined to form a fault diagnosis result.

4. The method according to claim 3, characterized in that The steps of constructing a fault type identification branch, a fault location location branch and a fault amplitude evaluation branch based on the fusion feature, and forming a multi-task loss function by combining the cross entropy loss of the fault type identification branch, the weighted mean square error loss of the fault location location branch and the weighted mean absolute error loss of the fault amplitude evaluation branch include: Obtain fault type labels, fault location labels, and fault amplitude labels through manual labeling; Based on the fusion feature, a fault type identification branch is constructed, wherein the fault type identification branch includes multiple fully connected layers, the output of the fully connected layer is nonlinearly transformed through an activation function, the output of the last layer is transformed through a softmax function to obtain a fault type probability distribution, the fault type label is smoothed to obtain a smooth label, and a cross entropy loss is calculated based on the smooth label and the fault type probability distribution; A fault location location branch is constructed based on the fused features, the fault location location branch performs feature transformation through multiple fully connected layers to obtain a fault location prediction value, the fused features are input into a fully connected layer and a softmax function is performed to obtain an adaptive weight coefficient, a mean square error between the fault location prediction value and the fault location label is calculated, and the mean square error is multiplied by the adaptive weight coefficient to obtain a weighted mean square error loss; A fault amplitude evaluation branch is constructed based on the fused features, wherein the fault amplitude evaluation branch includes an attention mechanism composed of multiple layers of fully connected layers, wherein the attention mechanism transforms the fused features and obtains an attention score through a sigmoid function, inputs the fused features into the multiple layers of fully connected layers to obtain an amplitude prediction value, calculates an absolute error between the amplitude prediction value and the fault amplitude label, and multiplies the absolute error by the attention score to obtain a weighted mean absolute error loss; The cross entropy loss, weighted mean square error loss and weighted mean absolute error loss are added together to obtain a multi-task loss function.

5. The method according to claim 3, characterized in that: The step of optimizing and training the multi-task loss function to obtain a fault diagnosis model includes: Calculating the gradient of the multi-task loss function with respect to the trainable parameters in the deep learning model, the gradient includes the cross entropy loss gradient of the fault type identification branch, the weighted mean square error loss gradient of the fault location location branch, and the weighted mean absolute error loss gradient of the fault amplitude assessment branch; Based on the gradient, an optimizer is used to update the parameters of the deep learning model, and the learning rate of each branch is adjusted by an adaptive learning rate adjustment mechanism, wherein the adaptive learning rate adjustment mechanism dynamically calculates the learning rate according to the number of training steps, and the learning rate is jointly determined by the basic learning rate, the momentum term decay rate, and the second-order moment estimate decay rate; After each training round, the accuracy of fault type identification, the root mean square error of fault location positioning and the weighted mean absolute error of fault amplitude evaluation are calculated on the validation set, and the comprehensive performance index is calculated based on the accuracy, root mean square error and weighted mean absolute error; when the comprehensive performance index does not improve for multiple consecutive training rounds, the early stopping mechanism is triggered and the model parameters with the best performance in the validation set are selected; Calculate the mean and standard deviation of the loss function of multiple consecutive small batches of data. When the ratio of the standard deviation to the mean is less than a preset threshold, determine that the loss function has reached a stable state; calculate the standard deviation of the performance index of multiple consecutive training rounds. When the standard deviation of the performance index is less than the preset threshold and the loss function is in a stable state, confirm that the model training has converged, and use the model parameters at the time of convergence as the parameters of the fault diagnosis model; The confusion matrix and F1 score of the fault type identification branch, the root mean square error and relative error of the fault location branch, and the mean absolute error and relative error of the fault amplitude assessment branch of the fault diagnosis model are calculated on the test set. Cross-validation is performed under different load conditions, different speed conditions, and different fault severity to obtain the final fault diagnosis model.

6. The method according to claim 1, characterized in that Based on the fault diagnosis result, a multi-objective particle swarm optimization algorithm is used to optimize the fault isolation time, power supply recovery rate and system stability to obtain a control strategy. The multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and the steps of adaptively weighting multiple optimization targets according to the target weight matrix include: A target weight matrix is ​​constructed based on historical fault data of the power grid, wherein the target weight matrix includes a fault isolation time weight coefficient, a power supply recovery rate weight coefficient and a system stability weight coefficient, wherein the fault isolation time weight coefficient, the power supply recovery rate weight coefficient and the system stability weight coefficient are calculated by performing principal component analysis and entropy weight method on the historical fault data of the power grid, and are dynamically adjusted through an adaptive weight update mechanism according to real-time fault characteristics and system status; the adaptive weight update mechanism comprises: establishing a fuzzy rule base according to real-time fault characteristics, calculating the fuzzy membership of the fault isolation time, power supply recovery rate and system stability based on the real-time fault characteristics and system status, combining the fuzzy membership with the historical data weight coefficient to obtain a dynamic adjustment coefficient, and updating the target weight matrix in real time according to the dynamic adjustment coefficient; The setting value combination of the relay protection device is encoded as a particle position vector, the adjustment direction and step size of the setting value are encoded as a particle velocity vector, the particle swarm is initialized and iterative optimization is performed, and in each iteration, a multi-objective optimization function including fault isolation time, power supply recovery rate and system stability is constructed based on the target weight matrix, wherein the fault isolation time considers the protection action time and the switch operation time, the power supply recovery rate considers the ratio of the power outage load capacity to the total load capacity of the system, and the system stability considers the uniformity of power flow distribution and the degree of voltage deviation; All particles are classified by non-dominated sorting, and local sorting is performed based on crowding distance within the same non-dominated level to obtain a Pareto optimal solution set, from which the optimal solution is selected as a control strategy.

7. The method according to claim 6, characterized in that The steps of adjusting the setting value of the relay protection device according to the control strategy to isolate the fault area and controlling the power grid to reconfigure the topology include: Based on the control strategy, a setting value mapping matrix including an overcurrent protection starting current coefficient and a time coefficient is constructed, wherein the rows in the setting value mapping matrix represent the protection device number, and the columns represent the number of protection action stages, and the setting value adjustment amount of the relay protection device is determined according to the particle position vector in the control strategy, and the setting value adjustment amount is combined with the setting value mapping matrix to obtain a starting current constant and an action time constant of the overcurrent protection, wherein the starting current constant is calculated by multiplying the starting current coefficient by the maximum load current, and the action time constant is calculated by multiplying the time coefficient by the ratio function of the fault current and the starting current constant; The relay protection device is set according to the starting current setting value and the action time setting value, a fault area topology map including a node set and an edge set is established, the fault point location is determined in the fault area topology map, and the minimum isolation range under the condition that the fault point is included in the isolation area set and there is a reachable path between the non-isolated area node and the area boundary is calculated, a trip sequence including a circuit breaker number and an action time is generated based on the minimum isolation range, and the corresponding circuit breaker is controlled to act according to the trip sequence to complete the isolation of the fault area; After completing the isolation of the fault area, a load node importance weight vector is established, and a network reconstruction plan is calculated based on the load node importance weight vector so that the weighted sum of the importance weight and the power supply status of the load node is maximized and the operation constraints of the node voltage deviation, line current and equipment capacity are met. The network reconstruction plan includes a switch operation sequence of switch number, switch opening and closing status and operation timing, and the topology of the power grid is reconstructed according to the switch operation sequence.

8. A power grid fault waveform recognition and intelligent relay protection rapid control system, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to collect voltage and current waveform data of power grid operation in real time, and perform digital filtering and noise elimination on the voltage and current waveform data to obtain pre-processed voltage and current waveform data; Simultaneously performing Fourier transform and wavelet transform processing on the preprocessed voltage and current waveform data, extracting time domain features and frequency domain features of the voltage and current waveform data, combining the time domain features and the frequency domain features to construct a combined feature vector, and storing the combined feature vector in a feature vector database; The second unit is used to train a deep learning model including a convolutional neural network and a long short-term memory network based on the combined feature vectors in the feature vector database, wherein the deep learning model is used to identify the type of power grid fault, locate the fault position, and evaluate the fault amplitude to obtain a fault diagnosis result; The third unit is used to optimize the fault isolation time, power supply recovery rate and system stability based on the fault diagnosis result by using a multi-objective particle swarm optimization algorithm to obtain a control strategy, wherein the multi-objective particle swarm optimization algorithm includes constructing a target weight matrix based on historical fault data of the power grid, and adaptively weighting multiple optimization objectives according to the target weight matrix; adjusting the setting value of the relay protection device according to the control strategy so that it executes fault area isolation, and controlling the power grid to perform topology reconstruction.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Branch box intelligent monitoring and fault isolation method and system

    CN120150364A

  • Grid-connected voltage stability influence assessment method for energy storage system with potential energy and electric energy conversion

    CN120235483A

  • Sandbox-based electric power agent process isolation protection method and system

    CN120337206A

  • Power intelligent body process isolation protection method and system based on sandbox

    CN120337206B

  • Electronic selvage control method and system based on FPGA (Field Programmable Gate Array)

    CN120353178A