Wind turbine generator output power prediction method based on gradient lifting

By preprocessing and periodic transformation of meteorological data at wind turbine sites using a method based on gradient boosting, and using the XGBoost model for prediction, it solves the accuracy and compatibility problems of existing wind power power prediction methods and achieves a more efficient Wind turbine output power prediction.

CN119357844APending Publication Date: 2025-01-24STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411384854.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When the existing wind power power prediction method deals with the complex relationship between the output power of the wind turbine and the meteorological characteristics, the prediction accuracy is not high and faces the problems of data incompleteness and model compatibility.

Method used

Using gradient -based wind turbine output power prediction methods, the data periodic transformation is performed by obtaining and pre -processing the weather data of the wind turbine site, and input to the XGBOOST model built and trained to make predictions.

Benefits of technology

It improves the accuracy of wind turbine output power prediction, enhances the model's ability to express data and generalizes the data, simplifies the model complexity, improves calculation efficiency, and maintains good prediction accuracy and compatibility under different environmental conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357844A_ABST
    Figure CN119357844A_ABST
Patent Text Reader

Abstract

The invention discloses a wind turbine generator output power prediction method based on gradient lifting. The method comprises the steps of obtaining meteorological data of a to-be-predicted wind turbine station in a preset time period and performing data preprocessing; performing data periodic transformation on the time sequence of the preprocessed meteorological data in the preset time period; inputting the periodically converted time sequence and the corresponding meteorological data into the constructed and trained wind turbine generator output power prediction model to obtain the wind turbine generator output power; wherein the wind turbine generator output power prediction model is obtained by taking a time sequence after historical periodic transformation and corresponding meteorological data as input, taking wind turbine generator output power of a wind turbine station as output, and inputting the input and the output into an XGBoost-based model for pre-training. According to the method, the adaptive capacity and the stability of the model in a new environment are improved, so that the model can maintain relatively good prediction precision and compatibility in different operation conditions and changing environment settings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wind power technology, and in particular to a method for predicting wind turbine output power based on gradient boosting. Background Art

[0002] As wind energy technology matures and its success rate increases year by year, wind power has become an important part of the global energy structure. However, due to the inherent randomness of wind power generation and the complexity of related meteorological characteristics, wind farm operators and power system operators have encountered difficulties in operation and planning. These difficulties mainly come from the difficulty of predicting wind resources, the complex operating characteristics of wind turbines, and a variety of meteorological factors that affect wind power output.

[0003] The key to the effective integration of wind turbines is the accurate prediction of their output power. This is extremely important for power system operators, as it is related to the realization of technical contents such as optimal load flow analysis and voltage level control; it is also important for wind farm operators, as it helps them to carry out day-ahead dispatch in the energy market and formulate operation and maintenance plans.

[0004] At present, the methods of wind power prediction are mainly divided into two categories: direct methods and indirect methods. The direct method allows researchers to make predictions without having to understand the relationship between meteorological characteristics and output power. Its advantage is that it simplifies the prediction process and may reduce the complexity of the model; the indirect method requires first predicting the wind speed, and then converting the wind speed data into output power through a deterministic power curve or statistical model. This conversion process may introduce additional errors because it is necessary to deal with the nonlinear and uncertain relationship between wind speed and output power. Although the direct method has better prediction performance, this method usually ignores the correlation between output power and meteorological characteristics, which may limit the further improvement of prediction accuracy.

[0005] Among the existing wind power prediction models, physical models and statistical models are the two main methods. Physical models rely on complex mathematical expressions of atmospheric flow dynamics to generate numerical weather forecasts (NWP), while statistical models mainly rely on relevant time series data. Although these two methods can effectively predict output power, they each have their own shortcomings in practical applications: physical models usually require a lot of computing resources and have high requirements on the quality and integrity of input data; statistical models may not be able to achieve the best results due to the lack of sufficient historical data, especially in offshore wind farms, where the accuracy of predictions will be greatly reduced due to incomplete and difficult historical data collection.

