Snowflake network operation situation awareness and dynamic reconstruction method and device
By using a time-domain convolutional network with attention mechanism in the snowflake distribution network for operation situation awareness, and using genetic algorithms and data-driven evolution optimization algorithm of two-way long and short-term memory networks for dynamic reconstruction, the early warning and rapid reconstruction problems in the event of snowflake network failure are solved, and efficient load recovery and low-loss network operation are achieved.
Patent Information
- Application Number
- CN202411696858.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-14
AI Technical Summary
The snowflake distribution network lacks effective fault warning and rapid dynamic reconstruction solutions in the event of failure, resulting in complex reconstruction strategies and high operating costs.
A method of operational situational awareness and dynamic reconstruction of snowflake network is proposed. The time domain convolution network with attention mechanism is used to perform operational situational awareness, and a dynamic reconstruction model is constructed based on genetic algorithm and bidirectional long and short-term memory network through a data-driven evolutionary optimization algorithm. The optimization goal is to maximize the weighted combination value of load recovery and network loss.
It realizes accurate capture of the operating situation of the snowflake network and rapid dynamic reconstruction after failure, reducing operating costs, and improving the stability and fault recovery efficiency of the snowflake network.
Smart Images

Figure CN119624422A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distribution network operation and maintenance, and in particular to a method and device for sensing and dynamically reconstructing a snowflake network operation situation. Background Art
[0002] With the profound changes in the global energy structure, the proportion of renewable energy continues to increase, and the demand for distributed energy access to the grid is also increasing. This requires the distribution network to have a higher level of flexibility and intelligence to cope with the challenges brought by the access of new energy.
[0003] The way the important nodes of the snowflake distribution network (snowflake network for short) are connected is similar to the shape of snowflake petals. This structure makes the power grid highly inclusive and adaptable, and can flexibly accept various loads such as distributed power sources, new energy vehicles, and energy storage, and support the access, exit and interaction of various market players. Under the complex structure, when the snowflake network fails, its reconstruction strategy is more complicated. At present, there are few methods for the reconstruction of the snowflake network, and there is a lack of early warning before the snowflake network failure and rapid dynamic reconstruction after the failure. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the above-mentioned technology to a certain extent, and proposes a method for sensing and dynamically reconstructing the operation situation of a snowflake network, comprising:
[0005] The operation status of the snowflake network is judged by an operation status awareness model; the operation status awareness model is constructed based on a time domain convolutional network with an attention mechanism;
[0006] The faulty snowflake network is dynamically reconstructed through a dynamic reconstruction model; the optimization goal of the dynamic reconstruction model is to maximize the weighted combination value of load recovery and network loss; the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm, and the data-driven evolutionary optimization algorithm is constructed based on a genetic algorithm and a bidirectional long short-term memory network.
[0007] Furthermore, the time-domain convolutional network with attention mechanism is composed of an input layer, a TCN layer, an attention mechanism layer, a fully connected layer and an output layer connected in sequence.
[0008] Furthermore, the TCN layer is configured as follows:
[0009] Perform feature extraction on the input Snowflake network operation data and output the feature vector.
[0010] Furthermore, the attention mechanism layer is configured as follows:
[0011] Calculate the attention score and attention weight of each feature vector;
[0012] According to the feature vectors and the corresponding attention weights, all feature vectors are weighted summed to obtain the target vector and output it.
[0013] Furthermore, the attention mechanism layer is configured to calculate the attention score of each feature vector based on the tanh function with a bias variable, and the corresponding expression is:
[0014] L i =tanh(w i [h s :h i ])+b si
[0015] Among them, L i represents the attention score; w i represents the weight coefficient; h s represents the target vector, consisting of all h i The average sum is obtained; h i represents the hidden layer output; b si Represents bias variable; i=1,2,3,4…
[0016] Furthermore, the attention mechanism layer is configured to calculate the attention weight of each feature vector based on the softmax function.
[0017] Furthermore, the process of constructing the operation situation awareness model includes:
[0018] Sampling the snowflake network operation data and preprocessing the sampled time series data; the snowflake network operation data includes: whether the node or line is active, the node voltage phase angle, the node voltage amplitude and the line current amplitude;
[0019] Construct a training set based on the preprocessed time series data;
[0020] The time-domain convolutional network with the attention mechanism is iteratively trained through the training set input to obtain the operation situation awareness model.
[0021] Furthermore, the objective function expression of the dynamic reconstruction model is:
[0022] F=w1F1+w2F2
[0023] Among them, F1 represents the load recovery amount; F2 represents the network loss, w1 represents the target weight of the load recovery amount; w2 represents the target weight of the network loss.
[0024] Furthermore, the target weight of the load recovery amount or the target weight of the network loss is determined based on a combined weighting method consisting of a hierarchical analysis method and an entropy weight method.
[0025] Furthermore, the expression of the load recovery amount is:
[0026]
[0027] Wherein, F1 represents the load recovery amount; LW k represents the priority weight of load k; μ k is the state quantity of load k; L represents all nodes on the line; N i Indicates the number of loads; N T Represents the total number of time intervals within the grid recovery cycle.
[0028] Furthermore, the expression of the network loss is:
[0029]
[0030] Wherein, F2 represents the network loss; N T Represents the total number of time intervals within the grid recovery cycle; t = 1, 2, 3, 4, ...; N j Indicates the number of distribution network branches; R i Indicates branch resistance; I i Indicates branch current.
[0031] Furthermore, the constraints of the dynamic reconstruction model include: power flow constraints, snowflake network operation constraints and energy storage system constraints.
[0032] Furthermore, the expression of the power flow constraint is:
[0033]
[0034] Among them, Ω in (j) represents the set of ring boxes with j ring box as the end ring box in the snowflake network; Ω out (j) represents the set of ring boxes with j ring box as the head end in the snowflake network; P ij (t) represents the active power flowing from box i to box j at time t; Q ij (t) represents the reactive power flowing from box i to box j at time t; U j (t) represents the voltage amplitude of the jth ring network box at time t; P j (t) represents the active power injected into the jth ring network box at time t; Q j (t) represents the reactive power injected into the jth ring network box at time t; R ij represents the resistance of the line ij connecting the i and j ring networks; X ij I represents the reactance of the line ij connecting the i and j ring networks; ij(t) represents the current amplitude of line ij connecting the i and j ring networks at time t; i = 1, 2, 3, 4...; j = 1, 2, 3, 4...
[0035] Furthermore, the snowflake network operation constraints include: substation output constraints, feeder capacity and line maximum transmission capacity constraints, and node voltage constraints;
[0036] The expression of the substation output constraint is:
[0037]
[0038] The expressions for the feeder capacity and line maximum transmission capacity constraints are:
[0039]
[0040] The expression of the node voltage constraint is:
[0041]
[0042] in, Indicates the active output of the substation; Indicates the reactive power output of the substation. Indicates the upper limit of the substation active output at time t; Indicates the lower limit of the substation active output at time t; It represents the upper limit of the reactive power output of the substation at time t; Indicates the lower limit of the reactive power output of the substation at time t; i = 1, 2, 3, 4...; j = 1, 2, 3, 4...
[0043] Furthermore, the expression of the energy storage system constraint is:
[0044]
[0045] Among them, SOC t represents the energy state of energy storage during period t; ε represents the energy self-consumption rate; SOC0 represents the initial value of energy storage state; SOC max Indicates the upper limit of energy storage; SOC min Represents the lower limit of energy storage; η ES Indicates the energy storage charging and discharging efficiency; Indicates the rated capacity of energy storage; It represents the energy storage power during the period τ; It represents the energy power released by energy storage in the period τ; Both are binary variables, indicating the energy storage charging and discharging state. When 1 is stored, is 1; Indicates the rated power of energy storage; Indicates the energy storage charging and discharging power during period t.
[0046] Furthermore, the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm based on a genetic algorithm and a bidirectional long short-term memory network, including:
[0047] Randomly generate an initial population based on the genetic algorithm;
[0048] Removing individuals from the initial population that do not satisfy the constraints of the dynamic reconstruction model and regenerating the population until all individuals satisfy the constraints;
[0049] Calculate the fitness of each individual in the current initial population;
[0050] Based on the fitness, the current population is selected, crossed and mutated to obtain a new generation population, the fitness of each individual in the new generation population is calculated, and several individuals with the highest fitness ranking in the new generation population are saved;
[0051] Repeat the above method until the preset number of iterations is reached;
[0052] The iterative solution corresponding to the latest generation of individuals is input into the bidirectional long short-term memory network, the iterative solution law is learned and the predicted solution is output;
[0053] Repeat the above method until the predicted solution meets the preset conditions;
[0054] The predicted solution that meets the preset conditions is output as the optimal solution.
[0055] This application also proposes a snowflake network operation situation awareness and dynamic reconstruction system, including:
[0056] A situation awareness module, used to judge the operation situation of the snowflake network by running a situation awareness model; the operation situation awareness model is constructed based on a time-domain convolutional network with an attention mechanism;
[0057] A dynamic reconstruction module is used to dynamically reconstruct the faulty snowflake network through a dynamic reconstruction model; the optimization goal of the dynamic reconstruction model is to maximize the weighted combination value of load recovery and network loss; the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm, and the data-driven evolutionary optimization algorithm is constructed based on a genetic algorithm and a bidirectional long short-term memory network.
[0058] The present application also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program or instruction, and when the computer program or instruction is executed by the processor, it is at least used to implement the above-mentioned Snowflake network operation situation awareness and dynamic reconstruction method.
[0059] The present application also proposes a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, it is at least used to implement the above-mentioned Snowflake network operation situation awareness and dynamic reconstruction method.
[0060] The present application also proposes a computer program product, which is stored in a computer-readable storage medium. When the computer program product is executed by a processor, it is at least used to implement the above-mentioned Snowflake network operation situation awareness and dynamic reconstruction method.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] (1) Aiming at preventing snowflake-type distribution network operation failures, this application proposes a snowflake network operation status perception model, which is built based on a TCN neural network model with an attention mechanism. It can accurately capture the changes in the snowflake network operation status and provide solid theoretical and data support for evaluating and predicting the snowflake network operation status.
[0063] (2) In response to the problem of power grid recovery after a snowflake network failure, this application proposes a dynamic reconstruction model that takes into account load recovery and network losses. This model can flexibly respond to complex situations after power grid failures, and achieve rapid recovery and efficient operation of the power grid by optimizing resource allocation and structural adjustments, thereby reducing operating costs.
[0064] (3) In order to efficiently solve the above dynamic reconstruction model, this application proposes a data-driven evolutionary optimization solution algorithm based on genetic algorithm and bidirectional long short-term memory neural network. This data-driven evolutionary optimization solution algorithm fully utilizes the advantages of big data and machine learning technology. Through iterative optimization and intelligent search, it can find the global optimal solution in a short time, thereby realizing the rapid and accurate solution of the model. This algorithm not only improves the solution efficiency, but also provides strong technical support for the stable operation and fault recovery of the Snowflake network.
[0065] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings. The technical scheme of the present invention is further described below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0067] Figure 1A schematic diagram of a method for sensing and dynamically reconstructing the operation status of a snowflake network provided in an embodiment;
[0068] Figure 2 A schematic diagram of a bidirectional LSTM provided in an embodiment;
[0069] Figure 3 A schematic diagram of a data-driven evolutionary optimization algorithm provided in an embodiment;
[0070] Figure 4 The flowchart of the reconstruction model solving algorithm based on GA-BiLSTM combination given in the embodiment;
[0071] Figure 5 A schematic diagram of a snowflake network operation situation awareness and dynamic reconstruction system provided in an embodiment;
[0072] Figure 6 A schematic diagram of an electronic device provided for an embodiment;
[0073] Figure 7 A schematic diagram of a computer-readable storage medium is provided for an embodiment. DETAILED DESCRIPTION
[0074] The present invention is described below in conjunction with the accompanying drawings. The preferred embodiments described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.
[0075] This application proposes a method for sensing and dynamically reconstructing the operation status of a snowflake network, including:
[0076] The operation status of the snowflake network is judged by an operation status awareness model; the operation status awareness model is constructed based on a time domain convolutional network with an attention mechanism;
[0077] The faulty snowflake network is dynamically reconstructed through a dynamic reconstruction model; the optimization goal of the dynamic reconstruction model is to maximize the weighted combination value of load recovery and network loss; the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm, and the data-driven evolutionary optimization algorithm is constructed based on a genetic algorithm and a bidirectional long short-term memory network.
[0078] Furthermore, the time-domain convolutional network with attention mechanism is composed of an input layer, a TCN layer, an attention mechanism layer, a fully connected layer and an output layer connected in sequence.
[0079] Furthermore, the TCN layer is configured as follows:
[0080] Perform feature extraction on the input Snowflake network operation data and output the feature vector.
[0081] Furthermore, the attention mechanism layer is configured as follows:
[0082] Calculate the attention score and attention weight of each feature vector;
[0083] According to the feature vectors and the corresponding attention weights, all feature vectors are weighted summed to obtain the target vector and output it.
[0084] According to some embodiments of the present application, the operation situation awareness model is constructed based on a temporal convolutional neural network model with attention mechanism (TCN-AM), which includes: an input layer, a TCN layer, an attention mechanism layer, a fully connected layer and an output layer connected in sequence. The input data of the input layer is the time-series snowflake network operation data {x1, x2, ..., x t}. The TCN layer uses several connected residual modules contained in the layer to connect {x1,x2,...,x t} to extract feature information and obtain hidden output, i.e., feature vector {h1,h2,...,h i The attention mechanism layer compares each feature vector with the target feature vector h s The similarity score of each feature vector is obtained by i}, the higher the weight, the more critical the feature is. After weighting the feature vector and its weight, we can get the target vector {b1,b2,...,b i The fully connected layer is used to process the target vector to obtain the predicted value of the snowflake network operation status evaluation, which is then output through the output layer.
[0085] The working principle of the above TCN-AM model is as follows:
[0086] The time-domain convolutional neural network (TCN) is a neural network that is extended by combining causal convolutional layers, dilated convolutional layers, and residual blocks on the basis of convolutional neural networks. The network uses convolutional networks to extract features from input data. After training and fitting, TCN can obtain the implicit relationship between input and output and predict future data. This implicit relationship can be expressed using a nonlinear mapping relationship:
[0087]
[0088] In the formula, x t represents the input data value at time t, y t+qrepresents the predicted output data value at time t+q, v represents the weight coefficient corresponding to the feature vector, and b represents the bias term in the time-domain convolutional neural network. f is a nonlinear mapping function that fits all data using the appropriate v and b values obtained from model training.
[0089] Furthermore, the attention mechanism layer is configured to calculate the attention score of each feature vector based on the tanh function with a bias variable, and the corresponding expression is:
[0090] L i =tanh(w i [h s :h i ])+b si
[0091] Among them, L i represents the attention score; w i represents the weight coefficient; h s represents the target vector, consisting of all h i The average sum is obtained; h i represents the hidden layer output; b si Represents bias variable; i=1,2,3,4…
[0092] Furthermore, the attention mechanism layer is configured to calculate the attention weight of each feature vector based on the softmax function.
[0093] The Attention Mechanism (AM) layer filters out key information by changing the feature weights. i Each h in} i , calculate the target feature vector h s The similarity between them and get the attention score:
[0094] L i =tanh(w i [h s :h i ])
[0095] Where, L i represents the attention score, w i Indicates h i The weight coefficient is a set value, and : represents a merging operation. In some embodiments, the target feature vector h s is obtained by summing up all the input feature vectors h i Average or all input feature vectors h i The sum obtained.
[0096] Since the tanh function in the attention score model has defects in data processing, resulting in poor or inaccurate prediction results, the tanh function is improved in some embodiments of the present application by adding bias variables to improve the model prediction effect:
[0097] L i =tanh(w i [h s :h i ])+b si
[0098] Among them, b si It is an added bias variable used to correct the processing result of the tanh function.
[0099] After obtaining the L corresponding to each eigenvector i Afterwards, the attention mechanism layer uses the softmax function to calculate the normalized attention weights:
[0100] a i =softmax(L i )
[0101] Among them, a i represents the normalized attention weight.
[0102] According to some embodiments of the present application, the attention mechanism layer performs the following operations on the hidden output h i and the corresponding attention weight a i Multiply them together to get the target vector, as shown below:
[0103]
[0104] The operation situation awareness based on the TCN-AM model proposed in this application can accurately capture the changes in the operation status of the Snowflake network, and provide solid theoretical and data support for the evaluation and prediction of the operation situation of the Snowflake network and the Snowflake network fault warning.
[0105] Furthermore, the process of constructing the operation situation awareness model includes:
[0106] Sampling the snowflake network operation data and preprocessing the sampled time series data; the snowflake network operation data includes: whether the node or line is active, the node voltage phase angle, the node voltage amplitude and the line current amplitude;
[0107] Construct a training set based on the preprocessed time series data;
[0108] The time-domain convolutional network with the attention mechanism is iteratively trained through the training set input to obtain the operation situation awareness model.
[0109] According to some embodiments of the present application, the process of running the situation awareness model training and application is as follows:
[0110] (1) The running data of the Snowflake network is sampled and processed into vector / matrix form. The sampled data includes node voltage phase angle, node voltage amplitude, line current amplitude, node / line active / reactive power and other system data. After that, based on current and phase information, the sampled data is analyzed, noise reduction preprocessing is performed, and data retaining key information is obtained. The preprocessed data is the real-time situation awareness data of the Snowflake network.
[0111] (2) Construct a training set based on real-time situation awareness data, and input the training set into the initial operation situation awareness model to obtain the operation situation prediction evaluation value. Calculate the error between the operation situation prediction evaluation value and the actual operation situation evaluation value, and adjust the parameters of the initial operation situation warning model based on the error. Repeat the above scheme until the predicted evaluation value is very close to the actual evaluation value, thereby obtaining a well-trained operation situation awareness model.
[0112] (3) Use the trained operation situation awareness model to conduct real-time operation situation awareness of the Snowflake network. When potential instability occurs in the Snowflake network, a corresponding risk level warning signal is issued and a corresponding reconstruction strategy is formulated.
[0113] Furthermore, the objective function expression of the dynamic reconstruction model is:
[0114] F=w1F1+w2F2
[0115] Among them, F1 represents the load recovery amount; F2 represents the network loss, w1 represents the target weight of the load recovery amount; w2 represents the target weight of the network loss.
[0116] Furthermore, the target weight of the load recovery amount or the target weight of the network loss is determined based on a combined weighting method consisting of a hierarchical analysis method and an entropy weight method.
[0117] Furthermore, the expression of the load recovery amount is:
[0118]
[0119] Wherein, F1 represents the load recovery amount; LW k represents the priority weight of load k; μ k is the state quantity of load k; L represents all nodes on the line; Γ L Indicates; N T Represents the total number of time intervals within the grid recovery cycle.
[0120] Furthermore, the expression of the network loss is:
[0121]
[0122] Wherein, F2 represents the network loss; N T Represents the total number of time intervals within the grid recovery cycle; t = 1, 2, 3, 4, ...; N j Indicates the number of distribution network branches; R i Indicates branch resistance; I i Indicates branch current.
[0123] Furthermore, the constraints of the dynamic reconstruction model include: power flow constraints, snowflake network operation constraints and energy storage system constraints.
[0124] Furthermore, the expression of the power flow constraint is:
[0125]
[0126] Among them, Ω in (j) represents the set of ring boxes with j ring box as the end ring box in the snowflake network; Ω out (j) represents the set of ring boxes with j ring box as the head end in the snowflake network; P ij (t) represents the active power flowing from box i to box j at time t; Q ij (t) represents the reactive power flowing from box i to box j at time t; U j (t) represents the voltage amplitude of the jth ring network box at time t; P j (t) represents the active power injected into the jth ring network box at time t; Q j (t) represents the reactive power injected into the jth ring network box at time t; R ij represents the resistance of the line ij connecting the i and j ring networks; X ij I represents the reactance of the line ij connecting the i and j ring networks; ij (t) represents the current amplitude of line ij connecting the i and j ring networks at time t; i = 1, 2, 3, 4...; j = 1, 2, 3, 4...
[0127] Furthermore, the snowflake network operation constraints include: substation output constraints, feeder capacity and line maximum transmission capacity constraints, and node voltage constraints;
[0128] The expression of the substation output constraint is:
[0129]
[0130] The expressions for the feeder capacity and line maximum transmission capacity constraints are:
[0131]
[0132] The expression of the node voltage constraint is:
[0133]
[0134] in, Indicates the active output of the substation; Indicates the reactive power output of the substation. Indicates the upper limit of the substation active output at time t; Indicates the lower limit of the substation active output at time t; It represents the upper limit of the reactive power output of the substation at time t; Indicates the lower limit of the reactive power output of the substation at time t; i = 1, 2, 3, 4...; j = 1, 2, 3, 4...
[0135] Furthermore, the expression of the energy storage system constraint is:
[0136]
[0137] Among them, SOC t represents the energy state of energy storage during period t; ε represents the energy self-consumption rate; SOC0 represents the initial value of energy storage state; SOC max Indicates the upper limit of energy storage; SOC min Represents the lower limit of energy storage; η ES Indicates the energy storage charging and discharging efficiency; Indicates the rated capacity of energy storage; It represents the energy storage power during the period τ; It represents the energy power released by energy storage in the period τ; Both are binary variables, indicating the energy storage charging and discharging state. When 1 is stored, is 1; Indicates the rated power of energy storage; Indicates the energy storage charging and discharging power during period t.
[0138] In order to realize fast dynamic reconstruction of the snowflake network under fault conditions, the embodiment of the present application proposes a dynamic reconstruction model, the working principle of which is as follows:
[0139] (1) Objective function
[0140] According to some embodiments of the present application, by taking the linear weighted combination of improving the system load recovery amount and network loss as the optimization goal, the speed of post-fault reconstruction can be improved, the load recovery amount can be increased, the system operation safety risk can be reduced, and the system power loss can be reduced, and the economic benefit can be improved. The corresponding objective function is as follows:
[0141] F=w1F1+w2F2
[0142] Wherein, F1 represents the load recovery amount; F2 represents the network loss, w1 represents the target weight of the load recovery amount; w2 represents the target weight of the network loss. In some embodiments, w1 and w2 are determined by a combined weighting method consisting of a hierarchical analysis method and an entropy weight method.
[0143] Load recovery amount: When (or before) a fault occurs, each load in the system is assigned a priority weight, because the main goal of recovery is to restore as many affected loads as possible, while giving priority to loads with higher priorities. According to the priority weight, the normal power consumption of users can be guaranteed to the maximum extent.
[0144]
[0145] Where LW k is the priority weight of load k. For load importance levels 1-3, the corresponding LW k The values are 10, 2, and 0.1 respectively; N T is the total number of time intervals within the grid recovery cycle; μ k is the state quantity of load k, and L is all nodes on the line. If the goal is just to maximize load recovery, the priority weight can be replaced by 1.
[0146] Network loss: After self-recovery, ensure that the network loss during fault recovery is as small as possible.
[0147]
[0148] Wherein, F2 represents the network loss; N T Represents the total number of time intervals within the grid recovery cycle; t = 1, 2, 3, 4, ...; N j Indicates the number of distribution network branches; R i Indicates branch resistance; I i Indicates branch current.
[0149] (2) Constraints
[0150] a. Power flow constraints:
[0151] The power flow model of the snowflake network uses the Distflow branch power flow model to model the power flow of the snowflake network. By introducing a 0-1 variable to represent the on / off state of the switch on the branch, a ij When (t) is 1, it means that at time t, the switch on line ij connecting rings i and j is in the on state. Therefore, the following power flow equation applicable to the snowflake distribution network reconstruction is obtained:
[0152]
[0153]
[0154] In the formula, Ω in (j),Ω out (j) respectively represent the set of the end ring network box and the head end ring network box in the snowflake network; P ij (t), Q ij (t) represent the active power and reactive power flowing from box i to box j at time t, respectively; U j (t) represents the voltage amplitude of the jth ring network box at time t; P j (t), Q j (t) respectively represent the active power and reactive power injected into the jth ring network box at time t; R ij , X ij I represents the resistance and reactance of the line ij connecting the i and j ring networks respectively; ij (t) represents the current amplitude of line ij connecting the i and j ring networks at time t; j=1,2,3,4...; i=1,2,3,4...
[0155] b. Snowflake Network Operation Constraints
[0156] Output constraints of substation:
[0157]
[0158] Feeder capacity constraints and line maximum transmission capacity constraints:
[0159]
[0160] Node voltage constraints:
[0161]
[0162] In the formula, Respectively represent the active and reactive output of the substation, are the upper and lower limits of the substation active output at time t; They respectively represent the upper and lower limits of the substation reactive output at time t; i=1,2,3,4...
[0163] (3) Energy storage system constraints
[0164]
[0165] In the formula, SOC t is the energy state of energy storage period t; ε is the energy self-consumption rate; SOC0, SOC max , SOC minare the initial value, upper limit and lower limit of energy storage state respectively; η ES For energy storage charging and discharging efficiency; is the rated capacity of energy storage; The energy power stored for the energy storage for the τ period; The energy storage and release power is the energy power for the τ period; Both are binary variables, indicating the energy storage charging and discharging state. When 1 is stored, is 1; is the energy storage rated power; is the energy storage charging and discharging power during period t.
[0166] Furthermore, the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm based on a genetic algorithm and a bidirectional long short-term memory network, including:
[0167] Randomly generate an initial population based on the genetic algorithm;
[0168] Removing individuals from the initial population that do not satisfy the constraints of the dynamic reconstruction model and regenerating the population until all individuals satisfy the constraints;
[0169] Calculate the fitness of each individual in the current initial population;
[0170] Based on the fitness, the current population is selected, crossed and mutated to obtain a new generation population, the fitness of each individual in the new generation population is calculated, and several individuals with the highest fitness ranking in the new generation population are saved;
[0171] Repeat the above method until the preset number of iterations is reached;
[0172] The iterative solution corresponding to the latest generation of individuals is input into the bidirectional long short-term memory network, the iterative solution law is learned and the predicted solution is output;
[0173] Repeat the above method until the predicted solution meets the preset conditions;
[0174] The predicted solution that meets the preset conditions is output as the optimal solution.
[0175] In order to quickly and accurately solve the above dynamic reconstruction model, the embodiment of the present application proposes a data-driven evolutionary optimization solution algorithm, the working principle of the algorithm is as follows:
[0176] Data-driven evolutionary optimization algorithm is a method for solving optimization problems with characteristics such as being unable to be explicitly expressed and being high-dimensional and nonlinear. Its basic principle is: using experimental data or calculated data as the input of a proxy model, using the proxy model to predict the optimization result, inputting the predicted data into the optimization algorithm to iteratively calculate new data, and inputting the new data into the proxy model until a satisfactory optimization result is solved. The evolutionary optimization algorithm used in the present invention is a genetic algorithm (GA), and the proxy model refers to using a prediction model to replace the optimization model, using iterative data as input in the optimization model solving process, and using the optimization result as output, thereby predicting the optimization result. The proxy model in the present invention intends to adopt a bidirectional long short-term memory (Bidirectional Long Short-Term Memory, BiLSTM) neural network model, that is, a data-driven evolutionary optimization algorithm combining GA and BiLSTM is proposed, and the reconstruction model is solved.
[0177] The steps for solving the problem based on GA and BiLSTM data-driven evolutionary optimization algorithm are as follows:
[0178] Step 1: Randomly generate the initial population, set the population size, maximum number of generations, continuous invariant number of generations of the optimal solution, and other parameters for solving the problem;
[0179] Step 2: Determine whether the generated population meets the constraints. If so, proceed to step 3. If not, remove the individuals that do not meet the conditions and generate new individuals until all individuals meet the constraints.
[0180] Step 3: Calculate the fitness of all individuals in the population;
[0181] Step 4: By performing selection, crossover, and mutation operations on the previous generation population, a new generation population can be obtained, and individuals with higher fitness function values in the new generation population can be replaced and saved;
[0182] Step 5: Determine whether the maximum number of generations, i.e. the number of iterations, has been reached. If so, end the process and output the optimal solution; if not, go to step 2 and iterate again;
[0183] Step 6: Output the iterative solution of the problem, and use BiLSTM to predict the law of the iterative solution to obtain the predicted solution of the optimization result;
[0184] Step 7: Determine whether the preset conditions are met, that is, a fixed number of iterations is reached or the difference between the results of each iteration is less than the set threshold. If so, output the optimal solution; if not, iterate back to the GA algorithm.
[0185] In step 3, the fitness function is determined. Fitness refers to the degree of adaptation of individuals in a population to the environment. The individuals that are most adapted to the environment have the highest fitness, that is, the fitness function is closely related to the objective function. In population genetics, chromosomes with higher fitness are generally selected. The higher the fitness, the more appropriate the solution to the problem. The optimization direction of the genetic algorithm is the same as the direction that should be appropriately increased. According to some embodiments of the present application, the fitness function is:
[0186]
[0187] Among them, C is a constant, which is usually larger than the objective function value; f(x) is the objective function.
[0188] In nature, individuals that are more adaptable to the environment are more likely to reproduce. However, the higher the fitness, the more offspring they will have, not necessarily. Rather, they will have more offspring in terms of probability. The basis of the selection operation is to compare the fitness of each chromosome, and the chromosomes with high fitness that are inherited to the next generation of the population are more likely to have high fitness. The present invention uses the fitness ratio method to retain the best individuals of the population in the evolutionary process and inherit them to the next generation.
[0189] The crossover operation is to exchange genes of different chromosomes to generate new chromosomes. In the previous generation population, chromosomes with higher fitness are selected, and genetic information is exchanged with a certain probability by pairing with each other to obtain new chromosomes. The crossover operation in the present invention adopts an adaptive mutation rate, and different crossover rates are selected according to different fitness values of individuals. According to some embodiments of the present application, the adaptive crossover function is:
[0190]
[0191] Among them, f avg is the average fitness of the population in each generation, f′ is the larger of the two individuals to be crossed; f max represents the maximum fitness of the population in each generation; P1 and P2 represent two predefined crossover rate thresholds; f represents the fitness of the individual.
[0192] In addition to selection and crossover, there are also mutated species in nature that are more adaptable to the environment. Mutation is a random change of certain gene positions in chromosomes, which can increase the diversity of the population. Usually, the probability of such changes is small. The present invention adopts an adaptive mutation rate. In the early stage of evolution, the mutation rate of chromosomes is high. As the number of generations increases, the fitness of chromosomes increases, and the mutation rate of genes gradually decreases.
[0193] According to some embodiments of the present application, the adaptive mutation rate function is as follows:
[0194]
[0195] Among them, P m1 is the initial value of the mutation rate, i is the current generation, and N is the total generation; P m Represents the adaptive mutation rate.
[0196] In step 6, BiLSTM has the ability to learn using past and future data, that is, it can use past and future data to derive results. From bottom to top, they are the input layer, the forward layer (Forward), the backward layer (Backword), and the output layer. The basic idea of bidirectional LSTM is to propose that each training sequence is two recurrent neural networks in the forward and backward directions, and these two layers are connected to an output layer. This structure provides the output layer with complete past and future context information for each point in the input sequence. At each moment of the bidirectional LSTM, 8 unique weight values are reused. It should be noted that there is no information transfer between the forward hidden layer and the backward hidden layer, which can avoid the formation of an infinite loop between two adjacent moments of the two hidden layers. The calculation method is: forward calculation from time 1 to time t in the forward layer, and obtain and save the output of the forward hidden layer at each moment; reverse calculation from time t to time 1 in the backward layer, and obtain and save the output of the backward hidden layer at each moment. Finally, the results of the corresponding moment outputs of the forward layer and the backward layer are combined at each moment to obtain the final output, which can be expressed as follows:
[0197] h′ t =f(ω1x t +ω2C′ t-1 +ω3h′ t-1 )
[0198] h t =f(ω4x t +ω6C t+1 +ω7h t+1 )
[0199] o t =g(ω5h′ t +ω8h t )
[0200] Where ω1, ω4 represent the weight values of the input to the forward and backward hidden layers respectively; ω2, ω3 represent the weight values from the forward hidden layer to the forward hidden layer respectively; ω6, ω7 represent the weight values from the backward hidden layer to the backward hidden layer respectively; ω5, ω8 represent the weight values from the forward and backward hidden layers to the output layer respectively; x t represents the input value at time t; C′ t-1 and C t+1 h represents the values of the output gates of the forward layer and reverse layer neural units at time t-1 and t+1 respectively; t+1 and h trepresents the output value of the reverse layer neural unit at time t+1 and t; h t ′ and h t ' -1 represents the output value of the forward layer neural unit at time t and t-1; g represents the processing function of the forward layer and reverse layer output; f is the internal processing function of the neural unit.
[0201] Based on the same technical concept, this application proposes a snowflake network operation situation awareness and dynamic reconstruction system, which includes:
[0202] A situation awareness module, used to judge the operation situation of the snowflake network by running a situation awareness model; the operation situation awareness model is constructed based on a time-domain convolutional network with an attention mechanism;
[0203] A dynamic reconstruction module is used to dynamically reconstruct the faulty snowflake network through a dynamic reconstruction model; the optimization goal of the dynamic reconstruction model is to maximize the weighted combination value of load recovery and network loss; the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm, and the data-driven evolutionary optimization algorithm is constructed based on a genetic algorithm and a bidirectional long short-term memory network.
[0204] like Figure 6 As shown, the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program or instruction, and when the computer program or instruction is executed by the processor, it is at least used to implement the above-mentioned snowflake network operation situation awareness and dynamic reconstruction method.
[0205] like Figure 7 As shown, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, it is at least used to implement the above-mentioned Snowflake network operation situation awareness and dynamic reconstruction method.
[0206] The present application also provides a computer program product, which is stored in a computer-readable storage medium. When the computer program product is executed by a processor, it is at least used to implement the above-mentioned Snowflake network operation situation awareness and dynamic reconstruction method.
[0207] It is obvious that a person skilled in the art may make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for sensing and dynamically reconstructing the operation status of a snowflake network, characterized in that: include: Determine the operation status of the Snowflake network by running the situation awareness model; The operational situation awareness model is constructed based on a time-domain convolutional network with an attention mechanism; The faulty snowflake network is dynamically reconstructed through a dynamic reconstruction model; the optimization goal of the dynamic reconstruction model is to maximize the weighted combination value of load recovery and network loss; the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm, and the data-driven evolutionary optimization algorithm is constructed based on a genetic algorithm and a bidirectional long short-term memory network.
2. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 1, characterized in that: The time-domain convolutional network with attention mechanism is composed of an input layer, a TCN layer, an attention mechanism layer, a fully connected layer and an output layer connected in sequence.
3. The method for sensing and dynamically reconstructing the operation status of the snowflake network as claimed in claim 2, characterized in that: The TCN layer is configured as follows: Perform feature extraction on the input Snowflake network operation data and output the feature vector.
4. The method for sensing and dynamically reconstructing the operation status of the snowflake network as claimed in claim 3, characterized in that: The attention mechanism layer is configured as follows: Calculate the attention score and attention weight of each feature vector; According to the feature vectors and the corresponding attention weights, all feature vectors are weighted summed to obtain the target vector and output it.
5. The method for sensing and dynamically reconstructing the operation status of the snowflake network as claimed in claim 4, characterized in that: The attention mechanism layer is configured to calculate the attention score of each feature vector based on the tanh function with a bias variable, and the corresponding expression is: L i =tanh(w i [h s :h i ])+b si Among them, L i represents the attention score; w i represents the weight coefficient; h s represents the target vector, consisting of all h i The average sum is obtained; h i represents the hidden layer output; b si Represents bias variable; i=1,2,3,4… 6. The method for sensing and dynamically reconstructing the operation status of the snowflake network as claimed in claim 5, characterized in that: The attention mechanism layer is configured to calculate the attention weight of each feature vector based on a softmax function.
7. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to any one of claims 2 to 6, characterized in that: The process of constructing the operation situation awareness model includes: Sampling the snowflake network operation data and preprocessing the sampled time series data; the snowflake network operation data includes: whether the node or line is active, the node voltage phase angle, the node voltage amplitude and the line current amplitude; Construct a training set based on the preprocessed time series data; The time-domain convolutional network with the attention mechanism is iteratively trained through the training set input to obtain the operation situation awareness model.
8. The method for sensing and dynamically reconstructing the operation status of the snowflake network as claimed in claim 1, characterized in that: The objective function expression of the dynamic reconstruction model is: F=w1F1+w2F2 Among them, F1 represents the load recovery amount; F2 represents the network loss, w1 represents the target weight of the load recovery amount; w2 represents the target weight of the network loss.
9. The method for sensing and dynamically reconstructing the operation status of the snowflake network as claimed in claim 8, characterized in that: The target weight of the load recovery amount or the target weight of the network loss is determined based on a combined weighting method consisting of a hierarchical analysis method and an entropy weight method.
10. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 8, characterized in that: The expression of the load recovery amount is: Wherein, F1 represents the load recovery amount; LW k represents the priority weight of load k; μ k is the state quantity of load k; L represents all nodes on the line; N i Indicates the number of loads; N T Represents the total number of time intervals within the grid recovery cycle.
11. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 8, characterized in that: The expression of the network loss is: Wherein, F2 represents the network loss; N T Represents the total number of time intervals within the grid recovery cycle; t = 1, 2, 3, 4, ...; N j Indicates the number of distribution network branches; R i Indicates branch resistance; I i Indicates branch current.
12. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 8, characterized in that: The constraints of the dynamic reconstruction model include: power flow constraints, snowflake network operation constraints and energy storage system constraints.
13. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 12, characterized in that: The expression of the power flow constraint is: Among them, Ω in (j) represents the set of ring boxes with j ring box as the end ring box in the snowflake network; Ω out (j) represents the set of ring boxes with j ring box as the head end in the snowflake network; P ij (t) represents the active power flowing from box i to box j at time t; Q ij (t) represents the reactive power flowing from box i to box j at time t; U j (t) represents the voltage amplitude of the jth ring network box at time t; P j (t) represents the active power injected into the jth ring network box at time t; Q j (t) represents the reactive power injected into the jth ring network box at time t; R ij represents the resistance of the line ij connecting the i and j ring networks; X ij I represents the reactance of the line ij connecting the i and j ring networks; ij (t) represents the current amplitude of line ij connecting the i and j ring networks at time t; i = 1, 2, 3, 4...; j = 1, 2, 3, 4...
14. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 12, characterized in that: The snowflake network operation constraints include: substation output constraints, feeder capacity and line maximum transmission capacity constraints and node voltage constraints; The expression of the substation output constraint is: The expressions for the feeder capacity and line maximum transmission capacity constraints are: The expression of the node voltage constraint is: in, Indicates the active output of the substation; Indicates the reactive power output of the substation. Indicates the upper limit of the substation active output at time t; Indicates the lower limit of the substation active output at time t; It represents the upper limit of the reactive power output of the substation at time t; Indicates the lower limit of the reactive power output of the substation at time t; i = 1, 2, 3, 4...; j = 1, 2, 3, 4...
15. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 12, characterized in that: The expression of the energy storage system constraint is: Among them, SOC t represents the energy state of energy storage during period t; ε represents the energy self-consumption rate; SOC0 represents the initial value of energy storage state; SOC max Indicates the upper limit of energy storage; SOC min Represents the lower limit of energy storage; η ES Indicates the energy storage charging and discharging efficiency; Indicates the rated capacity of energy storage; It represents the energy storage power during the period τ; It represents the energy power released by energy storage in the period τ; Both are binary variables, indicating the energy storage charging and discharging state. When 1 is stored, is 1; Indicates the rated power of energy storage; Indicates the energy storage charging and discharging power during period t.
16. The method for sensing and dynamically reconstructing the operation status of the snowflake network according to claim 1, characterized in that: The dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm based on a genetic algorithm and a bidirectional long short-term memory network, including: Randomly generate an initial population based on the genetic algorithm; Removing individuals from the initial population that do not satisfy the constraints of the dynamic reconstruction model and regenerating the population until all individuals satisfy the constraints; Calculate the fitness of each individual in the current initial population; Based on the fitness, the current population is selected, crossed and mutated to obtain a new generation population, the fitness of each individual in the new generation population is calculated, and several individuals with the highest fitness ranking in the new generation population are saved; Repeat the above method until the preset number of iterations is reached; The iterative solution corresponding to the latest generation of individuals is input into the bidirectional long short-term memory network, the iterative solution law is learned and the predicted solution is output; Repeat the above method until the predicted solution meets the preset conditions; The predicted solution that meets the preset conditions is output as the optimal solution.
17. A Snowflake network operation situation awareness and dynamic reconstruction system, characterized in that: include: Situation awareness module, used to judge the operation situation of Snowflake Network by running the situation awareness model; The operational situation awareness model is constructed based on a time-domain convolutional network with an attention mechanism; A dynamic reconstruction module is used to dynamically reconstruct the faulty snowflake network through a dynamic reconstruction model; the optimization goal of the dynamic reconstruction model is to maximize the weighted combination value of load recovery and network loss; the dynamic reconstruction model is solved by a data-driven evolutionary optimization algorithm, and the data-driven evolutionary optimization algorithm is constructed based on a genetic algorithm and a bidirectional long short-term memory network.
18. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program or instruction, which, when executed by the processor, is used to implement at least the method according to any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, which, when executed by a processor, is used to implement at least the method according to any one of claims 1 to 16.
20. A computer program product, the computer program product being stored in a computer-readable storage medium, characterized in that: When the computer program product is executed by a processor, it is used to implement at least the method according to any one of claims 1 to 16.