Electric power system end-to-end unit combination method for driving space-time attention graph neural network through object number fusion
Through the spatial and temporal attention graph neural network driven by the fusion of matter and numbers, combined with data driving and physical mechanism, the problem of insufficient spatial and temporal feature extraction in the power system unit combination is solved, and efficient and accurate unit combination optimization is achieved, reducing system operation costs and improving the stability and adaptability of the model.
Patent Information
- Application Number
- CN202510618271.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-14
AI Technical Summary
The existing power system unit combination method has shortcomings in processing spatiotemporal feature extraction and optimization, and it is difficult to effectively handle timing and spatial constraints at the same time, resulting in high computational complexity and low resolution efficiency. The existing data-driven methods are inconsistent with feasibility and stability and uncontrollable in terms of calculation complexity.
The space-time attention graph neural network driven by the fusion of matter and numbers is adopted, combining data drive and physical mechanisms, the space-time characteristics of the power system are extracted through the space-time self-attention graph convolution neural network model, and the model training process is optimized by a two-stage learning mode and an adaptive penalty item update method to achieve efficient and accurate unit combination optimization.
Effectively handle the timing and spatial constraints in unit combination problems, realize overall optimization within the scheduling cycle, reduce system operation costs, improve the convergence speed and stability of the model, ensure that the model output meets the physical constraints and operation requirements of the power system, adapt to the randomness and volatility of new energy output, and improve online application efficiency.
Smart Images