[0006] In addition, a major challenge facing existing forecasting technologies is the incompatibility between historical meteorological data and actual weather forecasts. That is, the mismatch of data element types (such as wind force, wind speed, temperature, etc.), geographic coordinates and resolution makes it more difficult to apply historical data to real-time forecasts, especially in offshore wind farms, where accurate and comprehensive meteorological data is extremely difficult to obtain.

[0007] Therefore, there is an urgent need for a wind turbine output power prediction method that can improve prediction accuracy, handle data incompleteness, and achieve better compatibility between data and models. Summary of the invention

[0008] The present invention provides a method for predicting wind turbine output power based on gradient boosting, which solves the problem of low accuracy of wind turbine output prediction data set.

[0009] In a first aspect, the present invention provides a method for predicting wind turbine output power based on gradient boosting, comprising:

[0010] S1: Acquire meteorological data of a wind turbine site to be predicted within a preset period of time and perform data preprocessing; wherein the meteorological data of the wind turbine site includes one or more of wind speed, wind direction, and temperature of the wind turbine site;

[0011] S2: Performing periodic transformation on the time series of meteorological data within a preset period after preprocessing;

[0012] S3: Input the periodically transformed time series and the corresponding meteorological data into the constructed and trained wind turbine output power prediction model to obtain the wind turbine output power; wherein the wind turbine output power prediction model takes the historical periodically transformed time series and the corresponding meteorological data as input, and the wind turbine output power of the wind turbine site as output, and inputs them into the pre-training based on the XGBoost model.

[0013] Furthermore, the meteorological data of the wind turbine site is obtained by:

[0014] S11: Divide the area where the wind turbine site is located into grids of a preset size according to longitude and latitude;

[0015] S12: extracting the grid where the wind turbine site is located according to the longitude and latitude of the wind turbine site;

[0016] S13: Obtain the meteorological data of the grids to which the nearest meteorological stations in different directions belong to the grid to which the wind turbine site belongs, and then calculate the meteorological data of the grid to which the wind turbine site belongs:

[0017]

[0018] Where z(x,y) is the meteorological data of the wind turbine site at longitude x and latitude y; i is the meteorological data of the grid point of the i-th meteorological station around the grid to which the wind turbine site belongs; k is the number of grid points of the meteorological station closest to the grid to which the wind turbine site belongs in different directions, d i is the distance between the grid to which the weather station belongs and the grid to which the wind turbine site belongs; p is the weight index.

[0019] Furthermore, the data periodic transformation in S2 is to transform the time series data corresponding to the meteorological data in the preset time period into periodic data using trigonometric functions, and the specific process is:

[0020]

[0021] Among them, Y sin Y is the sine value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed; cos is the cosine value corresponding to the time series data corresponding to the meteorological data to be transformed after periodic transformation; Y is the time series data corresponding to the meteorological data to be transformed; Y min Y is the minimum value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed; max The maximum value after the periodic transformation of the time series data corresponding to the meteorological data to be transformed. Periodic transformation is to transform the daily distribution. Taking a day as 24 hours as an example, the periodic transformation will make 0 o'clock and 23 o'clock adjacent; taking a month as an example, January and December will be adjacent.

[0022] Furthermore, the objective function of the wind turbine output power prediction model is:

[0023] F(Θ) is the objective function of the wind turbine output power prediction model; L(Θ) is the loss function of the wind turbine output power prediction model; Ω(Θ) is the regularization term of the wind turbine output power prediction model; Θ is the model parameter; x i is the actual value of the wind turbine output power; is the predicted value of the wind turbine output power; N is the number of sample points. A group of independent variables and dependent variables input into the model is called a sample point. For example, at a certain time on a certain day of a certain month, A, the wind force in the meteorological data is X, and the output power of the wind turbine is Y, then a sample point includes A, X, and Y; γ and λ are parameters of regularization strength; ω j is the weight of each j-th leaf node.

[0024] Furthermore, the specific process of gradually building and splitting the decision tree in the wind turbine output power prediction model is as follows:

