A machine learning-based power power balance calculation method and system
By employing a machine learning-based method for calculating power balance, utilizing deep neural networks and a post-state adjustment algorithm, the contradiction between speed and accuracy in power balance calculation is resolved, enabling fast and accurate power balance calculation in new energy systems.
Patent Information
- Application Number
- CN202511060685.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2026-05-08
- Estimated Expiration
- 2045-07-30
AI Technical Summary
Existing technologies struggle to improve the speed of power balance calculations while maintaining accuracy. This is especially true in systems with a high proportion of renewable energy installations, where the coupling of integer variables leads to a significant increase in the time required to solve mixed-integer programming problems. Furthermore, traditional machine learning solutions fail to effectively consider the optimization information of relaxed solutions in the operating state, resulting in predicted states that violate actual operating rules.
A machine learning-based power balance calculation method is adopted. The operating status of thermal power units is determined in advance through deep neural networks. Combined with the Seq2Seq-Attention model and the state adjustment algorithm, the integer variables in the mathematical optimization model are reduced. Physical constraint verification and variable time scale scenario generation are introduced to optimize the solution process.
It improves the solution speed and accuracy of power balance calculation, reduces solution time, meets the operating constraints of thermal power units, improves prediction accuracy and objective function accuracy, and reduces objective function error.
Smart Images

