Network distribution state calculation method and system
By using a generative adversarial network model and an improved particle swarm optimization algorithm, the problems of insufficient data completion efficiency and accuracy in distribution network status calculation are solved, achieving efficient distribution network status calculation and transparency.
Patent Information
- Application Number
- CN202510051099.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2045-01-13
AI Technical Summary
Existing methods for calculating distribution network status suffer from low data completion efficiency and inaccurate topology, resulting in insufficient calculation accuracy and making it difficult to achieve efficient power supply protection and fault repair.
By employing a generative adversarial network model combined with an improved particle swarm optimization algorithm, and through topology analysis and data completion, the inertia weight is dynamically adjusted to improve the efficiency and accuracy of data completion.
It improves data completion efficiency and the accuracy of distribution network status calculation, enhances the quality and efficiency of distribution network services and transparency, and reduces fault detection and repair time.
Smart Images

Figure CN119885508B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution Internet of Things (IoT), and more specifically to a method and system for calculating the status of a power distribution network. Background Technology
[0002] With the development of distribution IoT technology, low-voltage distribution networks are large in scale and rapidly changing, with uneven and insufficient development across different regions. Considering construction scale and cost, it is difficult to achieve full coverage of data acquisition equipment. In the process of improving the digitalization and intelligence level of equipment and acquisition devices, it is crucial to optimize the deployment strategy of new sensing equipment according to local conditions, fully utilize existing sensing data, and apply mature power grid computing theories and technologies to study observable, calculable, and predictable methods for the operation status of low- and medium-voltage distribution networks. How to enhance the application of distribution network status calculation while minimizing accurate data acquisition, complete the digital support for power supply security, reduce the detection and repair time of transformer area faults, and improve power supply reliability through intelligent means has become an important issue facing distribution transformer area operation at this stage.
[0003] Existing methods for calculating distribution network status mainly include data acquisition, data processing, topology identification, and status calculation. In distribution networks, data gaps can occur due to reasons such as missing terminal equipment, equipment failure, and data transmission interruptions. This affects the accuracy of distribution network status calculations, thus requiring data completion. Current technologies utilize big data and artificial intelligence algorithms to complete measurement data such as voltage and current at line nodes where terminals are not actually installed. Existing data completion methods primarily rely on learning models and hybrid models to achieve data completion. However, model training and optimization are challenging, and existing models have slow convergence speeds, resulting in low efficiency in data completion. Furthermore, topology analysis focuses on measurement data from individual nodes or branch sections, leading to inaccurate topology structures and consequently, low accuracy in distribution network status calculations. Summary of the Invention
[0004] To address the aforementioned technical deficiencies, this invention provides a distribution network status calculation method and system to improve the efficiency of data completion and the accuracy of status calculation.
[0005] The first aspect of this invention provides a method for calculating the status of a distribution network, comprising:
[0006] Obtain distribution network status data, which includes: feeder incoming switch measurement data, distribution network switch measurement data, and distribution variable measurement data;
[0007] Based on the distribution network status data, the calculation interval segment is used as the object for topology analysis to obtain the topology structure based on the calculation interval segment. The calculation interval segment includes range switches and internal switches. The range switches include switches with measurement or switches in the open state. The internal switches include switches without measurement and in the closed state, as well as branches connected to the switches without measurement and in the closed state.
[0008] The calculation interval is taken as the 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 topology of the calculation interval and the completed distribution network status data.
[0010] In this embodiment of the invention, the generative adversarial network model includes: a generator network and an adversary 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 network status data distribution to fill in the missing data areas and obtain the completed distribution network status data.
[0012] The countermeasure network is used to determine whether the distribution status data after completion is consistent with the distribution status data of the original distribution network.
[0013] In this embodiment of the invention, the training and iteration method of the generative adversarial network model includes:
[0014] An improved particle swarm optimization algorithm is used to train the generator network of a generative adversarial network model to find the optimal combination of hyperparameters in each training round. The fitness value of the particle swarm is calculated using a loss function. Based on the fitness value of the particle swarm, the optimal position of the individual particles and the global optimal position are obtained. During the iteration process, the inertia weight of the particles is dynamically adjusted according to the distance between the particles and the global optimal position.
[0015] In this embodiment of the invention, the formula for calculating the inertial weight of a particle to be dynamically adjusted based on the distance between the particle and the global optimal position is as follows:
[0016]
[0017]
[0018] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, and 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) represents the position of the particle after t iterations, g bj (t) represents the j-dimensional value of the global optimal position, and ω(t) represents the inertial weight value of the particle in the t-th iteration. max ω represents the maximum value of the inertia weight. min R is the minimum value of the inertia weight. max t represents the maximum distance between the particle and the global optimal position. max This represents the maximum number of iterations.
[0020] In this embodiment of the invention, in each iteration of calculation, each particle searches for the optimal solution in a multidimensional space at a predetermined speed and position, and the position of the optimal solution found is recorded as the individual extreme value.
[0021] Assume the objective function is f g (x), where xi is the position of the i-th particle, and the individual extreme value of the i-th particle is expressed as:
[0022]
[0023] Assuming the particle swarm contains N particles, the number of iterations is t, and the global optimal position is g... b The formula for solving (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 using the globally optimal position. The formulas for calculating the position and velocity of a particle are as follows:
[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) represents the velocity of the particle after t iterations; xij(t) represents the position of the particle after t iterations; P bij (t) represents the j-dimensional value of the individual extremum of the i-th particle; g bj (t) represents 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 this embodiment of the invention, the calculation of the distribution network status based on the topology of the calculation interval segments and the completed distribution network status data includes: based on the distribution variable measurement data of all calculation interval segments in the completed distribution network status data and the topology of each calculation interval segment, calculating the power segment by segment from the end of the line to the beginning of the substation, substituting the voltage of the calculation nodes back from the beginning of the substation to the end, iterating repeatedly until convergence, and calculating the voltage of each node in the distribution network and the current and power of each branch.
[0032] In this embodiment of the 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 power distribution network status data;
[0034] The feature extraction layer includes a downsampling layer and an upsampling layer. The downsampling layer downsamples the output of the input layer, and the upsampling layer upsamples the output of the downsampling layer.
[0035] The output layer takes the output result of the feature extraction layer as input and outputs the completed distribution network status data.
[0036] In this embodiment of the invention, the adversary network includes: a convolutional layer, a linear rectified function module, a fully connected layer, and an activation function module connected in sequence;
[0037] The convolutional layer takes the completed data as input, and the activation function module outputs the result to determine whether the distribution network status data after completion is consistent with the distribution network status data of the original data.
[0038] A second aspect of the present invention provides a distribution network status calculation system, comprising:
[0039] The data acquisition module is used to acquire distribution network status data, which includes: feeder incoming switch measurement data, distribution network switch measurement data, and distribution variable measurement data.
[0040] The topology analysis module is used to perform topology analysis on at least one calculation interval segment based on distribution network status data to obtain the topology structure based on the calculation interval segment. The calculation interval segment includes range switches and internal switches. The range switches include switches with measurement or switches in the open state. The internal switches include switches without measurement and in the closed state, as well as branches connected to the switches without measurement and in the closed state.
[0041] The data completion module includes a generative adversarial network (GAN) model, which uses the computation interval as the object to complete the acquired distribution network status data, thereby obtaining the completed distribution network status data. The hyperparameter combination of the GAN model is obtained by training based on an improved particle swarm optimization algorithm.
[0042] The status calculation module is used to calculate the distribution network status based on the topology of the calculation interval segment and the completed distribution network status data.
[0043] In this embodiment of the invention, the generative adversarial network model includes a generator network and an adversary 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 with the same distribution as the distribution network status data to fill in the missing data areas and obtain the completed distribution network status data. The adversary network is used to determine whether the distribution of the completed distribution network status data is consistent with the distribution of the original distribution network status data.
[0044] In this embodiment of the 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 combination of hyperparameters for each training round, and the fitness value of the particle swarm is calculated using a loss function. Based on the fitness value of the particle swarm, the optimal position of the individual and the global optimal position are obtained. 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.
[0045] In this embodiment of the invention, the formula for calculating the inertial weight of a particle to be dynamically adjusted based on the distance between the particle and the global optimal position is as follows:
[0046]
[0047]
[0048] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, and 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) represents the position of the particle after t iterations, g bj (t) represents the j-dimensional value of the global optimal position, and ω(t) represents the inertial weight value of the particle in the t-th iteration. max ω represents the maximum value of the inertia weight. min R is the minimum value of the inertia weight. max t represents the maximum distance between the particle and the global optimal position. max This represents the maximum number of iterations.
[0050] In this embodiment of the invention, the state calculation module is specifically used to calculate the power segment by segment from the end of the line to the beginning of the substation based on the distribution variable measurement data of all calculation interval segments in the completed distribution network state data and the topology of each calculation interval segment, and to calculate the voltage of each node and the current and power of each branch in the distribution network by substituting the voltage of the calculation node from the beginning of the substation back to the end, iterating repeatedly until convergence.
[0051] In this embodiment of the 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 power distribution network status data;
[0053] The feature extraction layer includes a downsampling layer and an upsampling layer. The downsampling layer downsamples the output of the input layer, and the upsampling layer upsamples the output of the downsampling layer.
[0054] The output layer takes the output result of the feature extraction layer as input and outputs the completed distribution network status data.
[0055] The distribution network status calculation method and system provided by this invention are based on generative adversarial networks (GANs) for data completion. With improved training effectiveness and completion accuracy as indicators, an improved particle swarm optimization (IPSO) algorithm is used to comprehensively optimize the hyperparameters of the GAN model through multivariate optimization, dynamically adjusting the inertia weights of particles. This improves the algorithm's optimization capability and convergence speed, mitigating the impact of deep learning network model hyperparameters on training efficiency, thereby improving the efficiency of data completion. Furthermore, this method uses "computation interval segments" as the calculation and analysis object, performing topology analysis and data completion, and then calculating the distribution network status, improving the accuracy of distribution network status calculation and enhancing the quality and efficiency of distribution network services and the transparency of the distribution network.
[0056] Other features and advantages of the technical solution of the present invention will be described in detail in the following detailed embodiments section. Attached Figure Description
[0057] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0058] Figure 1 This is a flowchart of the distribution network status calculation method provided in the embodiments of the present invention;
[0059] Figure 2 This is a flowchart illustrating the process of calculating the distribution network status in an example of the present invention;
[0060] Figure 3 This is a schematic diagram of a calculation interval segment of a power distribution network in an example of the present invention;
[0061] Figure 4 This is a diagram illustrating the data completion process in an example of the present invention;
[0062] Figure 5 This is a process diagram illustrating the branch measurement derivation in an example of the present invention;
[0063] Figure 6 This is a schematic diagram of power flow calculation in an example of the present invention;
[0064] Figure 7 This is a schematic diagram of the structure of the generative adversarial network model provided in an embodiment of the present invention;
[0065] Figure 8 This is a block diagram of the distribution network status calculation system provided in an embodiment of the present invention. Detailed Implementation
[0066] To make the technical solutions and advantages of the embodiments of the present invention clearer, the exemplary embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0067] As described in the background section, existing technologies utilize big data and artificial intelligence algorithms to supplement measurement data such as voltage and current at line nodes where terminals are not actually installed. Current data supplementation methods primarily rely on establishing learning models and hybrid models to achieve data completion. However, model training and optimization are challenging, and existing model algorithms have slow convergence speeds, resulting in low data supplementation efficiency. Furthermore, topology analysis focuses on measurement data from individual nodes or branch sections; inaccurate topology structures lead to low accuracy in distribution network status calculations.
[0068] To address the aforementioned issues, this invention provides a distribution network status calculation method. Based on generative adversarial networks (GANs), it performs data completion and, with the improvement of training effectiveness and completion accuracy as indicators, uses an improved particle swarm optimization (IPSO) algorithm to comprehensively optimize the hyperparameters of the GAN model through multivariate optimization. It dynamically adjusts the inertia weights of particles, improving the algorithm's optimization capability and convergence speed, mitigating the impact of deep learning network model hyperparameters on training efficiency, thereby improving data completion efficiency. Furthermore, this method uses "computation interval segments" as the calculation and analysis object, performing topology analysis and data completion, and conducting status calculations, thus improving the accuracy of distribution network status calculations, enhancing the quality and efficiency of distribution network services, and increasing distribution network transparency.
[0069] Figure 1 This is a flowchart of the distribution network status calculation method provided in an embodiment of the present invention. For example... Figure 1 As shown, the distribution network status calculation method provided in this embodiment includes the following steps:
[0070] S101, Obtain distribution network status data;
[0071] S102, Based on the distribution network status data, the calculation interval segment is used as the object for topology analysis to obtain the topology structure based on the calculation interval segment;
[0072] S103, taking the calculation interval as the object, using the generative adversarial network model to complete the acquired distribution network status data, and obtaining the completed distribution network status data;
[0073] S104 calculates the distribution network status based on the topology of the calculation interval segment and the completed distribution network status data.
[0074] In this embodiment, as Figure 2 As shown, 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 power flow deduction, etc.
[0075] In one specific embodiment, the distribution network status data acquired in step S101 includes: feeder incoming switch measurement data, distribution network switch measurement data, and distribution transformer measurement data. The feeder incoming switch measurement data is real-time collected measurement data in the direction of the feeder incoming switch, including active power, reactive power, current, and other data; the distribution transformer measurement data is real-time collected measurement data in the direction of the distribution transformer, including real-time measurement data in the direction of the distribution transformer connected to the user's device.
[0076] In one specific embodiment, in step S102 above, topology analysis is performed based on a calculation interval segment. The meaning of "calculation interval segment" is: a segment is formed by merging connection points of switches, disconnectors, and branches connected together that are closed without measurement. Switches with measurement or switches in an open state are range devices, and switches and branches in an open state without measurement are internal devices within the segment, thus constituting a calculation interval segment. A calculation interval segment includes range switches and internal switches. Range switches include switches with measurement or switches in an open state, and internal switches include switches in an open state without measurement and branches connected to switches in an open state without measurement. In one example, such as... Figure 3 As shown, calculation interval 1 includes switches K1, K2, K3, and K4. K3 and K4 are measured and are range switches for the calculation interval, while K1 and K2 are not measured and are internal switches for the calculation interval. In this embodiment, the "calculation interval" is used as the calculation analysis object for data completion and topology analysis. The range switches are used to divide the line into multiple independent units, reducing the calculation range and increasing the calculation accuracy.
[0077] In one specific embodiment, in step S103 above, based on the real-time measurement data of the feeder incoming switch and the distribution network switch, a generative adversarial network model is used to correct the switch section data, ultimately completing the complete distribution transformer power measurement data of the line. For example... Figure 4 As shown, the data completion and measurement process is as follows: First, complete the measurement data of all distribution variables in all calculation intervals; then, sum the load power within the calculation intervals; and finally, complete the data analysis of all calculation intervals.
[0078] In one specific embodiment, in step S104 above, based on the distribution network status data and the topology of all calculation interval segments in the completed data, algorithms such as forward and backward substitution are applied to calculate the power segment by segment from the end of the line (using the corrected distribution network measurement data) to the beginning of the substation (using the outgoing line measurement data of the dispatching substation). The voltage of the calculated nodes is then substituted backward from the beginning of the substation to the end, iterating repeatedly until convergence. This process calculates the voltage of each node in the distribution network and the current and power of each branch. Finally, the data is output, such as the current, voltage, and power of a 10kV switching node. Figure 5 As shown, the process of branch measurement and simulation is as follows: power flow calculation is performed based on line data (topology, parameters) and real-time measurement data (outgoing line voltage, distribution transformer load) to obtain the calculation results such as total node voltage, total node power, and total branch power.
[0079] Reference Figure 6 The formula for calculating power loss in power flow calculation is:
[0080]
[0081] The formula for calculating voltage loss is:
[0082]
[0083]
[0084] Where P and Q are the active power and reactive power injected into the network by the nodes, respectively, and R and X are the resistance and reactance of the load, respectively.
[0085] Generative Adversarial Networks (GANs) are unsupervised learning models consisting of a generator and an adversary. The generator takes data containing missing values as input, extracts features from the complete data through network training, and generates new data with a distribution consistent with the original data to fill in the missing regions, thus completing data completion. The adversary is a binary classification network used to distinguish between real and generated data. When the adversary cannot distinguish between the two, it indicates that the generator can generate new data with a distribution consistent with the original data, satisfying the training requirements.
[0086] In this embodiment of the invention, a generative adversarial network (GAN) model is used to complete the acquired distribution network status data. The GAN includes a generator network and an adversary network. The generator network takes the distribution network status data as input, extracts its features, and generates new data with a distribution consistent with the original distribution network status data to fill in missing data areas, resulting in the completed distribution network status data. The adversary network then determines whether the distribution of the completed distribution network status data is consistent with 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 of the input layer, and the upsampling layer upsamples the output of the downsampling layer; the output layer takes the output of the feature extraction layer as input and outputs the completed distribution network status data. The adversarial network includes a convolutional layer, a linear rectified function module, a fully connected layer, and a sigmoid activation function module connected in sequence. The convolutional layer takes the completed data as input, and the output of 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 generator network's input layer feeds data into two parallel channels with identical structures. The data is then processed through a 1D convolutional layer, batch normalization, and a linear rectified function. The two outputs are then fused and fed into the feature extraction layer. The feature extraction layer's downsampling layer feeds the input layer's output into four identical, stacked convolutional modules, each consisting of a convolutional layer, batch normalization, and a linear rectified function. The upsampling layer feeds the downsampling layer's output into three identical, stacked deconvolutional modules, each consisting of a 1D deconvolutional layer, batch normalization, and a linear rectified function. The output layer feeds the feature extraction layer's output into a deconvolutional layer and a Tanh activation function to obtain the padded data.
[0089] Generative Adversarial Networks (GANs) define loss functions for the generator and discriminator, and continuously optimize them using backpropagation. The optimization process involves iterative steps: first, the generator is fixed while the discriminator is optimized, with the goal of maximizing the discriminator's ability to distinguish between real and fake data; then, the generator is optimized while the discriminator is fixed, with the goal of making the generated dummy data indistinguishable from the discriminator's. Initially, both are relatively weak. With continuous iterative training, the generator continuously optimizes itself to fool the discriminator, while the discriminator gradually improves its capabilities. Finally, an equilibrium is reached where the generator can generate dummy data with a distribution similar to real data.
[0090] In this embodiment, the loss function g for the generator and discriminator is defined as follows:
[0091] g=αg j +βg m ;
[0092]
[0093]
[0094] Among them, g j Let g be the cross-entropy loss function. m Let be the mean squared error loss function, n be the number of samples, and the subscript j represent the j-th sample value in the data. and α and β are the normalized values of M1 and M, respectively, and the weight coefficients of the loss function are α and β.
[0095] Since GAN training models contain hyperparameters (weight coefficients α and β of the loss function), multivariate comprehensive optimization is required to achieve the optimal goal. Particle Swarm Optimization (PSO) is widely used due to its simple principle, few parameter settings, and strong optimization performance, but it is prone to getting trapped in local optima and suffers from low convergence accuracy. This invention utilizes an improved Particle Swarm Optimization (IPSO) algorithm to automatically find the optimal combination of hyperparameters for fault location and optimizes these hyperparameters. The IPSO algorithm, based on the standard PSO algorithm, introduces the distance between each particle and the current global optimum position to optimize the learning factor and achieve dynamic adjustment.
[0096] In the PSO algorithm, each particle has two attributes: velocity and position. In each iteration, each particle searches for the optimal solution in K-dimensional space with a certain velocity and position, and the position of the optimal solution it finds is recorded as the individual extreme value.
[0097] Assume the objective function is f g (x), where xi is the position of the i-th particle, and the individual extreme value of the i-th particle is expressed as:
[0098]
[0099] Assuming the particle swarm contains N particles, the number of iterations is t, and the global optimal position is g... b The formula for solving (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 using the globally optimal position. The formulas for calculating the position and velocity of a particle are as follows:
[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) represents the velocity of the particle after t iterations; xij(t) represents the position of the particle after t iterations; P bij (t) represents the j-dimensional value of the individual extremum of the i-th particle; g bj (t) represents 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, an improved Particle Swarm Optimization (IPSO) algorithm is used to train the generator network of the Generative Adversarial Network (GAN) model, finding the optimal hyperparameter combination for each training round. A loss function is used to calculate the fitness value of the particle swarm. Based on the fitness value, the individual optimal position and the global optimal position are obtained. During the iteration process, the inertia weight of each particle is dynamically adjusted based on the distance between the particle and the global optimal position. In the iteration process of the GAN model, the distance R(t) between each particle and the current global optimal position is introduced. Taking advantage of the characteristic that R(t) is larger in the early stages of optimization and smaller in the later stages, the inertia weight ω is adjusted. The calculation formula is as follows:
[0108]
[0109]
[0110] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, and 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) represents the position of the particle after t iterations, g bj (t) represents the j-dimensional value of the global optimal position, and ω(t) represents the inertial weight value of the particle in the t-th iteration. max ω represents the maximum value of the inertia weight. min R is the minimum value of the inertia weight. max t represents the maximum distance between the particle and the global optimal position. max This represents the maximum number of iterations.
[0112] This invention uses nonlinear dynamic adjustment of the inertial weight ω to make the optimization process 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 enhance the training efficiency of the GAN model.
[0113] In a specific example, the data completion process based on IPSO using a GAN model is as follows:
[0114] Step 1: Divide the distribution network status data into training and test sets according to the proportions, and then perform vectorization processing;
[0115] Step 2: Initialize the weight parameters of the generator and adversary in the GAN model, and initialize parameters such as particle velocity, position, inertia weight, acceleration factor, and number of iterations;
[0116] Step 3: Adversarial Network Training. After finding the optimal hyperparameter combination for this training round using the IPSO algorithm, the data is input into the generator for training, and a loss function (g = αg) is used. j +βg m )Calculate the fitness g of the particle swarm optimization, which is used for the next round of iterative optimization of the particle swarm optimization;
[0117] Step 4: Adversarial Network Training. The original data D and the data D1 generated by the generator are fed into the adversarial network for training. The authenticity of the generated data is judged to further guide the generator's training.
[0118] Step 5: Calculate the individual optimal position and global position based on the particle's fitness g from Step 3. Dynamically adjust the inertia weight ω according to the formula for calculating the inertia weight ω, and begin the iteration.
[0119] Step 6: Determine if the termination condition is met. If it is, output the optimal position; otherwise, return to Step 3. The termination condition is reaching the maximum number of iterations.
[0120] Step 7: After the operation is completed, the results obtained from 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] This invention also provides a distribution network status calculation system. For example... Figure 8As shown, the distribution network status calculation system provided in this embodiment includes: a data acquisition module, a topology analysis module, a data completion module, and a status calculation module. The data acquisition module is used to acquire distribution network status data, which includes: feeder incoming switch measurement data, distribution network switch measurement data, and distribution variable measurement data. The topology analysis module is used to perform topology analysis on at least one calculation interval segment based on the distribution network status data, obtaining a topology structure based on the calculation interval segment. The calculation interval segment includes range switches and internal switches. The range switches include switches with measurements or switches in the open state. The internal switches include switches without measurements and switches in the closed state, as well as branches connected to switches without measurements and switches in the closed state. The data completion module includes a generative adversarial network (GAN) model, used to complete the acquired distribution network status data using the calculation interval segment as the object, obtaining completed distribution network status data. The status calculation module is used to calculate the distribution network status based on the topology structure of the calculation interval segment and the completed distribution network status data.
[0123] In a specific embodiment, the topology analysis module performs topology analysis based on calculation intervals. A "calculation interval" is defined as follows: a segment is formed by merging connection points of switches, disconnectors, and branches that are closed without measurement. Switches with measurement or switches that are open are considered range devices, while switches and branches that are closed without measurement are considered internal devices within the segment. A calculation interval includes range switches and internal switches. Range switches include switches with measurement or switches that are open, while internal switches include switches that are closed without measurement and branches connected to switches that are closed without measurement.
[0124] In this embodiment of the invention, the Generative Adversarial Network (GAN) model includes a generator network and an adversary network. The generator network takes distribution network status data as input, extracts features from the distribution network status data, and generates new data with a distribution consistent with the distribution network status data to fill in missing data areas, resulting in complete distribution network status data. The adversary network determines whether the distribution of the complete distribution network status data is consistent with 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 of the input layer, and the upsampling layer upsamples the output of the downsampling layer; the output layer takes the output of the feature extraction layer as input and outputs the complete distribution network status data. The adversary network includes a convolutional layer, a linear rectified function module, a fully connected layer, and a sigmoid activation function module connected in sequence. The convolutional layer takes the completed data as input, and the output of 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.
[0125] Generative Adversarial Networks (GANs) define loss functions for the generator and discriminator, and continuously optimize them using backpropagation. The optimization process involves iterative steps: first, the generator is fixed while the discriminator is optimized, with the goal of maximizing the discriminator's ability to distinguish between real and fake data; then, the generator is optimized while the discriminator is fixed, with the goal of making the generated dummy data indistinguishable from the discriminator's. Initially, both are relatively weak. With continuous iterative training, the generator continuously optimizes itself to fool the discriminator, while the discriminator gradually improves its capabilities. Finally, an equilibrium is reached where the generator can generate dummy data with a distribution similar to real data.
[0126] In this embodiment, the loss function g for the generator and discriminator is defined as follows:
[0127] g=αg j +βg m ;
[0128]
[0129]
[0130] Among them, g j Let g be the cross-entropy loss function. m Let be the mean squared error loss function, n be the number of samples, and the subscript j represent the j-th sample value in the data. and α and β are the normalized values of M1 and M, respectively, and the weight coefficients of the loss function are α and β.
[0131] Since GAN training models contain hyperparameters (weight coefficients α and β of the loss function), multivariate comprehensive optimization is required to achieve the optimal goal. This embodiment utilizes an improved particle swarm optimization (IPSO) algorithm to automatically find the hyperparameter combination that optimizes the fault location effect and then optimizes the hyperparameters. The IPSO algorithm, based on the standard PSO algorithm, introduces the distance between each particle and the current global optimum position to optimize the learning factor and achieve dynamic adjustment.
[0132] In the PSO algorithm, each particle has two attributes: velocity and position. In each iteration, each particle searches for the optimal solution in K-dimensional space with a certain velocity and position, and the position of the optimal solution it finds is recorded as the individual extreme value.
[0133] Assume the objective function is f g (x), where xi is the position of the i-th particle, and the individual extreme value of the i-th particle is expressed as:
[0134]
[0135] Assuming the particle swarm contains N particles, the number of iterations is t, and the global optimal position is g... b The formula for solving (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 using the globally optimal position. The formulas for calculating the position and velocity of a particle are as follows:
[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) represents the velocity of the particle after t iterations; xij(t) represents the position of the particle after t iterations; P bij (t) represents the j-dimensional value of the individual extremum of the i-th particle; g bj (t) represents 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 this embodiment of the invention, an improved Particle Swarm Optimization (IPSO) algorithm is used to train the generator network of the Generative Adversarial Network (GAN) model, finding the optimal hyperparameter combination for each training round. A loss function is used to calculate the fitness value of the particle swarm. Based on the fitness value, the individual optimal position and the global optimal position are obtained. During the iteration process, the inertia weight of the particles is dynamically adjusted based on the distance between the particles and the global optimal position. In the iteration process of the GAN model, the distance R(t) between each particle and the current global optimal position is introduced. Taking advantage of the characteristic that R(t) is larger in the early stage of optimization and smaller in the later stage, the inertia weight ω is adjusted. The calculation formula is as follows:
[0144]
[0145]
[0146] Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, and 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) represents the position of the particle after t iterations, g bj (t) represents the j-dimensional value of the global optimal position, and ω(t) represents the inertial weight value of the particle in the t-th iteration. max ω represents the maximum value of the inertia weight. min R is the minimum value of the inertia weight. max t represents the maximum distance between the particle and the global optimal position. max This represents the maximum number of iterations.
[0148] This invention uses nonlinear dynamic adjustment of the inertial weight ω to make the optimization process 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 enhance the training efficiency of the GAN model.
[0149] In a specific embodiment, the state calculation module calculates the power segment by segment from the end of the line (using the corrected distribution measurement data) to the beginning of the substation (using the outgoing line measurement data of the dispatching substation) based on the distribution network state data of all calculation interval segments and the topology of each calculation interval segment. It then 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 this invention are based on an improved generative adversarial network algorithm for data completion, making full use of existing sensing data and strengthening the foundation of business simulation data, thereby supporting the digital construction of distribution networks while reducing construction costs. This invention also proposes a method for dynamically adjusting inertia weights to improve the PSO (Power Scaling Optimization) algorithm, enhancing its optimization capability and convergence speed.
[0151] The present invention also provides a computer device, including: a memory and a processor, wherein the memory stores a computer program and the processor executes the computer program to implement the above-described distribution network status calculation method.
[0152] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can 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 code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0153] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0154] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0155] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0156] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.
Claims
1. A method for calculating the status of a distribution network, characterized in that, include: Obtain distribution network status data, which includes: feeder incoming switch measurement data, distribution network switch measurement data, and distribution variable measurement data; Based on the distribution network status data, the calculation interval segment is used as the object for topology analysis to obtain the topology structure based on the calculation interval segment. The calculation interval segment includes range switches and internal switches. The range switches include switches with measurement or switches in the open state. The internal switches include switches without measurement and in the closed state, as well as branches connected to the switches without measurement and in the closed state. Using a computational interval as the object, a generative adversarial network (GAN) model is used to complete the acquired distribution network status data, resulting in completed distribution network status data. The GAN model includes a generator network and an adversary network. The generator network takes the distribution network status data as input, extracts its features, and generates new data with a distribution consistent with the original distribution network status data to fill in missing data areas, thus obtaining the completed distribution network status data. The adversary network determines whether the distribution of the completed distribution network status data is consistent with the original distribution network status data. The hyperparameter combination of the GAN model is obtained through training based on an improved particle swarm optimization algorithm. Based on the topology of the calculation intervals and the completed distribution network status data, the distribution network status is calculated, including: based on the distribution variable measurement data of all calculation intervals in the completed distribution network status data and the topology of each calculation interval, the power is calculated segment by segment from the end of the line to the beginning of the substation, and the voltage of the calculation nodes is substituted back from the beginning of the substation to the end. The process is iterated repeatedly until convergence, and the voltage of each node and the current and power of each branch in the distribution network are calculated.
2. The distribution network status calculation method according to claim 1, characterized in that, The training and iteration methods for the generative adversarial network model include: An improved particle swarm optimization algorithm is used to train the generator network of a generative adversarial network model to find the optimal combination of hyperparameters in each training round. The fitness value of the particle swarm is calculated using a loss function. Based on the fitness value of the particle swarm, the optimal position of the individual particles and the global optimal position are obtained. During the iteration process, the inertia weight of the particles is dynamically adjusted according to the distance between the particles and the global optimal position.
3. The distribution network status calculation method according to claim 2, characterized in that, The formula for dynamically adjusting the particle's inertial weight based on the distance between the particle and the global optimal position is as follows: ; ; Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, and 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. This represents the position of the particle after t iterations. Let j be the j-dimensional value of the globally optimal position. Let be the inertial weight value of the particle in the t-th iteration. This represents the maximum value of the inertia weight. R is the minimum value of the inertia weight. max t represents the maximum distance between the particle and the global optimal position. max This represents the maximum number of iterations.
4. The distribution network status calculation method according to claim 2, characterized in that, In each iteration of the calculation, each particle searches for the optimal solution in the multidimensional space at a predetermined speed and position, and the position of the optimal solution found is recorded as the individual extreme value. Assume the objective function is , x i Let i be the position of the i-th particle. The individual extreme value of the i-th particle is expressed as: ; Assuming a particle swarm contains N particles, the number of iterations is t, and the global optimal position is... The solution formula is: ; like ,but , The fitness function is the function corresponding to the globally optimal position. The position and velocity of each particle are adjusted by using the globally optimal position. The formulas for calculating the position and velocity of a particle are as follows: ; ; 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; Let t be the velocity of the particle after t iterations; This represents the position of the particle after t iterations. Let j be the individual extreme value of the i-th particle; The j-dimensional value represents the globally optimal position; , A random number in the range [0,1]. , For learning factors; This is the inertial weight.
5. The distribution network status calculation method according to claim 1, 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 power distribution network status data; The feature extraction layer includes a downsampling layer and an upsampling layer. The downsampling layer downsamples the output of the input layer, and the upsampling layer upsamples the output of the downsampling layer. The output layer takes the output result of the feature extraction layer as input and outputs the completed distribution network status data.
6. The distribution network status calculation method according to claim 5, characterized in that, The adversary network comprises: a convolutional layer, a linear rectified function module, a fully connected layer, and an activation function module connected in sequence; The convolutional layer takes the completed data as input, and the activation function module outputs the result to determine whether the distribution network status data after completion is consistent with the distribution network status data of the original data.
7. A distribution network status calculation system, characterized in that, include: The data acquisition module is used to acquire distribution network status data, which includes: feeder incoming switch measurement data, distribution network switch measurement data, and distribution variable measurement data. The topology analysis module is used to perform topology analysis on at least one calculation interval segment based on distribution network status data to obtain the topology structure based on the calculation interval segment. The calculation interval segment includes range switches and internal switches. The range switches include switches with measurement or switches in the open state. The internal switches include switches without measurement and in the closed state, as well as branches connected to the switches without measurement and in the closed state. The data completion module includes a generative adversarial network (GAN) model. This model uses a computational interval segment as the object to complete the acquired distribution network status data, resulting in completed distribution network status data. The GAN model comprises a generator network and an adversary network. The generator network takes the distribution network status data as input, extracts its features, and generates new data with a distribution consistent with the original distribution network status data to fill in missing data areas, thus obtaining the completed distribution network status data. The adversary network determines whether the distribution of the completed distribution network status data is consistent with the original distribution network status data. The hyperparameter combination of the GAN model is obtained through training based on an improved particle swarm optimization algorithm. The state calculation module is used to calculate the distribution network state based on the topology of the calculation interval segments and the completed distribution network state data. Specifically, it is used to calculate the power segment by segment from the end of the line to the beginning of the substation based on the measured data of all the distribution variables in the completed distribution network state data and the topology of each calculation interval segment. It calculates the voltage of each node and the current and power of each branch in the distribution network.
8. The distribution network status calculation system according to claim 7, characterized in that, The generative adversarial network model is trained and iterated in the following manner: An improved particle swarm optimization algorithm is used to train the generator network of a generative adversarial network model to find the optimal combination of hyperparameters in each training round. The fitness value of the particle swarm is calculated using a loss function. Based on the fitness value of the particle swarm, the optimal position of the individual particles and the global optimal position are obtained. During the iteration process, the inertia weight of the particles is dynamically adjusted according to the distance between the particles and the global optimal position.
9. The distribution network status calculation system according to claim 8, characterized in that, The formula for dynamically adjusting the particle's inertial weight based on the distance between the particle and the global optimal position is as follows: ; ; Where t is the number of iterations, i is the number of particles in the particle swarm, i = 1, 2, ... N, and 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. This represents the position of the particle after t iterations. Let j be the j-dimensional value of the globally optimal position. Let be the inertial weight value of the particle in the t-th iteration. This represents the maximum value of the inertia weight. R is the minimum value of the inertia weight. max t represents the maximum distance between the particle and the global optimal position. max This represents the maximum number of iterations.
10. The distribution network status calculation system according to claim 7, 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 power distribution network status data; The feature extraction layer includes a downsampling layer and an upsampling layer. The downsampling layer downsamples the output of the input layer, and the upsampling layer upsamples the output of the downsampling layer. The output layer takes the output result of the feature extraction layer as input and outputs the completed distribution network status data.
11. A computer device, characterized in that, include: Memory, which stores computer programs; A processor for executing the computer program to implement the distribution network status calculation method according to any one of claims 1-6.
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