[0025] Model initialization: Initialize the predicted value of the wind turbine of the XGBoost model. In specific implementation, the predicted value of the wind turbine of the XGBoost model can be set to the mean output power of the wind turbine in the training set;

[0026] Calculate residuals: Calculate the residual value between the predicted value and the true value when the model predicts each periodically transformed time series and the corresponding meteorological data in the training set.

[0027] Construct a decision tree and calculate the gain: enumerate the split points among all sample points, divide the meteorological data into two left and right subsets according to each split point, and construct a decision tree respectively; predict the output power prediction value of the wind turbine according to the left and right subsets corresponding to each split point, and calculate the gain of each subset corresponding to each split point according to the predicted value, select the left and right subsets of the split point with the highest gain among all split points, continue to enumerate the split points of all sample points in the left and right subsets, and then construct a decision tree until the gain calculated for the corresponding subset is a non-positive number, then stop splitting.

[0028] Furthermore, the gain is calculated as:

[0029]

[0030] In the formula, G is the gain of increasing the decision tree; g i is the loss function L about the predicted value of wind turbine output power The first derivative of i is the loss function L about the predicted value of wind turbine output power The second-order derivative of , which is about each wind turbine output (i.e. wind turbine output power) data point i, reflects the sensitivity of the wind turbine output power prediction model to the prediction error of each wind turbine output data point at the current node; I L The sample set for dividing the data into the left subtree according to the splitting rule currently considered, wherein the goal of the splitting rule is to maximize the gain G, that is, to split at the point where the gain is most obtained); I R is the sample set that divides the data into the right subtree according to the splitting rule currently considered; I is the current sample set; γ and λ are parameters of regularization strength.

[0031] Furthermore, the prediction accuracy of the wind turbine output power prediction model is evaluated by calculating the mean square error. The formula for calculating the mean square error value is as follows:

[0032]

[0033] Among them, M is the mean square error value.

[0034] Furthermore, the hyperparameters of the wind turbine output power prediction model are adjusted by calculating the value of the determination coefficient. When the value of the determination coefficient is less than the preset value, the hyperparameter adjustment is performed. The formula of the determination coefficient value is as follows:

[0035]

[0036] Among them, R 2 is the determination coefficient value.

[0037] Furthermore, the specific process of updating the weights of leaf nodes in the wind turbine output power prediction model is as follows:

[0038]

[0039] Among them, θ t+1 is the weight of the leaf node in the t+1th iteration; θ t is the weight of the leaf node in t rounds of iteration; g is the gradient sum of the node; h is the second-order derivative sum of the node; λ is the regularization parameter mentioned above.

[0040] The present invention proposes a method for predicting the output power of a wind turbine based on gradient boosting. The method obtains the meteorological data of the grid where the wind turbine site is located by obtaining the meteorological data of the grid to which the wind turbine site belongs to the nearest meteorological station in different directions in the data preprocessing aspect, which greatly improves the model's ability to express and generalize data. By performing sine and cosine transformations on the periodic data such as time corresponding to the meteorological data (such as month, day, hour, etc.), the accuracy of the model in predicting the power output of the wind turbine can be greatly enhanced by capturing the periodic changes in different time periods of the day. In addition, by screening and reducing the dimension to remove noise and irrelevant features (XGBoost has the function of automatic feature screening, regularization to remove irrelevant features, and automatic noise removal, and evaluates the importance of features), not only the complexity of the model is simplified, but also the computational efficiency is improved, ensuring the feasibility and speed when processing large-scale data. The adaptability and stability of the model in the new environment are improved, so that it can maintain good prediction accuracy and compatibility in different operating conditions and changing environmental settings. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1It is a flow chart of a method for predicting wind turbine output power based on gradient boosting provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0044] Example 1

[0045] like Figure 1 As shown, this embodiment provides a method for predicting wind turbine output power based on gradient boosting, including:

[0046] S1: Acquire meteorological data of a wind turbine site to be predicted within a preset time period and perform data preprocessing; wherein the meteorological data of the wind turbine site includes one or more of wind speed, wind direction, and temperature of the wind turbine site.

