Unit Commitment Decision Method and System Based on Deep Learning and Mathematical Physics Model
By combining deep learning and mathematical physics models, using neural networks to predict the start-up and stop status of the unit and combining it with the branch-and-cut algorithm, the problem of insufficient use of safety constraints and insufficient robustness of the deep learning method in the unit combination problem is solved, and an efficient, Safe decision-making solutions to adapt to power system changes.
Patent Information
- Application Number
- CN202410658633.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-27
AI Technical Summary
When the existing technology solves the unit combination problem, the deep learning method fails to make full use of important safety constraint information, resulting in the safety and quality of the decision-making solution cannot be guaranteed, and lacks robustness when facing unknown cases, and the solution time is limited. Limited to the curse of dimensionality.
Using a unit combination decision-making method based on deep learning and mathematical physics models, combined with offline training and online learning, the binary variables of the unit's start and stop status are predicted through the neural network model, and the branch and shear algorithm is used to solve the problem, and confidence intervals are set to improve decision-making efficiency. and robustness.
This method performs well when dealing with unknown cases outside the test set, can quickly adapt to power system changes, ensures the safety and quality of decision-making solutions, and significantly improves the efficiency and robustness of unit combination decisions.
Smart Images

Figure CN118228948B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and specifically to a unit combination decision method based on deep learning and mathematical physics models, a unit combination decision system based on deep learning and mathematical physics models, a computer device, a computer-readable storage medium and a computer program product. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of commercial optimization solvers (such as Gurobi and CPLEX), the mixed integer linear programming (MILP)-based method has become the mainstream solution to the unit commitment problem. The advantage of this method is that it can obtain high-quality problem solutions and meet the safety constraints of the power system.
[0004] However, the solution time of this method for the unit commitment problem is still greatly limited by the number of binary variables representing the start and stop status of the unit. As the scale of the problem grows, this method inevitably falls into the "dimensionality curse". With the rapid development of artificial intelligence in recent years, using deep learning methods to solve unit commitment problems has become a new research direction. Deep learning methods have significantly improved efficiency and shortened solution time, but there are still many limitations when using deep learning methods to solve unit commitment problems:
[0005] (1) The classical physical model of the unit commitment problem includes important information related to scheduling decisions, such as safety constraints. This information is usually not fully utilized in deep learning methods, which makes it impossible to ensure the safety and quality of the solutions provided by the method. (2) Most deep learning methods do not evaluate the performance of the trained model when faced with complex situations such as unit maintenance outside the test set, that is, they do not evaluate the robustness of the method. Summary of the invention
[0006] In order to address the shortcomings of the prior art, the present invention provides a unit combination decision method and system based on deep learning and mathematical physics models. The method proposed in the present invention performs well in processing unknown cases outside the test set, and can quickly adapt to changes in daily operating conditions of the power system, such as unit maintenance and changes in system topology. Since the method combines offline training with online learning, most of the computational burden is allocated to offline training, and online learning has enough time to learn and extract relevant features related to changes in the start / stop state of the unit to assist in problem solving.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] In a first aspect, the present invention provides a unit combination decision method based on deep learning and mathematical physics models.
[0009] A unit commitment decision method based on deep learning and mathematical physics model includes the following processes:
[0010] Obtain load data of the system to be decided;
[0011] Based on the load data of the system to be decided and the pre-trained neural network model, with the goal of minimizing the total cost, the predicted value of the binary variable representing the start and stop status of the unit is obtained;
[0012] A confidence interval is set according to the predicted value of the binary variable, the binary variables in the confidence interval are assigned integer values, and the binary variables outside the confidence interval are solved by a branch-and-cut algorithm to obtain the final unit commitment decision result.
[0013] As a further limitation of the first aspect of the present invention, the neural network model is a Transformer neural network, and the Transformer neural network includes a multi-head attention mechanism, a feedforward neural network, and layer normalization and random inactivation optimization.
[0014] As a further limitation of the first aspect of the present invention, multiple binary variables within the confidence interval are used as initial solutions, each group of initial solutions corresponds to a mixed integer linear programming model, and the branch and cut algorithm in the mixed integer linear programming model is used for solving the problem. Multiple models are calculated in parallel, and the decision with the minimum time cost will be the final output.
[0015] As a further limitation of the first aspect of the present invention, when the branch and bound algorithm cannot find a unit commitment decision solution within a set time, the method with the least time consumption among the following three solutions is adopted to obtain the final unit commitment decision solution:
[0016] The first method is to enable the online learning strategy and use the offline trained Transformer neural network for hot start. The Transformer neural network only updates the parameters of the embedding layer and the fully connected layer, and freezes the other layers. The search range of historical data is expanded, and similar cases with the minimum Euclidean distance compared with the current new daily load data are extracted from all historical load-unit combination decision scheme mapping sets as the input of the neural network model online learning, and the output of the neural network model is used as the unit combination decision scheme corresponding to the current new daily load data.
[0017] The second method is to increase the number of nodes explored by the branch-and-cut algorithm and continue to explore the original organic group combination decision-making scheme provided by the neural network model;
[0018] The third method is to expand the search scope of historical data, extract similar cases with the minimum Euclidean distance compared with the current new daily load data from all historical load-unit combination decision-making scheme mapping sets, and use the similar cases as prompt cases to enable the branch and bound algorithm to obtain the optimal solution.
[0019] As a further limitation of the first aspect of the present invention, based on changes in unit maintenance and transmission network topology, a new mapping set of daily load data and unit combination decision plans is generated for online learning of the neural network model. At the same time, the change data of unit maintenance and transmission network topology is reflected in the constraint changes of the branch and bound algorithm.
[0020] As a further limitation of the first aspect of the present invention, a mapping set of new daily load data and unit commitment decision schemes is added to an original neural network model training set to perform offline training of the neural network model;
[0021] During the offline training, the historical database of load-unit combination decision schemes is classified into four parts: a priori set, a training set, a verification set and a test set. The load data of the current case in the training set and the unit combination decision scheme with the minimum Euclidean distance compared with the current case in the priori set are used as inputs of the neural network, and the unit combination decision scheme corresponding to the load data of the current case in the training set is used as output of the neural network.
[0022] In the second aspect, the present invention provides a unit combination decision system based on deep learning and mathematical physics models.
[0023] A unit commitment decision system based on deep learning and mathematical physics models, comprising:
[0024] The data acquisition unit is configured to: acquire load data of the unit to be decided;
[0025] The network prediction unit is configured to: obtain a binary variable prediction value representing the startup state of the unit based on the load data of the unit to be decided and the pre-trained neural network model with the goal of minimizing the total cost;
[0026] The branch and bound solving unit is configured to: set a confidence interval according to the predicted value of the binary variable, the binary variables in the confidence interval are assigned integer values, and the binary variables outside the confidence interval are solved by the branch and bound algorithm to obtain the final combined decision result.
[0027] In a third aspect, the present invention provides a computer device, comprising: a processor and a computer-readable storage medium;
[0028] a processor adapted to execute a computer program;
[0029] A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the unit combination decision method based on deep learning and mathematical and physical models as described in the first aspect of the present invention is implemented.
[0030] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the unit combination decision method based on deep learning and mathematical and physical models as described in the first aspect of the present invention.
[0031] In a fifth aspect, the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the unit combination decision method based on deep learning and mathematical and physical models as described in the first aspect of the present invention.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1. The present invention innovatively proposes a unit combination decision method based on deep learning and mathematical physics models. The neural network model is used to quickly determine most of the binary variables related to the unit start and stop status by learning the correlation between historical loads and unit start and stop status. The branch and bound algorithm only needs to solve small-scale optimization problems related to continuous variables representing unit output power, thereby reducing many unnecessary branch exploration processes and greatly improving the efficiency of unit combination decision-making.
[0034] 2. Unlike the decision-making schemes of traditional deep learning methods that may violate safety constraints, the method proposed in this invention retains the original safety constraints of the unit combination problem so that the final decision-making scheme fully meets the requirements for safe operation of the power system; in addition, the calculation results of a large number of case studies show that the proposed method is superior to traditional mathematical optimization methods and other deep learning methods in terms of solution quality.
[0035] 3. The method proposed in the present invention performs well in handling unknown cases outside the test set, and can quickly adapt to changes in daily operating conditions of the power system, such as unit maintenance and changes in system topology; since this method combines offline training with online learning, most of the computational burden is allocated to offline training, and online learning has enough time to learn and extract relevant features related to changes in the start-stop status of the unit to assist in problem solving.
[0036] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0038] Figure 1 A schematic flow chart of a unit commitment decision method based on deep learning and mathematical physics models provided in Example 1 of the present invention;
[0039] Figure 2 A schematic diagram of the branch and cut bound algorithm provided in Example 1 of the present invention;
[0040] Figure 3 A training data structure partition diagram provided in Example 1 of the present invention;
[0041] Figure 4 A schematic diagram of the structure of a Transformer neural network provided in Example 1 of the present invention;
[0042] Figure 5 A structural diagram of the multi-head attention mechanism provided in Example 1 of the present invention;
[0043] Figure 6 A mean absolute error (MAE) diagram of the offline training method and the online learning method provided in Example 1 of the present invention when facing unfamiliar cases;
[0044] Figure 7 A graph showing the time taken to solve the unit commitment problem using different methods when facing 50 unfamiliar cases provided in Example 1 of the present invention;
[0045] Figure 8 A schematic diagram of a unit commitment decision system based on deep learning and mathematical physics models provided in Example 2 of the present invention;
[0046] Fig. 9 This is a schematic diagram of an electronic device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0047] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0048] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0049] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0050] Embodiment 1:
[0051] In this implementation, a unit commitment decision method based on deep learning and mathematical physics model is proposed, which includes the following processes:
[0052] S1: Obtain the load data of the unit to be decided;
[0053] S2: Based on the load data of the unit to be decided and the pre-trained neural network model, with the minimum total cost as the goal, obtain the predicted value of the binary variable representing the startup status of the unit;
[0054] S3: A confidence interval is set according to the predicted value of the binary variable, the binary variables in the confidence interval are assigned integer values, and the binary variables outside the confidence interval are solved by a branch-and-cut algorithm to obtain the final combined decision result.
[0055] In step S2 of this implementation, a mathematical and physical model of the unit combination problem is constructed. The mathematical and physical model of the unit combination problem of a power system consisting of j units, l transmission lines, and n nodes is as follows, where the objective function is: (1);
[0056] in, is the unit output power, is the start and stop status of unit i in period t, , , They are the operating cost, startup cost and shutdown cost of the unit respectively.
[0057] More specifically, the constraints of the unit commitment model are:
[0058] System power balance constraints: (2);
[0059] System backup constraints: (3);
[0060] in, , The time periods t system load demand and spinning reserve demand.
[0061] Maximum / minimum output constraints of the unit: (4);
[0062] Climbing / slipping constraints: (5);
[0063] Minimum start-stop time constraints: (6); (7);
[0064] in, , are the upper and lower limits of the maximum and minimum output of the unit, respectively. is the maximum ascent / descent rate of the unit, , It is the minimum start and stop time of the unit.
[0065] Line capacity constraints: (8); (9);
[0066] in, For line l In the period t The power flow inside , is the maximum / minimum value of the power passing through line l, is the power transfer factor.
[0067] Currently, the branch-and-cut algorithm is the mainstream optimization algorithm used by most commercial solvers (such as Gurobi or Cplex) to solve unit commitment problems. It uses a heuristic algorithm to try cutting planes to reduce the search space of the problem. Sometimes, it can quickly find a convex plane containing the optimal solution, but more often it needs to traverse the search tree to continuously solve the linear relaxation problem of the original problem, gradually approaching the boundary of the optimal solution. The characteristics of the algorithm determine that the time required to solve similar situations may vary greatly. Examples of the branch-and-cut algorithm are as follows: Figure 2 As shown ( x 1. x 2. x 3 is a binary variable representing the start and stop of the unit, S 0. S 1 is the node of the first branch of the branch-and-cut algorithm, S 00 , S 01 , S 10 , S 11 is the node of the second branch of the branch-and-cut algorithm, S 000 , S 001 , S 100 , S 101 , S 000 , S 001 , S 010 , S 011 , S 100 ,S 101 , S 110 is the node of the third branch of the branch-and-cut algorithm).
[0068] In step S2 of this implementation, the neural network model adopts the Transformer neural network. The training data sample design part of the Transformer neural network takes into account the complexity of the power system operation, including a single-day load-unit combination plan and a multi-day load-unit combination plan connected in series over time. In the continuous time sample, the cumulative start and shutdown time of the unit on the next day is calculated from the unit combination plan of the previous day; in the discrete time sample, the cumulative start and shutdown time of the unit is randomly generated within the minimum start and shutdown time constraint.
[0069] The historical database of load-unit combination decision schemes is classified into four parts: prior set, training set, validation set and test set. Before offline training, the cases in the prior set with the minimum Euclidean distance compared with the load data of the current case in the training set are identified. The formula for calculating the Euclidean distance is as follows: (10);
[0070] in, and is the loading vector in the training and prior sets.
[0071] like Figure 3 As shown, according to the load data of the current case in the training set, the Euclidean distance comparison method is used to search for similar load samples in the prior set, and the unit combination decision plan corresponding to the daily load in the prior set is obtained. The load data of the current case in the training set and the unit combination decision plan corresponding to the daily load in the prior set are used as the input of the Transformer neural network. According to the load data of the current case in the training set, the branch and cut bound algorithm is used to calculate the unit combination decision plan corresponding to the load data of the current case in the training set. The unit combination decision plan with the load data of the current case in the training set is used as the output true value of the Transformer neural network learning.
[0072] This strategy allows the Transformer neural network to make full use of valuable historical information when processing new cases. By learning the correlation between daily load fluctuations and unit start-up and shutdown status in historical data, the Transformer neural network transfers the learned experience to the current input of daily load data and outputs the corresponding expected unit start-up and shutdown status. The prior data set contains a sufficient number of samples to ensure that the selected subset is representative. The segmentation of the validation set is designed to prevent overfitting and improve the efficiency and effectiveness of training. After each complete training, the validation set is used to evaluate the training performance. If the loss function of the Transformer neural network is less than the loss function of the previous training, the strategy is considered to be effective and the weight parameters of the current Transformer neural network are retained; otherwise, the current training is abandoned and the next training is carried out. Finally, the test set is used to evaluate the training effect of the strategy.
[0073] When using Transformer neural networks to learn historical load-unit commitment decisions, the burden of offline training can be reduced and training efficiency can be improved by reducing the dimension of the data under specific assumptions. Therefore, line capacity constraints and certain unit characteristics (such as unit power generation costs, minimum start-stop time constraints, unit capacity constraints, and ramping / slope rates) are assumed to remain unchanged over a period of time. From the data perspective of the Transformer neural network, only the net load, unit output power, the initial start-stop status of the unit, and the number of start-stop hours accumulated by the unit in the previous day are constantly changing. These assumptions effectively control the model size of the Transformer neural network.
[0074] Traditional Transformer neural networks usually use an encoder-decoder architecture to encode and decode data. However, since the pre-identification process of the binary variable representing the start and stop of the unit does not involve any sequence-to-sequence transformation, and the decoder increases the complexity of the Transformer neural network structure and makes training more difficult, the present invention only uses the encoder architecture to identify the start and stop status of the unit. This design structure can achieve relatively good training results with less training data and enhance the robustness of the Transformer neural network.
[0075] The Transformer neural network provided by this implementation is Figure 4 As shown in the figure, the input data is used as the input of the multi-head attention layer after the input embedding layer. The output of the multi-head attention layer is input to the feedforward neural network layer after layer normalization and random inactivation. The output of the feedforward neural network layer is again processed by layer normalization and random inactivation, and then passes through the linear layer, normalized exponential function and S-type activation function in sequence to obtain the output result.
[0076] Multi-head attention mechanism Figure 5 As shown in the figure, after the load matrix-unit start-stop matrix data is input into the transformer neural network, it is first linearly transformed through the fully connected layer into P Q ,P K ,P V Three matrices, and then use the self-attention mechanism to calculate the correlation between load changes and unit start and stop: (11);
[0077] in, P a is the input feature, W Q , W K , W V is the network weight parameter of the fully connected layer.
[0078] After dividing the data into three parts, we P Q ,P K ,P V Perform a scaled dot product operation to extract the time period relationship between the daily load changes of each node and the start and stop list of the unit:
[0079] (12);
[0080] (13);
[0081] P Q and P K Multiply them together to get the model's attention score, d K for V K The dimension of the matrix, divided by In order to prevent the inner product of matrix multiplication from being too large to maintain the stability of the data gradient, softmax mainly standardizes the scores and multiplies the results by P V The main purpose of the matrix is to keep the values representing the load-unit start-stop mapping relationship that we want to focus on unchanged, while covering up those irrelevant parts.
[0082] The above process A ttThis is the self-attention mechanism, and the transformer's multi-head attention mechanism divides the data into multiple parts and performs self-attention operation on each part of the data at the same time. After obtaining multiple sets of results of parallel operation, they are concat-concatenated, and finally a fully connected layer is used to compress the attention features learned in multiple dimensions into a matrix:
[0083] (14);
[0084] (15);
[0085] In the formula, ( =1,2···,h) are the outputs of multiple self-attention mechanisms, is a multi-head attention mechanism, It is the concat concatenation function. is the weight parameter of the fully connected layer.
[0086] After the data is calculated and output by the multi-head attention mechanism, it will be processed with residual connection and normalization. The purpose of residual connection is to solve the problem of difficulty in training multi-layer neural networks. By transferring part of the information of the previous layer to the next layer without difference, the model performance can be effectively improved. The formula of residual connection is shown as follows:
[0087] (16);
[0088] In the formula, is the output of this layer, The input of this layer, the role of normalization is to accelerate the convergence speed of the model, because when the present invention uses the gradient descent method for optimization, as the network depth increases, the distribution of data will continue to change, the normalized data can ensure the stability of the feature distribution, the layer normalization formula is shown as follows: (17);
[0089] is the output of the multi-head attention module, Xi is the output of the residual connection, is the mean, is the variance, To prevent the denominator from reaching zero for a very small parameter, and They are the gain and bias of the normalization layer respectively. These two parameters are mainly used to ensure that the normalization operation does not destroy the previous information.
[0090] After the data is normalized through the multi-head attention module and residual connection described above, considering that the attention mechanism may not be able to fit the complex process well enough, the model's capabilities are enhanced by adding two layers of fully connected networks: (18);
[0091] Where W1 and W2, b1 and b2 are the weights and biases of the first and second layers respectively, X is the output of the previous network layer, and s(·) is the RELU function, which can reduce the interdependence between parameters and improve the generalization ability.
[0092] After the data passes through the feedforward neural network layer, it also undergoes residual connection and normalization processing. In addition, a sigmoid activation function is added after the feedforward neural network layer to show the recognition probability of the Transformer neural network for the start and stop states of different units in different time periods. This function enables the Transformer neural network to estimate the prediction of the start and stop states of the units under a specific future load distribution after training. The formula of the sigmoid activation function is as follows: (19);
[0093] Considering the characteristics of unit commitment problem containing a large number of discrete variables, the present invention selects binary cross entropy as the loss function. This loss function is suitable for binary classification problems: (20);
[0094] in, and are the predicted and true values of the unit status.
[0095] In step S3 of this implementation, during the optimization process, the attention mechanism of the Transformer neural network is used to assign weights to binary variables that represent the start and stop status of the unit, thereby guiding it to quickly converge to the optimal solution. After offline training, the confidence interval is set according to the predicted values of the binary variables provided by the Transformer neural network. The binary variables within the interval are assigned integer values, while the binary variables outside the interval are solved by the branch and bound algorithm in the mathematical optimization module. The information provided by the Transformer neural network enables the branch and bound algorithm to discard many useless branches and focus only on valuable sub-problems, which helps to search for the optimal solution. The specific interval division formula is shown as follows:
[0096] (twenty one);
[0097] in, is the start and stop status of the unit, and is a threshold value ranging from 0.01 to 0.5. The output of the Transformer neural network selects real numbers rather than binary variables, because even the best deep learning methods cannot accurately predict the start and stop status of each unit without error. Multiple groups of initial solutions are generated through the threshold partitioning step to provide more information to the branch and cut algorithm of the mathematical optimization module. Each group of initial solutions corresponds to a mixed integer linear programming (MILP) model. Multiple models are calculated in parallel to obtain the final decision. The decision with the minimum time cost will be the final output.
[0098] The offline trained Transformer neural network provides a solution to the start and stop status of the unit when applied in online decision-making. Since offline training searches for enough similar solutions in the prior set, the Transformer neural network can learn through comparative analysis. However, considering that the new daily load data may have unique features that do not exist in the original database. In addition, unit maintenance and changes in the topology of transmission lines may make the well-trained offline Transformer neural network invalid. Therefore, an online learning strategy is used to enhance the prediction and recognition capabilities of the Transformer neural network.
[0099] When the branch-and-bound algorithm cannot quickly find a unit commitment decision solution with the help of the Transformer neural network, a well-trained offline Transformer neural network is used for hot start, using the following methods to accelerate the calculation of the branch-and-bound algorithm and assist the online learning of the Transformer neural network:
[0100] The first approach is to expand the search scope of historical data by extracting similar cases with the minimum Euclidean distance compared with the new daily load data from all historical load-unit combination decision-making scheme mapping sets as the input of the Transformer neural network online learning, and then using the newly predicted unit combination decision-making scheme of the Transformer neural network to solve the current problem; in order to update the weights of the Transformer neural network, the gradient is obtained from the loss function described in formula (21). During the learning process, the epoch was changed from 50 to 10, and the learning rate was changed from 0.01 to 0.0003.
[0101] The second method is to increase the number of nodes explored by the branch-and-cut algorithm of the mathematical optimization module to continue exploring the original organic group combination decision-making scheme provided by the Transformer neural network;
[0102] The third way is to use the unit commitment decision plan of the searched similar case as a hint to assist the branch and cut algorithm in solving the current problem;
[0103] The above three methods are calculated in parallel to determine the final result in the least time-consuming way.
[0104] Unit maintenance and changes in the topology of the transmission network may render well-designed data-driven predictors ineffective. Online Learning Strategy II establishes a new set of data mappings to represent changes in the number and status of units, allowing the offline-trained Transformer neural network to learn online. Changes in unit maintenance and transmission network topology will also be reflected in the constraint changes of the branch-cut-bound algorithm in the mathematical optimization module. New samples accumulated under new operating conditions can also be used for supervised offline training to further enhance the performance of the Transformer neural network.
[0105] Considering that the online learning strategy only updates the model weights once or a few times, its impact on the Transformer neural network may be much less than offline training after multiple iterations. Therefore, new daily load-unit combination decision plans collected from the daily operation of the power system will be regularly added to the existing training set for a new round of offline training; this approach enables the Transformer neural network to adapt to the complex environment brought about by the switch between the two learning methods, thereby achieving better performance and more accurate prediction accuracy.
[0106] To verify the effectiveness and correctness of the present invention, simulation tests are carried out based on IEEE118 node and a 2383 node standard example. The example study demonstrates the performance of the proposed method in terms of solution time, solution quality and robustness. It aims to prove that: 1) the proposed method is superior to the branch and cut bound algorithm and traditional deep learning method in terms of computational time and unit combination scheme cost, 2) the proposed method can use historical data to accelerate the solution of unfamiliar cases, and at the same time shows a certain robustness due to its ability to continuously learn and evolve.
[0107] All cases were trained, validated, and tested using Python 3.8 and PyTorch 1.14 platforms and a computer equipped with an AMD 7800x3d processor, an NVIDIA RTX 3090 graphics card, and 32GB RAM. The branch-cut-and-bound algorithm was implemented using the commercial solver Gurobi, and the unit combination decision plan for the training and test sets was obtained, and the optimal hyperparameters were determined using grid search.
[0108] (1) Verification of the effectiveness of the method of the present invention in accelerating the computational efficiency of traditional mathematical optimization methods.
[0109] The Transformer neural network was trained using more than 400 offline cases on IEEE 118-node and a 2383-node power system. Each case was trained for 50 iterations with a learning rate of 0.01. After the offline training was completed, the performance of the Transformer neural network was tested using 50 test cases. In addition to comparing the proposed method with the branch-and-bound algorithm, a similar strategy was used to train LSTM (Long Short-Term Memory Network) and ANN (Artificial Neural Network) offline. The present invention analyzes and compares the time required for various methods on the test set. To ensure fairness, the present invention sets the optimality gap termination criterion to: 0.1% for the IEEE 118-node system and 1% for the 2383-node system. In addition, the maximum solution time was set to the default 900 seconds of the market clearing window, and the test results are presented in Tables 1 and 2.
[0110] Table 1: IEEE 118-node system.
[0111] Table 2: A 2383-node system.
[0112] Tables 1 and 2 list the average solution time and time reduction ratio of each method compared with the branch-and-cut algorithm. It can be seen that the proposed method significantly reduces the computational time on large-scale power systems, because the optimization problem with a large number of binary variables has high uncertainty in variable values at the beginning of the search process. Usually a considerable portion of the running time is spent searching for feasible solutions. The proposed method reduces the solution time by carrying information about the certainty of the variables to guide the search process of the branch-and-cut algorithm and eliminate uncertainty. Moreover, the performance of the Transformer neural network is better than that of the two deep learning methods, LSTM and ANN, on both systems. This is because the attention mechanism in the Transformer neural network can better capture the correlation between the startup and shutdown of units in different time periods, while the gradient vanishing problem in LSTM and ANN makes them prone to losing rich information when learning decision solutions.
[0113] (2) Verification of the effectiveness of the method of the present invention in reducing the cost of unit combination decision-making schemes.
[0114] Due to the small number of units in the IEEE-118 node system, all methods were able to successfully find the optimal solution within the time limit. Therefore, the analysis is mainly focused on a 2383-node system. The same training set is used for offline training of the Transformer neural network, and 50 test sets are used to compare the cost of the unit combination decision scheme between various methods. To ensure fairness, all methods stop iterations at the same time as the branch and bound algorithm, and the termination criterion is set to 0.01% optimality gap. The results are shown in Table 3.
[0115] Table 3: Comparison of optimality errors of a 2383-node system.
[0116] Table 3 shows that the average relative error of the proposed method in 50 test cases is only 0.1867%, and its infeasibility rate is 0%, which indicates that the unit commitment decision-making scheme solved by the proposed method is close to the global optimal solution.
[0117] (3) Verification of the effectiveness of introducing the online learning module into the method of the present invention.
[0118] To verify the effectiveness of the online learning module introduced in the present invention, a total of 450 new cases were used on a 2383-node system, each with different load and unit combination decision schemes, for online learning and testing. During the online learning process, each case was iterated 10 times. After solving each case, the Transformer neural network iteratively updated the weight parameters and froze the encoder layer to ensure that the Transformer neural network can better adapt to new cases while retaining useful features learned in offline training. This method shortens the online learning time and improves learning efficiency. Figure 6 The prediction errors of the Transformer neural network after online learning and after only offline training for 450 cases are shown. The results show that the error of the Transformer neural network after online learning in the test is significantly smaller than that of the Transformer neural network after only offline training, which shows that the proposed online learning strategy further improves the robustness of the Transformer neural network when facing unfamiliar situations.
[0119] In order to more intuitively demonstrate the effectiveness of the online learning strategy, the present invention randomly selected 50 cases from 450 unfamiliar cases and combined offline training and online learning methods to solve them. The present invention compared the results with the Transformer neural network and branch-and-bound algorithm trained only offline. The specific results are as follows: Figure 7 shown.
[0120] like Figure 7As shown in the box plot in , the combination of offline training and online learning to train the Transformer neural network significantly reduces the computational solution time of the problem compared to the Transformer neural network trained only offline. This is because the Transformer neural network trained through online learning can learn more new data features when encountering unfamiliar cases and obtain more accurate feasible solutions. In addition, the solution time of both methods is less than the branch and bound algorithm.
[0121] Considering the unit maintenance plan in the actual power system operation, the robustness of the proposed method in the face of unit maintenance is tested on a 2383-node system, and the application of online learning strategy II is demonstrated on another 50 new cases to verify that the Transformer neural network can still provide accurate predictions when the power system operation status changes. In these 50 cases, 12 units were randomly selected for maintenance, and the maintenance cycle was set to 5, 10, 15, 20, 40 and 50 days. Each maintenance cycle contains two units. This design simulates the complex situation in the actual power system operation. In these 50 cases, the solution results of the proposed method and the branch and cut algorithm are shown in Table 4.
[0122] Table 4: Test results considering unit maintenance on a 2383 node system.
[0123] By comparison, the present invention can find that even if the number of units changes, the proposed method can still effectively accelerate the calculation process of the branch and bound algorithm, and obtain high-quality solutions while reducing the calculation time of the mathematical optimization module. These results show that the method has certain robustness and can be used to solve large-scale unit combination problems. Through continuous learning, it is expected that the recognition performance of the Transformer neural network will continue to improve over time.
[0124] Embodiment 2:
[0125] like Figure 8 As shown, this implementation provides a unit commitment decision system based on deep learning and mathematical physics models, including:
[0126] The data acquisition unit is configured to: acquire the load data of the unit to be decided; the specific implementation process of this unit is the same as the process of step S1 in embodiment 1, which will not be repeated here;
[0127] The network prediction unit is configured to: obtain a binary variable prediction value representing the startup state of the unit based on the load data of the unit to be decided and the pre-trained neural network model, with the goal of minimizing the total cost; the specific implementation process of this unit is the same as the process of step S2 in embodiment 1, which will not be repeated here;
[0128] The branch and bound solving unit is configured to: set a confidence interval according to the predicted value of the binary variable, the binary variables in the confidence interval are assigned integer values, and the binary variables outside the confidence interval are solved by the branch and bound algorithm to obtain the final combined decision result; the specific implementation process of this unit is the same as the process of step S3 in Example 1, which will not be repeated here.
[0129] It is understandable that the above-mentioned units can be separately or all combined into one or several other units to constitute, or some of the units can be further divided into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the decision system may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0130] According to another embodiment of the present application, the system described in this embodiment can be constructed and the decision-making processing method of the embodiment of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general-purpose computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.
[0131] Embodiment 3:
[0132] like Fig. 9 As shown, this implementation provides an electronic device, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means.
[0133] Among them, the communication interface 1002 is used to receive and send data, the computer-readable storage medium 1003 can be stored in the memory of the electronic device, the computer-readable storage medium 1003 is used to store a computer program, the computer program includes program instructions, and the processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.
[0134] The processor 1001 (or CPU (Central Processing Unit)) is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, and specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.
[0135] The processor 1001 is configured to execute the following process:
[0136] Obtain load data of the unit to be decided; the specific implementation process is the same as the process of step S1 in embodiment 1, which will not be repeated here;
[0137] According to the load data of the unit to be decided and the pre-trained neural network model, with the minimum total cost as the goal, the binary variable prediction value representing the startup state of the unit is obtained; the specific implementation process is the same as the process of step S2 in embodiment 1, which will not be repeated here;
[0138] A confidence interval is set according to the predicted value of the binary variable, the binary variables in the confidence interval are assigned integer values, and the binary variables outside the confidence interval are solved by the branch and cut algorithm to obtain the final combined decision result; the specific implementation process is the same as the process of step S3 in Example 1, which will not be repeated here.
[0139] Embodiment 4:
[0140] This implementation provides a computer-readable storage medium 1003, which is a memory device in an electronic device for storing programs and data. It is understandable that the computer-readable storage medium 1003 here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium 1003 provides a storage space that stores the processing system of the electronic device.
[0141] In addition, the storage space also stores one or more instructions suitable for being loaded and executed by the processor 1001. These instructions may be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium 1003 herein may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium 1003 located away from the aforementioned processor 1001.
[0142] In one embodiment, the computer-readable storage medium 1003 stores one or more instructions; the processor 1001 loads and executes the one or more instructions stored in the computer-readable storage medium 1003 to implement the following process:
[0143] Obtain load data of the unit to be decided; the specific implementation process is the same as the process of step S1 in embodiment 1, which will not be repeated here;
[0144] According to the load data of the unit to be decided and the pre-trained neural network model, with the minimum total cost as the goal, the binary variable prediction value representing the startup state of the unit is obtained; the specific implementation process is the same as the process of step S2 in embodiment 1, which will not be repeated here;
[0145] A confidence interval is set according to the predicted value of the binary variable, the binary variables in the confidence interval are assigned integer values, and the binary variables outside the confidence interval are solved by the branch and cut algorithm to obtain the final combined decision result; the specific implementation process is the same as the process of step S3 in Example 1, which will not be repeated here.
[0146] Embodiment 5:
[0147] This implementation provides a computer program product or a computer program, which includes computer instructions, which are stored in a computer-readable storage medium 1003. The processor 1001 of the electronic device reads the computer instructions from the computer-readable storage medium 1003, and the processor 1001 executes the computer instructions, so that the electronic device performs the following process:
[0148] Obtain load data of the unit to be decided; the specific implementation process is the same as the process of step S1 in embodiment 1, which will not be repeated here;
[0149] According to the load data of the unit to be decided and the pre-trained neural network model, with the minimum total cost as the goal, the binary variable prediction value representing the startup state of the unit is obtained; the specific implementation process is the same as the process of step S2 in embodiment 1, which will not be repeated here;
[0150] A confidence interval is set according to the predicted value of the binary variable, the binary variables in the confidence interval are assigned integer values, and the binary variables outside the confidence interval are solved by the branch and cut algorithm to obtain the final combined decision result; the specific implementation process is the same as the process of step S3 in Example 1, which will not be repeated here.
[0151] A person skilled in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0152] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server, a data center, etc. that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0153] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A unit commitment decision method based on deep learning and mathematical physics models, It is characterized in that The process includes: Combining offline training with online learning, during offline training, classifying the historical database of load-unit combination decision schemes into four parts: a priori set, a training set, a validation set, and a test set, using the load data of the current case in the training set and the unit combination decision scheme with the minimum Euclidean distance compared with the current case in the priori set as inputs of the neural network, and using the unit combination decision scheme corresponding to the load data of the current case in the training set as output of the neural network; According to the changes in unit maintenance and transmission network topology, a new mapping set of daily load data and unit combination decision schemes is generated for online learning of the neural network model. At the same time, the change data of unit maintenance and transmission network topology are reflected in the constraint changes of the branch and bound algorithm; the offline trained Transformer neural network is used for hot start, and the Transformer neural network only updates the parameters of the embedding layer and the fully connected layer, and the remaining layers are frozen, so as to expand the search range of historical data, and extract similar cases with the minimum Euclidean distance compared with the current new daily load data from all historical load-unit combination decision scheme mapping sets as the input of the online learning of the neural network model, and use the output of the neural network model as the unit combination decision scheme corresponding to the current new daily load data; According to the load data of the unit to be decided and the pre-trained neural network model, with the minimum total cost as the goal, the predicted value of the binary variable representing the startup status of the unit is obtained; The neural network model is a Transformer neural network, which includes a multi-head attention mechanism, a feedforward neural network, and layer normalization and random inactivation optimization; the pre-identification process of the binary variable representing the start and stop of the unit does not involve any sequence-to-sequence transformation, and an encoder architecture is used to identify the start and stop status of the unit; By learning the correlation between daily load fluctuations and unit start-up and shutdown status in historical data, the Transformer neural network transfers the learned experience to the current input of daily load data and outputs the corresponding expected unit start-up and shutdown status. The prior data set contains a sufficient number of samples to ensure that the selected subset is representative. The segmentation of the validation set is intended to prevent overfitting and improve the efficiency and effectiveness of training. After each complete training, the validation set is used to evaluate the training performance. If the loss function of the Transformer neural network is less than the loss function of the previous training, the strategy is considered to be effective and the weight parameters of the current Transformer neural network are retained; otherwise, the current training is abandoned and the next training is carried out. Finally, the test set is used to evaluate the training effect of the strategy. The training data sample design of the Transformer neural network takes into account the complexity of the power system operation, including a single-day load-unit combination plan and a multi-day load-unit combination plan connected in series over time. In the continuous time sample, the cumulative start and stop time of the unit on the next day is calculated from the unit combination plan on the previous day; while in the discrete time sample, the cumulative start and stop time of the unit is randomly generated within the minimum start and stop time constraint; During the optimization process, the attention mechanism of the Transformer neural network is used to assign weights to binary variables, which represent the start and stop status of the unit, thereby guiding it to quickly converge to the optimal solution. After offline training, the confidence interval is set according to the predicted values of the binary variables provided by the Transformer neural network. The binary variables within the interval are assigned integer values, while the binary variables outside the interval are solved by the branch-and-bound algorithm in the mathematical optimization module. The information provided by the Transformer neural network enables the branch-and-bound algorithm to discard many useless branches and focus only on valuable sub-problems, which helps to search for the optimal solution. The specific interval division formula is shown in the following formula: Among them, u i,t is the start / stop state of the unit, and α is a threshold value ranging from 0.01 to 0.
5. The output of the Transformer neural network selects real numbers rather than binary variables. Multiple groups of initial solutions are generated through the threshold partitioning step to provide more information to the branch and cut algorithm of the mathematical optimization module. Each group of initial solutions corresponds to a mixed integer linear programming model. Multiple models are calculated in parallel to obtain the final decision. The decision with the minimum time cost will be the final output. The neural network model is used to quickly determine most of the binary variables related to the start and stop status of the unit by learning the correlation between the historical load and the start and stop status of the unit. The branch and cut bound algorithm only needs to solve small-scale optimization problems related to the continuous variables representing the unit output power. The original safety constraints of the unit commitment problem are retained so that the final decision-making scheme fully meets the requirements for safe operation of the power system; When the branch-and-cut algorithm cannot find a unit commitment decision solution within the set time, the method with the least time consumption among the following three solutions is used to obtain the final unit commitment decision solution: The first method is to expand the search scope of historical data, extract similar cases with the minimum Euclidean distance compared with the current new daily load data from all historical load-unit combination decision-making scheme mapping sets as the input of the neural network model online learning, and use the output of the neural network model as the unit combination decision-making scheme corresponding to the current new daily load data; The second method is to increase the number of nodes explored by the branch-and-cut algorithm and continue to explore the original organic group combination decision-making scheme provided by the neural network model; The third method is: expanding the search scope of historical data, extracting similar cases with the minimum Euclidean distance compared with the current new daily load data from all historical load-unit combination decision-making scheme mapping sets, and using the similar cases as prompt cases to enable the branch and cut algorithm to obtain the optimal solution; Multiple binary variables within the confidence interval are used as initial solutions. Each set of initial solutions corresponds to a mixed integer linear programming model. The branch-cut-and-bound algorithm in the mixed integer linear programming model is used to solve it. Multiple models are calculated in parallel, and the decision with the minimum time cost will be the final output.
2. A unit commitment decision system based on deep learning and mathematical physics models, It is characterized in that include: The combination decision scheme acquisition unit is configured to: combine offline training with online learning, wherein during offline training, the historical database of load-unit combination decision schemes is classified into four parts: a priori set, a training set, a validation set, and a test set, the load data of the current case in the training set and the unit combination decision scheme with the minimum Euclidean distance compared with the current case in the priori set are used as inputs of the neural network, and the unit combination decision scheme corresponding to the load data of the current case in the training set is used as output of the neural network; According to the changes in unit maintenance and transmission network topology, a new mapping set of daily load data and unit combination decision schemes is generated for online learning of the neural network model. At the same time, the change data of unit maintenance and transmission network topology are reflected in the constraint changes of the branch and bound algorithm; the offline trained Transformer neural network is used for hot start, and the Transformer neural network only updates the parameters of the embedding layer and the fully connected layer, and the remaining layers are frozen, so as to expand the search range of historical data, and extract similar cases with the minimum Euclidean distance compared with the current new daily load data from all historical load-unit combination decision scheme mapping sets as the input of the online learning of the neural network model, and use the output of the neural network model as the unit combination decision scheme corresponding to the current new daily load data; The branch and bound solving unit is configured to: obtain the predicted value of the binary variable representing the startup state of the unit according to the load data of the unit to be decided and the pre-trained neural network model with the minimum total cost as the goal; set the confidence interval according to the predicted value of the binary variable, the binary variable in the confidence interval is assigned an integer value, and the binary variable outside the confidence interval is solved by the branch and bound algorithm to obtain the final combined decision result; the neural network model is a Transformer neural network, and the Transformer neural network includes a multi-head attention mechanism, a feedforward neural network, and layer normalization and random inactivation optimization; the pre-identification process of the binary variable representing the start and stop of the unit does not involve any sequence-to-sequence transformation, and an encoder architecture is used to identify the start and stop state of the unit; During the optimization process, the attention mechanism of the Transformer neural network is used to assign weights to binary variables, which represent the start and stop status of the unit, thereby guiding it to quickly converge to the optimal solution. After offline training, the confidence interval is set according to the predicted values of the binary variables provided by the Transformer neural network. The binary variables within the interval are assigned integer values, while the binary variables outside the interval are solved by the branch-and-bound algorithm in the mathematical optimization module. The information provided by the Transformer neural network enables the branch-and-bound algorithm to discard many useless branches and focus only on valuable sub-problems, which helps to search for the optimal solution. The specific interval division formula is shown in the following formula: Among them, u i,t is the start / stop state of the unit, and α is a threshold value ranging from 0.01 to 0.
5. The output of the Transformer neural network selects real numbers rather than binary variables. Multiple groups of initial solutions are generated through the threshold partitioning step to provide more information to the branch and cut algorithm of the mathematical optimization module. Each group of initial solutions corresponds to a mixed integer linear programming model. Multiple models are calculated in parallel to obtain the final decision. The decision with the minimum time cost will be the final output. The neural network model is used to quickly determine most of the binary variables related to the start and stop status of the unit by learning the correlation between the historical load and the start and stop status of the unit. The branch and cut bound algorithm only needs to solve small-scale optimization problems related to the continuous variables representing the unit output power. When the branch-and-cut algorithm cannot find a unit commitment decision solution within the set time, the method with the least time consumption among the following three solutions is used to obtain the final unit commitment decision solution: The first method is to expand the search scope of historical data, extract similar cases with the minimum Euclidean distance compared with the current new daily load data from all historical load-unit combination decision-making scheme mapping sets as the input of the neural network model online learning, and use the output of the neural network model as the unit combination decision-making scheme corresponding to the current new daily load data; The second method is to increase the number of nodes explored by the branch-and-cut algorithm and continue to explore the original organic group combination decision-making scheme provided by the neural network model; The third method is: expanding the search scope of historical data, extracting similar cases with the minimum Euclidean distance compared with the current new daily load data from all historical load-unit combination decision-making scheme mapping sets, and using the similar cases as prompt cases to enable the branch and cut algorithm to obtain the optimal solution; The data sample design unit is configured as follows: by learning the correlation between daily load fluctuations and unit start-up and shutdown states in historical data, the Transformer neural network transfers the learned experience to the current input of daily load data and outputs the corresponding expected unit start-up and shutdown states. The priori data set contains a sufficient number of samples to ensure that the selected subset is representative. The segmentation of the validation set is intended to prevent overfitting and improve the efficiency and effectiveness of training. After each complete training, the validation set is used to evaluate the training performance. If the loss function of the Transformer neural network is less than the loss function of the previous training, the strategy is considered to be effective and the weight parameters of the current Transformer neural network are retained; otherwise, the current training is abandoned and the next training is performed. Finally, the test set is used to evaluate the training effect of the strategy. The training data sample design of the Transformer neural network takes into account the complexity of the power system operation, including a single-day load-unit combination plan and a multi-day load-unit combination plan connected in series over time. In the continuous time sample, the cumulative start and shutdown time of the unit on the next day is calculated from the unit combination plan on the previous day; while in the discrete time sample, the cumulative start and shutdown time of the unit is randomly generated within the minimum start and shutdown time constraint; multiple binary variables within the confidence interval are used as initial solutions, each group of initial solutions corresponds to a mixed integer linear programming model, and the branch and cut algorithm in the mixed integer linear programming model is used for solution. Multiple models are calculated in parallel, and the decision with the minimum time cost will be the final output.
3. A computer device, It is characterized in that include: a processor and a computer readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the unit combination decision method based on deep learning and mathematical and physical models as claimed in claim 1 is implemented.
4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the unit combination decision method based on deep learning and mathematical and physical models as described in claim 1.
5. A computer program product, It is characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the unit combination decision method based on deep learning and mathematical and physical models as claimed in claim 1.
