A wind speed and direction forecast accuracy method, system and computer device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGNENG FUSION SMART TECH CO LTD
- Filing Date
- 2022-11-14
- Publication Date
- 2026-08-07
AI Technical Summary
但是目前为了保证数据安全,现阶段风电场站的数据不能实时传出场站,只能在通过内部审批流程后,得到历史数据,这导致不能及时获取场站风速实况信息,在一定程度上阻碍了预报技术的提高,进而影响风功率的预测准确率,降低风能的利用率
[0016]根据本申请实施例所提供的技术内容,将获取的第一预报数据集与第一观测数据集经过奇异值分解合成,获得更新后的第二预报数据集与第二观测数据集,通过随机森林筛选出对风向与风速影响最大的特征值集合,组成强分类器,通过强分类器中的特征值集训练得到梯度提升模型,再根据梯度提升模型计算得到预报风速值,从而提高风向和风速的预报准确率,根据绘制不同来源得到的风速值,与预报风速值比对,可直观查看梯度提升模型的风速预报效果,进而提高风功率预测准确率,实现对风资源的有效利用。
Smart Images

Figure CN115758876B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of energy meteorology, and in particular to a method, system and computer equipment for improving the accuracy of wind speed and wind direction forecasts. Background Technology
[0002] The importance of clean energy is increasingly prominent, and the status of renewable energy sources such as wind power is rising. However, wind is highly volatile, and accurate wind power forecasting is necessary for wind power to be safely connected to the grid. my country's areas rich in wind energy resources are mainly distributed in the "Three Norths" region (Northeast China, Northwest China, and Northwest China), the Qinghai-Tibet Plateau, the southeast coast and nearby islands, some inland areas (affected by lakes and special topography), and coastal areas. Due to differences in geographical location and topography, the weather and climate characteristics vary across these five major wind resource distribution areas. With the increasing number of wind farms nationwide, wind direction and speed variations are significant in wind farms with complex terrain conditions, posing considerable challenges to wind energy utilization.
[0003] Furthermore, the utilization of wind energy requires timely acquisition of real-time wind speed information from wind farms at the corresponding locations. This real-time wind speed information improves the accuracy of wind forecasting, thereby increasing the accuracy of wind power forecasting. However, currently, to ensure data security, wind farm data cannot be transmitted to the farms in real time. Historical data can only be obtained after internal approval processes. This results in the inability to obtain real-time wind speed information from the farms in a timely manner, hindering the improvement of forecasting technology to some extent, thus affecting the accuracy of wind power forecasting and reducing the utilization rate of wind energy. Summary of the Invention
[0004] Based on this, this application provides a method, system, and computer equipment for improving the accuracy of wind speed and wind direction forecasts, so as to effectively improve the forecast accuracy of wind direction and wind speed based on machine learning techniques, thereby improving the accuracy of wind power prediction and realizing the effective utilization of wind resources.
[0005] Firstly, this application provides a method to improve the accuracy of wind speed and direction forecasts. The method includes: acquiring historical data on wind direction and air pressure, and wind speed and air pressure; dividing the historical data into a first observation dataset and a first forecast dataset based on different sources, wherein the first forecast dataset is used to train and test a model, and the first observation dataset is used to verify the accuracy of the model's forecasts; obtaining correlation feature values between wind direction and air pressure, and wind speed and air pressure at corresponding times based on the acquired first forecast dataset using singular value decomposition; synthesizing and analyzing the obtained correlation feature values to obtain wind direction and wind speed distribution data under various air pressure distribution patterns, and updating the first forecast. A second forecast dataset is obtained. Based on the second forecast dataset and the corresponding second observation dataset at the same time and location, the relevant feature values are filtered using random forest to obtain the relevant feature values that have the greatest impact on wind direction and wind speed, forming a strong classifier. Based on the strong classifier, meteorological element data of the relevant feature values in the strong classifier are extracted to form a third forecast dataset. The forecast wind speed value is calculated using a gradient boosting model. The correction effect of the gradient boosting model is obtained by comparing the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained by the gradient boosting model and the first observation dataset.
[0006] Optionally, before obtaining the relevant feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time based on the acquired first forecast data set using the singular value decomposition method, the method includes: performing data preprocessing on the acquired first observation dataset and the first forecast dataset to obtain the first observation dataset and the first forecast dataset with the same spatial resolution and temporal resolution.
[0007] Optionally, the step of obtaining the correlation feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time based on the acquired first forecast dataset using the singular value decomposition method includes: obtaining a singular vector field based on the wind direction or wind speed in the first forecast dataset and the air pressure of each layer after data preprocessing as input values; including the left and right singular vectors of the similar correlation distribution of wind speed or wind direction and sea level air pressure, the left and right singular vectors of the dissimilar correlation distribution, and the corresponding time coefficients, cumulative covariance contributions, and the calculated correlation coefficients of multiple modes; repeating the above steps until the singular value decomposition results of wind speed or wind direction and other air pressures are obtained.
[0008] Optionally, the step of obtaining wind direction and wind speed distribution data under various pressure distribution patterns through synthetic analysis based on the obtained relevant feature values, and updating the first forecast dataset to obtain the second forecast dataset includes: selecting maxima based on the time coefficients corresponding to the left singular vectors of the heterogeneous correlation distributions, multiplying each maxima by the left singular vector, and summing the results to obtain a feature for forest classification; selecting minima and multiplying each minima by the left singular vector, and summing the results to obtain a feature for forest classification; repeating the above steps until features of multiple modalities are obtained, summing the synthetic analyses of the multiple maxima and multiple minima respectively, and obtaining classification features for random forests; repeating the above steps for the right singular vectors of the heterogeneous correlation distributions and their corresponding time coefficients to obtain features for random forest classification; repeating the above steps until the synthetic analysis results of wind speed or wind direction with other corresponding layer pressures and features for random forest classification are obtained, and putting the synthetic analysis results into the first forecast dataset to obtain the updated second forecast dataset.
[0009] Optionally, the step of using a random forest to filter the relevant feature values based on the second forecast dataset and the corresponding second observation dataset at the same time and location to obtain the relevant feature values that have the greatest impact on wind direction and wind speed to form a strong classifier includes: proportionally sampling the second forecast dataset, combining the sampled data with the corresponding second observation dataset to obtain a second training set, and combining the remaining unsampled data from the second forecast dataset with the corresponding second observation dataset to form a second test set for evaluating the accuracy of the training set; dividing and extracting the training set based on the relevant feature values to form a feature value set, and training multiple decision trees based on the extracted feature value set; voting on the importance of the relevant feature values of the multiple decision trees, extracting a specific number of important relevant feature values before voting, and combining them to obtain the final strong classifier.
[0010] Optionally, the step of extracting meteorological element data with relevant feature values from the strong classifier to form a third forecast dataset and a corresponding third observation dataset at the same time and location, and calculating the forecast wind speed value according to the gradient boosting model, includes: sampling the third forecast dataset proportionally, combining the sampled data with the corresponding third observation dataset to obtain a third training set, and combining the remaining unsampled data from the third forecast dataset with the corresponding third observation dataset to form a third test set for evaluating the accuracy of the training set; and defining a loss function based on the third forecast dataset and the corresponding third observation dataset, which minimizes the loss function for each training iteration, as described by formula (1). (1),
[0011] In the formula, It is the third observation data in the third training set of the i-th grid point. The third predicted data is the third data in the third training set at the i-th grid point; a newly added regression decision tree is trained based on the third training set according to the negative gradient information of the loss function, and the correctly predicted data and the remaining data are obtained; the data distribution is adjusted, giving small weights to the correctly predicted data and large weights to the incorrectly predicted data in the remaining data, and an updated training set is obtained based on this; the current regression decision tree is used to fit the updated training set to obtain a new regression decision tree, correctly predicted data, and remaining data; the above steps are repeated until the error rate of the predicted data is less than 5% and classification is stopped; the decision tree with the highest prediction accuracy among the first preset number of data is selected to obtain a strong learner; based on the third test set and the strong learner, the wind speed value predicted by the gradient boosting model is calculated.
[0012] Optionally, the step of comparing the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained through the gradient boosting model and the first observation dataset to obtain the correction effect of the gradient boosting model specifically includes: calculating the root mean square error of wind direction and wind speed based on the first forecast dataset and the first observation dataset to obtain the root mean square error of the wind speed forecast value before correction; calculating the root mean square error of the corrected wind direction and wind speed with the first observation value based on the third training set according to the gradient boosting model to obtain the root mean square error of the corrected wind speed value calculated according to the gradient boosting model; comparing the magnitudes of the two root mean square errors, if the root mean square error before correction is greater than the root mean square error after correction, it indicates that the model correction is successful; otherwise, the model correction fails.
[0013] Secondly, this application provides an improved system for wind speed and direction forecast accuracy. The system includes: an acquisition module for acquiring historical data on wind direction and air pressure, and wind speed and air pressure, which, according to different sources, is divided into a first observation dataset and a first forecast dataset. The first forecast dataset is used for training and testing models, and the first observation dataset is used to verify the accuracy of model forecasts. A first processing module is used to acquire relevant feature values between wind direction and air pressure, and wind speed and air pressure at corresponding times, based on the acquired first forecast dataset and using singular value decomposition. A second processing module is used to acquire wind direction and wind speed distribution data under various air pressure distribution conditions based on the acquired relevant feature values through synthetic analysis, and to update the first forecast dataset. The system obtains a second forecast dataset; a third processing module is used to obtain a second observation dataset based on the second forecast dataset and the corresponding second observation dataset at the same time and location, and to perform feature filtering on the relevant feature values according to random forest to obtain the relevant feature values that have the greatest impact on wind direction and wind speed to form a strong classifier; a training module is used to extract meteorological element data of the relevant feature values in the strong classifier based on the strong classifier to form a third forecast dataset, and to calculate the forecast wind speed value according to the gradient boosting model; a result output module is used to compare the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained by the gradient boosting model and the first observation dataset to obtain the correction effect of the gradient boosting model.
[0014] Thirdly, this application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method described above when executing the computer program.
[0015] This application has at least the following advantages:
[0016] According to the technical content provided in the embodiments of this application, the first forecast dataset and the first observation dataset are synthesized through singular value decomposition to obtain an updated second forecast dataset and a second observation dataset. The set of feature values that have the greatest impact on wind direction and wind speed is selected by random forest to form a strong classifier. The gradient boosting model is trained by the feature value set in the strong classifier, and the forecast wind speed value is calculated based on the gradient boosting model, thereby improving the forecast accuracy of wind direction and wind speed. By drawing wind speed values obtained from different sources and comparing them with the forecast wind speed values, the wind speed forecast effect of the gradient boosting model can be viewed intuitively, thereby improving the accuracy of wind power prediction and realizing the effective utilization of wind resources. Attached Figure Description
[0017] Figure 1 This is a diagram illustrating the application environment of a method for improving the accuracy of wind speed and wind direction forecasts in one embodiment.
[0018] Figure 2 This is a flowchart illustrating the method for showing the accuracy of wind speed and wind direction forecasts in one embodiment;
[0019] Figure 3 Here is a flowchart illustrating a method for improving the accuracy of wind speed and direction forecasts in one embodiment;
[0020] Figure 4 This is a flowchart illustrating step 205 in one embodiment;
[0021] Figure 5 This is a flowchart illustrating step 207 in one embodiment;
[0022] Figure 6 Here is a diagram showing the structure of the decision tree in one embodiment;
[0023] Figure 7 Here is a diagram illustrating the structure of random forest filtering in one embodiment;
[0024] Figure 8 This is a flowchart illustrating step 209 in one embodiment;
[0025] Figure 9 Here is a structural diagram of a strong classifier in one embodiment;
[0026] Figure 10 This is a block diagram of a wind speed and wind direction forecast accuracy system in one embodiment;
[0027] Figure 11 This is a schematic structural diagram of a computer device in one embodiment. Detailed Implementation
[0028] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the scope of the present application.
[0029] For ease of understanding, the system to which this application applies will first be described. The wind speed and direction forecast accuracy method provided in this application can be applied to, for example... Figure 1The system architecture shown includes a user-space file server 103 and a terminal device 101. The terminal device 101 communicates with the user-space file server 103 via a network. The user-space file server 103 can be a file server based on the NFSv3 / v4 protocol, running in a Linux environment. NFS (Network File System) is a network abstraction on top of a file system, allowing remote clients running on the terminal device 101 to access the file system over the network in a manner similar to a local file system. The terminal device 101 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. The user-space file server 103 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0030] Figure 2 This application provides a flowchart illustrating a method for improving the accuracy of wind speed and direction forecasts. The method can be implemented by, for example... Figure 1 The user-space file server in the system shown executes this. For example... Figure 2 , Figure 3 As shown, the method may include the following steps:
[0031] Step 201: Obtain historical data on wind direction and air pressure, as well as wind speed and air pressure. Based on different sources of historical data, the data is divided into a first observation dataset and a first forecast dataset. The first forecast dataset is used to train and test the model, while the first observation dataset is used to verify the accuracy of the model's forecast.
[0032] In this embodiment, it should be noted that the first observation dataset is sourced from downloaded free CCMPv2 wind field data from the United States. For example, winter data spanning five years from 2016 to 2020 is used. For instance, the winter of 2011 refers to December 1, 2011 to February 29, 2012, with a spatial range of 15°N-55°N and 70°E-140°E. The data has a temporal resolution of 6 hours and a spatial resolution of 0.25° x 0.25°. The data includes observational data for five meteorological elements: time, longitude, latitude, 10-meter zonal wind, and 10-meter meridional wind. This data is two-dimensional gridded data. The first forecast dataset is used for training and testing models. It is obtained by downloading forecast data from the European Centre for Medium-Range Nuclear Forces (ECMWF) and corresponds to the first observation dataset. For example, winter data from 2016 to 2020 (5 years) are used. Only data with a forecast start time of 20:00 Beijing time every day are obtained, with four forecasts per day at 02:00, 08:00, 14:00, and 20:00, and a forecast lead time of 0-24 hours. The spatial range is 15°N-55°N and 70°E-140°E. The data has a temporal resolution of 3 hours and a spatial resolution of 0.4° x 0.4°. It includes 22 surface meteorological elements such as time, longitude, latitude, 10-meter zonal wind, 10-meter meridional wind, 2-meter air temperature, total precipitation, sea level pressure, and mean sea level pressure. It also includes 88 meteorological elements above the surface at isobaric surfaces (925 hPa, 850 hPa, 700 hPa, 500 hPa, 300 hPa, 250 hPa, 200 hPa, and 50 hPa) such as time, longitude, latitude, zonal wind, meridional wind, geopotential height, temperature, relative humidity, specific humidity, vorticity, and divergence. Therefore, there are a total of 110 meteorological element forecast data, each representing a unique feature. This data is three-dimensional gridded data.
[0033] Step 203: Based on the acquired first forecast dataset, obtain the correlation feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time using the singular value decomposition method.
[0034] In this embodiment, it should be noted that Singular Value Decomposition (SVD) is a widely used algorithm in the field of machine learning. It can be used not only for feature decomposition in dimensionality reduction algorithms, but also for recommendation systems and natural language processing. It is the cornerstone of many machine learning algorithms.
[0035] Step 205: Based on the obtained relevant feature values, synthesize and analyze to obtain wind direction and wind speed distribution data under various pressure distribution patterns, and update the first forecast dataset to obtain the second forecast dataset;
[0036] In this embodiment, it should be noted that after singular value decomposition, when the cumulative variance contribution of the current a modes exceeds 95%, these modes and their corresponding time coefficients are selected for synthetic analysis and features used for random forest classification. The synthetic analysis results are then placed into the first forecast dataset to update the first forecast dataset.
[0037] Step 207: Based on the second forecast dataset and the corresponding second observation dataset at the same time and location, the relevant feature values are filtered according to the random forest to obtain the relevant feature values that have the greatest impact on wind direction and wind speed to form a strong classifier.
[0038] In this embodiment, it should be noted that in machine learning, a random forest is a classifier that contains multiple decision trees, and its output class is determined by the mode of the classes output by individual trees. Random forests utilize bootstrapping aggregation, i.e., sampling with replacement, to extract samples from a second prediction dataset to obtain a new dataset, i.e., training samples. Then, a feature set is randomly extracted, and multiple decision trees are trained. Finally, the mode of feature importance among the multiple decision trees is voted on to obtain the final strong classifier.
[0039] Step 209: Based on the strong classifier, extract the meteorological element data of relevant feature values in the strong classifier to form the third forecast dataset, and calculate the forecast wind speed value according to the gradient boosting model.
[0040] In this embodiment, it should be noted that the gradient boosting method is a combination of gradient descent and boosting methods. In each iteration, the negative gradient of the current model on all samples is first calculated. Then, a new decision tree is trained with this value as the target, the weights of the decision tree are calculated, and finally the model is updated to obtain an accurate predicted wind speed value.
[0041] Step 211: Based on the comparison between the root mean square error between the first forecast dataset and the first observation dataset and the root mean square error between the forecast wind speed value obtained through the gradient boosting model and the first observation dataset, the correction effect of the gradient boosting model is obtained.
[0042] In this embodiment, it should be noted that the accuracy of the predicted wind speed calculated by the gradient boosting model is examined by comparing the root mean square error before and after correction.
[0043] In some embodiments, before step 203, which involves obtaining the correlation feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time based on the acquired first forecast dataset using the singular value decomposition method, the method includes performing data preprocessing on the acquired first observation dataset and the first forecast dataset to obtain the first observation dataset and the first forecast dataset with the same spatial resolution and temporal resolution.
[0044] In this embodiment, it should be noted that spatial interpolation and temporal interpolation are performed on the observation data and forecast data respectively to obtain observation data and forecast data with the same spatial resolution and temporal resolution.
[0045] The altitude of each grid point is obtained using the given latitude and longitude. The altitude difference between each grid point and its eight surrounding grid points is calculated and averaged to obtain the altitude difference of that grid point. The altitude and altitude difference are then entered into the observation data and forecast dataset, respectively.
[0046] The wind speed and wind direction are synthesized by combining zonal and meridional winds, and the zonal and meridional winds in the observation data and forecast data are removed.
[0047] Using the formula for air pressure-potential height: ,in It is the geopotential height on the isobaric surface at 925 hPa above the ground. It is the ground potential height. It is the ideal gas constant for dry air. It is gravitational acceleration. It is by The converted air pressure, It is the air pressure at sea level. This is virtual temperature, a function of air pressure. Using the air pressure-geopotential height formula above, the geopotential height above the ground is converted into air pressure, meaning there are currently nine air pressure layers (sea level pressure is eight layers above the ground). Retaining the geopotential height data, the number of meteorological elements now increases to 136.
[0048] For the air pressure of each of the nine layers, calculate the air pressure difference between each point and the surrounding eight points, and take the average as the air pressure difference data for that point. At this time, the number of meteorological elements increases to 143.
[0049] The observation data was flattened into one-dimensional data, and time, longitude, and latitude were removed;
[0050] The forecast data is flattened into one-dimensional data, and time, longitude, and latitude are removed. After removal, the remaining 118 meteorological elements are the 118 features.
[0051] Reference Figure 2 , Figure 3As shown, in some embodiments, in step 203, based on the acquired first forecast dataset, the correlation feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time are obtained according to the singular value decomposition method. Specifically, this includes obtaining a singular vector field based on the wind direction or wind speed in the first forecast dataset and the air pressure of each layer after data preprocessing as input values; including the left and right singular vectors of the similar correlation distribution of wind speed or wind direction and sea level air pressure, the left and right singular vectors of the dissimilar correlation distribution, and the corresponding time coefficients, cumulative covariance contributions, and the calculated correlation coefficients of multiple modes; repeating the above steps until the singular value decomposition results of wind speed or wind direction and other air pressures at each layer are obtained.
[0052] In this embodiment, it should be noted that singular value decomposition is performed using wind direction or wind speed and the air pressure at each layer after data preprocessing. The singular value decomposition process is illustrated using wind speed and sea level air pressure as an example.
[0053] Using wind speed and sea level pressure data from 1804 time periods over 451 days during the winter of 2016-2020 in the first forecast dataset as input data, each time period includes 17776 spatial points. After singular value decomposition, a singular vector field of 17776 modes is obtained, including the left singular vector of the homogeneous correlation distribution of wind speed and sea level pressure, a portion of the wind speed (e.g., if the wind speed before singular value decomposition is 5 m / s, it could be 3 m / s here), and the right singular vector, a portion of the sea level pressure; the left singular vector of the heterogeneous correlation distribution, a portion of the wind speed; the right singular vector, a portion of the sea level pressure; the corresponding time coefficients; the cumulative covariance contribution; and the correlation coefficients of the 17776 modes.
[0054] Repeat the above steps until you obtain the singular value decomposition results of wind speed and other eight layers of air pressure;
[0055] Repeat the above steps until you obtain the singular value decomposition results of wind direction and nine-layer pressure.
[0056] Reference Figure 2 , Figure 4 As shown, in some embodiments, step 205 involves obtaining wind direction and wind speed distribution data under various pressure distribution patterns based on the obtained relevant feature values through synthetic analysis, and updating the first forecast dataset to obtain the second forecast dataset, including:
[0057] Step 2051: Based on the time coefficients corresponding to the left singular vector of the heterogeneous correlation distribution, select the maxima and multiply each maxima by the left singular vector, and sum them to obtain a feature for forest classification.
[0058] Step 2052: Select the minimum value and multiply each minimum value by the left singular vector, sum them up to obtain a feature for forest classification;
[0059] Step 2053: Repeat the above steps until features of multiple modalities are obtained, and finally obtain classification features for random forest.
[0060] Step 2054: Repeat the above steps for the right singular vector of the heterogeneous correlation distribution and the corresponding time coefficient to obtain the features used for random forest classification.
[0061] Step 2055: Repeat the above steps until the composite analysis results of wind speed or wind direction and other corresponding layer pressures are obtained, as well as the features used for random forest classification.
[0062] Step 2056: Put the synthetic analysis results into the first forecast dataset to obtain the updated second forecast dataset.
[0063] In this embodiment, it should be noted that, for the time coefficient corresponding to the first left singular vector of the heterogeneous correlation distribution, the maximum value is selected and each maximum value is multiplied by the first left singular vector. After summing, a feature for forest classification is obtained, denoted as wind speed 101; the minimum value is selected and each minimum value is multiplied by the first left singular vector. After summing, a feature for forest classification is obtained, denoted as wind speed 1001.
[0064] Repeat the above steps until the features of the a-th mode are obtained, denoted as wind speed 10a and wind speed 100a.
[0065] By summing the composite analysis of the above *a* maxima, we obtain a feature for random forest, denoted as wind speed 95. Similarly, by summing the composite analysis of the above *a* minima, we obtain a feature for random forest, denoted as wind speed 0.95.
[0066] For the first a right singular vectors of the heterogeneous correlation distribution and their corresponding time coefficients, repeat the above steps to obtain features for random forest classification, such as sea level pressure 101, ..., sea level pressure 10a, sea level pressure 95; sea level pressure 1001, ..., sea level pressure 100a, sea level pressure 095, etc.
[0067] Repeat the above steps until you obtain the composite analysis results of wind speed and other eight air pressures, as well as the features used for random forest classification, and put the composite analysis results into the first forecast dataset;
[0068] Repeat the above steps until you obtain the composite analysis results of wind direction and barometric pressure, as well as the features used for random forest classification. Then, put the composite analysis results into the first forecast dataset to finally obtain the updated second forecast dataset.
[0069] Reference Figure 5 , Figure 6As shown, in some embodiments, step 207, based on the second forecast dataset and the corresponding second observation dataset at the same time and location, performs feature filtering on relevant feature values according to random forest to obtain a strong classifier composed of relevant feature values that have the greatest impact on wind direction and wind speed, includes:
[0070] S2071, Samples are drawn from the second forecast dataset according to the proportions, and the drawn samples are combined with the corresponding second observation dataset to obtain the second training set. The remaining data in the second forecast dataset that were not drawn are combined with the corresponding second observation dataset to form the second test set, which is used to evaluate the accuracy of the training set.
[0071] S2072, the training set is divided and extracted based on relevant feature values to form a feature value set, and multiple decision trees are trained based on the extracted feature value set;
[0072] S2073 involves voting on the importance of relevant feature values from multiple decision trees, extracting a specific number of important relevant feature values before combining them to obtain the final strong classifier.
[0073] In this embodiment, it should be noted that when sampling with replacement is performed on the second forecast dataset, the... It is determined that approximately 36.8% of the data will not be selected. The unselected data will be used as the test set to evaluate the accuracy of the training set. Therefore, the third forecast data is divided into a third training set and a third test set, and the corresponding third observation data at the time and location are placed into the third training set and the third test set, with the third test set accounting for approximately 30%.
[0074] Reference Figure 6 Based on the extracted feature set, multiple decision trees are trained. These decision trees use features to partition the data and then make decisions; each decision tree is a weak classifier. Taking a decision tree with sea level pressure as the root node as an example, the root node and internal nodes such as sea level pressure difference, altitude, and 500hPa wind speed are features, while leaf nodes such as high wind speed and low wind speed represent classification results. Different decision tree models are trained on various training samples.
[0075] Reference Figure 7 Multiple decision trees are used to calculate the importance of features. Here, the top 50 features are extracted through voting to form a strong classifier. The calculation of feature importance is a step-by-step process for the random forest. The decision tree is calculated using the corresponding out-of-bag data, i.e., the third test set. The out-of-bag error of a decision tree is described by the following formula:
[0076] ;
[0077] Randomly select a feature from out-of-bag data samples Add noise interference, then calculate the first... The out-of-bag error of a decision tree is described by the following formula:
[0078]
[0079] For each decision tree in the random forest The larger the calculated result, the greater the decrease in accuracy of out-of-bag data after the addition of noise interference, indicating a higher degree of feature density. The greater the impact on the classification results of the samples, the more significant the feature. The higher the importance, the better. Then, based on the descending order of feature importance, the top 50 features are extracted to obtain a new set of features that have the greatest impact on wind speed.
[0080] Repeat the above calculation process to obtain a set of the top 50 features that have the greatest impact on wind direction.
[0081] Reference Figure 8 In some embodiments, step 209 involves extracting meteorological element data with relevant feature values from a strong classifier to form a third forecast dataset and a corresponding third observation dataset for the same time and location. The forecast wind speed values calculated using the gradient boosting model include:
[0082] S2091, Samples are drawn from the third forecast dataset according to the proportions, and the drawn samples are combined with the corresponding third observation dataset to obtain the third training set. The remaining data in the third forecast dataset that were not drawn are combined with the corresponding third observation dataset to form the third test set, which is used to evaluate the accuracy of the training set.
[0083] S2092, based on the third forecast dataset and the corresponding third observation dataset, defines a loss function. To minimize the loss function in each training iteration, it is described by formula (1).
[0084] In the formula, It is the third observation data of the third training set of the i-th grid point. It is the third prediction data in the third training set for the i-th grid point.
[0085] Step 2093: Based on the third training set, train the newly added regression decision tree according to the negative gradient information of the loss function, and obtain the correctly predicted data and the remaining data;
[0086] S2094, adjust the data distribution, give small weights to the data that are predicted correctly and large weights to the data that are predicted incorrectly in the remaining data, and obtain an updated training set based on this. Use the current regression decision tree to fit the updated training set to obtain a new regression decision tree, the data that are predicted correctly, and the remaining data.
[0087] S2095, Repeat the above steps until the error rate of the forecast data is less than 5% and then stop the classification;
[0088] S2096: Select the decision tree with the highest prediction accuracy from the first preset number of decision trees to obtain the strong learner;
[0089] S2097, based on the third test set, calculates the wind speed value predicted by the gradient boosting model using a strong learner.
[0090] In this embodiment, it should be noted that the strong classifier obtained using random forest contains multiple features that have the greatest impact on wind speed. These features, i.e., meteorological element data, are extracted to form the third forecast dataset and the corresponding third observation dataset. The third forecast dataset is divided into a training set and a test set, with the third test set accounting for 30%. The corresponding third observation data are respectively placed into the corresponding third training set and the third test set. That is, the third training set includes the third forecast data and the corresponding third observation data.
[0091] Reference Figure 9 Based on the third training set, a newly added regression decision tree is trained using the negative gradient information of the loss function. Specifically, gradient descent is used, as described by the formula. ;
[0092] Define the step size for each training session. Select initial value The process iterates continuously, updating values to minimize the loss function after each training iteration, and yields the first regression decision tree, the first correctly predicted data, and the remaining data beyond the correctly predicted data.
[0093] Adjust the data distribution, assigning small weights to the correctly predicted data 1 and large weights to the incorrectly predicted data in the remaining data 1. Based on this, obtain the updated training set V2, and use the new negative gradient. The second regression decision tree 2 is obtained through training, and 2 correctly predicted data points and 2 remaining data points are obtained. The above steps are repeated until the error rate of the predicted data is less than 5%, at which point the classification stops. At this point, there are n regression decision trees. The sum of regression decision trees 1 to n is obtained to finally obtain the strong learner, which is the prediction model.
[0094] In some embodiments, step 211, based on comparing the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained through the gradient boosting model and the first observation dataset, obtains the correction effect of the gradient boosting model. Specifically, this includes: calculating the root mean square error of wind direction and wind speed based on the first forecast dataset and the first observation dataset to obtain the root mean square error of the wind speed forecast value before correction; calculating the root mean square error of the corrected wind direction and wind speed with the first observation value based on the third training set according to the gradient boosting model to obtain the root mean square error of the corrected wind speed value calculated according to the gradient boosting model; comparing the magnitudes of the two root mean square errors, if the root mean square error before correction is greater than the root mean square error after correction, it indicates that the model correction is successful; otherwise, the model correction fails.
[0095] In this embodiment, it should be noted that the accurate correction effect is obtained by comparing the root mean square error before and after correction. The correction effect is described by a formula.
[0096] .
[0097] In some embodiments, step 211, which compares the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained by the gradient boosting model and the first observation dataset to obtain the correction effect of the gradient boosting model, further includes: drawing a line graph of the wind speed forecast value obtained from the first forecast dataset, the forecast wind speed value obtained from the gradient boosting model, and the observed value obtained from the first observation dataset to visually compare and view the correction effect of the model.
[0098] In this embodiment, it should be noted that by plotting wind speed values obtained from different sources and comparing them with the predicted wind speed values, the wind speed forecasting effect of the gradient boosting model can be viewed intuitively, so as to obtain more accurate predicted wind speed values.
[0099] The above steps mainly involve combining the first forecast dataset and the first observation dataset through singular value decomposition to obtain the updated second forecast dataset and second observation dataset. A set of features that have the greatest impact on wind direction and wind speed is selected through random forest to form a strong classifier. A gradient boosting model is trained using the feature set in the strong classifier, and the forecast wind speed value is calculated based on the gradient boosting model. This improves the accuracy of wind direction and wind speed forecasts, thereby improving the accuracy of wind power prediction and achieving effective utilization of wind resources.
[0100] Reference Figure 10 This application also provides a system for improving the accuracy of wind speed and direction forecasts. This system may include: an acquisition module, a first processing module, a second processing module, a third processing module, a training module, and a result output module. The main functions of each component module are as follows:
[0101] The acquisition module 501 is used to acquire historical data on wind direction and air pressure, as well as wind speed and air pressure. Depending on the source of the historical data, it is divided into a first observation dataset and a first forecast dataset. The first forecast dataset is used to train and test the model, while the first observation dataset is used to verify the accuracy of the model's forecast.
[0102] The first processing module 502 is used to obtain the relevant feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time based on the obtained first forecast dataset and the singular value decomposition method.
[0103] The second processing module 503 is used to acquire wind direction and wind speed distribution data under various air pressure distribution patterns based on the obtained relevant feature values through synthetic analysis, and update the first forecast dataset to obtain the second forecast dataset;
[0104] The third processing module 504 is used to obtain a strong classifier by performing feature filtering on relevant feature values based on the second forecast dataset and the corresponding second observation dataset at the same time and location according to random forest, and obtaining the relevant feature values that have the greatest impact on wind direction and wind speed.
[0105] Training module 505 is used to extract meteorological element data with relevant feature values from the strong classifier based on the strong classifier, form the third forecast dataset, and calculate the forecast wind speed value according to the gradient boosting model.
[0106] The result output module 506 is used to compare the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained by the gradient boosting model and the first observation dataset, so as to obtain the correction effect of the gradient boosting model.
[0107] According to embodiments of this application, this application also provides a computer device and a computer-readable storage medium.
[0108] like Figure 11 The diagram shown is a block diagram of a computer device according to an embodiment of this application. The term "computer device" is intended to represent various forms of digital computers or mobile devices. The digital computer may include a desktop computer, a portable computer, a workbench, a personal digital assistant, a server, a mainframe computer, and other suitable computers. The mobile device may include a tablet computer, a smartphone, a wearable device, etc.
[0109] like Figure 6As shown, device 600 includes a computing unit 601, a ROM 602, a RAM 603, a bus 604, and an input / output (I / O) interface 605. The computing unit 601, ROM 602, and RAM 603 are interconnected via the bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0110] The computing unit 601 can execute various processes in the method embodiments of this application according to computer instructions stored in read-only memory (ROM) 602 or computer instructions loaded from storage unit 608 into random access memory (RAM) 603. The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. The computing unit 601 can include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. In some embodiments, the methods provided in the embodiments of this application can be implemented as computer software programs, which are tangibly contained in a computer-readable storage medium, such as storage unit 608.
[0111] RAM 603 may also store various programs and data required for the operation of device 600. Part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609.
[0112] The input unit 606, output unit 607, storage unit 608, and communication unit 609 in device 600 can be connected to I / O interface 605. The input unit 606 can be, for example, a keyboard, mouse, touchscreen, or microphone; the output unit 607 can be, for example, a display, speaker, or indicator light. Device 600 can exchange information and data with other devices through the communication unit 609.
[0113] It should be noted that the device may also include other components necessary for normal operation. It may also include only the components necessary for implementing the solution of this application, without necessarily including all the components shown in the figures.
[0114] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), payload programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof.
[0115] The computer instructions used to implement the methods of this application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 601 such that when executed by the computing unit 601, such as a processor, the computer instructions cause the execution of the steps involved in the embodiments of the methods of this application.
[0116] The computer-readable storage medium provided in this application can be a tangible medium that can contain or store computer instructions for performing the steps involved in the method embodiments of this application. The computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, and other forms of storage media.
[0117] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for improving the accuracy of wind speed and direction forecasts, characterized in that, The method includes: Historical data on wind direction and air pressure, as well as wind speed and air pressure, are acquired and divided into a first observation dataset and a first forecast dataset according to different sources. The first forecast dataset is used to train and test the model, while the first observation dataset is used to verify the accuracy of the model's forecast. Based on the acquired first forecast dataset, the correlation feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time are obtained by singular value decomposition. Based on the obtained relevant feature values, the wind direction and wind speed distribution data under various pressure distribution conditions are obtained through synthetic analysis, and the first forecast dataset is updated to obtain the second forecast dataset. Based on the second forecast dataset and the corresponding second observation dataset at the same time and location, the relevant feature values are filtered using random forest to obtain the relevant feature values that have the greatest impact on wind direction and wind speed, forming a strong classifier. Based on the strong classifier, meteorological element data of the relevant feature values in the strong classifier are extracted to form a third forecast dataset, and the forecast wind speed value is calculated according to the gradient boosting model. The correction effect of the gradient boosting model is obtained by comparing the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained by the gradient boosting model and the first observation dataset. The strong classifier, which is formed by filtering the relevant feature values based on the second forecast dataset and the corresponding second observation dataset at the same time and location using random forest, and obtaining the relevant feature values that have the greatest impact on wind direction and wind speed, includes: Samples are extracted from the second forecast dataset according to a certain proportion. The extracted samples and the corresponding second observation dataset are combined to obtain the second training set. The remaining data in the second forecast dataset that were not extracted are combined with the corresponding second observation dataset to form the second test set, which is used to evaluate the accuracy of the training set. The training set is divided and extracted based on the relevant feature values to form a feature value set. Multiple decision trees are trained based on the extracted feature value set. The importance of the relevant feature values of the multiple decision trees is voted on, and the relevant feature values of the top 50 features are extracted by voting and combined to obtain the final strong classifier.
2. The method for improving the accuracy of wind speed and direction forecasts according to claim 1, characterized in that, Before obtaining the correlation feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time based on the acquired first forecast dataset using the singular value decomposition method, the process includes: The first observation dataset and the first forecast dataset are preprocessed to obtain the first observation dataset and the first forecast dataset with the same spatial and temporal resolution.
3. The method for improving the accuracy of wind speed and direction forecasts according to claim 2, characterized in that, The method of obtaining correlation feature values between wind direction and air pressure, and wind speed and air pressure at corresponding times based on the acquired first forecast dataset using singular value decomposition includes: Based on the wind direction or wind speed in the first forecast dataset and the air pressure of each layer after data preprocessing, a singular vector field is obtained. This includes the left and right singular vectors of the similar correlation distribution of wind speed or wind direction with sea level pressure, the left and right singular vectors of the dissimilar correlation distribution, the corresponding time coefficients, cumulative covariance contributions, and the calculated correlation coefficients of multiple modes. Repeat the above steps until you obtain the singular value decomposition results of wind speed or wind direction and other air pressures at each layer.
4. The method for improving the accuracy of wind speed and direction forecasts according to claim 3, characterized in that, The process of synthesizing and analyzing the obtained relevant feature values to obtain wind direction and wind speed distribution data under various pressure distribution patterns, and updating the first forecast dataset to obtain the second forecast dataset includes: Based on the time coefficient corresponding to the left singular vector of the heterogeneous correlation distribution, the maximum value is selected and each maximum value is multiplied by the left singular vector. The summation is then used to obtain a feature for random forest classification. Select the minimum value and multiply each minimum value by the left singular vector, then sum them to obtain a feature for random forest classification; Repeat the above steps until features of multiple modalities are obtained, ultimately yielding classification features for random forest. For the right singular vector and corresponding time coefficient of the heterogeneous correlation distribution, repeat the above steps to obtain features for random forest classification; Repeat the above steps until you obtain the combined analysis results of wind speed or wind direction with other corresponding stratal pressures and the features used for random forest classification; The results of the synthetic analysis are put into the first forecast dataset to obtain the updated second forecast dataset.
5. The method for improving the accuracy of wind speed and direction forecasts according to claim 1, characterized in that, The meteorological element data, based on the strong classifier, are extracted from the relevant feature values of the strong classifier to form a third forecast dataset and a corresponding third observation dataset for the same time and location. The forecast wind speed value is calculated according to the gradient boosting model, including: Samples are extracted from the third forecast dataset according to a certain proportion. The extracted samples and the corresponding third observation dataset are combined to obtain the third training set. The remaining data in the third forecast dataset that were not extracted are combined with the corresponding third observation dataset to form the third test set, which is used to evaluate the accuracy of the training set. Based on the third forecast dataset and the corresponding third observation dataset, a loss function is defined. To minimize the loss function in each training iteration, it is described by formula (1). (1), In the formula, It is the third observation data in the third training set of the i-th grid point. It is the third prediction data in the third training set of the i-th grid point; Based on the third training set, a newly added regression decision tree is trained according to the negative gradient information of the loss function, and the correctly predicted data and the remaining data are obtained. Adjust the data distribution, giving small weights to the correctly predicted data and large weights to the incorrectly predicted data in the remaining data. Based on this, obtain an updated training set. Use the current regression decision tree to fit the updated training set to obtain a new regression decision tree, correctly predicted data, and remaining data. Repeat the above steps until the error rate of the forecast data is less than 5%, at which point the classification will stop. Select the decision tree with the highest prediction accuracy from the first preset number of decisions to obtain the strong learner; Based on the third test set, the wind speed value predicted by the gradient boosting model is calculated using the strong learner.
6. The method for improving the accuracy of wind speed and direction forecasts according to claim 5, characterized in that, The step of comparing the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained through the gradient boosting model and the first observation dataset to obtain the correction effect of the gradient boosting model specifically includes: The root mean square error of wind direction and wind speed is calculated based on the first forecast dataset and the first observation dataset to obtain the root mean square error of the wind speed forecast value before correction. Based on the third training set, the root mean square error of the corrected wind direction and wind speed calculated according to the gradient boosting model is compared with the root mean square error of the wind direction and wind speed data in the first observation dataset, and the root mean square error of the corrected wind speed value calculated according to the gradient boosting model is obtained. Compare the magnitudes of the two root mean square errors. If the root mean square error before correction is greater than the root mean square error after correction, it indicates that the model correction was successful; otherwise, the model correction failed.
7. The method for improving the accuracy of wind speed and direction forecasts according to claim 1, characterized in that, The step of comparing the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained through the gradient boosting model and the first observation dataset to obtain the correction effect of the gradient boosting model further includes: Plot a line graph showing the wind speed forecast value obtained from the first forecast data, the forecast wind speed value obtained from the gradient boosting model, and the observed value obtained from the first observation data, and visually compare the correction effect of the model.
8. A system for predicting wind speed and direction accuracy, wherein the system employs the method described in any one of claims 1-7, characterized in that, The system includes: The acquisition module is used to acquire historical data on wind direction and air pressure, as well as wind speed and air pressure. Based on the different sources of the historical data, it is divided into a first observation dataset and a first forecast dataset. The first forecast dataset is used to train and test the model, and the first observation data is used to verify the accuracy of the model's forecast. The first processing module is used to obtain the relevant feature values between wind direction and air pressure, and wind speed and air pressure at the corresponding time based on the obtained first forecast dataset using the singular value decomposition method; The second processing module is used to acquire wind direction and wind speed distribution data under various air pressure distribution conditions based on the obtained relevant feature values through synthetic analysis, and update the first forecast dataset to obtain the second forecast dataset. The third processing module is used to obtain a strong classifier by performing feature filtering on the relevant feature values based on the second forecast dataset and the corresponding second observation dataset at the same time and location according to the random forest, and obtaining the relevant feature values that have the greatest impact on wind direction and wind speed. The training module is used to extract meteorological element data of the relevant feature values in the strong classifier based on the strong classifier, form a third forecast dataset, and calculate the forecast wind speed value according to the gradient boosting model. The results output module is used to compare the root mean square error between the first forecast dataset and the first observation dataset with the root mean square error between the forecast wind speed value obtained by the gradient boosting model and the first observation dataset, so as to obtain the correction effect of the gradient boosting model.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for predicting wind power generation power of fan and related devices
CN111340307A
Short-term wind power prediction method and system based on multi-position numerical weather prediction
CN112036595A