[0047] Specifically, the method for acquiring the meteorological data of the wind turbine site includes:

[0048] S11: Divide the area where the wind turbine site is located into grids of a preset size according to longitude and latitude;

[0049] S12: extracting the grid where the wind turbine site is located according to the longitude and latitude of the wind turbine site;

[0050] S13: Obtain the meteorological data of the grids to which the nearest meteorological stations in different directions belong to the grid to which the wind turbine site belongs, and then calculate the meteorological data of the grid to which the wind turbine site belongs:

[0051]

[0052] Where z(x,y) is the meteorological data of the wind turbine site at longitude x and latitude y; i is the meteorological data of the grid point of the i-th meteorological station around the grid to which the wind turbine site belongs; k is the number of grid points of the meteorological station closest to the grid to which the wind turbine site belongs in different directions, d i is the distance between the grid to which the weather station belongs and the grid to which the wind turbine site belongs; p is the weight index, which is generally set to 2.

[0053] The meteorological data collected from multiple data sources (i.e., multiple weather stations) at wind turbine sites are processed to improve the model's ability to express and generalize data. At the same time, to ensure the accuracy of the prediction model, the longitude and latitude coordinates of the wind turbine sites are aligned with the meteorological grid data to ensure the geographic relevance and spatial consistency of the meteorological data, enhance the practicality of the data, and provide accurate input variables for the model. In addition, meteorological data covering the specific locations of wind turbines are collected to ensure the timeliness of the data and the real-time response capability of the prediction.

[0054] The data preprocessing is to choose to fill these missing values ​​with linear interpolation or historical averages, or directly delete missing records when data integrity is critical; then, use statistical methods such as box plots to identify and process outliers, which can be replaced with medians or means, or deleted when necessary; perform appropriate transformations on data types, such as unifying the formats of all timestamps; perform consistency checks on data to ensure that all data units and precision meet preset standards, thereby providing a clean and consistent data set for model training.

[0055] S2: Perform periodic data transformation on the time series corresponding to the meteorological data within the preset time period after preprocessing.

[0056] The data periodic transformation in S2 is to transform the time series data corresponding to the meteorological data in the preset time period into periodic data using trigonometric functions. The specific process is as follows:

[0057]

[0058]

[0059] Among them, Y sin Y is the sine value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed; cos is the cosine value corresponding to the time series data corresponding to the meteorological data to be transformed after periodic transformation; Y is the time series data corresponding to the meteorological data to be transformed; Y min Y is the minimum value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed; max It is the maximum value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed.

[0060] Preferably, in order to ensure data consistency and reduce model deviation, the output of the model training, i.e., the output power of the wind turbine group at the wind turbine site, is normalized using minimum-maximum normalization. In this embodiment, the data normalization adopts normalization processing. The normalization processing is to scale the data points of the output power of the wind turbine group at the historical wind turbine site to a range between 0 and 1. The specific process is:

[0061]

[0062] Where X is the raw data point of wind turbine output power at the historical wind turbine site; X min is the maximum value among the original data points; X max is the minimum value among the original data points; X norm It is the standardized data point. Through the standardization process, all data points are scaled to the range between 0 and 1, which helps to maintain the relative relationship in the data, can help avoid the problem of inefficient or unstable model training caused by large differences in variable scales, ensure data consistency and reduce model bias.

[0063] S3: Input the periodically transformed time series and the corresponding meteorological data into the constructed and trained wind turbine output power prediction model to obtain the wind turbine output power; wherein, the wind turbine output power prediction model takes the historical periodically transformed time series and the corresponding meteorological data as input (independent variables, that is, explanatory variables), and the wind turbine output power of the wind turbine site as output (dependent variable, that is, target variable), and inputs them into the pre-training based on the XGBoost model.

[0064] The core of GB is to gradually build decision trees, and each tree tries to reduce the error of the previous tree. The XGBoost algorithm adds regularization terms on this basis to control the complexity of the model and avoid overfitting, which is a major difference between it and the traditional gradient boosting method.

[0065] The objective function of the wind turbine output power prediction model is:

