Blue coordination method, coordination unit, system, and storage medium
By using grid partitioning and hierarchical design and the GTransformer model, the computational complexity and local optimization conflicts of traditional grid optimization methods when large-scale integration of distributed energy resources and electric vehicles are resolved, achieving efficient active and reactive power optimization and reducing computational resource requirements.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- LIU JIAYU
- Filing Date
- 2024-10-26
- Publication Date
- 2026-07-30
AI Technical Summary
Traditional power grid optimization methods suffer from high computational complexity and difficulty in effectively coordinating new energy sources, electric vehicles, and energy storage resources when faced with large-scale integration of distributed energy and electric vehicles. This leads to difficulties in active power optimization, and the solution of grid segmentation can easily cause conflicts between local and global optimization.
The blue coordination method is adopted. By rationally dividing the power grid and using division criteria, combined with the encoder-decoder structure and GTransformer model, the active and reactive power indicators are optimized by encoding layer by layer from bottom to top and decoding layer by layer from top to bottom. The computational load is reduced by using minimal coding and G attention mechanism to achieve the regional and hierarchical coordination of the power grid.
It effectively reduces the computational load of network-wide coordination, resolves the conflict between local and overall optimization, improves the computational efficiency and optimization effect of the power grid, maximizes the value of adjustable equipment, and decouples active and reactive power optimization, making it suitable for resource-constrained or cost-sensitive scenarios.
Smart Images

