Blue coordination method, coordination unit, system and storage medium
Through partitioned and layered grid division and GTransformer model, combined with encoding-decoding structure, the problems of excessive grid computing and poor optimization results are solved, and efficient grid active and reactive optimization are achieved.
Patent Information
- Application Number
- CN202311799283.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2025-07-18
AI Technical Summary
When the existing technology conducts network-wide coordination in the power grid, the segmentation and division methods are unreasonable, resulting in excessive calculation volume and poor optimization effect. Especially after distributed energy and electric vehicles are connected to the power grid, the lack of the model leads to the failure of active optimization.
Using a partitioned and layered grid division method, combined with the GTransformer model and encoding-decoding structure, reduces the calculation amount and achieves effective active and reactive optimization through top-down optimization and bottom-up encoding.
It effectively reduces the computing volume of the whole network coordination, solves the contradiction between local optimization and overall optimization, achieves more efficient grid active and reactive optimization, and improves the coordination ability of the power grid.
Smart Images

Figure CN120341998A_ABST
Abstract
Description
Technical Field
[0001] It relates to the field of new energy, electric vehicles, and coordinated control of energy storage, specifically to methods for large-scale centralized control and optimal coordination. Background Art
[0002] Traditionally, a set of control methods for generators is used to balance the entire power grid; however, with the access of distributed energy sources and electric vehicles to the power grid, a method for coordinating the entire power grid and related equipment is required; by using the method of unified modeling, impedance conversion is carried out for equipment of different levels using voltage ratios or transformer turns ratios to establish a unified power grid model for optimal solution. For special transformers such as converters, a dedicated model is also used to unify the DC side and the AC side. Its advantage lies in the unified model, but the disadvantage is that the model is huge and difficult to solve; the introduction of energy storage or similar energy storage devices makes the power grid more complex;
[0003] The problem is that in order to optimize the solution as well as possible, a high-precision power grid model is adopted, but the small grids of the power grid are interconnected with a huge number of nodes. After unified modeling, the computational amount of its optimal solution is too large.
[0004] However, referring to Patent 1 (Chinese Patent 2023106042789), the idea and method of dividing the power grid into small enough parts and achieving active power balance layer by layer from local to overall are optimized to a certain extent on the basis of the overall power grid balance. However, further optimization will lose its effect because when optimizing the local part of the divided power grid first and then the overall part, due to the lack of model, the optimal regulation fails. Therefore, the idea that is effective for balance has no effect on optimization. Specifically, for example, when a small grid relies on external power generation equipment, only modeling the small grid cannot include all the power generation equipment and its topology that supply power to the small grid, so the model is missing and inaccurate; when a small grid supplies power to power-consuming equipment of the external power grid, only modeling the small grid cannot include all the power-consuming equipment, so the model is missing and inaccurate, resulting in the failure of active power optimization. This is one of the reasons why division is not common in the power grid.
[0005] After integrating division, including zoning, layering, or polar and grid division, with the existing topology-based method, the problem of optimization failure caused by the lack of model in the divided solution is solved; Summary of the Invention
[0006] The technical problem to be solved is: it is extremely difficult to carry out effective and meaningful active power optimization. Then, how to carry out reactive power optimization and meaningful active power optimization, that is, to find a relatively large and suitable power grid, simplify the calculation process or simplify variables when coordinating it, and get closer to a solvable state; the current calculation method for the power grid is to map equipment of different voltage levels into equipment of the same voltage level for unified modeling and solution, and division is not common in the power grid. There should be a suitable method, principle, or criterion for dividing the power grid.
[0007] The active power optimization refers to an optimization whose objectives include network loss optimization, charging electricity price cost, electricity price revenue obtained from discharging, the cost of the charging and discharging state conversion, charge-discharge cycle cost, the active power fluctuations in each regional power grid that need to be balanced and the corresponding rewards, the voltage nodes to be optimized and the corresponding rewards, etc.; the constraints include power grid safety and stability constraints, the maximum storable electricity Wh limit of energy storage devices, etc.;
[0008] In view of this, the proposed invention provides a blue coordination method, criteria for reasonable segmentation and division of the power grid, Reuse, an encode-decode structure and method for processing power grid data, a minimalist encode structure and method, a model structure of GTransformer for power grid coordination, a coordination unit, a system, and a storage medium;
[0009] In the first aspect of the embodiment of the proposed invention, a blue coordination method, which finds the core network and its related power grids according to Principle 3.3. After the power grid is divided by region and layer, or further subdivided by region, is characterized by the following steps:
[0010] Initialization, division and then partitioning. The power grid is segmented according to Principles 3, 3.1, and 3.2 to find the core network and its related power grids, and the power grid is divided by region and layer or uniformly divided by region and layer;
[0011] S0: Modeling. According to the power grid data, a power grid model 0 is obtained, and the accuracy of Model 0 is the highest, and its accuracy includes 4.5;
[0012] S1: Planning. Model 0 is unfolded and discretized in time but will not be directly used. Instead, the model information is encoded layer by layer from bottom to top and then decoded from the core network top to bottom to obtain the planning indicators composed of the time series of active power indicators for each layer. The steps include the following:
[0013] S11: Model 0 is unfolded in time and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames, which are arranged in chronological order to form a frame sequence, which becomes the model time series; the predicted values of the power grid data are imported into the model time series to become the future-state model of the power grid; the variables in the future-state model are adjustable variables, and the adjustable variables include active power adjustable variables and reactive power adjustable variables; since changing the adjustable variables can affect the future-state power grid, an objective function is established accordingly;
[0014] S12: Encode the future-state model layer by layer from bottom to top to obtain the future-state model with a fineness of 3 for each layer and the original accuracy;
[0015] S13: The layer where the core network is located is the starting layer. Optimizing from top to bottom means decoding from top to bottom; the layer where the core network is located is the layer of concern. Decode the layer of concern, and optimize according to the objective function, that is, numerically optimize the adjustable quantity within a limited amount of computation to obtain the instance value of the adjustable quantity that minimizes or is closest to the objective value of the objective function. Use this instance value as the result of optimization or decoding to obtain the active power of the devices at this layer and the total active power of the next-layer partition corresponding to the super node, that is, the total adjustable quantity instance value corresponding to the super node area; the next layer becomes the layer of concern. In any area of the layer of concern, use the total adjustable quantity instance value as a constraint to decode the layer of concern. After optimization or decoding, obtain the total active power of this layer and any area of the next layer of the layer of concern. Optimize layer by layer from top to bottom to the bottom layer in this way. When optimizing, select the highest-precision model for the layer of concern, and use a lower-precision model for the layer below the layer of concern; let the Nth layer be the starting layer, let n = N, and the steps are as follows:
[0016] S131: Determine whether n is the top layer. If so, jump to step S132; otherwise, jump to step S133;
[0017] S132: The nth layer is the layer of concern, the model accuracy of the nth layer is the highest, and the accuracy below the nth layer is lower. In this way, the future-state model n is formed; in the future-state model n, use existing algorithms to numerically optimize the instance values of the adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants (preferred because the power grid is an inertial system), etc. Within a limited amount of computation, find the solution closest to the objective among the adjustable quantities; use the instance value of the active adjustable quantity of the nth layer as the active index of the nth layer; for the super node in the nth layer encoded from the highest-precision partition model of the (n - 1)th layer to a lower-precision model of the nth layer, use the instance value of the active adjustable quantity of this super node as the total active adjustable quantity instance value of the corresponding area of the (n - 1)th layer; jump to step 134;
[0018] S133: Use the total active adjustable quantity instance value of the corresponding area of the nth layer obtained in the (n + 1)th layer as the active constraint for this area. The nth layer is the layer of concern, the nth layer has the highest accuracy, and the accuracy below the nth layer is lower to form the future-state model n; in the future-state model n, use existing algorithms to numerically optimize the instance values of the adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants, etc. Within a limited amount of computation, find the solution closest to the objective among the adjustable quantities; use the active instance value of the active adjustable quantity of this layer as the active index of this layer; for the node in this layer encoded from the lower-layer area to this layer, use the instance value of the active adjustable quantity of this node as the total active adjustable quantity instance value of the corresponding area of the lower layer;
[0019] S134: n = n - 1; Determine whether n - 1 is 0. If so, jump to step S135; otherwise, jump to step S131;
[0020] S135: Output the active indexes of each layer;
[0021] S14: The active power index time series of each layer constitutes the planning index;
[0022] S2: Execution. First, determine the active power and then the reactive power. In the planning, it has been optimized according to the goal, and the example values of the active power adjustable amounts of each adjustable device or adjustable point have been calculated in advance, which are called indexes. However, there are deviations between the actual situation and the planning. These deviations are transmitted to each adjustable device or adjustable point to correct the example values of their adjustable amounts. Taking the corrected active power as a parameter and substituting it into the current state model, reactive power optimization is performed on this model, including: for any partition, the optimization goal 1 or the concerned function is the cost of the total active power P fluctuation in this area. The purpose of the cost is to expect the P fluctuation to be as small as possible. If the adjustable amounts in this area take the planning index, the value of the total active power P in this area can be obtained as P1, and P1 is called the predicted value. The actual active power at the current moment is P2, and P2 is called the actual value. The difference between the actual value P2 and the predicted value P1 is used as the deviation. Taking the deviation as the loss function, based on the current state model, numerical optimization algorithms such as gradient descent backpropagation are used to adjust the adjustable amounts to correct the index, so that the deviation is minimized, and the example values of each active power adjustable amount are obtained. Then, taking these example values of the active power adjustable amounts as constants and substituting them into the current state of the power grid, reactive power optimization is performed to obtain the example values of the reactive power adjustable amounts. The process of reactive power optimization after the active power is determined is prior art and will not be elaborated here.
[0023] In the second aspect of the proposed invention embodiment, for the model 0 in step S1 of a blue coordination method, preferably, it includes simplifying the model 0 by using the method of Reuse, and the steps are as follows:
[0024] Step 1: Initially, make a small reserve for reactive power; substitute the empirical default values for the dedicated shunt reactive power regulation equipment to become the constraints on the active power adjustable amounts. Most of the reactive power adjustable amounts in model 0 in the planning of the blue coordination method become the constraints on the active power, and only the reactive power adjustable amounts in one frame are retained;
[0025] Step 2: Execute the blue coordination method to obtain the data for one cycle;
[0026] Step 3: Substitute the historical data of the reactive power adjustable amount example values in the previous cycle into most of the reactive power adjustable amounts in the blue coordination method or the coordination method 0 planning to become the constraints on the active power adjustable amounts, and only the reactive power adjustable amounts in one frame are retained;
[0027] Step 4: Execute the blue coordination method to obtain the data for multiple cycles;
[0028] Step 5: Statistically analyze the reactive power adjustable amount example values in multiple historical periods, and substitute the statistical features into most of the reactive power adjustable amounts in the blue coordination method planning to become the constraints on the active power adjustable amounts, and only the reactive power adjustable amounts in one frame are retained;
[0029] Step 6: Execute the blue coordination method and jump to Step 5;
[0030] In the third aspect of the proposed invention embodiment, for the model information in step S1 of a blue coordination method, it is encoded layer by layer from bottom to top and then decoded from the core network from top to bottom. Preferably, it includes an encode-decode structure and method, which is characterized by including a structure in which multiple encoding modules are connected in series and the same number of decoding modules are connected in series. The number of encoding and decoding modules is the same as the number of model layers. The model is passed as an input to the encoding module of the first layer. The multiple encoding modules encode the model data in multiple layers and then pass it to the corresponding layer of the decoding module for hierarchical decoding, so as to obtain the adjustable quantity instance values of each layer; each encoding module encodes the underlying layer of the model by encoding the original model into a lower-precision code.
[0031] In the fourth aspect of the proposed invention embodiment, a minimalist encoding encode structure and method are used for the blue coordination method described in the first aspect or the planning index composed of the active power index time series of each layer obtained in step S1 of the second aspect; it is characterized by including deleting all the decoding decode modules in the encode-decode structure and only retaining the encoding encode modules, with an encoding precision of 1 or 3. According to principle 1, when encoding from local to global and from bottom to top and solving in combination with the objective function and constraints, the active power loss optimization is not considered, and only the grid security and stability constraints are considered; in addition, after removing the loss optimization from the optimization objective, the reactive power adjustable quantity is substituted with statistical features or empirical values or default values, and the variables related to reactive power in the optimization objective and constraints are reduced to 0; in this way, the active power optimization is completely decoupled from the grid topology, that is, the network loss F(X) in any area is estimated with an empirical value, and there is a linear relationship between the active powers in the area and with dp, and it is only subject to the grid security and stability constraints; furthermore, since the optimization is carried out from local to global, the active power fluctuations of the local grid are always reduced during coordination, so the security and stability constraint boundary is rarely touched, further reducing the dependence on grid data, and the reactive power optimization is decoupled from the active power optimization, greatly reducing the computational load; it is easy to prove that this structure and method are the methods with the highest adjustable quantity utilization rate, which can maximize the value of adjustable devices such as energy storage; after the active power optimization is completely decoupled from the grid topology and the reactive power optimization is decoupled from the active power optimization, the reactive power optimization can be carried out according to grid data, or it can be independent of the grid topology. The reactive power optimization can adopt the in-situ mode, and the reactive power balance at the access point where the reactive power adjustable device is located is sufficient;
[0032] The minimalist encoding encode structure and method are applicable to active and reactive power optimization tasks where it is almost impossible to obtain grid data due to limited personal capabilities and resources, or tasks with extremely reduced costs. As an example, Elon Musk has almost unlimited personal capabilities and resources but has crazy requirements for reducing all costs; its significance lies in maximizing the utilization of adjustable quantities and promoting the popularization of adjustable devices;
[0033] In the fifth aspect of the embodiments of the proposed invention, a method of applying a Transformer to coordination and an improved G attention mechanism are used for the top-down layer-by-layer encoding in the blue coordination method of the first aspect or step S1 of the second aspect, and then decoding from the core network from top to bottom to obtain planning indicators. It is characterized by including encoding the bottom layer with a precision of 1, 2, or 3 after dividing and layering the power grid, and using the new power grid data as the input to the Transformer. It also includes a GTransformer, where the GTransformer is a Trm model based on the G attention mechanism. The G attention mechanism means that the point q corresponds to the vector z q , and the whole point set is {z q}; the sampled point k belongs to {z q} corresponding to z k , and there is an update z k = G-Attn(z k , {z} k ), {z} k is the vector set corresponding to the point set related to the sampled point in {z q}, and G-Attn(z k , {z} k ) = self-Attn(z k , {z} k ), and self-Attn({points}) means including performing Self-Attention (self-attention mechanism) calculation and update on the point set {points} in the parentheses. The sampled point k is an important node, including important nodes determined according to the partitioned and layered structure, and also including important nodes determined according to the unified partitioned and layered structure.
[0034] The Trm model based on the G attention mechanism means using the G attention mechanism as the attention mechanism in the Encoder module of the existing Trm model, or using G attention as the attention mechanism in the Decoder module of the existing Trm model;
[0035] In the sixth aspect of the embodiments of the proposed invention, a coordination unit includes a processor, a memory, and a computer program stored in the memory and executable on the processor. It is characterized in that when the processor executes the computer program, it implements the steps of the blue coordination algorithm described in the first aspect.
[0036] In the seventh aspect of the embodiments of the proposed invention, a coordination system is characterized in that it includes: the coordination units described in the sixth aspect are arranged according to the power grid division, with one coordination unit responsible for one area. Each coordination unit is responsible for aggregating and cleaning the data collected by all the end devices in the area and the data encoded by the lower-level coordination units, and then encoding the data (encode). The encoded data is transmitted to the upper layer through the signal channel. At the same time, it receives the data from the upper layer, decodes the data (decode), and transmits it to each end device in the area and the lower-level coordination units. The encoding and decoding parts for the area where the coordination unit is located are integrated in one coordination unit.
[0037] In the eighth aspect of the embodiments of the proposed invention, a computer-readable storage medium is characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the blue coordination method described in the first aspect.
[0038] In the ninth aspect of the embodiments of the proposed invention application, a power grid segmentation, division principle or criterion applicable to power grid coordination is characterized in that it includes unified sub-area and hierarchical division.
[0039] In the tenth aspect of the embodiments of the proposed invention application, a coordination method 0 is provided. After obtaining the power grid data, the data is subjected to state estimation, Kalman filtering, etc. for cleaning to obtain the optimal or sub-optimal power grid data, and the core network and its related power grid are determined. The coordination method 0 is characterized by including the following steps:
[0040] Step 0: Modeling. According to the power grid data, a power grid attribute model is obtained, including network equations.
[0041] Step 1: Planning. For the planning of energy storage or devices similar to energy storage, the model is expanded in time and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames, which are arranged in chronological order to form a frame sequence, becoming a discrete model time series. The predicted values of the power grid data are imported into the discrete model time series to become the discretized future state model of the power grid. In this way, an objective function is established, and the existing algorithms are used to numerically optimize the instance values of the adjustable quantities. Within a limited amount of calculation, the solution closest to the target in the adjustable quantities is found. The active instance value of the active adjustable quantity is used as the active index and transmitted to Step 2. Step 2 selects a part of the objective function as the focus target of Step 2. When the planning index is substituted into the adjustable quantity, the focus target takes the focus value.
[0042] Step 2: Execution. Import the power grid model with the current power grid data or the optimized data after cleaning to form the current state of the power grid; alternatively, the attention value can also be obtained according to the measured estimate, and the attention value is used as the tracking target; the difference between the tracking target and the attention target value obtained from the current state is used as the deviation, and the deviation is used to correct the current frame of the index to obtain the instance value of each active power adjustable quantity; then, these instance values of the active power adjustable quantity are used as constants and substituted into the current state of the power grid for reactive power optimization to obtain the instance value of the reactive power adjustable quantity. The process of reactive power optimization will not be elaborated here.
[0043] The objective function includes taking power grid balance as objective 1, establishing objective 2 by optimizing a certain or certain electrical quantities of the future-state power grid including reactive power, voltage, etc., and establishing objective 3 for the usage price or cost of the adjustable quantity and its stored power. Objectives 1, 2, and 3 constitute the total objective, and at the same time, constraints based on physical proximity are established, including that the active and reactive power of the same device that can provide both active power and reactive power follow the constraints based on physical proximity; when the planning index is substituted into the adjustable quantity, the attention target value is the attention value; the usage price or cost of the adjustable quantity and its stored power includes the cost of switching between the charging state and the discharging state of the energy storage; the active power fluctuation refers to the alternating current quantity contained in the time series of the total active power P in any area. The acquisition method includes obtaining the direct current quantity by integrating or filtering the P sequence, and subtracting the direct current quantity from P to obtain the alternating current quantity; the active power balance means that, for any area, mobilize the adjustable quantity in this area to absorb and smooth the alternating current quantity of the total active power P in this area, and mobilize the adjustable quantity outside the area to absorb or smooth the part of the alternating current quantity of the total active power P in this area that is injected outside the area.
[0044] The beneficial effect of tuning method 0 is that the optimization task is decomposed into two parts, planning and execution, which are executed separately and organically combined, so that the objectives of the planning can be implemented during the execution. When the execution exceeds the planning situation, it can also take into account attention and optimization in a timely manner, and finally complete the objectives.
[0045] The encoding encode means extracting and condensing (dimensionality reduction) features.
[0046] The power grid data includes topological relationships, parameters of power grid-related equipment, topological relationships and measurement data during equipment operation, etc., and also includes the obtainable and effective data related to equipment-related factors; Principle 3.3 means that according to the core network segmentation, the core network refers to the hub network that supports small networks and the small networks support each other through the core network; for the partitioned and layered structure, the core network is located in the middle and upper layers; the active power fluctuation between the lower areas of the core network and the core network is much greater than the active power fluctuation between the core network and the upper layer. The judgment basis is that the total capacity of the alternating current quantity of the active power transmitted between the lower areas of the core network and the core network is much greater than the total capacity of the alternating current quantity of the active power transmitted between the core network and the upper layer.
[0047] The adjustable quantity refers to its meanings in both mathematical sense and power grid sense. In mathematical sense, it refers to an attribute similar to statistical characteristics. Before an event occurs, the variable can take any value within the range of the adjustable quantity value. When the event occurs, its value is determined and the adjustable quantity attribute disappears, i.e., the adjustable quantity disappears. The adjustable quantity corresponds one-to-one with the variable, and the range of the variable's value corresponds one-to-one with the adjustable quantity value. The value taken by the variable is the instance value of its adjustable quantity. In addition, the adjustable quantity value can also be a probability event. In planning, the statistical characteristics including expectation are taken and substituted as the adjustable quantity value. In this way, the adjustable quantity can be a function of some variables in a certain or certain probability events. As an example, the adjustable quantity EX is EX = D × p(X / Y). When D is determined, for any valid value of Y, there is a probability value p(X / Y) corresponding to it. Then the adjustable quantity EX is a function of Y. Regarding these variables as a certain type of adjustable quantity and adding the cost functions of these variables to the objective function described in step S1 of a blue coordination method, further optimization can be carried out in planning. In this way, the model has higher accuracy. It can be considered that the adjustable quantity takes the function of probability event variables, and the model accuracy is 5.
[0048] The meaning in the power grid refers to that the adjustable quantity is a characteristic of the adjustable quantity in the power grid. One adjustable quantity corresponds to one node or device in the power grid. One node can correspond to multiple adjustable quantities, including active power adjustable quantity, reactive power adjustable quantity, and also adjustable quantities related to relevant attributes, as well as adjustable quantities that may cause possible changes in relevant factors and attributes of the model.
[0049] Partitioning and layering by default refer to partitioning and layering of the power grid. Partitioning and layering of the power grid mean including partitioning and layering. The layering refers to dividing the power grid according to voltage levels. One voltage level is one layer. The lower voltage level is the lower layer, and the higher voltage level is the upper layer. The partitioning refers to dividing the same layer according to electromagnetic circuits within the same layer. The same electrical connectivity area without electromagnetic circuits is one partition. The electromagnetic circuit refers to including the electromagnetic circuit of transformers, the electromagnetic circuit of converters, and the electromagnetic circuit of DC step-up and step-down equipment.
[0050] Device layering and partitioning mean that the factors related to the device are one layer, and this layer is one layer lower than the device. Any one partition in this layer corresponds to 1 device in the upper layer, and the elements in this partition are the relevant factors of the device corresponding to the upper layer. Any element in any partition corresponds to one partition in the lower layer, and the elements in this partition are the relevant factors of the factors corresponding to the previous layer. In this way, through a large amount of data analysis, device layering and partitioning can be obtained. The analysis can be carried out by humans or by artificial intelligence.
[0051] The elements in device layering and partitioning can be regarded as nodes, with node types and node attributes. Through the common device layer, the layering and partitioning are unified with the power grid partitioning and layering, which is called unified partitioning and layering division, and the corresponding structure is the unified partitioning and layering structure.
[0052] Partition subdivision means that the partition is subdivided according to the partitioning criterion 0;
[0053] The partitioning criterion 0 includes that when the power grid topology is represented by the node-branch association relationship, whether the branch or node network loss has always been higher than the threshold (as an example, the threshold is 1%), and whether it is a parent node or the load has always been higher than other branches is used as the criterion. If both are yes, the two ends of the node are divided by this branch, and the upstream and downstream relationships are established according to the long-term power supply and consumption relationship on both sides of the branch or the branch power direction. That is, the one that needs other long-term power supply support is the downstream, the one that provides power supply support for a long time is the upstream, and if the power supply and consumption relationship cannot be determined, they are at the same level.
[0054] The current calculation method of the power grid is unified modeling and solution. For equipment of different voltage levels, by mapping them into equipment of the same voltage level, segmentation and division are not common in the power grid. The reasonable segmentation and division principles and inferences of the power grid are proposed as follows:
[0055] Principle 1 is that the smaller the more inaccurate: For active power optimization, for any non-isolated small network in the power grid, the smaller the area of the small network, the greater the error in its refined modeling and optimization. This is because when the small network relies on external power generation equipment, only modeling the small network cannot include all the power generation equipment and its topology that supply power to the small network, so the model is missing and inaccurate; when the small network supplies power to the power-consuming equipment of the external power grid, only modeling the small network cannot include all the power-consuming equipment, so the model is missing and inaccurate; generally, the smaller the area of the small network, the more missing; in other words, if local optimization is carried out, the active power network loss optimization should be excluded, and only the safety and stability constraints need to be considered, including the line current-carrying capacity limit. As long as it is within the limit, anything is fine, and then the optimization focus is shifted to other aspects for another meaning of active power optimization;
[0056] Principle 2 is to optimize the whole first and then the local. The power grid is an inertial system, so the smaller the disturbance, the smaller the impact. Only when the power grid gradually becomes unstable to the critical point, a small disturbance may break the critical point; therefore, according to Principle 1, a reasonable method is to give priority to considering the support and optimization between small networks, and then consider the optimization within the small network. This is Principle 2.
[0057] Inference 2.1 means top-down optimization during optimization. Applying Principle 2 to the hierarchical structure of the power grid partition can obtain Inference 2.1. Inference 2.1 means top-down optimization during optimization, that is, from large to small, from the upper layer to the lower layer. This is because in the hierarchical structure of the power grid partition, if bottom-up optimization is carried out, that is, first solve each small area in the lower layer, and then solve the larger area merged by the small areas in the upper layer, and solve layer by layer from small to large and from bottom to top. Then, according to Principle 1, it is inaccurate from the beginning, and it is even more inaccurate when pushed up. Therefore, if optimization is carried out, this method is discarded;
[0058] Principle 3 is the segmentation and its strict criterion. The adjustable quantity is used to balance the grid fluctuations. Considering the effect of the adjustable quantity, the grid can be strictly segmented. The criterion is that for the adjustable quantity, the greater the fluctuation of the active power transmission between the outside of the small grid and the small grid, the greater the lack of the small grid model. In particular, if this fluctuation has been 0 for a long time, then for the adjustable quantity, there is no lack in the small grid model;
[0059] However, the small grid gates are interconnected to form a large grid, and almost all small grids support each other. The criteria of Principle 3 are relaxed to have Principles 3.1, 3.2, and 3.3;
[0060] Principle 3.1 is the segmentation and its criterion: The fluctuation of the active power transmission between this small grid and other small grids is very small compared with the active power consumed or generated within the small grid, and can be ignored and considered as 0; In particular, the ratio of the fluctuation quantity to the active power consumed or generated within the small grid can be used to measure the accuracy of the small grid model. When this ratio value is close to or less than the line loss within the small grid, it can be considered that there is no lack in the small grid model, that is, the small grid model is accurate, and the line loss can be estimated according to the empirical value;
[0061] Principle 3.2 is the conditional segmentation and its criterion: At a certain moment or certain moments, the fluctuation of the active power transmission between a small grid and other small grids is large, while at the remaining moments, the fluctuation of the active power transmission between this small grid and other small grids is very small compared with the active power consumed or generated within the small grid, and can be ignored and considered as 0; In particular, for the ratio of the fluctuation quantity to the active power consumed or generated within the small grid, when this ratio value is close to or less than the line loss within the small grid or the line loss empirical value, it can be considered that there is no lack in the small grid model, that is, the small grid model is accurate. When this ratio value is much greater than the line loss within the small grid or the line loss empirical value, it can be considered that the small grid model is inaccurate, and the error range is the line loss generated by this fluctuation quantity. The line loss can be estimated according to the empirical value; Principle 3.2 should be used with caution;
[0062] Principle 3.3 is the division according to the core network. The core network refers to the hub network that supports the small grids and through which the small grids support each other. For the hierarchical structure of sub - regions, the core network is located in the middle and upper layers. The active power fluctuation between each area in the lower layer of the core network and the core network is much greater than the active power fluctuation between the core network and the upper layer. The judgment basis is that the total capacity of the alternating current of the active power transmitted between each area in the lower layer and the core network is much greater than the total capacity of the alternating current of the active power transmitted between the core network and the upper layer.
[0063] Principle 4 is the reactive power balance in - place. The reactive power adjustable quantity applied to the hierarchical structure of sub - regions refers to including: The action range of the reactive power adjustable quantity is limited to the area where it is located, that is, the reactive power adjustable quantity in this area only participates in the regulation of this area and does not participate in the regulation of other areas.
[0064] The accuracy of the power grid model includes 1 degree, 2 degrees, 3 degrees, 4.5 degrees, and 5 degrees; sorted from coarser to finer according to the level of detail, they are 1 degree, 2 degrees, 3 degrees, 4.5 degrees, and 5 degrees; Accuracy 1 means that after encoding the model, there is only 1 variable left in the model. Accuracy 2 means that after encoding the model, there are only M2 variables left in the model. Refinement 3 means that after encoding the model, the number of variables in the model is reduced to only M3; Accuracy 4.5 refers to the model accuracy close to the physical situation. Accuracy 5 is based on the Accuracy 4.5 model, quantifying the factors related to adjustable quantities, and conducting probability statistical analysis to obtain the conditional probability relationship between certain adjustable quantities and related factors, and establishing a probability model based on this.
[0065] The objective function and constraints refer to that in an optimization problem, under certain constraints, the optimal input is solved to make the objective function obtain the expected extreme value.
[0066] Specifically, the control method of ordinary power generation equipment is different from the coordinated control method of the proposed invention. If the control system or controller of ordinary power generation equipment does not establish a connection with the coordinated unit system to achieve data penetration, it cannot be executed as an adjustable quantity in the blue coordination, and its adjustable quantity cannot be collected in the planning. Even if the adjustable quantity is obtained, the time series of the obtained instance values of the adjustable quantity is only used as a power generation suggestion; similarly, equipment with different control methods cannot be used as adjustable quantities; Equipment with the same coordinated control method as the proposed invention, including controllable or adjustable equipment such as power electronic switches and converters connected to the power grid, may also include adjustable equipment with traditional or non-homogeneous control methods that can interact with system data and accept system coordination.
[0067] The beneficial effects of the proposed invention are:
[0068] a) It can correctly partition the entire network, find the core power grid, decompose the entire network coordination task into separate coordinations of multiple core power grids. For any core power grid, it conducts partition and layer division, and decomposes the coordination task into sub-tasks of coordinating each partition. In this way, the computational complexity of the entire network coordination is reduced from the nth power of a positive number to the product of n and this number (n is the number of partitions), greatly reducing the computational complexity and enabling the entire network coordination to be achieved; However, dividing into multiple partitions creates a contradiction between local optimization and overall optimization
[0069] b) It resolves the conflict between local optimization and overall optimization; In order to conduct effective active power optimization, it abandons the idea of first local and then overall optimization that is easy to implement, and proposes a method of simultaneous overall and local optimization. This method provides a way of encoding the power grid model layer by layer from bottom to top and decoding layer by layer from top to bottom according to the partition and layer structure, that is, first transmitting local power grid information to the overall, and then optimizing from the overall to the local, thus resolving the contradiction between local optimization and overall optimization;
[0070] c) Inspired by the highly similar encode-decode structure of encoding power grid information from bottom to top and decoding from top to bottom and Trm, the Trm artificial intelligence framework is used for coordination. This intelligent learning blue coordination can design a set of power grid data encoding and decoding algorithms for coordination by itself. When storage and computing resources are excessive, the unified partitioned, layered, and precision-5 model is input into this intelligence, and it may discover model features that are effective for coordination and difficult to be discovered. Using this feature, it can improve the optimization effect by itself, which is a new attempt;
[0071] d) In order to reduce the computing power requirements of artificial intelligence, an artificial intelligence structure GTrm (GTransformer) for power grid coordination is proposed. The G attention mechanism of GTrm only focuses on important nodes (sampling points) and their related nodes. Due to the characteristics of the power grid, its important nodes are quite sparse, so the computing power is greatly reduced. In addition, after partitioning and layering the power grid and encoding the bottom layer as a low-precision model and then inputting it into the artificial intelligence, the problem of insufficient storage and computing in the initial stage of the development of artificial intelligence can be weakened;
[0072] e) The reuse of adjustable instance values evenly distributes the planned computing power to each time period, further reducing the computing power. With limited time and computing power, a higher-precision model can be used to achieve more refined optimization; Description of the Drawings
[0073] Figure 1 It is a flowchart for implementing the blue coordination method.
[0074] Figure 2 It is an encoding-decoding framework diagram.
[0075] Figure 3 It is a schematic diagram of a super node.
[0076] Figure 4 It is a Transformer framework diagram for coordination.
[0077] Figure 5 It is a GTransformer model framework diagram for coordination.
[0078] Figure 6 It is a schematic diagram of the system structure of a coordination unit.
[0079] Figure 7 It is a schematic diagram of the structure of a coordination unit. Detailed Implementation Manner
[0080] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, in order to thoroughly understand the embodiments of the proposed invention application. However, those skilled in the art should be clear that the proposed invention application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the proposed invention application.
[0081] The embodiments of the proposed invention application include Examples 0, 1, 2, 3, 4, 5, and 6;
[0082] Example 0
[0083] A coordination method 0, after obtaining grid data, performs state estimation or Kalman filtering on the data to obtain optimal or relatively optimal grid data, determines the core network and its related power grids. Coordination method 0 includes the following steps:
[0084] Step 0: Modeling, obtaining a grid attribute model based on grid data, including network equations;
[0085] Step 1: Planning, for planning energy storage or devices similar to energy storage, the model is expanded in time and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames, which are arranged in chronological order to form a frame sequence, becoming a discrete model time series. It includes, for any energy storage device, integrating the active adjustable quantity instance value x(t0) multiplied by the charge storage efficiency or discharge efficiency over the time interval T to obtain the energy storage change amount. Adding the energy storage change amount to the stored electricity amount Wh(t0) at the current moment to obtain the stored electricity amount Wh(t1) in the next frame. Then, obtaining the active adjustable quantity X(t1) at time t1 from the stored electricity amount Wh(t1), and then obtaining the instance value x(t1) of the adjustable quantity X(t1) according to the optimization objective, and so on, pushing forward frame by frame in chronological order;
[0086] The predicted values of grid data include synchronous historical values. Importing the predicted values of grid data into the model time series becomes the future state model of the power grid; the variables in the future state model are adjustable quantities, and the adjustable quantities include active adjustable quantities and reactive adjustable quantities; since changing the adjustable quantities can affect the future state power grid, an objective function is established in this way, and existing algorithms are used to numerically optimize the instance values of the adjustable quantities. Within a limited amount of calculation, the solution closest to the target among the adjustable quantities is found; taking the active instance value of the active adjustable quantity as the active index and passing it to Step 2; because the future state model of the power grid is a time series, the active index is also a time series, and any moment corresponds to 1 frame in the active index time series;
[0087] The objective function includes aiming at power grid balance as Objective 1, establishing Objective 2 by optimizing certain electrical quantities of the future power grid, including reactive power, voltage, etc., and establishing Objective 3 for the usage price or cost of adjustable quantities and their stored electricity. Objectives 1, 2, and 3 constitute the overall objective. At the same time, physical-based constraints are established, including that the active and reactive power of the same device that can provide both active and reactive power follow physical-based constraints;
[0088] The power grid balance includes, for any partition, calculating the fluctuation amount based on the prediction sequence of the active power P in this area, taking the inverse of the fluctuation amount as Objective 1, in order to adjust the adjustable quantity so that its fluctuation amount cancels out the fluctuation amount of the active power gap;
[0089] The usage price or cost of the adjustable quantity and its stored electricity includes the cost of switching between the energy storage charging state and the discharging state;
[0090] When the adjustable quantity takes the planning index, the value of the attention target is the attention value, which can be obtained according to the model or estimated by actual measurement. The attention value is used as the tracking target. As an example, the attention target takes Objective 1;
[0091] Step 2: Execute. After performing state estimation or Kalman filtering on the current power grid data to obtain the optimal power grid data, import it into the power grid model to become the current state of the power grid;
[0092] The difference between the tracking target and the value of the attention target obtained from the current state is used as the deviation, and the deviation is used to correct the current frame of the index to obtain the instance values of each active power adjustable quantity. Then, these instance values of the active power adjustable quantity are used as constants and substituted into the current state of the power grid for reactive power optimization to obtain the instance values of the reactive power adjustable quantity. The process of reactive power optimization will not be elaborated here.
[0093] The correction includes correcting the index according to the deviation and the network equation of the current power grid model to obtain the corrected instance values of the active power adjustable quantity, that is, taking the partial derivative of each adjustable quantity, using the partial derivative value as the distribution ratio, and backpropagating the deviation to the instance values of each adjustable quantity. After adding the value transmitted by the deviation to the instance power of each adjustable quantity, it becomes the corrected instance value of the active power adjustable quantity, so that the value of the attention target changes and its deviation from the tracking target is 0;
[0094] The advantage is that in Step 1 planning, active and reactive power are optimized simultaneously. Different from Step 1, in Step 2, first obtain the current active power according to the planned index and then determine the reactive power. In this way, the solution process is optimized and the amount of calculation is appropriately reduced. The disadvantage of Coordination Method 0 is that active and reactive power are optimized simultaneously during planning, resulting in the coupling of originally independent reactive power at each moment and the increase of the model. When adjusting the branch of the series capacitor or inductor, it is considered that its impedance can always be optimized, so the change of the active power flowing through the branch has no impact on the reactive power injected into the node of this branch.
[0095] As an example, for coordination method 0, assuming there are n active adjustable quantities and m reactive adjustable quantities in the core and its related power grid, the variables of the power grid model are n + m; in step 1 planning, considering the future state models at size(T) moments, the variables are size(T) multiplied by n + m; due to principle 1, n + m is not too small. For example, for distributed charging loads, energy storage, and new energy, n + m is set to 10 million and size(T) is 96, then the number of variables is 960 million, close to 1 billion; assuming each adjustable quantity has 128 levels of adjustment, it is necessary to find the optimal solution or a sub - optimal solution among 128 to the 1 billionth power of possibilities. Even if each adjustable quantity has 2 levels of adjustment, it is 2 to the 1 billionth power; with such a large amount of calculation, coordination method 1 is unsolvable; it is necessary to reasonably simplify the model.
[0096] The proposed invention application provides a coordination method 02, which obtains the power grid data. After performing state estimation or Kalman filtering on the data, the optimal power grid data is obtained. Coordination method 02 is characterized by including the following steps:
[0097] Step 1: Initially, for nodes or devices with both active and reactive adjustable quantities, the active and reactive adjustable quantities are subject to the constraint of limited apparent power. The active adjustable quantity is not fully loaded, and a small amount is reserved for reactive power; for dedicated shunt reactive regulation devices, empirical default values are used to substitute and become constraints on the active adjustable quantity. The constraints include that the reactive current generated after connecting shunt capacitors or inductors changes the line current, thereby changing the load capacity of the line for active current. In addition, for the branch adjusting series capacitors or inductors, whose impedance can always be optimized, the change in active power flowing through the branch has no impact on the reactive power injected into the node by this branch. Most of the reactive adjustable quantities in step 1 planning of coordination method 0 become constraints on the active power, and only the reactive adjustable quantity in one frame is retained;
[0098] Step 2: Execute coordination method 0 to obtain data for one period;
[0099] Step 3: Substitute the historical data of the reactive adjustable quantity instance values in the previous period into most of the reactive adjustable quantities in step 1 planning of coordination method 0 to become constraints on the active adjustable quantity, and only the reactive adjustable quantity in one frame is retained;
[0100] Step 4: Execute coordination method 0 to obtain data for multiple periods;
[0101] Step 5: Statistically analyze the reactive adjustable quantity instance values of multiple historical periods, and substitute the statistical characteristics into most of the reactive adjustable quantities in step 1 planning of coordination method 0 to become constraints on the active adjustable quantity, and only the reactive adjustable quantity in one frame is retained;
[0102] Step 6: Execute coordination method 0, and jump to step 5;
[0103] It can be seen that the advantage of coordination method 02 is that only the reactive power and active power of one frame are optimized during planning, and the adjustable reactive power of other frames is replaced by historical data and converted into a constraint on active power. These historical data are obtained from the planning solutions at other times. In this way, the computational workload of planning is evenly distributed to each time period. This approach is called Reuse.
[0104] As an example, for coordination method 02, it is also assumed that the variables of the power grid model are n adjustable active power and m adjustable reactive power; in the step 1 planning, its variables are m + size(T) × n; for distributed charging loads, energy storage, and new energy, n is 5 million, m is 5 million, and size(T) is 96. Then the number of variables is reduced by 50% compared to coordination method 0.
[0105] Example 1
[0106] Figure 1 It is the implementation flowchart of the blue coordination method. Figure 1 In it, after obtaining the power grid data that has been cleaned and optimized through state estimation or Kalman filtering, the core network and its related power grid are found according to principle 3.3. After the power grid is divided by region and layer, or further divided into sub-regions, the blue coordination method includes the following steps:
[0107] Initialization, division after segmentation. According to principles 3, 3.1, and 3.2, the power grid is segmented to find the core network and its related power grid, and the power grid is divided by region and layer or uniformly divided by region and layer.
[0108] S0: Modeling. According to the power grid data, power grid model 0 is obtained. Model 0 has the highest accuracy, and its accuracy includes 4.5.
[0109] S1: Planning. Model 0 is expanded and discretized in time but is not directly used. Instead, the model information is encoded layer by layer from bottom to top, and then decoded from the core network from top to bottom to obtain the planning indicators composed of the time series of active power indicators for each layer. It includes the following steps:
[0110] S11: Model 0 is expanded in time and discretized in time. The model corresponding to a certain moment is one frame, and multiple moments correspond to multiple frames, which are arranged in chronological order to form a frame sequence, becoming the model time series; the predicted values of the power grid data are imported into the model time series to become the future state model of the power grid; the variables in the future state model are adjustable quantities, and the adjustable quantities include adjustable active power and adjustable reactive power; since changing the adjustable quantities can affect the future state power grid, an objective function is established in this way.
[0111] S12: Encode the future state model layer by layer from bottom to top to obtain the future state model with a refinement level of 3 and the original accuracy.
[0112] S13: The layer where the core network is located is the starting layer. Optimizing from top to bottom means decoding from top to bottom; the layer where the core network is located is the concerned layer. Decode the concerned layer, and optimize according to the objective function, that is, numerically optimize the adjustable quantity within the limited computing amount to obtain the instance value of the adjustable quantity with the minimum or closest-to-target value of the objective function. Take this instance value as the result of optimization or decoding, and obtain the active power of the devices in this layer and the total active power of the next-layer partition corresponding to the super node, that is, the total adjustable quantity instance value corresponding to the super node area; the next layer becomes the concerned layer. In any area of the concerned layer, use the total adjustable quantity instance value as a constraint to decode the concerned layer. After optimization or decoding, obtain the total active power of this layer and any area of the next layer of the concerned layer. Optimize layer by layer from top to bottom to the bottom layer in this way. When optimizing, the highest-precision model is selected for the concerned layer, and a lower-precision model is used for the layer below the concerned layer; Let the Nth layer be the starting layer, let n = N, and the following steps are included;
[0113] S131: Judge whether n is the top layer. If so, jump to step S132; otherwise, jump to step S133;
[0114] S132: The nth layer is the concerned layer, the model accuracy of the nth layer is the highest, and the accuracy below the nth layer is lower. In this way, the future-state model n is formed; In the future-state model n, use existing algorithms to numerically optimize the instance values of the adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants (preferred because the power grid is an inertial system), etc. Within the limited computing amount, find the solution closest to the target among the adjustable quantities; Take the instance value of the active adjustable quantity of the nth layer as the active index of the nth layer; For the super node in the nth layer encoded from the highest-precision partition model of the (n - 1)th layer to the lower-precision super node in the nth layer, the instance value of the active adjustable quantity of this super node is used as the total active adjustable quantity instance value of the corresponding area of the (n - 1)th layer; Jump to step 134;
[0115] S133: The total active adjustable quantity instance value of the corresponding area of the nth layer obtained by the (n + 1)th layer is used as the active constraint of this area. The nth layer is the concerned layer, the accuracy of the nth layer is the highest, and the accuracy below the nth layer is lower to form the future-state model n; In the future-state model n, use existing algorithms to numerically optimize the instance values of the adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants, etc. Within the limited computing amount, find the solution closest to the target among the adjustable quantities; Take the active instance value of the active adjustable quantity of this layer as the active index of this layer; For the node in this layer encoded from the lower-layer area to this layer, the instance value of the active adjustable quantity of this node is used as the total active adjustable quantity instance value of the corresponding area of the lower layer;
[0116] S134: n = n - 1; Judge whether n - 1 is 0. If so, jump to step S135; otherwise, jump to step S131;
[0117] S135: Output the active indexes of each layer;
[0118] S14: The time series of active power indicators for each layer constitute the planning indicators;
[0119] S2: Execution. First, determine the active power and then the reactive power. In the planning, it has been optimized according to the goal, and the instance values of the adjustable amounts of active power for each adjustable device or adjustable point have been calculated in advance, which are called indicators. However, there are deviations between the actual situation and the planning. This deviation is transmitted to each adjustable device or adjustable point to correct the instance values of their adjustable amounts. Taking the corrected active power as a parameter, substitute it into the current-state model and perform reactive power optimization on this model, including: for any partition, the optimization goal 1 or the concerned function is the cost of the total active power P fluctuation in this area. The purpose of the cost is to expect the P fluctuation to be as small as possible. When the adjustable amounts in this area take the planning indicators, the value of the total active power P in this area can be obtained as P1, and P1 is called the predicted value. The actual active power at the current moment is P2, and P2 is called the actual value. The difference between the actual value P2 and the predicted value P1 is used as the deviation. Taking the deviation as the loss function, based on the current-state model, use numerical optimization algorithms such as gradient descent backpropagation to adjust the adjustable amounts to correct the indicators, so that the deviation is minimized, and the instance values of each active power adjustable amount are obtained. Then, taking these instance values of the active power adjustable amounts as constants, substitute them into the current state of the power grid and perform reactive power optimization to obtain the instance values of the reactive power adjustable amounts. The process of reactive power optimization after the active power is determined is prior art and will not be elaborated here.
[0120] The statement that when the adjustable amounts in this area take the planning indicators, the value of the total active power P in this area can be obtained as P1 means that, for any partition, according to the instance values of the adjustable amounts in this area at the current moment t being the planning indicator pa plus the current correction pb, where pa and pb correspond to the actual total active power P2 in this area, and then based on the current-state model, according to P2 and pb, it can be estimated that when the instance value of the adjustable amount is the planning indicator pa, the total active power value P1 in this area at this time; in addition, it also includes, as an example, execute the estimation of P1 once every few seconds to 2 minutes. The planning calculates a planning indicator frame every 0.5 to 2 hours. During the execution of S2, the P1 estimated during this period is statistically averaged as P1 for the next or multiple moments. At the next or multiple moments, the difference between the actual value P2 and P1 is used as the deviation to correct the planning indicators; in addition, it also includes that during the execution of step S2, the P1 estimated during this period is statistically averaged as a scale scale, that is, this average value is used as one of the estimates for the next moment; and it is fused multi-scale with the current estimate (another scale) to obtain the optimal estimate as P1 for the next or multiple moments;
[0121] In the planning of step S1, the encoding described in S12 means including models encoded with precision 1 and precision 3. Encoding with precision 1 means encoding the model into a supernode, reducing the variables of the model to 1. This includes self-normalizing all X in the encoding object, reducing X to a 1D variable c, and substituting the new 1D variable c into the constraint conditions and the objective function to obtain new objective and constraint conditions. In particular, for devices that can charge and discharge, special c and adjustable quantity x are used.
[0122] Encoding with precision 2 means encoding the model into a supernode, reducing the variables of the model to M. This includes using p2 with M variables as dp. There are only M real variables in the p2 variable set C, that is, C = {c1, c2, c3...cM}. Similarly, substituting the new M-dimensional variable C into the constraint conditions and the objective function to obtain new objective and constraint conditions.
[0123] Encoding with precision 3 means encoding the model into a supernode, reducing the variables of the model to M3. This includes using p3 with M3 variables as dp. There are only M3 real variables in the p3 variable set C, that is, C = {c1, c2, c3...cM3}. The difference from precision 2 is that the adjustable quantities within the node are classified by category, and the adjustable quantities in each category are further subdivided using a clustering algorithm. After clustering, each subcategory is self-normalized. Similarly, new constraint conditions and objective functions are obtained. The basis for clustering includes classifying according to typical charge-discharge rate curves. As an example, based on the current battery level and charge-discharge state, estimate the future charge-discharge rate curve, and then calculate the covariance between every two curves. This covariance value is the distance between them.
[0124] Example 2
[0125] Figure 2 is an encoding-decoding framework diagram. Figure 2 In this, the core network is the 5th layer. The bottom-up encoding and top-down decoding described in S12 and S13 of Example 1 include the following steps:
[0126] Step 1: Bottom-up encoding: One area at the bottom layer of model 0 corresponds to one node at the upper layer. After encoding the model data of this area and using it as the attribute of the node, this area is deleted. In this way, after encoding all the bottom layers and deleting them, it becomes model 1. The bottom layer of model 1 is the second layer of model 0. Similarly, after encoding the bottom layer of model 1, it becomes model 2. After encoding the bottom layer of model 2, it becomes model 3. Model 3 is encoded to obtain model 4.
[0127] Step 2: Optimize layer by layer from top to bottom: Take objective 5 as the optimization objective for model 4, solve for the instance values of all adjustable quantities in model 4, i.e., solution 5. Substitute solution 5 into model 3 to obtain the new model and related constraints, which is the model obtained by encoding the solution of model 4. Similarly, take the new model and related constraints, and use objective 4 as the optimization objective to obtain solution 4 and the decoded model. Optimize layer by layer from top to bottom in this way to obtain solutions 3, 2, and 1.
[0128] Step 3: Output the instance values of the adjustable quantities for each layer in each area.
[0129] Briefly, according to Principle 1, eliminate the network loss optimization in the optimization objective. The remaining optimization objectives include the charging electricity price cost, the electricity price revenue obtained from discharging, the cost of the two-state conversion between charging and discharging, the charge-discharge cycle cost, the active power fluctuations of the power grids in each area that need to be balanced and the corresponding rewards, the voltage nodes that need reactive power optimization and the corresponding rewards. The constraints include the safety limit of the current-carrying capacity of line equipment and the Wh limit of the energy storage device's power. According to the optimization objective, obtain the corresponding objective function or loss function. According to the constraints, obtain the corresponding inequality group, i.e., the constraint conditions. According to Reuse, substitute most of the reactive power adjustable quantities with constants, and the variables related to reactive power in the objective function and constraint conditions will be greatly reduced. Figure 2 In this, delete all the decode modules, and only retain the minimalist encoding encode power grid data processing structure of the encode module. That is, solve the problem by combining the optimization objective and constraints to obtain the result. At the same time, encode and condense the model information into feature data, encode from bottom to top and combine the objective function and constraint conditions to solve. The objective function constraint conditions can be divided into two parts: the objective function constraint conditions 1 related to the concerned layer and the objective function constraint conditions 2 only related to other layers, including the following steps:
[0130] Initialization: The concerned layer is the bottom layer
[0131] Step 1: Solve; The model accuracy of the concerned layer is 4.5. Coordinate each area in the concerned layer. The coordination means that each adjustable quantity in each area is optimized and solved according to the objective function constraint conditions 1 to obtain the instance value of the adjustable quantity. According to the instance value of the adjustable quantity, calculate the remaining adjustable quantities of each device in each area. Substitute the instance value of the adjustable quantity and the remaining adjustable quantities into the objective function constraint conditions, and update to obtain the new objective function constraint conditions.
[0132] Step 2: Encode; Take the remaining adjustable quantities as the adjustable quantities, encode all the partitions in the concerned layer into super nodes with a precision of 3, and take the upper layer as the concerned layer.
[0133] Step 3: Solve in the same way as Step 1 to obtain the instance values of the adjustable quantities in each area of the concerned layer, the remaining adjustable quantities, and the updated objective function constraint conditions, and encode in the same way as Step 2. Repeat this process, solve and encode from bottom to top by combining the optimization objective and constraints until the top layer.
[0134] Step 4: Output the instance values of the adjustable quantities for each layer and end;
[0135] Extremely simply, after eliminating the network loss optimization from the optimization objective and then substituting the statistical features for the reactive power adjustable quantity, the variables related to reactive power in the optimization objective and constraint conditions are reduced to 0. The statistical features include average, maximum, and minimum values. For any area, its dp is adopted as dp = 1.06X and compressed to precision 3. dp is dp = 1.06(D1×c1 + D2×c2 + D3×c3 +... DM3×cM3), and g(C) ≤ 0, where C = {c1, c2, c3... cM3};
[0136] In this way, the active power optimization is completely decoupled from the power grid topology. That is, the network loss F(X) in any area is estimated using an empirical value. For example, if the network loss is 6% of X, then dp = 1.06X. There is a linear relationship among the active power quantities within the area and also a linear relationship with dp, and it is only subject to the power grid security and stability constraints. Moreover, since the optimization is carried out from local to global, the active power fluctuations of the local power grid are always reduced during coordination, so the security and stability constraint boundary is rarely touched, further reducing the dependence on power grid data. And the reactive power optimization is decoupled from the active power optimization, greatly reducing the computational amount;
[0137] Example 3
[0138] Figure 3 It is a schematic diagram of a supernode. On the left side (31) of the figure is the information contained in the supernode corresponding to the partition. On the right side (32) of the figure is the active power P and dp model structure of the supernode. In the right side (32), dp is the active power related to the adjustable quantity X within the partition or supernode, dp = ∑X + F(X), where X is the set of adjustable quantities within the supernode. If there are N adjustable quantities within the node, then X expands to X = {X1, X2, X3...}N, and F(X) is the network loss generated by the adjustable quantities within the node. According to the topological relationship, equipment parameters, measurement data information, and adjustable quantity X within the node, F(X) can be calculated and expanded to F(X) = F(X1, X2, X3... XN) = X T AX + BX + b; A is a positive definite matrix with time-varying parameters, B is a matrix with time-varying parameters, and b is a vector with time-varying parameters;
[0139] The model accuracy of a partition in the left side (31) is 4.5. There are topology and devices within the partition, including topological relationships, device parameters, and measurement data information. From the outside of the partition, this partition can be regarded as a super node, which includes the electric energy Wh, active power P, reactive power Q, and constraint information. Among them, the reactive power Q is a constant. This is because according to Principle 4, reactive power is balanced locally. The adjustable reactive power only participates in the reactive power balance within the partition, but does not participate in the balance outside the partition. The electric energy Wh can be obtained according to the integral of the active power over time and the initial moment value. The active power information includes the information of the electric energy Wh. When needed, the electric energy is calculated using the active power. Therefore, only the information of the active power needs to be concerned. The active power P = dp + b, where b is a constant, and dp is the active power related to the adjustable quantity X within the node. dp = X + F(X), where X is the set of adjustable quantities within the node. If there are N adjustable quantities within the node, then X expands to X = {X1, X2, X3...}N. F(X) is the network loss generated by the adjustable quantities within the node. According to the topological relationship, device parameters, measurement data information, and adjustable quantity X within the node, F(X) can be calculated and expanded to F(X) = F(X1, X2, X3...). The adjustable quantity X can also be divided into X Q and X P , that is, X = {X Q , X P}, with the constraint g(X Q , X P ) < 0, which expands into a system of constraint inequalities. Then, according to the Reuse described in Example 0, most of the X Q are constants.
[0140] In Example 1, the encoding described in step S12 of the S1 planning means including models encoded with accuracy 1 and accuracy 3. Encoding with accuracy 1 means, for all X, performing self-per-unit conversion, and X is reduced to 1 dimension, that is, X = c × x is substituted into X, where c is a real number between 0 and 1, and x is the adjustable quantity value of X, that is, the range size. It expands to X = {c × x1, c × x2, c × x3...}N. Substituting X = c × x into F(X) gives F(X) = F(c × x), which expands to F(X) = F(c × x1, c × x2,, c × x3...). Similarly, substituting X = c × x into the objective function E(X) and the constraints and conditions gives E(c) and g(c) ≤ 0. Among them, special c and adjustable quantity x are used for devices that can charge and discharge.
[0141] Encoding with accuracy 2 means encoding the model, and the number of variables of the model is reduced to M. Using p2 with the number of variables M as dp, temporarily not considering the nonlinearity of the power grid. The p2 includes classifying the adjustable quantities within the node into M categories, and performing self-per-unit conversion on the adjustable quantities in each category, that is, the adjustable quantities in each category are accumulated by themselves to be the total adjustable quantity of that category. In this way, M total adjustable quantities are obtained, and these M total adjustable quantities are D1, D2, D3... DM. Then
[0142] dp = p2 = D⊙C + H2(C) and g(C) ≤ 0
[0143] where D⊙C = D1×c1 + D2×c2 + D3×c3 +... DM×cM, H2(C) = F(c1×D1, c2×D2, c3×D3... cM×DM); then use the constraint g(X) ≤ 0 to correct the same type of D, list the constraints involving different Ds to form new constraints, and all new constraints form the constraint g(C) ≤ 0; for example, if there is an inequality X1 + X2 + bias ≤ 0 in g(X) ≤ 0, X1 is divided into class 1, X2 is divided into class 2, X1 and X2 do not belong to the same class, substitute X1 = c1×d1 and X2 = c2×d2 into the inequality to get a new inequality, that is, c1×d1 + c2×d2 + biaS ≤ 0, then this new inequality is the new constraint; finally, substitute it into the objective function to get E(C)
[0144] The set of p2 variables C obtained in this way only has M real variables, that is, C = {c1, c2, c3... cM}
[0145] Precision 3 means encoding the model, and the variables of the model are reduced to M3. The set of p3 variables C only has M3 real variables, that is, C = {c1, c2, c3... cM3}, including, different from precision 2, the adjustable quantities within the node are classified by category, the adjustable quantities in each category are further divided using a clustering algorithm, and each sub-category after clustering is self-normalized. Similarly, dp = p3 = D⊙C + H3(C) and g(C) ≤ 0; the basis for clustering includes classifying according to the typical charge and discharge rate curve. For example, according to the current battery charge and charge and discharge status, estimate the future charge and discharge rate curve, and then calculate the covariance between two curves, and this covariance value is the distance between the two; the set of p3 variables C only has M3 real variables, that is, C = {c1, c2, c3... cM3}
[0146] The charge and discharge rate curve refers to normalizing the charge and discharge curve with the charge and discharge current / rated capacity. For example: when a battery with a rated capacity of 100 A·h is discharged with 20 A, its discharge rate is 0.2;
[0147] Example 4
[0148] Figure 4 It is a Transformer framework diagram for coordination. Figure 4 In it, the A and B matrices are the A and B matrices of the partitioned active power P = X T in AX + BX + b; for grid data, the following steps are included:
[0149] Step 1: Data Embedding, that is, encoding the power grid data. Nodes are encoded according to attributes such as type, voltage level, active and reactive power, adjustable quantity, ID, etc. The types of nodes include ordinary nodes, adjustable quantity nodes, super nodes, branches, and special branches. The types are encoded in the way that ordinary nodes are 1, super nodes are 2, adjustable quantity nodes are 3...
[0150] Step 2: Encoding of time positions. Each frame of power grid data is sorted by time, or position encoding is performed on its serial number. After adding the encoded position information to the corresponding frame, it is input into the Transformer, or the adjustable quantity nodes with IDs are initially input into the decoder; the Transformer outputs the target frame; if the Transformer is not trained, the target frame is invalid.
[0151] Train the Transformer. The adjustable quantity instance value frame sequence obtained from Instance 1 and the corresponding power grid data frame sequence are combined into the training data of the input-output pair. The Transformer network can be trained by minimizing the loss function, and the loss function is defined as: the deviation between the output and the training data plus the cross entropy; use algorithms such as backpropagation, gradient descent, and Adam to optimize the training process; after the training is completed, an effective target frame sequence can be obtained according to Steps 1 and 2.
[0152] In this way, a fully automated encoding-decoding structure for power grid coordination is realized. The disadvantage is that the capacity of the nodes is limited. Therefore, according to Principle 1, after the power grid bottom layer model is partitioned and layered, it is compressed into a model with a precision of 1 or 2 and used as the power grid data to input into the Transformer, which can greatly reduce the number of nodes.
[0153] Figure 5 It is the framework diagram of the GTransformer model for coordination. Figure 5 In it, the encoder part of the GTransformer is composed of G-Trm encoding blocks 1, 2, 3, and 4 in series. G-Trm encoding block 1 is composed of M encoders G in series, and the minimum value of M is 1. The encoder G is an encoder using the G attention mechanism, including the following steps:
[0154] Step 1: Data Embedding. Branches and nodes are regarded as nodes of different types, and the power grid model data is uniformly organized into the format of type encoding and related attributes. The type encoding includes ordinary nodes, adjustable quantity nodes, super nodes, branches, and approximate branches, which are encoded in the way that ordinary nodes are 1, super nodes are 2, adjustable quantity nodes are 3... The approximate branch is used to represent that the specific connection between nodes cannot be determined, but its final connection relationship can be determined.
[0155] Step 2: Temporal one-dimensional encoding. The grid data of each frame is sorted by time, and position encoding is performed on its serial number. The spatial position is determined by an index (reference).
[0156] Step 30: After embedding the grid data and adding it to the temporal encoding, input it into the G-Trm encoding block 1 of the GTransformer.
[0157] Step 31: In the G-Trm encoding block 1, determine the sampling points and their related nodes according to the first-layer division of the grid and the connection relationship between the first layer and the second layer. That is, for any area in the first layer of the grid, the nodes connecting this area to the second layer are used as sampling points. The sampling points are related to all nodes in this area and irrelevant to all nodes outside this area. Then, according to the sampling points and their related nodes, perform G-attention mechanism calculation and update the vector values corresponding to the nodes, and pass them to the upper-layer encoder G. Repeat this M times and pass it to the G-Trm encoding block 2.
[0158] Step 32: Similarly, the encoding block 2 determines the sampling points and their related nodes according to the second-layer division of the grid and the connection relationship between the second layer and the third layer. Then, according to the sampling points and their related nodes, perform G-attention mechanism calculation and update the vector values corresponding to the nodes, and pass them to the upper-layer encoder G. Repeat this multiple times and pass it to the G-Trm encoding block 3.
[0159] Step 33: Similarly, pass it to the G-Trm encoding block 4… until the layer where the core grid is located, completing the entire encoding process of the GTransformer.
[0160] Step 4: The decoder Decoder of the GTransformer and its decoding process are exactly the same as those of the traditional Transformer.
[0161] Step 5: The GTransformer outputs the target frame; if the Transformer is not trained, the target frame is invalid, otherwise it is valid; in the example, the target frame is the frame of the adjustable quantity instance values of the adjustable points at each moment.
[0162] Training: Combine the sequence of adjustable quantity instance value frames obtained in Example 1 and the corresponding sequence of grid data frames to form input-output pair training data, and train the GTransformer. Its training process and algorithm are exactly the same as those of the traditional Transformer training, including; after training, an effective target frame sequence can be obtained according to Steps 1 to 7.
[0163] In this way, a fully automated coding-decoding structure for power grid coordination is achieved. The disadvantage is that it is limited by the maximum number of nodes or vectors that the attention calculation can accommodate. Therefore, according to Principle 1, after the power grid bottom layer model is compressed to a model with a precision of 1 or 2 after zoning and layering, it is used as the new power grid data to input into the GTransformer, which can greatly reduce the number of distributed device nodes.
[0164] Example 5
[0165] Figure 6 It is a schematic diagram of the coordination unit system structure. Figure 6 In it, Layer 1 is 220V and 380V with 5 partitions, Layer 2 is 10kV with 2 partitions, and Layer 3 is 110kV with only one partition. The coordination unit is an aggregation processing node composed of a processor, a memory, communication, and a power supply module. The memory stores a computer program, and when the computer program is executed by the processor, it realizes the steps in the above-mentioned coordination method embodiments, including that there is 1 coordination unit in each partition, which is responsible for aggregating and filtering the data collected by all the end devices in the partition and the data encoded by the lower-layer coordination units, and then encoding the data (encode), and transmitting the encoded data to the upper layer through the signal channel; at the same time, receiving the data from the upper layer, decoding the data (decode), and transmitting it to the end devices in the area and the lower-layer coordination units; in this way, the encoding and decoding parts of the partition where it is located are integrated in 1 coordination unit; the end devices include electric vehicles and energy storage with adjustable quantities, and also include new energy power sources and ordinary load devices; particularly, the control method of ordinary power generation devices is different from the proposed invention's coordination control method at the execution layer. If the control system or controller of the ordinary power generation device does not have an exchange interface with the coordination unit to form a system, it cannot be executed as an adjustable quantity in the blue coordination. Typically, its adjustable quantity cannot be collected during the planning either. Even if the adjustable quantity is obtained, the time series of the obtained adjustable quantity instance values is only used as a power generation suggestion.
[0166] Example 6
[0167] Figure 7 It is a schematic diagram of the structure of the coordination unit. As Figure 7 shown, the coordination unit 7 provided by an embodiment of the proposed invention application includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and operable on the processor 70. When the processor 70 executes the computer program 72, it realizes the steps in the above-mentioned various blue coordination method embodiments, such as Figure 1 the various steps shown. Or, when the processor 70 executes the computer program 72, it realizes the functions of each module / unit in the above-mentioned system embodiments, such as Figure 2 , Figure 5 the functions of each module shown.
[0168] Exemplarily, the computer program 72 can be divided into one or more modules / units. One or more modules / units are stored in the memory 71 and executed by the processor 70 to implement the claimed invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 72 in the power distribution terminal 7.
[0169] The coordination unit 7 can be a mobile phone, an MCU, an ECU, an industrial computer, etc., which is not limited herein. The server can be a physical server, a cloud server, etc., which is not limited herein. The coordination unit 7 may include, but is not limited to, the processor 70 and the memory 71. Those skilled in the art can understand that Figure 7 merely examples of the coordination unit 7, which do not constitute a limitation on the coordination unit 7. It may include more or fewer components than those shown in the figure, or combine some components, or different components. For example, the coordination unit may further include input / output devices, network access devices, buses, etc.
[0170] The so-called processor 70 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0171] The memory 71 may be an internal storage unit of the coordination unit 7, such as the hard disk or memory of the coordination unit 7. The memory 71 may also be an external storage device of the coordination unit 7, such as a plug-in hard disk equipped on the coordination unit 7, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 71 may also include both the internal storage unit and the external storage device of the coordination unit 7. The memory 71 is used to store computer programs and other programs and data required by the coordination unit 7. The memory 71 may also be used to temporarily store data that has been output or will be output.
[0172] The memory 71 can be an internal storage unit of the coordination unit, such as the hard disk or memory of the coordination unit. The memory 71 can also be an external storage device of the coordination unit, such as a plug-in hard disk equipped on the coordination unit, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 71 can also include both the internal storage unit of the coordination unit and the external storage device. The memory 71 is used to store computer programs and other programs and data required by the coordination unit. The memory 71 can also be used to temporarily store the data that has been output or will be output.
[0173] The proposed invention embodiment provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above blue coordination method embodiment are implemented.
[0174] The computer-readable storage medium stores a computer program 72. The computer program 72 includes program instructions. When the program instructions are executed by the processor 70, all or part of the processes in the above embodiment method are implemented. It can also be completed by instructing relevant hardware through the computer program 72. The computer program 72 can be stored in a computer-readable storage medium. When the computer program 72 is executed by the processor 70, the steps of the above various method embodiments can be implemented. Among them, the computer program 72 includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0175] A computer-readable storage medium may be an internal storage unit of the coordination unit in any of the foregoing embodiments, such as a hard disk or memory of the coordination unit. The computer-readable storage medium may also be an external storage device of the coordination unit, such as a plug-in hard disk equipped on the coordination unit, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the computer-readable storage medium may also include both an internal storage unit of the coordination unit and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the coordination unit. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output. It should be understood that the magnitudes of the sequence numbers of the steps in the foregoing embodiments do not mean the order of execution is prior or posterior. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the inventive embodiments proposed.
[0176] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example for illustration. In practical applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments and will not be elaborated here.
[0177] In the foregoing embodiments, the descriptions of each embodiment have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0178] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraint conditions of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the invention proposed.
[0179] In the embodiments provided by the proposed invention, it should be understood that the disclosed device / coordination unit and method can be implemented in other ways. For example, the device / coordination unit embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0180] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, the functional units in each embodiment of the proposed invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0181] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above embodiment methods of the proposed invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0182] The above embodiments are only used to illustrate the technical solutions of the proposed invention, rather than to limit it; although the proposed invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the proposed invention in each embodiment, and should all be included within the protection scope of the proposed invention.
Claims
1. A blue coordination method, characterized in that, The steps are as follows: Initialization, division after segmentation. Segment the power grid according to Principles 3, 3.1, and 3.2, find the core network and its related power grid, and perform zoning and layering division on this power grid or perform unified zoning and layering division; S0: Modeling. Obtain the power grid model 0 based on the power grid data. Model 0 has the highest relative accuracy, and its accuracy includes 4.5; S1: Planning. Model 0 is expanded and discretized in time but is not directly used. Instead, the model information is encoded layer by layer from bottom to top and then decoded from the core network from top to bottom to obtain the planning indicators composed of the time series of active power indicators for each layer; The steps are as follows: S11: Model 0 is expanded in time and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames, which are arranged in chronological order to form a frame sequence, becoming the model time series; Import the predicted values of the power grid data into the model time series to become the future-state model of the power grid. The model has the highest accuracy; The variables in the future-state model are adjustable variables, including active adjustable variables and reactive adjustable variables; Since changing the adjustable variables can affect the future-state power grid, an objective function is established accordingly; S12: Encode the future-state model layer by layer from bottom to top to obtain the future-state models with lower fineness and the original accuracy for each layer; S13: The layer where the core network is located is the starting layer, and optimization is performed from top to bottom, that is, decoding from top to bottom; The layer where the core network is located is the layer of concern. Decode the layer of concern, and perform optimization according to the objective function, that is, numerically optimize and search for the adjustable variables within a limited amount of computation to obtain the instance value of the adjustable variable with the smallest objective function value or closest to the target. Take this instance value as the result of optimization or decoding, and obtain the active power of the equipment on this layer and the total active power of the next-layer partition corresponding to the super node, that is, the total adjustable variable instance value corresponding to the super node area; The next layer becomes the layer of concern. In any area of the layer of concern, use the total adjustable variable instance value as a constraint to decode the layer of concern. After optimization or decoding, obtain the total active power of this layer and any area of the next layer of the layer of concern. In this way, optimize layer by layer from top to bottom to the bottom layer. When optimizing, the highest-accuracy model is selected for the layer of concern, and a lower-accuracy model is used for the layer below the layer of concern; Let the Nth layer be the starting layer, and let n = N. The following steps are included: S131: Determine whether n is the top layer. If so, jump to step S132; otherwise, jump to step S133; S132: The nth layer is the layer of concern. The nth layer model has the highest accuracy, and the accuracy below the nth layer is lower. In this way, the future-state model n is formed; In the future-state model n, existing algorithms are used to numerically optimize the instance values of the adjustable variables, including genetic algorithms, gradient descent direction propagation algorithms and their variants (preferred because the power grid is an inertial system), etc. Within a limited amount of computation, find the solution closest to the target among the adjustable variables; Take the instance value of the active adjustable variable on the nth layer as the active power index on the nth layer; For the super node in the nth layer encoded from the higher-accuracy partition model on the n - 1th layer to the lower-accuracy super node on the nth layer, the instance value of the active adjustable variable of this super node is used as the total active adjustable variable instance value corresponding to the corresponding area on the n - 1th layer; Jump to step 134; S133: The total active power adjustable amount instance value of the corresponding area of the nth layer obtained from the n+1th layer is used as the active power constraint for this area. The nth layer is the layer of concern, with the highest precision in the nth layer and lower precision for layers below the nth layer, forming the future state model n. In the future state model n, the instance values of the adjustable amounts are numerically optimized using existing algorithms, including genetic algorithms, gradient descent backpropagation algorithms and their variants, etc., to find the solution closest to the target among the adjustable amounts within a limited amount of computation. Take the active power instance value of the active power adjustable amount of this layer as the active power index of this layer; for the nodes in this layer encoded from the lower layer area, the instance value of the active power adjustable amount of this node is used as the total active power adjustable amount instance value of the corresponding area of the lower layer. S134: n = n - 1; Determine whether n - 1 is 0. If so, jump to step S135; otherwise, jump to step S131. S135: Output the active power indices of each layer. S14: The time series of the active power indices of each layer constitutes the planning index. S2: Execute. First determine the active power and then determine the reactive power. In the planning, it has been optimized according to the target, and the instance values of the active power adjustable amounts of each adjustable device or adjustable node have been calculated in advance, which are called indices. However, there are deviations between the actual situation and the planning, and these deviations are transmitted to each adjustable device or adjustable node to correct the instance values of their adjustable amounts. Using the corrected active power as a parameter, substitute it into the current state model and perform reactive power optimization on this model, including: for any partition, the optimization target 1 or the concerned function is the cost of the total active power P fluctuation in this area, and the purpose of the cost is to expect the P fluctuation to be as small as possible. If the adjustable amounts in this area take the planning index, the value of the total active power P in this area can be obtained as P1, and P1 is called the predicted value. The actual active power at the current moment is P2, and P2 is called the actual value. The difference between the actual value P2 and the predicted value P1 is used as the deviation. Taking the deviation as the loss function, based on the current state model, use numerical optimization algorithms such as gradient descent backpropagation to adjust the adjustable amounts to correct the index, so that the deviation is minimized, and the instance values of each active power adjustable amount are obtained; then, take these instance values of the active power adjustable amounts as constants, substitute them into the current state of the power grid, and perform reactive power optimization to obtain the instance values of the reactive power adjustable amounts.
2. The blue coordination method according to claim 1, characterized in that The method of reusing Reuse for the model 0 described in step S1 simplifies the model 0, including the following steps: Step 1: Initially, make a small reservation for reactive power; substitute the empirical default values for the dedicated shunt reactive power regulation equipment to become the constraints on the active power adjustable amounts. Most of the reactive power adjustable amounts in the model 0 in the planning of the blue coordination method described in claim 1 become the constraints on the active power, and only the reactive power adjustable amounts in one frame are retained. Step 2: Execute the blue coordination method described in claim 1 to obtain the data for one period. Step 3: Substitute the historical data of the instance values of the reactive power adjustable amounts in the previous period into most of the reactive power adjustable amounts in the planning of the blue coordination method described in claim 1 to become the constraints on the active power adjustable amounts, and only the reactive power adjustable amounts in one frame are retained. Step 4: Execute the blue coordination method described in claim 1 to obtain the data for multiple periods. Step 5: Statistically analyze the reactive power adjustable quantity instance values of multiple historical same periods, substitute the statistical features into most of the reactive power adjustable quantities in step S2 of the blue coordination method described in claim 1, turning them into constraints on the active power adjustable quantity, and only retain the reactive power adjustable quantity in one frame. Step 6: Execute the blue coordination method described in claim 1, and jump to step 5.
3. A blue coordination method according to claim 1 or 2, characterized in that, The implementation of the model information is encoded layer by layer from bottom to top and then decoded from the core network top to bottom in step S1, including an encode-decode structure and method, which is characterized by including a structure in which multiple encoding modules are connected in series and the same number of decoding modules are connected in series. The number of encoding and decoding modules is the same as the number of model layers. The model is passed as input to the encoding module of the first layer. The multiple encoding modules encode the model data in multiple layers and then pass it to the corresponding layer of the decoding module for hierarchical decoding, so as to obtain the adjustable quantity instance values of each layer; each encoding module encodes the bottom layer of the model by encoding the original model into a lower-precision code.
4. A minimalist encoding structure and method for simultaneously solving planning indicators while implementing layer-by-layer encoding of model information from bottom to top in the blue coordination method step S1 described in claims 1 and 2; characterized in that, It includes deleting all the decode modules in the encode-decode structure and only retaining the encode modules, with an encoding precision of 1 or 3. According to principle 1, when encoding from local to global and from bottom to top and solving in combination with the objective function and constraint conditions, the active power loss optimization is not considered, and only the power grid safety and stability constraints are considered; in addition, after eliminating the power loss optimization in the optimization objective, the reactive power adjustable quantity is substituted with statistical features or experience or default values, and the variables related to reactive power in the optimization objective and constraint conditions are reduced to 0. In this way, the active power optimization is completely decoupled from the power grid topology, that is, the power loss F(X) in any area is estimated with an empirical value, and the active power quantities in the area and the dp are linearly related, and are only subject to the power grid safety and stability constraints; furthermore, due to the optimization from local to global, the active power fluctuations of the local power grid are always reduced during coordination, so the safety and stability constraint boundary is rarely touched, further reducing the dependence on power grid data, and the reactive power optimization is decoupled from the active power optimization, greatly reducing the computational amount; it is easy to prove that this structure and method are the methods with the largest adjustable quantity utilization rate, which can maximize the value of adjustable devices such as energy storage; after the active power optimization is completely decoupled from the power grid topology and the reactive power optimization is decoupled from the active power optimization, the reactive power optimization can be carried out according to the power grid data, or it can be independent of the power grid topology. The reactive power optimization can adopt the in-situ mode, and the reactive power balance at the access point where the reactive power adjustable device is located is sufficient.
5. A method for applying Transformer to coordination and an improved G attention mechanism, which are used to implement the step S1 of the blue coordination method described in claims 1 and 2, that is, to encode model information layer by layer from bottom to top and then decode it from the core network from top to bottom; characterized in that, Including, after dividing the power grid into zones and layers, encoding the bottom layer with a precision of 1, 2, or 3 as new power grid data, and inputting the new power grid data into the Transformer; also including a GTransformer, which is a Trm model based on the G attention mechanism; the G attention mechanism means that the point q corresponds to the vector z q , the entire set of points is {z q}; The sampling point k belongs to {z q}, corresponding to z k , there is an update z k of the sampling point k = G-Attn(z k , {z} k ), {z} k is the vector set corresponding to the point set related to the sampling point in {z q}, G-Attn(z k , {z} k ) = self-Attn(z k , {z} k ), self-Attn({points}) means including performing Self-Attention calculation and update on the point set {points} within the parentheses; the sampling point k is an important node, including important nodes determined according to the partition and hierarchical structure, and also including important nodes determined according to the unified partition and hierarchical structure.
6. A power grid segmentation, division principle or criterion applicable to power grid coordination, characterized in that, It includes unified partition and layer division.
7. A coordination unit, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the blue coordination method described in any one of claims 1 to 5.
8. A coordination system, characterized in that, It includes that the coordination unit described in claim 7 is arranged according to the power grid division. One coordination unit is responsible for one area. Each coordination unit is responsible for aggregating and cleaning the data collected by all the terminal devices in the area and the data encoded by the lower-level coordination unit, and then encoding the data, and transmitting the encoded data to the upper layer through the signal channel; at the same time, receiving the data from the upper layer, decoding the data, and transmitting it to the terminal devices in the area and the lower-level coordination unit; both the encoding and decoding parts of the area where it is located are integrated in 1 coordination unit.
9. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the blue coordination method described in any one of claims 1 to 5 are implemented.
10. A coordination method 0, characterized in that The steps include: Step 0: Modeling. A power grid attribute model including network equations is obtained based on power grid data. Step 1: Planning. For the planning of energy storage or devices similar to energy storage, the model is expanded in time and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames. They are arranged in chronological order to form a frame sequence, which becomes a discrete model time series. The predicted values of the power grid data are imported into the discrete model time series to become the discretized future state model of the power grid. In this way, an objective function is established, and the existing algorithm is used to numerically optimize the instance values of adjustable variables. Within a limited amount of calculation, the solution closest to the target in the adjustable variables is found. The active power instance value of the active power adjustable variable is used as the active power index and passed to Step 2. In Step 2, a part of the objective function is selected as the focus target of Step 2. When the planning index is substituted into the adjustable variable, the value of the focus target is the focus value. Step 2: Execution. The current power grid data or the optimal data after cleaning is imported into the power grid model to become the current state of the power grid. Or the focus value can also be obtained according to the measured estimate, and the focus value is used as the tracking target. The difference between the tracking target and the value of the focus target obtained from the current state is used as the deviation, and the deviation is used to correct the current frame of the index to obtain the instance values of each active power adjustable variable. Then, these instance values of the active power adjustable variables are used as constants and substituted into the current state of the power grid for reactive power optimization to obtain the instance values of the reactive power adjustable variables.