Distribution network state calculation method and system
By using the generative adversarial network model in the distribution network for data completion, combined with the improved particle swarm optimization algorithm and the topological structure of the calculation interval segment, the problems of low data completion efficiency and low accuracy in the prior art are solved, and more efficient and accurate distribution network state calculation is achieved.
Patent Information
- Application Number
- CN202510051099.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing distribution network state calculation methods have problems of low efficiency and low accuracy in data completion and topological structure accuracy, which affects the accuracy of distribution network state calculation.
Generative adversarial network model is used to complete data, and the inertial weight is dynamically adjusted through an improved particle swarm optimization algorithm to improve the efficiency and accuracy of data completion. Based on the topological structure of the calculation interval segment, analyze and complete data, and calculate the distribution network status.
It improves the efficiency of data completion and the accuracy of distribution network status calculation, reduces the perception of faults in the station area and repair time, and improves the reliability of power supply and business quality and efficiency.
Smart Images

Figure CN119885508A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power distribution Internet of Things, and in particular to a distribution network status calculation method and system. Background Art
[0002] With the development of power distribution Internet of Things technology, the low-voltage distribution network has a large scale, a fast pace of development and change, and unbalanced and insufficient development in different regions. Considering the scale and cost of construction, it is difficult to achieve full coverage of data collection equipment. In the process of improving the digitalization and intelligence level of the equipment body and the data collection device, it is very important to adapt to local conditions, optimize the deployment strategy of new sensing equipment, make full use of existing sensing data, apply mature power grid calculation theory and technology, and study the observable, computable, and deducible methods of the distribution network operation status of medium and low voltage distribution networks. How to strengthen the application of distribution network status calculation under the premise of minimizing accurate collection, complete the digital support of power supply guarantee, reduce the perception and repair time of substation faults, and improve power supply reliability by intelligent means has become an important issue facing the operation of distribution substations at this stage.
[0003] The existing distribution network status calculation method mainly includes the steps of data collection, data processing, topology identification, and status calculation. In the distribution network, due to reasons such as the terminal equipment not being installed, equipment failure, and data transmission interruption, data missing may occur, which will affect the accuracy of the distribution network status calculation, so the missing data needs to be supplemented. The existing technology uses big data, artificial intelligence algorithms and other methods to supplement the voltage, current and other measurement data of the line nodes where the terminal is not actually installed. The existing data supplementation method mainly establishes learning models and hybrid models, and uses the models to achieve data supplementation, but the training and optimization of the model is a difficult problem. The existing model converges slowly, and the efficiency of data supplementation is not high. In addition, the object of topological analysis is the measurement data of each node or branch section, and the topological structure is inaccurate, resulting in low accuracy of distribution network status calculation. Summary of the invention
[0004] In order to solve the above technical defects, the present invention provides a distribution network status calculation method and system to improve the efficiency of data completion and improve the accuracy of status calculation.
[0005] A first aspect of the present invention provides a distribution network status calculation method, comprising:
[0006] Acquire distribution network status data, the distribution network status data including: feeder incoming line switch measurement data, distribution network switch measurement data and distribution variable measurement data;
[0007] Based on the distribution network state data, a topological analysis is performed on the calculation interval segment as an object to obtain a topological structure based on the calculation interval segment, wherein the calculation interval segment includes a range switch and an internal switch, wherein the range switch includes a switch with measurement or a switch in an open state, and the internal switch includes a switch without measurement and in a closed state and a branch connected to the switch without measurement and in a closed state;
[0008] The calculation interval is taken as an object, and the acquired distribution network status data is completed using a generative adversarial network model to obtain the completed distribution network status data; the hyperparameter combination of the generative adversarial network model is obtained by training based on an improved particle swarm optimization algorithm;
[0009] The distribution network status is calculated based on the topological structure of the calculation interval and the completed distribution network status data.
[0010] In an embodiment of the present invention, the generative adversarial network model includes: a generator network and an adversarial network;
[0011] The generator network is used to input the distribution network status data, extract the features of the distribution network status data, and generate new data that is consistent with the distribution of the distribution network status data to fill the data in the missing area to obtain the completed distribution network status data;
[0012] The adversary network is used to determine whether the distribution of the completed network distribution state data is consistent with the original network distribution state data.
[0013] In an embodiment of the present invention, the training and iteration method of the generative adversarial network model includes:
[0014] The generator network of the generative adversarial network model is trained using an improved particle swarm optimization algorithm to find the optimal hyperparameter combination for each round of training. The fitness value of the particle swarm is calculated using the loss function. The individual optimal position and the global optimal position are obtained based on the fitness value of the particle swarm. During the iteration process, the inertia weight of the particle is dynamically adjusted according to the distance between the particle and the global optimal position.
[0015] In the embodiment of the present invention, the calculation formula for dynamically adjusting the inertia weight of the particle according to the distance value between the particle and the global optimal position is:
[0016]
[0017]
[0018] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, j is the dimension of the search space, j = 1, 2, ... K;
[0019] R(t) is the distance between the particle and the global optimal position, xij (t) is the position of the particle after t iterations, g bj (t) is the j-dimensional value of the global optimal position, ω(t) is the inertia weight value of the particle in the tth iteration, ω max is the maximum inertia weight, ω min is the minimum inertia weight, R max is the maximum distance between the particle and the global optimal position, t max is the maximum number of iterations.
[0020] In the embodiment of the present invention, in each iterative calculation, each particle searches for the optimal solution at a predetermined speed and position in a multi-dimensional space, and the position of the searched optimal solution is recorded as an individual extreme value;
[0021] Assume the objective function is f g (x), xi is the position of the ith particle, and the individual extreme value of the ith particle is expressed as:
[0022]
[0023] Assume that the particle swarm contains N particles, the number of iterations is t, and the global optimal position g b The solution formula for (t) is:
[0024] G b (t) = min{f g (P b1 (t)),f g (P b2 (t)),…,f g (P bN (t))};
[0025] If f g (P bi (t)) = G b (t), then g b (t) = P bj (t), G b (t) is the fitness function corresponding to the global optimal position;
[0026] The position and velocity of each particle are adjusted by the global optimal position. The calculation formula of the particle position and velocity is:
[0027] V ij (t+1)=ωV ij (t)+c1r1[P bij (t)-x ij (t)]+c2r2[g bj (t)-x ij (t)];
[0028] xij (t+1)=x ij (t)+V ij (t+1);
[0029] Where i is the number of particles in the particle swarm, i = 1, 2, ... N; j is the dimension of the search space, j = 1, 2, ... K;
[0030] V ij (t) is the velocity of the particle after t iterations; xij(t) is the position of the particle after t iterations; P bij (t) is the j-dimensional value of the individual extreme value of the i-th particle; g bj (t) is the j-dimensional value of the global optimal position; r1 and r2 are random numbers on [0,1]; c1 and c2 are learning factors; ω is the inertia weight.
[0031] In an embodiment of the present invention, the calculation of the distribution network status based on the topological structure of the calculation interval segment and the completed distribution network status data includes: based on the distribution variable measurement data of all the calculation interval segments in the completed distribution network status data and the topological structure of each calculation interval segment, the power is calculated section by section from the end of the line to the head end of the substation, and the node voltage is calculated from the head end of the substation to the end, and it is iterated repeatedly until convergence to calculate the voltage of each node in the distribution network and the current and power of each branch.
[0032] In the embodiment of the present invention, the generator network includes: an input layer, a feature extraction layer and an output layer;
[0033] The input layer is used to input the distribution network status data;
[0034] The feature extraction layer includes: a downsampling layer and an upsampling layer, the downsampling layer downsamples the output result of the input layer, and the upsampling layer upsamples the output result of the downsampling layer;
[0035] The output layer inputs the output result of the feature extraction layer, and outputs the completed distribution network status data.
[0036] In an embodiment of the present invention, the adversarial network includes: a convolutional layer, a linear rectification function module, a fully connected layer, and an activation function module connected in sequence;
[0037] The convolution layer inputs the completed data, and the result output by the activation function module is used to determine whether the distribution of the completed network distribution status data is consistent with the original network distribution status data.
[0038] A second aspect of the present invention provides a distribution network status calculation system, comprising:
[0039] A data acquisition module is used to obtain distribution network status data, wherein the distribution network status data includes: feeder incoming line switch measurement data, distribution network switch measurement data and distribution variable measurement data;
[0040] A topology analysis module, configured to perform topology analysis on at least one calculation interval segment as an object based on the distribution network state data, and obtain a topology structure based on the calculation interval segment, wherein the calculation interval segment includes a range switch and an internal switch, wherein the range switch includes a switch with measurement or a switch in an open state, and wherein the internal switch includes a switch without measurement and in a closed state, and a branch connected to the switch without measurement and in a closed state;
[0041] The data completion module includes a generative adversarial network model, which is used to take the calculation interval as an object and use the generative adversarial network model to complete the acquired distribution network status data to obtain the completed distribution network status data; the hyperparameter combination of the generative adversarial network model is obtained by training based on an improved particle swarm optimization algorithm;
[0042] The state calculation module is used to calculate the distribution network state based on the topological structure of the calculation interval segment and the completed distribution network state data.
[0043] In an embodiment of the present invention, the generative adversarial network model includes: a generator network and an adversarial network; the generator network is used to input the distribution network status data, extract the characteristics of the distribution network status data, and generate new data consistent with the distribution of the distribution network status data to fill the data in the missing area to obtain the completed distribution network status data; the adversarial network is used to determine whether the distribution of the completed distribution network status data is consistent with the original distribution network status data.
[0044] In an embodiment of the present invention, the generative adversarial network model is trained and iterated in the following manner: the generator network of the generative adversarial network model is trained using an improved particle swarm optimization algorithm to find the optimal hyperparameter combination for each round of training, and the fitness value of the particle swarm is calculated using a loss function, and the individual optimal position and the global optimal position are obtained according to the fitness value of the particle swarm. During the iteration process, the inertia weight of the particle is dynamically adjusted according to the distance value between the particle and the global optimal position.
[0045] In the embodiment of the present invention, the calculation formula for dynamically adjusting the inertia weight of the particle according to the distance value between the particle and the global optimal position is:
[0046]
[0047]
[0048] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, j is the dimension of the search space, j = 1, 2, ... K;
[0049] R(t) is the distance between the particle and the global optimal position, x ij (t) is the position of the particle after t iterations, g bj (t) is the j-dimensional value of the global optimal position, ω(t) is the inertia weight value of the particle in the tth iteration, ω max is the maximum inertia weight, ω min is the minimum inertia weight, R max is the maximum distance between the particle and the global optimal position, t max is the maximum number of iterations.
[0050] In an embodiment of the present invention, the state calculation module is specifically used to calculate the power section by section from the end of the line to the head end of the substation based on the distribution variable measurement data of all calculation intervals in the completed distribution network state data and the topological structure of each calculation interval, and to back-calculate the node voltage from the head end to the end of the substation, repeatedly iterate until convergence, and calculate the voltage of each node in the distribution network and the current and power of each branch.
[0051] In the embodiment of the present invention, the generator network includes: an input layer, a feature extraction layer and an output layer;
[0052] The input layer is used to input the distribution network status data;
[0053] The feature extraction layer includes: a downsampling layer and an upsampling layer, the downsampling layer downsamples the output result of the input layer, and the upsampling layer upsamples the output result of the downsampling layer;
[0054] The output layer inputs the output result of the feature extraction layer, and outputs the completed distribution network status data.
[0055] The distribution network status calculation method and system provided by the present invention are based on the generative adversarial network for data completion, and with the improvement of training effect and completion accuracy as indicators, the hyperparameters of the generative adversarial network model are optimized by multivariable comprehensive optimization based on the improved particle swarm optimization algorithm (IPSO), and the inertia weight of the particles is dynamically adjusted, thereby improving the optimization ability and convergence speed of the algorithm, alleviating the influence of the hyperparameters of the deep learning network model on the training efficiency, thereby improving the efficiency of data completion. In addition, this method is based on the "calculation interval segment" as the calculation and analysis object, performs topological analysis and data completion, and carries out distribution network status calculation, which improves the accuracy of distribution network status calculation, improves the quality and efficiency of distribution network services, and improves the transparency of distribution networks.
[0056] Other features and advantages of the technical solution of the present invention will be described in detail in the specific implementation section below. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. 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:
[0058] Figure 1 is a flow chart of a method for calculating a distribution network status provided by an embodiment of the present invention;
[0059] Figure 2 is a process diagram of distribution network status calculation in an example of the present invention;
[0060] Figure 3 is a schematic diagram of a calculation interval section of a distribution network in an example of the present invention;
[0061] Figure 4 is a process diagram of data completion in an example of the present invention;
[0062] Figure 5 is a process diagram of branch measurement deduction in an example of the present invention;
[0063] Figure 6 is a schematic diagram of power flow calculation in an example of the present invention;
[0064] Figure 7 It is a schematic diagram of the structure of a generative adversarial network model provided by an embodiment of the present invention;
[0065] Figure 8 It is a block diagram of a distribution network status calculation system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to make the technical solutions and advantages of the embodiments of the present invention more clearly understood, the exemplary embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0067] As introduced in the background technology, the existing technology uses big data, artificial intelligence algorithms and other methods to complete the voltage, current and other measurement data of line nodes where the terminal is not actually installed. The existing data completion method mainly establishes learning models and hybrid models and uses the models to achieve data completion, but the training and optimization of the model is a difficult problem. The existing model algorithm converges slowly and the efficiency of data completion is not high. In addition, the object of topological analysis is the measurement data of each node or branch section, and the topological structure is inaccurate, resulting in low accuracy in the calculation of the distribution network status.
[0068] In view of the above problems, the embodiment of the present invention provides a distribution network status calculation method, which performs data completion based on a generative adversarial network, and takes improving training effect and completion accuracy as indicators, performs multivariable comprehensive optimization of the hyperparameters of the generative adversarial network model based on an improved particle swarm optimization algorithm (IPSO), dynamically adjusts the inertia weight of particles, improves the optimization ability and convergence speed of the algorithm, and alleviates the influence of the hyperparameters of the deep learning network model on the training efficiency, thereby improving the efficiency of data completion. In addition, this method takes the "calculation interval segment" as the calculation and analysis object, performs topological analysis and data completion, and carries out state calculation, which improves the accuracy of distribution network state calculation, improves the quality and efficiency of distribution network services, and improves the transparency of distribution networks.
[0069] Figure 1 Flowchart of the method for calculating the distribution network status provided by the embodiment of the present invention. Figure 1 As shown, the distribution network status calculation method provided in this embodiment includes the following steps:
[0070] S101, obtaining distribution network status data;
[0071] S102, based on the distribution network status data, taking the calculation interval segment as an object for topological analysis, and obtaining a topological structure based on the calculation interval segment;
[0072] S103, taking the calculation interval as an object, using the generative adversarial network model to complete the acquired distribution network status data, to obtain the completed distribution network status data;
[0073] S104, calculating the distribution network status based on the topological structure of the calculation interval and the completed distribution network status data.
[0074] In this embodiment, Figure 2 As shown in the figure, the implementation process of distribution network status calculation includes: input data (incoming switch measurement data, distribution network switch measurement data, distribution variable measurement data), switch section topology analysis, data completion and measurement calculation, branch flow deduction and other processes.
[0075] In a specific embodiment, in the above step S101, the distribution network status data obtained includes: feeder incoming switch measurement data, distribution network switch measurement data and distribution transformer measurement data. The feeder incoming switch measurement data is the real-time measurement data collected in the feeder incoming switch direction, including active power, reactive power, current and other data; the distribution transformer measurement data is the real-time measurement data collected in the distribution transformer direction, including the real-time measurement data in the distribution transformer direction connected to the user.
[0076] In a specific embodiment, in the above step S102, a topological analysis is performed based on a calculation interval segment, and the meaning of "calculation interval segment" is: the connection points of the switches, switches and branches that are not measured and in a closed state are merged into a segment, the switches with measurement or the switches in an open state are range devices, and the switches and branches that are not measured and in a closed state are the internal devices of the segment, forming a calculation interval segment. A calculation interval segment includes a range switch and an internal switch, and the range switch includes a switch with measurement or a switch in an open state, and the internal switch includes a switch that is not measured and in a closed state and a branch connected to the switch that is not measured and in a closed state. In one example, as Figure 3 As shown, the calculation interval 1 includes switches K1, K2, K3, and K4, of which K3 and K4 have measurements and are range switches of the calculation interval, and K1 and K2 have no measurements and are internal switches of the calculation interval. In this embodiment, the "calculation interval" is used as the calculation and analysis object for data completion and topology analysis, and the range switch is used to divide the line into multiple independent units, thereby reducing the calculation range and increasing the calculation accuracy.
[0077] In a specific embodiment, in the above step S103, based on the real-time measurement data of the feeder incoming switch and the distribution network switch, the generative adversarial network model is used to correct the switch section data, and finally complete the complete distribution transformer power measurement data of the line. Figure 4 As shown, the data completion and measurement process is: first, complete the measured data of all calculation intervals, then add the total load power within the calculation interval, and finally complete the data analysis of all calculation intervals.
[0078] In a specific embodiment, in the above step S104, based on the distribution variable measurement data of all calculation intervals in the completed distribution network status data and the topological structure of each calculation interval, forward and backward algorithms are applied to calculate the power segment by segment from the end of the line (applying the corrected distribution variable measurement data) to the head end of the substation (applying the dispatching substation outgoing line measurement data), and back-calculate the node voltage from the head end to the end of the substation, and iterate repeatedly until convergence to calculate the voltage of each node in the distribution network and the current and power of each branch. Finally, output data, such as the current, voltage, and power of a 10kV switch node. Figure 5 As shown in the figure, the process of branch measurement deduction is: according to the line data (topology, parameters) and real-time measurement data (outgoing line voltage, distribution transformer load), the flow calculation is performed to obtain the calculation results of the full node voltage, full node power, full branch power, etc.
[0079] Reference Figure 6 , the calculation formula for power loss in power flow calculation is:
[0080]
[0081] The voltage loss is calculated as:
[0082]
[0083]
[0084] Among them, P and Q are the active power and reactive power injected by the node into the network, and R and X are the resistance and reactance of the load, respectively.
[0085] Generative Adversarial Network (GAN) is an unsupervised learning model composed of a generator and an adversary. The generator inputs data with missing values, extracts the features of the complete data through network training, and generates new data with the same distribution to fill the missing area to complete the data. The adversary is a binary classification network used to distinguish between real data and generated data. When the adversary cannot distinguish between the two, it means that the generator can generate new data with the same distribution as the original data, which meets the training requirements.
[0086] In an embodiment of the present invention, a generative adversarial network model is used to complete the acquired distribution network status data. The generative adversarial network (GAN) includes a generator network and an adversarial network. The generator network inputs the distribution network status data, extracts the features of the distribution network status data, and generates new data that is consistent with the distribution of the distribution network status data to fill the data in the missing area, thereby obtaining the completed distribution network status data. The adversarial network determines whether the distribution of the completed distribution network status data is consistent with that of the original distribution network status data.
[0087] like Figure 7 As shown, the generator network includes an input layer, a feature extraction layer and an output layer. The input layer is used to input the distribution network status data; the feature extraction layer includes: a downsampling layer and an upsampling layer, the downsampling layer downsamples the output result of the input layer, and the upsampling layer upsamples the output result of the downsampling layer; the output layer inputs the output result of the feature extraction layer and outputs the completed distribution network status data. The adversary network includes a convolutional layer, a linear rectification function module, a fully connected layer and a Sigmoid activation function module connected in sequence, the convolutional layer inputs the completed data, and the result output by the Sigmoid activation function module is used to determine whether the distribution of the completed distribution network status data is consistent with the original distribution network status data.
[0088] Specifically, the input layer of the generator network inputs the data into two parallel channels of the same structure, and the two sets of output results are fused and input into the feature extraction layer after being operated by a 1D convolution layer, batch normalization, and a linear rectification function. The downsampling layer of the feature extraction layer inputs the output results of the input layer into four convolution modules with the same structure and stacked in sequence for downsampling, where each convolution module consists of a convolution layer, BN, and a linear rectification function; the upsampling layer inputs the output results of the downsampling layer into three deconvolution modules with the same structure and stacked in sequence for upsampling, where each deconvolution module consists of a 1D deconvolution layer, BN, and a linear rectification function. The output layer inputs the output results of the feature extraction layer into the deconvolution layer and the Tanh activation function to obtain the completed data.
[0089] Generative adversarial networks (GANs) define the loss functions of the generator and the discriminator, and use back propagation to continuously optimize the generator and the discriminator. During the optimization process, there will be continuous iterations. First, the generator is fixed and the discriminator is optimized. The optimization goal is to maximize the discriminator's ability to distinguish between true and false data. Then the generator is optimized, and the discriminator needs to be fixed. The optimization goal is to make the virtual data generated by the optimizer so that the discriminator cannot distinguish. In the early stage, both are relatively weak. With continuous iterative training, the generator continuously optimizes itself to deceive the discriminator, and the discriminator gradually improves its ability. When the balance is finally reached, the generator can generate virtual data with a similar distribution to the real data.
[0090] In this embodiment, the loss function g of the generator and the discriminator is defined as:
[0091] g=αg j +βg m ;
[0092]
[0093]
[0094] Among them, g j is the cross entropy loss function, g m is the mean square error loss function, n is the number of samples, and the subscript j represents the jth sample value in the data. and are the normalized values of M1 and M respectively, and α and β are the weight coefficients of the loss function.
[0095] Since the training model of GAN contains hyperparameters (weight coefficients α and β of the loss function), it is necessary to perform multivariable comprehensive optimization to achieve the optimization goal. Particle swarm optimization (PSO) is widely used because of its simple principle, few parameter settings, and strong optimization performance, but it is easy to fall into the local optimal solution and has the problem of low convergence accuracy. The present invention uses an improved particle swarm optimization algorithm (IPSO) to automatically find the hyperparameter combination that optimizes the fault location effect and optimizes the hyperparameters. The IPSO algorithm introduces the distance between each particle and the current global optimal position on the basis of the standard PSO algorithm, optimizes the learning factor, and realizes dynamic adjustment.
[0096] In the PSO algorithm, each particle has two properties: speed and position. In each iterative calculation, each particle searches for the optimal solution in the K-dimensional space at a certain speed and position, and records the position of the optimal solution found as the individual extreme value.
[0097] Assume the objective function is f g (x), xi is the position of the ith particle, and the individual extreme value of the ith particle is expressed as:
[0098]
[0099] Assume that the particle swarm contains N particles, the number of iterations is t, and the global optimal position g b The solution formula for (t) is:
[0100] G b (t) = min{f g (P b1 (t)),f g (P b2 (t)),…,f g (P bN (t))};
[0101] If f g (P bi (t)) = G b (t), then g b (t) = P bj (t), G b (t) is the fitness function corresponding to the global optimal position;
[0102] The position and velocity of each particle are adjusted by the global optimal position. The calculation formula of the particle position and velocity is:
[0103] V ij (t+1)=ωV ij (t)+c1r1[P bij (t)-x ij (t)]+c2r2[gbj (t)-x ij (t)];
[0104] x ij (t+1)=x ij (t)+V ij (t+1);
[0105] Where i is the number of particles in the particle swarm, i = 1, 2, ... N; j is the dimension of the search space, j = 1, 2, ... K;
[0106] V ij (t) is the velocity of the particle after t iterations; xij(t) is the position of the particle after t iterations; P bij (t) is the j-dimensional value of the individual extreme value of the i-th particle; g bj (t) is the j-dimensional value of the global optimal position; r1 and r2 are random numbers on [0,1]; c1 and c2 are learning factors; ω is the inertia weight.
[0107] In this embodiment, the generator network of the generative adversarial network model is trained using an improved particle swarm optimization algorithm (IPSO) to find the optimal hyperparameter combination for each round of training, and the fitness value of the particle swarm is calculated using a loss function. The individual optimal position and the global optimal position are obtained according to the fitness value of the particle swarm, and the inertia weight of the particle is dynamically adjusted according to the distance value between the particle and the global optimal position during the iteration process. In the iterative process of the GAN model, the distance R(t) between each particle and the current global optimal position is introduced, and the inertia weight ω is adjusted by using the characteristics that R(t) is larger in the early stage of optimization and smaller in the later stage of optimization. The calculation formula is:
[0108]
[0109]
[0110] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, j is the dimension of the search space, j = 1, 2, ... K;
[0111] R(t) is the distance between the particle and the global optimal position, x ij (t) is the position of the particle after t iterations, g bj (t) is the j-dimensional value of the global optimal position, ω(t) is the inertia weight value of the particle in the tth iteration, ω max is the maximum inertia weight, ω min is the minimum inertia weight, R max is the maximum distance between the particle and the global optimal position, t max is the maximum number of iterations.
[0112] The present invention performs nonlinear dynamic adjustment through the inertia weight ω, so that the optimization can approach the optimal solution faster, obtain the optimal hyperparameter combination of the GAN model, improve the convergence speed and accuracy of the PSO algorithm, and improve the efficiency of GAN model training.
[0113] In a specific example, using the GAN model, the data completion process based on IPSO is as follows:
[0114] Step 1: Divide the distribution network status data into training set and test set in proportion, and perform vectorization processing;
[0115] Step 2: Initialize the weight parameters of the generator and adversary of the GAN model, and initialize the particle's speed, position, inertia weight, acceleration factor, and number of iterations;
[0116] Step 3: Adversarial network training. After using the IPSO algorithm to find the optimal hyperparameter combination for this round of training, the data is input into the generator for training, and the loss function (g = αg j +βg m ) Calculate the fitness g of the particle swarm for the next round of iterative optimization of the particle swarm;
[0117] Step 4: Adversarial network training. The original data D and the data D1 generated by the generator are put into the adversary for training, and the authenticity of the generated data is judged to further guide the training of the generator;
[0118] Step 5: According to the fitness g of the particle in step 3, the individual optimal position and the global position are obtained, the inertia weight is dynamically adjusted according to the calculation formula of the inertia weight ω, and the iteration begins;
[0119] Step 6: Determine whether the termination condition is met. If so, output the optimal position, otherwise return to step 3. The termination condition is to reach the maximum number of iterations;
[0120] Step 7: After the operation is completed, the results obtained by IPSO are assigned to the GAN model to obtain the optimal hyperparameter combination and the trained GAN model;
[0121] Step 8: Input the feature data of the test set into the trained GAN model, and the GAN model outputs the completed data.
[0122] The embodiment of the present invention also provides a distribution network status calculation system. Figure 8As shown, the distribution network state calculation system provided in this embodiment includes: a data acquisition module, a topology analysis module, a data completion module and a state calculation module. The data acquisition module is used to obtain distribution network state data, and the distribution network state data includes: feeder incoming line switch measurement data, distribution network switch measurement data and distribution variable measurement data. The topology analysis module is used to perform topological analysis on at least one calculation interval segment as an object based on the distribution network state data, and obtain a topological structure based on the calculation interval segment, and the calculation interval segment includes a range switch and an internal switch, and the range switch includes a switch with measurement or a switch in the open state, and the internal switch includes a switch without measurement and in the closed state and a branch connected to the switch without measurement and in the closed state. The data completion module includes a generative adversarial network model, which is used to take the calculation interval segment as an object, and use the generative adversarial network model to complete the acquired distribution network state data to obtain the completed distribution network state data. The state calculation module is used to calculate the distribution network state based on the topological structure of the calculation interval segment and the completed distribution network state data.
[0123] In a specific embodiment, the topology analysis module performs topology analysis based on the calculation interval segment, and the meaning of the "calculation interval segment" is: the connection points of the switches, switches and branches that are not measured and in the closed state are merged into a section, the switches with measurement or the switches in the open state are range devices, and the switches and branches in the closed state without measurement are the internal devices of the section, forming a calculation interval segment. A calculation interval segment includes a range switch and an internal switch, the range switch includes a switch with measurement or the switch in the open state, and the internal switch includes a switch that is not measured and in the closed state and a branch connected to the switch that is not measured and in the closed state.
[0124] In an embodiment of the present invention, a generative adversarial network (GAN) model includes a generator network and an adversarial network. The generator network inputs distribution network status data, extracts features of the distribution network status data, and generates new data consistent with the distribution of the distribution network status data to fill the data in the missing area to obtain the completed distribution network status data. The adversarial network determines whether the distribution of the completed distribution network status data is consistent with that of the original distribution network status data. The generator network includes an input layer, a feature extraction layer, and an output layer. The input layer is used to input the distribution network status data; the feature extraction layer includes: a downsampling layer and an upsampling layer, the downsampling layer downsamples the output result of the input layer, and the upsampling layer upsamples the output result of the downsampling layer; the output layer inputs the output result of the feature extraction layer, and outputs the completed distribution network status data. The adversarial network includes a convolutional layer, a linear rectification function module, a fully connected layer, and a Sigmoid activation function module connected in sequence, the convolutional layer inputs the completed data, and the result output by the Sigmoid activation function module is used to determine whether the distribution of the completed distribution network status data is consistent with that of the original distribution network status data.
[0125] Generative adversarial networks (GANs) define the loss functions of the generator and the discriminator, and use back propagation to continuously optimize the generator and the discriminator. During the optimization process, there will be continuous iterations. First, the generator is fixed and the discriminator is optimized. The optimization goal is to maximize the discriminator's ability to distinguish between true and false data. Then the generator is optimized, and the discriminator needs to be fixed. The optimization goal is to make the virtual data generated by the optimizer so that the discriminator cannot distinguish. In the early stage, both are relatively weak. With continuous iterative training, the generator continuously optimizes itself to deceive the discriminator, and the discriminator gradually improves its ability. When the balance is finally reached, the generator can generate virtual data with a similar distribution to the real data.
[0126] In this embodiment, the loss function g of the generator and the discriminator is defined as:
[0127] g=αg j +βg m ;
[0128]
[0129]
[0130] Among them, g j is the cross entropy loss function, g m is the mean square error loss function, n is the number of samples, and the subscript j represents the jth sample value in the data. and are the normalized values of M1 and M respectively, and α and β are the weight coefficients of the loss function.
[0131] Since the training model of GAN contains hyperparameters (weight coefficients α and β of the loss function), it is necessary to perform multivariable comprehensive optimization to achieve the optimization goal. This embodiment uses an improved particle swarm optimization algorithm (IPSO) to automatically find the hyperparameter combination that optimizes the fault location effect and optimizes the hyperparameters. The IPSO algorithm introduces the distance between each particle and the current global optimal position on the basis of the standard PSO algorithm, optimizes the learning factor, and realizes dynamic adjustment.
[0132] In the PSO algorithm, each particle has two properties: speed and position. In each iterative calculation, each particle searches for the optimal solution in the K-dimensional space at a certain speed and position, and records the position of the optimal solution found as the individual extreme value.
[0133] Assume the objective function is f g (x), xi is the position of the ith particle, and the individual extreme value of the ith particle is expressed as:
[0134]
[0135] Assume that the particle swarm contains N particles, the number of iterations is t, and the global optimal position g b The solution formula for (t) is:
[0136] G b (t) = min{f g (P b1 (t)),f g (P b2 (t)),…,f g (P bN (t))};
[0137] If f g (P bi (t)) = G b (t), then g b (t) = P bj (t), G b (t) is the fitness function corresponding to the global optimal position;
[0138] The position and velocity of each particle are adjusted by the global optimal position. The calculation formula of the particle position and velocity is:
[0139] V ij (t+1)=ωV ij (t)+c1r1[P bij (t)-x ij (t)]+c2r2[g bj (t)-x ij (t)];
[0140] x ij (t+1)=x ij (t)+V ij (t+1);
[0141] Where i is the number of particles in the particle swarm, i = 1, 2, ... N; j is the dimension of the search space, j = 1, 2, ... K;
[0142] V ij (t) is the velocity of the particle after t iterations; xij(t) is the position of the particle after t iterations; P bij (t) is the j-dimensional value of the individual extreme value of the i-th particle; g bj (t) is the j-dimensional value of the global optimal position; r1 and r2 are random numbers on [0,1]; c1 and c2 are learning factors; ω is the inertia weight.
[0143] In the embodiment of the present invention, the generator network of the generative adversarial network model is trained using an improved particle swarm optimization algorithm (IPSO), the optimal hyperparameter combination for each round of training is found, and the fitness value of the particle swarm is calculated using a loss function. The individual optimal position and the global optimal position are obtained according to the fitness value of the particle swarm, and the inertia weight of the particle is dynamically adjusted according to the distance value between the particle and the global optimal position during the iteration process. In the iteration process of the GAN model, the distance R(t) between each particle and the current global optimal position is introduced, and the inertia weight ω is adjusted by using the characteristics that R(t) is larger in the early stage of optimization and smaller in the later stage of optimization. The calculation formula is:
[0144]
[0145]
[0146] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, j is the dimension of the search space, j = 1, 2, ... K;
[0147] R(t) is the distance between the particle and the global optimal position, x ij (t) is the position of the particle after t iterations, g bj (t) is the j-dimensional value of the global optimal position, ω(t) is the inertia weight value of the particle in the tth iteration, ω max is the maximum inertia weight, ω min is the minimum inertia weight, R max is the maximum distance between the particle and the global optimal position, t max is the maximum number of iterations.
[0148] The present invention performs nonlinear dynamic adjustment through the inertia weight ω, so that the optimization can approach the optimal solution faster, obtain the optimal hyperparameter combination of the GAN model, improve the convergence speed and accuracy of the PSO algorithm, and improve the efficiency of GAN model training.
[0149] In a specific embodiment, the state calculation module is based on the distribution variable measurement data of all calculation intervals in the completed distribution network state data and the topological structure of each calculation interval, and calculates the power segment by segment from the end of the line (applying the corrected distribution variable measurement data) to the head end of the substation (applying the dispatching substation outgoing line measurement data), and back-calculates the node voltage from the head end to the end of the substation, repeatedly iterates until convergence, and calculates the voltage of each node in the distribution network and the current and power of each branch.
[0150] The distribution network status calculation method and system proposed in the present invention are based on the improved generative adversarial network algorithm for data completion, making full use of existing perception data, consolidating the business deduction data foundation, and supporting the digital construction of distribution networks while reducing construction costs. The present invention also proposes a method for improving PSO by dynamically adjusting the inertia weight, which improves the algorithm's optimization ability and convergence speed.
[0151] An embodiment of the present invention further provides a computer device, including: a memory and a processor, the memory storing a computer program, and the processor being used to execute the computer program to implement the above-mentioned distribution network status calculation method.
[0152] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0153] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A distribution network status calculation method, characterized in that: include: Acquire distribution network status data, the distribution network status data including: feeder incoming line switch measurement data, distribution network switch measurement data and distribution variable measurement data; Based on the distribution network state data, a topological analysis is performed on the calculation interval segment as an object to obtain a topological structure based on the calculation interval segment, wherein the calculation interval segment includes a range switch and an internal switch, wherein the range switch includes a switch with measurement or a switch in an open state, and the internal switch includes a switch without measurement and in a closed state and a branch connected to the switch without measurement and in a closed state; The calculation interval is taken as an object, and the acquired distribution network status data is completed using a generative adversarial network model to obtain the completed distribution network status data; the hyperparameter combination of the generative adversarial network model is obtained by training based on an improved particle swarm optimization algorithm; The distribution network status is calculated based on the topological structure of the calculation interval and the completed distribution network status data.
2. The method for calculating the distribution network status according to claim 1, characterized in that: The generative adversarial network model includes: a generator network and an adversarial network; The generator network is used to input the distribution network status data, extract the features of the distribution network status data, and generate new data that is consistent with the distribution of the distribution network status data to fill the data in the missing area to obtain the completed distribution network status data; The adversary network is used to determine whether the distribution of the completed network distribution state data is consistent with the original network distribution state data.
3. The method for calculating the distribution network status according to claim 2, characterized in that: The training and iteration method of the generative adversarial network model includes: The generator network of the generative adversarial network model is trained using an improved particle swarm optimization algorithm to find the optimal hyperparameter combination for each round of training. The fitness value of the particle swarm is calculated using the loss function. The individual optimal position and the global optimal position are obtained based on the fitness value of the particle swarm. During the iteration process, the inertia weight of the particle is dynamically adjusted according to the distance between the particle and the global optimal position.
4. The method for calculating the distribution network status according to claim 3, characterized in that: The calculation formula for dynamically adjusting the particle's inertia weight according to the distance between the particle and the global optimal position is: Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, j is the dimension of the search space, j = 1, 2, ... K; R(t) is the distance between the particle and the global optimal position, x ij (t) is the position of the particle after t iterations, g bj (t) is the j-dimensional value of the global optimal position, ω(t) is the inertia weight value of the particle in the tth iteration, ω max is the maximum inertia weight, ω min is the minimum inertia weight, R max is the maximum distance between the particle and the global optimal position, t max is the maximum number of iterations.
5. The method for calculating the distribution network status according to claim 3, characterized in that: In each iterative calculation, each particle searches for the optimal solution at a predetermined speed and position in a multi-dimensional space, and the position of the optimal solution found is recorded as the individual extreme value; Assume the objective function is f g (x), xi is the position of the ith particle, and the individual extreme value of the ith particle is expressed as: Assume that the particle swarm contains N particles, the number of iterations is t, and the global optimal position g b The solution formula for (t) is: G b (t)=min{f g (P b1 (t)),f g (P b2 (t)),…,f g (P bN (t))}; If f g (P bi (t)) = G b (t), then g b (t) = P bj (t), G b (t) is the fitness function corresponding to the global optimal position; The position and velocity of each particle are adjusted by the global optimal position. The calculation formula of the particle position and velocity is: V ij (t+1)=ωV ij (t)+c1r1[P bij (t)-x ij (t)]+c2r2[g bj (t)-x ij (t)]; x ij (t+1)=x ij (t)+V ij (t+1); Where i is the number of particles in the particle swarm, i = 1, 2, ... N; j is the dimension of the search space, j = 1, 2, ... K; V ij (t) is the velocity of the particle after t iterations; xij(t) is the position of the particle after t iterations; P bij (t) is the j-dimensional value of the individual extreme value of the i-th particle; g bj (t) is the j-dimensional value of the global optimal position; r1 and r2 are random numbers on [0,1]; c1 and c2 are learning factors; ω is the inertia weight.
6. The method for calculating the distribution network status according to claim 1, characterized in that: The calculating of the distribution network status based on the topological structure of the calculation interval segment and the completed distribution network status data includes: Based on the distribution variable measurement data of all calculation intervals in the completed distribution network status data and the topological structure of each calculation interval, the power is calculated section by section from the end of the line to the head of the substation, and the node voltage is calculated back from the head of the substation to the end. It is iterated repeatedly until convergence, and the voltage of each node in the distribution network and the current and power of each branch are calculated.
7. The method for calculating the distribution network status according to claim 2, characterized in that: The generator network includes: an input layer, a feature extraction layer and an output layer; The input layer is used to input the distribution network status data; The feature extraction layer includes: a downsampling layer and an upsampling layer, the downsampling layer downsamples the output result of the input layer, and the upsampling layer upsamples the output result of the downsampling layer; The output layer inputs the output result of the feature extraction layer, and outputs the completed distribution network status data.
8. The method for calculating the distribution network status according to claim 7, characterized in that: The adversarial network includes: a convolutional layer, a linear rectification function module, a fully connected layer and an activation function module connected in sequence; The convolution layer inputs the completed data, and the result output by the activation function module is used to determine whether the distribution of the completed network distribution status data is consistent with the original network distribution status data.
9. A distribution network status calculation system, characterized in that: include: A data acquisition module is used to obtain distribution network status data, wherein the distribution network status data includes: feeder incoming line switch measurement data, distribution network switch measurement data and distribution variable measurement data; A topology analysis module, configured to perform topology analysis on at least one calculation interval segment as an object based on the distribution network state data, and obtain a topology structure based on the calculation interval segment, wherein the calculation interval segment includes a range switch and an internal switch, wherein the range switch includes a switch with measurement or a switch in an open state, and wherein the internal switch includes a switch without measurement and in a closed state, and a branch connected to the switch without measurement and in a closed state; The data completion module includes a generative adversarial network model, which is used to take the calculation interval as an object and use the generative adversarial network model to complete the acquired distribution network status data to obtain the completed distribution network status data; the hyperparameter combination of the generative adversarial network model is obtained by training based on an improved particle swarm optimization algorithm; The state calculation module is used to calculate the distribution network state based on the topological structure of the calculation interval segment and the completed distribution network state data.
10. The distribution network status calculation system according to claim 9, characterized in that: The generative adversarial network model includes: a generator network and an adversarial network; The generator network is used to input the distribution network status data, extract the features of the distribution network status data, and generate new data that is consistent with the distribution of the distribution network status data to fill the data in the missing area to obtain the completed distribution network status data; The adversary network is used to determine whether the distribution of the completed network distribution state data is consistent with the original network distribution state data.
11. The distribution network status calculation system according to claim 10, characterized in that: The generative adversarial network model is trained and iterated in the following way: The generator network of the generative adversarial network model is trained using an improved particle swarm optimization algorithm to find the optimal hyperparameter combination for each round of training. The fitness value of the particle swarm is calculated using the loss function. The individual optimal position and the global optimal position are obtained based on the fitness value of the particle swarm. During the iteration process, the inertia weight of the particle is dynamically adjusted according to the distance between the particle and the global optimal position.
12. The distribution network status calculation system according to claim 11, characterized in that: The calculation formula for dynamically adjusting the particle's inertia weight according to the distance between the particle and the global optimal position is: Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, j is the dimension of the search space, j = 1, 2, ... K; R(t) is the distance between the particle and the global optimal position, x ij (t) is the position of the particle after t iterations, g bj (t) is the j-dimensional value of the global optimal position, ω(t) is the inertia weight value of the particle in the tth iteration, ω max is the maximum inertia weight, ω min is the minimum inertia weight, R max is the maximum distance between the particle and the global optimal position, t max is the maximum number of iterations.
13. The distribution network status calculation system according to claim 9, characterized in that: The state calculation module is specifically used to calculate the power section by section from the end of the line to the head end of the substation based on the distribution variable measurement data of all calculation intervals in the completed distribution network state data and the topological structure of each calculation interval, and to back-calculate the node voltage from the head end to the end of the substation, repeatedly iterate until convergence, and calculate the voltage of each node in the distribution network and the current and power of each branch.
14. The distribution network status calculation system according to claim 10, characterized in that: The generator network includes: an input layer, a feature extraction layer and an output layer; The input layer is used to input the distribution network status data; The feature extraction layer includes: a downsampling layer and an upsampling layer, the downsampling layer downsamples the output result of the input layer, and the upsampling layer upsamples the output result of the downsampling layer; The output layer inputs the output result of the feature extraction layer, and outputs the completed distribution network status data.
15. A computer device, characterized in that: include: a memory storing a computer program; A processor, used to execute the computer program to implement the distribution network status calculation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Power distribution network topology identification method of SVM (Support Vector Machine) based on particle swarm optimization optimization
CN113901624A
Monitoring method, device and system for power distribution network
CN114915035A
Active power distribution network topology identification method based on multi-task graph learning and related device
CN118889428A
Method And System Of Hybrid Data-And-Model-Driven Hierarchical Network Reconfiguration
US20220078082A1
Online real-time loop closing method based on integration of main network and distribution network
WO2015143846A1