Fault analysis method and device for power distribution network, and electronic equipment
By applying neural network models in the distribution network to analyze transient wave recording data, extracting fault characteristics and timing characteristics, and identifying the cause of the fault, solving the problems of low analysis efficiency and difficult to guarantee accuracy in the existing technology, and achieving automated distribution network fault analysis and efficient and accurate fault identification.
Patent Information
- Application Number
- CN202411569598.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, the transient wave recording fault data of the distribution network is analyzed through manual identification or based on feature library matching. The analysis efficiency is low, and it is difficult to ensure the accuracy of the identification results in large-scale distribution network fault recognition scenarios.
The neural network model is used for fault analysis. The specific steps include collecting transient wave recording data of the fault node of the distribution network, performing preprocessing and encoding processing, and generating transient wave recording vectors. Then, these vectors are input to the convolutional layer and the long and short-term memory network layer, fault characteristics and timing characteristics are extracted, and the cause of the failure is finally identified through the output layer. This neural network model is obtained through hyperparameter optimization and iterative training.
The distribution network fault analysis is automated, the efficiency and accuracy of fault analysis are improved, the cause of faults can be quickly determined, and the problems of low analysis efficiency and difficult to guarantee accuracy in the existing technology are solved.
Smart Images

Figure CN119535086A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence or other related technical fields, and in particular to a fault analysis method and device for a distribution network, and electronic equipment thereof. Background Art
[0002] Single-phase grounding fault in distribution network is one of the common fault types in power system. Rapid and accurate fault identification of distribution network is crucial to ensure the stable operation of power grid and improve power supply reliability. In recent years, with the rapid development of communication and automation technology, transient waveform fault indicators are increasingly used in distribution network. These indicators can capture the transient characteristics when the fault occurs, providing rich data support and possibilities for data-driven fault cause identification. However, how to make full use of these data to identify the cause of the fault still faces multiple technical challenges.
[0003] In the related art, the data output by the transient waveform fault indicator is often analyzed and identified through manual identification or feature library matching. The analysis efficiency is low, and it is difficult to ensure the accuracy of the identification results in large-scale distribution network fault identification scenarios.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a fault analysis method and device for a distribution network, and an electronic device thereof, so as to at least solve the technical problem in the related art that power data is analyzed and identified by manual recognition or feature library matching, and the analysis efficiency is low.
[0006] According to one aspect of an embodiment of the present invention, a fault analysis method for a distribution network is provided, comprising: collecting transient recording data of each fault node in the distribution network; preprocessing and encoding the transient recording data of each fault node to obtain a transient recording vector of the fault node; for each fault node, inputting the transient recording vector of the fault node into a fault analysis model through an input layer, outputting a fault feature vector based on a convolutional layer of the fault analysis model, and inputting the fault feature vector into a long short-term memory network layer of the fault analysis model, outputting a time series feature vector based on the long short-term memory network layer, inputting the time series feature vector into an output layer of the fault analysis model, and outputting the fault cause of the fault node through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training; and generating a fault analysis report of the distribution network based on the fault cause of each fault node.
[0007] Optionally, the fault analysis model is pre-constructed, and the step of constructing the fault analysis model includes: constructing the neural network model, and configuring the value range of hyperparameters for the neural network model, wherein the hyperparameters include: network architecture hyperparameters and optimizer hyperparameters, the network architecture hyperparameters include: the number of channels of each convolutional layer of the neural network model, the number of hidden neurons in the long short-term memory network layer of the neural network model, and the optimizer hyperparameters include: the learning rate and weight decay coefficient of the optimizer; performing hyperparameter optimization based on the value range of the hyperparameters, determining the target hyperparameter combination of the neural network model, and constructing an initial fault analysis model based on the target hyperparameter combination; reading the fault data set of the historical fault nodes of the distribution network, constructing a sample data set based on the fault data set, and dividing the sample data set to obtain a training set and a test set; iteratively training the initial fault analysis model based on the training set to obtain the trained fault analysis model; testing the trained fault analysis model based on the test set to obtain a test result, and when the test result indicates that the trained fault analysis model passes the test, the trained fault analysis model is obtained.
[0008] Optionally, the step of performing hyperparameter optimization based on the value range of the hyperparameter and determining the target hyperparameter combination of the neural network model includes: constructing a hyperparameter candidate set based on the value range of the hyperparameter, wherein the hyperparameter candidate set includes N candidate hyperparameter combinations, N is a positive integer, and each candidate hyperparameter combination is composed of the values of each hyperparameter in the network architecture hyperparameter and the optimizer hyperparameter; for each neural network model corresponding to the candidate hyperparameter combination, evaluating the neural network model using a K-fold cross-validation algorithm to obtain an evaluation result, and determining the search space of the target network architecture hyperparameter and the optimizer hyperparameter of the neural network model based on the evaluation result; searching the search space of the optimizer hyperparameter based on the Sky Eagle optimization algorithm to obtain a search result, and determining the target optimizer hyperparameter of the neural network model based on the search result; determining the target hyperparameter combination of the neural network model based on the target network architecture hyperparameter and the target optimizer hyperparameter.
[0009] Optionally, for each neural network model corresponding to the candidate hyperparameter combination, a K-fold cross-validation algorithm is used to evaluate the neural network model, and the steps of obtaining the evaluation result include: step 1, obtaining historical fault data of the distribution network, and constructing an optimized data set for the neural network model corresponding to each candidate hyperparameter combination based on the historical fault data, and dividing the optimized data set into K optimized data subsets, where K is a positive integer; step 2, selecting one of the K optimized data subsets as an optimized verification set, and using the remaining K-1 optimized data subsets as optimized training sets, and evaluating the optimized verification set and the optimized training set based on the optimized verification set and the optimized training set. Iteratively train and test the neural network model corresponding to the candidate hyperparameter combination to obtain the iteratively trained neural network model; repeat step 2, perform Q iterative training and testing on the neural network model corresponding to each of the candidate hyperparameter combinations to obtain the iteratively trained neural network model corresponding to each of the candidate hyperparameter combinations, and calculate the performance evaluation value of the iteratively trained neural network model corresponding to each of the candidate hyperparameter combinations, and obtain the evaluation result based on the performance evaluation value of the iteratively trained neural network model corresponding to each of the candidate hyperparameter combinations, wherein a different random seed is configured for the neural network model in each iterative training and test.
[0010] Optionally, the step of determining the target network architecture hyperparameters of the neural network model and the search space of the optimizer hyperparameters based on the evaluation results includes: selecting the candidate hyperparameter combination corresponding to the neural network model with the largest performance evaluation value from the evaluation results, and extracting the network architecture hyperparameters from the candidate hyperparameter combination as the target network architecture hyperparameters of the neural network model; extracting the optimizer hyperparameters from the candidate hyperparameter combination, increasing the extracted optimizer hyperparameter by one order of magnitude to determine the maximum value of the optimizer hyperparameter, and decreasing the extracted optimizer hyperparameter by one order of magnitude to determine the minimum value of the optimizer hyperparameter, and determining the search space of the optimizer hyperparameter based on the maximum and minimum values of the optimizer hyperparameters.
[0011] Optionally, the search space of the optimizer hyperparameters is searched based on the Eagle optimization algorithm to obtain search results, and the step of determining the target optimizer hyperparameters of the neural network model based on the search results includes: step one, determining the size of the Eagle population in the Eagle optimization algorithm, and defining position codes for the Eagle individuals in the Eagle population, wherein the position codes of the Eagle individuals represent a set of optimizer hyperparameter combinations, and the optimizer hyperparameter combinations are composed of the learning rate and weight decay coefficient of the optimizer; step two, performing equal probability sampling in the search space of the optimizer hyperparameters to obtain the position codes of each Eagle individual in the Eagle population; step three, based on the position codes Perform an iterative search to determine whether the current iterative search times meets the maximum iterative search times; if the current iterative search times does not meet the maximum iterative search times, update the position code of the Sky Eagle individual based on the current iterative search times to obtain the updated position code, and perform an iterative search based on the updated position code; repeat step three until the current iterative search times meets the maximum iterative search times, then terminate the iteration, and obtain the target position code of the Sky Eagle population at the time of the last iterative search, wherein during the iterative search process, calculate the fitness function value of the Sky Eagle individual at each iterative search, and determine the target position code of the Sky Eagle population in the current iterative search according to the fitness function value.
[0012] Optionally, the position code of the Sky Eagle individual is updated based on the current number of iterative searches, and the step of obtaining the updated position code includes: generating a random real number when the current number of iterative searches is less than or equal to a preset number threshold; updating the position code of the Sky Eagle individual based on a preset extended exploration strategy when the generated random real number is less than or equal to a preset real number threshold, wherein the extended exploration strategy updates the position code of the Sky Eagle individual based on a target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, and the random real number; updating the position code of the Sky Eagle individual based on a preset contraction exploration strategy when the generated random real number is greater than a preset real number threshold, wherein the contraction exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the flight distribution function, and the spiral shape of the Sky Eagle population in the current iterative search process, and the random real number.
[0013] Optionally, the position code of the Sky Eagle individual is updated based on the current number of iterative searches, and the step of obtaining the updated position code includes: when the current number of iterative searches is greater than a preset number threshold, generating a random real number; when the generated random real number is less than or equal to a preset real number threshold, updating the position code of the Sky Eagle individual based on a preset expansion development strategy, wherein the expansion development strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, the random real number and the random position code of the Sky Eagle population; when the generated random real number is greater than the preset real number threshold, updating the position code of the Sky Eagle individual based on a preset contraction development strategy, wherein the contraction development strategy updates the position code of the Sky Eagle population based on a preset mass function, motion function and change slope function.
[0014] According to another aspect of an embodiment of the present invention, a fault analysis device for a distribution network is also provided, comprising: an acquisition unit, configured to acquire transient recording data of each fault node in the distribution network; a processing unit, configured to preprocess and encode the transient recording data of each fault node to obtain a transient recording vector of the fault node; an output unit, configured to input the transient recording vector of the fault node into a fault analysis model through an input layer for each fault node, output a fault feature vector based on a convolutional layer of the fault analysis model, input the fault feature vector into a long short-term memory network layer of the fault analysis model, output a time series feature vector based on the long short-term memory network layer, input the time series feature vector into an output layer of the fault analysis model, and output the fault cause of the fault node through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training; and a generation unit, configured to generate a fault analysis report of the distribution network based on the fault cause of each fault node.
[0015] Optionally, the fault analysis device for the distribution network also includes: a first construction unit, used to construct the neural network model and configure the value range of hyperparameters for the neural network model, wherein the hyperparameters include: network architecture hyperparameters and optimizer hyperparameters, the network architecture hyperparameters include: the number of channels of each convolutional layer of the neural network model, the number of hidden neurons in the long short-term memory network layer of the neural network model, the optimizer hyperparameters include: the learning rate and weight decay coefficient of the optimizer; a first determination unit, used to perform hyperparameter optimization based on the value range of the hyperparameters, determine the target hyperparameter combination of the neural network model, and determine the target hyperparameter combination based on the target hyperparameter combination. The method comprises the following steps: first, a first construction unit, and a second construction unit, for reading a fault data set of historical fault nodes of the distribution network, constructing a sample data set based on the fault data set, and dividing the sample data set into a training set and a test set; a first training unit, for iteratively training the initial fault analysis model based on the training set to obtain the trained fault analysis model; and a first testing unit, for testing the trained fault analysis model based on the test set to obtain a test result. When the test result indicates that the trained fault analysis model passes the test, the trained fault analysis model is obtained.
[0016] Optionally, the first determination unit includes: a first construction subunit, used to construct a hyperparameter candidate set based on the value range of the hyperparameter, wherein the hyperparameter candidate set includes N candidate hyperparameter combinations, N is a positive integer, and each candidate hyperparameter combination is composed of the values of each hyperparameter in the network architecture hyperparameter and the optimizer hyperparameter; a first evaluation subunit, used to evaluate the neural network model corresponding to each candidate hyperparameter combination using a K-fold cross-validation algorithm to obtain an evaluation result, and determine the target network architecture hyperparameter of the neural network model and the search space of the optimizer hyperparameter based on the evaluation result; a first search subunit, used to search the search space of the optimizer hyperparameter based on the Sky Eagle optimization algorithm to obtain a search result, and determine the target optimizer hyperparameter of the neural network model based on the search result; the first determination subunit is used to determine the target hyperparameter combination of the neural network model based on the target network architecture hyperparameter and the target optimizer hyperparameter.
[0017] Optionally, the first evaluation subunit includes: a first acquisition module, used for step one, to acquire historical fault data of the distribution network, and to construct an optimized data set for the neural network model corresponding to each of the candidate hyperparameter combinations based on the historical fault data, and to divide the optimized data set into K optimized data subsets, wherein K is a positive integer; a first training module, used for step two, to select one of the K optimized data subsets as an optimized verification set, and to use the remaining K-1 optimized data subsets as optimized training sets, and to iteratively train and test the neural network model corresponding to the candidate hyperparameter combination based on the optimized verification set and the optimized training set to obtain the neural network model after iterative training; a first repetition module, used to repeat step two, to perform Q iterative training and testing on the neural network model corresponding to each of the candidate hyperparameter combinations, to obtain the neural network model after iterative training corresponding to each of the candidate hyperparameter combinations, and to calculate the performance evaluation value of the neural network model after iterative training corresponding to each of the candidate hyperparameter combinations, and to obtain the evaluation result based on the performance evaluation value of the neural network model after iterative training corresponding to each of the candidate hyperparameter combinations, wherein a different random seed is configured for the neural network model in each iterative training and test.
[0018] Optionally, the first evaluation subunit also includes: a first selection module, used to select the candidate hyperparameter combination corresponding to the neural network model with the largest performance evaluation value from the evaluation results, and extract the network architecture hyperparameter from the candidate hyperparameter combination as the target network architecture hyperparameter of the neural network model; a first determination module, used to extract the optimizer hyperparameter from the candidate hyperparameter combination, increase the extracted optimizer hyperparameter by one order of magnitude to determine the maximum value of the optimizer hyperparameter, and decrease the extracted optimizer hyperparameter by one order of magnitude to determine the minimum value of the optimizer hyperparameter, and determine the search space of the optimizer hyperparameter based on the maximum and minimum values of the optimizer hyperparameter.
[0019] Optionally, the first search subunit includes: a first definition module, used for step one, determining the size of the Eagle population in the Eagle optimization algorithm, and defining position codes for the Eagle individuals in the Eagle population, wherein the position codes of the Eagle individuals represent a set of optimizer hyperparameter combinations, and the optimizer hyperparameter combinations are composed of the optimizer's learning rate and weight decay coefficient; a first sampling module, used for step two, performing equal probability sampling in the search space of the optimizer hyperparameters to obtain the position codes of each Eagle individual in the Eagle population; a first iteration module, used for step three, performing iterative search based on the position code, and judging whether the current number of iterative searches is Whether the maximum number of iterations is met, if the current iterative search number does not meet the maximum number of iterations, the position code of the Sky Eagle individual is updated based on the current iterative search number to obtain the updated position code, and an iterative search is performed based on the updated position code; a second repetition module is used to repeat step three until the current iterative search number meets the maximum number of iterations, then the iteration is terminated, and the target position code of the Sky Eagle population in the last iterative search is obtained, wherein, during the iterative search process, the fitness function value of the Sky Eagle individual in each iterative search is calculated, and the target position code of the Sky Eagle population in the current iterative search is determined according to the fitness function value.
[0020] Optionally, the first iteration module includes: a first generation submodule, used to generate a random real number when the current iterative search number is less than or equal to a preset number threshold; a first update submodule, used to update the position code of the Sky Eagle individual based on a preset extended exploration strategy when the generated random real number is less than or equal to the preset real number threshold, wherein the extended exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, and the random real number; a second update submodule, used to update the position code of the Sky Eagle individual based on a preset contraction exploration strategy when the generated random real number is greater than a preset real number threshold, wherein the contraction exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the flight distribution function, and the spiral shape of the Sky Eagle population in the current iterative search process, and the random real number.
[0021] Optionally, the first iteration module also includes: a second generation submodule, used to generate a random real number when the current iterative search times is greater than a preset number threshold; a third update submodule, used to update the position code of the Sky Eagle individual based on a preset expansion development strategy when the generated random real number is less than or equal to the preset real number threshold, wherein the expansion development strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, the random real number and the random position code of the Sky Eagle population; a fourth update submodule, used to update the position code of the Sky Eagle individual based on a preset contraction development strategy when the generated random real number is greater than a preset real number threshold, wherein the contraction development strategy updates the position code of the Sky Eagle population based on a preset mass function, motion function and change slope function.
[0022] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned distribution network fault analysis methods.
[0023] In the present application, the following steps are performed: transient recording data of each fault node in the distribution network are collected, the transient recording data of each fault node are preprocessed and encoded to obtain the transient recording vector of the fault node, and then for each fault node, the transient recording vector of the fault node is input into the fault analysis model through the input layer, the convolution layer based on the fault analysis model outputs the fault feature vector, and the fault feature vector is input into the long short-term memory network layer of the fault analysis model, the long short-term memory network layer outputs the time series feature vector, the time series feature vector is input into the output layer of the fault analysis model, and the fault cause of the fault node is output through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training, and finally a fault analysis report of the distribution network is generated based on the fault cause of each fault node.
[0024] In the present application, transient recording data of the faulty node is automatically collected, and the processed transient recording data is analyzed through a pre-built fault analysis model. The convolutional layer and long short-term memory network layer of the fault analysis model are used to extract timing features, and the fault cause of the faulty node is output, thereby automating the fault analysis and achieving the purpose of quickly determining the fault cause of the faulty node. The technical effect of improving the efficiency of fault analysis is achieved, thereby solving the technical problem of low analysis efficiency in the related technology of analyzing and identifying power data through manual identification or feature library matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 is a flow chart of an optional distribution network fault analysis method according to an embodiment of the present invention;
[0027] Figure 2 is a schematic diagram of an optional distribution network fault analysis process according to an embodiment of the present invention;
[0028] Figure 3 is a working principle diagram of an optional fault analysis model according to an embodiment of the present invention;
[0029] Figure 4 is an optional flowchart of obtaining optimal hyperparameters based on a K-fold cross-validation algorithm according to an embodiment of the present invention;
[0030] Figure 5 is an optional flow chart of searching for optimal hyperparameters based on the Skyhawk algorithm according to an embodiment of the present invention;
[0031] Figure 6 is a schematic diagram of an optional fault analysis device for a distribution network according to an embodiment of the present invention;
[0032] Figure 7 The present invention is a hardware structure block diagram of an electronic device (or mobile device) for executing a fault analysis method for a distribution network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:
[0036] Long Short-Term Memory, or LSTM, is a special type of recurrent neural network that is used to solve the gradient vanishing and gradient exploding problems encountered by recurrent neural networks when processing long time series data, thereby being able to capture longer-distance dependencies in sequence data.
[0037] It should be noted that the fault analysis method and device for the distribution network in the present application can be used in the field of artificial intelligence when fault analysis of the distribution network is performed based on a fault analysis model, and can also be used in any field other than the field of artificial intelligence when fault analysis of the distribution network is performed based on a fault analysis model. The application does not limit the application field of the fault analysis method and device for the distribution network.
[0038] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0039] It should be noted that in this application, when collecting and analyzing customer information, corresponding operation entrances are provided for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0040] The following embodiments of the present invention can be applied to various distribution network fault analysis systems / applications / devices. The present invention combines grid search and the Eagle optimization algorithm to efficiently optimize the hyperparameters of the neural network model. Grid search determines the search space of hyperparameters in the primary stage, while the Eagle optimization algorithm performs a refined search for the hyperparameters of the model in the advanced stage, thereby constructing a fault analysis model based on the optimal hyperparameters, achieving a significant improvement in model performance, ensuring the accuracy of the calculation results, and automatically analyzing the fault causes of the faulty nodes based on the fault analysis model, thereby improving the efficiency of distribution network fault analysis.
[0041] The present invention is described in detail below in conjunction with various embodiments.
[0042] Embodiment 1
[0043] According to an embodiment of the present invention, an embodiment of a fault analysis method for a distribution network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0044] Figure 1 is a flow chart of an optional distribution network fault analysis method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0045] Step S101, collecting transient recording data of each fault node in the distribution network.
[0046] It should be noted that the distribution network is an important part of the power system. Its main function is to transmit the high-voltage power output from the power plant or substation to the final power user through a series of voltage conversion and distribution. The single-phase grounding fault in the distribution network is a common fault type in the power system, and the frequency of occurrence is relatively high. When a single-phase conductor in the power system is directly or indirectly electrically connected to the earth, a single-phase grounding fault will be formed. There are many reasons for the formation of a single-phase grounding fault, such as insulation damage, external force damage, equipment defects, environmental reasons, etc. A single-phase grounding fault will not only reduce the power supply reliability of the power grid, but may also cause damage to power equipment and cause more serious safety accidents. Therefore, it is crucial to quickly and accurately identify the causes of single-phase grounding faults and take corresponding remedial measures to maintain the safe and stable operation of the power system.
[0047] It should be noted that when there is a fault in the distribution network, the transient recording data of the fault node can be automatically collected through the recording type fault indicator. The fault node can be a node at any location in the distribution network, or a node in the distribution network that has been confirmed to have a fault. The recording type fault indicator can record detailed information on the changes in various electrical quantities in a period of time before and after the fault occurs, and is the basis for fault analysis. The fault recording data can include voltage waveform, current waveform, frequency data, power data, etc.
[0048] Step S102, preprocessing and encoding the transient wave recording data of each faulty node to obtain the transient wave recording vector of the faulty node.
[0049] It should be noted that before analyzing the transient recording data through the fault analysis model, the transient recording data needs to be preprocessed and encoded to convert the original signal that may contain noise and irrelevant information into structured data so that it can be effectively recognized and processed by the model.
[0050] It should be noted that preprocessing can include operations such as data cleaning, data standardization and normalization. Data cleaning can remove the noise of transient recording data and process missing values in the data. Data standardization and normalization can transform the data, which helps the algorithm convergence. The preprocessed transient recording data is encoded to obtain a transient recording vector.
[0051] Step S103: For each faulty node, the transient recording vector of the faulty node is input into the fault analysis model through the input layer, the convolutional layer of the fault analysis model outputs a fault feature vector, and the fault feature vector is input into the long short-term memory network layer of the fault analysis model, the long short-term memory network layer outputs a time series feature vector, and the time series feature vector is input into the output layer of the fault analysis model, and the fault cause of the faulty node is output through the output layer.
[0052] It should be noted that the transient wave recording vector of the faulty node is input into the fault analysis model based on the input layer of the model. The input layer can convert the input vector into a format that the model can process. The data of the input layer is then passed to the convolution layer, which extracts local time series features from the input data by using a series of learnable filters (or convolution kernels). These features may include the shape, frequency components, peaks and troughs of the current and voltage waveforms, which are important features for identifying different fault types. The convolution operation can capture the patterns and regularities in the signal and provide a basis for subsequent classification. The feature vector output from the convolution layer is sent to the long short-term memory network layer to capture the time series dependency in the transient wave recording data, that is, the pattern and trend of the signal changing over time. The time series feature vector obtained by the long short-term memory network layer is passed to the output layer, which is usually a fully connected layer, which is used to map the extracted features to the classification space, that is, to make classification decisions. The specific causes of the single-phase grounding fault are identified and classified through the output layer, such as insulation damage, animal contact, human error, etc., so as to obtain the fault type of the faulty node.
[0053] It should be noted that the fault analysis model of the embodiment of the present invention is a neural network model obtained in advance through hyperparameter optimization and iterative training. The hyperparameter optimization adopts a staged optimization search space method to achieve hyperparameter optimization, which can effectively combine the wide-area exploration capability of grid search and the local refinement capability of the Sky Eagle optimization algorithm. It improves the computational efficiency while ensuring the comprehensiveness of the optimization, enhances the accuracy of fault identification and the generalization ability of the model, and iteratively trains the optimized model based on massive fault data sets to improve the accuracy and analysis efficiency of the model in the field of fault identification.
[0054] Optionally, the fault analysis model is pre-constructed, and the step of constructing the fault analysis model includes: constructing a neural network model, and configuring a value range of hyperparameters for the neural network model, wherein the hyperparameters include: network architecture hyperparameters and optimizer hyperparameters, the network architecture hyperparameters include: the number of channels of each convolutional layer of the neural network model, the number of hidden neurons in the long short-term memory network layer of the neural network model, and the optimizer hyperparameters include: the learning rate and weight decay coefficient of the optimizer; performing hyperparameter optimization based on the value range of the hyperparameters, determining the target hyperparameter combination of the neural network model, and constructing an initial fault analysis model based on the target hyperparameter combination; reading a fault data set of historical fault nodes of the distribution network, constructing a sample data set based on the fault data set, and dividing the sample data set to obtain a training set and a test set; iteratively training the initial fault analysis model based on the training set to obtain a trained fault analysis model; testing the trained fault analysis model based on the test set to obtain a test result, and when the test result indicates that the trained fault analysis model passes the test, a trained fault analysis model is obtained.
[0055] It should be noted that when constructing a fault analysis model, a neural network architecture applied to distribution network fault analysis and original identification is first constructed. The main architecture of the neural network model adopts a four-layer convolution structure and a single-layer bidirectional long short-term memory network architecture. For the neural network model, the value range of the hyperparameters is determined. The hyperparameters to be optimized can be divided into two categories: network architecture hyperparameters and optimizer hyperparameters. Among them, the network architecture hyperparameters include: the number of channels of the 4 convolutional layers and the number of hidden layer neurons in the long short-term memory network layer. In terms of the optimizer, the present invention adopts the Adam optimizer, and its related hyperparameters include: learning rate and weight decay coefficient. Then, based on the value range of the hyperparameters, staged hyperparameter optimization is performed, and the initial fault analysis model is constructed based on the optimal hyperparameter combination. The initial fault analysis model is used to read the transient recording data of the distribution network, complete the iterative training and performance evaluation of the fault analysis model, and obtain a fault analysis model for analyzing the cause of the fault.
[0056] Optionally, the step of performing hyperparameter optimization based on the value range of the hyperparameter and determining the target hyperparameter combination of the neural network model includes: constructing a hyperparameter candidate set based on the value range of the hyperparameter, wherein the hyperparameter candidate set includes N candidate hyperparameter combinations, N is a positive integer, and each candidate hyperparameter combination is composed of the values of each hyperparameter in the network architecture hyperparameter optimizer hyperparameter; for each neural network model corresponding to the candidate hyperparameter combination, evaluating the neural network model using a K-fold cross-validation algorithm to obtain an evaluation result, and determining the search space of the target network architecture hyperparameters and optimizer hyperparameters of the neural network model based on the evaluation result; searching the search space of the optimizer hyperparameters based on the Sky Eagle optimization algorithm to obtain a search result, and determining the target optimizer hyperparameters of the neural network model based on the search result; and determining the target hyperparameter combination of the neural network model based on the target network architecture hyperparameters and the target optimizer hyperparameters.
[0057] It should be noted that in the primary optimization stage, a set of N candidate hyperparameter combinations is generated according to the value range of each hyperparameter in the model. N is a positive integer representing the size of the candidate set. This step provides the exploration range of the model parameters. Each candidate hyperparameter combination is a vector consisting of network architecture hyperparameters and optimizer hyperparameters. In the primary optimization stage of hyperparameters, the grid search method is applied for preliminary parameter optimization, and the K-fold cross-validation algorithm is used to evaluate the performance of the neural network model corresponding to each candidate hyperparameter combination, thereby determining the value of the network structure hyperparameters and the search space of the optimizer hyperparameters; in the advanced optimization stage of hyperparameters, the Eagle optimization algorithm is used to perform a refined search in the search space to obtain the optimal hyperparameter combination as the target hyperparameter combination of the neural network model.
[0058] Optionally, for the neural network model corresponding to each candidate hyperparameter combination, a K-fold cross-validation algorithm is used to evaluate the neural network model, and the steps for obtaining the evaluation results include: step one, obtaining historical fault data of the distribution network, and constructing an optimized data set for the neural network model corresponding to each candidate hyperparameter combination based on the historical fault data, and dividing the optimized data set into K optimized data subsets, where K is a positive integer; step two, selecting one of the K optimized data subsets as an optimized verification set, and using the remaining K-1 optimized data subsets as optimized training sets, and iteratively training and testing the neural network model corresponding to the candidate hyperparameter combination based on the optimized verification set and the optimized training set to obtain the iteratively trained neural network model; repeating step two, performing Q iterative training and testing on the neural network model corresponding to each candidate hyperparameter combination, obtaining the iteratively trained neural network model corresponding to each candidate hyperparameter combination, and calculating the performance evaluation value of the iteratively trained neural network model corresponding to each candidate hyperparameter combination, and obtaining the evaluation result based on the performance evaluation value of the iteratively trained neural network model corresponding to each candidate hyperparameter combination, wherein a different random seed is configured for the neural network model in each iterative training and testing.
[0059] It should be noted that in the primary hyperparameter optimization stage, a corresponding neural network model is constructed and trained for each candidate hyperparameter combination in the set. The K-fold cross-validation algorithm is used to evaluate the performance of the model, which can effectively reduce the impact of data set division and improve the robustness of the evaluation. Specifically, when performing K-fold cross-validation, the optimization data set used for parameter optimization is divided into K optimization data subsets, and one of the K optimization data subsets is selected as the optimization validation set, and the remaining other subsets are optimized as the training set, so that the neural network model corresponding to each candidate hyperparameter combination is subjected to Q rounds of independent iterative training and testing, and each round of iterative training selects a different random seed, and each round of training adopts an early stopping strategy. If the performance of a certain number of consecutive iterative trainings is not improved, the current round of iteration is stopped to improve the computational efficiency in the hyperparameter optimization process. Finally, based on the iterative training and test results of each group of candidate hyperparameter combinations, the performance evaluation value of the fault analysis model corresponding to the group of candidate hyperparameter combinations is calculated, and the candidate hyperparameter combination with the best performance is selected according to the performance evaluation value. Based on the parameter values of the hyperparameter combination, the initial search space of the target network architecture hyperparameters and optimizer hyperparameters of the neural network model is determined.
[0060] Optionally, the step of determining the search space of the target network architecture hyperparameters and optimizer hyperparameters of the neural network model based on the evaluation results includes: selecting a candidate hyperparameter combination corresponding to the neural network model with the largest performance evaluation value from the evaluation results, and extracting the network architecture hyperparameters from the candidate hyperparameter combination as the target network architecture hyperparameters of the neural network model; extracting the optimizer hyperparameters from the candidate hyperparameter combination, increasing the extracted optimizer hyperparameter by one order of magnitude to determine the maximum value of the optimizer hyperparameter, and decreasing the extracted optimizer hyperparameter by one order of magnitude to determine the minimum value of the optimizer hyperparameter, and determining the search space of the optimizer hyperparameter based on the maximum and minimum values of the optimizer hyperparameters.
[0061] It should be noted that after determining the optimal candidate hyperparameter combination, for the network architecture hyperparameters, the parameter values of the optimal candidate hyperparameter combination are usually directly adopted; and for the optimizer hyperparameters, a more refined search interval is constructed near the optimal candidate hyperparameter combination value. Specifically, the optimizer hyperparameters are extracted from the optimal candidate hyperparameter combination, and the search space of the optimizer hyperparameters is determined by moving one order of magnitude up and down with the hyperparameter values in the extracted optimizer hyperparameters as the center.
[0062] Optionally, the search space of optimizer hyperparameters is searched based on the Eagle optimization algorithm to obtain search results, and the steps of determining the target optimizer hyperparameters of the neural network model based on the search results include: step one, determining the size of the Eagle population in the Eagle optimization algorithm, and defining position codes for the Eagle individuals in the Eagle population, wherein the position codes of the Eagle individuals represent a set of optimizer hyperparameter combinations, and the optimizer hyperparameter combinations are composed of the learning rate and weight decay coefficient of the optimizer; step two, performing equal probability sampling in the search space of the optimizer hyperparameters to obtain the position codes of each Eagle individual in the Eagle population; step three, performing iterative search based on the position codes Search, determine whether the current iterative search times meets the maximum iterative search times, if the current iterative search times does not meet the maximum iterative search times, update the position code of the Sky Eagle individual based on the current iterative search times, obtain the updated position code, and perform iterative search based on the updated position code; repeat step three until the current iterative search times meets the maximum iterative search times, then terminate the iteration, and obtain the target position code of the Sky Eagle population at the time of the last iterative search, wherein, during the iterative search process, calculate the fitness function value of the Sky Eagle individual at each iterative search, and determine the target position code of the Sky Eagle population in the current iterative search according to the fitness function value.
[0063] It should be noted that in the advanced hyperparameter optimization stage, the Eagle optimization algorithm is used to perform a refined search in the search space to determine the values of the optimizer hyperparameters and find the optimal hyperparameter combination. Specifically, first determine the population size of the Eagle optimization algorithm, and define position codes for the Eagle individuals in the Eagle population, so that the Eagle algorithm can be applied to the optimization of the optimizer hyperparameters. Then, perform equal probability sampling in the search space to determine the position codes of each Eagle individual, and perform iterative search based on the position codes of the Eagle individuals. At the beginning of each iterative search, determine whether the current iterative search times meet the maximum number of iterations. If not, update the position code of the Eagle individual, and then perform the next iterative search based on the new position code. In each iterative search process, calculate the fitness function value of the Eagle individual in the current iterative search, and the fitness value is used to determine the optimal solution of the Eagle population in the current iterative search. Specifically, compare the fitness function values of all Eagle individuals in the current iterative search with the fitness function values of the Eagle individuals in the previous iterative search, and select the individual position code that makes the fitness function value minimum as the optimal solution of the population in the current iteration. After the iterative search, the optimal solution of the Eagle population can be obtained, and it is used as the target position code to obtain the optimal optimizer hyperparameters.
[0064] Optionally, the position code of the Sky Eagle individual is updated based on the current number of iterative searches, and the step of obtaining the updated position code includes: generating a random real number when the current number of iterative searches is less than or equal to a preset number threshold; updating the position code of the Sky Eagle individual based on a preset extended exploration strategy when the generated random real number is less than or equal to a preset real number threshold, wherein the extended exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, and the random real number; updating the position code of the Sky Eagle individual based on a preset contraction exploration strategy when the generated random real number is greater than the preset real number threshold, wherein the contraction exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the flight distribution function, and the spiral shape of the Sky Eagle population in the current iterative search process, and the random real number.
[0065] Optionally, the position code of the Sky Eagle individual is updated based on the current number of iterative searches, and the step of obtaining the updated position code includes: when the current number of iterative searches is greater than a preset number threshold, generating a random real number; when the generated random real number is less than or equal to a preset real number threshold, updating the position code of the Sky Eagle individual based on a preset expansion development strategy, wherein the expansion development strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, the random real number and the random position code of the Sky Eagle population; when the generated random real number is greater than a preset real number threshold, updating the position code of the Sky Eagle individual based on a preset contraction development strategy, wherein the contraction development strategy updates the position code of the Sky Eagle population based on a preset mass function, motion function and change slope function.
[0066] It should be noted that when updating the position code of the Sky Eagle individual, the update strategy adopted is different according to the current number of iterations. The update strategy is divided into exploration strategy and development strategy. The exploration strategy is further divided into expansion exploration strategy and contraction exploration strategy. The development strategy is also subdivided into expansion development strategy and contraction development strategy.
[0067] Step S104: generating a fault analysis report of the distribution network based on the fault causes of each fault node.
[0068] It should be noted that after the fault cause of each fault node is output through the fault analysis model, a fault analysis report of the distribution network can be generated according to the fault cause of the fault node, so that corresponding measures can be taken to deal with the fault node to ensure the safe and stable operation of the distribution network.
[0069] Through the above steps, the transient recording data of each fault node in the distribution network is collected, and the transient recording data of each fault node is preprocessed and encoded to obtain the transient recording vector of the fault node. Then, for each fault node, the transient recording vector of the fault node is input into the fault analysis model through the input layer, and the convolution layer based on the fault analysis model outputs the fault feature vector, and the fault feature vector is input into the long short-term memory network layer of the fault analysis model. The long short-term memory network layer outputs the time series feature vector, and the time series feature vector is input into the output layer of the fault analysis model. The fault cause of the fault node is output through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training. Finally, a fault analysis report of the distribution network is generated based on the fault cause of each fault node.
[0070] In this embodiment, transient recording data of the faulty node is automatically collected, and the processed transient recording data is analyzed by a pre-built fault analysis model. The convolutional layer and the long short-term memory network layer of the fault analysis model are used to extract timing features, and the fault cause of the faulty node is output, thereby automating the fault analysis and achieving the purpose of quickly determining the fault cause of the faulty node. The technical effect of improving the efficiency of fault analysis is achieved, thereby solving the technical problem of low analysis efficiency in the related technology of analyzing and identifying power data through manual identification or feature library matching.
[0071] Another optional specific implementation is described in detail below.
[0072] Figure 2 is a schematic diagram of an optional distribution network fault analysis process according to an embodiment of the present invention, such as Figure 2 As shown, the distribution network fault analysis process of the embodiment of the present invention includes the following steps:
[0073] S1, construct a temporal convolution-recurrent hybrid neural network architecture (corresponding to the above-mentioned neural network model) for single-phase grounding cause identification in distribution networks.
[0074] The temporal convolution-recurrent hybrid neural network constructed by the present invention adopts a four-layer convolution structure and a single-layer bidirectional long short-term memory network architecture. Figure 3 is a working principle diagram of an optional fault analysis model according to an embodiment of the present invention, such as Figure 3 As shown in the figure, the transient recording data is input from the input layer to the trained neural network model, i.e., the fault analysis model. After feature processing in each convolution layer, batch normalization, ReLU activation, and maximum pooling are performed in sequence. The output of the previous convolution layer is the input of the next convolution layer. The feature vector based on the output of the convolution layer is input to the long short-term memory network layer (i.e., LSTM). The timing features of the transient recording data are captured by the bidirectional LSTM layer. The output timing features are processed by two linear network layers and finally mapped to the output layer through the fully connected layer to give the fault cause identification result.
[0075] S2, enter the primary optimization stage of hyperparameters: apply the grid search method to determine the search space of hyperparameters.
[0076] The specific steps for applying the grid search method to determine the search space of hyperparameters are as follows:
[0077] S2.1, define the hyperparameters to be optimized and their value ranges.
[0078] The hyperparameters to be optimized involved in the embodiments of the present invention can be divided into two categories: network architecture hyperparameters and optimizer hyperparameters. Among them, the network architecture hyperparameters include: the number of channels of the four convolutional layers, represented by variables c1, c2, c3, and c4 respectively; the number of hidden neurons in the LSTM layer, represented by the variable h. In terms of the optimizer, the present invention adopts the Adam optimizer, and its related hyperparameters include: learning rate, represented by the variable η; weight decay coefficient, represented by the variable λ. The value ranges of the above hyperparameters can be expressed as follows:
[0079] c 1 ,c 2 ,c 3 ,c 4 ,h∈C={8,16,32,64,128};
[0080] η=H∈[10 -6 ,10 -2 ];
[0081] λ∈L=[10 -5 ,10 -1 ].
[0082] S2.2, perform grid search method to obtain the optimal hyperparameters based on K-fold cross validation algorithm, Figure 4 is an optional flowchart of obtaining optimal hyperparameters based on a K-fold cross validation algorithm according to an embodiment of the present invention. Figure 4 As shown in the figure, the specific process of obtaining the optimal hyperparameters based on the K-fold cross validation algorithm is as follows:
[0083] Step 1: Use the candidate hyperparameter combination to build a neural network model;
[0084] A candidate hyperparameter combination is constructed based on the value range of the hyperparameter. In the embodiment of the present invention, the following discrete set is set as an exemplary candidate hyperparameter combination:
[0085] For the number of convolutional layer channels c1, c2, c3, c4 and the number of LSTM hidden layer neurons h, set the set S C ={8,16,32,64,128};
[0086] For the learning rate, set the set S η ={10 -6 ,10 -5 ,10 -4 ,10 -3 ,10 -2};
[0087] For the weight decay coefficient λ, set the set S λ ={10 -5 ,10 -4 ,10-3 ,10 -2 ,10 -1}.
[0088] Based on the above set, all possible hyperparameter combinations are generated as candidate hyperparameter combinations. Each hyperparameter combination is represented as a 7-dimensional vector:
[0089] x=[c1,c2,c3,c4,h,η,λ]
[0090] Among them, c1,c2,c3,c4,h∈S C ,η∈S η ,λ∈S λ .
[0091] For each set of hyperparameter combinations x, use this set of hyperparameters to build a neural network model M(x);
[0092] Step 2: randomly divide the data set into K data subsets: D = {D1, D2, ..., D k ,...,D K};
[0093] Step 3: Let the number of tests q = 1, and perform Q rounds of independent iterative training and testing for the fault analysis model corresponding to each candidate hyperparameter combination;
[0094] Step 4: Use D k The other data subsets are used as training sets (corresponding to the above-mentioned optimized training sets), and the early stopping technique is applied to complete the model training;
[0095] An early stopping strategy is used in each round of iterative training. For example, the maximum training round E and tolerance ET are set. If the performance of the validation set does not improve for ET consecutive rounds or reaches the maximum training round E, the training is terminated to improve the computational efficiency of the hyperparameter optimization process.
[0096] Step 5: Use D k As a test set (corresponding to the above-mentioned optimized test set), the accuracy of the test model in identifying the cause of the fault;
[0097] Step 6: Determine q≤Q. If yes, execute step 7. If no, repeat steps 4 to 6. Use different random seeds to initialize the model in each round of iterative training to enhance the stability of the evaluation.
[0098] Step 7, determine k≤K, if yes, execute step 8, if no, set k=k+1, and repeat step 3 to step 7;
[0099] Step 8: Evaluate the performance of the model corresponding to the hyperparameter combination and select the optimal hyperparameter combination.
[0100] In order to comprehensively evaluate the model performance and reduce the impact of random fluctuations, the embodiment of the present invention introduces a multiple averaging mechanism. The calculation formula for the performance evaluation index f(x) of the hyperparameter combination x is expressed as follows:
[0101]
[0102] Among them, f(x) represents the performance evaluation value of the model corresponding to the candidate hyperparameter combination, Acc[M(x),D k ,S i ] indicates that the fault analysis model M constructed using the candidate hyperparameter combination x is used in the k-fold validation set D k The highest accuracy achieved when using random seed si for the i-th test. The accuracy calculation formula is as follows:
[0103]
[0104] Among them, n c Indicates the number of samples correctly judged by the fault analysis model on the validation set, n val Represents the total number of samples in the validation set. Using the highest performance evaluation value during model training as the evaluation indicator can more accurately reflect the best performance of the model under different candidate hyperparameter combinations, thus providing a more reliable basis for subsequent optimization.
[0105] Then, all candidate hyperparameter combinations are sorted in descending order according to the performance evaluation values f(x) corresponding to the calculated candidate hyperparameter combinations, and the hyperparameter combination x with the best model performance is selected. * .
[0106] Based on the optimal hyperparameter combination x * Determine the search space for target network architecture hyperparameters and optimizer hyperparameters:
[0107] For the number of convolutional layer channels c 1 ,c 2 ,c 3 ,c 4 and the number of LSTM hidden layer neurons h, directly using x * The corresponding values in , thereby obtaining the target network architecture hyperparameters
[0108] c 1* =x * [1],c 2* =x * [2],c 3* =x * [3],c 4* =x * [4],h * =x * [5];
[0109] For the learning rate η, x * [6] is the center, and the search range of the learning rate is determined by moving one order of magnitude upward and downward:
[0110]
[0111] η max =min(10 -2 ,x * [6]×10);
[0112] For the weight decay coefficient λ, x * [7] is the center, and the search range of the weight decay coefficient is determined by moving one order of magnitude upward and downward:
[0113]
[0114] η min =min(10 -1 ,x * [7]×10);
[0115] According to the search range of learning rate and the search range of weight decay coefficient, the search space of optimizer hyperparameters can be obtained, providing a more focused search range for the subsequent Tianying optimization algorithm.
[0116] S3, enter the advanced optimization stage of hyperparameters, use the Eagle optimization algorithm to perform a refined search in the search space to find the optimal hyperparameter combination. In the advanced optimization stage, the number of channels of the four convolutional layers and the number of hidden neurons of the LSTM have been determined and are no longer involved in the optimization.
[0117] Figure 5 is an optional flowchart of searching for optimal hyperparameters based on the Skyhawk algorithm according to an embodiment of the present invention. Figure 5 As shown in the figure, the process of determining the target hyperparameter combination based on the Sky Eagle algorithm includes:
[0118] Step 1, start;
[0119] Step 2: Initialize the Sky Eagle population with a population size of N.
[0120] a), Determine the population size N of the eagle and define the individual code.
[0121] For the i-th eagle individual in the population, its position code x i (i=1,2,...,N) represents a set of optimizer hyperparameters of the neural network model, namely:
[0122] x i =[η i ,λ i ];
[0123] Among them, η i With λ i They respectively represent the learning rate and weight decay coefficient under this set of optimizer hyperparameter configurations.
[0124] b), initialize the population position code. Specifically, for the position code xi of the i-th eagle individual in the population, the present invention uses a logarithmic space uniform sampling combined with an exponential transformation method for initialization. This method can achieve equal probability sampling within the parameter range of different orders of magnitude and effectively balance the parameter search space. The specific initialization formula is as follows:
[0125]
[0126] The operator Un(a,b) is a uniform distribution function, which means randomly generating a real number in the interval [a,b].
[0127] Step 3: Set the maximum number of iterations T max , let the number of iterations (i.e. the current number of iterations) t = 1;
[0128] Step 4, calculate the value of the fitness function (corresponding to the above fitness value);
[0129] For each eagle individual x in the population i , calculate its fitness function value f(x i ). The present invention encodes the position of the individual x i As the optimizer hyperparameter configuration for the neural network model.
[0130] Step 5: Determine the optimal solution of the population. Determine the optimal solution x of the population in the current iteration based on the calculated fitness function value. best(t) Specifically, the fitness function values of all current eagle individuals are compared with the optimal solution x of the eagle population in the previous iterative search process. best(t-1) The corresponding fitness function values are compared, and the position code of the eagle individual that minimizes the fitness function value is selected as the optimal solution of the population for the current iterative search.
[0131] It should be noted that for the first iterative search, the optimal solution x best(0) , there is no optimal solution of the previous generation population, and x is determined by random generation best(0) .
[0132] Step 6: Determine t <T max If not, go to step seven; if yes, go to step nine;
[0133] By comparing the current number of iterations with the maximum number of iterations, it is determined whether the current number of iterations meets the termination condition. At the beginning of each iteration, it is determined whether the maximum number of iterations T is reached. max If T is reached max , the algorithm terminates; otherwise, continue to execute subsequent steps.
[0134] Step 7, set the individual index number i of the eagle population to 1, and start from the first eagle individual, update the position code of all eagle individuals in sequence;
[0135] For each eagle individual x in the population i , according to the current iteration number t, select the exploration or development strategy to update the individual position encoding.
[0136] like Execute the exploration strategy. The specific process is as follows:
[0137] a) Randomly generate a real number rand between 0 and 1. If rand ≤ 0.5, execute the extended exploration strategy and update the position code of the individual eagle according to the following formula:
[0138]
[0139] Among them, x i (t+1) represents the updated position code of the Eagle individual i, x M (t) is the average value of all position codes before updating during the t-iteration search, and its value is determined by the following formula:
[0140]
[0141] Where N is the size of the eagle population, x i (t) is the position code of the i-th eagle individual.
[0142] It should be noted that the above formula represents a vector operation process, that is, firstly the encoding vectors of all eagle individuals in the eagle population are summed up element-wise, and then the sum vector is divided by the population size N, so as to calculate the average position vector of the population in each dimension.
[0143] b) If rand>0.5, execute the contraction exploration strategy and update the individual position code according to the following formula:
[0144] x i (t+1)=x best (t)×Levy+x R (t)+(qp)*rand;
[0145] Among them, x R(t) is a position code randomly selected from all the position codes before the update in the current iteration search t. Levy is the flight distribution function, which is determined by the following formula:
[0146]
[0147] Where s is a fixed constant with a value of 0.01, u and σ are random real numbers in the interval [0,1], β is a fixed constant with a value of 0.01, and Γ(y) is the gamma function.
[0148] The variables p and q in the calculation formula of the contraction exploration strategy represent the spiral shape during the search process and are determined by the following formula:
[0149] q = r × cos(θ);
[0150] p = r × cos(θ);
[0151] r = r1 × γ × D1;
[0152] θ=-ω×D1+θ1;
[0153] Wherein, r1 represents the number of search cycles, which is an integer between [1,20]; γ and ω are fixed constants, which are 0.00565 and 0.005 respectively; D1 is an integer of 1 or 2; θ1 is the initial angle, which is θ1=3π / 2.
[0154] like Execute the development strategy. The specific process is as follows:
[0155] c) Randomly generate a real number rand between 0 and 1. If rand ≤ 0.5, execute the extended development strategy and update the individual position code according to the following formula:
[0156] x i (t+1)=[x best (t)-x M (t)]×α-rand+x rand ×δ;
[0157] Among them, α and δ are development adjustment parameters. In the embodiment of the present invention, α=δ=0.1, x rand It is a random position code dynamically generated according to the search space of optimizer hyperparameters. The specific generation method is the same as the initialization rule of the Eagle population.
[0158] d) If rand>0.5, execute the shrinkage development strategy and update the individual position code according to the following formula:
[0159] x i (t+1)=QF×x best (t)-G1×xi (t)×rand-G2×Levy+rand×G1;
[0160] Among them, QF is the quality function of the balanced search strategy; G1 represents the various movements of the population individuals to track the optimal solution; G2 represents the slope of the change of the population individuals from the starting point to the end point. The values of QF, G1, and G2 are determined by the following formula:
[0161]
[0162] G1 = 2 × rand-1;
[0163]
[0164] Step 8, determine whether the update of all individual codes is completed. If not, update the individual index number: i=i+1, and repeat steps 7 to 8. If so, update the iteration to t=t+1, and repeat steps 3 to 8.
[0165] Step nine, end the iteration, output the optimal solution of the population at the end of the iteration as the optimal hyperparameter combination searched in the advanced optimization stage, and obtain the target optimizer hyperparameter combination.
[0166] S4, based on the multi-level optimization results, outputs the fully optimized model hyperparameter configuration (corresponding to the above target hyperparameter combination), including the target network architecture hyperparameters and target optimizer hyperparameters. The target network architecture hyperparameters include the number of channels of the four convolutional layers, and their values are: c 1* , c 2* , c 3* , c 4* And the number of hidden neurons in the long short-term memory network layer: h * ; The target optimizer hyperparameters include: learning rate η = x best (T max )[1] and weight decay coefficient λ = x best (T max )[2].
[0167] S5, using the optimized hyperparameter configuration, read the transient recording data of the distribution network and complete the iterative training and performance evaluation of the fault analysis model. The specific steps are:
[0168] Data preparation, read the transient recording data of single-phase grounding fault in the distribution network, and divide the data set into training set and test set.
[0169] Model construction, based on the network architecture constructed in step S1 and the optimized hyperparameter configuration output by S4, a fault analysis model is constructed.
[0170] Model training, using the training set data to train the fault analysis model. During the training process, the learning rate η and weight decay coefficient λ optimized in step S4 are used, and the optimizer is used to update the parameters.
[0171] Model evaluation: Evaluate the performance of the trained fault analysis model on the test set, calculate accuracy and other indicators, and verify the effectiveness of the model in the task of identifying the cause of single-phase grounding faults in distribution networks.
[0172] The following is a detailed description in conjunction with another embodiment.
[0173] Embodiment 2
[0174] A fault analysis device for a distribution network provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment 1. Its specific implementation methods and beneficial effects can refer to the above-mentioned method embodiments and will not be repeated here.
[0175] Figure 6 is a schematic diagram of an optional distribution network fault analysis device according to an embodiment of the present invention, such as Figure 6 As shown, the fault analysis device of the distribution network may include: a collection unit 61, a processing unit 62, an output unit 63, and a generation unit 64, wherein:
[0176] The collection unit 61 is used to collect transient recording data of each fault node in the distribution network;
[0177] The processing unit 62 is used to pre-process and encode the transient wave recording data of each fault node to obtain the transient wave recording vector of the fault node;
[0178] The output unit 63 is used for, for each fault node, inputting the transient recording vector of the fault node into the fault analysis model through the input layer, outputting the fault feature vector based on the convolution layer of the fault analysis model, inputting the fault feature vector into the long short-term memory network layer of the fault analysis model, outputting the time series feature vector based on the long short-term memory network layer, inputting the time series feature vector into the output layer of the fault analysis model, and outputting the fault cause of the fault node through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training;
[0179] The generating unit 64 is used to generate a fault analysis report of the distribution network based on the fault causes of each fault node.
[0180] The above-mentioned fault analysis device for the distribution network collects transient recording data of each fault node in the distribution network through the collection unit 61; pre-processes and encodes the transient recording data of each fault node through the processing unit 62 to obtain the transient recording vector of the fault node; for each fault node, the transient recording vector of the fault node is input into the fault analysis model through the input layer through the output unit 63, the fault feature vector is output based on the convolution layer of the fault analysis model, and the fault feature vector is input into the long short-term memory network layer of the fault analysis model, the time series feature vector is output based on the long short-term memory network layer, the time series feature vector is input into the output layer of the fault analysis model, and the fault cause of the fault node is output through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training; and a fault analysis report of the distribution network is generated based on the fault cause of each fault node through the generation unit 64.
[0181] In this embodiment, transient recording data of the faulty node is automatically collected, and the processed transient recording data is analyzed by a pre-built fault analysis model. The convolutional layer and the long short-term memory network layer of the fault analysis model are used to extract timing features, and the fault cause of the faulty node is output, thereby automating the fault analysis and achieving the purpose of quickly determining the fault cause of the faulty node. The technical effect of improving the efficiency of fault analysis is achieved, thereby solving the technical problem of low analysis efficiency in the related technology of analyzing and identifying power data through manual identification or feature library matching.
[0182] Optionally, the fault analysis device of the distribution network also includes: a first construction unit, which is used to construct a neural network model and configure a value range of hyperparameters for the neural network model, wherein the hyperparameters include: network architecture hyperparameters and optimizer hyperparameters, the network architecture hyperparameters include: the number of channels of each convolutional layer of the neural network model, the number of hidden neurons in the long short-term memory network layer of the neural network model, and the optimizer hyperparameters include: the learning rate and weight decay coefficient of the optimizer; a first determination unit, which is used to optimize the hyperparameters based on the value range of the hyperparameters, determine the target hyperparameter combination of the neural network model, and construct an initial fault analysis model based on the target hyperparameter combination; a second construction unit, which is used to read the fault data set of the historical fault nodes of the distribution network, construct a sample data set based on the fault data set, and divide the sample data set to obtain a training set and a test set; a first training unit, which is used to iteratively train the initial fault analysis model based on the training set to obtain a trained fault analysis model; a first testing unit, which is used to test the trained fault analysis model based on the test set to obtain a test result, and when the test result indicates that the trained fault analysis model passes the test, a trained fault analysis model is obtained.
[0183] Optionally, the first determination unit includes: a first construction subunit, used to construct a hyperparameter candidate set based on the value range of the hyperparameter, wherein the hyperparameter candidate set includes N candidate hyperparameter combinations, N is a positive integer, and each candidate hyperparameter combination is composed of the values of each hyperparameter in the network architecture hyperparameter optimizer hyperparameter; a first evaluation subunit, used to evaluate the neural network model corresponding to each candidate hyperparameter combination using a K-fold cross-validation algorithm, obtain an evaluation result, and determine the search space of the target network architecture hyperparameter and optimizer hyperparameter of the neural network model based on the evaluation result; a first search subunit, used to search the search space of the optimizer hyperparameter based on the Sky Eagle optimization algorithm, obtain search results, and determine the target optimizer hyperparameter of the neural network model based on the search results; the first determination subunit is used to determine the target hyperparameter combination of the neural network model based on the target network architecture hyperparameter and the target optimizer hyperparameter.
[0184] Optionally, the first evaluation subunit includes: a first acquisition module, used for step one, to acquire historical fault data of the distribution network, and to construct an optimized data set for the neural network model corresponding to each candidate hyperparameter combination based on the historical fault data, and to divide the optimized data set into K optimized data subsets, where K is a positive integer; a first training module, used for step two, to select one of the K optimized data subsets as an optimized verification set, and to use the remaining K-1 optimized data subsets as optimized training sets, and to iteratively train and test the neural network model corresponding to the candidate hyperparameter combination based on the optimized verification set and the optimized training set to obtain the iteratively trained neural network model; a first repetition module, used to repeat step two, to perform Q iterative training and testing on the neural network model corresponding to each candidate hyperparameter combination, to obtain the iteratively trained neural network model corresponding to each candidate hyperparameter combination, and to calculate the performance evaluation value of the iteratively trained neural network model corresponding to each candidate hyperparameter combination, and to obtain the evaluation result based on the performance evaluation value of the iteratively trained neural network model corresponding to each candidate hyperparameter combination, wherein a different random seed is configured for the neural network model in each iterative training and test.
[0185] Optionally, the first evaluation subunit also includes: a first selection module, used to select a candidate hyperparameter combination corresponding to the neural network model with the largest performance evaluation value from the evaluation results, and extract the network architecture hyperparameter from the candidate hyperparameter combination as the target network architecture hyperparameter of the neural network model; a first determination module, used to extract the optimizer hyperparameter from the candidate hyperparameter combination, increase the extracted optimizer hyperparameter by one order of magnitude to determine the maximum value of the optimizer hyperparameter, and decrease the extracted optimizer hyperparameter by one order of magnitude to determine the minimum value of the optimizer hyperparameter, and determine the search space of the optimizer hyperparameter based on the maximum and minimum values of the optimizer hyperparameter.
[0186] Optionally, the first search subunit includes: a first definition module, used for step one, determining the size of the Eagle population in the Eagle optimization algorithm, and defining position codes for the Eagle individuals in the Eagle population, wherein the position codes of the Eagle individuals represent a set of optimizer hyperparameter combinations, and the optimizer hyperparameter combinations are composed of the optimizer's learning rate and weight decay coefficient; a first sampling module, used for step two, performing equal probability sampling in the optimizer hyperparameter search space to obtain the position codes of each Eagle individual in the Eagle population; a first iteration module, used for step three, performing iterative search based on the position code to determine whether the current number of iterative searches satisfies The maximum number of iterations. If the current iterative search number does not meet the maximum number of iterations, the position code of the Sky Eagle individual is updated based on the current iterative search number to obtain the updated position code, and an iterative search is performed based on the updated position code. The second repetition module is used to repeat step three until the current iterative search number meets the maximum number of iterations, then the iteration is terminated, and the target position code of the Sky Eagle population at the last iterative search is obtained, wherein, during the iterative search process, the fitness function value of the Sky Eagle individual at each iterative search is calculated, and the target position code of the Sky Eagle population in the current iterative search is determined according to the fitness function value.
[0187] Optionally, the first iteration module includes: a first generation submodule, used to generate a random real number when the current iterative search number is less than or equal to a preset number threshold; a first update submodule, used to update the position code of the Sky Eagle individual based on a preset extended exploration strategy when the generated random real number is less than or equal to the preset real number threshold, wherein the extended exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, and the random real number; a second update submodule, used to update the position code of the Sky Eagle individual based on a preset contraction exploration strategy when the generated random real number is greater than the preset real number threshold, wherein the contraction exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the flight distribution function and the spiral shape of the Sky Eagle population in the current iterative search process, and the random real number.
[0188] Optionally, the first iteration module also includes: a second generation submodule, used to generate a random real number when the current iterative search number is greater than a preset number threshold; a third update submodule, used to update the position code of the Sky Eagle individual based on a preset expansion development strategy when the generated random real number is less than or equal to the preset real number threshold, wherein the expansion development strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, the random real number and the random position code of the Sky Eagle population; a fourth update submodule, used to update the position code of the Sky Eagle individual based on a preset contraction development strategy when the generated random real number is greater than the preset real number threshold, wherein the contraction development strategy updates the position code of the Sky Eagle population based on a preset mass function, motion function and change slope function.
[0189] The above-mentioned distribution network fault analysis device may also include a processor and a memory. The above-mentioned acquisition unit 61, processing unit 62, output unit 63, generation unit 64, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0190] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the cause of the distribution network failure can be analyzed by adjusting kernel parameters.
[0191] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0192] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned distribution network fault analysis methods.
[0193] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned distribution network fault analysis methods.
[0194] According to another aspect of an embodiment of the present invention, a computer program product is further provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned distribution network fault analysis methods is implemented.
[0195] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: collecting transient recording data of each fault node in the distribution network; preprocessing and encoding the transient recording data of each fault node to obtain a transient recording vector of the fault node; for each fault node, inputting the transient recording vector of the fault node into a fault analysis model through an input layer, outputting a fault feature vector based on the convolutional layer of the fault analysis model, and inputting the fault feature vector into a long short-term memory network layer of the fault analysis model, outputting a time series feature vector based on the long short-term memory network layer, inputting the time series feature vector into the output layer of the fault analysis model, and outputting the fault cause of the fault node through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training; generating a fault analysis report of the distribution network based on the fault cause of each fault node.
[0196] Figure 7 1 is a hardware structure block diagram of an electronic device (or mobile device) for executing a method for analyzing a fault in a distribution network according to an embodiment of the present invention. Figure 7 As shown, the electronic device may include one or more processors ( Figure 7 702a, 702b, ..., 702n are used to illustrate), a memory 704 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 7 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations are shown.
[0197] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0198] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0199] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0201] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0202] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0203] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for fault analysis of a distribution network, characterized in that: include: Collect transient recording data of each fault node in the distribution network; Preprocessing and encoding the transient wave recording data of each fault node to obtain the transient wave recording vector of the fault node; For each of the faulty nodes, the transient wave recording vector of the faulty node is input into the fault analysis model through the input layer, a fault feature vector is output based on the convolutional layer of the fault analysis model, and the fault feature vector is input into the long short-term memory network layer of the fault analysis model, a time series feature vector is output based on the long short-term memory network layer, and the time series feature vector is input into the output layer of the fault analysis model, and the fault cause of the faulty node is output through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training; A fault analysis report of the distribution network is generated based on the fault causes of each of the fault nodes.
2. The analysis method according to claim 1, characterized in that The fault analysis model is pre-constructed, and the steps of constructing the fault analysis model include: Construct the neural network model, and configure the value range of hyperparameters for the neural network model, wherein the hyperparameters include: network architecture hyperparameters and optimizer hyperparameters, the network architecture hyperparameters include: the number of channels of each convolutional layer of the neural network model, the number of hidden neurons in the long short-term memory network layer of the neural network model, and the optimizer hyperparameters include: the learning rate and weight decay coefficient of the optimizer; Performing hyperparameter optimization based on the value range of the hyperparameter, determining a target hyperparameter combination of the neural network model, and constructing an initial fault analysis model based on the target hyperparameter combination; Reading a fault data set of historical fault nodes of the distribution network, constructing a sample data set based on the fault data set, and dividing the sample data set to obtain a training set and a test set; Iteratively training the initial fault analysis model based on the training set to obtain the trained fault analysis model; The trained fault analysis model is tested based on the test set to obtain a test result. When the test result indicates that the trained fault analysis model passes the test, the trained fault analysis model is obtained.
3. The analysis method according to claim 2, characterized in that The step of performing hyperparameter optimization based on the value range of the hyperparameter to determine the target hyperparameter combination of the neural network model includes: Constructing a hyperparameter candidate set based on the value range of the hyperparameter, wherein the hyperparameter candidate set includes N candidate hyperparameter combinations, N is a positive integer, and each of the candidate hyperparameter combinations is composed of the values of each hyperparameter in the network architecture hyperparameter and the optimizer hyperparameter; For each neural network model corresponding to the candidate hyperparameter combination, the K-fold cross-validation algorithm is used to evaluate the neural network model to obtain an evaluation result, and based on the evaluation result, a search space of a target network architecture hyperparameter of the neural network model and a hyperparameter of the optimizer is determined; Searching the search space of the optimizer hyperparameters based on the Sky Eagle optimization algorithm to obtain search results, and determining target optimizer hyperparameters of the neural network model based on the search results; A target hyperparameter combination of the neural network model is determined based on the target network architecture hyperparameters and the target optimizer hyperparameters.
4. The analysis method according to claim 3, characterized in that For each neural network model corresponding to the candidate hyperparameter combination, the K-fold cross validation algorithm is used to evaluate the neural network model, and the step of obtaining the evaluation result includes: Step 1: Obtain historical fault data of the distribution network, and construct an optimized data set for the neural network model corresponding to each candidate hyperparameter combination based on the historical fault data, and divide the optimized data set into K optimized data subsets, where K is a positive integer; Step 2: Select one of the K optimized data subsets as an optimized validation set, and use the remaining K-1 optimized data subsets as optimized training sets, and iteratively train and test the neural network model corresponding to the candidate hyperparameter combination based on the optimized validation set and the optimized training set to obtain the neural network model after iterative training; Repeat step 2, perform Q iterative training and testing on the neural network model corresponding to each of the candidate hyperparameter combinations, obtain the neural network model after iterative training corresponding to each of the candidate hyperparameter combinations, and calculate the performance evaluation value of the neural network model after iterative training corresponding to each of the candidate hyperparameter combinations, and obtain the evaluation result based on the performance evaluation value of the neural network model after iterative training corresponding to each of the candidate hyperparameter combinations, wherein Q is a positive integer, and a different random seed is configured for the neural network model in each iterative training and test.
5. The analysis method according to claim 3, characterized in that The step of determining the target network architecture hyperparameters of the neural network model and the search space of the optimizer hyperparameters based on the evaluation results comprises: Select the candidate hyperparameter combination corresponding to the neural network model with the largest performance evaluation value from the evaluation results, and extract the network architecture hyperparameter from the candidate hyperparameter combination as the target network architecture hyperparameter of the neural network model; The optimizer hyperparameter is extracted from the candidate hyperparameter combination, the maximum value of the optimizer hyperparameter is determined by increasing the extracted optimizer hyperparameter by one order of magnitude, and the minimum value of the optimizer hyperparameter is determined by decreasing the extracted optimizer hyperparameter by one order of magnitude, and the search space of the optimizer hyperparameter is determined based on the maximum and minimum values of the optimizer hyperparameter.
6. The analysis method according to claim 3, characterized in that The step of searching the search space of the optimizer hyperparameters based on the Sky Eagle optimization algorithm to obtain search results, and determining the target optimizer hyperparameters of the neural network model based on the search results includes: Step 1, determining the size of the Eagle population in the Eagle optimization algorithm, and defining position codes for the Eagle individuals in the Eagle population, wherein the position codes of the Eagle individuals represent a set of optimizer hyperparameter combinations, and the optimizer hyperparameter combination is composed of a learning rate and a weight decay coefficient of the optimizer; Step 2, performing equal probability sampling in the search space of the optimizer hyperparameters to obtain the position code of each eagle individual in the eagle population; Step three, performing an iterative search based on the position code, determining whether the current iterative search number satisfies the maximum number of iterations, and if the current iterative search number does not satisfy the maximum number of iterations, updating the position code of the Sky Eagle individual based on the current iterative search number to obtain an updated position code, and performing an iterative search based on the updated position code; Repeat step three until the current iterative search number meets the maximum iterative number, then terminate the iteration and obtain the target position code of the Sky Eagle population in the last iterative search. During the iterative search process, calculate the fitness function value of the Sky Eagle individual in each iterative search, and determine the target position code of the Sky Eagle population in the current iterative search based on the fitness function value.
7. The analysis method according to claim 6, characterized in that The step of updating the position code of the eagle individual based on the current iterative search number to obtain the updated position code comprises: When the current iterative search number is less than or equal to a preset number threshold, generating a random real number; In the case that the generated random real number is less than or equal to a preset real number threshold, the position code of the Sky Eagle individual is updated based on a preset extended exploration strategy, wherein the extended exploration strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position codes of the Sky Eagle population in the current iterative search, and the random real number; When the generated random real number is greater than a preset real number threshold, the position code of the individual Sky Eagle is updated based on a preset contraction exploration strategy, wherein the contraction exploration strategy updates the position code of the individual Sky Eagle based on the target position code of the Sky Eagle population in the current iterative search, the flight distribution function, and the spiral shape of the Sky Eagle population in the current iterative search process and the random real number.
8. The analysis method according to claim 7, characterized in that The step of updating the position code of the eagle individual based on the current iterative search number to obtain the updated position code comprises: When the current iterative search number is greater than a preset number threshold, generating a random real number; In the case that the generated random real number is less than or equal to a preset real number threshold, the position code of the Sky Eagle individual is updated based on a preset extended development strategy, wherein the extended development strategy updates the position code of the Sky Eagle individual based on the target position code of the Sky Eagle population in the current iterative search, the average position code of the position code of the Sky Eagle population in the current iterative search, the random real number and the random position code of the Sky Eagle population; When the generated random real number is greater than a preset real number threshold, the position code of the individual Sky Eagle is updated based on a preset contraction and development strategy, wherein the contraction and development strategy updates the position code of the Sky Eagle population based on a preset mass function, motion function and change slope function.
9. A fault analysis device for a distribution network, characterized in that: include: A collection unit, used to collect transient recording data of each fault node in the distribution network; A processing unit, used for preprocessing and encoding the transient wave recording data of each fault node to obtain the transient wave recording vector of the fault node; An output unit is used for, for each of the fault nodes, inputting the transient recording vector of the fault node into the fault analysis model through the input layer, outputting a fault feature vector based on the convolution layer of the fault analysis model, inputting the fault feature vector into the long short-term memory network layer of the fault analysis model, outputting a time series feature vector based on the long short-term memory network layer, inputting the time series feature vector into the output layer of the fault analysis model, and outputting the fault cause of the fault node through the output layer, wherein the fault analysis model is a neural network model obtained in advance through hyperparameter optimization and iterative training; A generating unit is used to generate a fault analysis report of the distribution network based on the fault causes of each of the fault nodes.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the distribution network fault analysis method described in any one of claims 1 to 8.
Citation Information
Cited By
Power distribution network fault positioning method, device and equipment based on graph convolutional neural network
CN121703581A