Distribution network state accelerated deduction method based on automatic parameter optimization

Through the combination of particle swarm algorithm and Adam optimizer, the hyperparameters are automatically optimized and the graph neural network is used to process the power grid topology map, which solves the problem of hyperparameter settings affecting the training effect in the power grid operating status deduction, and improves the accuracy and generalization of the power grid deduction. ization ability.

CN118643732APending Publication Date: 2024-09-13INFORMATION & COMMNUNICATION BRANCH STATE GRID JIANGXI ELECTRIC POWER CO +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410644030.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

In the current power grid operating status deduction, it is difficult to train neural network models, and hyperparameter settings affect the training effect, resulting in prolonged training and low generalization. It is impossible to dynamically adjust hyperparameters to improve model performance.

Method used

An automatic hyperparameter optimization method based on the particle swarm algorithm is used, combined with the graph neural network and Adam optimizer, to reduce the hyperparameter search space through multiple iterations to find the best combination, and use the graph convolution network to process the power grid topology map to accelerate the deduction. .

Benefits of technology

It realizes the dynamic adjustment of the hyperparameters of the neural network model, shortens the training process, improves the accuracy and generalization ability of power grid deduction, and improves the ability of power grid operating status reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643732A
    Figure CN118643732A
Patent Text Reader

Abstract

The invention discloses a distribution network state accelerated deduction method based on automatic parameter optimization, and relates to the technical field of power grid operation states, and the method comprises the following steps: S1, preparing a training data set; s2, building a graph neural network; s3, determining a super parameter value range; s4, super parameter optimization is carried out; and S5, training the neural network. According to the method, the model hyper-parameters are optimized through the particle swarm optimization (PSO), the model hyper-parameters are dynamically adjusted according to the training effect of the model in the training process of the neural network model, the training process of the neural network can be shortened by proper hyper-parameter setting, the training effect is improved, and the training efficiency is improved. Therefore, the trained model can better infer the operation state of the power grid according to the output of the power grid monitoring equipment, the deduction capability of the network power grid is improved, and the Adam optimizer establishes mapping between a loss function and network parameters, so that the output of the neural network gradually tends to be expected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid operation status, and in particular to a distribution network status accelerated deduction method based on automatic parameter optimization. Background Art

[0002] In order to ensure the stable operation of the power grid, it is necessary to monitor the operating status of the power grid in real time. Power grid simulation is a technology that estimates the operating status of the entire power grid based on data from multiple monitoring points in the power grid. It is widely used in power grid monitoring tasks. Neural networks are a common technical means for power grid simulation, that is, neural networks are trained based on existing power grid monitoring data, and neural networks are used to fit the mapping relationship between monitoring point data and power grid operating status data.

[0003] However, in practical applications, the amount of power grid operation data is large and the data structure is complex, which makes it more difficult to train the neural network model and the performance of the trained model is difficult to guarantee. The setting of hyperparameters will greatly affect the training process and training effect of the neural network. If the hyperparameters are not set appropriately, the training process of the neural network will be prolonged and the training effect will be reduced. When training the neural network, the traditional neural network training method cannot dynamically adjust the network model hyperparameters according to the training effect of the model. Therefore, using the traditional training method, the training effect of the existing distribution network state deduction model is difficult to guarantee and the generalization degree is low. Summary of the invention

[0004] The purpose of the present invention is to provide a distribution network state accelerated deduction method based on automatic parameter optimization to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for accelerating deduction of distribution network status based on automatic parameter optimization, comprising the following steps:

[0006] S1. Prepare training data set: collect the four-dimensional vector s0 composed of the real and imaginary parts of the current and the real and imaginary parts of the voltage on the known transmission lines of the entire line at multiple time points and the power grid topology map as the input of the data set for power grid deduction;

[0007] S2. Build a graph neural network: Use the graph convolutional network GCN as a model for processing the power grid topology map. By associating the connection relationship of multiple monitoring points in the power grid and the data features of the monitoring points, a multi-layer neural network is constructed to finally form a neural network, and the graph neural network GNN is used for training, so as to convert the corresponding four-dimensional vector s on the unknown transmission line x As a true value output;

[0008] S3. Determine the range of hyperparameter values: To optimize the model hyperparameters based on the particle swarm algorithm (PSO), it is necessary to determine the possible range of values ​​for each hyperparameter, select appropriate evaluation indicators to measure the performance of the model, and select the search method according to the actual situation, so as to provide a basis for the subsequent search for the optimal solution.