[0066] F(Θ)=L(Θ)+Ω(Θ)

[0067]

[0068]

[0069] Among them, F(Θ) is the objective function of the wind turbine output power prediction model; L(Θ) is the loss function of the wind turbine output power prediction model; Ω(Θ) is the regularization term of the wind turbine output power prediction model; Θ is the model parameter; x i is the actual value of the wind turbine output power; is the predicted value of the wind turbine output power; N is the number of sample points, where a set of independent variables and dependent variables input into the model is a sample point. For example, at a certain time on a certain day of a certain month, A, according to the wind force in the meteorological data is X, and the output power of the wind turbine is Y, then a sample point includes A, X, and Y; γ and λ are parameters of regularization strength; ω jis the weight of each leaf node of the jth node. The regularization function Ω of the XGBoost algorithm is used to control the complexity of the model to avoid overfitting. It consists of two parts: the number of leaf nodes T in the tree and the output score of all leaves L 2 Norm.

[0070] Specifically, the specific process of step-by-step construction and splitting of the decision tree in the wind turbine output power prediction model is as follows:

[0071] Model initialization: The predicted value of the wind turbine of the XGBoost model is initialized to the mean output power of the wind turbine in the training set;

[0072] Calculate residuals: Calculate the residuals between the predicted values ​​and the true values ​​when the model predicts each periodically transformed time series and the corresponding meteorological data in the training set. Since the initially constructed model is extremely rough, the specific manifestation is that the difference between the true value and the predicted value (i.e., the residual) is large. The model is adjusted by calculating the residual value predicted by the model for each data point in the training set. For example, the actual values ​​of the wind turbine output power in the data set are 0, 1, 2, 3, 4, and the predicted values ​​will all be 2, and the residuals are -2, -1, 0, 1, 2.

[0073] Construct a decision tree and calculate the gain: enumerate the split points among all sample points, divide the meteorological data into two left and right subsets according to each split point, and construct a decision tree respectively; predict the output power prediction value of the wind turbine according to the left and right subsets corresponding to each split point, and calculate the gain of each subset corresponding to each split point according to the predicted value, select the left and right subsets of the split point with the highest gain among all split points, continue to enumerate the split points of all sample points in the left and right subsets, and then construct a decision tree until the gain calculated for the corresponding subset is a non-positive number, then stop splitting. In the specific implementation, taking the wind speed in the meteorological data as an example, 5 splitting points are enumerated (the thresholds corresponding to the splitting points are 2m / s, 4m / s, 6m / s, 8m / s, and 10m / s), and the wind speed data is set to correspond to each splitting point. Splitting rules, that is, wind speeds greater than the threshold are divided into the right subset, and wind speeds less than the threshold are divided into the left subset, and two decision trees are obtained accordingly; these two decision trees are used to predict the output power of the wind turbine according to the data in the left and right subsets, and the gain compared to no splitting is calculated. The splitting point with the highest and positive gain is selected for formal splitting, and the respective splitting points of the left and right subsets are continued to be enumerated, and then a decision tree is recursively constructed according to the enumerated splitting points until the gain calculated according to the corresponding subset is a non-positive number, then the splitting is stopped.

[0074] Decision trees are constructed for the left and right subsets respectively, and the output values ​​of each data point in the left and right subsets are predicted respectively. Then, the gains corresponding to each subset are calculated to make the prediction results of the left and right subsets more accurate. The first item in the gain formula is the prediction residual of the left subset, the second item is the prediction residual of the right subset, and the third item is the prediction residual of the current model before splitting. γ is the regularization term. When the calculated gain is small, it means that the improvement of the model is relatively small. If the split is performed again, the complexity of the model will increase. Therefore, the split point with the highest gain is selected (that is, the point where the model believes that the accuracy of wind turbine power prediction will be improved the most after the split). The data set corresponding to this point is split into two left and right subsets again, and then a new classification threshold is found, and one of the subsets is split into two left and right subsets. The standard is the same as above. And so on until no classification method can make the gain positive.

