Power virtual energy storage control method based on multi-energy complementation
By adaptively adjusting the learning rate of the XGBoost model, the accuracy of power load forecasting is solved, the operating efficiency and response speed of the virtual energy storage system are improved, and the accuracy of energy dispatch and system stability are ensured.
Patent Information
- Application Number
- CN202510956233.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-07-11
AI Technical Summary
The fixed learning rate in the traditional XGBoost model is difficult to adapt to the dynamic changes in power load, resulting in insufficient prediction accuracy and stability of the power virtual energy storage system, which affects the system's operating efficiency and response speed.
By adaptively adjusting the learning rate of the XGBoost model, and combining the prediction performance of the loss function and decision tree, the direction and magnitude of the learning rate are dynamically adjusted to improve the accuracy of power load forecasting.
It improves the operating efficiency and response speed of the power virtual energy storage system, ensures the accuracy of energy absorption and release scheduling plans, and enhances the system's safety and economy.
Smart Images

Figure CN120855429B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric power information, in particular to a power virtual energy storage control method based on multi-energy complementation. BACKGROUND
[0002] Power virtual energy storage is a concept of power system management and energy storage, which uses the convertibility and controllability between different energy carriers to transfer or buffer the excess or shortage of electricity through other energy forms, so as to realize more efficient and more sustainable power supply, solve the uncertainty of renewable energy and the change of power demand, and improve the reliability and economy of the power network. However, there are time efficiency differences and complex energy conversion paths between different energies. In order to make the entire power virtual energy storage system respond flexibly and accurately to the changes of power load, it is necessary to make a scheduling plan for the energy absorption and release of various multi-energy load devices based on the prediction results of power load.
[0003] Since power load is affected by many factors, including time, environmental conditions, user behavior and equipment operating state, load data usually has nonlinear, high-dimensional and complex time-varying characteristics, so the XGBoost model is used to predict power load in the traditional way to provide a data basis for making a scheduling plan for the energy absorption and release of various multi-energy load devices.
[0004] The XGBoost model is a gradient boosting tree model, which builds decision trees iteratively and accumulates the prediction results of each decision tree to get the final prediction value, where the contribution of each tree to the final prediction value is controlled by the learning rate. In the traditional XGBoost model, a fixed learning rate is used to get the final prediction result, while multi-energy load is affected by multiple factors such as environment, user behavior, equipment state, and power load fluctuation varies significantly in different time periods and scenarios. The data is complex and unstable, and the fixed learning rate is difficult to adapt to such dynamic changes. If the learning rate is too high, it may cause the model to overfit some stage data during training; if the learning rate is too low, it may cause the model to learn insufficiently when the change is drastic, limiting the convergence speed and fitting quality of the model, reducing the overall accuracy and stability of the prediction, and further causing the scheduling plan for the energy absorption and release of various multi-energy load devices to deviate from the actual demand, which may result in insufficient or waste of scheduling resources, affecting the operation efficiency and response speed of the power virtual energy storage system, and even causing energy allocation imbalance, reducing the safety and economy of the system.
[0005] Therefore, how to accurately predict power load and further improve the operation efficiency and response speed of the power virtual energy storage system has become a problem to be solved. SUMMARY
[0006] Therefore, the embodiment of the present application provides a power virtual energy storage control method based on multi-energy complementation to solve the problem of how to accurately predict power load and improve the operation efficiency and response speed of the power virtual energy storage system.
[0007] The embodiment of the present application provides a power virtual energy storage control method based on multi-energy complementation, which comprises the following steps:
[0008] In the power system, at least one key feature for predicting the power load is obtained, and the historical data of each key feature at different time nodes is obtained, and all the key features and the historical data are taken as an input set of an XGBoost model;
[0009] In the process of predicting the power load by using the XGBoost model according to the input set, for any iteration, if the any iteration is a non-first iteration, a direction adjustment factor of a learning rate after the any iteration is obtained according to a loss function in the XGBoost model;
[0010] According to the historical data distribution of each key feature in the any iteration and the prediction effect of the decision tree after the any iteration, a comprehensive adjustment amplitude of the learning rate after the any iteration is obtained;
[0011] According to the direction adjustment factor and the comprehensive adjustment amplitude, an adaptive learning rate after the any iteration is obtained, the adaptive learning rate after each iteration in the process of predicting the power load by using the XGBoost model is obtained, the final prediction value of the power load output by the XGBoost model is obtained according to the adaptive learning rate after each iteration, and the energy of the power system is balanced by using the virtual energy storage technology according to the final prediction value of the power load.
[0012] Preferably, the direction adjustment factor of the learning rate after the any iteration is obtained according to the loss function in the XGBoost model, comprising:
[0013] In the input set, the historical data of all the key features in the process of the any iteration is composed into a data subset, the loss function in the XGBoost model is obtained, the second derivative values of the loss function at each data in the data subset are calculated respectively, the variance of all the second derivative values is calculated, and the data sensitivity in the process of the any iteration is obtained.
[0014] obtaining the data sensitivity in the process of each iteration before the any iteration, obtaining the median of all data sensitivities, calculating the absolute value of the difference between the data sensitivity in the process of the any iteration and the median, obtaining the first data sensitive deviation degree in the process of the any iteration, taking the inverse of the first data sensitive deviation degree as the independent variable of the exponential function with the natural constant as the base, obtaining the first stability degree in the process of the any iteration;
[0015] composing the historical data of each key feature in the input set into a data total set, respectively calculating the second derivative value of the loss function at each data in the data total set, calculating the average value of the second derivative values corresponding to all data in the data total set, denoted as the second derivative value average, respectively calculating the absolute value of the difference between the second derivative value corresponding to each data in the data subset and the second derivative value average, accumulating all absolute value differences to obtain the second data sensitive deviation degree in the process of the any iteration, taking the inverse of the second data sensitive deviation degree as the independent variable of the exponential function with the natural constant as the base, obtaining the second stability degree in the process of the any iteration;
[0016] calculating the average value between the first stability degree and the second stability degree to obtain the comprehensive stability degree in the process of the any iteration;
[0017] obtaining the adjustment direction factor of the learning rate after the any iteration according to the comprehensive stability degree in the process of the any iteration.
[0018] Preferably, the adjustment direction factor of the learning rate after the any iteration is obtained according to the comprehensive stability degree in the process of the any iteration, comprising:
[0019] if the comprehensive stability degree in the process of the any iteration is greater than a preset stability degree threshold, the adjustment direction factor of the learning rate after the any iteration is set to 1;
[0020] if the comprehensive stability degree in the process of the any iteration is less than a preset stability degree threshold, the adjustment direction factor of the learning rate after the any iteration is set to -1;
[0021] if the comprehensive stability degree in the process of the any iteration is equal to a preset stability degree threshold, the adjustment direction factor of the learning rate after the any iteration is set to 0.
[0022] Preferably, the comprehensive adjustment amplitude of the learning rate after the any iteration is obtained according to the historical data distribution of each key feature in the any iteration and the prediction effect of the decision tree after the any iteration, comprising:
[0023] obtaining a first adjustment range of the learning rate after the any iteration according to the historical data distribution of the key features in the any iteration;
[0024] obtaining the actual value of the power load at different time nodes, and the output results of the objective function after the any iteration and the previous iteration, and obtaining a second adjustment range of the learning rate after the any iteration according to the difference between the output results corresponding to the any iteration and the previous iteration, and the difference between the prediction result of the decision tree after the any iteration and the actual value of the power load;
[0025] normalizing the sum of the first adjustment range and the second adjustment range to obtain a comprehensive adjustment range of the learning rate after the any iteration.
[0026] Preferably, the first adjustment range of the learning rate after the any iteration is obtained according to the historical data distribution of the key features in the any iteration, comprising:
[0027] obtaining the information gain of each key feature in the any iteration, and linearly normalizing the average value of all information gains to obtain the influence degree of all key features in the any iteration on the any iteration;
[0028] in the input set, obtaining the historical data of each key feature in the any iteration to obtain a feature data set of each key feature in the any iteration, calculating the variance of all data in each feature data set, and linearly normalizing the average value of all variances to obtain the distribution stability degree of all key features in the any iteration;
[0029] calculating the sum of the influence degree and the distribution stability degree to obtain the first adjustment range of the learning rate after the any iteration.
[0030] Preferably, the second adjustment range of the learning rate after the any iteration is obtained according to the difference between the output results corresponding to the any iteration and the previous iteration, and the difference between the prediction result of the decision tree after the any iteration and the actual value of the power load, comprising:
[0031] calculating the absolute value of the difference between the output result corresponding to the previous iteration and the output result corresponding to the any iteration, taking the inverse of the absolute value as the independent variable of the exponential function with the natural constant as the base, to obtain a first prediction effect feature value of the power load prediction after the any iteration;
[0032] In the input set, the historical data of each key feature under each time node is respectively formed into a sample set, the sample set in any iteration is obtained, denoted as a target sample set, the predicted value after the end of each target sample set in the any iteration is obtained, and the actual value of the power load under the time node of each target sample set is obtained, the absolute value of the difference between the predicted value and the actual value corresponding to each target sample set is calculated, a prediction residual is obtained, the variance of all prediction residuals is calculated, the inverse of the variance of all prediction residuals is taken as the independent variable of the exponential function with the natural constant as the base number, and a second prediction effect characteristic value for predicting the power load after the end of the any iteration is obtained.
[0033] The sum between the first prediction effect characteristic value and the second prediction effect characteristic value is calculated, and a second adjustment range of the learning rate after the end of the any iteration is obtained.
[0034] Preferably, the adaptive learning rate after the end of the any iteration is obtained according to the adjustment direction factor and the comprehensive adjustment range, including:
[0035] The product between the adjustment direction factor and the comprehensive adjustment range is calculated, and the sum between a constant 1 and the product is denoted as an adjustment coefficient of the learning rate after the end of the any iteration;
[0036] The learning rate after the end of the last iteration of the any iteration is obtained, the product between the learning rate after the end of the last iteration and the adjustment coefficient of the learning rate after the end of the any iteration is calculated, and the adaptive learning rate after the end of the any iteration is obtained.
[0037] Compared with the prior art, the embodiment of the present application has the beneficial effects that:
[0038] The application obtains at least one key feature for predicting power load and historical data of each key feature at different time nodes in a power system, and takes all the key features and historical data as an input set of an XGBoost model; in the process of predicting power load by using the XGBoost model according to the input set, for any iteration, if the any iteration is a non-first iteration, an adjustment direction factor of a learning rate after the any iteration is obtained according to a loss function in the XGBoost model; a comprehensive adjustment amplitude of the learning rate after the any iteration is obtained according to the historical data distribution of each key feature in the any iteration and the prediction effect of a decision tree after the any iteration; the adaptive learning rate after the any iteration is obtained according to the adjustment direction factor and the comprehensive adjustment amplitude, the adaptive learning rate after each iteration in the process of predicting power load by using the XGBoost model is obtained, the final predicted value of power load output by the XGBoost model is obtained according to the adaptive learning rate after each iteration, and the energy of the power system is balanced by using virtual energy storage technology according to the final predicted value of power load. Wherein, the stability degree in the process of each iteration is reflected by the loss function in the XGBoost model, and then the adjustment direction factor of the learning rate after each iteration is obtained to determine the adjustment direction strategy of the learning rate; then the comprehensive adjustment amplitude of the learning rate after each iteration is obtained according to the data distribution of each key feature in each iteration and the prediction effect of the predicted value after each iteration, and finally the adaptive learning rate after each iteration is obtained according to the adjustment direction factor and the comprehensive adjustment amplitude of the learning rate after each iteration, which improves the accuracy of predicting power load by using the XGBoost model, and then more accurate and effective scheduling plan of energy absorption and release can be obtained, and the operation efficiency and response speed of the power virtual energy storage system are improved. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0040] Figure 1 is a method flow chart of a power virtual energy storage control method based on multi-energy complementation provided by the first embodiment of the present application. DETAILED DESCRIPTION
[0041] Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. The embodiments described below by reference to the drawings are exemplary and are intended to explain the present disclosure, and are not to be understood as limiting the present disclosure.
[0042] It should be noted that the terms "first", "second", and the like in the description of the present disclosure and the above drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0043] In order to illustrate the technical solutions of the present application, the following will be described by specific embodiments.
[0044] Referring to Figure 1 , a method flowchart of a power virtual energy storage control method based on multi-energy complementarity provided by Embodiment One of the present application is shown in Figure 1 , the method can include:
[0045] Step S101, in the power system, at least one key feature for predicting power load is obtained, as well as historical data of each key feature at different time nodes, and all key features and historical data are taken as an input set of an XGBoost model.
[0046] At least one key feature for predicting power load in the power system is obtained, such as power load power, time characteristics (hours, weekdays / weekends, seasons, etc.), weather characteristics (temperature, humidity, solar intensity, etc.), virtual energy storage specific characteristics (number of devices participating in virtual energy storage, capacity of devices participating in virtual energy storage, state of charge equivalent indicators, etc.), etc. According to the power load prediction period, assuming that it is predicted once a week, in the operation log of the power system, the historical data of each key feature at each recorded time node (assuming that it is recorded once a minute) in the current prediction period and the last prediction period is obtained, and all key features and historical data are taken as an input set of an XGBoost model, which is used to predict the power load of the power system in the future period by using the XGBoost model, and based on the prediction result, energy absorption and release scheduling plans of various multi-energy load devices are made in advance to ensure that the virtual energy storage responds on demand, equivalent supports the key links of power system regulation requirements, etc.
[0047] In step S102, in the process of predicting the power load by using the XGBoost model according to the input set, for any iteration, if the any iteration is a non-first iteration, a direction factor of adjusting the learning rate after the any iteration is obtained according to a loss function in the XGBoost model.
[0048] The XGBoost model is a gradient boosting tree model, which constructs decision trees by iteration and accumulates the prediction results of each decision tree to obtain a final prediction value, wherein the contribution degree of each tree to the final prediction value is controlled by a learning rate. In the traditional XGBoost model, a fixed learning rate is used to obtain the final prediction result. However, the multi-energy load is affected by multiple factors such as environment, user behavior, and equipment state, and the power load fluctuation is significantly different in different time periods and scenarios. The data is complex and unstable, and the fixed learning rate is difficult to adapt to such dynamic changes. If the learning rate is too high, the model may overfit the data in some stages during training. If the learning rate is too low, the model may not learn enough when the change is drastic, which limits the convergence speed and fitting quality of the model, reduces the overall accuracy and stability of the prediction, and further causes the scheduling plan of energy absorption and release of various multi-energy load devices to deviate from the actual demand. This may result in insufficient or waste of scheduling resources, affecting the operation efficiency and response speed of the power virtual energy storage system, and even causing energy allocation imbalance, reducing the safety and economy of the system.
[0049] Therefore, in the embodiment of the present application, the learning rate after each iteration is adaptively obtained according to the fluctuation characteristics of the historical data of the key features of the power load prediction, so as to improve the accuracy of the power load prediction, and make the scheduling plan of energy absorption and release of various multi-energy load devices based on the prediction result of the power load more consistent with the actual demand.
[0050] Firstly, in order to prevent the model from overfitting in the initial stage and provide a stable starting point for the subsequent learning rate adaptive mechanism, the initial learning rate of the XGBoost model is set to 0.05, which is not limited here and can be set by the implementer according to the specific scene. The input set is input into the XGBoost model. In the process of predicting the power load by using the XGBoost model, for the i-th iteration (i≠1), according to the sensitivity of the data in the i-th iteration of the decision tree, the adjustment direction factor of the learning rate after the i-th iteration is obtained, to determine the adjustment direction of the learning rate after the i-th iteration, that is, to increase, decrease or remain unchanged. The sensitivity of the data to the decision tree refers to the fact that the decision tree is prone to produce significantly different tree structures and prediction results due to slight changes in the data. Therefore, when the sensitivity of the data to the decision tree is high, the learning rate should be appropriately reduced to prevent overfitting; when the sensitivity of the data to the decision tree is low, the learning rate should be appropriately increased to speed up the convergence of the XGBoost model, thereby improving the accuracy of predicting the power load by using the XGBoost model.
[0051] In practice, the data of different key features may exhibit sharp fluctuations or slow changes in different time periods, and this difference directly affects the sensitivity of the decision tree to the data. In the XGBoost model, in the process of each iteration, that is, in the process of constructing a decision tree each time, the first-order derivative and the second-order derivative of each sample data in the objective function (composed of a loss function and a regularization term) are calculated through Taylor expansion of the objective function, to guide the generation of the decision tree. In Taylor expansion, the second-order derivative of the objective function is the second-order derivative of the loss function, and the second-order derivative represents the curvature of the loss function, that is, measures the speed of error change. The value of the second-order derivative directly reflects the sensitivity of the decision tree to the data, and the size of the second-order derivative value is positively correlated with the sensitivity of the decision tree. Therefore, the sensitivity of the data to the decision tree constructed after each iteration can be reflected by the second-order derivative of the loss function in the XGBoost model, where the loss function in the XGBoost model is prior art and will not be described here. Therefore, in the embodiment of the present application, the adjustment direction factor of the learning rate after the i-th iteration is obtained according to the loss function in the XGBoost model, and the specific steps are as follows:
[0052] (1) According to the loss function in the XGBoost model, the comprehensive stability degree in the process of the i-th iteration is obtained.
[0053] Specifically, in the input set, the historical data of all key features in the process of the i-th iteration are grouped into a data subset, the loss function in the XGBoost model is obtained, the second-order derivative value of the loss function at each data in the data subset is calculated respectively, the variance of all second-order derivative values is calculated, and the data sensitivity in the process of the i-th iteration is obtained.
[0054] obtaining the data sensitivity in the process of each iteration before the i th iteration, obtaining the median of all data sensitivities, for representing the overall level of data sensitivity of all iteration rounds when the XGBoost model runs to the i th iteration, calculating the absolute value of the difference between the data sensitivity in the process of the i th iteration and the median, obtaining the first data sensitive deviation degree in the process of the i th iteration, taking the inverse of the first data sensitive deviation degree as the argument of the exponential function with the natural constant as the base, obtaining the first stability degree in the process of the i th iteration;
[0055] composing a data total set by the historical data of each key feature in the input set, respectively calculating the second derivative value of the loss function at each data in the data total set, calculating the average of the second derivative values corresponding to all data in the data total set, denoted as the second derivative value average, respectively calculating the absolute value of the difference between the second derivative value corresponding to each data in the data subset and the second derivative value average, accumulating all the absolute value differences to obtain the second data sensitive deviation degree in the process of the i th iteration, taking the inverse of the second data sensitive deviation degree as the argument of the exponential function with the natural constant as the base, obtaining the second stability degree in the process of the i th iteration;
[0056] calculating the average of the first stability degree and the second stability degree to obtain the comprehensive stability degree in the process of the i th iteration.
[0057] In an embodiment, the calculation formula of the comprehensive stability degree in the process of the i th iteration is:
[0058]
[0059] wherein, the comprehensive stability degree in the process of the i th iteration is denoted as S i, the data sensitivity in the process of the i th iteration is denoted as D i, the median of the data sensitivity in the process of all iterations (the i th iteration and all iterations before the i th iteration) is denoted as D m, and m represents the number of historical data of all key features in the process of the i th iteration, i.e. the number of data in the data subset, the second derivative value corresponding to the j th data in the data subset corresponding to the i th iteration is denoted as D j, and n represents the number of all historical data in the input set of the XGBoost model, i.e. the number of all data in the data total set, the second derivative value corresponding to the j th data in the data total set is denoted as D j, the absolute value symbol is denoted as | |, the exponential function with the natural constant as the base is denoted as e x p, for normalization.
[0060] It should be noted that, The greater, the greater the difference between the sensitivity of the decision tree in the i-th iteration and the sensitivity of the decision tree in other iteration rounds when the XGBoost model runs to the i-th iteration, the greater the deviation of the sensitivity of the decision tree in the i-th iteration from the overall level, and thus The smaller, the easier it is for the decision tree in the process of the i-th iteration to produce significantly different tree structures and prediction results due to slight changes in data, at which time the learning rate should be appropriately reduced to prevent overfitting, and thus improve the accuracy of predicting power load using the XGBoost model; The greater, the greater the difference between the sensitivity of the decision tree in the i-th iteration and the sensitivity of the decision tree in other iteration rounds when the XGBoost model runs to the i-th iteration, the greater the deviation of the sensitivity of the decision tree in the i-th iteration from the overall level, and thus The smaller, the easier it is for the decision tree in the process of the i-th iteration to produce significantly different tree structures and prediction results due to slight changes in data, at which time the learning rate should be appropriately reduced to prevent overfitting, and thus improve the accuracy of predicting power load using the XGBoost model.
[0061] (2) According to the comprehensive stability degree in the process of the i-th iteration, the adjustment direction factor of the learning rate after the i-th iteration is obtained.
[0062] Specifically, if the comprehensive stability degree in the process of the i-th iteration is greater than the preset stability degree threshold, the adjustment direction factor of the learning rate after the i-th iteration is set to 1;
[0063] If the comprehensive stability degree in the process of the i-th iteration is less than the preset stability degree threshold, the adjustment direction factor of the learning rate after the i-th iteration is set to -1;
[0064] If the comprehensive stability degree in the process of the i-th iteration is equal to the preset stability degree threshold, the adjustment direction factor of the learning rate after the i-th iteration is set to 0.
[0065] In the additive model of XGBoost, a stable model running process is more reliable than a fast but unstable process, so it is a better strategy to prioritize model stability and error convergence, and therefore, in order to ensure the stability of the model and reduce the instability caused by excessive learning rate, the priority of reducing the learning rate is improved, that is, the preset stability degree threshold should be relatively large, and thus the accuracy of predicting power load using the XGBoost model is improved. In the embodiments of the present application, the preset stability degree threshold is set to 0.6, which is not limited here, and the implementer can set it according to the specific scene.
[0066] The formula of the adjustment direction factor of the learning rate after the i th iteration is:
[0067]
[0068] wherein, represents the adjustment direction factor of the learning rate after the i th iteration, represents the comprehensive stability degree in the process of the i th iteration, and c represents the preset stability degree threshold.
[0069] It should be noted that, , it indicates that the sensitivity of the decision tree in the i th iteration to the data is low, and the decision tree in the process of the i th iteration is not easy to produce significantly different tree structures and prediction results due to the slight change of the data, and the process of the i th iteration is relatively stable. At this time, the learning rate after the i th iteration should be appropriately increased, that is, , to speed up the convergence speed of the XGBoost model; , it indicates that the sensitivity of the decision tree in the i th iteration to the data is high, and the decision tree in the process of the i th iteration is easy to produce significantly different tree structures and prediction results due to the slight change of the data, and the process of the i th iteration is unstable. At this time, the learning rate after the i th iteration should be appropriately reduced to prevent overfitting, that is, , to prevent overfitting; when , the learning rate after the i th iteration is unchanged, that is, .
[0070] In step S103, according to the historical data distribution of each key feature in any iteration and the prediction effect of the decision tree after any iteration, the comprehensive adjustment amplitude of the learning rate after any iteration is obtained.
[0071] After obtaining the adjustment direction factor of the learning rate after the i th iteration through step S102, the comprehensive adjustment amplitude of the learning rate after the i th iteration is obtained.
[0072] Since the prediction of the power load is to make the energy absorption and release scheduling plan of various multi-energy load devices in advance, among all the key features used for predicting the power load, if the prediction result obtained by using the XGBoost model depends too much on some features with strong volatility or high contingency, it is easy to cause the scheduling plan of the energy absorption and release of various multi-energy load devices to deviate from the actual demand, which may cause insufficient or waste of scheduling resources, affect the operation efficiency and response speed of the power virtual energy storage system, and even cause energy allocation imbalance, reduce the safety and economy of the system.
[0073] Considering that the information gain of each key feature can reflect the influence degree of the key feature on the current iteration in each iteration of the XGBoost model, that is, in each process of building a decision tree, if the information gain of the pth key feature is larger in the ith iteration, it means that the decision tree is more dependent on the pth key feature in the process of building the decision tree in the ith iteration, and this dependence is reflected in the sensitivity of the decision tree built in the ith iteration to the data change under the pth key feature, that is, the decision tree built in the ith iteration is prone to produce significantly different tree structures due to the slight change of the data under the pth key feature, and at this time, the learning rate after the ith iteration should be greatly adjusted to control the dependence on the pth key feature in the subsequent iteration process. Therefore, in the embodiment of the present application, the first adjustment range of the learning rate after the ith iteration is obtained according to the information gain of each key feature in the ith iteration and the data distribution, and the larger the information gain of each key feature in the ith iteration, the more unstable the data distribution, at this time, the learning rate after the ith iteration should be greatly adjusted, otherwise, the learning rate after the ith iteration should be slightly adjusted. The specific way of obtaining the first adjustment range of the learning rate after the ith iteration is:
[0074] The information gain of each key feature in the ith iteration is obtained, the average value of all information gains is linearly normalized to obtain the influence degree of all key features in the ith iteration on the ith iteration, and the information gain is a prior art, which will not be described here.
[0075] In the input set, the historical data of each key feature in the ith iteration is obtained to obtain the feature data set of each key feature in the ith iteration, the variance of all data in each feature data set is calculated, and the average value of all variances is linearly normalized to obtain the distribution stability degree of all key features in the ith iteration, and the linear normalization is a prior art, which will not be described here.
[0076] The sum of the influence degree and the distribution stability degree is calculated to obtain the first adjustment range of the learning rate after the ith iteration.
[0077] In an embodiment, the calculation formula of the first adjustment range of the learning rate after the ith iteration is:
[0078]
[0079] Wherein, the first adjustment range of the learning rate after the ith iteration is represented by the number of all key features in the ith iteration is represented by the information gain of the pth key feature in the ith iteration is represented by a variance of all data in a feature data set representing an i-th key feature in an i-th iteration, a variance of all data in a feature data set representing an i-th key feature in an i-th iteration, a linear normalization function.
[0080] It should be noted that, The greater the value is, the more the splitting of the decision tree in the i-th iteration depends on the i-th key feature. The greater the value is, the more the splitting of the decision tree in the i-th iteration depends on the i-th key feature. The greater the value is, the greater the adjustment range of the learning rate after the i-th iteration. The greater the value is, the greater the adjustment range of the learning rate after the i-th iteration. The greater the value is, the greater the fluctuation degree of the data in the feature data set of the i-th key feature in the i-th iteration, and the more unstable the data distribution is. The greater the value is, the more the splitting of the decision tree in the i-th iteration depends on the i-th key feature. The greater the value is, the more the splitting of the decision tree in the i-th iteration depends on the i-th key feature. The greater the value is, the greater the adjustment range of the learning rate after the i-th iteration.
[0081] Since the first adjustment range of the learning rate after the i-th iteration mainly reflects the dependence degree on the key features and the fluctuation degree of the data under the key features in the i-th iteration, and mainly focuses on the feature level without analyzing the prediction effect after the i-th iteration, after obtaining the first adjustment range of the learning rate after the i-th iteration, the second adjustment range of the learning rate after the i-th iteration is obtained in combination with the prediction effect after the i-th iteration.
[0082] Considering that the objective function of the XGBoost model mainly measures the error between the predicted result and the true value and the complexity, the objective function reflects the fitting degree and generalization ability of the XGBoost model to the data, and the reduction amount of the objective function value reflects the error reduction amount and the performance improvement amplitude of the XGBoost model in the current iteration round, so the reduction amount of the objective function value can be used as the effectiveness index of each iteration, and the size of the reduction amount directly determines the convergence speed and prediction effect of the model after the end of the iteration, and in the energy absorption and release scheduling plan of the multi-energy load device, the XGBoost model needs to accurately predict the future change of the power load to ensure that the scheduling scheme is reasonable and efficient, if the difference between the objective function value after the end of the i th iteration and the objective function value after the end of the i-1 th iteration is large, it means that the convergence speed of the XGBoost model after the i th iteration is fast and the prediction effect is obviously improved, the fitting ability of the data in the i th iteration is rapidly enhanced, and the fitting of the previous iteration of the i th iteration has played a significant role, at this time, in order to prevent the XGBoost model from overreacting to the data, the learning rate of the i th iteration should be adjusted slightly, otherwise, the learning rate of the i th iteration should be adjusted greatly. Meanwhile, the reduction amount of the objective function value is a macro effectiveness index, in order to more finely judge the adjustment amplitude of the learning rate after the end of the i th iteration, the residual error between the predicted value and the actual value after the end of the i th iteration should also be considered, and the residual error and the reduction amount of the objective function value are combined to comprehensively reflect the prediction effect after the end of the i th iteration.
[0083] Therefore, in the embodiment of the present application, according to the difference between the objective function value after the end of the i th iteration and the objective function value after the end of the i-1 th iteration, and the residual error between the predicted value and the actual value after the end of the i th iteration, the second adjustment amplitude of the learning rate after the end of the i th iteration is obtained, specifically:
[0084] The actual value of the power load at different time nodes and the output results of the objective function after the end of the i th iteration and the i-1 th iteration (i.e. the objective function values after the end of the i th iteration and the i-1 th iteration) are obtained.
[0085] The absolute value of the difference between the output result corresponding to the end of the i-1 th iteration and the output result corresponding to the end of the i th iteration is calculated, the inverse of the absolute value is used as the independent variable of the exponential function with the natural constant as the base, and the first prediction effect characteristic value of the power load after the end of the i th iteration is obtained.
[0086] In the input set, the historical data of each key feature under each time node is respectively grouped into a sample set, and the sample set in the i-th iteration is denoted as a target sample set, the predicted value of each target sample set after the i-th iteration is obtained (that is, according to the split path of the decision tree, the data of each key feature in each sample set finally falls into the predicted value corresponding to a leaf node of the decision tree), and the actual value of the power load at the time node of each target sample set is obtained, the absolute value of the difference between the predicted value and the actual value corresponding to each target sample set is calculated to obtain a prediction residual, the variance of all prediction residuals is calculated, and the inverse of the variance of all prediction residuals is taken as the independent variable of the exponential function with the natural constant as the base to obtain a second prediction effect feature value for predicting the power load after the i-th iteration.
[0087] The sum of the first prediction effect feature value and the second prediction effect feature value is calculated to obtain a second adjustment range of the learning rate after the i-th iteration.
[0088] In an embodiment, the calculation formula of the second adjustment range of the learning rate after the i-th iteration is:
[0089]
[0090] wherein, the second adjustment range of the learning rate after the i-th iteration, the output result of the objective function after the i-1-th iteration, the output result of the objective function after the i-th iteration, the variance of all prediction residuals, the absolute value symbol, the exponential function with the natural constant as the base, used for normalization.
[0091] It should be noted that, the smaller, the lower the convergence speed of the XGBoost model after the i-th iteration, and the less obvious the improvement of the prediction effect after the i-1-th iteration, and the greater the adjustment range of the learning rate after the i-th iteration, the greater, to accelerate the convergence speed of the XGBoost model; the smaller, the better the prediction effect after the i-th iteration, and the greater the adjustment range of the learning rate after the i-th iteration, the greater, to accelerate the convergence speed of the XGBoost model.
[0092] After obtaining the first adjustment range and the second adjustment range of the learning rate after the i-th iteration, the sum between the first adjustment range and the second adjustment range is normalized to obtain the comprehensive adjustment range of the learning rate after the i-th iteration.
[0093] In an embodiment, the calculation formula of the comprehensive adjustment range of the learning rate after the i-th iteration is:
[0094]
[0095] wherein, denotes the comprehensive adjustment range of the learning rate after the i-th iteration, denotes the first adjustment range of the learning rate after the i-th iteration, denotes the second adjustment range of the learning rate after the i-th iteration. Since the value range of is [0, 2], the value range of is [0, 2], the value range of is [0, 4], so is normalized by
[0096] It should be noted that, The larger is, the more the splitting of the decision tree depends on the key feature, and the learning rate after the i-th iteration should be greatly adjusted to control the dependence on the key feature in the subsequent iteration process, thereby The larger is, the greater the adjustment range of the learning rate after the i-th iteration; The larger is, the faster the convergence speed of the XGBoost model after the i-th iteration, and the prediction effect is significantly improved, thereby The larger is, the greater the adjustment range of the learning rate after the i-th iteration.
[0097] At this point, the comprehensive adjustment range of the learning rate after the i-th iteration is obtained.
[0098] In step S104, the adaptive learning rate after any iteration is obtained according to the adjustment direction factor and the comprehensive adjustment range. The adaptive learning rate after each iteration in the process of predicting the power load by using the XGBoost model is obtained. According to the adaptive learning rate after each iteration, the final predicted value of the power load output by the XGBoost model is obtained. According to the final predicted value of the power load, the virtual energy storage technology is used to balance the energy of the power system.
[0099] After the comprehensive adjustment degree of the learning rate after the i-th iteration is obtained through step S103, the adjustment direction factor of the learning rate after the i-th iteration is obtained in combination with the adjustment direction factor of the learning rate after the i-th iteration obtained in step S102, to obtain the adaptive learning rate after the i-th iteration, so as to improve the accuracy of the prediction of the power load, and specifically:
[0100] The product between the adjustment direction factor and the comprehensive adjustment degree is calculated, and the sum between a constant 1 and the product is recorded as the adjustment coefficient of the learning rate after the i-th iteration;
[0101] The learning rate after the last iteration (i-1-th iteration) of the i-th iteration is obtained, the product between the learning rate after the i-1-th iteration and the adjustment coefficient of the learning rate after the i-th iteration is calculated, to obtain the adaptive learning rate after the i-th iteration.
[0102] In an embodiment, the calculation formula of the adaptive learning rate after the i-th iteration is as follows:
[0103]
[0104] wherein, represents the adaptive learning rate after the i-th iteration, represents the learning rate after the i-1-th iteration (if i=2, the learning rate after the 1-th iteration is the initial learning rate, and in the embodiment of the present application, the initial learning rate is 0.05; if i≠2, the learning rate after the i-1-th iteration is the adaptive learning rate after the i-1-th iteration), represents the adjustment direction factor of the learning rate after the i-th iteration, represents the comprehensive adjustment degree of the learning rate after the i-th iteration.
[0105] It should be noted that when , it indicates that the sensitivity of the decision tree in the i-th iteration to the data is low, and the decision tree in the process of the i-th iteration is not easy to produce significantly different tree structure and prediction results due to the slight change of the data, and the process of the i-th iteration is relatively stable, at this time, the learning rate after the i-th iteration should be appropriately increased to speed up the convergence speed of the XGBoost model, and at this time is greater, the adjustment degree of the learning rate after the i-th iteration is greater, that is, the learning rate after the i-th iteration is greater than the learning rate after the i-1-th iteration, and the adaptive learning rate after the i-th iteration is greater; when When the value of the sensitivity is greater than the first threshold, it indicates that the decision tree in the i-th iteration is more sensitive to the data, the decision tree in the process of the i-th iteration is easy to produce significantly different tree structure and prediction results due to the slight change of the data, the process of the i-th iteration is unstable, at this time, the learning rate after the end of the i-th iteration should be appropriately reduced to prevent overfitting, at this time The greater the value of the sensitivity, the greater the adjustment range of the learning rate after the end of the i-th iteration, that is, the learning rate after the end of the i-th iteration is smaller than the learning rate after the end of the i-1-th iteration, and the adaptive learning rate after the end of the i-th iteration is smaller; when The value of the sensitivity is less than the first threshold, that is, the learning rate after the end of the i-th iteration is consistent with the learning rate after the end of the i-1-th iteration, that is, the adaptive learning rate after the end of the i-1-th iteration is the adaptive learning rate after the end of the i-th iteration.
[0106] Similarly, the adaptive learning rate after the end of each iteration in the process of predicting the power load by using the XGBoost model is obtained, and according to the adaptive learning rate after the end of each iteration, the final power load prediction value of the power system in the future period output by the XGBoost model is obtained, so as to use the virtual energy storage technology to formulate the energy absorption and release scheduling plan of various multi-energy load devices according to the final power load prediction value, so as to balance the energy of the power system, ensure the on-demand response of the virtual energy storage, and equivalent support the key links such as the regulation demand of the power system. Among them, according to the final power load prediction value, the virtual energy storage technology is used to formulate the energy absorption and release scheduling plan of various multi-energy load devices, which is the prior art, and will not be described here.
[0107] In summary, in the power system, at least one key feature for predicting the power load is obtained, and the historical data of each key feature at different time nodes is obtained, and all the key features and the historical data are taken as an input set of the XGBoost model; in the process of predicting the power load by using the XGBoost model according to the input set, for any iteration, if the any iteration is a non-first iteration, a learning rate adjustment direction factor after the any iteration is obtained according to a loss function in the XGBoost model; a comprehensive adjustment amplitude of the learning rate after the any iteration is obtained according to the historical data distribution of each key feature in the any iteration and the prediction effect of the decision tree after the any iteration; the adaptive learning rate after the any iteration is obtained according to the adjustment direction factor and the comprehensive adjustment amplitude, the adaptive learning rate after each iteration in the process of predicting the power load by using the XGBoost model is obtained, the final predicted value of the power load output by the XGBoost model is obtained according to the adaptive learning rate after each iteration, and the energy of the power system is balanced by using the virtual energy storage technology according to the final predicted value of the power load. Wherein, firstly, the stability in the process of each iteration is reflected by the loss function in the XGBoost model, and then the adjustment direction factor of the learning rate after each iteration is obtained to determine the adjustment direction strategy of the learning rate; then the comprehensive adjustment amplitude of the learning rate after each iteration is obtained according to the data distribution of each key feature in each iteration and the prediction effect of the predicted value after each iteration, and finally the adaptive learning rate after each iteration is obtained according to the adjustment direction factor and the comprehensive adjustment amplitude of the learning rate after each iteration, which improves the accuracy of predicting the power load by using the XGBoost model, and then a more accurate and effective energy absorption and release scheduling plan can be obtained, and the operation efficiency and response speed of the power virtual energy storage system are improved.
[0108] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A power virtual energy storage control method based on multi-energy complementarity, characterized in that, The power virtual energy storage control method based on multi-energy complementarity includes: In the power system, at least one key feature for predicting power load is obtained, as well as historical data for each key feature at different time points, and all key features and historical data are used as the input set of the XGBoost model. Based on the input set, during the process of predicting power load using the XGBoost model, for any iteration, if the iteration is not the first iteration, the adjustment direction factor of the learning rate after the end of the iteration is obtained according to the loss function in the XGBoost model. Based on the historical data distribution of each key feature in any iteration and the prediction effect of the decision tree after the end of any iteration, the comprehensive adjustment range of the learning rate after the end of any iteration is obtained. Based on the adjustment direction factor and the comprehensive adjustment magnitude, the adaptive learning rate after any round of iteration is obtained, the adaptive learning rate after each round of iteration in the process of predicting power load using the XGBoost model is obtained, the final predicted value of power load output by the XGBoost model is obtained based on the adaptive learning rate after each round of iteration, and the power system energy is balanced using virtual energy storage technology based on the final predicted value of power load. The step of obtaining the comprehensive adjustment range of the learning rate after the end of any iteration, based on the historical data distribution of each key feature in any iteration and the prediction effect of the decision tree after the end of any iteration, includes: Based on the historical data distribution of each key feature in any iteration, the first adjustment range of the learning rate after the end of any iteration is obtained. The actual values of power load at different time points are obtained, as well as the output results of the objective function after the end of any iteration and the end of the previous iteration. Based on the difference between the output results after the end of any iteration and the end of the previous iteration, and the difference between the prediction results of the decision tree after the end of any iteration and the actual value of power load, the second adjustment magnitude of the learning rate after the end of any iteration is obtained. Normalize the sum of the first adjustment magnitude and the second adjustment magnitude to obtain the comprehensive adjustment magnitude of the learning rate after any round of iteration.
2. The power virtual energy storage control method based on multi-energy complementarity according to claim 1, characterized in that, The step of obtaining the learning rate adjustment direction factor after any iteration based on the loss function in the XGBoost model includes: In the input set, the historical data of all key features in any round of iteration are combined into a data subset, the loss function in the XGBoost model is obtained, the second derivative of the loss function is calculated at each data in the data subset, the variance of all second derivatives is calculated, and the data sensitivity in any round of iteration is obtained. Obtain the data sensitivity in each iteration before any given iteration, obtain the median of all data sensitivities, calculate the absolute value of the difference between the data sensitivity in any given iteration and the median, obtain the first data sensitivity deviation in any given iteration, and use the negative of the first data sensitivity deviation as the independent variable of an exponential function with the natural constant as the base, to obtain the first stability in any given iteration. The historical data of each key feature in the input set are combined into a data set. The second derivative of the loss function is calculated for each data point in the data set. The average of the second derivative values of all data points in the data set is calculated and denoted as the mean of the second derivative values. The absolute value of the difference between the second derivative value of each data point in the data subset and the mean of the second derivative values is calculated. All the absolute values of the difference are accumulated to obtain the second data sensitivity deviation in any iteration process. The negative of the second data sensitivity deviation is used as the independent variable of an exponential function with the natural constant as the base to obtain the second stability in any iteration process. Calculate the average value between the first stability level and the second stability level to obtain the overall stability level during any round of iteration; Based on the overall stability during any iteration, obtain the learning rate adjustment direction factor after the end of any iteration.
3. The power virtual energy storage control method based on multi-energy complementarity according to claim 2, characterized in that, The step of obtaining the learning rate adjustment direction factor after the end of any iteration based on the overall stability during any iteration process includes: If the overall stability during any iteration is greater than a preset stability threshold, then the learning rate adjustment direction factor after the end of any iteration is set to 1. If the overall stability during any round of iteration is less than a preset stability threshold, then the learning rate adjustment direction factor after the end of any round of iteration is set to -1. If the overall stability during any iteration is equal to a preset stability threshold, then the learning rate adjustment direction factor after the end of any iteration is set to 0.
4. The power virtual energy storage control method based on multi-energy complementarity according to claim 1, characterized in that, The step of obtaining the first adjustment magnitude of the learning rate after the end of any iteration based on the historical data distribution of each key feature in any iteration includes: Obtain the information gain of each key feature in any iteration, and linearly normalize the average value of all information gains to obtain the degree of influence of all key features in any iteration on any iteration. In the input set, historical data of each key feature in any round of iteration are obtained to obtain the feature dataset of each key feature in any round of iteration. The variance of all data in each feature dataset is calculated, and the average of all variances is linearly normalized to obtain the distribution stability of all key features in any round of iteration. The sum of the degree of influence and the degree of distribution stability is calculated to obtain the first adjustment magnitude of the learning rate after any round of iteration.
5. The power virtual energy storage control method based on multi-energy complementarity according to claim 1, characterized in that, The step of obtaining a second adjustment magnitude for the learning rate after any iteration, based on the difference between the output results after any iteration and the previous iteration, and the difference between the prediction result of the decision tree after any iteration and the actual value of the power load, includes: Calculate the absolute value of the difference between the output result corresponding to the end of the previous iteration and the output result corresponding to the end of any iteration. Use the negative of the absolute value of the difference as the independent variable of the exponential function with the natural constant as the base to obtain the first prediction effect feature value for predicting the power load after the end of any iteration. In the input set, historical data of each key feature at each time node are used to form a sample set. The sample set in any round of iteration is obtained and denoted as the target sample set. The predicted value of each target sample set after the end of any round of iteration and the actual value of the power load at the time node where each target sample set is located are obtained. The absolute value of the difference between the predicted value and the actual value corresponding to each target sample set is calculated to obtain the prediction residual. The variance of all prediction residuals is calculated. The negative of the variance of all prediction residuals is used as the independent variable of an exponential function with the natural constant as the base to obtain the second prediction effect feature value for predicting the power load after the end of any round of iteration. The sum between the first prediction effect feature value and the second prediction effect feature value is calculated to obtain the second adjustment magnitude of the learning rate after the end of any round of iteration.
6. The power virtual energy storage control method based on multi-energy complementarity according to claim 1, characterized in that, The step of obtaining the adaptive learning rate after any iteration based on the adjustment direction factor and the comprehensive adjustment magnitude includes: Calculate the product between the adjustment direction factor and the comprehensive adjustment magnitude, and record the sum of the constant 1 and the product as the adjustment coefficient of the learning rate after the end of any iteration. Obtain the learning rate after the previous iteration of any given iteration, and calculate the product between the learning rate after the previous iteration and the adjustment coefficient of the learning rate after the end of any given iteration to obtain the adaptive learning rate after the end of any given iteration.
Citation Information
Patent Citations
Short-term Load Forecasting Method Based on TCN and IPSO-LSSVM Combined Model
AU2020104000A4
Model parameter training method, device and system
CN104346629A