[0009] S4. Hyperparameter optimization: After determining the search method, start evaluating candidate models, which usually involves training models on different hyperparameter combinations and using validation sets and cross-validation to evaluate their performance. Based on the evaluation results, the range of hyperparameters is updated and adjusted according to the local optimal value and the global optimal value. Multiple iterations are required to gradually narrow the search space of hyperparameters until the best hyperparameter combination is found. The final selected model is validated using the test set to evaluate its generalization ability on new data.

[0010] S5. Training the neural network: Use the traditional back propagation algorithm to train the neural network with fixed hyperparameters. The back propagation of the neural network is based on the Adam algorithm. and x The difference is back-propagated to GNN to implement model training. During the training process, the Adam optimizer establishes the difference between the network output and the expected result, that is, the mapping between the loss function and the network parameters, so that the output of the neural network gradually approaches the expected result.

[0011] Preferably, in step S2, the graph convolution network GCN is composed of multiple graph convolution-activation function layers, and the input of the neural network is an adjacency matrix A representing the connection relationship between multiple monitoring points in the power grid and a matrix X representing the data features of the monitoring points. In matrix A, if there is a connection between the i-th and j-th monitoring points in the power grid, then A ij is 1 if the value is true, otherwise it is 0.

[0012] Preferably, in step S3, the basic idea of ​​the PSO algorithm is to search the solution space of the problem through group cooperation and information sharing. Each particle represents a candidate solution in the search space. They search for the optimal solution by continuously updating their position and speed. The position of the particle represents the current position of the solution, and the speed represents the moving direction and speed of the solution. In the PSO algorithm, the solution to the problem is represented as a particle in the search space. These particles continuously adjust their positions based on their own and their neighbors' experience information to find the optimal solution.

[0013] The hyperparameters include network parameters involved in data processing, parameters describing the model structure, and multiple parameters included in the optimizer as a mapping relationship.

[0014] Preferably, step S3 comprises the following steps:

[0015] S301, determining n hyperparameters based on domain knowledge, experience, and understanding of the data set, and obtaining a set D of value ranges of each hyperparameter for the n hyperparameters;

[0016] S302, selecting accuracy, precision and recall as evaluation indicators to measure the performance of model hyperparameters;

[0017] S303, selecting one of grid search, random search and Bayesian optimization as the search method according to actual conditions.

[0018] Preferably, step S4 comprises the following steps:

[0019] S401. First, randomly select m h from the set D of hyperparameter value ranges, denoted as h1~h m ;

[0020] S402, initialization h1~h m And the update speed v1~v m , and initialize the h corresponding to the local optimal value, that is, h 1,best ~h m,best h1~h m itself, and initialize the h corresponding to the global optimal value, that is, h best,best h 1,best .

[0021] Preferably, the step S4 further comprises the following steps:

[0022] S403, obtain new h by training the neural network 1,best ~h m,best and h best,best Afterwards, determine whether the neural network meets the requirements;

[0023] S404, if the requirements are not met, use the updated h 1,new ~h m,new Train the neural network and repeatedly update h1~h m and update speed v1~v m , until the obtained h best,best The corresponding loss function meets the requirements, and the updated formula is:

[0024]

[0025] Where w is the inertia weight, which is used to balance the historical speed of the particle and social information, c1 and c2 are acceleration factors, which control the influence of individuals and groups on the speed respectively, and r 1d and r 2d It is a random number in the interval [0,1], used to introduce randomness.

[0026] S405: If the requirements are met, output the optimal hyperparameters.

[0027] Preferably, step S5 comprises the following steps:

[0028] S501. In the particle swarm algorithm, the hyperparameters in the two hyperparameter updates are fixed. When the hyperparameters are fixed, the traditional back propagation algorithm is used to train the neural network.

[0029] S502, the Adam algorithm iteratively updates the neural network weights based on the training data, and adjusts different learning rates for each different parameter, updating frequently changing parameters with smaller step sizes and sparse parameters with larger step sizes.

[0030] Preferably, the step S5 further comprises the following steps:

[0031] S503, the input of Adam optimizer is and x The difference is the loss function of the model, and the loss function is the mean square error loss function, that is,

[0032] S504, the output of the Adam optimizer is the updated model parameters. The formula for the Adam optimizer to update the model parameters according to the loss function is:

[0033]

[0034]

