Intelligent fault diagnosis method and system for power system
By using regular embedded CNN models in the power system to diagnose the wave recording data, the problem of degradation of identification accuracy in complex fault conditions is solved by traditional methods, and high-accurate fault type prediction is achieved.
Patent Information
- Application Number
- CN202411588718.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-11
AI Technical Summary
In power systems, traditional fault diagnosis methods based on voltage and current sequence component relationships continue to decline when facing complex fault voltage and current characteristics, and there is no relevant technology that uses rules to embed neural networks to predict fault types.
The regular embedded CNN model is used to build fault matrix data by collecting wave recording data under different working conditions, adding label vectors and segmenting data sets, and training the regular embedded CNN model to determine the fault diagnosis model and deploying it to the power system for fault diagnosis.
It realizes automatic fault diagnosis of the recorded wave data when a sudden current change occurs in the power system, accurately predict the fault type, and improves the accuracy and applicability of fault diagnosis.
Smart Images

Figure CN119598247A_ABST
Abstract
Description
Background Art
[0002] With the advancement of the "dual carbon" goal, the penetration rate of clean energy is increasing day by day, and the complexity of the power grid is constantly increasing. When different types of short-circuit faults occur in the line, the fault voltage and current characteristics become more and more complex, and no longer have clear and intuitive rules. The recognition accuracy of the traditional fault diagnosis method based on the relationship between voltage and current sequence components continues to decline. To solve this problem, embedding rules into neural networks is a method of directly applying existing knowledge, experience or logical rules to neural networks. While utilizing the flexibility and generalization ability of data-driven models, it also draws on the guiding role of rules to form a learning strategy with complementary advantages.
[0003] In summary, there is no relevant technology using rule-embedded neural networks to predict fault types in the field of power system fault diagnosis. Summary of the invention
[0004] In order to overcome the problem that there is no technology related to predicting fault types using rule-embedded neural networks in the field of power system fault diagnosis, the present invention provides an intelligent fault diagnosis method and system for a power system.
[0005] In a first aspect, in order to solve the above technical problems, the present invention provides an intelligent fault diagnosis method for a power system, comprising:
[0006] According to the preset fault starting time and the preset acquisition time window, the recording data of consecutive preset sampling points under different working conditions are collected to determine the fault matrix data corresponding to each sampling point; wherein each row of the fault matrix data represents the recording data corresponding to the sampling point under one working condition;
[0007] Add a label vector representing the fault type to each fault matrix data, determine the data set, and divide the data set into a training set and a test set according to a preset ratio;
[0008] The rule-embedded CNN model is trained using the training set, and the trained rule-embedded CNN model is tested using the test set to determine the fault diagnosis model;
[0009] The fault diagnosis model is deployed in the power system, and fault data is collected when a sudden current change occurs in the power system. The fault diagnosis model is used to diagnose the fault data and determine the fault type.
[0010] In a second aspect, the present invention provides an intelligent fault diagnosis system for a power system, comprising:
[0011] The fault matrix data determination module is used to collect the recorded wave data of consecutive preset sampling points under different working conditions according to the preset fault starting time and the preset acquisition time window, and determine the fault matrix data corresponding to each sampling point; wherein each row of the fault matrix data represents the recorded wave data corresponding to the sampling point under one working condition;
[0012] A data set determination module is used to add a label vector representing the fault type to each fault matrix data, determine the data set, and divide the data set into a training set and a test set according to a preset ratio;
[0013] The model training module is used to train the rule-embedded CNN model through the training set, and to test the trained rule-embedded CNN model using the test set to determine the fault diagnosis model;
[0014] The fault diagnosis module is used to deploy the fault diagnosis model into the power system and collect fault data when a sudden current change occurs in the power system. The fault diagnosis model is used to diagnose the fault data and determine the fault type.
[0015] The beneficial effects of the present invention are: according to the preset fault starting time and the preset acquisition time window, the recording data of the continuous preset sampling points under different working conditions are collected to construct a data set, and the rule-embedded CNN model is trained through the data set to obtain a fault diagnosis model, and the fault diagnosis model is deployed in the power system, so that when the current in the power system suddenly changes, the recording data can be automatically diagnosed and the fault type can be predicted. The present application can diagnose faults in a timely manner and is suitable for various new power systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0017] Figure 1 A schematic diagram of a flow chart of an intelligent fault diagnosis method for a power system according to an embodiment of the present invention;
[0018] Figure 2 Schematic diagram of fault matrix data A of the present invention;
[0019] Figure 3 It is a structural schematic diagram of a double-terminal power transmission system;
[0020] Figure 4 A data collection schematic diagram of a preset fault starting time and a preset collection time window;
[0021] Figure 5 It is a schematic diagram of the structure of the rule-embedded CNN model;
[0022] Figure 6is the loss function of the training set during training;
[0023] Figure 7 The various precision rates of the confusion matrix of the prediction results on the test set;
[0024] Figure 8 It is the fault distance matrix of the prediction results during online diagnosis;
[0025] Fig. 9 The present invention is a schematic diagram of the structure of an intelligent fault diagnosis system for a power system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following examples are provided to further explain and supplement the present invention and do not constitute any limitation to the present invention.
[0027] The following describes an intelligent fault diagnosis method and system for a power system according to an embodiment of the present invention in conjunction with the accompanying drawings.
[0028] like Figure 1 As shown, the present invention provides an intelligent fault diagnosis method for a power system, comprising:
[0029] S1. Collect the recorded data of preset sampling points under different working conditions according to the preset fault starting time and the preset collection time window, and determine the fault matrix data corresponding to each sampling point; wherein each row of the fault matrix data represents the recorded data corresponding to the sampling point under one working condition.
[0030] S2. Add a label vector representing the fault type to each fault matrix data, determine the data set, and divide the data set into a training set and a test set according to a preset ratio.
[0031] S3. Train the rule-embedded CNN model using the training set, and test the trained rule-embedded CNN model using the test set to determine the fault diagnosis model.
[0032] S4. Deploy the fault diagnosis model into the power system, collect waveform data when a sudden current change occurs in the power system, diagnose the fault data through the fault diagnosis model, and determine the fault type.
[0033] In this embodiment, the recording data of preset sampling points under different working conditions are collected continuously according to the preset fault starting time and the preset collection time window, so as to construct a data set, and the rule-embedded CNN model is trained through the data set to obtain a fault diagnosis model. The fault diagnosis model is deployed in the power system, so that when a sudden current change occurs in the power system, the recording data can be automatically diagnosed and the fault type can be predicted. This application can diagnose faults in a timely manner and is suitable for various new power systems.
[0034] In this embodiment, the number of sampling points is set according to actual conditions.
[0035] like Figure 2 As shown, the recorded data includes the positive sequence current amplitude of phase A in the power system Negative sequence current amplitude Zero sequence current amplitude Positive sequence current phase Negative sequence current phase Zero sequence current phase Positive sequence voltage amplitude Negative sequence voltage amplitude Zero sequence voltage amplitude Positive sequence voltage phase Negative sequence voltage phase Zero sequence voltage phase Phase difference between positive sequence current fault component and negative sequence current Phase difference between zero-sequence current fault component and negative-sequence current Ratio of zero-sequence current to positive-sequence current fault component amplitude Negative sequence current to positive sequence current fault component amplitude ratio
[0036] Different working conditions include A-phase grounding fault, B-phase grounding fault, C-phase grounding fault, AB two-phase short circuit fault, BC two-phase short circuit fault, AC two-phase short circuit fault, AB two-phase short circuit grounding fault, BC two-phase short circuit grounding fault, AC two-phase short circuit grounding fault, three-phase short circuit grounding fault and no fault, a total of 11 situations.
[0037] In summary, each sampling point collects 16 recording data under different working conditions and uses Figure 2 The fault matrix data A is obtained by arranging them in the manner shown, wherein each row in A represents 16 recorded data corresponding to the sampling points under one working condition.
[0038] In this embodiment, the neural network model needs to rely on massive fault data, especially representative data for training, in order to improve the accuracy of fault diagnosis of the target system. Therefore, for each sampling point, 1,000 sets of data are collected under each working condition, and a total of 11,000 sets of fault matrix data A constitute the data set.
[0039] In this embodiment, the label vector is an eleven-dimensional vector, in which each dimension corresponds to a fault type. The label vector L corresponding to each fault matrix data A will be defined according to its fault type. The position corresponding to the fault in the vector is set to 1, and the remaining positions are set to 0. The specific corresponding fault type of each dimension in the label vector L is defined as follows:
[0040] The first dimension corresponds to the A phase grounding fault; the second dimension corresponds to the B phase grounding fault; the third dimension corresponds to the C phase grounding fault; the fourth dimension corresponds to the AB two-phase short-circuit fault; the fifth dimension corresponds to the BC two-phase short-circuit fault; the sixth dimension corresponds to the AC two-phase short-circuit fault; the seventh dimension corresponds to the AB two-phase short-circuit grounding fault; the eighth dimension corresponds to the BC two-phase short-circuit grounding fault; the ninth dimension corresponds to the AC two-phase short-circuit grounding fault; the tenth dimension corresponds to the three-phase short-circuit grounding fault; and the eleventh dimension corresponds to no fault.
[0041] For example, if a certain fault matrix data A corresponds to an AB two-phase short circuit fault, its label vector L is [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], and 11,000 sets of fault matrix data A and the corresponding label vectors L constitute the original data set FDS1.
[0042] In this embodiment, the data set is divided into a training set and a test set in a ratio of 8:2.
[0043] Optionally, recording data of preset sampling points under different working conditions are collected continuously according to the preset fault starting time and the preset collection time window, including:
[0044] When the logarithm of the product of the numerical values of the A-phase current of consecutive preset sampling points in the power system is greater than the preset threshold, the time when the first sampling point among the sampling points collects the A-phase current is taken as the preset fault starting time;
[0045] The formula for presetting the acquisition time window is as follows:
[0046]
[0047] Wherein, ξ represents the preset acquisition time window, a is the first preset constant, λ represents the Euler-Masqueroni constant, [·] roundup Indicates rounding up, f s Indicates the sampling frequency.
[0048] In this embodiment, the following formula is used to determine whether the logarithm of the product of the numerical values of the A-phase current of consecutive preset sampling points in the power system is greater than a preset threshold:
[0049]
[0050] Among them, x i It represents the A-phase current of the i-th sampling point, the unit is Ka, a represents the number of sampling points, k set represents a preset threshold, which is 4.5 in this embodiment.
[0051] This embodiment takes a line in a two-terminal power supply system where one side is connected to a new energy power source and the other side is connected to a traditional synchronous machine power source as an example. The circuit diagram is as follows: Figure 3As shown, according to the sampling frequency f of the current acquisition device s , determine the preset acquisition time window T according to the following formula s :
[0052]
[0053] Among them, T s represents the preset acquisition time window, a is the first preset constant, λ represents the Euler-Masqueroni constant, [·] roundup Indicates rounding up, f s Indicates the sampling frequency.
[0054] In this embodiment, the preset fault starting time ts is taken as the midpoint. Figure 4 As shown in the figure, the fault data acquisition time window is set to T before the fault start time ts. s / 2 and after T s / 2, in this embodiment, the sampling frequency f of the current acquisition device s =10kHz, according to the above formula, the fault data acquisition time window length f is calculated s =0.02s.
[0055] Optionally, a label vector representing the fault type is added to each fault matrix data, including:
[0056] Standardize each fault matrix data, scale each data in the fault matrix data to 0 to 1, and determine a standardized matrix;
[0057] A label vector representing the fault type is added to each standardized matrix to determine the data set.
[0058] In this embodiment, all data in the fault matrix data A are standardized by implementing the maximum-minimum standardization method. Each data point is scaled to a range of 0 to 1 to eliminate the dimension and order of magnitude differences of each data. The standardized calculation formula is as follows:
[0059]
[0060] Among them, A normalized (m, n) represents the normalized matrix, m and n represent the rows and columns of the fault matrix data A respectively, A(m, n) represents the fault matrix data A, max(A col (n))、min(A col (n)) represent the maximum and minimum values of the low n columns of the fault matrix data A respectively.
[0061] Optionally, the total loss function of the neural network of the rule-embedded CNN model includes a cross entropy loss function and an error function based on rule matrix diagnosis; wherein the total loss function formula is as follows:
[0062] Loss = Loss2 + α × Loss1
[0063] Among them, Loss represents the total loss function, Loss1 represents the cross entropy loss function, Loss2 represents the error function, and a represents the rule matrix weight coefficient.
[0064] In this embodiment, the cross entropy loss function Loss1 of the traditional CNN model and the error function Loss2 based on rule matrix diagnosis are integrated to obtain the loss function Loss of the rule-embedded CNN model, and the rule embedding is completed. This embedding of rules into the model can reduce the demand for a large amount of data in the neural network model. Using rules embedded in neural networks with certain knowledge and experience can greatly improve the performance of data-driven solutions under limited sample sets, and also enhance the interpretability of diagnostic results.
[0065] Optionally, the formula for the cross entropy loss function is as follows:
[0066]
[0067] Among them, Loss1 represents the cross entropy loss function, L(i) represents the i-th element of the label vector in the standardized matrix input in the training set, and y(i) represents the probability distribution of different fault types after the standardized matrix input rule is embedded in the CNN model.
[0068] Optionally, the error function is formulated as follows:
[0069]
[0070] Wherein, Loss2 represents the error function, N represents the second preset constant, Ideal(i) represents the ideal vector, and Real(i) represents the actual vector;
[0071] The process of obtaining the ideal vector includes:
[0072] Obtain a preset standardized first target rule matrix, and multiply the label vector corresponding to the standardized matrix input in the training set by the first target rule matrix to determine a second target rule matrix;
[0073] Each row in the second target rule matrix is repeatedly expanded multiple times until it is expanded to the same number of rows as the input normalized matrix, and then expanded into a one-dimensional vector by row to determine the ideal vector;
[0074] The actual vector acquisition process includes:
[0075] Expand the last four columns of the standardized matrix input in the training set by rows to determine the actual vector.
[0076] In this embodiment, the accuracy of the rule-embedded CNN model is improved by adding a rule matrix obtained based on prior knowledge constraints into the total loss function.
[0077] In this embodiment, the rule matrix is a matrix constructed based on expert experience and traditional synchronous machine power system fault diagnosis rules. Each row corresponds to a fault type, providing an ideal reference value for various fault types. The rule matrix R is:
[0078]
[0079] The preset rule matrix R is standardized to eliminate the dimension and magnitude differences of all elements and scaled to the range of 0 to 1. The standardized first target rule matrix is obtained as follows:
[0080]
[0081] Among them, R normalized (m, n) represents the first target rule matrix, m and n represent the rows and columns of the rule matrix R, R(m, n) represents the rule matrix R, max(A col (n+12), min(A col (n+12) represents the maximum and minimum values of the n+12th column of the regular matrix R respectively.
[0082] In this embodiment, the label vector L and R corresponding to the standardized matrix normalized (m, n) are multiplied to obtain a new second target rule matrix. Each row in the second target rule matrix is repeatedly expanded multiple times until it is expanded to the same number of rows as the input standardized matrix. Then, the expanded matrix is flattened into a one-dimensional vector by row, which is recorded as the ideal vector Ideal. In this embodiment, the size of the second target rule matrix is 1×4, and the size of the ideal vector Ideal is 1×800.
[0083] In this embodiment, the size of the actual vector Real is also 1×800.
[0084] Optionally, the rule embedded CNN model includes an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer and an output layer;
[0085] The rule-embedded CNN model is trained using the training set, and the trained rule-embedded CNN model is tested using the test set to determine the fault diagnosis model, including:
[0086] The standardized matrix in the training set is passed through the input layer, the first convolution layer, the first pooling layer, the second convolution layer, the second pooling layer, the fully connected layer, and the output layer in sequence to determine the probability distribution of different fault types corresponding to the standardized matrix;
[0087] Calculate the total loss function and the gradient of the total loss function to the model parameters;
[0088] According to the set learning rate and batch size, the model weights and biases are updated, and the forward propagation, loss calculation, and back propagation are repeated until the number of iterations reaches the set number of training rounds, and then the training is stopped to obtain the trained rule-embedded CNN model;
[0089] The trained rule-embedded CNN model is tested through the test set to determine the fault diagnosis model.
[0090] like Figure 5 As shown in the figure, the training process of the model mainly includes forward propagation, loss calculation, and back propagation, where:
[0091] Forward propagation: The standardized matrix in the training data is passed to the regular embedded CNN model, passing through the input layer, the first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, the fully connected layer and the output layer in sequence, and finally the predicted probability distribution y of the model is obtained.
[0092] Loss calculation: Calculate the cross entropy loss function Loss1 of the traditional CNN model and the error function Loss2 based on rule matrix diagnosis, and calculate the total loss function Loss according to the set α value.
[0093] Back propagation: Calculate the gradient of the total loss function Loss to the model parameters, update the model weights and biases according to the set learning rate and batch size, gradually optimize the model, and repeat the forward propagation, loss calculation, and back propagation process until the number of iterations reaches the set number of training epochs, then stop training and obtain the trained rule-embedded CNN model.
[0094] Optionally, the learning rate is set to 0.001, the batch size is set to 20, and the number of training rounds is set to 100 rounds.
[0095] The total loss function during the model training process in this embodiment changes as follows: Figure 6 As shown, it can be seen that when 100 rounds of iterative training are reached, the total loss function meets the requirements and the trained rule-embedded CNN model is obtained.
[0096] In this embodiment, the test set is used to test the trained rule-embedded CNN model, and the model training effect is evaluated by the various precision rates of the confusion matrix. In this embodiment, the various precision rates of the confusion matrix of the prediction results on the test set are obtained as follows: Figure 7 As shown, the accuracy of distinguishing each fault type exceeds 95%.
[0097] Optionally, the fault data is diagnosed by a fault diagnosis model to determine the fault type, including:
[0098] Input the fault data into the first convolution layer through the input layer, perform convolution operation on the training set, and determine the first output matrix;
[0099] Input the first output matrix into the first pooling layer for downsampling processing to determine the second output matrix;
[0100] Input the second output matrix into the second convolutional layer for convolution operation to determine the third output matrix;
[0101] Input the third output matrix into the second pooling layer for downsampling processing to determine a fourth output matrix;
[0102] Input the fourth output matrix into the fully connected layer, expand the fourth output matrix into a one-dimensional vector by row, and map it to the output space to determine the fifth output matrix;
[0103] The fifth output matrix is input into the output layer to determine the fault type.
[0104] The fault diagnosis process is described with a specific embodiment, as follows:
[0105] When a sudden current change occurs in the power system, for example, the logarithm of the product of the numerical values of the A-phase current at six consecutive sampling points is greater than 4.5, the online diagnosis process is started, the time corresponding to the first sampling point is traced back as the preset fault start time, and the preset acquisition time window is calculated.
[0106] Collect fault data at the preset fault start time and preset collection time window to construct the fault data matrix A 2 , A 2 The matrix size is 200×16.
[0107] For the fault data matrix A 2 Perform standardization to obtain the standardized matrix A normalized2 .
[0108] Normalize the matrix A normalized2 Add label vector L 2 , construct the fault data set FDS2.
[0109] Input FDS2 into the fault diagnosis model, perform forward propagation calculation, and obtain the probability distribution of the output layer. The process is as follows:
[0110] After the input layer receives FDS2, there is no computational change and it is directly passed to the first convolutional layer for convolution operation.
[0111] The first convolutional layer uses a 2×2 convolution kernel K to convolve A in FDS2. normalized2After convolution and superimposing the bias matrix b[1], the nonlinear activation function ReLU is applied to obtain the output matrix h of the first convolutional layer. [1] , the calculation formula is as follows:
[0112] h [1] =ReLU(X*K+b [1] )
[0113] Where X = Anormalized2, K is a 2×2 convolution kernel, b[1] is a bias matrix, * represents a convolution operation, and the activation function uses the ReLU function, which is expressed as:
[0114] ReLU(x)=max(0,x)
[0115] max(0, x) means taking the maximum value between 0 and x.
[0116] The first pooling layer uses the maximum pooling method to downsample h[1]. Specifically, the pooling window size is set to 2×2 with a step size of 2. The first pooling layer reduces the size of the input h[1] from the original 200×16 to the second output matrix h [2] The calculation formula of the first pooling layer is 100×8:
[0117]
[0118] Where i and j are integers, 1≤i≤100, 1≤j≤8, and m and n are the rows and columns of h[1] respectively.
[0119] Similar to the first convolutional layer, the second convolutional layer uses a 3×3 convolution kernel K′ for convolution operation and adds a bias matrix b [2] , and then the third output matrix hx of the second convolutional layer output is obtained through the ReLU activation function 3] , the calculation formula is as follows:
[0120] h [3] =ReLU(X*K′+b [2] )
[0121] Among them, K′ is a 3×3 convolution kernel, b [2] is the bias matrix.
[0122] The second pooling layer also uses the maximum pooling method to pool h [3] Downsampling is performed, the pooling window size is still 2×2, the step size is 2, and after the second pooling layer, h [3] The size of will be further reduced to obtain the fourth output matrix h [4] , the calculation formula of the second pooling layer is as follows:
[0123]
[0124] Where i and j are integers, 1≤i≤50, 1≤j≤4, m and n are h respectively. [3] rows and columns.
[0125] The fully connected layer first transforms the output h of the second pooling layer [4] Flatten row by row into a one-dimensional vector h1 [4] , combine the previously extracted features and map them to the final output space to obtain the fifth output matrix h [5] , the calculation formula of the fully connected layer is as follows:
[0126] h [5] =ReLU(W [5] h1 [4] +b [5] )
[0127] Among them, W [5] is the weight matrix of the fully connected layer, b [5] is the offset.
[0128] The output layer receives the output of the fully connected layer h [5] And convert it into a probability distribution to obtain the probability value of each fault type. The calculation formula of the output layer is as follows:
[0129] h [6] =W [6] ·h [5] +b [6]
[0130]
[0131] Among them, W [6] is the weight matrix of the output layer, b [6] is the offset, h [6] represents the output vector of the output layer, y[i] is the probability distribution corresponding to the i-th fault data matrix predicted by the rule-embedded CNN model, is the element h [6] The index of is the sum of the exponents of all elements in , ensuring that the sum of all output values is 1, thus forming a valid probability distribution.
[0132] Calculate the fault probability distance vector D according to the probability distribution [1*11] , calculated as follows:
[0133]
[0134] Among them, y(i) represents the i-th element in the probability distribution y; D(i) represents the fault probability distance of the fault corresponding to y(i), and the category with the highest probability is the final determined fault type.
[0135] like Figure 8 As shown in FIG. 1 , the calculated fault probability distance vector is shown. It can be seen that the maximum value in the fault probability distance vector is D1(1,1)=0.34. The predicted fault type corresponding to D1(1,1) is a phase A grounding fault. The predicted fault type is consistent with the actual fault type, and the diagnosis result is correct.
[0136] like Fig. 9 As shown, the present invention provides an intelligent fault diagnosis system for a power system, comprising:
[0137] The fault matrix data determination module is used to collect the recorded wave data of consecutive preset sampling points under different working conditions according to the preset fault starting time and the preset acquisition time window, and determine the fault matrix data corresponding to each sampling point; wherein each row of the fault matrix data represents the recorded wave data corresponding to the sampling point under one working condition;
[0138] A data set determination module is used to add a label vector representing the fault type to each fault matrix data, determine the data set, and divide the data set into a training set and a test set according to a preset ratio;
[0139] The model training module is used to train the rule-embedded CNN model through the training set, and to test the trained rule-embedded CNN model using the test set to determine the fault diagnosis model;
[0140] The fault diagnosis module is used to deploy the fault diagnosis model into the power system and collect fault data when a sudden current change occurs in the power system. The fault diagnosis model is used to diagnose the fault data and determine the fault type.
[0141] Optionally, the fault matrix data determination module is specifically used to:
[0142] When the logarithm of the product of the numerical values of the A-phase current of consecutive preset sampling points in the power system is greater than the preset threshold, the time when the first sampling point among the sampling points collects the A-phase current is taken as the preset fault starting time;
[0143] The formula for presetting the acquisition time window is as follows:
[0144]
[0145] Among them, T s represents the preset acquisition time window, a is the first preset constant, λ represents the Euler-Masqueroni constant, [·] roundup Indicates rounding up, f sIndicates the sampling frequency.
[0146] Optionally, the data set determination module is specifically used to:
[0147] Standardize each fault matrix data, scale each data in the fault matrix data to 0 to 1, and determine a standardized matrix;
[0148] A label vector representing the fault type is added to each standardized matrix to determine the data set.
[0149] Optionally, the system further includes a total loss function determination module, specifically configured to:
[0150] Determine the total loss function, where the total loss function formula is as follows:
[0151] Loss = Loss2 + α × Loss1
[0152] Among them, Loss represents the total loss function, Loss1 represents the cross entropy loss function, Loss2 represents the error function, and a represents the rule matrix weight coefficient.
[0153] Optionally, the total loss function determination module includes a cross entropy loss function determination module, which is specifically used to:
[0154] Determine the cross entropy loss function, where the formula of the cross entropy loss function is as follows:
[0155]
[0156] Among them, Loss1 represents the cross entropy loss function, L(i) represents the i-th element of the label vector in the standardized matrix input in the training set, and y(i) represents the probability distribution of different fault types after the standardized matrix input rule is embedded in the CNN model.
[0157] Optionally, the total loss function determination module further includes an error function determination module, which is specifically used to:
[0158] Determine the error function, where the formula of the error function is as follows:
[0159]
[0160] Wherein, Loss2 represents the error function, N represents the second preset constant, Ideal(i) represents the ideal vector, and Real(i) represents the actual vector;
[0161] The process of obtaining the ideal vector includes:
[0162] Obtain a preset standardized first target rule matrix, and multiply the label vector corresponding to the standardized matrix input in the training set by the first target rule matrix to determine a second target rule matrix;
[0163] Each row in the second target rule matrix is repeatedly expanded multiple times until it is expanded to the same number of rows as the input normalized matrix, and then expanded into a one-dimensional vector by row to determine the ideal vector;
[0164] The actual vector acquisition process includes:
[0165] Expand the last four columns of the standardized matrix input in the training set by rows to determine the actual vector.
[0166] Optionally, the rule embedded CNN model includes an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer and an output layer;
[0167] The model training module is specifically used for:
[0168] The standardized matrix in the training set is passed through the input layer, the first convolution layer, the first pooling layer, the second convolution layer, the second pooling layer, the fully connected layer, and the output layer in sequence to determine the probability distribution of different fault types corresponding to the standardized matrix;
[0169] Calculate the total loss function and the gradient of the total loss function to the model parameters;
[0170] According to the set learning rate and batch size, the model weights and biases are updated, and the forward propagation, loss calculation, and back propagation are repeated until the number of iterations reaches the set number of training rounds, and then the training is stopped to obtain the trained rule-embedded CNN model;
[0171] The trained rule-embedded CNN model is tested through the test set to determine the fault diagnosis model.
[0172] Optionally, the fault diagnosis module is specifically used to:
[0173] Input the fault data into the first convolution layer through the input layer, perform convolution operation on the training set, and determine the first output matrix;
[0174] Input the first output matrix into the first pooling layer for downsampling processing to determine the second output matrix;
[0175] Input the second output matrix into the second convolutional layer for convolution operation to determine the third output matrix;
[0176] Input the third output matrix into the second pooling layer for downsampling processing to determine a fourth output matrix;
[0177] Input the fourth output matrix into the fully connected layer, expand the fourth output matrix into a one-dimensional vector by row, and map it to the output space to determine the fifth output matrix;
[0178] The fifth output matrix is input into the output layer to determine the fault type.
[0179] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code. Computer-readable storage media can be, for example, but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above.
[0180] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0181] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. An intelligent fault diagnosis method for a power system, characterized in that: include: According to the preset fault starting time and the preset acquisition time window, the recording data of consecutive preset sampling points under different working conditions are collected to determine the fault matrix data corresponding to each sampling point; wherein each row of the fault matrix data represents the recording data corresponding to the sampling point under one working condition; Adding a label vector representing the fault type to each of the fault matrix data, determining a data set, and dividing the data set into a training set and a test set according to a preset ratio; The rule-embedded CNN model is trained by using the training set, and the trained rule-embedded CNN model is tested by using the test set to determine the fault diagnosis model; The fault diagnosis model is deployed in the power system, and fault data is collected when a sudden current change occurs in the power system. The fault diagnosis model is used to diagnose the fault data and determine the fault type.
2. The method according to claim 1, characterized in that The method of collecting the recorded wave data of consecutive preset sampling points under different working conditions according to the preset fault starting time and the preset collection time window includes: When the logarithm of the product of the numerical values of the A-phase current of consecutive preset sampling points in the power system is greater than the preset threshold, the time when the first sampling point among the sampling points collects the A-phase current is taken as the preset fault starting time; The formula for the preset acquisition time window is as follows: Among them, T s represents the preset acquisition time window, a is the first preset constant, λ represents the Euler-Masqueroni constant, [·] roundup Indicates rounding up, f s Indicates the sampling frequency.
3. The method according to claim 1, characterized in that The step of adding a label vector representing the fault type to each of the fault matrix data to determine a data set includes: Standardizing each of the fault matrix data, scaling each data in the fault matrix data to 0 to 1, and determining a standardized matrix; A label vector representing the fault type is added to each of the standardized matrices to determine a data set.
4. The method according to claim 3, characterized in that The total loss function of the neural network of the rule-embedded CNN model includes a cross entropy loss function and an error function based on rule matrix diagnosis; wherein the total loss function formula is as follows: Loss = Loss2 + α × Loss1 Among them, Loss represents the total loss function, Loss1 represents the cross entropy loss function, Loss2 represents the error function, and a represents the rule matrix weight coefficient.
5. The method according to claim 4, characterized in that The formula of the cross entropy loss function is as follows: Among them, Loss1 represents the cross entropy loss function, L(i) represents the i-th element of the label vector in the standardized matrix input in the training set, and y(i) represents the probability distribution of different fault types after the standardized matrix input rule is embedded in the CNN model.
6. The method according to claim 4, characterized in that The formula of the error function is as follows: Wherein, Loss2 represents the error function, N represents the second preset constant, Ideal(i) represents the ideal vector, and Real(i) represents the actual vector; The process of obtaining the ideal vector includes: Obtain a preset standardized first target rule matrix, and multiply the label vector corresponding to the standardized matrix input in the training set by the first target rule matrix to determine a second target rule matrix; Expand each row in the second target rule matrix repeatedly for multiple times until the number of rows is the same as that of the input normalized matrix, and then expand it into a one-dimensional vector by row to determine an ideal vector; The actual vector acquisition process includes: Expand the last four columns of the standardized matrix input in the training set by rows to determine the actual vector.
7. The method according to claim 6, characterized in that: The rule-embedded CNN model includes an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer and an output layer; The rule-embedded CNN model is trained by the training set, and the trained rule-embedded CNN model is tested by the test set to determine the fault diagnosis model, including: Passing the standardized matrix in the training set through the input layer, the first convolution layer, the first pooling layer, the second convolution layer, the second pooling layer, the fully connected layer and the output layer in sequence to determine the probability distribution of different fault types corresponding to the standardized matrix; Calculate the total loss function and the gradient of the total loss function to the model parameters; According to the set learning rate and batch size, the model weights and biases are updated, and the forward propagation, loss calculation, and back propagation are repeated until the number of iterations reaches the set number of training rounds, and then the training is stopped to obtain the trained rule-embedded CNN model; The trained rule-embedded CNN model is tested through the test set to determine the fault diagnosis model.
8. The method according to claim 7, characterized in that: The learning rate is set to 0.001, the batch size is set to 20, and the number of training rounds is set to 100 rounds.
9. The method according to claim 7, characterized in that: The fault diagnosis model is used to diagnose the fault data and determine the fault type, including: Inputting the fault data into the first convolution layer through the input layer, performing a convolution operation on the training set, and determining a first output matrix; Inputting the first output matrix into the first pooling layer for downsampling processing to determine a second output matrix; Inputting the second output matrix into the second convolutional layer for convolution operation to determine a third output matrix; Inputting the third output matrix into the second pooling layer for downsampling processing to determine a fourth output matrix; Input the fourth output matrix into a fully connected layer, expand the fourth output matrix into a one-dimensional vector by row, and map it to the output space to determine a fifth output matrix; The fifth output matrix is input into the output layer to determine the fault type.
10. An intelligent fault diagnosis system for a power system, characterized in that: include: A fault matrix data determination module is used to collect the recorded wave data of consecutive preset sampling points under different working conditions according to the preset fault starting time and the preset acquisition time window, and determine the fault matrix data corresponding to each sampling point; wherein each row of the fault matrix data represents the recorded wave data corresponding to the sampling point under one working condition; A data set determination module, used to add a label vector representing the fault type to each of the fault matrix data, determine a data set, and divide the data set into a training set and a test set according to a preset ratio; A model training module is used to train the rule-embedded CNN model using the training set, and to test the trained rule-embedded CNN model using the test set to determine a fault diagnosis model; The fault diagnosis module is used to deploy the fault diagnosis model into the power system, collect fault data when a sudden current change occurs in the power system, diagnose the fault data through the fault diagnosis model, and determine the fault type.
Citation Information
Patent Citations
Method and device for realizing slider verification
CN111311619A
Method for diagnosing short-circuit fault of AC transmission line of AC-DC hybrid power grid based on CNN
CN115327437A
Power transmission recording bird damage fault discrimination method and system based on objective empowerment
CN117216485A
Cited By
Fault diagnosis method and system based on electrical box parameter prediction
CN120316692A
Electric power system comprehensive monitoring and diagnosis method based on electrical signal processing algorithm
CN121071029A
Power system comprehensive monitoring and diagnosis method based on electrical signal processing algorithm
CN121071029B