[0075] The construction of the tree in XGBoost is the core part of the algorithm. The process involves the gradual construction and splitting of decision trees. At each step, the algorithm will select the best split point to add a new tree. This process is based on the calculation of gain. The calculation formula of the gain is:

[0076]

[0077] In the formula, G is the gain of increasing the decision tree; g i is the predicted value of the loss function L regarding the output power of the wind turbine The first derivative of i is the predicted value of the loss function L regarding the output power of the wind turbine The second derivative of L is the sample set that divides the data into the left subtree according to the splitting rule currently considered; I R is the sample set that divides the data into the right subtree according to the splitting rule currently considered; I is the current sample set; γ and λ are parameters of regularization strength. The core idea of ​​this formula is to evaluate the effectiveness of splitting by comparing the reduction of errors before and after splitting, and to provide XGBoost with a standard to decide how to build a decision tree by quantifying the actual improvement brought by splitting.

[0078] Specifically, the prediction accuracy of the wind turbine output power prediction model is evaluated by calculating the mean square error. The closer the mean square error value is to 0, the better the performance of the model. The formula for calculating the mean square error value is as follows:

[0079]

[0080] Among them, M is the mean square error value.

[0081] Specifically, the hyperparameters of the wind turbine output power prediction model are adjusted by calculating the value of the determination coefficient. When the determination coefficient value is less than the preset value, the hyperparameter adjustment is performed. The determination coefficient value is used to measure the statistical indicator of the fluctuation ability of the explanatory variable (i.e., independent variable) of the wind turbine output power prediction model. If the determination coefficient value is higher, it means that the independent variable has a strong explanatory ability for the dependent variable. In simple terms, it has a large impact. The term is that the model has a good fitting effect on the wind turbine output power. The stronger the explanatory ability of the explanatory variable (independent variable) to the target variable (dependent variable), the closer the determination coefficient value is to 1, the better the model fitting effect. The formula for the determination coefficient value is as follows:

[0082]

[0083] Among them, R 2 is the determination coefficient value.

[0084] According to the actual operating performance of the model, the hyperparameters of the model can be adjusted to pursue higher prediction accuracy.

[0085] Specifically, the specific process of updating the weights of leaf nodes in the wind turbine output power prediction model is as follows:

[0086]

[0087] Among them, θ t+1 is the weight of the leaf node in the t+1th iteration; θ t is the weight of the leaf node at t iterations; g is the gradient sum of the node; h is the second-order derivative sum of the node; λ is the regularization parameter mentioned above

[0088] The wind turbine output power prediction model takes the historical periodically transformed time series and the corresponding meteorological data as input, and the wind turbine output power of the wind turbine site as output, and then constructs a training set, a test set and a validation set, and pre-trains the XGBoost model. The pre-training process is:

[0089] Initialize the training set D train and the test set D test ; Maximum number of iterations T, hyperparameters λ, γ; learning rate η;

[0090] Step 1: Initialize the wind turbine output power prediction model F 0 (x) is a constant value, which can be the average value of the target variable;

[0091] Step 2: Calculate the residual r of the current iteration round t i (t) = y i -F t-1 (x i ), i∈Dtrain ;

[0092] Step 3: Use the residual r i (t) is the target, and a regression tree h is fitted. t (x);

[0093] Step 4: Calculate the output value c on the regression tree leaf node j (t), optimize the loss function;

[0094] Step 5: Update the wind turbine output power prediction model corresponding to the current iteration round t to F t (x) = F t-1 (x)+η×h t (x);

[0095] Step 6: Determine whether the current round t is the maximum number of iterations T: If so, go to Step 7; if not, t = t + 1 and return to Step 2;

[0096] Step 7: Use the final model F T (x) in the test set D test To make predictions and assessments;

[0097] Step8: Prediction results and model performance indicators.