[0035] In the formula, θ is the model parameter of the neural network, α is the learning rate, ▽ θ loss MSE (θ t-1 ) represents the gradient of the loss function relative to the gradient of each model parameter, that is, the influence of each model parameter on the loss function, θ t represents the current model parameters, θ t+1 are the updated model parameters.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] 1. The present invention optimizes the model hyperparameters through the particle swarm algorithm PSO, and realizes the dynamic adjustment of the model hyperparameters according to the training effect of the model during the training process of the neural network model. The appropriate setting of the hyperparameters can shorten the training process of the neural network and improve the training effect, so that the trained model can better infer the power grid operation status according to the output of the power grid monitoring equipment, and improve the ability of network power grid deduction;

[0038] 2. The present invention prepares for hyperparameter setting by preparing training data sets and building graph neural networks. By determining the range of hyperparameter values ​​and continuously updating hyperparameter optimization, multiple iterations are implemented to gradually narrow the search space of hyperparameters until the best hyperparameter combination is found. The final selected model is verified using a test set to evaluate its generalization ability on new data. Neural network training is implemented based on an optimizer. During the training process, the Adam optimizer establishes the difference between the network output and the expected result, that is, the mapping between the loss function and the network parameters, so that the output of the neural network gradually approaches expectations. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flow chart of the overall method provided by an embodiment of the present invention;

[0040] Figure 2 A flow chart of a method for determining a hyper-parameter value range provided by an embodiment of the present invention;

[0041] Figure 3 A flow chart of a method for super-parameter optimization provided by an embodiment of the present invention;

[0042] Figure 4 A flow chart of a method for training a neural network provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] See also Figure 1-4 The present invention provides a technical solution: a method for accelerating the deduction of distribution network status based on automatic parameter optimization, comprising the following steps:

[0045] S1. Prepare training data set: Collect the four-dimensional vector s0 composed of the real and imaginary parts of the current and the real and imaginary parts of the voltage on the known transmission lines of the whole line at multiple time points and the power grid topology map as the input of the data set for power grid deduction, and use GNN for training, so as to convert the corresponding four-dimensional vector s0 on the unknown transmission line into x As a true value output;

[0046] S2. Build a graph neural network: Use the graph convolutional network (GCN) as a model for processing the power grid topology map, and build multiple layers by associating the connection relationships of multiple monitoring points in the power grid and the data features of the monitoring points to finally form a neural network;

[0047] S3. Determine the range of hyperparameter values: To optimize the model hyperparameters based on the particle swarm algorithm (PSO), it is necessary to determine the possible range of values ​​for each hyperparameter, select appropriate evaluation indicators to measure the performance of the model, and select the search method according to the actual situation, so as to provide a basis for the subsequent search for the optimal solution.

[0048] S4. Hyperparameter optimization: After determining the search method, start evaluating candidate models, which usually involves training models on different hyperparameter combinations and using validation sets and cross-validation to evaluate their performance. Based on the evaluation results, the range of hyperparameters is updated and adjusted according to the local optimal value and the global optimal value. Multiple iterations are required to gradually narrow the search space of hyperparameters until the best hyperparameter combination is found. The final selected model is validated using the test set to evaluate its generalization ability on new data.

[0049] S5. Training the neural network: Use the traditional back propagation algorithm to train the neural network with fixed hyperparameters. The back propagation of the neural network is based on the Adam algorithm. and x The difference is back-propagated to GNN to implement model training. During the training process, the Adam optimizer establishes the difference between the network output and the expected result, that is, the mapping between the loss function and the network parameters, so that the output of the neural network gradually approaches the expected result.

[0050] In step S2, the graph convolution network GCN is composed of multiple graph convolution-activation function layers. The input of the neural network is the adjacency matrix A representing the connection relationship between multiple monitoring points in the power grid and the matrix X representing the data features of the monitoring points. In the matrix A, if there is a connection between the i-th and j-th monitoring points in the power grid, then A ij is 1, otherwise it is 0. The relationship between the output and input of the GCN layer l is:

[0051]

[0052] In the formula, is the adjacency matrix A plus self-connection, yes The degree matrix of W is a diagonal matrix, and its i-th diagonal element represents the number of edges emanating from the i-th node. l represents the weight matrix of the lth layer, σ(·) represents the activation function;