Figure CN120955621B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system optimization and dispatching technology, specifically relating to a power balance calculation method and system based on machine learning. Background Technology
[0002] As power systems grow larger and computational timescales increase, the computational difficulty of power balance problems increases significantly. Traditional mathematical optimization methods, which comprehensively consider the safety and economy of power system operation, are often used to solve power balance models, yielding start-up and shutdown plans and output schemes for various types of generating units. However, these methods struggle to improve solution speed while maintaining accuracy. With increasingly sophisticated models, the number of integer variables also increases, and these variables often overlap and couple. Therefore, pre-determining the operating status of some thermal power units and reducing the number of integer variables in the mathematical optimization model becomes particularly important.
[0003] In systems where renewable energy accounts for nearly 50% of installed capacity, the net load peak-to-valley difference rate is as high as 86.49%. The coupling of start-up and shutdown state variables of thermal power units leads to a sharp increase in the solution time of mixed integer linear programming (MILP) (exceeding 500 seconds in extreme scenarios). Traditional optimization methods (such as the Gurobi solver) are difficult to meet the timeliness requirements of intraday rolling scheduling.
[0004] While existing prediction schemes such as CNN / Transformer improve speed, they ignore the optimization boundary information contained in the relaxation solution of the running state and do not introduce physical constraint post-processing, which leads to the prediction state violating the shortest start-up and shutdown constraint. The objective function error is as high as 194.37%, which raises the risk of load shedding.
[0005] The current power balance problem faces two major bottlenecks:
[0006] High computational complexity: With the increase in the proportion of new energy installed capacity (nearly 50%), the net load peak-valley difference rate is as high as 86.49%. The coupling of integer variables (start-stop status of thermal power units) leads to a sharp increase in the time consumption of mixed integer programming solution (over 500 seconds in extreme scenarios).
[0007] Accuracy-speed contradiction: Although traditional machine learning acceleration solutions (such as CNN and Transformer) improve speed, they ignore the optimization information contained in the relaxation solution of the operating state and do not introduce post-processing of unit constraints, which leads to the predicted state violating the actual operating rules (such as the shortest start-up and shutdown time), and the objective function error reaches 194.37%. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a power balance calculation method and system based on machine learning to address the shortcomings of the prior art, thereby solving the technical problem of difficulty in balancing the accuracy and speed of the solution in power balance problems.
[0009] The present invention adopts the following technical solution:
[0010] A machine learning-based method for calculating power balance includes the following steps:
[0011] Historical scenarios are solved by power balance model to generate unit start-up and shutdown plans and output schemes; the start-up and shutdown plans of thermal power units are used as sample labels, and deep neural networks are trained by combining scenario curve data and operating status relaxation solutions.
[0012] The curve data of the scenario to be predicted and the relaxed solution of the operating status of the thermal power unit are input into the trained deep neural network, and the predicted operating status of the thermal power unit is output through the thermal power unit status analysis model.
[0013] Based on the obtained predicted operating status, combined with the operating constraints of the thermal power unit, the operating status is checked and adjusted using the post-state adjustment method to obtain the adjusted operating status that satisfies the constraints.
[0014] By fixing the adjusted operating state, reducing the integer variables in the mathematical optimization model, and obtaining the final unit start-up and shutdown plan and output scheme through optimization solution.
[0015] Preferably, the scene curve data includes:
[0016] Load curve, tie line curve, reservoir-type hydropower output curve, runoff-type hydropower resource curve, wind power resource curve, and photovoltaic resource curve.
[0017] Preferably, the thermal power unit condition analysis model includes:
[0018] The start-up probability analysis model adopts a Seq2Seq-Attention model, using an LSTM network as the encoder-decoder base and introducing an additive attention mechanism. It takes the operating state relaxation solution and scene curve data as input and outputs the predicted start-up probability of the thermal power unit. ;
[0019] Running state mapping model: predicts the probability of system startup. Mapped to the predicted operating status of thermal power units .
[0020] Preferably, the predicted start-up probability of the thermal power unit is obtained using a start-up probability analysis model. , Indicates thermal power unit i At any moment tThe probability of powering on is a decimal value between [0,1].
[0021] The encoder encodes the relaxation solution of the running state and the scene curve data into a fixed-length context vector;
[0022] The predicted start-up probability of the thermal power unit is then obtained by decoding the context vector through the decoder. During the encoding and decoding process, an attention mechanism is introduced, which allows the decoder to take into account the information at different positions in the encoder output when generating the output at each time step.
[0023] Preferably, the predicted start-up probability of the thermal power unit is obtained. Afterwards, Mapped to the predicted operating state of thermal power units , The range of values is The details are as follows:
[0024]
[0025] in, Develop confidence thresholds for thermal power units.
[0026] Preferably, in the operational status analysis model, the interpretability of the model is enhanced through the following three aspects:
[0027] In the power-on probability analysis model, the inputs of the model include the relaxation solution of the running state and the scenario curve data;
[0028] The Attention mechanism is used to consider the weights at different input positions, and the relaxation solution of the running state is adjusted by a deep learning model.
[0029] In the operational status mapping model, the operational status of some thermal power units is predicted.
[0030] Preferably, the operating state is checked and adjusted using a post-state adjustment method to obtain an adjusted operating state that satisfies the constraints, specifically as follows:
[0031] Aggregate time periods with adjacent predicted states;
[0032] Iterate through the time period; if the status is -1 or the shortest start-stop constraint is met, retain it; otherwise, perform the adjustment.
[0033] Calculate the duration of consecutive states of -1 before and after the current time period;
[0034] The status of time periods that do not meet the constraints will be forcibly adjusted to -1.
[0035] Preferably, for each time period s ,if Skip the current time period directly, if Furthermore, the length of the current time period plus the calculated time period satisfies the minimum start-up and shutdown time constraint, so the current time period is not adjusted; otherwise, it is adjusted to -1.
[0036] Preferably, after obtaining the final unit start-up and shutdown plan and output scheme through optimization, the acceleration effect is verified based on the variable time scale scenario generation method, specifically:
[0037] Daily average power is generated based on variational autoencoder, variable time scale scenario is sampled by Markov chain, and intraday fluctuating power is generated by vector autoregression model.
[0038] The validation metrics include: operational status recognition rate, prediction accuracy, speedup ratio, objective function error, and balance margin error.
[0039] Secondly, embodiments of the present invention provide a power balance calculation system based on machine learning, comprising:
[0040] The scenario module solves historical scenarios using a power balance model to generate unit start-up and shutdown plans and output schemes; it uses the start-up and shutdown plans of thermal power units as sample labels and trains a deep neural network by combining scenario curve data and operating status relaxation solutions.
[0041] The training module inputs the curve data of the scenario to be predicted and the relaxed solution of the operating status of the thermal power unit into the trained deep neural network, and outputs the predicted operating status of the thermal power unit through the thermal power unit status analysis model.
[0042] The adjustment module, based on the obtained predicted operating state and combined with the operating constraints of the thermal power unit, verifies and adjusts the operating state through the state adjustment method to obtain the adjusted operating state that meets the constraints.
[0043] The output module fixes the adjusted operating state, reduces integer variables in the mathematical optimization model, and obtains the final unit start-up and shutdown plan and output scheme through optimization solution.
[0044] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the above-described machine learning-based power balance calculation method.
[0045] Fourthly, embodiments of the present invention provide a computer-readable storage medium including a computer program, which, when executed by a processor, implements the steps of the above-described machine learning-based power balance calculation method.
[0046] Fifthly, a chip includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described machine learning-based power balance calculation method.
[0047] In a sixth aspect, embodiments of the present invention provide an electronic device, including a computer program, which, when executed by the electronic device, implements the steps of the above-described machine learning-based power balance calculation method.
[0048] Compared with the prior art, the present invention has at least the following beneficial effects:
[0049] A machine learning-based power balance calculation method combines deep neural networks with optimization calculations. By using deep neural networks to predetermine the operating status of most thermal power units, it reduces integer variables in the mathematical optimization model, thereby improving the solution speed without significantly affecting the solution accuracy. Furthermore, the method verifies the effectiveness and rationality of the fast calculation method on medium- and long-term time scales through an acceleration effect verification method based on variable time scale scenarios. Please supplement the explanation of the purpose or benefits of the entire method steps according to claim 1, constructing a three-level closed loop of relaxed solution-guided prediction, physical constraint verification, and variable reduction optimization, breaking through the limitations of traditional single-stage optimization or pure prediction.
[0050] Furthermore, the six-dimensional data, including load curves and renewable energy curves, constitute a spatiotemporal coupling feature, reflecting the fluctuation pattern of the system's net load. The input feature dimension is 211, covering key variables of power balance, ensuring that the prediction confidence of the Seq2Seq model reaches 99.8%.
[0051] Furthermore, the accuracy is improved by 0.87-4.15 percentage points compared to the CNN / Transformer model in scenarios with the maximum net load.
[0052] Furthermore, by generating scenarios with varying time scales, multiple medium- and long-term scenarios are obtained by randomly sampling from historical scenario curve data, and calculations are performed using a fast calculation method to verify the effectiveness and rationality of the fast calculation method on medium- and long-term time scales.
[0053] Furthermore, it directly predicts potential violations of the minimum start-up and shutdown time of thermal power units (such as single-hour start-up and shutdown) by: identifying continuous operating intervals through time period aggregation; verifying time window constraints by traversing forward / backward; forcibly adjusting to eliminate infeasible solutions and eliminating 100% constraint conflict scenarios; and the verification time accounts for only 4% of the entire process.
[0054] Furthermore, an evaluation index for acceleration effect is introduced, mainly including the operational status recognition rate. Accuracy of operational status prediction Solution time and speedup Objective function error Balance margin error This method can help to comprehensively and accurately evaluate the actual performance of the designed fast power balance calculation method. By comprehensively considering factors such as accuracy and acceleration effect, a targeted evaluation index system is constructed, which is conducive to clearly and objectively comparing the results of mathematical optimization methods and fast calculation methods, thereby verifying the effectiveness and feasibility of the method.
[0055] Furthermore, the variational autoencoder generates the daily average power while preserving the statistical characteristics of the scenario; the Markov chain samples the cross-day scenario transfer path; the vector autoregression model characterizes the intraday fluctuation correlation of wind, solar and load, and the verification index proves that the system safety boundary deviation is ≤0.49%, which meets the power grid dispatch specifications.
[0056] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0057] In summary, this invention solves the curse of dimensionality caused by high-dimensional integer variables through a dual innovation of relaxation-guided deep learning prediction and physical constraint-driven post-adjustment, breaking through the long-standing technical bottleneck of fast but inaccurate power balance in the field.
[0058] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0059] Figure 1 This is a schematic diagram of the process of the present invention;
[0060] Figure 2 Flowchart for training the condition analysis model of thermal power units;
[0061] Figure 3 The algorithm diagram is adjusted after the operating constraints of the thermal power unit are met.
[0062] Figure 4 A schematic diagram of a computer device provided in an embodiment of the present invention;
[0063] Figure 5 This is a block diagram of a chip provided according to an embodiment of the present invention.
[0064] Among them, 60. Computer equipment; 61. Processor; 62. Memory; 63. Computer program; 600. Electronic device; 610. Processing unit; 620. Storage unit; 6201. Random access memory unit; 6202. Cache memory unit; 6203. Read-only memory unit; 6204. Program / utility; 6205. Program module; 630. Bus; 640. Display unit; 650. Input / output interface; 660. Network adapter; 700. External device. Detailed Implementation
[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0067] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0068] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this invention generally indicates that the preceding and following objects have an "or" relationship.
[0069] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0070] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0071] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.
[0072] This invention provides a machine learning-based method for calculating power balance. By combining deep neural networks with optimization calculations and employing an integer variable reduction strategy, the operating states of most thermal power units are pre-determined using a Seq2Seq-Attention model. The model's input consists of relaxed solutions of the operating states and scenario curve data, while the output is the operating states of the thermal power units. This improves the calculation speed of power balance problems. The acceleration effect of this method is verified through the designed acceleration effect evaluation index and the acceleration effect verification method based on variable time scale scenario generation. The method has high accuracy and strong practicality.
[0073] Please see Figure 1 This invention discloses a machine learning-based method for calculating power balance. It employs a mathematical optimization model based on a daily-scale and hourly-scale power balance model. By using a Seq2Seq-Attention deep neural network to pre-determine the operating status of most thermal power units, it reduces integer variables in the mathematical optimization model, thereby improving both accuracy and speed. The specific steps are as follows:
[0074] S1. Solve the historical scenario through the power balance model to obtain detailed unit start-up and shutdown plans and output schemes. Use the start-up and shutdown plans of thermal power units as sample labels and use scenario curve data and relaxed solutions of operating status to train a deep neural network.
[0075] Historical scenario curve data includes: load curve, tie line curve, reservoir-type hydropower output curve, runoff-type hydropower resource curve, wind power resource curve, and photovoltaic resource curve.
[0076] S2. Based on the deep neural network model obtained in step S1, input the scene curve data and the relaxed solution of the thermal power unit's operating status, and obtain the predicted operating status of the thermal power unit through the thermal power unit's state analysis model.
[0077] Please see Figure 2 The state analysis model for thermal power units specifically includes a start-up probability analysis model and an operating state mapping model.
[0078] Start-up probability analysis model: The operation status analysis model first uses the start-up probability analysis model to obtain the predicted start-up probability of the thermal power unit. , Indicates thermal power unit i At any moment t The startup probability is a decimal value between [0,1]. The encoder encodes the relaxation solution of the operating state and the scene curve data into a fixed-length context vector, and the decoder decodes the context vector to obtain the predicted startup probability of the thermal power unit. During the encoding and decoding process, an attention mechanism is introduced, which allows the decoder to take into account the information at different positions in the encoder output when generating the output at each time step.
[0079] Specifically, an LSTM (Long Short-Term Memory) network is used to form the encoder and decoder; the structure of the LSTM memory unit will not be elaborated here. It should be noted that, due to the introduction of an attention mechanism, the decoder can consider information from different positions in the encoder output:
[0080]
[0081] The Teacher Forcing mode was used during encoder training, and its corresponding decoder is:
[0082]
[0083] The Seq2Seq model's decoder introduces an attention mechanism, using an additive approach to calculate weights:
[0084]
[0085] The relaxed solution of the input operating state and the scene curve data are processed by the Seq2Seq-Attention time series model to obtain the predicted start-up probability of the thermal power unit. This serves as the input for the subsequent running state mapping model.
[0086] Operating state mapping model: Based on the predicted start-up probability of thermal power units Then, use the following formula to... Mapped to the predicted operating state of thermal power units , The range of values is .
[0087]
[0088] in, The confidence threshold for predicting thermal power units is between 0 and 1, and is higher than 1. The predicted operating status of thermal power units is 1, which is lower than 1- The threshold for predicting the power-on state is 0, and the others are set to -1, meaning no prediction is made for the power-on state.
[0089] In the operational status analysis model, the interpretability of the model is enhanced in the following three aspects:
[0090] 1) In the start-up probability analysis model, the input of the model includes the relaxation solution of the operating state and the scenario curve data. The relaxation solution of the operating state reflects the information of the predicted operating state of the thermal power unit to a certain extent.
[0091] 2) The Attention mechanism is used to consider the weights of different input positions, and the relaxation solution of the operating state is adjusted by the deep learning model to consider the impact of scene curve data on the predicted start-up probability of thermal power units.
[0092] 3) In the operation state mapping model, only the operation state of some thermal power units is predicted. The operation state of other thermal power units is still determined by the optimization model, which makes the decision basis of the model more intuitive.
[0093] S3. Based on the predicted operating status of the thermal power unit obtained in step S2, and combined with the operating constraints of the thermal power unit, the predicted operating status obtained by the thermal power unit operating status analysis model is checked and adjusted by the state adjustment algorithm that satisfies the operating constraints of the thermal power unit, so as to obtain the adjusted operating status.
[0094] Please see Figure 3 The adjustment algorithm for the state after satisfying the operating constraints of thermal power units mainly includes the following steps:
[0095] S301. Predicted operating status of thermal power units Aggregation is performed according to time periods, that is, time periods with the same and adjacent predicted operating states are aggregated to obtain... and ,in Indicates thermal power unit i In the s The predicted operating status for a given time period, with values ranging from [value range]. , Indicates the first sThe length of a time period.
[0096] S302, Traverse the time periods aggregated in step S301, for each time period s There are several possibilities:
[0097] S3021, if Then skip the current time period directly, without needing to adjust the current time period.
[0098] S3022, if Furthermore, if the length of the current time period plus the length of the time calculated in step S303 satisfies the minimum start-up and shutdown time constraint, it indicates that the mathematical optimization model has a solution, and therefore there is no need to adjust the current time period.
[0099] S3023. In other cases, if no adjustment is made, the mathematical optimization model will have no solution. Adjustment will be made in step S304.
[0100] S303. Calculate the length of consecutive time periods before and after the current time period whose predicted running state is -1. That is, traverse other time periods forward and backward. When a time period with a predicted running state of 0 or 1 is encountered, the process ends. Otherwise, the length of the time period is accumulated.
[0101] S304. Adjust the current time period by directly setting all predicted operating statuses of thermal power units in the current time period to -1, indicating that the operating status of thermal power units cannot be determined.
[0102] The post-state adjustment algorithm addresses the issue that the operating state analysis model did not consider the operating constraints of thermal power units when predicting their operating states. It verifies and adjusts the predicted operating states, ultimately obtaining operating states that satisfy the operating constraints of thermal power units. This provides reasonable input for the subsequent rapid calculation of the mathematical optimization model and ensures the feasibility of the entire rapid calculation method.
[0103] S4. Based on the adjusted operating status obtained in step S3, the operating status of most thermal power units in the mathematical optimization model is fixed. Through the traditional mathematical optimization model, detailed unit start-up and shutdown plans and output schemes are obtained, and the acceleration effect based on the variable time scale scenario is verified.
[0104] The acceleration effect verification method based on variable timescale scene generation is mainly divided into three parts: a daily average power generation model based on variational autoencoder, a variable timescale scene sampling method based on Markov chain, and an intraday fluctuation power generation model based on vector autoregression.
[0105] The daily average power generation model based on variational autoencoder introduces a time embedding module (TMB):
[0106]
[0107] A variable time-scale scene sampling method based on Markov chains:
[0108] The discrete Markov chain model is used, which maps the context vector z to discrete states Z, i.e.
[0109]
[0110] The initial state is obtained from the sample through maximum likelihood estimation. probability , Representing state Transition to state The probability of:
[0111]
[0112] The state of the next day will be determined based on the state of the previous day and the Markov state transition matrix. P Random sampling yielded:
[0113]
[0114] Intraday volatility power generation model based on vector autoregression:
[0115] A vector autoregression model capable of characterizing strong data correlations is used to generate intraday fluctuating power curves for wind, solar, and load:
[0116]
[0117] Choose the option that minimizes either AIC or BIC. p As the optimal order of the model and It can be obtained through maximum likelihood estimation:
[0118]
[0119] The performance metrics for acceleration include the running status recognition rate, the running status prediction accuracy, the solution time to acceleration ratio, the objective function error, and the balance margin error.
[0120] Running status recognition rate:
[0121]
[0122] Operational status prediction accuracy:
[0123]
[0124] Solution time With acceleration ratio :
[0125]
[0126] The formula for calculating the objective function error is as follows:
[0127]
[0128] The formula for calculating the balance margin error is as follows:
[0129]
[0130] In another embodiment of the present invention, a power balance calculation system based on machine learning is provided. This system can be used to implement the above-mentioned power balance calculation method based on machine learning. Specifically, the power balance calculation system based on machine learning includes a scenario module, a training module, an adjustment module, and an output module.
[0131] The scenario module solves historical scenarios using a power balance model to generate unit start-up and shutdown plans and output schemes; it uses the start-up and shutdown plans of thermal power units as sample labels and trains a deep neural network by combining scenario curve data and operating status relaxation solutions.
[0132] The training module inputs the curve data of the scenario to be predicted and the relaxed solution of the operating status of the thermal power unit into the trained deep neural network, and outputs the predicted operating status of the thermal power unit through the thermal power unit status analysis model.
[0133] The adjustment module, based on the obtained predicted operating state and combined with the operating constraints of the thermal power unit, verifies and adjusts the operating state through the state adjustment method to obtain the adjusted operating state that meets the constraints.
[0134] The output module fixes the adjusted operating state, reduces integer variables in the mathematical optimization model, and obtains the final unit start-up and shutdown plan and output scheme through optimization solution.
[0135] This invention provides a terminal device comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used for the operation of a machine learning-based power balance calculation method, including:
[0136] Historical scenarios are solved using a power balance model to generate unit start-up and shutdown plans and output schemes. These plans are then used as sample labels, and a deep neural network is trained using scenario curve data and relaxed operating state solutions. The curve data of the scenario to be predicted and the relaxed operating state solutions of the thermal power units are input into the trained deep neural network, and the predicted operating state of the thermal power units is output through a thermal power unit state analysis model. Based on the obtained predicted operating state and combined with thermal power unit operating constraints, the operating state is checked and adjusted using a post-state adjustment method to obtain an adjusted operating state that satisfies the constraints. The adjusted operating state is then fixed, integer variables in the mathematical optimization model are reduced, and the final unit start-up and shutdown plan and output scheme are obtained through optimization.
[0137] Please see Figure 4 The terminal device is a computer device. In this embodiment, the computer device 60 includes a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When executed by the processor 61, the computer program 63 implements the method for estimating the concentration of radioactive iodine species in the containment vessel after an accident, as described in this embodiment. To avoid repetition, these details are not elaborated here. Alternatively, when executed by the processor 61, the computer program 63 implements the functions of each model / unit in the machine learning-based power balance calculation system of this embodiment. To avoid repetition, these details are not elaborated here.
[0138] Computer device 60 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. Computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will understand that... Figure 4 This is merely an example of computer device 60 and does not constitute a limitation on computer device 60. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.
[0139] The processor 61 may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0140] The memory 62 can be an internal storage unit of the computer device 60, such as a hard disk or RAM of the computer device 60. The memory 62 can also be an external storage device of the computer device 60, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device 60.
[0141] Furthermore, the memory 62 may include both internal storage units of the computer device 60 and external storage devices. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 can also be used to temporarily store data that has been output or will be output.
[0142] Please see Figure 5The terminal device is an electronic device 600, which is manifested in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0143] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.
[0144] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.
[0145] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0146] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.
[0147] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem). This communication can be performed via input / output interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network, wide area network, and / or public network, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0148] Example 4
[0149] This invention also provides a storage medium, specifically a computer-readable storage medium, which is a memory device in a terminal device for storing programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the terminal device and extended storage media supported by the terminal device; it can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). More specific examples of the computer-readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical fiber, portable compact disk read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0150] Computer-readable storage media also include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium can also be any readable medium other than a readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency, etc., or any suitable combination thereof.
[0151] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0152] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the machine learning-based power balance calculation method in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor to perform the following steps:
[0153] Historical scenarios are solved using a power balance model to generate unit start-up and shutdown plans and output schemes. These plans are then used as sample labels, and a deep neural network is trained using scenario curve data and relaxed operating state solutions. The curve data of the scenario to be predicted and the relaxed operating state solutions of the thermal power units are input into the trained deep neural network, and the predicted operating state of the thermal power units is output through a thermal power unit state analysis model. Based on the obtained predicted operating state and combined with thermal power unit operating constraints, the operating state is checked and adjusted using a post-state adjustment method to obtain an adjusted operating state that satisfies the constraints. The adjusted operating state is then fixed, integer variables in the mathematical optimization model are reduced, and the final unit start-up and shutdown plan and output scheme are obtained through optimization.
[0154] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0155] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0156] Case Analysis
[0157] To verify the effectiveness of the method of this invention, a virtual system was selected for case analysis. In terms of installed capacity of various power sources, thermal power units accounted for 58.857 million kilowatts, or 44.23% of the total installed capacity; wind power units accounted for 28.338 million kilowatts, or 21.30%; and photovoltaic units accounted for 34.605 million kilowatts, or 26.01%. This system has a large installed capacity of new energy sources, accounting for nearly 50% of the total installed capacity, making it a typical high-proportion new energy power system, which poses a challenge to power balance. Regarding data samples, three years of scenario curve data for this system were available. The annual operating data was calculated using mathematical optimization methods and used as sample labels. The operating data includes the unit start-up and shutdown plans and output schemes. For short-term timescale validation, eight scenarios were selected annually from 365 scenarios to form a validation set. These eight scenarios were: typical days of each of the four seasons, the scenario with the maximum total renewable energy, the scenario with the minimum total renewable energy, the scenario with the maximum net load, and the scenario with the maximum peak-to-valley difference in net load. The selected typical days for each of the four seasons were March 15th, June 15th, September 15th, and December 15th, resulting in a total of 24 scenarios selected for the validation set. It should be noted that in the scenario with the maximum peak-to-valley difference in net load, the peak-to-valley difference rate was 86.49%, indicating significant pressure on the system to regulate peak loads and reflecting the considerable difficulty in solving the model.
[0158] The parameter settings are divided into two parts: mathematical optimization method parameter settings and deep neural network parameter settings. In the mathematical optimization method parameter settings, the solver used is Gurobi, and the optimization calculation is performed on a computer with an AMD Ryzen Threadripper PRO 3995WX 64-Core processor and 256GB of memory. The gap value set during the solution is 0.1%. In the deep neural network parameter settings, the main parameter configurations are shown in Table 3-3, and the deep neural network is trained using an NVIDIA Tesla V100 32G graphics card.
[0159] The program developed using this method completed the adjustment process in 208.87 seconds during testing. All calculations were performed on a computer equipped with a 12th Gen Intel(R) Core(TM) i5-12500 3.00 GHz processor, and executed in MATLAB. System metrics after randomized simulation are shown in Table 1.
[0160] Table 1. Configuration of main parameters for deep neural networks
[0161]
[0162] Table 2 illustrates the differences in the fast calculation approach between the proposed fast calculation method and other methods:
[0163] Table 2. Differences between the method of the present invention and methods 1 and 2 in terms of rapid calculation approach.
[0164]
[0165] On a short timescale, Table 3 shows a comparison of the results of the method of the present invention with methods 1 and 2 in terms of operating status recognition rate and prediction accuracy. As can be seen from the table, the minimum operating status recognition rate of the method of the present invention is 82.53%, and the minimum operating status prediction accuracy is 98.36%. Compared with methods 1 and 2, the method of the present invention can simultaneously take into account both operating status recognition rate and prediction accuracy, and can accurately predict the operating status of most thermal power units while ensuring the acceleration effect.
[0166] In the 24 scenarios of the test set, scenarios 1, 14 and 19 are the scenarios with the maximum total renewable energy, scenarios 5, 13 and 17 are the scenarios with the minimum total renewable energy, scenarios 7, 15 and 23 are the scenarios with the maximum net load, and scenarios 6, 10 and 20 are the scenarios with the maximum peak-to-valley difference in net load. As can be seen from the table, in the above edge scenarios, the running status prediction accuracy of the fast calculation method is higher than that of methods 1 and 2, indicating that the method of the present invention has stronger robustness and stability in edge scenarios.
[0167] Table 3 compares the results of the fast calculation method with Method 1 and Method 2 in terms of running state recognition rate and prediction accuracy.
[0168]
[0169] Table 4 shows a comparison of the results of the fast calculation method and the mathematical optimization method in terms of computation time. As can be seen from the table, the fast calculation method reduces the average computation time from 140.749s to 9.448s, with an average speedup of 14.592 times, a maximum speedup of 131.661 times, and a minimum speedup of 1.136 times.
[0170] In edge scenarios, the average speedup of the fast calculation method is 21.587 times. Since edge scenarios are more complex and the optimization solution is more difficult, the calculation using mathematical optimization methods takes a long time. Therefore, the average speedup in edge scenarios is higher than the average speedup in all scenarios, and the speedup effect of the method of this invention is more obvious.
[0171] The fast calculation method involves two optimization solutions during the calculation process. The first optimization solution is to obtain the relaxed solution of the operating state through the linear relaxation model. The linear relaxation model is a linear model, which is less difficult to solve and faster than the mixed integer linear programming model. The second optimization solution is to determine the operating state of most thermal power units, which has reduced most of the integer variables. Only a small number of integer variables need to be determined, which also reduces the difficulty of the solution. Therefore, the fast calculation method has a shorter solution time.
[0172] Table 4 Comparison of results between fast calculation methods and mathematical optimization methods in terms of computation time.
[0173]
[0174] Table 5 shows a comparison of the results of the method of the present invention with those of methods 1 and 2 in terms of computation time. As can be seen from the table, the average computation time of method 1 is 9.004s and the average computation time of method 2 is 3.196s. For methods 1 and 2, since the relaxed solution of the thermal power unit's operating state is not used as the input of the neural network, there is no need to solve the linear relaxation model, and there is no post-adjustment of the predicted operating state, so the computation time is shorter than that of the method of the present invention.
[0175] Table 5 Comparison of the results of the fast calculation method with Method 1 and Method 2 in terms of computation time.
[0176]
[0177] Table 6 shows a comparison of the results of the fast calculation method and the mathematical optimization method in terms of objective function and balance margin. As can be seen from the table, the maximum value of the objective function error is 0.78%, the average value of the objective function error is 0.07%, the minimum value of the balance margin error is -3.00%, and the average value of the balance margin error is -0.01%.
[0178] In edge scenarios, as can be seen from the table, the average value of the objective function error is 0.02%, and the average value of the balance margin error is 0.23%. Compared with all scenarios, the average value of the objective function error is lower and the average value of the balance margin error is higher in edge scenarios, indicating that the method of the present invention can ensure the safety of power system operation while ensuring the objective function error in edge scenarios.
[0179] Table 6 Comparison of results between the fast calculation method and the mathematical optimization method in terms of objective function and balance margin.
[0180]
[0181] Table 7 shows a comparison of the results of the method of the present invention with those of methods 1 and 2 in terms of objective function and balance margin. As can be seen from the table, for methods 1 and 2, due to the low accuracy of the operation state prediction, the operation state of some key units is predicted incorrectly, resulting in load shedding in a small number of scenarios during the operation of the power system. The objective function deviation is large, and there is a certain error compared with the fast calculation method.
[0182] Table 7 Comparison of results of the fast calculation method with Method 1 and Method 2 in terms of objective function and balance margin dimension.
[0183]
[0184] In most edge scenarios, as can be seen from the table, the objective function error of the fast calculation method is lower than that of methods 1 and 2, while the balance margin error of the fast calculation method is higher than that of methods 1 and 2. This indicates that, compared with methods 1 and 2, the method of the present invention can better ensure the safety of power system operation while ensuring the objective function error, and better reflects the robustness and stability of the method of the present invention.
[0185] In summary, this invention presents a machine learning-based method and system for calculating power balance, comprising four modules: a feature selection strategy considering the relaxation of thermal power unit states, a deep learning-based analysis model of thermal power unit operating states, a post-adjustment algorithm satisfying the operating constraints of thermal power units, and a rapid mathematical optimization model for power balance calculation. This invention combines deep neural networks with optimization calculations. By using deep neural networks to predetermine the operating states of most thermal power units, it reduces integer variables in the mathematical optimization model, thereby improving the solution speed without significantly impacting the accuracy of the solution, while also ensuring the rationality of the solution results. The rationality and effectiveness of the rapid calculation method are verified on a short-term timescale using an algorithm from a provincial-level practical system.
[0186] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
Claims
1. A power balance calculation method based on machine learning, characterized in that, Includes the following steps: Historical scenarios are solved by power balance model to generate unit start-up and shutdown plans and output schemes; the start-up and shutdown plans of thermal power units are used as sample labels, and deep neural networks are trained by combining scenario curve data and operating status relaxation solutions. Scenario curve data includes load curves, tie line curves, reservoir-type hydropower curves, runoff-type hydropower resource curves, wind power resource curves and photovoltaic resource curves. The curve data of the scenario to be predicted and the relaxed solution of the thermal power unit's operating status are input into the trained deep neural network. The thermal power unit's state analysis model outputs the predicted operating status of the thermal power unit. The thermal power unit's state analysis model first outputs the predicted start-up probability of the thermal power unit through a Seq2Seq-Attention model. Then Mapped to predict running state The mapping rule is: in, To predict confidence thresholds for thermal power units. The range of values is ; Based on the obtained predicted operating status In conjunction with the minimum start-up and shutdown time constraints of thermal power units, the operating state is checked and adjusted using a post-state adjustment method to obtain an adjusted operating state that satisfies the constraints. The post-state adjustment method includes: Predicted operating status of thermal power units Aggregation is performed according to time periods, grouping adjacent times with the same predicted running state into a single time period. and ,in, Indicates thermal power unit i In the s The predicted operating status for a given time period, with values ranging from [value range]. , Indicates the first s The length of each time period; Calculate the duration of consecutive time periods before and after the current time period where the predicted running status is -1; If the time period obtained by traversing and aggregating is... Then skip the current time period directly; if Furthermore, the length of the current time period plus the calculated time period satisfies the minimum start-up and shutdown time constraint, so there is no need to adjust the current time period; otherwise, the predicted operating status of the thermal power units in the current time period will be adjusted to -1. By fixing the adjusted operating state, reducing the integer variables in the mathematical optimization model, and obtaining the final unit start-up and shutdown plan and output scheme through optimization solution.
2. The power balance calculation method based on machine learning according to claim 1, characterized in that, The condition analysis model for thermal power units includes: The start-up probability analysis model adopts a Seq2Seq-Attention model, using an LSTM network as the encoder-decoder base and introducing an additive attention mechanism. It takes the operating state relaxation solution and scene curve data as input and outputs the predicted start-up probability of the thermal power unit. ; Running state mapping model: predicts the probability of system startup. Mapped to the predicted operating status of thermal power units .
3. The power balance calculation method based on machine learning according to claim 2, characterized in that, The predicted start-up probability of thermal power units is obtained using a start-up probability analysis model. , Indicates thermal power unit i At any moment t The probability of powering on is a decimal value between [0,1]. The encoder encodes the relaxation solution of the running state and the scene curve data into a fixed-length context vector; The predicted start-up probability of the thermal power unit is then obtained by decoding the context vector through the decoder. During the encoding and decoding process, an attention mechanism is introduced, which allows the decoder to take into account the information at different positions in the encoder output when generating the output at each time step.
4. The power balance calculation method based on machine learning according to claim 2, characterized in that, In the operational status analysis model, the interpretability of the model is enhanced through the following three aspects: In the power-on probability analysis model, the inputs of the model include the relaxation solution of the running state and the scenario curve data; The Attention mechanism is used to consider the weights at different input positions, and the relaxation solution of the running state is adjusted by a deep learning model. In the operational status mapping model, the operational status of some thermal power units is predicted.
5. The power balance calculation method based on machine learning according to claim 1, characterized in that, After optimizing the solution to obtain the final unit start-up and shutdown plan and output scheme, the acceleration effect is verified based on the variable time scale scenario generation method, specifically: Daily average power is generated based on variational autoencoder, variable time scale scenario is sampled by Markov chain, and intraday fluctuating power is generated by vector autoregression model. The validation metrics include: operational status recognition rate, prediction accuracy, speedup ratio, objective function error, and balance margin error.
6. A power balance calculation system based on machine learning, characterized in that, include: The scenario module solves historical scenarios using a power balance model to generate unit start-up and shutdown plans and output schemes. Using the start-up and shutdown plans of thermal power units as sample labels, a deep neural network is trained by combining scenario curve data and operating status relaxation solutions. The scenario curve data includes load curves, tie line curves, reservoir-type hydropower generation curves, runoff-type hydropower resource curves, wind power resource curves, and photovoltaic resource curves. The training module inputs the curve data of the scenario to be predicted and the relaxed solution of the thermal power unit's operating state into the trained deep neural network. The thermal power unit's state analysis model then outputs the predicted operating state of the thermal power unit. This state analysis model first outputs the predicted start-up probability of the thermal power unit through a Seq2Seq-Attention model. Then Mapped to predict running state The mapping rule is: in, To predict confidence thresholds for thermal power units. The range of values is ; The adjustment module adjusts based on the obtained predicted operating status. In conjunction with the minimum start-up and shutdown time constraints of thermal power units, the operating state is checked and adjusted using a post-state adjustment method to obtain an adjusted operating state that satisfies the constraints. The post-state adjustment method includes: Predicted operating status of thermal power units Aggregation is performed according to time periods, grouping adjacent times with the same predicted running state into a single time period. and ,in, Indicates thermal power unit i In the s The predicted operating status for a given time period, with values ranging from [value range]. , Indicates the first s The length of each time period; Calculate the duration of consecutive time periods before and after the current time period where the predicted running status is -1; If the time period obtained by traversing and aggregating is... Then skip the current time period directly; if Furthermore, the length of the current time period plus the calculated time period satisfies the minimum start-up and shutdown time constraint, so there is no need to adjust the current time period; otherwise, the predicted operating status of the thermal power units in the current time period will be adjusted to -1. The output module fixes the adjusted operating state, reduces integer variables in the mathematical optimization model, and obtains the final unit start-up and shutdown plan and output scheme through optimization solution.
Citation Information
Patent Citations
Real-time predictive systems for intelligent energy monitoring and management of electrical power networks
CA2882796A1
A multi-objective optimization method considering uncertain cost of fan output
CN109256810A