Power grid active regulation deviation adjustment method and device based on multi-time scale, equipment and medium
By constructing a multi-timescale active power grid control method and using the gradient boosting tree algorithm to generate a multi-class probabilistic early warning model, the power grid risk level is quantified, solving the problem of difficulty in quantifying power grid operation state deviations and realizing the fine-grained adjustment and timeliness of power grid operation strategies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2026-02-24
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, the deviation between the power grid operating status and the prediction results is difficult to quantify, making it difficult to finely control the risk of power exceeding limits and affecting the timeliness and stability of strategy adjustments.
A multi-timescale active control method for power grids is constructed. By building a risk classification training set and a multi-class probabilistic early warning model, the gradient boosting tree algorithm is used for iterative training to generate a multi-class probabilistic early warning model, which quantifies the probability of the risk level of the power grid within the prediction window, and adjusts the operation strategy when the prediction probability is met.
It enables refined and quantitative control of power grid operation risks, improves the effectiveness and timeliness of power grid deviation adjustment, and can more proactively reflect the risk of power grid transmission lines exceeding limits, thereby optimizing operation strategies.
Smart Images

Figure CN122133996A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power regulation technology, and in particular to a method, device, equipment and medium for adjusting deviations in active power grid regulation based on multiple time scales. Background Technology
[0002] Against the backdrop of the accelerated construction of new power systems, the large-scale integration of high proportions of renewable energy into the power grid has led to a significant increase in the volatility and uncertainty of power transmission sections. This makes it easy for deviations to occur between the predicted and actual operating conditions of the power grid, thereby exacerbating the risk of power exceeding limits.
[0003] In related technologies, the risk identification of power limit exceedance is often based on simple threshold rules or deterministic prediction results. It can only give a judgment on whether the operating state has exceeded the limit, but it is difficult to provide a quantitative classification description of the degree of risk of exceeding the limit and its uncertainty. It is also difficult to form a refined risk judgment result at the target time within the prediction window, thus affecting the timeliness and stability of strategy adjustment. Summary of the Invention
[0004] This invention provides a method, device, equipment, and medium for adjusting deviations in active power grid control based on multiple time scales. This addresses the problem that existing technologies often rely solely on simple threshold rules or deterministic prediction results to correct deviations in power grid operation, making it difficult to provide quantitative results of over-limit risks for refined control. This invention provides a method for adjusting deviations in proactive power grid control based on multiple time scales, comprising: constructing a risk classification training set based on historical power grid operating data, wherein the risk classification training set includes multiple power grid feature vectors constructed based on the time-series statistical characteristics of the historical operating data, and risk labels corresponding to the power grid feature vectors; wherein the risk labels are determined based on historical operating data and the degree of congestion of transmission lines; constructing a multi-class logarithmic loss function based on the risk labels, and iteratively training the risk classification training set based on a gradient boosting tree algorithm with the goal of minimizing the multi-class logarithmic loss function to obtain a multi-class probabilistic early warning model; inputting the historical operating data into a pre-constructed prediction model to obtain predicted operating data of the power grid within a prediction window; inputting the predicted operating data corresponding to the target prediction time within the prediction window into the multi-class probabilistic early warning model to obtain the predicted probability of the power grid being at each risk level at the target prediction time; and adjusting the power grid operating strategy when the predicted probabilities meet preset conditions.
[0005] According to the multi-timescale active regulation deviation adjustment method for power grid provided by the present invention, the historical operating data includes the transmission power of power grid transmission lines; the process of determining the risk label includes: determining the load rate of the transmission line based on the transmission power and the transmission power limit of the transmission line; and assigning risk labels to the power grid feature vector according to multiple preset load rate thresholds.
[0006] According to the multi-timescale active control deviation adjustment method for power grid provided by the present invention, the multi-class probabilistic early warning model is composed of multiple decision trees; the gradient boosting algorithm includes performing a preset number of iterative training rounds, and weighting and superimposing the outputs of the decision trees obtained in each round of iteration according to the learning rate to form the multi-class probabilistic early warning model.
[0007] According to the multi-time-scale active power grid control deviation adjustment method provided by the present invention, the multi-class logarithmic loss function for:
[0008] Where N is the number of samples in the risk construction training set; c is the risk level category index, c=0,1,2,3,4; Construct a true label for the i-th sample in the training set belonging to category c for the risk; Let be the predicted probability of the i-th sample belonging to category c by the multi-class probability early warning model; For category weights.
[0009] According to the multi-time-scale active power grid control deviation adjustment method provided by the present invention, the category weights satisfy:
[0010] Among them, the This is a preset risk sensitivity coefficient.
[0011] The method for adjusting deviations in active power grid control based on multiple time scales provided by the present invention further includes performing probability calibration on the multi-class probabilistic early warning model after obtaining it, including: dividing an independent validation set from the data samples corresponding to the risk classification training set; determining temperature parameters based on the validation set; performing temperature scaling processing on the risk level category scores output by the multi-class probabilistic early warning model, and normalizing the risk level category scores for the same input sample to obtain the calibration prediction probability of the same input sample being at each risk level.
[0012] According to the multi-timescale active control deviation adjustment method for power grid provided by the present invention, the step of adjusting the operation strategy of the power grid when the predicted probability meets the preset conditions includes adjusting the operation strategy based on a pre-constructed active control model. The active control model is constructed with the objective function of minimizing power generation cost, and is expressed as follows:
[0013] Where T is the full scheduling period; Ng , Ngw , Np , Nw These represent the number of thermal power units, hydropower units, photovoltaic power units, and wind power units participating in the dispatching of the power grid, respectively. Let be the fuel cost for generating electricity for the i-th thermal power unit at time t. The deviation penalty term for the i-th hydropower unit from the planned output at time t. Let be the penalty function for the curtailment of solar power from the i-th photovoltaic unit at time t, which is used for peak shaving. Let be the penalty function for the wind curtailment of the i-th wind turbine at time t, which is used for peak shaving.
[0014] The present invention also provides a power grid deviation adjustment device, comprising: A risk classification training set construction module is used to construct a risk classification training set based on historical power grid operation data. The risk classification training set includes multiple power grid feature vectors constructed based on the time-series statistical characteristics of the historical operation data, and risk labels corresponding to the power grid feature vectors. The risk labels are determined based on historical operation data and the degree of congestion of transmission lines. The multi-class probability early warning model training module is used to construct a multi-class log loss function based on the risk label, and to perform iterative training on the risk classification training set based on the gradient boosting tree algorithm with the goal of minimizing the multi-class log loss function, so as to obtain the multi-class probability early warning model. The operation data prediction module is used to input the historical operation data into the pre-built prediction model in order to obtain the predicted operation data of the power grid within the prediction window; The strategy adjustment module is used to input the predicted operation data corresponding to the target prediction time within the prediction window into the multi-class probability early warning model to obtain the prediction probability of the predicted operation state corresponding to the target prediction time being at each risk level, and to adjust the operation strategy of the power grid when the prediction probability meets the preset conditions.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the power grid deviation adjustment device method as described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the power grid deviation adjustment device method as described above.
[0017] This invention provides a method, apparatus, equipment, and medium for adjusting deviations in active power grid regulation based on multiple time scales. It constructs a risk classification training set including risk labels, then builds a multi-class logarithmic loss function based on the risk labels, and trains a multi-class probabilistic early warning model using this function. Finally, it inputs the predicted operating data at the target prediction time into the multi-class probabilistic early warning model to obtain the predicted probability of the target prediction time being at each risk level, thereby adjusting the power grid's operating strategy. Because a multi-class probabilistic early warning model including risk labels is constructed, it can output a quantifiable predicted probability of the risk level at the target prediction time, thus enabling forward-looking and refined adjustments to the operating strategy. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a method for adjusting deviations in active power grid control based on multiple time scales according to an embodiment of the present invention; Figure 2 A schematic diagram illustrating the structure of a power grid deviation adjustment device according to an embodiment of the present invention is shown. Figure 3 A schematic diagram of the physical structure of an electronic device is provided. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this 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 this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0021] In related technologies, risk classification is often based on certain thresholds, but it is difficult to predict the probability of exceeding the limit within the future window, making it difficult to take corresponding control measures to prevent the occurrence of exceeding the limit in advance.
[0022] In view of this, the present invention provides a method for adjusting the deviation of active power grid control based on multiple time scales.
[0023] Figure 1 This is a flowchart of a method for adjusting deviations in active power grid control based on multiple time scales, according to an embodiment of the present invention.
[0024] like Figure 1 As shown, the active control deviation adjustment method for power grids based on multiple time scales includes operations S110~S140.
[0025] In operation S110, a risk classification training set is constructed based on the historical operation data of the power grid. The risk classification training set includes multiple power grid feature vectors constructed based on the time-series statistical characteristics of the historical operation data, as well as risk labels corresponding to the power grid feature vectors. The risk labels are determined based on the historical operation data and the degree of congestion of the transmission lines.
[0026] According to embodiments of the present invention, historical operating data may include voltage amplitude and phase angle of each node in the power grid, power, voltage and current amplitude of each transmission line, and may also include sensor data such as wind speed flowing through the lines and line temperature. For example, historical operating data can be collected at preset time intervals to form a corresponding time series.
[0027] According to an embodiment of the present invention, for each sampling window period (e.g., the past day or week), statistical measures such as the mean and variance of historical operating data are calculated, and these statistical measures are used to construct a power grid feature vector to reflect the operating status of the power grid at that moment.
[0028] For example, a risk label can be used to characterize the operational risk level of a transmission line at a certain moment. This operational risk level quantifies the degree to which the transmission line approaches or exceeds operational limits. The risk label can be represented using discrete levels; for instance, it can be divided into five risk levels from 0 to 4, corresponding to normal, low risk, medium risk, high risk, and emergency risk, respectively.
[0029] In operation S120, a multi-class log loss function is constructed based on the risk label. With the goal of minimizing the multi-class log loss function, the risk classification training set is iteratively trained based on the gradient boosting tree algorithm to obtain a multi-class probability early warning model.
[0030] According to an embodiment of the present invention, the risk classification training set can be represented as ,in For the power grid feature vector, This is a risk label.
[0031] For example, the multi-class probabilistic early warning model consists of multiple decision trees. The gradient boosting algorithm includes performing a preset number of iterative training rounds, and then weighting and summing the outputs of the decision trees obtained from each iteration according to the learning rate to form the multi-class probabilistic early warning model. The specific process is as follows: We can perform M iterations using a gradient boosting tree. The gradient boosting tree algorithm can be represented as:
[0032] in, This indicates that after M iterations, the power grid feature vector... The given risk category score; For learning rate, Let m be the m-th decision tree.
[0033] According to an embodiment of the present invention, the obtained risk category scores can be converted into normalized risk classification probabilities using the Softmax algorithm, so as to quantify the probability that the power grid's transmission lines fall into various risk levels.
[0034] In operation S130, historical operating data is input into a pre-built prediction model to obtain the predicted operating data of the power grid within the prediction window.
[0035] According to an embodiment of the present invention, the prediction model can be a CNN-BiLSRM model, including convolutional layers, pooling layers, bidirectional long short-term memory network layers, dropout layers, and fully connected layers. The output of the convolutional layers can be calculated using the following formula:
[0036] In the formula, h i It is the output of the convolutional layer, x i It is the input data, W h These are the weights of the convolutional layer, b h It's a bias. It is an activation function. Convolutional layers extract local features from sequential data to capture short-term patterns in time series. Pooling layers are then used to reduce feature dimensionality and computational complexity.
[0037] BiLSTM consists of two independent LSTM layers. The formula for the forward LSTM layer is as follows:
[0038] Among them, h t It is the output of the forward LSTM at time t, h t-1It is the output of the previous time step, x t It is the input at the current moment, W h and b h These are the weights and biases, respectively. is the sigmoid function, which compresses the output value to between 0 and 1. The formula for the inverse LSTM is as follows:
[0039] in, It is the output of the inverse LSTM at time t. It is the output of the previous moment. This is the input at the current time. and These are the weights and biases, respectively. The output of the bidirectional LSTM is as follows:
[0040] in, It is the final output of the bidirectional LSTM at time t.
[0041] In operation S140, the predicted operating data corresponding to the target prediction time in the prediction window is input into the multi-class probability early warning model to obtain the prediction probability of the predicted operating state at each risk level corresponding to the target prediction time. If the prediction probability meets the preset conditions, the operation strategy of the power grid is adjusted.
[0042] According to an embodiment of the present invention, the prediction window represents the time period to be predicted. Based on the prediction model, the predicted operation data corresponding to the target prediction time in the prediction window can be obtained. Based on the predicted operation data, a corresponding power grid feature vector is constructed, and the power grid feature vector is input into the multi-class probabilistic early warning model.
[0043] For example, a multi-class probabilistic early warning model can output a multi-dimensional probability vector: [p0, p1, ..., p n ], and p0+…+p n =1, thus obtaining the predicted probability that the power grid or transmission line is at each risk level at the target prediction time.
[0044] According to an embodiment of the present invention, the preset condition can be a prediction probability threshold. For example, when p4 corresponds to the emergency risk level, the prediction probability threshold can be set to 0.5. When p4 is greater than or equal to 0.5, the power grid operation strategy is adjusted. In another embodiment, the preset condition can also be a combined prediction probability threshold. For example, when p2 and p3 correspond to the moderate risk level and the severe risk level, respectively, the preset condition can be determined as follows: This allows for adjustments to be made by combining different predicted probabilities.
[0045] By constructing a multi-class probabilistic classification early warning model through the above settings, the probability of the power grid being located within each risk level can be predicted. Within the prediction window, the congestion risk of the power grid transmission lines can be classified and quantitatively characterized. Compared with the existing technology that relies solely on a single threshold or deterministic judgment method, this approach can more proactively reflect the risk of the power grid transmission lines exceeding the limit and provide corresponding guidance for further adjustments to the operation strategy, thereby improving the effectiveness and timeliness of power grid deviation adjustments.
[0046] In one illustrative embodiment, historical operating data includes the transmission power of power grid transmission lines. The process for determining risk labels includes: determining the load factor of the transmission lines based on their transmission power and transmission power limits; and assigning risk labels to power grid feature vectors according to multiple preset load factor thresholds.
[0047] According to an embodiment of the present invention, the load factor of a transmission line b can be calculated using the following formula:
[0048] Where LLF is the load factor of transmission line b. S b This is the transmission power of line b. S b,max This refers to the transmission power limit set by line b in accordance with relevant power system safety and stability regulations. The transmission power limit is given by the dispatching department.
[0049] For example, risk labels can be categorized based on a table like the one below: Table 1. Risk Category Scenarios Based on Line Load Rate
[0050] In one illustrative embodiment, the multi-class log loss function for:
[0051] Where N is the number of samples in the risk construction training set; c is the risk level category index, c=0,1,2,3,4; Construct a true label for the i-th sample in the training set that belongs to category c for risk; This is the predicted probability of the i-th sample belonging to category c in a multi-class probability early warning model. For category weights.
[0052] In practice, severe grid blockages or faults, representing high-risk conditions, are low-probability events, with a sample size far smaller than that of normal or low-risk conditions. Using an unweighted conventional loss function, the model may be influenced by a larger number of low-risk and normal cases during training, leading to a higher false negative rate for high-risk faults. By introducing class weights into the loss function, different penalty coefficients can be assigned to different risk levels. This approach allows the gradient boosting tree algorithm to focus more on feature learning from high-risk samples (such as severe and emergency risks) during iteration, effectively improving the multi-class probabilistic early warning model's ability to issue timely warnings for potential severe and emergency risks.
[0053] For example, the category weights satisfy:
[0054] in, This is a preset risk sensitivity coefficient.
[0055] For example, when When the emergency risk category (c=4) has a weight of 2.2, it is much higher than the weight of 1.0 when the normal situation (c=0) has a weight of 1.0. During training, it can be given more attention, which improves the model's recall rate for emergency risks.
[0056] In one illustrative embodiment, the multi-timescale-based active power grid control deviation adjustment method further includes probabilistic calibration of the multi-class probabilistic early warning model after obtaining it. This includes: dividing an independent validation set from the data samples corresponding to the risk classification training set; determining temperature parameters based on the validation set; performing temperature scaling on the risk level category scores output by the multi-class probabilistic early warning model; and normalizing the risk level category scores for the same input sample to obtain the calibration prediction probability of the same input sample at each risk level.
[0057] Because the probability output directly by the Softmax function of gradient boosting trees often suffers from confidence miscalibration, the probability value cannot truly reflect its accurate frequency.
[0058] Therefore, calibration can be performed by introducing a single-parameter temperature scaling layer. Specifically, a validation set is first delineated from the historical operating data corresponding to the risk classification training set, and this validation set is independent of the risk classification training set.
[0059] Furthermore, a scalar parameter, namely the temperature parameter, is introduced into the Softmax output layer to construct a calibration model with a temperature parameter: the calibrated prediction probability. The calculation formula is as follows:
[0060] in, The risk category score output by the multi-class probabilistic early warning model; The temperature parameter is to be determined; K is the total number of risk categories.
[0061] Based on the above formula, the risk category score can be scaled by adjusting the size of T to make the score distribution smoother, thereby reducing the confidence level when the output result of the multi-class probability early warning model is too extreme.
[0062] Therefore, the temperature parameter can be determined based on the validation set. Specifically, the optimization objective can be minimized on the validation set, and the solution can be performed on the validation set as follows:
[0063] in, For the validation set, For the true label of the sample, These are the temperature parameters determined through the validation set.
[0064] After determining the temperature parameters, the scores of each risk level category for the same input sample are normalized to obtain the calibrated predicted probability of the same input sample being located at each risk level.
[0065] In one illustrative embodiment, the power grid operation strategy is adjusted when the predicted probability meets preset conditions, including adjusting the operation strategy based on a pre-built active control model.
[0066] The active control model is constructed with the objective function of minimizing power generation cost, and is expressed as:
[0067] Where T is the full scheduling period; Ng , Ngw , Np , Nw These represent the number of thermal power units, hydropower units, photovoltaic power units, and wind power units participating in the dispatching of the power grid, respectively. Let be the fuel cost for generating electricity for the i-th thermal power unit at time t. The deviation penalty term for the i-th hydropower unit from the planned output at time t. Let be the penalty function for the curtailment of solar power from the i-th photovoltaic unit at time t, which is used for peak shaving. Let be the penalty function for the wind curtailment of the i-th wind turbine at time t, which is used for peak shaving.
[0068] The fuel cost for power generation by thermal power units is:
[0069] in, P gi (t) express t Time of the first i The active power generated by the generator unit. a i , b i , c i This is the coefficient of the fuel cost curve for this unit.
[0070] Generally, the power grid plans the amount of electricity to be used for power generation in the next day based on the operation of the reservoir. The current dispatching method is to ensure that the output of each hydropower station participating in the dispatching in the next day is strictly equal to the daily planned output. Therefore, in this embodiment, in order to ensure that the hydropower units provide system backup while ensuring that the hydropower output meets the daily power generation plan as much as possible, it is included in the objective function in the form of deviation from the daily planned output.
[0071] The calculation method for the penalty for deviation of hydropower unit output from the plan is as follows.
[0072]
[0073] in, For hydroelectric generator units exist The plan to contribute to the day's schedule For hydroelectric generator units exist Constant effort For example, as a penalty factor for hydropower units, The penalty function for discarding light to participate in peak tuning is:
[0074] The penalty function for wind curtailment participating in peak shaving is:
[0075] in, α i and β i They represent the first i The curtailment penalty factor of the photovoltaic unit and the first i Wind curtailment penalty factor for each wind turbine unit; P pi.fore (t) and P wi.fore (t) For the photovoltaic unit or wind turbine unit respectively t Predicting maximum output at any given moment; Ppi (t) and P wi (t) This contributes to actual power dispatch. By setting a penalty function for the difference between the two, wind and solar power curtailment can be avoided as much as possible while satisfying grid load balance.
[0076] In one illustrative embodiment, the constraints on the operating strategy are as follows: Peak shaving constraints for thermal power units: 1) Output limit constraint
[0077] P gi.min and P gi.max The first i The upper and lower limits of the output of a thermal power unit. The upper limit of the output of a thermal power unit is generally the installed capacity of the unit.
[0078] 2) Unit ramp-up constraints
[0079] in, P gi.min and P gi.max For the first i The upper and lower limits of the output of the No. 1 thermal power unit and This refers to the unit's climbing ability per unit time. Δt The scheduling time scale.
[0080] Hydropower unit constraints: 1) Output limit constraint
[0081] 2) Unit ramp-up constraints
[0082] in, P gwi.min and P gwi.max For the first i The upper and lower limits of the output of the No. 1 hydropower unit and This refers to the unit's uphill and downhill climbing ability per unit time. 3) Water Constraints Hydropower conversion relationship
[0083] Water Constraint
[0084] in, The hydroelectric conversion constant, For hydroelectric conversion efficiency, The water head height, Let be the reservoir capacity at time t of reservoir i. For reservoir Maximum storage capacity For reservoir The minimum storage capacity.
[0085] 4) Deviation constraints from the plan during the scheduling period
[0086] in, is the relaxation coefficient.
[0087] Curtailment of wind and solar power peak shaving constraints: Both wind and solar power outputs should be positive and should not exceed the maximum predicted output.
[0088]
[0089] In one illustrative embodiment, the predicted operational data is input into a multi-class probability early warning model. Under the condition that preset conditions are met, an initial control strategy is output (exemplarily, the control time is greater than 60 minutes), and active control is carried out based on the active control model. As time approaches, in the medium-term (exemplarily, the control time is greater than 30 minutes) and short-term (exemplarily, the control time is greater than 15 minutes) periods, the updated predicted operational data is used to continuously adjust the deviation of the control measures.
[0090] According to an embodiment of the present invention, when the multi-class probability early warning model detects that the future risk has been eliminated (exemplarily, the probability of the normal situation is 100%), the regulation is stopped.
[0091] The power grid deviation adjustment device provided by the present invention is described below. The power grid deviation adjustment device described below can be referred to in correspondence with the power grid active control deviation adjustment method based on multiple time scales described above.
[0092] Figure 2 The diagram illustrates the structure of a power grid deviation adjustment device according to an embodiment of the present invention.
[0093] According to an embodiment of the present invention, the power grid deviation adjustment device 200 includes a risk classification training set construction module 210, a multi-class probabilistic early warning model training module 220, an operation data prediction module 230, and a strategy adjustment module 240.
[0094] The risk classification training set construction module 210 is used to construct a risk classification training set based on the historical operation data of the power grid. The risk classification training set includes multiple power grid feature vectors constructed based on the time-series statistical characteristics of the historical operation data, as well as risk labels corresponding to the power grid feature vectors. The risk labels are determined based on the historical operation data and the degree of congestion of the transmission lines.
[0095] The multi-class probabilistic early warning model training module 220 is used to construct a multi-class log loss function based on risk labels, and to minimize the multi-class log loss function, it iteratively trains the risk classification training set based on the gradient boosting tree algorithm to obtain the multi-class probabilistic early warning model.
[0096] The operation data prediction module 230 is used to input historical operation data into a pre-built prediction model to obtain the predicted operation data of the power grid within the prediction window.
[0097] The strategy adjustment module 240 is used to input the predicted operation data corresponding to the target prediction time in the prediction window into the multi-class probability early warning model to obtain the prediction probability of the predicted operation state corresponding to the target prediction time being at each risk level, and to adjust the power grid operation strategy when the prediction probability meets the preset conditions.
[0098] Figure 3 An example is a schematic diagram of the physical structure of an electronic device. For example... Figure 3 As shown, the electronic device may include a processor 310, a communication interface 320, a memory 330, and a communication bus 340. The processor 310, communication interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logic instructions from the memory 330 to execute a multi-time-scale-based active power grid control deviation adjustment method.
[0099] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0100] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the multi-time-scale active control deviation adjustment method for the power grid provided by the above methods.
[0101] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the X-based multi-time-scale active control deviation adjustment method for power grids provided by the methods described above.
[0102] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for adjusting deviations in active power grid control based on multiple time scales, characterized in that, include: A risk classification training set is constructed based on historical power grid operation data. The risk classification training set includes multiple power grid feature vectors constructed based on the time-series statistical characteristics of the historical operation data, and risk labels corresponding to the power grid feature vectors. The risk labels are determined based on historical operation data and the degree of congestion of transmission lines. A multi-class log loss function is constructed based on the risk labels, and the risk classification training set is iteratively trained based on the gradient boosting tree algorithm with the goal of minimizing the multi-class log loss function, so as to obtain a multi-class probability early warning model. The historical operating data is input into a pre-built prediction model to obtain the predicted operating data of the power grid within the prediction window; The predicted operating data corresponding to the target prediction time within the prediction window is input into the multi-class probability early warning model to obtain the predicted probability of the predicted operating state corresponding to the target prediction time being at each risk level. When the predicted probability meets the preset conditions, the operation strategy of the power grid is adjusted.
2. The method for adjusting deviations in active power grid control based on multiple time scales according to claim 1, characterized in that, The historical operating data includes the transmission power of the power grid transmission lines; The process for determining the risk label includes: The load rate of the transmission line is determined based on its transmission power and transmission power limit. Risk labels are assigned to the power grid feature vectors based on multiple preset load rate thresholds.
3. The method for adjusting deviations in active power grid control based on multiple time scales according to claim 1, characterized in that, The multi-class probability early warning model consists of multiple decision trees; The gradient boosting algorithm includes performing a preset number of iterative training rounds, and weighting and superimposing the outputs of the decision trees obtained from each round of iterations according to the learning rate to form the multi-class probability early warning model.
4. The method for adjusting deviations in active power grid control based on multiple time scales according to claim 1, characterized in that, The multi-class log loss function for: Where N is the number of samples in the risk construction training set; c is the risk level category index, c=0,1,2,3,4; Construct a true label for the i-th sample in the training set belonging to category c for the risk; Let be the predicted probability of the i-th sample belonging to category c by the multi-class probability early warning model; For category weights.
5. The method for adjusting deviations in active power grid control based on multiple time scales according to claim 4, characterized in that, The category weights satisfy: Among them, the This is a preset risk sensitivity coefficient.
6. The method for adjusting deviations in active power grid control based on multiple time scales according to claim 1, characterized in that, It also includes performing probability calibration on the multi-class probability early warning model after obtaining the model, including: A separate validation set is derived from the data samples corresponding to the risk classification training set; Temperature parameters are determined based on the validation set; Temperature scaling is applied to the risk level category scores output by the multi-class probability early warning model, and the risk level category scores of the same input sample are normalized to obtain the calibrated prediction probability of the same input sample being at each risk level.
7. The method for adjusting deviations in active power grid control based on multiple time scales according to claim 1, characterized in that, The adjustment of the power grid operation strategy when the predicted probability meets the preset conditions includes adjusting the operation strategy based on a pre-built active control model. The active control model is constructed with the objective function of minimizing power generation cost, and is expressed as follows: Where T is the full scheduling period; Ng , Ngw , Np , Nw These represent the number of thermal power units, hydropower units, photovoltaic power units, and wind power units participating in the dispatching of the power grid, respectively. Let be the fuel cost for generating electricity for the i-th thermal power unit at time t. The deviation penalty term for the i-th hydropower unit from the planned output at time t. Let be the penalty function for the curtailment of solar power from the i-th photovoltaic unit at time t, which is used for peak shaving. Let be the penalty function for the wind curtailment of the i-th wind turbine at time t, which is used for peak shaving.
8. A power grid deviation adjustment device, characterized in that, include: A risk classification training set construction module is used to construct a risk classification training set based on historical power grid operation data. The risk classification training set includes multiple power grid feature vectors constructed based on the time-series statistical characteristics of the historical operation data, and risk labels corresponding to the power grid feature vectors. The risk labels are determined based on historical operation data and the degree of congestion of transmission lines. The multi-class probability early warning model training module is used to construct a multi-class log loss function based on the risk label, and to perform iterative training on the risk classification training set based on the gradient boosting tree algorithm with the goal of minimizing the multi-class log loss function, so as to obtain the multi-class probability early warning model. The operation data prediction module is used to input the historical operation data into the pre-built prediction model in order to obtain the predicted operation data of the power grid within the prediction window; The strategy adjustment module is used to input the predicted operation data corresponding to the target prediction time within the prediction window into the multi-class probability early warning model to obtain the prediction probability of the predicted operation state corresponding to the target prediction time being at each risk level, and to adjust the operation strategy of the power grid when the prediction probability meets the preset conditions.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the multi-timescale active control deviation adjustment method for power grids as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multi-time-scale active control deviation adjustment method for power grids as described in any one of claims 1 to 7.