[0053] In step S3, the basic idea of ​​the PSO algorithm is to search the solution space of the problem through group cooperation and information sharing. Each particle represents a candidate solution in the search space. They search for the optimal solution by constantly updating their position and speed. The position of the particle represents the current position of the solution, and the speed represents the moving direction and speed of the solution. In the PSO algorithm, the solution of the problem is represented as a particle in the search space. These particles constantly adjust their positions based on their own and their neighbors' experience information to find the optimal solution.

[0054] Hyperparameters include network parameters involved in data processing, parameters describing the model structure, and multiple parameters included in the optimizer as a mapping relationship.

[0055] Step S3 includes the following steps:

[0056] S301, determining n hyperparameters based on domain knowledge, experience, and understanding of the data set, and obtaining a set D of value ranges of each hyperparameter for the n hyperparameters;

[0057] S302, selecting accuracy, precision and recall as evaluation indicators to measure the performance of model hyperparameters;

[0058] S303, selecting a method among grid search, random search and Bayesian optimization as a search method according to actual conditions;

[0059] Step S4 includes the following steps:

[0060] S401. First, randomly select m h from the set D of hyperparameter value ranges, denoted as h1~h m ;

[0061] S402, initialization h1~h m And the update speed v1~v m , and initialize the h corresponding to the local optimal value, that is, h 1,best ~h m,best h1~h m itself, and initialize the h corresponding to the global optimal value, that is, h best,best h 1,best ;

[0062] Step S4 also includes the following steps:

[0063] S403, obtain new h by training the neural network 1,best ~h m,best and h best,best Afterwards, determine whether the neural network meets the requirements;

[0064] S404, if the requirements are not met, use the updated h 1,new ~hm,new Train the neural network and repeatedly update h1~h m and update speed v1~v m , until the obtained h best,best The corresponding loss function meets the requirements, and the updated formula is:

[0065]

[0066] Where w is the inertia weight, which is used to balance the historical speed of the particle and social information, c1 and c2 are acceleration factors, which control the influence of individuals and groups on the speed respectively, and r 1d and r 2d It is a random number in the interval [0,1], used to introduce randomness.

[0067] S405. If the requirements are met, output the optimal hyperparameters;

[0068] Step S5 includes the following steps:

[0069] S501. In the particle swarm algorithm, the hyperparameters in the two hyperparameter updates are fixed. When the hyperparameters are fixed, the traditional back propagation algorithm is used to train the neural network.

[0070] S502, the Adam algorithm iteratively updates the neural network weights based on the training data, and adjusts different learning rates for each different parameter, updating frequently changing parameters with a smaller step size, and updating sparse parameters with a larger step size;

[0071] Step S5 also includes the following steps:

[0072] S503, the input of Adam optimizer is and x The difference is the loss function of the model, and the loss function is the mean square error loss function, that is,

[0073] S504, the output of the Adam optimizer is the updated model parameters. The formula for the Adam optimizer to update the model parameters according to the loss function is:

[0074]

[0075]

[0076] In the formula, θ is the model parameter of the neural network, α is the learning rate, It represents the gradient of the loss function relative to the gradient of each model parameter, that is, the influence of each model parameter on the loss function, θ t represents the current model parameters, θ t+1 are the updated model parameters.

[0077] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A distribution network status accelerated deduction method based on automatic parameter optimization, characterized in that: The method comprises the following steps: S1. Prepare training data set: collect the four-dimensional vector s0 composed of the real and imaginary parts of the current and the real and imaginary parts of the voltage on the known transmission lines of the entire line at multiple time points and the power grid topology map as the input of the data set for power grid deduction; S2. Build a graph neural network: Use the graph convolutional network GCN as a model for processing the power grid topology map. By associating the connection relationship of multiple monitoring points in the power grid and the data features of the monitoring points, a multi-layer neural network is constructed to finally form a neural network, and the graph neural network GNN is used for training, so as to convert the corresponding four-dimensional vector s on the unknown transmission line x As a true value output; S3. Determine the range of hyperparameter values: To optimize the model hyperparameters based on the particle swarm algorithm (PSO), it is necessary to determine the possible range of values ​​for each hyperparameter, select appropriate evaluation indicators to measure the performance of the model, and select the search method according to the actual situation, so as to provide a basis for the subsequent search for the optimal solution. S4. Hyperparameter optimization: After determining the search method, start evaluating candidate models, which usually involves training models on different hyperparameter combinations and using validation sets and cross-validation to evaluate their performance. Based on the evaluation results, the range of hyperparameters is updated and adjusted according to the local optimal value and the global optimal value. Multiple iterations are required to gradually narrow the search space of hyperparameters until the best hyperparameter combination is found. The final selected model is validated using the test set to evaluate its generalization ability on new data. S5. Training the neural network: Use the traditional back propagation algorithm to train the neural network with fixed hyperparameters. The back propagation of the neural network is based on the Adam algorithm. and x The difference is back-propagated to GNN to implement model training. During the training process, the Adam optimizer establishes the difference between the network output and the expected result, that is, the mapping between the loss function and the network parameters, so that the output of the neural network gradually approaches the expected result.