[0098] Before integrating time series data into the prediction model, it is necessary to construct a feature set by setting the lookback window length (e.g., if the lookback window length is 1 year, the data of the past year is used for training). This length is the number of historical time points, usually recorded as n. The purpose of this step is to look back n time intervals from each prediction point and extract relevant historical observation data. Then, the historical data is converted into features of the model input, so as to better reflect the time dependency and dynamic characteristics of the data. In addition, by accurately controlling the size of the lookback window, the sensitivity of the model to historical information and the computational complexity can be balanced, so as to find a balance between enhancing the model's ability to predict future states and maintaining computational efficiency. This step provides the model with the necessary temporal dynamic context and is a key link in ensuring the accuracy of the model's predictions. The role of the lookback window is to ensure the timeliness of the training model, allowing the model to be trained dynamically, without the need to train before each prediction, and without the need to train again when the prediction error is less than the preset threshold. Only when the prediction error is unacceptable can the model be retrained, which greatly reduces the tediousness of multiple model training.

[0099] The explanatory variable is the independent variable, which is the meteorological data in the preset time period and the time series after the corresponding period transformation. The target variable is the dependent variable, which is the output power of the wind turbine. If the meteorological data in the preset time period is short-term meteorological data, the short-term output power of the wind turbine can be predicted; if the meteorological data in the preset time period is medium-term meteorological data, the medium-term output power of the wind turbine can be predicted.

[0100] In terms of model construction, the application of the GB algorithm enhances the prediction performance. The method gradually constructs a decision tree and continuously optimizes the prediction error, corrects the prediction error of the previous round of models with the model of the current iteration round, and continuously iterates and improves, so that the prediction accuracy of the entire model is gradually improved. The GB algorithm can not only flexibly process various types of data, but also allows the optimization of model performance by adjusting the learning rate, the maximum depth of the tree and other key parameters (such as the number of decision trees, subsampling rate, minimum sample split number, column sampling rate, etc.) to adapt to specific application requirements. In addition, the integrated learning characteristics of the GB algorithm enhance the robustness of the model to outliers and data noise (regularization, subsampling, learning rate), effectively prevent overfitting, and ensure the stability and reliability of the model in a diverse and complex data environment.

[0101] Example 2

[0102] This embodiment provides an electronic terminal, which includes a processor and a memory, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of the above method.

[0103] Example 3

[0104] This embodiment provides a readable storage medium: a computer program is stored, and when the computer program is called by a processor, the steps of the above method are executed.

[0105] It should be understood that in the embodiments of the present invention, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the type of device.

[0106] The readable storage medium is a computer-readable storage medium, which may be an internal storage unit of the controller described in any of the foregoing embodiments, such as a hard disk or memory of the controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the controller. Further, the readable storage medium may also include both an internal storage unit of the controller and an external storage device. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0107] Based on this understanding, the technical solution of the present invention, in essence or in other words, the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0108] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0109] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for predicting wind turbine output power based on gradient boosting, characterized in that: include: S1: Acquire meteorological data of a wind turbine site to be predicted within a preset period of time and perform data preprocessing; wherein the meteorological data of the wind turbine site includes one or more of wind speed, wind direction, and temperature of the wind turbine site; S2: Performing periodic transformation on the time series of meteorological data within a preset period after preprocessing; S3: Input the periodically transformed time series and the corresponding meteorological data into the constructed and trained wind turbine output power prediction model to obtain the wind turbine output power; wherein the wind turbine output power prediction model takes the historical periodically transformed time series and the corresponding meteorological data as input, and the wind turbine output power of the wind turbine site as output, and inputs them into the pre-training based on the XGBoost model.

2. The method for predicting wind turbine output power based on gradient boosting according to claim 1, characterized in that: The meteorological data of the wind turbine site is obtained by: S11: Divide the area where the wind turbine site is located into grids of a preset size according to longitude and latitude; S12: extracting the grid where the wind turbine site is located according to the longitude and latitude of the wind turbine site; S13: Obtain the meteorological data of the grids to which the nearest meteorological stations in different directions belong to the grid to which the wind turbine site belongs, and then calculate the meteorological data of the grid to which the wind turbine site belongs: Where z(x,y) is the meteorological data of the wind turbine site at longitude x and latitude y; i is the meteorological data of the grid point of the i-th meteorological station around the grid to which the wind turbine site belongs; k is the number of grid points of the meteorological station closest to the grid to which the wind turbine site belongs in different directions, d i is the distance between the grid to which the weather station belongs and the grid to which the wind turbine site belongs; p is the weight index.

