A method and apparatus for predicting direct normal solar irradiance
By preprocessing and clustering historical meteorological data, and optimizing the LightGBM model, a direct solar normal radiation prediction model was established. This solved the problem of low accuracy in existing prediction methods, achieving higher prediction accuracy and robustness, and supporting the stable operation of solar thermal power generation systems.
Patent Information
- Application Number
- CN202410438989.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-04-12
AI Technical Summary
Existing methods for predicting direct solar radiation have low accuracy and cannot effectively address its intermittency and instability, thus affecting the stable operation of solar thermal power generation systems.
By acquiring historical meteorological data, performing preprocessing and cluster analysis, optimizing the LightGBM model, and combining it with the frost and ice optimization algorithm to determine the optimal hyperparameters, a solar direct normal radiation prediction model was established, and the Euclidean distance evaluation standard was used for prediction.
It improves the accuracy and robustness of solar direct normal radiation prediction, reduces the impact of intermittency and uncertainty, and enhances the stability and efficiency of solar thermal power generation systems.
Smart Images

Figure CN118332358B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of solar power generation, and particularly relates to a solar direct normal irradiance prediction method and device. BACKGROUND
[0002] The basic principle of the photo-thermal power generation is to collect solar radiation energy in the collector area through the mirror field, generate high-temperature steam through the heating medium, and drive the turbine generator set to work. It is a solar power generation technology that converts light energy into heat energy and then converts the heat energy into electric energy. The photo-thermal power generation system mainly utilizes the solar direct normal irradiance. Since the solar direct normal irradiance is intermittent and unstable, the existing mainstream prediction method has low prediction accuracy. SUMMARY
[0003] In view of the low prediction accuracy of the existing mainstream prediction method, the application provides a solar direct normal irradiance prediction method and device.
[0004] In a first aspect, a solar direct normal irradiance prediction method is provided, comprising the following steps:
[0005] Obtaining historical meteorological data in a certain time period of a prediction area and composing a historical meteorological data set, the historical meteorological data set comprising multiple types of parameters;
[0006] Preprocessing the historical meteorological data, comprising:
[0007] Deleting the historical meteorological data corresponding to the time period in which the solar direct normal irradiance in the historical meteorological data set is 0;
[0008] If there is missing data in the historical meteorological data set, and the missing data is numerical data, and the absolute value of the skewness value of the parameter category corresponding to the missing data is greater than a preset skewness value, the missing data is filled with the median of the parameter category in the historical meteorological data set, and if the absolute value of the skewness value of the parameter category corresponding to the missing data is less than or equal to the preset skewness value, the missing data is filled with the mean of the parameter category in the historical meteorological data set;
[0009] Clustering the preprocessed historical meteorological data using a clustering algorithm, classifying the historical meteorological data set according to the clustering result, and obtaining multiple types of meteorological data sets; dividing the multiple types of meteorological data sets into a training set and a validation set;
[0010] Training and optimizing a LightGBM model using the training set and the validation set to obtain a final prediction model;
[0011] Taking the meteorological data of the prediction day as the input of the final prediction model, and predicting the solar direct normal irradiance value of the day.
[0012] Optionally, if there is missing data in the first historical meteorological data set, and the missing data is discrete data, the mode of the parameter category corresponding to the discrete data is used to fill in the missing data.
[0013] Optionally, the pre-processing of the historical meteorological data further comprises: deleting abnormal data in the historical meteorological data set after filling in the missing data; the abnormal data is historical meteorological data outside a three-standard-deviation range in the historical meteorological data set, and the three-standard-deviation range is three times the mean value of the historical meteorological data in the first meteorological parameter set and the standard deviation of the historical meteorological data in the first meteorological parameter set.
[0014] Optionally, the pre-processing of the historical meteorological data further comprises: normalizing the historical meteorological data set.
[0015] Optionally, the historical meteorological data comprises: temperature, wind speed, solar hour angle, relative humidity, cloud type, and solar direct normal irradiance value.
[0016] Optionally, a plurality of clustering algorithms are used to cluster the pre-processed historical meteorological data, the effects of the plurality of clustering algorithms are evaluated according to the silhouette coefficients, and the clustering result of the clustering algorithm with the highest silhouette coefficient is selected to classify the historical meteorological data.
[0017] The final silhouette coefficient is the average value of the silhouette coefficients of all samples.
[0018] Optionally, the frost-ice optimization algorithm is used to optimize the best hyperparameters of the LightGBM model.
[0019] Optionally, after training and optimizing the LightGBM model using the training set and the validation set, the method further comprises:
[0020] Based on the LightGBM model trained and optimized, solar direct normal irradiance prediction sub-models of various meteorological data sets are respectively established by learning and fitting; and the final prediction model comprises the solar direct normal irradiance prediction sub-models of the various meteorological data sets.
[0021] The meteorological data of the prediction day is input into the final prediction model to predict the solar direct normal irradiance value of the prediction day, comprising:
[0022] The Euclidean distance between the real-time meteorological data and the cluster centers of various meteorological data sets is calculated, the real-time meteorological data is input into the solar direct normal irradiance prediction sub-model corresponding to the cluster center with the smallest Euclidean distance, and the solar direct normal irradiance value is predicted.
[0023] In a second aspect, a solar direct normal irradiance prediction device is provided, comprising:
[0024] The data preprocessing module is configured to obtain historical meteorological data in a certain time period of a prediction area, and to form a historical meteorological data set, and to preprocess the historical meteorological data, including: deleting historical meteorological data corresponding to a time period in which the direct normal irradiance in the historical meteorological data set is 0; if there is missing data in the historical meteorological data set, and the missing data is numerical data, and the absolute value of the skewness of the parameter category corresponding to the missing data is greater than a preset skewness value, the median of the parameter category in the historical meteorological data set is used to fill in the missing data, and if the absolute value of the skewness of the parameter category corresponding to the missing data is less than or equal to the preset skewness value, the mean of the parameter category in the historical meteorological data set is used to fill in the missing data; if there is missing data in the first historical meteorological data set, and the missing data is discrete data, the mode of the parameter category corresponding to the discrete data is used to fill in the missing data; the clustering module is configured to cluster the preprocessed historical meteorological data using a clustering algorithm, to classify the historical meteorological data set according to the clustering result, and to obtain a plurality of meteorological data sets; and the plurality of meteorological data sets are divided into a training set and a validation set;
[0025] The model optimization module is configured to train and optimize a LightGBM model using the training set and the validation set, and to obtain a final prediction model;
[0026] The output module is configured to input real-time meteorological data into the final prediction model, and to predict the direct normal irradiance value.
[0027] Optionally, the preprocessing of the historical meteorological data further includes: deleting abnormal data in the historical meteorological data set after filling in the missing data; the abnormal data is historical meteorological data in the historical meteorological data set that is outside a three-sigma range, the three-sigma range being a mean value of the historical meteorological data in the first meteorological parameter set and a standard deviation of the historical meteorological data in the first meteorological parameter set.
[0028] Beneficial effects: The preprocessing of the data reduces the influence of intermittency and uncertainty of the direct normal irradiance, and improves the prediction accuracy. The preprocessed historical meteorological data set is classified using a clustering algorithm; a direct normal irradiance prediction sub-model is established for each type of meteorological data set, and the RIME optimization algorithm is used to quickly and efficiently determine the best hyperparameters of the LightGBM; when real-time meteorological data is input, the Euclidean distance is used as a judgment standard to select the most suitable prediction sub-model for prediction, which makes the prediction more targeted, further improves the accuracy and robustness of the prediction, consolidates the foundation of the solar-thermal power generation and project construction, and makes the advantages of the solar-thermal power station better utilized. BRIEF DESCRIPTION OF DRAWINGS
[0029] The application will be described in further detail below with reference to the drawings and specific embodiments.
[0030] Figure 1 A flow chart of a method for predicting direct normal solar radiation according to an exemplary embodiment of the present application.
[0031] Figure 2 A flow chart of data preprocessing in a method for predicting direct normal solar radiation according to an exemplary embodiment of the present application.
[0032] Figure 3 A flow chart of another method for predicting direct normal solar radiation according to an exemplary embodiment of the present application.
[0033] Figure 4 A line chart of predicted direct normal solar radiation values and actual direct normal solar radiation values in clear days by a final prediction model and a plurality of models of prior art according to an exemplary embodiment of the present application.
[0034] Figure 5 A line chart of predicted direct normal solar radiation values and actual direct normal solar radiation values in cloudy-to-clear days by a final prediction model and a plurality of models of prior art according to an exemplary embodiment of the present application.
[0035] Figure 6 A structural schematic diagram of a device for predicting direct normal solar radiation according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions of the present application will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0037] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0038] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting" should be understood in a broad sense, for example, can be fixed connection, can also be detachable connection, or integrally connected; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances. In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0039] Embodiments
[0040] As Figure 1 shown, a direct solar normal radiation prediction method is provided, comprising the following steps:
[0041] S11, obtaining historical meteorological data in a certain time period of a prediction area, and composing a historical meteorological data set, the historical meteorological data set including multiple types of parameters; the historical meteorological data includes temperature, wind speed, solar hour angle, relative humidity, cloud type and direct solar normal radiation value.
[0042] As Figure 2 shown, the historical meteorological data is preprocessed, including:
[0043] S111, deleting the historical meteorological data corresponding to the period when the direct solar normal radiation in the historical meteorological data set is 0;
[0044] S112, if there is missing data in the historical meteorological data set, and the missing data is numerical data, and the absolute value of the skewness value of the parameter category corresponding to the missing data is greater than the preset skewness value, the median of the parameter category in the historical meteorological data set is used to fill the missing data, and if the absolute value of the skewness value of the parameter category corresponding to the missing data is less than or equal to the preset skewness value, the mean of the parameter category in the historical meteorological data set is used to fill the missing data;
[0045] S113, if there is missing data in the first historical meteorological data set, and the missing data is discrete data, the mode of the parameter category corresponding to the discrete data is used to fill the missing data;
[0046] S114, deleting the abnormal data in the historical meteorological data set after filling the missing data; the abnormal data is the historical meteorological data in the historical meteorological data set, which is outside the three times standard deviation range, and the three times standard deviation range is the mean of the historical meteorological data in the first meteorological parameter set, and the standard deviation of the historical meteorological data in the first meteorological parameter set.
[0047] S115, normalize the historical meteorological data set after deleting the abnormal data
[0048] S12, cluster the preprocessed historical meteorological data using a clustering algorithm, classify the historical meteorological data set according to the clustering result, and obtain a multi-class meteorological data set; divide the multi-class meteorological data set into a training set and a validation set;
[0049] A variety of clustering algorithms are used to cluster the preprocessed historical meteorological data, and the effects of the various clustering algorithms are evaluated according to the silhouette coefficient, and the clustering result of the clustering algorithm with the highest silhouette coefficient is selected to classify the historical meteorological data;
[0050] The final silhouette coefficient is the average of the silhouette coefficients of all samples.
[0051] S13, train and optimize the LightGBM model using the training set and the validation set to obtain a final prediction model; optimize the best hyperparameters of the LightGBM model using the frost and ice optimization algorithm; based on the trained and optimized LightGBM model, establish a solar direct normal radiation prediction sub-model for each type of meteorological data set by learning and fitting; the final prediction model includes the solar direct normal radiation prediction sub-model for each type of meteorological data set;
[0052] The real-time meteorological data is input into the final prediction model to predict the solar direct normal radiation value, including:
[0053] Calculate the Euclidean distance between the real-time meteorological data and the cluster centers of each type of meteorological data set, input the real-time meteorological data into the solar direct normal radiation prediction sub-model corresponding to the cluster center with the smallest Euclidean distance, and the corresponding solar direct normal radiation prediction sub-model predicts the solar direct normal radiation value.
[0054] S14, input the meteorological data of the prediction day into the final prediction model to predict the solar direct normal radiation value of the day.
[0055] As shown in Figure 3 The embodiment provides a solar direct normal radiation prediction method, which comprises the following steps:
[0056] S21, obtain historical meteorological data of a prediction area in a certain time period and form a historical meteorological data set; and pre-process the historical meteorological data set.
[0057] The historical meteorological data in each hour within a certain time period is collected, and the time period is several days or several weeks, etc. The historical meteorological data is selected from meteorological parameters having a strong Pearson correlation coefficient with the direct normal solar radiation. In this embodiment, the historical meteorological data set is composed of historical meteorological parameters having an absolute value of the Pearson correlation coefficient greater than 0.2; the historical meteorological data set includes multiple types of parameters, and the meteorological data set includes dew point, ground reflectivity, air pressure, wind direction, temperature, wind speed, solar hour angle, relative humidity, cloud type, and direct normal solar radiation. In this embodiment, the meteorological parameters having a strong correlation with the direct normal solar radiation are selected as the historical meteorological data in the initial historical meteorological data set by using the Pearson correlation coefficient; the types of the historical meteorological parameters in the historical meteorological data set include temperature, wind speed, solar hour angle, relative humidity, cloud type, and direct normal solar radiation value;
[0058] The calculation formula of the Pearson correlation coefficient is as follows:
[0059]
[0060] In the formula, x i and y i are the sample points of the direct normal solar radiation and the remaining historical meteorological parameters of sample i in the historical meteorological data set; and are the average values of x i and y i , respectively; n is the sample number. The value range of P is [-1, 1], P = 0 indicates that the two variables are not correlated, P > 0 indicates that the two variables are positively correlated, P < 0 indicates that the two variables are negatively correlated, and the greater the absolute value of P, the stronger the correlation between the two variables.
[0061] The preprocessing of the historical meteorological data set includes the following steps.
[0062] S211. The historical meteorological data corresponding to the time period in which the direct normal solar radiation is 0 in the historical meteorological data set is deleted to obtain a first historical meteorological data set.
[0063] S212. If there is missing data in the first historical meteorological data set, and the missing data is numerical data, and the absolute value of the skewness value of the parameter type corresponding to the missing data is greater than a preset skewness value, the median of the parameter type in the historical meteorological data set is used to fill the missing data; or the absolute value of the skewness value of the parameter type corresponding to the missing data is less than or equal to the preset skewness value, and the mean of the parameter type in the historical meteorological data set is used to fill the missing data.
[0064] In this embodiment, the skewness index is used to measure the skewness of the data. When the absolute value of the skewness value is greater than 2, it is considered that the data presents a significant skew distribution; when the absolute value of the skewness value is within 2, close to 0, it is considered that the data is close to symmetric distribution.
[0065] The skewness value calculation formula is as follows:
[0066]
[0067] In the formula, S is the skewness value, n is the data amount in the historical meteorological data set, μ is the mean value in the historical meteorological data set, σ is the standard deviation of the historical meteorological data set, X i is the i-th data in the historical meteorological data set.
[0068] S213, if there is missing data in the first historical meteorological data set, and the missing data is discrete data, the mode of the parameter category corresponding to the discrete data is used to fill the missing data to maintain the discreteness of the data. In this embodiment, the discreteness refers to the fact that the value set of the data is finite or countable, that is, there is an interval or discontinuity between the data, which can be judged by checking the value range of the data and the type of the data (for example, integer type, category type). If the data has a limited value and interval, it means that the data is discrete.
[0069] In the historical meteorological data set, the numerical type data includes: temperature, wind speed, solar hour angle, relative humidity, solar direct normal radiation value; the discrete type data includes: cloud type.
[0070] S214, deleting the abnormal data in the historical meteorological data set after filling the missing data; the abnormal data is the historical meteorological data in the historical meteorological data set, which is outside the three times standard deviation range, the three times standard deviation range is (μ-3σ, μ+3σ), μ is the mean value of the historical meteorological data in the first meteorological parameter set, and σ is the standard deviation of the historical meteorological data in the first meteorological parameter set.
[0071] S215, normalizing the historical meteorological data set after deleting the abnormal data, and the calculation of the normalization operation includes,
[0072]
[0073] Wherein, x new is the normalized data, x is the original data, that is, the data in the historical meteorological data set after deleting the abnormal data; x min is the minimum value of the data in the optimized historical meteorological data set; x max is the maximum value of the data in the optimized historical meteorological data set.
[0074] S22, clustering the preprocessed historical meteorological data using a clustering algorithm;
[0075] S221, clustering the preprocessed historical meteorological data using a plurality of clustering algorithms, evaluating the effects of the plurality of clustering algorithms according to silhouette coefficients, and selecting a clustering result of a clustering algorithm with the highest final silhouette coefficient to classify the historical meteorological data, thereby obtaining a plurality of meteorological data sets.
[0076] The calculation formula of the silhouette coefficient is:
[0077]
[0078] wherein a(i) is the average distance between sample i in the preprocessed historical meteorological data set and other samples in the same cluster, referred to as cohesion degree; b(i) is the average distance between sample i in the preprocessed historical meteorological data set and all samples in other clusters, referred to as separation degree; the average value of the silhouette coefficients of all samples is the final silhouette coefficient, which ranges from -1 to 1, and the closer the value is to 1, the smaller the intra-cluster distance and the larger the inter-cluster distance, and the better the clustering effect.
[0079] The clustering algorithm specifically includes Mini Batch K-Means, K-Means, Fuzzy C-means or GaussianMixture clustering method.
[0080] The historical meteorological data is divided into a plurality of meteorological data sets after clustering, each of which has a clustering center after competition iteration, and the historical meteorological parameters of the clustering center are taken as the typical meteorological data of the corresponding meteorological data set.
[0081] S222, dividing the plurality of meteorological data sets into a training set and a validation set according to a ratio of 8:2.
[0082] S23, training and optimizing a LightGBM (based on gradient boosting decision tree) model using the training set and the validation set; the training set is used to train the LightGBM model to fit the data, and the validation set is used to optimize the model parameters of the trained LightGBM model to improve the performance of the model.
[0083] The RIME (Rapidly Increasing Marginal Exploration) algorithm is used to optimize the best hyperparameters of the LightGBM model, which specifically includes the following steps:
[0084] 1) defining a hyperparameter space and initializing hyperparameters;
[0085] It should be noted that when the hyperparameters of the LightGBM model are tuned by RIME, the value ranges of the hyperparameters of the model are first set, the value ranges of the number of leaves, the maximum depth of the tree, the learning rate, the minimum number of samples of the child node, the feature sampling ratio, the data sampling ratio, and the data sampling frequency are set to [2, 50], [3, 15], [0.001, 0.1], [5, 100], [0.1, 1.0], [0.1, 1.0], and [1, 10] respectively, and the RMSE (Root Mean Square Error) of the five-fold cross-validation output by the LightGBM model is taken as the objective function to find the best hyperparameters of the LightGBM model.
[0086] 2) Update the population using the soft frost search strategy, and the position of the soft frost particle after update The calculation includes,
[0087]
[0088]
[0089]
[0090]
[0091] where i and j represent the jth particle in the ith frost and ice population; R best,j is the jth particle in the best frost and ice population; r1 is a parameter ranging from (-1, 1), which controls the moving direction of the particle together with cos theta, t is the current iteration number, T is the maximum iteration number of the algorithm; beta is an environmental factor, which is used to simulate the influence of the external environment and ensure the convergence of the algorithm, [.] represents the integer, and the default value of w is 5; h is the adhesion degree, ranging from (0, 1), which is used to control the distance between the frost and ice particles; Ub ij , Lb ij are the upper and lower bounds of the escape space, respectively, which limit the movement area of the frost and ice particles; r2 is a random number ranging from
[51] and E is the adhesion coefficient;
[0092] It should be noted that the particles mentioned in the steps are the value combinations of a group of hyperparameters, and the population is a set composed of multiple hyperparameter combinations;
[0093] 3) The hard frost puncture mechanism is adopted to realize the information exchange between particles, and the replacement calculation between hard frost particles includes,
[0094]
[0095] where F normr (S i ) represents the normalized value of the current population fitness value; r3 is a random number ranging from (-1, 1);
[0096] 4) Using the positive greedy mechanism, find the optimal solution;
[0097] 5) Repeat steps 2) 3) 4) until the number of iterations is reached, and output the best hyperparameter combination.
[0098] Further, using the frost ice optimization algorithm to determine the best hyperparameters of the LightGBM model, the historical meteorological data in the preprocessed historical meteorological data set and the internal variation law of the direct normal solar radiation are learned and fitted by the LightGBM model, and the direct normal solar radiation prediction sub-model of each type of meteorological data is established.
[0099] The learning and fitting step includes:
[0100] 1) Initialize network parameters: set the best hyperparameters of the LightGBM model optimized by RIME;
[0101] 2) Use the one-sided gradient sampling (GOSS) algorithm to eliminate historical meteorological parameters with small weights in each meteorological data set, reduce data volume, and improve training efficiency;
[0102] 3) Use the mutual exclusion binding (EFB) algorithm to reduce feature quantity and simplify model complexity; the feature quantity in this embodiment refers to the number of parameter categories in the historical meteorological data set. By mutual exclusion binding, the originally input mutually exclusive meteorological parameters are bundled to form new features, reducing the amount of input meteorological parameters and reducing the dimension.
[0103] 4) Fit residual tree: adopt a Leaf-wise decision tree growth strategy with depth limit to reduce the number of node splits to reduce the amount of calculation, and adopt a histogram algorithm to improve the speed of finding the optimal split point;
[0104] 5) Stop fitting when the number of iterations is reached;
[0105] 6) Model saving: based on different categories of meteorological data sets, solar direct normal radiation prediction sub-models are established, and multiple solar direct normal radiation prediction sub-models constitute the final prediction model. Each solar direct normal radiation prediction sub-model can output a solar direct normal radiation prediction value.
[0106] The LightGBM model is a gradient boosting framework based on the GBDT model. By introducing the histogram algorithm, the Leaf-wise decision tree growth strategy with depth limit, the one-sided gradient sampling (GOSS) and the mutual exclusion binding (EFB) method, LightGBM can support efficient parallel training, with faster training speed, lower memory consumption, higher accuracy and support for distributed fast processing of massive data.
[0107] S24, input the predicted per-hour meteorological data of the day as the input of the final prediction model, and predict the per-hour solar direct normal radiation value of the day based on the corresponding solar direct normal radiation prediction sub-model.
[0108] The predicted per-hour meteorological data of the day does not include the solar direct normal radiation value; because the solar direct normal radiation value is inconvenient to measure directly, the final prediction model can be used for prediction. If the solar direct normal radiation value of a certain day that has occurred, such as the solar direct normal radiation value of yesterday, is to be predicted, the per-hour meteorological data of yesterday except for the solar direct normal radiation value can be used as input to predict the per-hour solar direct normal radiation value of yesterday. If the solar direct normal radiation value of a certain day in the future, such as the solar direct normal radiation value of tomorrow, is to be predicted, the per-hour meteorological data of tomorrow except for the solar direct normal radiation value obtained from weather forecasts can be used as input to predict the per-hour solar direct normal radiation value of tomorrow.
[0109] Specifically, the Euclidean distance between real-time meteorological data and the cluster centers of each type of meteorological data set is calculated, and the per-hour real-time meteorological data is input into the solar direct normal radiation prediction sub-model corresponding to the cluster center with the smallest Euclidean distance, and the corresponding solar direct normal radiation prediction sub-model predicts the per-hour solar direct normal radiation value of the day.
[0110] The calculation of the Euclidean distance D(x, y) includes,
[0111]
[0112] wherein x i is the per-hour real-time meteorological data to be predicted, y i is the strongly correlated historical meteorological data of each cluster center, and n is the number of meteorological data.
[0113] It should be noted that:
[0114] RMSE (Root Mean Square Error) and R2 (Goodness of Fit) are used as evaluation indexes, and the specific calculation includes,
[0115]
[0116]
[0117] wherein y i is the actual value of sample i; y′ i is the predicted value of sample i; is the average value of the actual value of the sample; n is the number of samples, and in this formula, the sample is the solar direct normal radiation value.
[0118] The effectiveness of this method is verified by comparing the existing LightGBM, BOA-LightGBM, RIME-LightGBM, Mini Batch K-Means-RIME-GBDT models with the final prediction model in this embodiment. The results obtained by using different models for prediction are shown in Table 1.
[0119] Table 1: Predictive Performance Metrics
[0120]
[0121] As can be seen from the table, the final prediction model in this embodiment has excellent performance in both RMSE and R2 under different weather types, indicating that the final prediction model in this embodiment has higher accuracy and robustness in predicting direct solar normal radiation, and has certain reference value for giving full play to the advantages of solar thermal power plants.
[0122] Figure 4 The image shows line graphs of the predicted and actual direct solar radiation values from multiple models on a clear day. Figure 5 The image shows line graphs of the predicted and actual direct solar radiation values from multiple models during a cloudy-to-sunny transition.
[0123] Please refer to Figure 6 This illustration shows a schematic diagram of an apparatus provided by some embodiments of this application. Since the apparatus embodiments are substantially similar to the method embodiments, the description is relatively simple; relevant details can be found in the description of the method embodiments. The apparatus embodiments described below are merely illustrative.
[0124] like Figure 6 As shown, a solar direct normal radiation prediction device 900 may include:
[0125] The data preprocessing module 901 is used to acquire historical meteorological data for a certain time period in the prediction area, form a historical meteorological dataset, and preprocess the historical meteorological data, including:
[0126] Delete the historical meteorological data corresponding to the time periods in the historical meteorological dataset where the direct normal solar radiation is 0.
[0127] If there are missing data in the historical meteorological dataset, and the missing data is numerical data, if the absolute value of the skewness value of the parameter category corresponding to the missing data is greater than the preset skewness value, the median of the parameter category in the historical meteorological dataset will be used to fill the missing data. If the absolute value of the skewness value of the parameter category corresponding to the missing data is less than or equal to the preset skewness value, the mean of the parameter category in the historical meteorological dataset will be used to fill the missing data.
[0128] If there is missing data in the first historical meteorological data set, and the missing data is discrete data, the mode of the parameter category corresponding to the discrete data is used to fill in the missing data.
[0129] The abnormal data in the historical meteorological data set after filling in the missing data is deleted; the abnormal data is historical meteorological data in the historical meteorological data set that is outside the three standard deviation range, and the three standard deviation range is the mean value of the historical meteorological data in the first meteorological parameter set, and the standard deviation of the historical meteorological data in the first meteorological parameter set.
[0130] The clustering module 902 clusters the preprocessed historical meteorological data using a clustering algorithm, classifies the historical meteorological data set according to the clustering result, and obtains a plurality of types of meteorological data sets; and divides the plurality of types of meteorological data sets into a training set and a validation set.
[0131] The model optimization module 903 trains and optimizes the LightGBM model using the training set and the validation set, and obtains a final prediction model.
[0132] The output module 904 is configured to input real-time meteorological data into the final prediction model to predict the direct normal solar radiation value.
[0133] In some embodiments of the present application, the device 900 provided by the embodiments of the present application has the same beneficial effects as the method provided by the aforementioned embodiments of the present application.
[0134] The embodiments of the present application also provide an electronic device corresponding to the method provided by the aforementioned embodiments, which can be an electronic device for a server, such as a server, including a stand-alone server and a distributed server cluster, etc., to execute the above method; the electronic device can also be an electronic device for a client, such as a mobile phone, a notebook computer, a tablet computer, a desktop computer, etc., to execute the above method.
[0135] The electronic device provided by the embodiments of the present application has the same beneficial effects as the method provided by the embodiments of the present application.
[0136] It should be noted that the flowchart and block diagrams in the drawings show the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each of the blocks of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or acts or combinations thereof, or can be implemented by a combination of dedicated hardware and computer instructions.
[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0138] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are only schematic. For example, the division of the units is only a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interface, and can be electrical, mechanical or other forms.
[0139] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0140] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0141] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0142] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should be covered in the scope of the claims and the description of the present application.
Claims
1. A method for predicting direct solar normal radiation, characterized in that, Includes the following steps: Historical meteorological data for a certain period of time in the prediction area are obtained and compiled into a historical meteorological dataset, which includes multiple types of parameters. Preprocessing of historical meteorological data includes: Delete the historical meteorological data corresponding to the time periods in the historical meteorological dataset where the direct normal solar radiation is 0. If there are missing data in the historical meteorological dataset, and the missing data is numerical data, if the absolute value of the skewness value of the parameter category corresponding to the missing data is greater than the preset skewness value, the median of the parameter category in the historical meteorological dataset will be used to fill the missing data. If the absolute value of the skewness value of the parameter category corresponding to the missing data is less than or equal to the preset skewness value, the mean of the parameter category in the historical meteorological dataset will be used to fill the missing data. Clustering algorithms are used to cluster preprocessed historical meteorological data, and the historical meteorological datasets are classified according to the clustering results to obtain multi-class meteorological datasets; the multi-class meteorological datasets are then divided into training sets and validation sets. The LightGBM model is trained and optimized using the training and validation sets to obtain the final prediction model; The meteorological data for the predicted day is used as input to the final prediction model to predict the direct normal solar radiation value for that day. The optimal hyperparameters of the LightGBM model were optimized using the frost-ice optimization algorithm. After training and optimizing the LightGBM model using the training set and validation set, the process further includes: Based on the trained and optimized LightGBM model, solar direct normal radiation prediction sub-models for various meteorological datasets are established by learning and fitting. The final prediction model includes solar direct normal radiation prediction sub-models for various meteorological datasets. Using the meteorological data for the predicted day as input to the final prediction model, the direct normal solar radiation value for that day is predicted, including: Calculate the Euclidean distance between real-time meteorological data and the cluster centers of various meteorological datasets, input the real-time meteorological data into the solar direct normal radiation prediction sub-model corresponding to the cluster center with the smallest Euclidean distance, and predict the solar direct normal radiation value. The optimization of the optimal hyperparameters of the LightGBM model using the frost-ice optimization algorithm includes: Define the hyperparameter space and initialize the hyperparameters; Update the population using the soft frost search strategy; The hard frost puncture mechanism is used to achieve information exchange between particles; Use a positive greedy mechanism to find the optimal solution; Repeat the process until the required number of iterations is reached, and output the optimal combination of hyperparameters. The method of establishing sub-models for predicting direct solar normal radiation for various meteorological datasets through learning and fitting includes: Initialize network parameters; Use a one-sided gradient sampling algorithm to remove historical meteorological parameters with small weights from each type of meteorological dataset; Use a mutual exclusion binding algorithm to reduce the number of parameter categories in historical meteorological datasets; A depth-limited leaf-wise decision tree growth strategy and histogram algorithm are used to fit the residual tree. The fitting process stops after reaching the required number of iterations. A solar direct normal radiation prediction sub-model was established based on meteorological datasets corresponding to different categories.
2. The method for predicting direct solar normal radiation according to claim 1, characterized in that, If there are missing data in the first historical meteorological dataset, and the missing data is discrete data, the mode of the parameter category corresponding to the discrete data is used to fill the missing data.
3. The method for predicting direct solar normal radiation according to claim 2, characterized in that, The preprocessing of historical meteorological data further includes: deleting outlier data from the historical meteorological dataset after filling in missing data; the outlier data refers to historical meteorological data in the historical meteorological dataset that falls outside three standard deviations, where three standard deviations is... , The mean of historical meteorological data in the first meteorological parameter set. is the standard deviation of historical meteorological data in the first meteorological parameter set.
4. The method for predicting direct solar normal radiation according to claim 3, characterized in that, The preprocessing of historical meteorological data also includes normalizing the historical meteorological dataset.
5. The method for predicting direct solar normal radiation according to claim 1, characterized in that, The historical meteorological data includes: temperature, wind speed, solar hour angle, relative humidity, cloud type, and direct solar radiation.
6. The method for predicting direct solar normal radiation according to claim 1, characterized in that, Multiple clustering algorithms were used to cluster the preprocessed historical meteorological data. The effects of the various clustering algorithms were evaluated based on the silhouette coefficient. The clustering result of the clustering algorithm with the highest silhouette coefficient was selected to classify the historical meteorological data. The final silhouette coefficient is the average of the silhouette coefficients of all samples.
7. A device for predicting direct solar normal radiation, characterized in that, The method for predicting direct solar normal radiation as described in claim 1 includes: The data preprocessing module is used to acquire historical meteorological data for a certain time period in the prediction area and form a historical meteorological dataset. Preprocessing of the historical meteorological data includes: deleting historical meteorological data corresponding to periods when the direct normal solar radiation is 0; if there is missing data in the historical meteorological dataset, and the missing data is numerical, and the absolute value of the skewness value of the parameter category corresponding to the missing data is greater than a preset skewness value, then the median of that parameter category in the historical meteorological dataset is used to fill the missing data; if the absolute value of the skewness value of the parameter category corresponding to the missing data is less than or equal to the preset skewness value, then the mean of that parameter category in the historical meteorological dataset is used to fill the missing data; if there is missing data in the first historical meteorological dataset, and the missing data is discrete, then the mode of the parameter category corresponding to the discrete data is used to fill the missing data; the clustering module uses a clustering algorithm to cluster the preprocessed historical meteorological data, classifies the historical meteorological dataset according to the clustering results, and obtains multi-class meteorological datasets; the multi-class meteorological datasets are then divided into training sets and validation sets; The model optimization module uses the training set and validation set to train and optimize the LightGBM model to obtain the final prediction model. The output module is used to take real-time meteorological data as input to the final prediction model and predict the direct normal radiation value of the sun.
8. A solar direct normal radiation prediction device according to claim 7, characterized in that, The preprocessing of historical meteorological data further includes: deleting abnormal data in the historical meteorological dataset after filling in missing data; the abnormal data refers to historical meteorological data in the historical meteorological dataset that is outside three standard deviations, where three standard deviations are the mean of the historical meteorological data in the first meteorological parameter set and the standard deviation of the historical meteorological data in the first meteorological parameter set.
Citation Information
Patent Citations
Multi-model solar normal radiation prediction method and device based on clustering algorithm
CN110197298A
Optical power prediction method based on adaptive classification strategy and hybrid optimization SVR
CN111079980A