Figure CN2024127560_30072026_PF_FP_ABST
Abstract
Description
A blue coordination method, coordination unit, system, and storage medium Technical Field
[0001] It involves the coordinated control of new energy and electric vehicles, as well as energy storage, specifically methods for large-scale centralized control and optimized coordination. Background Technology
[0002] Traditional generator control methods are not necessarily suitable for large-scale integration of distributed energy resources and electric vehicles into power networks. Current conventional methods employ unified modeling, using voltage ratios or transformer turns ratios to calculate impedance for different levels of equipment, establishing a unified power grid model for optimization. The advantage of this approach is model uniformity, but the disadvantage is that solving the problem becomes difficult when the model is too large. The introduction of energy storage or similar devices further complicates the power grid. my country's power grid is characterized by six regional power grids interconnected by DC networks of appropriate switching capacity. Given the complexity and scale of the power grid, achieving coordinated optimization of adjustable resources such as new energy sources, electric vehicles, and energy storage while meeting massive computational demands remains a significant challenge.
[0003] Therefore, segmented regional control methods have become the main means to cope with massive computational demands. However, segmented grid solutions are prone to conflicts between local and global optimization, making the optimal scheduling of the entire power grid a challenging research topic. We have found that future research and application directions may include: either focusing on improving computational capabilities to achieve accurate unified solutions for the entire network, thus unlocking the potential of new power systems and virtual power grids; or researching and implementing simplified and practical segmented solution engineering methods within a reasonable architecture.
[0004] In 2018, we observed the trend of electric vehicles and new energy sources and learned about the issues of grid connection for new energy. At that time, 5G technology was all the rage, making the Internet almost ubiquitous. We believed that the sensitivity of electric vehicles to power supply stability decreased during charging. The cost of charging through information technology aggregation and control was far lower than that of discharging. It was possible to sacrifice the power supply stability of charging to improve the overall stability of the power grid. This led to the development of a route that first aggregated electric vehicle charging as an entry point, and then adjusted the discharge for a fee as needed later. In 2018, we proposed "A Method for Harmonizing New Energy and Electric Vehicle Grid Connection" (Chinese Patent CN111463822A, 2019.01.21), which we called "Blue Charging". Currently, it seems that since the purpose of installing electric vehicle batteries is for comfortable driving, the reduction in lifespan will lead to a proportional reduction in the price of the whole vehicle. The depreciation caused by electric vehicle discharge includes not only the battery, but also the corresponding reduction in the price of the whole vehicle. Therefore, the actual cost of discharge is far higher than the price of the battery. We are glad that we chose the route we did.
[0005] Building upon this foundation, the subsequent patent applications, "A Blue Charging Method" (Chinese Patent 2023100768994, 2023.01.10) and "A Coordination Method" (Chinese Patent 2023106042789, 2023.05.18), represent attempts to research and implement simplified and practical engineering methods for segmented solutions within a reasonable framework. Correspondingly, the proposed invention application represents an attempt to integrate methods such as "A Blue Charging Method" with traditional unified modeling to resolve the challenge of unified solutions for entire or large-scale power grids. Technical issues
[0006] Effective and meaningful active power optimization is fraught with difficulties. So how to perform reactive power optimization and meaningful active power optimization? That is, to find a large and suitable power grid, simplify the calculation process or simplify variables when coordinating it, and move closer to a solution. The current calculation method for power grid is to model and solve the equipment of different voltage levels by mapping them to equipment of the same voltage level. However, the division and partitioning of power grids is not common. There should be a suitable method, principle or criterion for the division and partitioning of power grids.
[0007] The active power optimization refers to the optimization objectives including network loss optimization, charging electricity price cost, discharging electricity price revenue, cost of switching between charging and discharging states, charge-discharge cycle cost, active power fluctuations in each area of the power grid that need to be balanced and corresponding rewards, voltage nodes that need to be optimized and corresponding rewards, etc.; constraints include power grid security and stability constraints, the maximum storage capacity limit (Wh) of energy storage devices, etc. Technical solutions
[0008] In view of this, the proposed invention provides a blue coordination method, a criterion for reasonable grid segmentation and division, reuse, an encoding-decoding structure and method for processing grid data, a simplified encoding structure and method, a model structure of GTransformer for grid coordination, a coordination unit, a system, and a storage medium;
[0009] The first aspect of the proposed invention is a blue coordination method, which, according to principle 3.3, locates the core network and its related power grids, and then divides the power grids into zones and layers, or further subdivides them, characterized by the following steps:
[0010] Initialize, divide and then divide the power grid according to principles 3, 3.1, and 3.2, find the core grid and its related power grids, and divide the power grid into zones and layers or into unified zones and layers;
[0011] S0: Modeling, which is the power grid model 0 obtained from the power grid data. Model 0 has the highest accuracy, including 4.5.
[0012] S1: Planning. Model 0 is expanded and discretized over time but not used directly. Instead, the model information is encoded layer by layer from bottom to top, and then decoded from top to bottom from the core network to obtain the planning indicators composed of the time series of active power indicators at each layer. The steps include the following:
[0013] S11: Model 0 is expanded and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames. Arranged in chronological order, they form a frame sequence, which becomes the model time series. The predicted quantities of the power grid data are imported into the model time series to form the future state model of the power grid. The variables in the future state model are adjustable quantities, including adjustable active power and adjustable reactive power. Since changing the adjustable quantities can affect the future state of the power grid, the objective function is established in this way.
[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 at each layer and the original precision.
[0015] S13: The core network layer is the starting layer, and optimization proceeds from top to bottom, i.e., decoding from top to bottom. The core network layer is the focus layer, which is then decoded and optimized according to the objective function. This involves numerically optimizing and searching for adjustable quantities within a limited computational scope to obtain the instance value of the adjustable quantity that minimizes or is closest to the objective function value. This instance value is used as the result of optimization or decoding to obtain the active power of the devices in this layer and the total active power of the next-layer partition corresponding to the supernode, i.e., the total adjustable quantity instance value of the supernode's corresponding area. The next layer becomes the focus layer. In any area of the focus layer, the total adjustable quantity instance value is used as a constraint to decode the focus layer. After optimization or decoding, the total active power of the focus layer and any area of the next layer is obtained. This process is repeated layer by layer from top to bottom. During optimization, the focus layer uses the highest precision model, and the layers below it use a lower precision model. Let the Nth layer be the starting layer, and let n=N. The process includes the following steps:
[0016] S131: Determine if n is the top level. If yes, proceed to step S132; otherwise, proceed to step S133.
[0017] S132: Layer n is the focus layer. The model at layer n has the highest accuracy, and the accuracy below layer n is lower, thus forming the future state model n. In the future state model n, existing algorithms are used to numerically optimize the instance values of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants (preferred because the power grid is an inertial system), etc., to find the solution closest to the target among the adjustable quantities within a limited amount of computation. The instance values of the active power adjustable quantities at layer n are used as the active power index of layer n. The active power adjustable quantity instance value of the supernode with the highest accuracy in layer n-1, which is encoded by the model at layer n-1 with lower accuracy, is used as the total active power adjustable quantity instance value of the corresponding region in layer n-1. Jump to step 134.
[0018] S133: The total active power adjustable instance value of the corresponding region of layer n obtained from layer n+1 is used as the active power constraint of that region. Layer n is the layer of interest, with the highest accuracy at layer n and lower accuracy below layer n, forming the future state model n. In the future state model n, existing algorithms are used to numerically optimize the instance value of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants, to find the solution closest to the target within a limited computational load. The active power adjustable instance value of the current layer is used as the active power index of the current layer. For nodes in the current layer that are encoded by the region of the lower layer, the active power adjustable instance value of that node is used as the total active power adjustable instance value of the corresponding region of the lower layer.
[0019] S134: n = n – 1; Check if n – 1 is 0. If it is, jump to step S135; otherwise, jump to step S131.
[0020] S135: Outputs the active power indicators for each layer;
[0021] S14: The time series of active power indicators at each level constitute the planning indicators;
[0022] S2: Execution. First, determine active power, then reactive power. The planning has already optimized based on the objectives, pre-calculating the instance values of the adjustable active power of each adjustable device or adjustable point, called indicators. However, the actual situation deviates from the planning. This deviation is transmitted to each adjustable device or adjustable point, correcting its instance values of adjustable power. Using the corrected active power as a parameter, it is substituted into the current state model to optimize reactive power, including: for any partition, optimization objective 1 or the function of concern is the cost of the fluctuation of the total active power P in that partition, with the goal of minimizing the expected fluctuation of P; the adjustable power within that partition is obtained by taking the planning indicators. The total active power P in this area is P1, called the predicted value. The actual active power at the current moment is P2, called the actual value. The difference between the actual value P2 and the predicted value P1 is taken as the deviation. Using the deviation as the loss function, based on the current state model, numerical optimization algorithms such as gradient descent and backpropagation are used to adjust the adjustable quantities to correct the index, so as to minimize the deviation and obtain the instance values of each active power adjustable quantity. Then, these instance values of active power adjustable quantities are taken as constants and substituted into the current state of the power grid to perform reactive power optimization, and obtain the instance values of reactive power adjustable quantities. The process of reactive power optimization after active power is determined is existing technology and will not be described in detail here.
[0023] A second aspect of the proposed invention is a blue coordination method, step S1, wherein the model 0 is preferably simplified by reusing the Reuse method, including the following steps:
[0024] Step 1: Initially, a small amount of reactive power is reserved; the default value of the experience is substituted into the dedicated parallel reactive power regulation equipment to become a constraint on the adjustable amount of active power. In the planning of the blue coordination method, most of the adjustable amount of reactive power in model 0 becomes a constraint on active power, and only the adjustable amount of reactive power in one frame is retained.
[0025] Step 2: Execute the blue coordination method to obtain data for one cycle;
[0026] Step 3: Use the historical data of the reactive power adjustable quantity instance value of the previous cycle to bring most of the reactive power adjustable quantities in the blue coordination method or coordination method 0 planning, and turn them into constraints on the active power adjustable quantities, retaining only the reactive power adjustable quantities in one frame.
[0027] Step 4: Execute the blue coordination method to obtain data from multiple periods;
[0028] Step 5: Statistically analyze the reactive power adjustable quantity instance values of multiple historical contemporaneous periods, substitute the statistical characteristics into most of the reactive power adjustable quantities in the planning of the blue coordination method, and turn them into constraints on the active power adjustable quantities, retaining only the reactive power adjustable quantities in one frame.
[0029] Step 6: Execute the blue coordination method and jump to step 5;
[0030] In a third aspect of the proposed invention, a blue coordination method, step S1, encodes the model information layer by layer from bottom to top, and then decodes it from top to bottom from the core network. Preferably, it includes an encoding-decoding structure and method, characterized by comprising a structure of multiple encoding modules connected in series and the same number of decoding modules connected in series. The number of encoding and decoding modules is consistent with the number of model layers. The model is passed as input to the encoding module of the first layer. Multiple encoding modules encode the model data layer by layer multiple times and then pass it to the decoding module of the corresponding layer for layer-by-layer decoding, thus obtaining the adjustable instance values of each layer. Each encoding module encodes the bottom layer of the model by encoding the original model into a lower-precision encoding.
[0031] A fourth aspect of the proposed invention is a simplified encoding structure and method for obtaining planning indicators composed of time series of active power indicators at each layer using the blue coordination method described in the first aspect or step S1 in the second aspect; characterized in that it includes: in the encoding-decoding structure, all decoding modules are deleted, leaving only the encoding module; the encoding precision is 1 or 3; according to principle 1, encoding is performed from local to global, from bottom to top, and when solving in conjunction with the objective function and constraints, active power loss optimization is not considered, only grid security and stability constraints are considered; furthermore, after removing network loss optimization from the optimization objective, the reactive power adjustable quantity is substituted with statistical characteristics, experience, or default values, reducing the reactive power-related variables in the optimization objective and constraints to 0; thus, active power optimization is integrated with the grid topology. Complete decoupling means that the network loss F(X) in any area is estimated using empirical values, and the active power quantities within the area are linearly related to each other and to dp, and are only subject to grid security and stability constraints. Furthermore, since optimization is performed from local to global, coordination always reduces the active power fluctuations of the local grid, thus rarely touching the security and stability constraint boundaries, further reducing the dependence on grid data. Moreover, reactive power optimization is decoupled from active power optimization, greatly reducing the amount of computation. It is easy to prove that this structure and method is the method with the highest utilization rate of adjustable quantities, which can maximize the value of adjustable devices such as energy storage. After active power optimization is completely decoupled from grid topology, reactive power optimization can be performed based on grid data or without relying on grid topology. Reactive power optimization can adopt a local mode, and reactive power balance can be achieved at the grid access point where the reactive power adjustable device is located.
[0032] The minimalist encoding structure and method are suitable for active and reactive power optimization tasks where personal ability and resources are limited and grid data is almost unavailable, or for tasks that drastically reduce costs. As an example, Elon Musk has almost unlimited personal ability and resources but has an insane demand for reducing all costs. Its significance lies in maximizing the use of adjustable quantities and promoting the adoption of adjustable devices.
[0033] A fifth aspect of the proposed invention is a method for applying Transformer to coordination and an improved G-attention mechanism, used in the blue coordination method of the first aspect or the bottom-up layer-by-layer encoding described in step S1 of the second aspect, and then decoding from the core network from top to bottom to obtain planning indicators; characterized in that it includes: dividing the power grid into layers and encoding the bottom layer with precision 1, 2 or 3 as new power grid data, and inputting the new power grid data into Transformer; it also includes a GTransformer, which is a TRM model based on the G-attention mechanism; the G-attention mechanism refers to the fact that point q corresponds to vector z q The set of all points is {z} q};Sampling point k belongs to {z q} Corresponding to z kThere is an update z for sampling point k. k = G-Attn(z k ,{z} k ), {z} k It is {z q The vector set corresponding to the point set associated with the sampling point in}, G-Attn(z) k ,{z} k ) = self-Attn(z k ,{z} k ), self-Attn({points}) means that the set of points {points} within the parentheses is calculated and updated using the self-attention mechanism; the sampling point k is an important node, including important nodes determined according to the partitioning and hierarchical structure, as well as important nodes determined according to the unified partitioning and hierarchical structure.
[0034] The TRM model based on the G attention mechanism refers to 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] A sixth aspect of the proposed invention is a coordination unit comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the blue coordination algorithm described in the first aspect.
[0036] A seventh aspect of the proposed invention is a coordination system, 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 collecting and cleaning data collected by all end devices in the area and data encoded by lower-level coordination units, then encoding the data, and transmitting the encoded data to the upper layer through a signal channel; simultaneously, it receives data from the upper layer, decodes the data, and transmits it to each end device in the area and the lower-level coordination units; one coordination unit integrates both encoding and decoding for its area;
[0037] An eighth aspect of the proposed invention is a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program that, when executed by a processor, implements the blue coordination method described in the first aspect.
[0038] A ninth aspect of the embodiments of the proposed invention application is a power grid segmentation, division principle or criterion applicable to power grid coordination, characterized in that it includes unified partitioning and hierarchical division;
[0039] According to a tenth aspect of the embodiments of the proposed invention application, a coordination method 0, after obtaining power grid data, performs state estimation, Kalman filtering, and other cleaning processes on the data to obtain optimal or better power grid data, and determines the core network and its related power grids, the coordination method 0 is characterized by including the following steps:
[0040] Step 0: Modeling, obtaining the power grid attribute model based on power grid data, including network equations;
[0041] Step 1: Planning. To plan for energy storage or similar devices, the model is expanded and discretized over time. A frame corresponds to a specific moment in the model, and multiple moments correspond to multiple frames. These frames are arranged in chronological order to form a discrete model time series. The predicted values of the power grid data are imported into the discrete model time series to form a discretized future state model of the power grid. The objective function is established in this way, and existing algorithms are used to numerically optimize the instance values of adjustable quantities. Within a limited computational scope, the solution closest to the objective value is found among the adjustable quantities. The active power instance values of the adjustable quantities are used as active power indicators and passed to Step 2. Step 2 selects a portion of the objective function as the focus of Step 2. When the planning indicators are substituted into the adjustable quantities, the focus values are taken as the focus values.
[0042] Step 2: Execution. Import the current grid data or the cleaned optimal data into the grid model to obtain the current state of the grid. Alternatively, the value of interest can be estimated based on actual measurements, and this value serves as the tracking target. The difference between the tracking target and the value of the target of interest obtained from the current state is used as the deviation. This deviation is used to correct the current frame of the indicators to obtain instance values for each active power adjustable quantity. Then, these instance values of active power adjustable quantities are used as constants and substituted into the current state of the grid to perform reactive power optimization, obtaining instance values for reactive power adjustable quantities. The process of reactive power optimization is not detailed here.
[0043] The objective function includes objective 1, which is grid balance; objective 2, which is to optimize one or more electrical quantities of the future grid, including reactive power and voltage; and objective 3, which is to optimize the usage price or cost of adjustable quantities and their stored energy. Objectives 1, 2, and 3 constitute the overall objective. Simultaneously, constraints based on near-physical principles are established, including that the active and reactive power of the same equipment that can provide both active and reactive power follow these constraints. When planning indicators are substituted into adjustable quantities, the target value is the value of interest. The usage price or cost of adjustable quantities and their stored energy includes the cost of switching between charging and discharging states of energy storage. Active power fluctuation refers to the AC quantity contained in the time series of the total active power P of any region. The acquisition method includes integrating or filtering the P series to obtain the DC quantity, and subtracting the DC quantity from P to obtain the AC quantity. Active power balance refers to, for any region, mobilizing the adjustable quantities in that region to absorb and smooth the AC quantity of the total active power P in that region, and mobilizing the adjustable quantities outside the region to absorb or smooth the portion of the AC quantity of the total active power P injected outside the region.
[0044] The beneficial effect of coordination method 0 is that it breaks down the optimization task into two parts: planning and execution. These parts are executed separately and then organically combined, so that the planned goals can be implemented during execution. When the execution exceeds the planned situation, attention and optimization can be taken into account in a timely manner, and the goal can be achieved in the end.
[0045] The term "encode" refers to the extraction and condensation (dimensionality reduction) of features.
[0046] The power grid data includes topology relationships, parameters of power grid-related equipment, topology relationships and measurement data during equipment operation, as well as available and valid data from equipment-related factors. Principle 3.3 refers to the core network segmentation, where the core network is the hub network that supports smaller networks, and these smaller networks support each other through the core network. For a zoned and layered structure, the core network is located in the middle and upper layers. The active power fluctuations between the lower-level zones and the core network are much greater than the active power fluctuations between the core network and the upper layers. The criterion is that the total capacity of the AC active power transferred between the lower-level zones and the core network is much greater than the total capacity of the AC active power transferred between the core network and the upper layers.
[0047] The adjustable quantity refers to both its mathematical meaning and its significance within the power grid. The mathematical meaning refers to an attribute similar to a statistical characteristic; when not occurring, this variable may take any value within the adjustable quantity's range. Once it occurs, its value is determined, and the adjustable quantity attribute disappears, meaning the adjustable quantity disappears. There is a one-to-one correspondence between the adjustable quantity and the variable, and the range of values for the variable corresponds one-to-one with its adjustable quantity value. The value of the variable is the instance value of its adjustable quantity. Furthermore, the adjustable value can also be a probabilistic event; in planning, statistical characteristics, including expectations, can be used and substituted as the adjustable quantity value. Adjustable quantities can be functions of certain variables in one or more probabilistic events. For example, the adjustable quantity EX is EX=D×p(X / Y). When D is determined, any valid value of Y has a corresponding probability value p(X / Y). Therefore, the adjustable quantity EX is a function of Y. By treating these variables as a certain type of adjustable quantity and adding the cost function of these variables to the objective function described in step S1 of the blue coordination method, further optimization can be performed in the planning. In this way, the model accuracy is higher. It can be considered that the adjustable quantity is a function of the probabilistic event variables, and the model accuracy is 5.
[0048] The meaning of the power grid is that adjustable quantity is a characteristic of the quantity that can be adjusted 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 adjustable quantity, reactive adjustable quantity, adjustable quantity of related attributes, and adjustable quantity that may cause changes in the relevant factors and attributes of the model.
[0049] By default, "regional and layered" refers to the power grid's regional and layered structure. This includes both regional and layered structures. Layering refers to dividing the power grid according to voltage levels, with each voltage level constituting a layer, and lower voltage levels being the lower layer and higher voltage levels being the upper layer. Regional division refers to dividing the same layer according to electromagnetic circuits. The same electrically connected area that does not contain electromagnetic circuits is considered a regional division. Electromagnetic circuits include those of transformers, converters, and DC step-up / step-down devices.
[0050] Equipment hierarchical partitioning refers to a layer where factors related to equipment form a lower layer than the equipment itself. Each partition within this layer corresponds to one device at the upper level, and the elements within that partition are the relevant factors of the corresponding upper-level device. Any element within any partition corresponds to a lower-level partition, and the elements within that partition are the relevant factors of the corresponding upper-level factor. Through extensive data analysis, equipment hierarchical partitioning can be obtained, and this analysis can be performed by humans or artificial intelligence.
[0051] Elements in the equipment hierarchical partitioning can be regarded as nodes, which have node types and node attributes. Through the common equipment layer, the hierarchical partitioning and the power grid partitioning are unified, which is called unified partitioning hierarchical division, and the corresponding structure is unified partitioning hierarchical structure.
[0052] Partition subdivision refers to subdividing a partition according to partitioning criterion 0;
[0053] The division criterion 0 refers to the following: when the power grid topology is represented by the relationship between nodes and branches, the criteria are whether the network loss of a branch or node is always higher than a threshold (1% as an example), and whether it is a parent node or whether the load is always higher than other branches. If both are true, the nodes at both ends are divided by the branch, and the upstream and downstream relationships are established according to the long-term power supply relationship on both sides of the branch or the power direction of the branch. That is, the downstream is the node that needs other power supply support for a longer period of time, the upstream is the node that provides power supply support for a longer period of time, and the node that cannot determine the power supply relationship is the same level.
[0054] Current power grid calculation methods use a unified modeling and solution approach, mapping equipment at different voltage levels to the same voltage level. However, segmentation and partitioning are not common in power grids. Therefore, we propose the following principles and inferences for reasonable power grid segmentation and partitioning:
[0055] Principle 1 is that the smaller the area, the less accurate the optimization: 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 refining its model and optimization. This is because when the small network relies on external power generation equipment, modeling only the small network cannot include all the power generation equipment and their topology that supply power to the small network, resulting in a missing and inaccurate model; when the small network supplies power to power-consuming equipment in the external power grid, modeling only the small network cannot include all the power-consuming equipment, resulting in a missing and inaccurate model. Generally, the smaller the area of the small network, the more missing information there is. In other words, for local optimization, active power network loss optimization should be excluded, and only the safety and stability bundle should be considered, including the line current carrying capacity limit. As long as it is within the limit, anything is acceptable. Then, the optimization focus should be shifted to other aspects to perform active power optimization in another sense.
[0056] Principle 2 is to optimize the whole before optimizing the parts. Since the power grid is an inertial system, the smaller the disturbance, the smaller the impact. Only when the power grid gradually becomes unstable to the critical point can a small disturbance break the critical point. Therefore, according to principle 1, the reasonable approach is to prioritize the support and optimization between small networks before considering the optimization within the small network. This is principle 2.
[0057] Corollary 2.1 refers to top-down optimization. Applying Principle 2 to the partitioned and layered structure of the power grid leads to Corollary 2.1, which states that optimization should be performed from top to bottom, i.e., from large to small, from top to bottom. This is because, in a partitioned and layered structure, if optimization is performed from bottom to top—that is, first solving each small region in the lower layer, and then solving the larger region in the upper layer formed by merging the smaller regions, and so on, layer by layer from small to large and from bottom to top—then, according to Principle 1, the initial approach would be inaccurate, and the upward extension would be even more inaccurate. Therefore, this approach should be abandoned if optimization is to be performed.
[0058] Principle 3 is the segmentation and its strict criteria. Adjustable quantities are used to balance grid fluctuations. Considering the effect of adjustable quantities, the grid can be strictly segmented. The criterion is that for adjustable quantities, the greater the fluctuation of active power transmission between the outside of the small grid and the small grid, the greater the missing value of the small grid model. In particular, if this fluctuation is always 0, then for adjustable quantities, the small grid model has no missing value.
[0059] However, small networks interconnect to form a large network, and each small network is almost mutually supportive. The criteria for principle 3 can be relaxed to include principles 3.1, 3.2, and 3.3;
[0060] Principle 3.1 is the segmentation and its criteria: The fluctuation of active power transmission between the small network and other small networks is very small compared with the active power consumed or generated within the small network, and can be ignored and considered as 0; In particular, the ratio of the fluctuation to the active power consumed or generated within the small network can be used to measure the accuracy of the small network model. When this ratio is close to or less than the network loss within the small network, the small network model can be considered to have no defects, that is, the small network model is accurate, and the network loss can be estimated based on empirical values.
[0061] Principle 3.2 concerns conditional segmentation and its criteria: At certain times, the fluctuation in active power transmission between a small network and other small networks is relatively large, while at other times, the fluctuation in active power transmission between this small network and other small networks is very small compared to the active power consumed or generated within the small network, and can be ignored as 0; In particular, the ratio of the fluctuation to the active power consumed or generated within the small network, when this ratio is close to or less than the network loss or empirical value of network loss within the small network, can be considered that the small network model has no defects, that is, the small network model is accurate; when this ratio is much greater than the network loss or empirical value of network loss within the small network, the small network model can be considered inaccurate, with the error range being the network loss generated by the fluctuation, and the network loss can be estimated based on empirical values; Principle 3.2 should be used with caution;
[0062] Principle 3.3 is based on the core network. The core network refers to the hub network that supports the smaller networks, and the smaller networks support each other through the core network. For a zoned and layered structure, the core network is located in the middle and upper layers. The active power fluctuation between each zone 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 basis for this judgment is that the total capacity of the active power transferred between each zone in the lower layer and the core network is much greater than the total capacity of the active power transferred between the core network and the upper layer.
[0063] Principle 4 is local reactive power balancing. When applied to a zoned and hierarchical structure, Principle 4 refers to the adjustable reactive power quantity, which means that the scope of action of the adjustable reactive power quantity is limited to the zone it is located in; that is, the adjustable reactive power quantity in this zone only participates in the regulation of this zone and does not participate in the regulation of other zones.
[0064] The precision of power grid models includes 1 degree, 2 degrees, 3 degrees, 4.5 degrees, and 5 degrees; according to the level of fineness, from coarse to fine, they are ordered as 1 degree, 2 degrees, 3 degrees, 4.5 degrees, and 5 degrees. Precision 1 means that after encoding the model, the number of variables in the model is reduced to only 1; precision 2 means that after encoding the model, the number of variables in the model is reduced to M2; fineness 3 means that after encoding the model, the number of variables in the model is reduced to only M3; precision 4.5 means that the model precision is close to that of physics; precision 5 is based on the precision 4.5 model, which quantifies the factors related to adjustable quantities and performs probabilistic statistical analysis to obtain the conditional probability relationship between certain adjustable quantities and related factors, and establishes a probabilistic model based on this.
[0065] The objective function and constraints refer to the process of finding the optimal input in an optimization problem under certain constraints, so that the objective function achieves its desired extreme value.
[0066] In a unique case, the control method of ordinary power generation equipment differs 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 coordination unit system to achieve data communication, 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 adjustable quantity instance values 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 includes controllable or adjustable equipment such as power electronic switches and converters connected to the grid, and may also include adjustable equipment with traditional or different control methods that can interact with system data and accept system coordination. Beneficial effects
[0067] a) It can correctly segment the entire network, identify the core power grid, and decompose the network-wide coordination task into the individual coordination of multiple core power grids. For any core power grid, it performs partitioning and hierarchical division, decomposing the coordination task into sub-tasks for coordinating each partition. In this way, the computational workload of network-wide coordination is reduced from a positive number raised to the power of n to the product of n and that number (where n is the number of partitions), greatly reducing the computational workload and making network-wide coordination possible. However, dividing the network into multiple partitions creates a contradiction between local optimization and overall optimization.
[0068] b) It resolves the conflict between local and overall optimization. In order to carry out effective active power optimization, it abandons the easy-to-implement approach of optimizing local first and then overall, and proposes a method of optimizing both the overall and local aspects simultaneously. This method provides a bottom-up, layer-by-layer encoding and top-down, layer-by-layer decoding approach to the power grid model according to a partitioned and layered structure. That is, it first transmits local power grid information to the overall system, and then optimizes from the overall system to the local system, thereby resolving the contradiction between local and overall optimization.
[0069] c) Inspired by the high similarity between this bottom-up encoding and top-down decoding structure of power grid information and TRM, the TRM AI framework is used for coordination. This AI learns blue coordination and can design its own set of power grid data encoding and decoding algorithms for coordination. When storage and computing resources are excessive, a model with unified partitioning and layering and a precision of 5 is input into this AI. It may discover model features that are effective for coordination but difficult to find. It can use these features to improve the optimization effect itself, as a new attempt.
[0070] d) To reduce the computational demands of artificial intelligence, an AI structure GTrm (GTransformer) for power grid coordination is proposed. GTrm's G attention mechanism focuses only on important nodes (sampling points) and their related nodes. Due to the characteristics of the power grid, its important nodes are quite sparse, thus greatly reducing the computational demands. In addition, after dividing the power grid into partitions and layers, the bottom layer is encoded into a low-precision model before being input into the AI, which can mitigate the problem of insufficient storage and computing power in the early stages of AI development.
[0071] e) Reusing adjustable instance values distributes the planned computational load evenly across different time periods, further reducing the computational load. Under limited time and computing power, it enables the use of more accurate models to achieve more refined optimization. Attached Figure Description
[0072] Figure 1 is a flowchart of the implementation of the blue coordination method.
[0073] Figure 2 is a diagram of the encoding-decoding framework.
[0074] Figure 3 is a schematic diagram of a supernode.
[0075] Figure 4 is a diagram of the Transformer framework used for coordination.
[0076] Figure 5 is a framework diagram of the GTransformer model used for coordination.
[0077] Figure 6 is a schematic diagram of the coordination unit system structure.
[0078] Figure 7 is a schematic diagram of the coordination unit. The best embodiment of the present invention
[0079] In the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the proposed invention. However, it will be apparent to those skilled in the art that the proposed invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the proposed invention with unnecessary detail. The embodiments of the proposed invention include Examples 0, 1, 2, 3, 4, 5, and 6, with Example 1 being considered the preferred embodiment of the invention.
[0080] Example 1
[0081] Figure 1 is a flowchart of the blue coordination method. In Figure 1, the power grid data is obtained after cleaning and optimization through state estimation or Kalman filtering. Following principle 3.3, the core network and its related power grids are located. The power grid is then divided into zones and layers, or further subdivided. The blue coordination method includes the following steps:
[0082] Initialize, divide and then divide the power grid according to principles 3, 3.1, and 3.2, find the core grid and its related power grids, and divide the power grid into zones and layers or into unified zones and layers;
[0083] S0: Modeling, which is the power grid model 0 obtained from the power grid data. Model 0 has the highest accuracy, including 4.5.
[0084] S1: Planning. Model 0 is expanded and discretized over time but not used directly. Instead, the model information is encoded layer by layer from bottom to top, and then decoded from top to bottom from the core network to obtain the planning indicators composed of the time series of active power indicators at each layer. The steps include the following:
[0085] S11: Model 0 is expanded and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames. Arranged in chronological order, they form a frame sequence, which becomes the model time series. The predicted quantities of the power grid data are imported into the model time series to form the future state model of the power grid. The variables in the future state model are adjustable quantities, including adjustable active power and adjustable reactive power. Since changing the adjustable quantities can affect the future state of the power grid, the objective function is established in this way.
[0086] S12: Encode the future state model layer by layer from bottom to top to obtain the future state model with a fineness of 3 at each layer and the original precision.
[0087] S13: The core network layer is the starting layer, and optimization proceeds from top to bottom, i.e., decoding from top to bottom. The core network layer is the focus layer, which is then decoded and optimized according to the objective function. This involves numerically optimizing and searching for adjustable quantities within a limited computational scope to obtain the instance value of the adjustable quantity that minimizes or is closest to the objective function value. This instance value is used as the result of optimization or decoding to obtain the active power of the devices in this layer and the total active power of the next-layer partition corresponding to the supernode, i.e., the total adjustable quantity instance value of the supernode's corresponding area. The next layer becomes the focus layer. In any area of the focus layer, the total adjustable quantity instance value is used as a constraint to decode the focus layer. After optimization or decoding, the total active power of the focus layer and any area of the next layer is obtained. This process is repeated layer by layer from top to bottom. During optimization, the focus layer uses the highest precision model, and the layers below it use a lower precision model. Let the Nth layer be the starting layer, and let n=N. The process includes the following steps:
[0088] S131: Determine if n is the top level. If yes, proceed to step S132; otherwise, proceed to step S133.
[0089] S132: Layer n is the focus layer. The model at layer n has the highest accuracy, and the accuracy below layer n is lower, thus forming the future state model n. In the future state model n, existing algorithms are used to numerically optimize the instance values of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants (preferred because the power grid is an inertial system), etc., to find the solution closest to the target among the adjustable quantities within a limited amount of computation. The instance values of the active power adjustable quantities at layer n are used as the active power index of layer n. The active power adjustable quantity instance value of the supernode with the highest accuracy in layer n-1, which is encoded by the model at layer n-1 with lower accuracy, is used as the total active power adjustable quantity instance value of the corresponding region in layer n-1. Jump to step 134.
[0090] S133: The total active power adjustable instance value of the corresponding region of layer n obtained from layer n+1 is used as the active power constraint of that region. Layer n is the layer of interest, with the highest accuracy at layer n and lower accuracy below layer n, forming the future state model n. In the future state model n, existing algorithms are used to numerically optimize the instance value of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants, to find the solution closest to the target within a limited computational load. The active power adjustable instance value of the current layer is used as the active power index of the current layer. For nodes in the current layer that are encoded by the region of the lower layer, the active power adjustable instance value of that node is used as the total active power adjustable instance value of the corresponding region of the lower layer.
[0091] S134: n = n – 1; Check if n – 1 is 0. If it is, jump to step S135; otherwise, jump to step S131.
[0092] S135: Outputs the active power indicators for each layer;
[0093] S14: The time series of active power indicators at each level constitute the planning indicators;
[0094] S2: Execution. First, determine active power, then reactive power. The planning has already optimized based on the objectives, pre-calculating the instance values of the adjustable active power of each adjustable device or adjustable point, called indicators. However, the actual situation deviates from the planning. This deviation is transmitted to each adjustable device or adjustable point, correcting its instance values of adjustable power. Using the corrected active power as a parameter, it is substituted into the current state model to optimize reactive power, including: for any partition, optimization objective 1 or the function of concern is the cost of the fluctuation of the total active power P in that partition, with the goal of minimizing the expected fluctuation of P; the adjustable power within that partition is obtained by taking the planning indicators. The total active power P in this area is P1, called the predicted value. The actual active power at the current moment is P2, called the actual value. The difference between the actual value P2 and the predicted value P1 is taken as the deviation. Using the deviation as the loss function, based on the current state model, numerical optimization algorithms such as gradient descent and backpropagation are used to adjust the adjustable quantities to correct the index, so as to minimize the deviation and obtain the instance values of each active power adjustable quantity. Then, these instance values of active power adjustable quantities are taken as constants and substituted into the current state of the power grid to perform reactive power optimization, and obtain the instance values of reactive power adjustable quantities. The process of reactive power optimization after active power is determined is existing technology and will not be described in detail here.
[0095] The adjustable quantity within the region is used to obtain the planning index, which yields the total active power P of the region as P1. This includes, for any partition, the adjustable quantity instance value within the partition at the current time t is the planning index pa plus the current correction pb. pa and pb correspond to the actual total active power P2 of the region. Then, based on the current state model, according to P2 and pb, the total active power value P1 of the region when the adjustable quantity instance value is the planning index pa can be estimated. Furthermore, as an example, P1 is estimated every few seconds to 2 minutes, and a planning index frame is calculated every 0.5 to 2 hours. In step S2, the average value of the estimated P1 within this period is statistically calculated and used as P1 for the next one or more time periods. At the next one or more time periods, the difference between the actual value P2 and P1 is used as the deviation to correct the planning index. Additionally, step S2 includes, in step S2, the average value of the estimated P1 within this period is statistically calculated as a scale, i.e., this average value is used as one of the estimates for the next time period; and it is fused with the current estimate (another scale) to obtain the optimal estimate as P1 for the next one or more time periods.
[0096] In step S1 planning, the encoding mentioned in S12 refers to encoding models with precision 1 and precision 3. Encoding with precision 1 means encoding the model as a super node, reducing the model's variables to one. This includes self-scaling all X values in the encoded object, reducing X to a 1-dimensional variable c, and substituting the new 1-dimensional variable c into the constraints and objective function to obtain a new objective function and constraints. Specifically, special c and adjustable x are used for devices capable of charging and discharging.
[0097] Encoding to precision 2 means encoding the model as a super node, reducing the number of variables in the model to M, including using p2 with M variables as dp; the set of variables C in p2 has only M real variables, i.e., C={c1, c2, c3…cM}. Similarly, substituting the new M-dimensional variable C into the constraints and objective function yields the new objective function and constraints.
[0098] Encoding to Precision 3 means encoding the model as a super node, reducing the number of model variables to M3. This includes using p3 with M3 variables as dp, where the p3 variable set C contains only M3 real variables, i.e., C = {c1, c2, c3…cM3}. The difference from Precision 2 is that adjustable quantities within the node are divided into classes, and a clustering algorithm is used to further subdivide the adjustable quantities within each class. Each subclass after clustering is self-standardized, similarly yielding new constraints and objective functions. The clustering is based on classification according to typical charge / discharge rate curves. For example, based on the current charge level and charge / discharge state, the future charge / discharge rate curves are estimated, and then the covariance is calculated for each pair of curves; this covariance value is the distance between the two curves.
[0099] In addition, the simplified encoding structure and method in Example 2 and the method of applying Transformer to coordination in Example 4, used to obtain planning indicators in step S1 of the blue coordination method, are both preferred implementations. The simplified encoding is suitable for tasks lacking power grid data and with limited computing and storage resources, while Transformer is suitable for tasks with abundant data and ample computing and storage resources. Their characteristics can be figuratively understood as: ultimate performance: a simplified encoding structure and method; balance: the original blue coordination method; ultimate quality: a method of applying Transformer to coordination. Embodiments of the present invention
[0100] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the proposed invention. However, it will be apparent to those skilled in the art that the proposed invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the proposed invention with unnecessary detail. In addition to the preferred embodiments described, the embodiments of the proposed invention also include Examples 0, 2, 3, 4, 5, and 6.
[0101] Example 0
[0102] One coordination method 0 involves obtaining grid data, performing state estimation or Kalman filtering on the data to obtain optimal or near-optimal grid data, and determining the core grid and its related grids. Coordination method 0 includes the following steps:
[0103] Step 0: Modeling, obtaining the power grid attribute model based on power grid data, including network equations;
[0104] Step 1: Planning. To plan for energy storage or similar energy storage devices, the model is expanded and discretized over time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames. These frames are arranged in chronological order to form a frame sequence, which becomes the discrete model time series. This includes: for any energy storage device, the energy storage change is obtained by multiplying the active adjustable quantity instance value x(t0) by the energy storage efficiency or discharge efficiency and integrating over the time interval T. The energy storage change is then added to the current energy storage quantity Wh(t0) to obtain the energy storage quantity Wh(t1) of the next frame. The active adjustable quantity X(t1) at time t1 is then obtained from the energy storage quantity Wh(t1). Finally, the instance value x(t1) of the adjustable quantity X(t1) is obtained according to the optimization objective. This process is repeated frame by frame in chronological order.
[0105] The predicted values of the power grid data include historical values from the same period. These predicted values are then imported into the model time series to form the future state model of the power grid. The variables in the future state model are adjustable quantities, including adjustable active power and adjustable reactive power. Since changing these adjustable quantities can affect the future state of the power grid, an objective function is established. Existing algorithms are used to numerically optimize the instance values of the adjustable quantities. Within a limited computational scope, the solution closest to the objective value among the adjustable quantities is found. The active power instance values of the adjustable active power are used as active power indicators and passed to step 2. Because the future state model of the power grid is a time series, the active power indicator is also a time series, with any given moment corresponding to one frame in the active power indicator time series.
[0106] The objective function includes objective 1, which is to balance the power grid; objective 2, which is to optimize one or more electrical quantities of the future power grid, including reactive power and voltage; and objective 3, which is to optimize 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 constraints are established, including that the active and reactive power of the same equipment that can provide both active and reactive power follow physical constraints.
[0107] The power grid balancing includes, for any zone, calculating the fluctuation amount based on the predicted sequence of active power P in that zone, inverting the fluctuation amount and using it as target 1, in order to adjust the adjustable amount so that it cancels out the fluctuation amount of the active power gap.
[0108] The price or cost of using the adjustable quantity and its stored energy includes the cost of switching between the energy storage charging state and the discharging state.
[0109] When adjusting and measuring planning indicators, the target value to be focused on is the value of focus. The value of focus can be obtained based on the model or estimated based on actual measurements, and the value of focus is used as the tracking target. As an example, the target value is set to target 1.
[0110] Step 2: Execute the process, perform 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, and obtain the current state of the power grid;
[0111] The difference between the value of the target being tracked and the value of the target being observed in the current state is used as the deviation. 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 active power adjustable quantities are used as constants and substituted into the current state of the power grid to perform reactive power optimization and obtain the instance values of reactive power adjustable quantities. The process of reactive power optimization will not be elaborated here.
[0112] The correction includes adjusting the index according to the deviation and the network equation of the current power grid model to obtain the corrected active power adjustable instance value. That is, the partial derivative is taken for each adjustable quantity, and the partial derivative value is used as the allocation ratio to propagate the deviation back to the instance value of each adjustable quantity. The instance power of each adjustable quantity plus the value transmitted by the deviation becomes the corrected active power adjustable instance value, so that the value of the target of concern changes and its deviation from the tracking target is 0.
[0113] The advantage is that active and reactive power are optimized simultaneously in step 1. Step 2 differs from step 1; during execution, the current active power is obtained first based on the planned indicators, and then the reactive power is determined. This optimizes the solution process and appropriately reduces the computational load. The disadvantage of coordination method 0 is that the simultaneous optimization of active and reactive power during planning leads to reactive power coupling, which was originally independent at each time point, resulting in a larger model. Adjusting the branches with series capacitors or inductors is assumed to always optimize their impedance, so changes in the active power flowing through the branch have no effect on the reactive power injected into the nodes of that branch.
[0114] As an example, for coordination method 0, suppose there are n active adjustable quantities and m reactive adjustable quantities in the core and related power grids, then the power grid model has n+m variables. In step 1 planning, consider the future state model at time size(T), and its variables are size(T) multiplied by n+m. Due to principle 1, n+m will not be too small. For example, for distributed charging loads, energy storage, and new energy, if n+m is set to 10 million and size(T) is 96, then the number of variables is 960 million, close to 1 billion. If each adjustable quantity has 128 adjustable levels, then the optimal or near-optimal solution needs to be found in 128 to the power of 1 billion possibilities. Even if each adjustable quantity has 2 adjustable levels, it is still 2 to the power of 1 billion. With such a large amount of computation, coordination method 1 cannot be solved; therefore, the model must be reasonably simplified.
[0115] The invention application provides a coordination method 02, which obtains optimal power grid data by performing state estimation or Kalman filtering on the obtained power grid data. The coordination method 02 is characterized by including the following steps:
[0116] Step 1: Initially, for nodes or devices with both active and reactive power adjustable quantities, the active and reactive power adjustable quantities are constrained by the limited apparent power. The active power adjustable quantity is not fully utilized, and a small amount is reserved for reactive power. For dedicated parallel reactive power regulation equipment, the default values are substituted using experience to become constraints on the active power adjustable quantity. The constraints include the reactive current generated after connecting parallel capacitors or inductors changes the line current, thereby changing the line's capacity for active current. In addition, it also includes the constraint caused by adjusting the impedance of the branch of series capacitors or inductors, which can always be optimized. Then, the change in active power flowing through the branch has no effect on the reactive power injected into the node of that branch. In coordination method 0, most of the reactive power adjustable quantities in Step 1 become constraints on active power, and only the reactive power adjustable quantities in one frame are retained.
[0117] Step 2: Execute coordination method 0 to obtain data for one cycle;
[0118] Step 3: Use the historical data of the reactive power adjustable quantity instance value of the previous cycle to bring most of the reactive power adjustable quantities in the coordination method 0 step 1 planning into the constraint on the active power adjustable quantities, and only retain the reactive power adjustable quantities in one frame.
[0119] Step 4: Execute coordination method 0 to obtain data from multiple periods;
[0120] Step 5: Statistically analyze the reactive power adjustable quantity instance values of multiple historical contemporaneous periods, substitute the statistical characteristics into most of the reactive power adjustable quantities in the coordination method 0 step 1 planning, and turn them into constraints on the active power adjustable quantities, retaining only the reactive power adjustable quantities in one frame.
[0121] Step 6: Execute coordination method 0, then jump to step 5;
[0122] As can be seen, the advantage of coordination method 02 is that it optimizes both reactive and active power in only one frame during planning. The adjustable reactive power in other frames is replaced by historical data and transformed into constraints on active power. This historical data is solved by planning at other times. In this way, the computational workload of planning is evenly distributed to each time period. This approach is called reuse.
[0123] As an example, for coordination method 02, the variables of the power grid model are also set as n adjustable active power units and m adjustable reactive power units; in step 1 planning, the 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.
[0124] Example 1
[0125] Figure 1 is a flowchart of the blue coordination method. In Figure 1, the power grid data is obtained after cleaning and optimization through state estimation or Kalman filtering. Following principle 3.3, the core network and its related power grids are located. The power grid is then divided into zones and layers, or further subdivided. The blue coordination method includes the following steps:
[0126] Initialize, divide and then divide the power grid according to principles 3, 3.1, and 3.2, find the core grid and its related power grids, and divide the power grid into zones and layers or into unified zones and layers;
[0127] S0: Modeling, which is the power grid model 0 obtained from the power grid data. Model 0 has the highest accuracy, including 4.5.
[0128] S1: Planning. Model 0 is expanded and discretized over time but not used directly. Instead, the model information is encoded layer by layer from bottom to top, and then decoded from top to bottom from the core network to obtain the planning indicators composed of the time series of active power indicators at each layer. The steps include the following:
[0129] S11: Model 0 is expanded and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames. Arranged in chronological order, they form a frame sequence, which becomes the model time series. The predicted quantities of the power grid data are imported into the model time series to form the future state model of the power grid. The variables in the future state model are adjustable quantities, including adjustable active power and adjustable reactive power. Since changing the adjustable quantities can affect the future state of the power grid, the objective function is established in this way.
[0130] S12: Encode the future state model layer by layer from bottom to top to obtain the future state model with a fineness of 3 at each layer and the original precision.
[0131] S13: The core network layer is the starting layer, and optimization proceeds from top to bottom, i.e., decoding from top to bottom. The core network layer is the focus layer, which is then decoded and optimized according to the objective function. This involves numerically optimizing and searching for adjustable quantities within a limited computational scope to obtain the instance value of the adjustable quantity that minimizes or is closest to the objective function value. This instance value is used as the result of optimization or decoding to obtain the active power of the devices in this layer and the total active power of the next-layer partition corresponding to the supernode, i.e., the total adjustable quantity instance value of the supernode's corresponding area. The next layer becomes the focus layer. In any area of the focus layer, the total adjustable quantity instance value is used as a constraint to decode the focus layer. After optimization or decoding, the total active power of the focus layer and any area of the next layer is obtained. This process is repeated layer by layer from top to bottom. During optimization, the focus layer uses the highest precision model, and the layers below it use a lower precision model. Let the Nth layer be the starting layer, and let n=N. The process includes the following steps:
[0132] S131: Determine if n is the top level. If yes, proceed to step S132; otherwise, proceed to step S133.
[0133] S132: Layer n is the focus layer. The model at layer n has the highest accuracy, and the accuracy below layer n is lower, thus forming the future state model n. In the future state model n, existing algorithms are used to numerically optimize the instance values of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants (preferred because the power grid is an inertial system), etc., to find the solution closest to the target among the adjustable quantities within a limited amount of computation. The instance values of the active power adjustable quantities at layer n are used as the active power index of layer n. The active power adjustable quantity instance value of the supernode with the highest accuracy in layer n-1, which is encoded by the model at layer n-1 with lower accuracy, is used as the total active power adjustable quantity instance value of the corresponding region in layer n-1. Jump to step 134.
[0134] S133: The total active power adjustable instance value of the corresponding region of layer n obtained from layer n+1 is used as the active power constraint of that region. Layer n is the layer of interest, with the highest accuracy at layer n and lower accuracy below layer n, forming the future state model n. In the future state model n, existing algorithms are used to numerically optimize the instance value of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants, to find the solution closest to the target within a limited computational load. The active power adjustable instance value of the current layer is used as the active power index of the current layer. For nodes in the current layer that are encoded by the region of the lower layer, the active power adjustable instance value of that node is used as the total active power adjustable instance value of the corresponding region of the lower layer.
[0135] S134: n = n – 1; Check if n – 1 is 0. If it is, jump to step S135; otherwise, jump to step S131.
[0136] S135: Outputs the active power indicators for each layer;
[0137] S14: The time series of active power indicators at each level constitute the planning indicators;
[0138] S2: Execution. First, determine active power, then reactive power. The planning has already optimized based on the objectives, pre-calculating the instance values of the adjustable active power of each adjustable device or adjustable point, called indicators. However, the actual situation deviates from the planning. This deviation is transmitted to each adjustable device or adjustable point, correcting its instance values of adjustable power. Using the corrected active power as a parameter, it is substituted into the current state model to optimize reactive power, including: for any partition, optimization objective 1 or the function of concern is the cost of the fluctuation of the total active power P in that partition, with the goal of minimizing the expected fluctuation of P; the adjustable power within that partition is obtained by taking the planning indicators. The total active power P in this area is P1, called the predicted value. The actual active power at the current moment is P2, called the actual value. The difference between the actual value P2 and the predicted value P1 is taken as the deviation. Using the deviation as the loss function, based on the current state model, numerical optimization algorithms such as gradient descent and backpropagation are used to adjust the adjustable quantities to correct the index, so as to minimize the deviation and obtain the instance values of each active power adjustable quantity. Then, these instance values of active power adjustable quantities are taken as constants and substituted into the current state of the power grid to perform reactive power optimization, and obtain the instance values of reactive power adjustable quantities. The process of reactive power optimization after active power is determined is existing technology and will not be described in detail here.
[0139] The adjustable quantity within the region is used to obtain the planning index, which yields the total active power P of the region as P1. This includes, for any partition, the adjustable quantity instance value within the partition at the current time t is the planning index pa plus the current correction pb. pa and pb correspond to the actual total active power P2 of the region. Then, based on the current state model, according to P2 and pb, the total active power value P1 of the region when the adjustable quantity instance value is the planning index pa can be estimated. Furthermore, as an example, P1 is estimated every few seconds to 2 minutes, and a planning index frame is calculated every 0.5 to 2 hours. In step S2, the average value of the estimated P1 within this period is statistically calculated and used as P1 for the next one or more time periods. At the next one or more time periods, the difference between the actual value P2 and P1 is used as the deviation to correct the planning index. Additionally, step S2 includes, in step S2, the average value of the estimated P1 within this period is statistically calculated as a scale, i.e., this average value is used as one of the estimates for the next time period; and it is fused with the current estimate (another scale) to obtain the optimal estimate as P1 for the next one or more time periods.
[0140] In step S1 planning, the encoding mentioned in S12 refers to encoding models with precision 1 and precision 3. Encoding with precision 1 means encoding the model as a super node, reducing the model's variables to one. This includes self-scaling all X values in the encoded object, reducing X to a 1-dimensional variable c, and substituting the new 1-dimensional variable c into the constraints and objective function to obtain a new objective function and constraints. Specifically, special c and adjustable x are used for devices capable of charging and discharging.
[0141] Encoding to precision 2 means encoding the model as a super node, reducing the number of variables in the model to M, including using p2 with M variables as dp; the set of variables C in p2 has only M real variables, i.e., C={c1, c2, c3…cM}. Similarly, substituting the new M-dimensional variable C into the constraints and objective function yields the new objective function and constraints.
[0142] Encoding to Precision 3 means encoding the model as a super node, reducing the number of model variables to M3. This includes using p3 with M3 variables as dp, where the p3 variable set C contains only M3 real variables, i.e., C = {c1, c2, c3…cM3}. The difference from Precision 2 is that adjustable quantities within the node are divided into classes, and a clustering algorithm is used to further subdivide the adjustable quantities within each class. Each subclass after clustering is self-standardized, similarly yielding new constraints and objective functions. The clustering is based on classification according to typical charge / discharge rate curves. For example, based on the current charge level and charge / discharge state, the future charge / discharge rate curves are estimated, and then the covariance is calculated for each pair of curves; this covariance value is the distance between the two curves.
[0143] Example 2
[0144] Figure 2 is an encoding-decoding framework diagram. In Figure 2, the core network is layer 5. The bottom-up encoding and top-down decoding described in steps S12 and S13 of Example 1 include the following steps:
[0145] Step 1: Encoding from bottom to top: The bottom layer of Model 0 corresponds to a node in the upper layer. Encode the model data of that layer as an attribute of the node, and then delete that layer. After encoding all the bottom layer layers, delete them to get Model 1. The bottom layer of Model 1 is the second layer of Model 0. Similarly, the bottom layer of Model 1 is encoded to get Model 2, the bottom layer of Model 2 is encoded to get Model 3, and Model 3 is encoded to get Model 4.
[0146] Step 2: Optimize sequentially from top to bottom: For model 4, take objective 5 as the optimization objective, and 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 decoding model 4; Similarly, for the new model and related constraints, take objective 4 as the optimization objective to obtain solution 4 and the decoded model. In this way, optimize sequentially from top to bottom to obtain solutions 3, 2, and 1;
[0147] Step 3: Output instance values of adjustable quantities for each zone and layer;
[0148] Simply put, following Principle 1, after removing network loss optimization from the optimization objectives, the remaining optimization objectives include: charging electricity price cost, discharging electricity price revenue, cost of transitioning between charging and discharging states, charge-discharge cycle cost, active power fluctuations and corresponding rewards in each power grid area that need to be balanced, voltage nodes requiring reactive power optimization and their corresponding rewards, and constraints including the current carrying capacity safety limit of line equipment and the Wh limit of energy storage equipment. Based on the optimization objectives, the corresponding objective function or loss function is obtained; based on the constraints, the corresponding set of inequalities, i.e., constraint conditions, is obtained. Then, by substituting most of the adjustable reactive power quantities with constants, the objective... The number of reactive power-related variables in the target function and constraints will be greatly reduced. In Figure 2, all decoding modules are removed, and only the simplified encoding module is retained to encode the power grid data processing structure. That is, the results are obtained by combining the optimization objective and constraints, and the model information is encoded and condensed into feature data. The encoding is performed from bottom to top and combined with the objective function and constraints to solve the problem. The objective function and constraints can be divided into two parts: objective function constraint 1 related to the layer of interest and objective function constraint 2 related only to other layers. The steps are as follows:
[0149] Initialization: The layer of concern is the bottom layer.
[0150] Step 1: Solve; The accuracy of the focus layer model is 4.5. Coordinate each region of the focus layer. The coordination refers to optimizing each adjustable quantity in each region according to the objective function constraint 1 to obtain the adjustable quantity instance value; Based on the adjustable quantity instance value, calculate the remaining adjustable quantity of each device in each region; Substitute the adjustable quantity instance value and the remaining adjustable quantity into the objective function constraint, and obtain the new objective function constraint after updating.
[0151] Step 2: Encoding; Use the remaining adjustable values as adjustable values, encode all partitions within the focus layer as super nodes with a precision of 3, and use the previous layer as the focus layer;
[0152] Step 3: Solve in the same way as in Step 1 to obtain the instance values of adjustable quantities in each region of the interest layer, the remaining adjustable quantities, and the updated objective function constraints. Encode them in the same way as in Step 2. Repeat this process from bottom to top, combining the optimization objective and constraints to solve and encode them until the top layer is reached.
[0153] Step 4: Output the instance values of adjustable variables for each layer, then end;
[0154] In a very simple way, after removing network loss optimization from the optimization objective, the reactive power adjustable quantity is substituted with statistical characteristics. The reactive power related variables in the optimization objective and constraints are reduced to 0. The statistical characteristics include average, maximum and minimum values. For any region, its dp adopts dp = 1.06X and is compressed to a precision of 3. dp is dp = 1.06 (D1×c1+D2×c2+D3×c3+...DM3×cM3), and g(C)≤0, C={c1, c2, c3…cM3}.
[0155] In this way, active power optimization is completely decoupled from the power grid topology. That is, the network loss F(X) in any area is estimated using empirical values. For example, if the network loss is 6% of X, then dp = 1.06X. The active power quantities in each area have a linear relationship, and the relationship with dp is also linear. Moreover, it is only subject to the security and stability constraints of the power grid. Furthermore, since the optimization is carried out from the local to the global, the active power fluctuations of the local power grid are always reduced during coordination, so the security and stability constraint boundaries are rarely touched. This further reduces the dependence on power grid data. In addition, reactive power optimization is decoupled from active power optimization, which greatly reduces the amount of computation.
[0156] Example 3
[0157] Figure 3 is a schematic diagram of a supernode. The left side (31) of the figure shows the information contained in the supernode corresponding to the partition. The right side (32) of the figure shows 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 in the partition or supernode, dp=ΣX+F(X). X is the set of adjustable quantities in the supernode. If there are N adjustable quantities in the node, then X is expanded to X={X1,X2,X3...}N. F(X) is the network loss generated by the adjustable quantities in the node. F(X) can be calculated based on the topology relationship in the node, equipment parameters, measurement data information, and adjustable quantity X. It is expanded to F(X) = F(X1,X2,X3...XN) =X T AX+BX+b; A is the positive definite matrix of time-varying parameters, B is the time-varying parameter matrix, and b is the time-varying parameter vector;
[0158] The model accuracy of a partition in the left (31) is 4.5. The partition contains topology and equipment, including topology relationships, equipment parameters, and measurement data information. From the outside, the partition can be regarded as a super node. The node contains energy Wh, active power P, reactive power Q and constraint information. Among them, 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 inside the partition, but does not participate in the balance outside the partition. The energy Wh can be obtained from the integral of active power over time and the initial time value. The active power information contains the information of energy Wh. When needed, the energy can be calculated using active power. Therefore, we only need to focus on the active power information. Active power P = dp + b, b is a constant, dp is the active power related to the adjustable quantity X in the node, dp = X + F(X), X is the set of adjustable quantities in the node. If there are N adjustable quantities in the node, then X is expanded to X = {X1, X2, X3...} N F(X) represents the network loss caused by adjustable variables within a node. It can be calculated based on the node's topology, equipment parameters, measurement data, and the adjustable variable X, and can be expanded as F(X) = F(X1, X2, X3...). The adjustable variable X can also be categorized into reactive and active adjustable variables. Q and X P That is, X={X Q X P}, with constraints g(X) Q ,X P If ) < 0, expand it into a system of constraint inequalities, and then reuse it as described in Example 0. Most of X Q It is a constant.
[0159] In Example 1, step S1 planning, the encoding mentioned in S12 refers to models encoded with precision 1 and precision 3. Encoding with precision 1 means that all X are self-scaled, X is reduced to 1 dimension, i.e., X = c × x is substituted into X, where c is a real number between 0 and 1, and x is the adjustable value of X, i.e., the range size, which 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 constraints and conditions gives E(c) and g(c) ≤ 0; where special c and adjustable x are used for devices that can charge and discharge.
[0160] Precision 2 refers to encoding the model, reducing the number of variables to M, and using p2 with M variables as dp, temporarily ignoring grid nonlinearity; p2 includes classifying the adjustable quantities within a node into M categories, self-scaling the adjustable quantities in each category (i.e., accumulating the adjustable quantities in each category to obtain the total adjustable quantities for that category), thus obtaining M total adjustable quantities, which are D1, D2, D3…DM.
[0161] dp = p2 = D⊙C + H2(C) and g(C) ≤ 0
[0162] Where D⊙C = D1×c1 + D2×c2 + D3×c3 + ... + DM×cM, H2(C) = F(c1×D1, c2×D2, c3×D3...cM×DM); then, the constraint g(X) ≤ 0 is used to modify the same class of D, and the constraints involving different D are listed to form new constraints. All the new constraints constitute the constraint g(C) ≤ 0; for example, g(X) ≤ 0 contains the inequality X1 + X2 + bias ≤ 0, X1 is classified into class 1, X2 is classified into class 2, X1 and X2 do not belong to the same class, substituting X1 = c1×d1 and X2 = c2×d2 into the inequality, we get a new inequality, that is, c1×d1 + c2×d2 + bias ≤ 0, then this new inequality is the new constraint; finally, substituting it into the objective function, we get E(C).
[0163] The resulting set of p2 variables C contains only M real variables, i.e., C = {c1, c2, c3, ..., cM}.
[0164] Precision 3 refers to encoding the model, reducing the number of variables to M3. The p3 variable set C contains only M3 real variables, i.e., C = {c1, c2, c3…cM3}. The difference from precision 2 is that adjustable variables within nodes are divided into classes, and a clustering algorithm is used to further subdivide the adjustable variables within each class. Each subclass after clustering is self-standardized. Similarly, dp = p3 = D⊙C + H3(C) and g(C) ≤ 0. The clustering is based on typical charge / discharge rate curves, for example, using the current charge level and charge / discharge state to estimate future charge / discharge rate curves, and then calculating the covariance between each pair of curves. This covariance value is the distance between the two curves. The p3 variable set C contains only M3 real variables, i.e., C = {c1, c2, c3…cM3}.
[0165] The charge / discharge rate curve refers to the charge / discharge current / rated capacity ratio of the charge / discharge curve. For example, when a battery with a rated capacity of 100A·h is discharged at 20A, its discharge rate is 0.2.
[0166] Example 4
[0167] Figure 4 is a Transformer framework diagram used for coordination. In Figure 4, matrices A and B represent the active power P = X of the partition. T The A and B matrices in AX + BX + b; for power grid data, the following steps are included:
[0168] Step 1: Data embedding, which is to encode the power grid data. Nodes are encoded according to attributes such as type, voltage level, active and reactive power, adjustable quantity, and ID. Node types include ordinary nodes, adjustable nodes, super nodes, branches, and special branches. The type is encoded in the manner of ordinary nodes being 1, super nodes being 2, adjustable nodes being 3, and so on.
[0169] Step 2: Encoding the time and location. Each frame of power grid data is sorted by time, or its sequence number is encoded for location. The encoded location information is added to the corresponding frame and then input into the Transformer, or initially input into the adjustable nodes with IDs in the decoder; the Transformer outputs the target frame; if the Transformer has not been trained, the target frame is invalid.
[0170] To train the Transformer, the adjustable instance value frame sequence obtained in Instance 1 and the corresponding power grid data frame sequence are used as the input and output pairs for training data. The Transformer network can be trained by minimizing the loss function, which is defined as the deviation between the output and the training data plus the cross-entropy. Backpropagation, gradient descent, Adam and other algorithms are used to optimize the training process. After training, the effective target frame sequence can be obtained by following steps 1 and 2.
[0171] This achieves a fully automated encoding-decoding structure for power grid coordination. The drawback is that the node capacity is limited. To address this, based on principle 1, the bottom-level power grid model is compressed into a model with precision of 1 or 2 after partitioning and layering, and then used as the power grid data input to the Transformer, which can greatly reduce the number of nodes.
[0172] Figure 5 is a framework diagram of the GTransformer model used for coordination. In Figure 5, the encoder part of the GTransformer is composed of G-Trm encoding blocks 1, 2, 3, and 4 connected in series. G-Trm encoding block 1 is composed of M encoders G connected in series, where M is at least 1. The encoder G is an encoder that uses the G attention mechanism, including the following steps:
[0173] Step 1: Data embedding. Branches and nodes are treated as nodes of different types. The power grid model data is uniformly organized into a format of type codes and related attributes. The type codes include ordinary nodes, adjustable nodes, super nodes, branches, and approximate branches, which are encoded as 1 for ordinary nodes, 2 for super nodes, 3 for adjustable nodes, and so on. Approximate branches are used to represent nodes where the specific connection between them cannot be determined, but the final connection relationship can be determined.
[0174] Step 2: One-dimensional encoding of the time sequence. Each frame of power grid data is sorted by time, and its sequence number is used for position encoding. The spatial location is determined using an index (reference).
[0175] Step 30: After embedding the power grid data into the embedding, add it to the timing code and input it into the G-Trm encoding block 1 of the GTransformer;
[0176] Step 31: In G-Trm encoding block 1, the sampling points and their related nodes are determined according to the division of the first layer of the power grid and the connection relationship between the first and second layers. That is, any area of the first layer of the power grid, the nodes connected to the second layer of the area are used as sampling points. The sampling points are related to all nodes in the area and are not related to all nodes outside the area. Then, based on the sampling points and their related nodes, the G attention mechanism is used to calculate and update the vector values corresponding to the nodes, and the data is passed to the upper encoder G. This process is repeated M times and then passed to G-Trm encoding block 2.
[0177] Step 32: Similarly, coding block 2 determines the sampling points and their related nodes based on the division of the second layer of the power grid and the connection between the second and third layers. Then, it calculates and updates the vector values corresponding to the nodes using the G attention mechanism based on the sampling points and their related nodes, and passes them to the upper encoder G. This process is repeated multiple times and passed to G-Trm coding block 3.
[0178] Step 33: Similarly, pass it to G-Trm coding block 4... until the core power grid layer is located, to complete the entire GTransformer coding process;
[0179] Step 4: The GTransformer's decoder and its decoding process are exactly the same as those of the traditional Transformer.
[0180] Step 5: GTransformer outputs the target frame; if the Transformer has not been trained, the target frame is invalid, otherwise it is valid; in the example, the target frame is the adjustable instance value frame of the adjustable point at each time step.
[0181] Training involves using the adjustable instance value frame sequence obtained in Instance 1 and the corresponding power grid data frame sequence to form input-output pairs as training data for GTransformer. The training process and algorithm are exactly the same as those for traditional Transformer training, including: After training, effective target frame sequences can be obtained by following steps 1 to 7.
[0182] This achieves a fully automated encoding-decoding structure for power grid coordination. However, it is limited by the maximum number of nodes or vectors that attention calculation can accommodate. To address this, based on principle 1, the bottom-level power grid model after partitioning and layering is compressed into a model with precision of 1 or 2 and then used as the new power grid data input to GTransformer, which can greatly reduce the number of distributed device nodes.
[0183] Example 5
[0184] Figure 6 is a schematic diagram of the coordination unit system structure. In Figure 6, layer 1 has 5 partitions for 220V and 380V, layer 2 has 2 partitions for 10kV, and layer 3 has only one partition for 110kV. The coordination unit is a convergence processing node composed of a processor, memory, communication, and power supply modules. The memory stores a computer program, which, when executed by the processor, implements the steps in the above-described coordination method embodiment. This includes having one coordination unit in each partition, responsible for aggregating and filtering data collected by all end devices in the partition and data encoded by the lower-level coordination unit, then encoding the data, and transmitting the encoded data to the upper layer through a signal channel; simultaneously, it receives data from the upper layer and... After data is decoded, it is transmitted to each end device in the zone and the lower-level coordination unit. Thus, a single coordination unit integrates both encoding and decoding of the zone it belongs to. End devices include electric vehicles and energy storage with adjustable capacity, as well as new energy power sources and ordinary load devices. In particular, the control method of ordinary power generation equipment is different from the coordination control method of the invention at the execution layer. If the control system or controller of ordinary power generation equipment 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 in the planning. 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.
[0185] Example 6
[0186] Figure 7 is a schematic diagram of the coordination unit. As shown in Figure 7, one embodiment of the proposed invention provides a coordination unit 7, which includes a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer program 72, it implements the steps in the various blue coordination method embodiments described above, such as the steps shown in Figure 1. Alternatively, when the processor 70 executes the computer program 72, it implements the functions of each module / unit in the various system embodiments described above, such as the functions of each module shown in Figures 2 and 5.
[0187] For example, computer program 72 can be divided into one or more modules / units, one or more of which are stored in memory 71 and executed by processor 70 to complete the invention. One or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 72 in power distribution terminal 7.
[0188] The coordination unit 7 can be a mobile phone, MCU, ECU, industrial control computer, etc., and is not limited thereto. The server can be a physical server, cloud server, etc., and is not limited thereto. The coordination unit 7 may include, but is not limited to, processor 70 and memory 71. Those skilled in the art will understand that Figure 7 is merely an example of the coordination unit 7 and does not constitute a limitation on the coordination unit 7. It may include more or fewer components than shown, or combine certain components, or different components. For example, the coordination unit may also include input / output devices, network access devices, buses, etc.
[0189] The processor 70 may be a Central Processing Unit (CPU), or 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. A general-purpose processor may be a microprocessor or any conventional processor.
[0190] The memory 71 can be an internal storage unit of the coordination unit 7, such as a hard disk or RAM of the coordination unit 7. The memory 71 can also be an external storage device of the coordination unit 7, such as a plug-in hard disk, SmartMediaCard (SMC), SecureDigital (SD) card, or FlashCard equipped on the coordination unit 7. Furthermore, the memory 71 can include both internal and external storage units of the coordination unit 7. 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 data that has been output or will be output.
[0191] The memory 71 can be an internal storage unit of the coordination unit, such as a hard disk or RAM. The memory 71 can also be an external storage device of the coordination unit, such as a plug-in hard disk, SmartMediaCard (SMC), SecureDigital (SD) card, or FlashCard. Furthermore, the memory 71 can include both internal and external storage devices. 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 data that has been output or will be output.
[0192] The proposed embodiments of the invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the above-described blue coordination method embodiments.
[0193] A computer-readable storage medium stores a computer program 72. The computer program 72 includes program instructions. When executed by the processor 70, the program instructions implement all or part of the processes in the methods described in the above embodiments. Alternatively, the computer program 72 can instruct related hardware to complete the process. The computer program 72 can be stored in a computer-readable storage medium. When executed by the processor 70, the computer program 72 can implement the steps of the various method embodiments described above. The computer program 72 includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0194] The computer-readable storage medium can 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 can also be an external storage device of the coordination unit, such as a plug-in hard disk, SmartMediaCard (SMC), SecureDigital (SD) card, FlashCard, etc., equipped on the coordination unit. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the coordination unit. 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 can also be used to temporarily store data that has been output or will be output. It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the proposed embodiments.
[0195] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, 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. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0196] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0197] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the invention.
[0198] In the embodiments provided by the proposed invention, it should be understood that the disclosed apparatus / coordination unit and method can be implemented in other ways. For example, the apparatus / coordination unit embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or units may be electrical, mechanical, or other forms.
[0199] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional units in the various embodiments of the proposed invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0200] If an integrated module / unit is implemented as 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, all or part of the processes in the above-described embodiments of the invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0201] The above embodiments are only used to illustrate the technical solutions of the proposed invention, and are not intended to limit it. Although the proposed invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions 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, and should all be included within the protection scope of the proposed invention. Industrial applicability
[0202] Example 1, a first aspect of the proposed invention, a blue coordination method, solves the problem of reasonable network segmentation. Without increasing computational load, it resolves the conflict between local and overall optimization caused by dividing the network into multiple partitions. The computational load for network-wide coordination is reduced from a positive number raised to the power of n to the product of n and that number (where n is the number of partitions), with no side effects. The side effects refer to the fact that after reasonably segmenting the network into a core network, further partitioning and layering greatly reduces the computational load, making network-wide coordination possible. However, dividing the network into multiple partitions creates a contradiction between local and overall optimization, which is difficult to reconcile.
[0203] Example 2: The blue coordination method focuses its computational and storage resource requirements on the planning step S1. By greatly simplifying the planning step S1, a simplified encoding structure and method are obtained. This method takes absorption and balancing as its primary objectives and is suitable for tasks with scarce computing resources, scarce power grid data, or no power grid data. Only one server is needed to coordinate the entire core network, and several servers can achieve full network coordination and balance, making it extremely valuable.
[0204] Example 4: The encoder-decode structure in step S1 of the blue coordination method is highly similar to that of TRM. Inspired by this, the TRM AI framework is used for coordination. This intelligent learning of blue coordination can design its own set of power grid data encoding and decoding algorithms for coordination. It can discover model features that are effective for coordination but difficult to find. It can use these features to improve the optimization effect. It is suitable for tasks with abundant data, computing, and storage resources and has great potential.
[0205] Example 4, the improved G attention mechanism, optimizes the calculation of attention based on the pyramid-like or tree-like partitioned and hierarchical structure of the power grid, greatly reducing the amount of computation.
[0206] Reuse simplifies the future-state model in the blue coordination method planning, reducing the number of adjustable quantities in the planning solution and significantly reducing the computational load. However, it is only applicable to reactive power adjustable quantities; its application to active power adjustable quantities requires further research or improvement. Specifically, in Example 0, coordination method 0 is reused to become coordination method 02. Coordination method 0 requires solving for adjustable quantities in frames of all future times during planning, while coordination method 02 only solves for adjustable quantities in one frame, replacing the adjustable quantities in other frames with historical data obtained from planning at other times. This distributes the computational load evenly across time periods, resulting in a significant reduction in computation. However, when there is energy storage in the power grid, active power adjustable quantities are tightly coupled at different times, while reactive power is not coupled. Therefore, the proposed patent reuses reactive power adjustable quantities, while the reuse of active power adjustable quantities requires further research or improvement.
[0207] The planning in step S1 is based on prediction. Since prediction is inaccurate, it is corrected in step S2 by taking into account the immediate or real-time situation. For the origin, evolution and relevant examples of the correction method, please refer to "A Harmonious Method for Connecting New Energy and Electric Vehicles to the Grid" (Chinese Patent CN111463822A, 2019.01.21), "A Blue Charging Method" (Chinese Patent 2023100768994, 2023.01.10), and "A Coordination Method" (Chinese Patent 2023106042789, 2023.05.18). It will not be repeated here. Sequence List Free Content
[0208] none
Claims
1. A blue coordination method, characterized in that, The steps include the following: Initialize, divide and then divide the power grid according to principles 3, 3.1, and 3.2, find the core grid and its related power grids, and divide the power grid into zones and layers or into unified zones and layers; S0: Modeling, which is the power grid model 0 obtained from the power grid data. Model 0 has the highest accuracy, including 4.
5. S1: Planning. Model 0 is expanded and discretized in time but is not used directly. Instead, the model information is encoded layer by layer from bottom to top and then decoded from top to bottom from the core network to obtain the planning indicators composed of the time series of active power indicators of each layer. The steps include the following: S11: Model 0 is expanded and discretized in time. The model corresponding to a certain moment is a frame, and multiple moments correspond to multiple frames. Arranged in chronological order, they form a frame sequence, which becomes the model time series. The predicted quantities of power grid data are imported into the model time series to form the future state model of the power grid, which has the highest accuracy. The variables in the future state model are adjustable quantities, including adjustable active power and adjustable reactive power. Since changing the adjustable quantities can affect the future state of the power grid, the objective function is established in this way. S12: Encode the future state model layer by layer from bottom to top to obtain the future state model with lower precision at each layer and the original precision. S13: The core network layer is the starting layer, and optimization from top to bottom is equivalent to decoding from top to bottom. The core network layer is the focus layer. The focus layer is decoded and optimized according to the objective function. That is, within the limited amount of computation, the adjustable quantity is numerically optimized to obtain the adjustable quantity instance value with the smallest or closest objective function value. This instance value is used as the result of optimization or decoding to obtain the active power of the device 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 of the area corresponding to the super node. The next layer becomes the focus layer. Within any region of the focus layer, the total adjustable instance value is used as a constraint to decode the focus layer. After optimization or decoding, the total active power of the focus layer and any region of the next layer is obtained. This process is repeated layer by layer from top to bottom. During optimization, the focus layer uses the highest precision model, and the layers below it use a lower precision model. Let the Nth layer be the starting layer, and let n=N. The process includes the following steps: S131: Determine if n is the top level. If yes, proceed to step S132; otherwise, proceed to step S133. S132: Layer n is the focus layer. The model at layer n has the highest accuracy, and the accuracy below layer n is lower, thus forming the future state model n. In the future state model n, existing algorithms are used to numerically optimize the instance values of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants (preferred because the power grid is an inertial system), etc., to find the solution closest to the target among the adjustable quantities within a limited amount of computation. The instance values of the active power adjustable quantities at layer n are used as the active power index of layer n. The active power adjustable quantity instance values of the supernodes in layer n that are encoded by the higher-accuracy partition model of layer n-1 are used as the total active power adjustable quantity instance values of the corresponding region in layer n-1. Jump to step 134; S133: The total active power adjustable instance value of the corresponding region of layer n obtained from layer n+1 is used as the active power constraint of that region. Layer n is the layer of interest. Layer n has the highest accuracy, and layers below n have lower accuracy, forming the future state model n. The future state model n uses existing algorithms to numerically optimize the instance value of adjustable quantities, including genetic algorithms, gradient descent direction propagation algorithms and their variants, etc., to find the solution of adjustable quantities that is closest to the target within a limited amount of computation. The active power adjustable quantity instance value of this layer is used as the active power index of this layer; the active power adjustable quantity instance value of the node in this layer that is encoded by the lower layer area is used as the total active power adjustable quantity instance value of the corresponding lower layer area. S134: n = n – 1; Check if n – 1 is 0. If it is, jump to step S135; otherwise, jump to step S131. S135: Outputs the active power indicators for each layer; S14: The time series of active power indicators at each level constitute the planning indicators; S2: Execution. First determine the active power and then the reactive power. The planning has been optimized according to the target. The instance values of the active power adjustable quantity of each adjustable device or adjustable point have been calculated in advance, which are called indicators. However, the actual situation deviates from the planning. This deviation is transmitted to each adjustable device or adjustable point to correct the instance values of its adjustable quantity. Using the corrected active power as a parameter, we input it into the current state model and perform reactive power optimization on the model, including: for any partition, the optimization objective 1 or the function of interest is the cost of the fluctuation of the total active power P in that partition, and the goal of the cost is to minimize the fluctuation of P. Within this region, the total active power P can be obtained by taking the planned indicators from the adjustable quantities. P1 is called the predicted value, and the actual active power at the current moment is P2, which is called the actual value. The difference between the actual value P2 and the predicted value P1 is taken as the deviation. The deviation is used as the loss function. Based on the current state model, numerical optimization algorithms such as gradient descent and backpropagation are used to adjust the adjustable quantities to correct the indicators, so as to minimize the deviation and obtain the instance values of each active power adjustable quantity. Then, these instance values of active power adjustable quantities are used as constants and substituted into the current state of the power grid to perform reactive power optimization and obtain the instance values of reactive power adjustable quantities.
2. The blue coordination method according to claim 1, characterized in that, Step S1 involves simplifying Model 0 using the Reuse method, including the following steps: Step 1: Initially, a small amount of reactive power is reserved; the default value of the dedicated parallel reactive power regulation equipment is substituted into the active power adjustable amount, and most of the reactive power adjustable amount in model 0 of the planning of the blue coordination method described in claim 1 becomes the active power constraint, and only the reactive power adjustable amount in one frame is retained. Step 2: Perform the blue coordination method as described in claim 1 to obtain data for one cycle; Step 3: Use historical data of the reactive power adjustable quantity instance value of the previous cycle to bring most of the reactive power adjustable quantity in the planning of the blue coordination method described in claim 1 into the constraint on the active power adjustable quantity, and retain only the reactive power adjustable quantity in one frame. Step 4: Perform the blue coordination method as described in claim 1 to obtain data for multiple periods; Step 5: Statistically analyze the reactive power adjustable quantity instance values of multiple historical contemporaneous periods, substitute the statistical characteristics into most of the reactive power adjustable quantities in step S2 of the blue coordination method described in claim 1, and turn them into constraints on the active power adjustable quantities, retaining only the reactive power adjustable quantities in one frame. Step 6: Perform the blue coordination method as described in claim 1, then proceed to step 5.
3. A blue coordination method according to claims 1 and 2, characterized in that, Step S1 describes the implementation of encoding model information layer by layer from bottom to top, and then decoding it from top to bottom from the core network. This includes an encoding-decoding structure and method, characterized by comprising a structure of multiple encoding modules connected in series and the same number of decoding modules connected in series. The number of encoding and decoding modules is consistent with the number of model layers. The model is passed as input to the encoding module of the first layer. Multiple encoding modules encode the model data layer by layer multiple times and then pass it to the decoding module of the corresponding layer for layer-by-layer decoding, thus obtaining the adjustable instance values of each layer. Each encoding module encodes the lower layer of the model by encoding the original model into a lower-precision encoding.
4. A simplified encoding structure and method, used in step S1 of the blue coordination method described in claims 1 and 2 to simultaneously encode model information layer by layer from bottom to top while solving planning indices; characterized in that, This includes removing all decode modules from the encoder-decoder structure, retaining only the encoder module, with an encoding precision of 1 or 3. Following principle 1, encoding is performed from the local to the global level, from bottom to top, and the objective function and constraints are combined for solving the problem. Active power loss optimization is not considered; only grid security and stability constraints are taken into account. Furthermore, after removing network loss optimization from the optimization objective, reactive power adjustable quantities are substituted using statistical characteristics, experience, or default values. The reactive power-related variables in the optimization objective and constraints are reduced to 0. In this way, active power optimization is completely decoupled from the grid topology. That is, the grid loss F(X) in any area is estimated using empirical values, and the active power quantities within the area are linearly related to each other and to dp, and are only subject to grid security and stability constraints. Furthermore, since optimization is performed from local to global, coordination always reduces the active power fluctuations of the local grid, thus rarely touching the security and stability constraint boundaries, further reducing the dependence on grid data. Moreover, reactive power optimization is decoupled from active power optimization, greatly reducing the amount of computation. It is easy to prove that this structure and method is the method with the highest utilization rate of adjustable quantities, which can maximize the value of adjustable devices such as energy storage. After active power optimization is completely decoupled from grid topology, reactive power optimization can be performed based on grid data or without relying on grid topology. Reactive power optimization can adopt a local mode, and reactive power balance can be achieved at the grid access point where the reactive power adjustable device is located.
5. A method for applying Transformer to coordination and an improved G-attention mechanism, used in step S1 of the blue coordination method according to claims 1 and 2 to encode model information layer by layer from bottom to top, and then decode it from top to bottom from the core network; characterized in that, This includes dividing the power grid into partitions and layers, encoding the bottom layer with precision 1, 2, or 3, and then inputting this new power grid data into a Transformer; it also includes a GTransformer, a TRM model based on the G attention mechanism; the G attention mechanism refers to the fact that point q corresponds to vector z q The set of all points is {z} q }; Sampling point k belongs to {z} q } Corresponding to z k There is an update z for sampling point k. k = G-Attn(z k ,{z} k ), {z} k It is {z q The vector set corresponding to the point set associated with the sampling point in}, G-Attn(z) k ,{z} k ) = self-Attn(z k ,{z} k ), self-Attn({points}) means that the set of points {points} within the parentheses is calculated and updated using the self-attention mechanism; the sampling point k is an important node, including important nodes determined according to the partitioning and hierarchical structure, as well as important nodes determined according to the unified partitioning and hierarchical structure.
6. A principle or criterion for grid segmentation and division applicable to grid coordination, characterized in that, This includes unified partitioning and hierarchical 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 a computer program, it implements the steps of the blue coordination method according to any one of claims 1 to 5.
8. A coordination system, characterized in that, The coordination units described in claim 7 are arranged according to the power grid division. Each coordination unit is responsible for one area. Each coordination unit is responsible for collecting and cleaning the data collected by all terminal devices in the area and the data encoded by the lower-level coordination units. Then, it encodes the data and transmits the encoded data to the upper layer through the signal channel. At the same time, it receives data from the upper layer, decodes the data, and transmits it to each terminal device in the area and the lower-level coordination units. Each coordination unit integrates both the encoding and decoding of the area it is responsible for.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the blue coordination method according to any one of claims 1 to 5.
10. A coordination method 0, characterized in that, Includes the following steps: Step 0: Modeling, obtaining the power grid attribute model based on power grid data, including network equations; Step 1: Planning. To plan for energy storage or similar devices, the model is expanded and discretized over time. A frame corresponds to a specific moment in the model, and multiple moments correspond to multiple frames. These frames are arranged in chronological order to form a discrete model time series. The predicted values of the power grid data are imported into the discrete model time series to form a discretized future state model of the power grid. The objective function is established in this way, and existing algorithms are used to numerically optimize the instance values of adjustable quantities. Within a limited computational scope, the solution closest to the objective value is found among the adjustable quantities. The active power instance values of the adjustable quantities are used as active power indicators and passed to Step 2. Step 2 selects a portion of the objective function as the focus of Step 2. When the planning indicators are substituted into the adjustable quantities, the focus values are taken as the focus values. Step 2: Execute the following steps: Import the current power grid data or the cleaned optimal data into the power grid model to obtain the current state of the power grid; or, the value of interest can be estimated based on actual measurements, and the value of interest can be used as the tracking target; the difference between the tracking target and the value of the value of interest 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 active power adjustable quantities are used as constants and substituted into the current state of the power grid to perform reactive power optimization to obtain the instance value of reactive power adjustable quantities.