2. According to claim 1, the method for accelerating the deduction of distribution network status based on automatic parameter optimization is characterized in that: In step S2, the graph convolution network GCN is composed of multiple graph convolution-activation function layers. The input of the neural network is the adjacency matrix A representing the connection relationship between multiple monitoring points in the power grid and the matrix X representing the data features of the monitoring points. In the matrix A, if there is a connection between the i-th and j-th monitoring points in the power grid, then A ij is 1 if the value is true, otherwise it is 0.

3. The method for accelerating the deduction of distribution network status based on automatic parameter optimization according to claim 1 is characterized in that: In step S3, the basic idea of ​​the PSO algorithm is to search the solution space of the problem through group cooperation and information sharing. Each particle represents a candidate solution in the search space. They search for the optimal solution by continuously updating their position and speed. The position of the particle represents the current position of the solution, and the speed represents the moving direction and speed of the solution. In the PSO algorithm, the solution of the problem is represented as a particle in the search space. These particles continuously adjust their positions according to their own and their neighbors' experience information to find the optimal solution. The hyperparameters include network parameters involved in data processing, parameters describing the model structure, and multiple parameters included in the optimizer as a mapping relationship.

4. The method for accelerating the deduction of distribution network status based on automatic parameter optimization according to claim 1 is characterized in that: The step S3 comprises the following steps: S301, determining n hyperparameters based on domain knowledge, experience, and understanding of the data set, and obtaining a set D of value ranges of each hyperparameter for the n hyperparameters; S302, selecting accuracy, precision and recall as evaluation indicators to measure the performance of model hyperparameters; S303, selecting one of grid search, random search and Bayesian optimization as the search method according to actual conditions.

5. The method for accelerating the deduction of distribution network status based on automatic parameter optimization according to claim 1 is characterized in that: The step S4 comprises the following steps: S401. First, randomly select m h from the set D of hyperparameter value ranges, denoted as h1~h m ; S402, initialization h1~h m And the update speed v1~v m , and initialize the h corresponding to the local optimal value, that is, h 1,best ~h m,best h1~h m itself, and initialize the h corresponding to the global optimal value, that is, h best,best h 1,best .

6. The method for accelerating the deduction of distribution network status based on automatic parameter optimization according to claim 5 is characterized in that: The step S4 further comprises the following steps: S403, obtain new h by training the neural network 1,best ~h m,best and h best,best Afterwards, determine whether the neural network meets the requirements; S404, if the requirements are not met, use the updated h 1,new ~h m,new Train the neural network and repeatedly update h1~h m and update speed v1~v m , until the obtained h best,best The corresponding loss function meets the requirements; S405: If the requirements are met, output the optimal hyperparameters.

7. The method for accelerating the deduction of distribution network status based on automatic parameter optimization according to claim 1 is characterized in that: The step S5 comprises the following steps: S501. In the particle swarm algorithm, the hyperparameters in the two hyperparameter updates are fixed. When the hyperparameters are fixed, the traditional back propagation algorithm is used to train the neural network. S502, the Adam algorithm iteratively updates the neural network weights based on the training data, and adjusts different learning rates for each different parameter, updating frequently changing parameters with smaller step sizes and sparse parameters with larger step sizes.

8. The method for accelerating the deduction of distribution network status based on automatic parameter optimization according to claim 7 is characterized in that: The step S5 further comprises the following steps: S503, the input of Adam optimizer is and x The difference is the loss function of the model, and the loss function is the mean square error loss function, that is, S504, the output of the Adam optimizer is the updated model parameters.

Citation Information

Cited By

  • TDLAS oxygen concentration prediction method and system based on fuzzy neural network

    CN119845898A

  • Charging pile health degree evaluation method and device based on optimized graph convolutional network

    CN120832607A