3. The method for predicting wind turbine output power based on gradient boosting according to claim 1, characterized in that: The data periodic transformation in S2 is to transform the time series data corresponding to the meteorological data in the preset time period into periodic data using trigonometric functions. The specific process is as follows: Among them, Y sin Y is the sine value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed; cos is the cosine value corresponding to the time series data corresponding to the meteorological data to be transformed after periodic transformation; Y is the time series data corresponding to the meteorological data to be transformed; Y min Y is the minimum value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed; max It is the maximum value corresponding to the periodic transformation of the time series data corresponding to the meteorological data to be transformed.

4. The method for predicting wind turbine output power based on gradient boosting according to claim 1, characterized in that: The objective function of the wind turbine output power prediction model is: F(Θ)=L(Θ)+Ω(Θ) Among them, F(Θ) is the objective function of the wind turbine output power prediction model; L(Θ) is the loss function of the wind turbine output power prediction model; Ω(Θ) is the regularization term of the wind turbine output power prediction model; Θ is the model parameter; x i is the actual value of the wind turbine output power; is the predicted value of wind turbine output power; N is the number of sample points; γ and λ are parameters of regularization strength; ω j is the weight of each j-th leaf node.

5. The method for predicting wind turbine output power based on gradient boosting according to claim 1, characterized in that: The specific process of step-by-step construction and splitting of the decision tree in the wind turbine output power prediction model is as follows: Model initialization: The predicted value of the wind turbine of the XGBoost model is initialized to the mean output power of the wind turbine in the training set; Calculate residuals: Calculate the residual value between the predicted value and the true value when the model predicts each periodically transformed time series and the corresponding meteorological data in the training set; Construct a decision tree and calculate the gain: enumerate the split points among all sample points, divide the meteorological data into two left and right subsets according to each split point, and construct a decision tree respectively; predict the output power prediction value of the wind turbine according to the left and right subsets corresponding to each split point, and calculate the gain of each subset corresponding to each split point according to the predicted value, select the left and right subsets of the split point with the highest gain among all split points, continue to enumerate the split points of all sample points in the left and right subsets, and then construct a decision tree until the gain calculated for the corresponding subset is a non-positive number, then stop splitting.

6. The method for predicting wind turbine output power based on gradient boosting according to claim 5, characterized in that: The gain is calculated as: In the formula, G is the gain of increasing the decision tree; g i is the loss function L about the predicted value of wind turbine output power The first derivative of i is the loss function L about the predicted value of wind turbine output power The second derivative of L is the sample set that divides the data into the left subtree according to the splitting rule currently considered; I R is the sample set that divides the data into the right subtree according to the splitting rule currently considered; I is the current sample set; γ and λ are parameters of regularization strength.

7. The method for predicting wind turbine output power based on gradient boosting according to claim 1, characterized in that: The prediction accuracy of the wind turbine output power prediction model is evaluated by calculating the mean square error. The formula for calculating the mean square error value is as follows: Among them, M is the mean square error value.

8. The method for predicting wind turbine output power based on gradient boosting according to claim 1, characterized in that: The hyperparameters of the wind turbine output power prediction model are adjusted by calculating the value of the determination coefficient. When the value of the determination coefficient is less than the preset value, the hyperparameter adjustment is performed. The formula for the determination coefficient value is as follows: Among them, R 2 is the determination coefficient value.

9. The method for predicting wind turbine output power based on gradient boosting according to claim 1, characterized in that: The specific process of updating the weight of leaf nodes in the wind turbine output power prediction model is as follows: Among them, θ t+1 is the weight of the leaf node in the t+1th iteration; θ t is the weight of the leaf node in t rounds of iteration; g is the gradient sum of the node; h is the second-order derivative sum of the node; λ is the regularization parameter mentioned above.