Figure CN120449698A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system optimization and dispatching, and in particular relates to an end-to-end unit combination method for a power system driven by a spatiotemporal attention graph neural network using physical and numerical fusion. Background Art
[0002] With the development of a new type of power system that is clean, low-carbon, safe, efficient, and deeply penetrated by renewable energy, the system's power structure and system characteristics have undergone profound changes: the proportion of conventional synchronous units has continued to decline, and high-penetration new energy with prominent random fluctuation characteristics has gradually become the main power source. AC / DC hybrid has caused the complexity of the grid topology to grow exponentially. The dynamic coupling of multiple links such as source-grid-load-storage has formed a strong nonlinear interaction. The reconstruction of the power market mechanism has introduced multi-dimensional operation constraints, resulting in the time-varying and non-convex characteristics of the system operation domain boundary. New energy and load centers are distributed inversely. The utilization rate of transmission channels between the new energy-rich areas in the west and the load centers in the east is low, and the difference in temporal and spatial regulation demand is large, which has significantly aggravated the difficulty of power balance and increased the difficulty of safe and economical operation of the power system.
[0003] Unit commitment is an effective strategy for achieving short-term economical operation of power systems. Its core objective is to minimize system-wide operating costs while satisfying both system operational constraints and unit constraints by rationally scheduling the start-up and shutdown of thermal power units and their output power within each dispatch cycle. Traditional power system unit commitment (UC) methods primarily rely on physical models and optimization algorithms. Traditional heuristic algorithms or recursive branch-and-bound methods, for example, suffer from high computational complexity and low solution efficiency when solving unit commitment problems.
[0004] Consequently, a large number of researchers have turned to data-driven deep learning methods. Current data-driven UC solution methods can be broadly categorized into three main types: imitation learning methods, which accelerate the solution process by learning from historical experience or rules; substructure enhancement of traditional methods, which improves solution efficiency by optimizing specific parts of traditional algorithms; and condition-solution space mapping learning, which leverages machine learning techniques to establish a mapping between input conditions and output solutions, thereby rapidly predicting the optimal solution. However, incorrect predictions can lead to no improvement in branch-and-bound search and can cause timeouts, making it difficult to achieve a good duality gap and feasibility. These first two types of methods have limitations in UC, limiting their application. The third type of method has garnered widespread attention in power systems due to its ability to rapidly approach feasible, near-optimal solutions. Supervised learning (SL) and reinforcement learning (RL) are the mainstream algorithms in this category. While SL and RL demonstrate potential for improving solution efficiency, their core limitations lie in the conflict between feasibility and stability and uncontrollable computational complexity. SL needs to rely on the MIP solver to generate massive high-quality labeled samples, while RL needs to explore feasible strategies in the discrete state-action space through a trial-and-error mechanism. Both require the introduction of post-processing correction mechanisms or regularization constraints to maintain the physical feasibility of the solution space, resulting in non-stationary Markov properties in the training process, causing the risk of gradient vanishing and policy oscillation; the reinforcement learning policy network is highly sensitive to hyperparameters such as the exploration factor and discount rate, and the problem of dimensional explosion in the policy space causes its exploration efficiency to drop sharply in the scenario of unit start-stop sequence coupling.
[0005] In addition, the power system unit commitment problem is essentially a spatiotemporal optimization problem, and existing methods have shortcomings in spatiotemporal feature extraction and optimization, making it difficult to effectively handle both temporal and spatial constraints at the same time.
[0006] In order to solve the above problems, it is urgent to propose an end-to-end unit combination method for power systems driven by physical-numerical fusion and spatiotemporal attention graph neural network. Summary of the Invention
[0007] To solve the above technical problems, the present invention proposes an end-to-end unit combination method for power systems driven by a spatiotemporal attention graph neural network driven by physical and numerical fusion. This method combines the advantages of data-driven and physical mechanisms, extracts the spatiotemporal characteristics of the power system through a spatiotemporal self-attention graph convolutional neural network model, and adopts a two-stage learning model and an adaptive penalty term update method to optimize the model training process, thereby achieving efficient and accurate unit combination optimization to solve the problems existing in the above-mentioned existing technologies.
[0008] To achieve the above objectives, the present invention provides an end-to-end unit combination method for a power system driven by a spatiotemporal attention graph neural network using physical-digital fusion, comprising the following steps:
[0009] Acquiring operation data of the power system, wherein the operation data includes load data and new energy forecast values;
[0010] Constructing a spatiotemporal self-attention graph convolutional neural network, and constructing a unit combination model based on the spatiotemporal self-attention graph convolutional neural network, wherein the spatiotemporal self-attention graph convolutional neural network includes three layers of self-attention temporal convolutional layers and three layers of spatial convolutional layers based on a graph convolutional network;
[0011] The power system operation data is input into the unit commitment model for a two-stage model training. The first stage completes the physical constraints and empirical risk minimization of the unit commitment model weight matrix based on the physical mechanism, local relaxation of integer variables and supervised pre-training fusion strategy, guiding the initialization of model parameters. The second stage uses target guidance, physical mechanism constraints and local relaxation of integer variables to achieve secondary adjustment of model parameters.
[0012] An adaptive penalty term update algorithm is introduced to balance the physical constraint weights to complete the convergence of the unit commitment model and obtain the trained unit commitment model;
[0013] The unit commitment decision of the power system is realized based on the trained unit commitment model.
[0014] Optionally, the self-attention temporal convolution layer adopts a multi-head attention mechanism, and transforms the input data into a query matrix, a key matrix and a value matrix through multiple sets of linear transformation matrices; each set of transformed query matrix, key matrix and value matrix is input into the self-attention mechanism for calculation; the output results of the self-attention mechanism are spliced together based on the Concat function to obtain a spliced feature matrix; the spliced feature matrix is integrated and converted through a fully connected layer to finally obtain the global correlation output feature of the node.
[0015] Optionally, the expression of the spatial convolution layer based on the graph convolutional network is as follows:
[0016]
[0017] Where, yes The degree matrix of is the weight parameter matrix connecting layer (l) and (l+1).
[0018] Optionally, before inputting the power system operation data into the unit commitment model for the second-stage model training, the following steps are further included:
[0019] Taking the power system node as the unit, the load values and new energy forecast values of several time periods constitute the node's time series vector, and then the node's time series vector constitutes the input feature; the input features and their position codes are added together to obtain the input of the spatiotemporal self-attention graph convolutional neural network.
[0020] Optionally, the process of implementing secondary adjustment of model parameters by using target guidance, physical mechanism constraints, and local relaxation of integer variables in the second stage includes:
[0021] Relaxation constraints are introduced to relax the binary variables of the generator switching states of the power system so that the relaxed binary variables match the generator output; constraints are added between the calculated generator output and the generator output input to the model, and the generator output is calculated through the AC power flow model to ensure that the model learns the power flow mechanism of the power system; unit start and stop time constraints are introduced to convert the relaxed start and stop variables output by the model into integer variables, determine the generator start and stop states, and then make secondary adjustments to the model parameters.
[0022] Optionally, the loss function calculation formula of the relaxed constraint is:
[0023]
[0024] in, is the relaxed start-stop state variable, P G,i,t Power the generator.
[0025] Optionally, an adaptive penalty term update algorithm is introduced to optimize the model training process. The process of obtaining the trained unit commitment model includes:
[0026] In response to various constraints in model training, an adaptive penalty term update algorithm is introduced. The adaptive penalty term update algorithm assigns a unique penalty parameter to each constraint and adaptively updates the corresponding penalty parameter according to the characteristics of the constraint.
[0027] Optionally, the expression of the adaptive penalty term update algorithm is as follows:
[0028]
[0029]
[0030] Where, is the penalty parameter for the kth iteration of the i-th category, is the Lagrange multiplier of the kth iteration of the i-th type, f i (θ (k) ) is the function of the k-th iteration of the i-th class, α is a smoothing constant, γ is the global learning rate, and ∈ is a constant.
[0031] The present invention also provides a power system unit combination system based on a data-physics hybrid driven spatiotemporal attention graph neural network, which is used to implement the method described, comprising: a data acquisition module, a model construction module, a first model training module, a second model training module and a unit combination module;
[0032] The data acquisition module is used to acquire the operation data of the power system, and the operation data includes load data and new energy prediction values;
[0033] The model construction module is used to construct a spatiotemporal self-attention graph convolutional neural network, and to construct a unit combination model based on the spatiotemporal self-attention graph convolutional neural network. The spatiotemporal self-attention graph convolutional neural network includes three layers of self-attention temporal convolutional layers and three layers of spatial convolutional layers based on graph convolutional networks;
[0034] The first model training module is used to input the operating data of the power system into the unit commitment model for two-stage model training. The first stage completes the physical constraints and empirical risk minimization of the unit commitment model weight matrix based on the physical mechanism, local relaxation of integer variables and supervised pre-training fusion strategy, and guides the initialization of model parameters; the second stage uses target guidance, physical mechanism constraints and local relaxation of integer variables to achieve secondary adjustment of model parameters;
[0035] The second model training module is used to introduce an adaptive penalty term update algorithm to balance the physical constraint weights to complete the convergence of the unit commitment model and obtain a trained unit commitment model;
[0036] The unit combination module is used to implement unit combination decision-making of the power system based on the trained unit combination model.
[0037] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0038] Compared with the prior art, the present invention has the following advantages and technical effects:
[0039] Efficient optimization capability: Through the spatiotemporal self-attention graph convolutional neural network (STSAGCN) model, it can simultaneously extract the spatiotemporal characteristics of the power system, effectively handle the timing and spatial constraints in the unit combination problem, achieve overall optimization within the scheduling cycle, and reduce system operating costs.
[0040] Enhanced convergence performance: The introduction of the Adaptive Penalty Update (APU) method assigns adaptive penalty parameters to different constraints, optimizes the model training process, and significantly improves the model's convergence speed and stability, enabling it to quickly and accurately find the optimal solution.
[0041] Smoothed search space: Relaxing the binary variables of the generator switching state smoothes the originally discrete search space, avoiding the problem of ineffective gradient propagation caused by discrete variables, and improving the model's generalization ability and optimization efficiency.
[0042] Accurately meet physical constraints: By introducing slack constraints, generator output constraints, and unit start and stop time constraints during model training, we ensure that the model output meets the physical constraints and operational requirements of the power system, thereby improving the practicality and reliability of the model.
[0043] Effective adaptation to new energy scenarios: During the model training process, through small sample learning and physical mechanism guidance, the model can adapt to the randomness and volatility of new energy output, providing an effective optimization tool for power system operation under high new energy penetration.
[0044] Improved online application efficiency: The trained unit combination model has high online application efficiency and can provide accurate decision support for the real-time scheduling of the power system in a short period of time, thereby improving the operating efficiency and economy of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0046] Figure 1 Schematic diagram of the structure of the spatiotemporal attention graph convolutional neural network (STSAGCNN) according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of a unit combination model of a physical-data hybrid driven spatiotemporal attention graph neural network according to an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the average value of the generator output constraint violation amount according to an embodiment of the present invention;
[0049] Figure 4 Schematic diagram of the average value of node power balance constraint violation amount according to an embodiment of the present invention;
[0050] Figure 5 Schematic diagram of random convergence analysis in Example 2 of an embodiment of the present invention, wherein (a) is a schematic diagram of summer scenario analysis, and (b) is a schematic diagram of winter scenario analysis;
[0051] Figure 6 This is a schematic diagram of computing cost analysis for 300 scenarios in Example 1 of an embodiment of the present invention. DETAILED DESCRIPTION
[0052] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0053] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0054] Example 1
[0055] This embodiment provides a method for end-to-end unit combination of a power system using a physical-data fusion driven spatiotemporal attention graph neural network, including the following steps:
[0056] Acquiring operation data of the power system, wherein the operation data includes load data and new energy forecast values;
[0057] A spatiotemporal self-attention graph convolutional neural network is constructed, and a unit combination model is constructed based on the spatiotemporal self-attention graph convolutional neural network. The spatiotemporal self-attention graph convolutional neural network includes three layers of self-attention temporal convolutional layers and three layers of spatial convolutional layers based on a graph convolutional network. The self-attention mechanism extracts temporal features and completes overall temporal optimization. The graph convolutional neural network realizes spatial feature extraction, which enables the model to meet physical constraints on a single time section.
[0058] The power system operation data is input into the unit commitment model for a two-stage model training. The first stage completes the physical constraints and empirical risk minimization of the unit commitment model weight matrix based on the physical mechanism, local relaxation of integer variables and supervised pre-training fusion strategy, guiding the initialization of model parameters. The second stage uses target guidance, physical mechanism constraints and local relaxation of integer variables to achieve secondary adjustment of model parameters.
[0059] An adaptive penalty term update algorithm is introduced to balance the physical constraint weights to complete the convergence of the unit commitment model and obtain the trained unit commitment model;
[0060] The unit commitment decision of the power system is realized based on the trained unit commitment model.
[0061] This embodiment constructs a unit commitment model based on a data-physics hybrid-driven spatio-temporal self-attention graph convolutional network (DPHD-STSAGCN). Small sample learning guides the model's optimization direction, physical mechanisms drive the graph neural network to fit power flow constraints, and the self-attention mechanism extracts temporal correlations to achieve overall optimization within the scheduling cycle. The main process includes:
[0062] (1) A spatiotemporal self-attention graph convolutional neural network (STSAGCN) model was designed, and a unit combination model based on a data-physics hybrid-driven spatiotemporal graph attention neural network was proposed. The attention model extracts temporal features and completes temporal optimization; the graph neural network realizes spatial feature extraction, which enables the model to meet the physical constraints on a single time section.
[0063] (2) A two-stage learning model is proposed. In the first stage, the graph learning model parameters are initialized through direct estimation and small sample learning. In the second stage, the model parameters are adjusted twice: the search space is smoothed by relaxing the unit state variables, and the constraints between the generator output and the integer relaxation variables are added so that the output satisfies the generator output constraint. The model is forced to learn the physical mechanism through constraints such as AC power flow.
[0064] (3) Adaptive PenaltyUpdates (APU) is introduced to improve the convergence performance of the model.
[0065] The feasible mathematical model of unit combination is as follows:
[0066] Unit combination is an effective strategy to achieve short-term economic operation of the power system. Its core lies in minimizing the operating cost of the entire system by reasonably arranging the start and stop of thermal power units and the output power size in each dispatch cycle, while meeting the system operation constraints and the unit's own constraints. G Thermal power units, N R The mathematical model of the power system of a new energy station and the unit combination can be described as:
[0067]
[0068] Where T represents the length of the scheduling period, Ω G represents the set of thermal power units, Ω represents the set of all nodes; P G,i,t 、S i,t They represent the output and start / stop status of thermal power unit i at time t, P R,F,i,t 、PR,i,t are the predicted output and actual output of the new energy station i at time t, P G,i,t 、S i,t 、P R,i,t , δ i,t are all decision variables of the optimization problem; f i (P G,i,t )=a i (P G,i,t ) 2 +b i P G,i,t +c i is the cost of thermal power generation, a i 、b i and c i are the secondary, primary and constant cost coefficients of the i-th unit; is the startup cost of unit i, K i 、B i , τ i are the starting coefficients of unit i, Z i,t-1 is the continuous downtime of unit i before time period t; the objective function F is to minimize the sum of the total cost of the unit's active output and the abandonment of new energy. Formula (1-2) represents the node active power balance, P i,t is the net injected active power of node i at time t. For the DC power flow model P i,t =∑ j∈i B i,j (δ i,t -δ j,t ), for AC power flow model P i,t =V i,t ∑ j∈i V j,t (G ij cosδ ij,t +B ij sinδ ij,t ), P D,i,t represents the load on node i during period t. i,j represents the conductance of branch ij, δ i,t Represents the voltage phase angle of node i at time t. Formula (1-3) is the backup constraint of the power grid, r G,u,i,t is the positive reserve of unit i in period t, obtained by formula (1-4), R u,t is the system positive standby demand during period t, r G,u,i,t is the negative reserve of unit i in period t, obtained by formula (1-5). G,i,max 、P G,i,min are the upper and lower limits of generator output, r G,u,i 、r G,d,iis the up and down slope rate of the generator at node i. Equation (1-6) is the branch active power flow transmission capacity constraint, P ij,t Indicates the active power of the branch. For the DC power flow model P ij,t =B i,t (δ i,t -δ j,t ), for AC power flow models represents the maximum active capacity of branch ij. Equation (1-7) is the upper and lower limits of the active output of the generator. Equation (1-8) is the constraint on the output of new energy. Equation (1-9) is the constraint on the ramp rate of the generator. Equations (1-10) and (1-11) are the constraints on the start and stop time of the generator. on,i,t-1 Indicates the continuous power-on time of group i in time period t-1, X off,i,t-1 Indicates the duration of shutdown of group i during the t-1 period, T on,i is the shortest startup time of unit i, T off,i is the shortest shutdown time of unit i.
[0069] The feasible two-stage learning process of data-physics hybrid driven spatiotemporal graph attention neural network is as follows:
[0070] The unit combination problem needs to meet constraints such as tidal current and generator output in the spatial section (in the airspace), and meet the start-stop time constraints in the time series (in the time domain), as well as the goals of optimal cost and minimum abandonment of new energy in the entire time series. Therefore, the key to the problem lies in how to effectively extract the spatiotemporal features and feature transformations of the data to achieve spatiotemporal physical constraints. The self-attention (SA) mechanism realizes the understanding of the sequence by calculating the relationship between the elements in the sequence. It can mine the relationship between any two data in the time series data and achieve global optimization within the scheduling cycle. In order to integrate and effectively utilize spatial and temporal features, this embodiment first designs a spatiotemporal self-attention graph convolutional neural network (STSAGCNN), and on this basis proposes a two-stage unit combination model of physical-data hybrid driven spatiotemporal attention graph neural network.
[0071] Construction of an implementable spatiotemporal attention graph neural network model:
[0072] The spatiotemporal self-attention graph convolutional neural network (STSAGCNN) model is as follows Figure 1As shown in the figure, it consists of three layers of self-attention-based temporal convolutional layers and three layers of GCN-based spatial convolutional layers. Unlike other time series problems, the unit commitment of power systems must satisfy both spatial physical constraints and temporal physical constraints within the dispatch cycle within each time period. Therefore, spatial information propagation is achieved through the stacking of continuous spatial graph convolutions, while temporal feature extraction is achieved through the stacking of continuous self-attention layers, rather than alternating spatial graph convolutions and temporal convolutions, as in STGCN.
[0073] The self-attention mechanism is a mechanism for processing sequential data, most notably in the Transformer model. It is a variant of the attention mechanism that reduces reliance on external information, more effectively captures internal relationships between data or features, and simultaneously considers all elements in the sequence. This mechanism calculates the similarity between each element and its neighbors to obtain a weight. It then sums all elements according to their weights to form a final weighted representation vector, which expresses the correlation between the input at the current position and the input at other positions. Its core concept is to capture correlations between vectors.
[0074] The self-attention temporal convolution layer of this embodiment adopts a multi-head attention mechanism through multiple sets of linear transformation matrices Will Transform into different Then each set of features is calculated and output through the Self-Attention mechanism Then the output of each group After splicing, we get z (l-1) ; Finally, the global correlation output feature of the node is obtained through the linear transformation of the fully connected layer The expression is:
[0075]
[0076] Where, T is the length of the time series. In the day-ahead unit commitment model, T = 24, d l-1 represents the characteristic dimension of the data, is the number of attention heads. is the parameter matrix that needs to be learned. The expression of the temporal self-attention mechanism for extracting the correlation between node features in different time periods is:
[0077]
[0078] The output of the multi-head self-attention model is:
[0079]
[0080] Where C on The Concat function completes the splicing of attention feature matrices between different time periods in different subspaces; is the weight of the fully connected network.
[0081] The expression for spatial graph convolution is:
[0082]
[0083] Where, yes The degree matrix of . is the weight parameter matrix connecting layer (l) and (l+1).
[0084] The construction of a feasible unit group combination model based on a physical-data hybrid driven spatiotemporal attention graph neural network:
[0085] The overall framework of the physics-data hybrid driven spatiotemporal attention graph neural network unit commitment model (STSAGCNNN) is as follows: Figure 2 shown.
[0086] (1) Input data construction:
[0087] Solving the unit commitment (UC) problem involves determining the optimal generator output and switching states within the dispatch cycle based on load, renewable energy forecasts, and traditional thermal power unit parameters. Therefore, the model takes as input the characteristic data x consisting of load and renewable energy forecasts and the adjacency matrix A. The characteristic data reflects the temporal and spatial characteristics of the data, while the adjacency matrix A is used to aggregate spatial features.
[0088] Taking the power system node as the unit, the node time series vector x is composed of the load and new energy forecast values of T time periods i =[x i,1 ,x i,2 ,…,x i,T ], and then the input feature x is formed by the time series vector of the node.
[0089]
[0090] Where x n,t is the feature vector of node n in time period t, n = 1, 2, N, t = 1, 2, T, N is the number of nodes, and T is the total number of time periods in a scheduling cycle. The input feature x and its position encoding are added to obtain the input H of the spatiotemporal self-attention graph convolutional neural network (STSAGCNN) (0) .
[0091] The parameterized expression between the output (generator output and node voltage phase angle) and input of the unit commitment model of the physical-data hybrid driven spatiotemporal attention graph neural network is:
[0092]
[0093] Where x is the tensor distributed on the graph nodes. O is the output of the STGCNN model, [P G ,P R ,s O ,V,δ]={[P G,i,t ,P R,i,t ,s O,i,t ,V i,t ,δ i,t ]|i∈Ω,t∈T}; In order to align the node features, for nodes without generators, s i,t It is only used as output and does not participate in the loss function calculation. It is a simplified representation of the nonlinear mapping between a given input (x, A) and a desired output O, which is φ θ Functional with respect to the model parameter vector θ.
[0094] (2) Output structure and relaxation processing:
[0095] The model generator output state is a discrete non-continuous variable, which may cause discontinuous jumps in the model decision boundary and affect the generalization ability of the model. In order to improve the convergence performance of the model, this embodiment relaxes the binary variables of the generator switch state and smoothes the search space through relaxation. Adding corresponding constraints after relaxation makes the relaxed binary variables closer to the feasible solution; at the same time, in order to ensure that the relaxed binary variables match the generator output, this embodiment defines a relaxation constraint that matches the generator output, denoted as f s :
[0096]
[0097] Since the relaxed constraints are used in the second stage of learning, the parameters are initialized before use. When the generator is turned on, the output is greater than the minimum output, and when it is turned off, the output is near 0. The constraints here are only to ensure that the generator start and stop states match the output, and the generator output range is constrained (1-7).
[0098] In order to encourage the model to learn the power flow mechanism, the node injected power is calculated according to the node voltage and then the generator output is calculated, and constraints are added between the calculated generator output and the model input generator output.
[0099]
[0100] Where, Pi,t The AC power flow model is used for calculation.
[0101] The unit start / stop time constraints need to be obtained based on the trained start / stop variables, so the relaxed start / stop variables output by the model need to be converted into integer variables. After obtaining the relaxed generator start / stop state output by the network, the generator start / stop state is determined according to Equation (1-22).
[0102] s=[…,round(s O,i,t ),…] (1-22)
[0103] After obtaining the discretized generator state, the model is reparameterized as follows:
[0104]
[0105] (3) Optimization problem description:
[0106] Since the two-stage learning mechanisms are different, for ease of explanation, the optimization models for the two stages are given separately. In the first stage, the model parameters are initialized through direct estimation, small sample learning and physical mechanism. The equivalent optimization model is:
[0107]
[0108] Where x Y represents the input corresponding to the label sample Y; P, S, l, R, T represent the type of physical constraint, f P Obtained from node power balance (1-2), generator output constraint (1-7), renewable energy output constraint (1-8) and unit ramp rate constraint (1-9); f l Obtained from branch flow constraints (1-6); f R Obtained from the backup constraint (5-3); f T Obtained from the generator start-stop time constraints (1-10) and (1-11). ;f Y It includes 5 types of label constraints, corresponding to the generator output P G , New Energy Output P R , generator start / stop state s, node voltage amplitude V, and node voltage phase angle δ. Label sample constraints serve as hard constraints, guiding the model training direction through samples to ensure that the model output is consistent with the samples; physical constraints serve as soft constraints, enabling the model to learn physical mechanisms while fitting the input-output relationship. The second stage fine-tunes the model based on physical mechanisms. The equivalent optimization model is:
[0109]
[0110] Where, f s According to the relaxed constraints (1-20), ρ sis the weight coefficient of the relaxed constraint.
[0111] The feasible model training process includes:
[0112] Because the model is guided by physical mechanisms and the constraints of the unit commitment problem are complex, model training is difficult. In order to achieve efficient calculations, the Adaptive Penalty Updates (APU) optimization algorithm is introduced to further improve model convergence. APU is an improvement to ALM. It assigns a unique penalty parameter to each constraint and adaptively updates it according to the characteristics of the constraint, so that different constraints can have different penalty strengths based on their impact on the optimization process. The expression for APU implementation is:
[0113]
[0114] Where, is the penalty parameter for the kth iteration of the i-th category, is the Lagrange multiplier of the kth iteration of the i-th type, f i (θ (k) ) is the function of the kth iteration of the i-th category, α is a smoothing constant, γ is the global learning rate, and ∈ is a constant. To improve the convergence performance and robustness of the model, the weights of each loss are adaptively adjusted through the improved extended Lagrangian method APU.
[0115] Further, the first stage of training:
[0116] According to the optimization model (1-24), the loss function of the first stage training based on APU is:
[0117]
[0118] Where, i∈{P G ,P R ,s,V,δ} is the number of the constraint class, and r represents the number of each constraint in the i-th class constraint. The first stage training of the DPHD-STSAGCNN model is carried out according to formula (1-29); the dual variables and model parameters θ are updated alternately. Given θ, λ and ρ at the k-th iteration, the model k+1 update is shown in formula (1-31). First, update θ by minimizing formula (1-30) and obtain (ψ θ (x,A)) (k+1) ; Then fix θ and update the dual variables through equations (1-26)-(1-28).
[0119]
[0120] The update of θ is achieved by the gradient descent method shown in formula (1-31).
[0121]
[0122] The generated on / off state s shown in formula (1-22) is obtained by convolutional layer output of spatial graph The gradient of the unit state variable obtained by discrete quantization Unable to back propagate. To solve the problem that the gradient cannot be effectively transferred due to discretization, it is still solved by direct estimation. The expression of the direct estimation of the round() function is:
[0123]
[0124] Table 1 shows the first stage training process of the DPHD-STSAGCNN model:
[0125] Table 1
[0126]
[0127] Further, the second stage training process:
[0128] According to the optimization model (1-25), the loss function of the second stage training based on APU is:
[0129]
[0130] Where i∈{P,R,l,G,T} is the number of the constraint class, and r represents the number of each constraint in the i-th constraint class.
[0131] The second stage of DPHD-STSAGCNN model training is performed according to formula (1-33); the dual variables and model parameters θ are updated alternately. Given θ, λ, and ρ at the kth iteration, the model k+1th update is shown in formula (1-35). First, θ is updated by minimizing (1-34) and obtaining (ψ θ (x,A)) (k+1) ; Then fix θ and update the dual variables through equations (1-26)-(1-28).
[0132]
[0133] The update of θ is achieved by the gradient descent method shown in formula (1-35).
[0134]
[0135] In the formula, the gradient of the unit state variable is Still achieved through pass-through estimation.
[0136] The training process is shown in Table 2:
[0137] Table 2
[0138]
[0139] Implementation, case analysis:
[0140] Case settings:
[0141] The case analysis is performed on two IEEE systems with the following specific settings:
[0142] Example 1: A modified IEEE 30-node system is used. Node 2 is replaced with a hydropower unit with rated power. Historical data covering 24 hours per day for a year is added to nodes 6 and 12, with wind farms of 60 MW and 70 MW rated power, respectively. Historical data covering 55 MW, 65 MW, and 65 MW rated power is added to nodes 10, 15, and 27, respectively. The renewable energy penetration rate is 39.2%. To accurately reflect the dynamic characteristics of the load and account for load volatility and randomness, the active loads at nodes 2, 5, 7, and 8 are replaced with historical data covering 24 hours per day for a year with the same rated active load. To obtain sufficient sample data, the minimum start / stop time for all units is set to 2. The generators at nodes 1 and 13 are initially running for one period, and the generators at nodes 5, 8, and 11 are initially running for two periods.
[0143] Example 2: For a modified IEEE 118-node system, the generator outputs at nodes 10, 25, 26, 46, 49, and 54 were replaced with historical data from renewable energy units with rated powers of 560MW, 328MW, 185MW, 118MW, 304MW, and 148MW, respectively, for 24 hours per day over a year. The active loads at nodes 1, 3, 4, 11, 15, 18, 19, 32, 59, 70, and 116 were replaced with historical data from a load equal to their maximum load for 24 hours per day over a year. To obtain sufficient sample data, the minimum start / stop time for each unit was set to 2. Generators at nodes 1, 3, 4, 11, and 15 were initially running for one period, while generators at nodes 18, 19, 32, 59, 70, and 116 were initially running for two periods.
[0144] In order to verify the effectiveness of the proposed model, four methods were used to compare with the two methods proposed in this example:
[0145] M0: The traditional branch-and-bound method based on physical mechanisms solved by Gurobi optimizer is used as the benchmark algorithm;
[0146] M1: To prove the validity of the physical mechanism, a label-based supervised learning method is adopted. The neural network model adopts a spatiotemporal attention graph neural network, and the solution of M0 is used as a label sample;
[0147] M2: Due to the dynamics, complexity, and nonlinearity of the UC problem, in order to prove that model training based solely on physics is difficult to converge, a self-supervised learning model based on physical mechanisms to guide spatiotemporal attention graph neural networks is adopted;
[0148] M3: In order to illustrate the effect of the unit commitment model based on the data-physics hybrid driven spatiotemporal attention graph neural network on timing optimization, the timing feature extraction model in the unit commitment model based on the data-physics hybrid driven spatiotemporal attention graph neural network is replaced with LSTM.
[0149] M4: Reinforcement learning-based method. Reinforcement learning is currently the mainstream optimization scheduling method based on deep learning. To illustrate the effectiveness of the method in this embodiment, the reinforcement learning method is used as a comparison;
[0150] M5: The proposed unit commitment model based on small sample data-physics-guided spatiotemporal graph convolutional network, in which temporal feature extraction and spatial feature extraction are performed alternately, and the temporal feature extraction model is LSTM;
[0151] M6: Proposed unit commitment model based on data-physics hybrid driven spatiotemporal attention graph neural network.
[0152] Experimental results:
[0153] Convergence analysis:
[0154] To illustrate the convergence of the model and its ability to satisfy physical constraints, Figure 3 and Figure 4 The average value of the generator output constraint violation and the average value of the node power balance constraint violation for the last 3000 iterations of model training are given. The horizontal axis is the number of training iterations, and the vertical axis is the average violation factor (AVF), calculated using Equation (1-36).
[0155]
[0156] Where S is the number of training data sets (not called the number of samples in order to distinguish it from the number of label samples), T is the number of time periods in a scheduling cycle, and N y The number of physical constraints, ε is a number close to 0.
[0157] from Figure 3 and Figure 4As can be seen, M1 relies on labels to guide model training and has the largest number of physical constraints. Due to the lack of label guidance, M2 is more likely to fall into local optima, resulting in relatively large defaults. M3 uses LSTM to extract temporal features only from the current and previous time periods, resulting in low fitting accuracy. M4 relies on discrete space search. Since solving the UC problem is NP-hard, reinforcement learning struggles to find the optimal or near-optimal solution, resulting in poor fitting of node power balance constraints. Since reinforcement learning forces generator output to remain within the permitted range, the power generation constraint defaults are minimized. Compared to the other models, M5 and M6 better fit the physical mechanism because they utilize label guidance and incorporate physical knowledge. However, since the M5 method alternates between temporal and spatial feature extraction, it struggles to simultaneously satisfy both temporal and spatial constraints. Therefore, the physical mechanism constraint is less effective than that of M6.
[0158] In order to illustrate the random convergence of the method, a comparison is made on Example 2. The load scenarios of a certain day in winter and summer are selected respectively. The wind farm and photovoltaic output data are modified according to the wind power and photovoltaic output models. A total of 1200 sets of data are obtained for testing. The cost is calculated as follows: Figure 5 As shown in the figure, M0 represents the calculation result of 1200 sets of data, and M6 represents the result of sequentially calling the aforementioned 1200 sets of data in the final 1200 training runs using the method of this embodiment. It can be seen that as model training completes, the cost of the M6 method approaches that of the M0 method, eventually stabilizing near the calculation result of the M0 method, demonstrating that the method of this embodiment can also effectively converge for new energy random scenarios.
[0159] Feasibility analysis:
[0160] To illustrate the performance of the method, the computational cost of several methods and the computational cost of M0 in 300 scenarios in Example 1 are shown as follows: Figure 6 As shown in the figure, RMSE is the root mean square error. As can be seen from the figure, compared with several other methods, the distribution of computational costs for method M6 in this embodiment is most similar to the cost distribution of reference method M0. The root mean square error of M6 is 2.61, while the root mean square error of traditional reinforcement learning method M4 is 3.61. Compared with traditional reinforcement learning, the method in this embodiment has more advantages.
[0161] summary:
[0162] This example first proposes a data-physics driven end-to-end unit combination model based on the STGCN network to achieve approximate optimization of unit combination. However, due to the discrete search space, model optimization is difficult. To address this problem, the model is improved and a group combination model based on a data-physics hybrid driven spatiotemporal graph attention neural network is proposed:
[0163] (1) The designed spatiotemporal self-attention graph convolutional neural network model uses graph convolutional network (GCN) and self-attention mechanism to extract spatiotemporal features from data, so that the decision of UC problem not only meets the spatiotemporal physical constraints but also can optimize the cost efficiently.
[0164] (2) Instead of directly outputting the unit state variables, integer variables representing their states are obtained based on the output of traditional power generation, which makes the search space of the UC problem smooth and improves the model convergence performance.
[0165] (3) An improved augmented Lagrangian method (APU) learning strategy is introduced to adaptively adjust the weights of various losses in model training, further improving the model convergence performance. Experiments on an improved IEEE 30-bus system and an IEEE 118-bus system show that the proposed method outperforms traditional model-based methods and three existing data-driven models. The model has high online application efficiency and can provide a new tool for unit commitment problems.
[0166] Example 2
[0167] This embodiment also provides a power system unit combination system based on a data-physics hybrid driven spatiotemporal attention graph neural network, for implementing the method described, comprising: a data acquisition module, a model construction module, a first model training module, a second model training module, and a unit combination module;
[0168] The data acquisition module is used to acquire the operation data of the power system, and the operation data includes load data and new energy prediction values;
[0169] The model construction module is used to construct a spatiotemporal self-attention graph convolutional neural network, and to construct a unit combination model based on the spatiotemporal self-attention graph convolutional neural network. The spatiotemporal self-attention graph convolutional neural network includes three layers of self-attention temporal convolutional layers and three layers of spatial convolutional layers based on graph convolutional networks;
[0170] The first model training module is used to input the operating data of the power system into the unit commitment model for two-stage model training. The first stage completes the physical constraints and empirical risk minimization of the unit commitment model weight matrix based on the physical mechanism, local relaxation of integer variables and supervised pre-training fusion strategy, and guides the initialization of model parameters; the second stage uses target guidance, physical mechanism constraints and local relaxation of integer variables to achieve secondary adjustment of model parameters;
[0171] The second model training module is used to introduce an adaptive penalty term update algorithm to balance the physical constraint weights to complete the convergence of the unit commitment model and obtain a trained unit commitment model;
[0172] The unit combination module is used to implement unit combination decision-making of the power system based on the trained unit combination model.
[0173] Example 3
[0174] This embodiment further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0175] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for end-to-end unit combination of power system driven by spatiotemporal attention graph neural network driven by physical-mathematical fusion, characterized by: The following steps are involved: Acquiring operation data of the power system, wherein the operation data includes load data and new energy forecast values; Constructing a spatiotemporal self-attention graph convolutional neural network, and constructing a unit combination model based on the spatiotemporal self-attention graph convolutional neural network, wherein the spatiotemporal self-attention graph convolutional neural network includes three layers of self-attention temporal convolutional layers and three layers of spatial convolutional layers based on a graph convolutional network; The power system operation data is input into the unit commitment model for a two-stage model training. The first stage completes the physical constraints and empirical risk minimization of the unit commitment model weight matrix based on the physical mechanism, local relaxation of integer variables and supervised pre-training fusion strategy, guiding the initialization of model parameters. The second stage uses target guidance, physical mechanism constraints and local relaxation of integer variables to achieve secondary adjustment of model parameters. An adaptive penalty term update algorithm is introduced to balance the physical constraint weights to complete the convergence of the unit commitment model and obtain the trained unit commitment model; The unit commitment decision of the power system is realized based on the trained unit commitment model.
2. The method according to claim 1, characterized in that The self-attention temporal convolutional layer adopts a multi-head attention mechanism, and transforms the input data into a query matrix, a key matrix and a value matrix through multiple sets of linear transformation matrices; each set of transformed query matrix, key matrix and value matrix is input into the self-attention mechanism for calculation; the output results of the self-attention mechanism are spliced together based on the Concat function to obtain a spliced feature matrix; the spliced feature matrix is integrated and converted through a fully connected layer to finally obtain the global correlation output feature of the node.
3. The method according to claim 1, characterized in that The expression of the spatial convolution layer based on the graph convolutional network is as follows: Where, yes The degree matrix of is the weight parameter matrix connecting layer (l) and (l+1).
4. The method according to claim 2, characterized in that Before inputting the power system operation data into the unit commitment model for the second-stage model training, the following steps are also included: Taking the power system node as the unit, the load values and new energy forecast values of several time periods constitute the node's time series vector, and then the node's time series vector constitutes the input feature; the input features and their position codes are added together to obtain the input of the spatiotemporal self-attention graph convolutional neural network.
5. The method according to claim 1, wherein The second stage uses target guidance, physical mechanism constraints, and integer variable local relaxation to achieve secondary adjustment of model parameters. The process includes: Relaxation constraints are introduced to relax the binary variables of the generator switching states of the power system so that the relaxed binary variables match the generator output; constraints are added between the calculated generator output and the generator output input to the model, and the generator output is calculated through the AC power flow model to ensure that the model learns the power flow mechanism of the power system; unit start and stop time constraints are introduced to convert the relaxed start and stop variables output by the model into integer variables, determine the generator start and stop states, and then make secondary adjustments to the model parameters.
6. The method according to claim 5, characterized in that The loss function calculation formula of the relaxation constraint is: in, is the relaxed start-stop state variable, P G,i,t Power the generator.
7. The method according to claim 1, characterized in that The adaptive penalty term update algorithm is introduced to optimize the model training process. The process of obtaining the trained unit commitment model includes: In response to various constraints in model training, an adaptive penalty term update algorithm is introduced. The adaptive penalty term update algorithm assigns a unique penalty parameter to each constraint and adaptively updates the corresponding penalty parameter according to the characteristics of the constraint.
8. The method according to claim 7, characterized in that The expression of the adaptive penalty term update algorithm is as follows: Where, is the penalty parameter for the kth iteration of the i-th category, is the Lagrange multiplier of the kth iteration of the i-th type, f i (θ (k) ) is the function of the k-th iteration of the i-th class, α is a smoothing constant, γ is the global learning rate, and ∈ is a constant.
9. A power system unit combination system based on data-physics hybrid driven spatiotemporal attention graph neural network, characterized in that: Used to implement the method according to any one of claims 1 to 8, comprising: a data acquisition module, a model building module, a first model training module, a second model training module and a unit combination module; The data acquisition module is used to acquire the operation data of the power system, and the operation data includes load data and new energy prediction values; The model construction module is used to construct a spatiotemporal self-attention graph convolutional neural network, and to construct a unit combination model based on the spatiotemporal self-attention graph convolutional neural network. The spatiotemporal self-attention graph convolutional neural network includes three layers of self-attention temporal convolutional layers and three layers of spatial convolutional layers based on graph convolutional networks; The first model training module is used to input the operating data of the power system into the unit commitment model for two-stage model training. The first stage completes the physical constraints and empirical risk minimization of the unit commitment model weight matrix based on the physical mechanism, local relaxation of integer variables and supervised pre-training fusion strategy, and guides the initialization of model parameters; the second stage uses target guidance, physical mechanism constraints and local relaxation of integer variables to achieve secondary adjustment of model parameters; The second model training module is used to introduce an adaptive penalty term update algorithm to balance the physical constraint weights to complete the convergence of the unit commitment model and obtain a trained unit commitment model; The unit combination module is used to implement unit combination decision-making of the power system based on the trained unit combination model.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory, wherein: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Two-stage rapid solving method for unit commitment based on improved Transform neural network
CN114926009A
Unit commitment decision-making method, system and equipment based on data driving and medium
CN116579375A
Unit commitment decision-making method and system based on deep learning and mathematical physical model
CN118228948A
Intra-day optimal scheduling method, system and equipment for multi-level power system and medium
CN118868018A
Traffic flow prediction method based on graph neural network
CN119028141A
Cited By
Time-frequency combined feature extraction and clustering acceleration optimization model training method
CN121145962A
Unit commitment acceleration solving method and system based on space-time deep learning
CN121440799A
A method and system for accelerating unit combination based on spatiotemporal deep learning
CN121440799B
Integrated energy system online learning prediction control method based on Conv-Transform neural network
CN121638958A